Cannot be parsed as a smart contract module

Hi, I am trying to upgrade the contract version, so working on
concordium-node 4.0.11
concordium-client 4.0.3
cargo-concordium 2.0.1

When I tried to compile and deploy the piggy-bank example as it is, I got the following error:

Error: Supplied file 'piggy_bank_part1.wasm' cannot be parsed as a smart contract module to be deployed:

piggy-bank-part2 and auction have also the same result.

Am I missing something? or what should I do?

Was the .wasm produced with the old version of cargo-concordium?

Which command produces this output? cargo concordium run?

thank you for your reply!

My environment is

$ concordium-client --version
4.0.3
$ cargo concordium --version
cargo-concordium 2.0.1

The command for building wasm file is

$ cargo concordium build -e

And the command for deploying is

$ concordium-client module deploy piggy_bank_part1.wasm

This causes the above error.

sorry, I solved it myself.
I added .v1 to .wasm and it succeeded without any problems.
I should have read the documentation properly.

1 Like

Great!

Perhaps we could improve the error message and add some suggestions on how to fix it.

1 Like