Unable to convert CCD in wCCD?

We have deployed and and initialized the cis2-wCCD contract from the concordium rust smart contract example and also able to get the account balance of the account address but unable to convert the CCD to wCCD token getting below error:

Error: Key directory for account ‘3D8HwTSCdaVVCFtc1e6DfELWNoVK6U6uGfTqgc9uYCZqXuA13T’ not found.
Did you forget to add the account (using ‘config account add’)?

Could anybody suggest me What I’m missing here?

Concordium-client needs the private keys associated to your account 3D8... to sign the tx.
You can for example create an account in the mobile wallet and then import the private keys with the following command to concordium-client

./concordium-client config account import ./concordium-backup.concordiumwallet

https://developer.concordium.software/en/mainnet/smart-contracts/tutorials/piggy-bank/preparing.html#importing-your-mobile-wallet-account-key

2 Likes

Hello, @Doris Thank you for your support.

Hello @Doris,

I was able to config the account after as you mentioned in the above comment Thank you for guidance but when I’m trying to run the balanceOf command with the deployed CIS2-wCCD from my testnode using my Index I’m getting this error:

Error: The schema did not include the provided function.

Could please guide me what I’m missing and How can I achieve the missing point?

I checked the contract at index 1951 with the following command (the contract has no schema embedded currently)
./concordium-client contract show 1951 --grpc-port [yourPort]

You can create the schema for your smart contract with the following command and then use the schema.bin instead of the balanceOf_fallback_schema.bin in the command you try to execute:
cargo concordium build --schema-out ./schema.bin

or embedded the schema into your smart contract with the following command and re-deploy your contract (in that case you can execute your command without providing any schema via a flag):
cargo concordium build -e

The wCCD tutorial uses a slightly different upgradable wCCD smart contract from the branch link below that is why the schema given in the tutorial does not work with your deployed smart contract at index 1951.

1 Like

Thank you @Doris for your support will try and update you.