Runtime failure after Smart Contract upgrade

We upgraded our smart contract on Mainnet
https://ccdscan.io/?dcount=1&dentity=contract&dcontractAddressIndex=9427&dcontractAddressSubIndex=0
Firstly, we updated it with new code, method renaming, and small fixes. The update transaction was successful.
After that, any call to the contract is rejected on the client side with runtime failure. I can’t even invoke the get_paused_status view function from the console:

concordium-client contract invoke 9427 --entrypoint get_paused_status --grpc-ip grpc.mainnet.concordium.software --secure
Invocation resulted in failure:
 - Energy used: 2166 NRG
 - Reason: runtime failure .

On Testnet, the upgrade went well, with the same source code. We tried to do the second upgrade with a verifiable build and it passed but still the same issue.
https://testnet.ccdscan.io/?dcount=1&dentity=contract&dcontractAddressIndex=9192&dcontractAddressSubIndex=0

What could go wrong to cause this error?

The problem found!!! Our Mainnet contract was initially deployed with another state. But our Testnet Smart Contracts were of newer versions and deployed went okay there.

The solutions is to make migrations. If anyone can share good examples of how to erite migrations and specify them in params, thank you in advance

1 Like