and I generate the schema by calling:
cargo concordium build --schema-base64-out -
Is there anything else I need to do to for the parameters to be seen?
Edit
Also, if I refactor the code and rename the function my_function rather than contract_my_function then the error message becomes:
Update contract failed:
No receive function 'my_function of contract ‘my_contract’ ’ found in module
67d568433bd72e4326241f262213d77f446db8ba03dfba351ae35c1b2e7e510
I am sure I read previously that the receive functions need to begin with ‘contract_’ but the examples I was looking at did not have that so I removed it. Do I need to put it back or is this a different issue?
When using the contract you either have to embed the schema (using -e or --schema-embed) or you have to supply it to concordium-client. In that case you cannot use the base64 schema, but only the binary one.
Receive function does not have to start with contract_. The --entrypoint argument in your case should be contract_my_function but I would recommned changing it to just my_function in the contracdt.
1 - I was following the tutorial here tutorial where seemed to use the base64 schema and then supplied this to the dApp. Did I misunderstand?
I tried to embed the schema using --schema-embed and then rebuilt the wasm file and redeployed the contract but now I get the error “The given transaction is not valid due to: unable to deserialize parameters, due to: Unable to find contract schema in module schema” when I try to call the Init function. Do I need to change the webpage calling code as well?
This is my build command:
cargo concordium build --out my_project.wasm.v1
This is my deploy command:
concordium-client module deploy my_project.wasm.v1 --sender my_account --name my_project --grpc-port 10000 --grpc-ip node.testnet.concordium.com
I use this to get the schema (as per the previously linked tutorial)
cargo concordium build --schema-base64-out -
I copy this and paste the output in to the front end code in the variable LP_RAW_SCHEMA
And of course if you update the address as well. The one you are showing is the contract instance at address (0,0) which is probably not your contract.
concordium-client module show project_name --out -
But I just get the error messge:
concordium-client.exe: user error (Cannot establish connection to GRPC endpoint.)
Is there some other setting somewhere I need?
The one you are showing is the contract instance at address (0,0) which is probably not your contract.
The output when I deployed said "Enter password for credential with index 0 and signing key with index 0: " and not done any updates or anything so I thought it would still be at 0,0.
Is that not right? If not, how do I determine which index it is at?