Closed ash-hashtag closed 1 year ago
The function you're trying to use takes the schema of a contract module, whereas the name of your schema constant indicates you specify the schema for a function (perhaps it's parameters?). If this assumption is correct, this will likely be why it fails.
If you want to use the schema for a functions parameters, please try using the function serializeTypeValue
instead.
I didn't change anything, and it got fixed somehow now it works.
Bug Description
Parameters serialization fails with the error Unable to serialize parameters, due to: Unable to find contract schema in module schema
Steps to Reproduce
copied from https://github.com/Concordium/concordium-browser-wallet/blob/main/examples/wCCD/src/wCCD.tsx updateWCCDBalanceAccount function, and just changed toBuffer to node's Buffer.from
throws
Expected Result To not throw error, and serialize as usual
Actual Result Throws error. Could anyone point out what I'm doing wrong?
Versions
Software Version
OS Arch linux x86_64
Browser
Mobile device, if applicable