Concordium / concordium-smart-contract-tools

Tools for building, deploying, and interacting with smart contracts
Apache License 2.0
2 stars 8 forks source link

Deploy and Initialize Smart Contracts Tool - Improve error message if uploaded schema is not good #132

Open mh-concordium opened 10 months ago

mh-concordium commented 10 months ago

Description I have tried to upload schema exported with cargo concordium build -b schema-base-64.b64 The error messagecould be intrepreted in a different way than it is not supported.

Error: Deserializing the returnValue from the 'mh_nft.view' method of contract '7262' failed. Original error: Error: Missing Schema Version.

Steps to Reproduce Try to read a contract deployed from a module that doesn't have embedded schema while uploading base-64 schema.

Expected Result Maybe the error message could say that we support/require binary export of a schema.

Maybe we could also just write in the frontend that we explicitly need a binary. From the heading above the file upload field Upload Smart Contract Module Schema File (e.g. schema.bin) I had impression that I can use any of the schema exports while schema.bin is one of the examples we can use.

Actual Result Error message appears:

Error: Deserializing the returnValue from the 'mh_nft.view' method of contract '7262' failed. Original error: Error: Missing Schema Version. Versions