I try to call smart contract from dapp, but I get the following error:
(Can’t attach another link, so here’s the hash for ccd explorer: de62c7cf1ac4f2158470a66e260cc1ccccd5b25fbbd67cb8ad4ab3c21095032c)
The contract works correctly if I call it via concordium-client (all fields correspond to what I write in the dapp call).
concordium-client contract update 8625 --entrypoint mint --parameter-json mint_params.json --schema dist/schema.bin --sender <contract-address> --energy 6000 --grpc-port 20000 --grpc-ip node.testnet.concordium.com
[ccd-minting-wizard/smart-contract/readme.md at develop · KatasonovYP/ccd-minting-wizard · GitHub](smart contract source)
[ccd-minting-wizard/client/libs/shared/utils/src/smart-contract/contract-mint.ts at develop · KatasonovYP/ccd-minting-wizard · GitHub](dapp invoke function)
connection.signAndSendTransaction(
account,
AccountTransactionType.Update,
{
amount: new CcdAmount(BigInt(0)),
address: { index: BigInt(index), subindex: BigInt(0) },
receiveName: `${CONTRACT_NAME}.mint`,
maxContractExecutionEnergy: MAX_CONTRACT_EXECUTION_ENERGY,
},
{
owner: { Account: [account] },
tokens: [['22', [{
url: 'https://moccasin-lovely-unicorn-304.mypinata.cloud/ipfs/QmdopfNTweiJu7UtGKhwHyvTAkMJb6zat8DtSvEZpPvXFN',
hash: { None: [] },
},
{ amount: '1', max_supply: '100' },
]]],
},
RAW_SCHEMA,
);
node v21.2.0
yarn v1.22.19
@concordium/web-sdk v3.5.0
@concordium/react-components v0.2.1
I can’t figure out what’s wrong at all. I have a hunch that it’s because I’m not using the latest version of the web-sdk, although when I tried it on version 7 I got the same error
let me know If you need any more information.
Thank you in advance!