Hi!
I am currently working through the tutorials and are now stuck with the eSealing application.
(From here: concordium-rust-smart-contracts/examples/eSealing at main · Concordium/concordium-rust-smart-contracts · GitHub)
First I try to build/deploy/init the app by following 3 commands (run in order):
cargo concordium build --out dist/module.wasm.v1 --schema-out dist/schema.bin
concordium-client module deploy dist/module.wasm.v1 --sender {concordium_account} --name {contract_name} --grpc-port {grpc_port}
concordium-client contract init {module_id} --sender {concordium_account} --energy 30000 --contract {contract_name} --grpc-port {grpc_port}
These seems to work fine if I set grpc_port == 10001, but if I change it to 20001 as the example suggests, I get following error.
concordium-client: user error (gRPC error: not enough bytes)
So continuing with the port working, I run following:
concordium-client contract update {contract_instance} --entrypoint registerFile --sender {concordium_account} --energy 30000 --parameter-json {file_path} --grpc-port {grpc_port}
Which leads to following error:
Error: Could not parse the json parameter because a no schema was embedded in the module or provided with the --schema flag.
So any suggestions to further progress is welcomed with open arms
Bonus Question:
In the function definitions:
#[init(contract = "eSealingtest7", event = "Event")]
Is it then possible to use a variable in place for the “eSealingtest7”? To prevent having to change all manually? My attempts so far to create the variable is:
//static CONTRACT_NAME: &str = "eSealing";
//static CONTRACT_NAME_L: &str = CONTRACT_NAME.as_str();
But both cases I get an error stating it expect a string literal? Any way to circumvent?
Thanks in advance and good day!