5

I am doing runtime upgrade of substrate blockchain from 0.9.36 --> 0.9.37 --->0.9.43 . And i have some contracts deployed on the running blockchain which is running on 36 version . After doing runtime upgrade from 0.9.36 ---> 0.9.39 version . I tried to check contracts on my chain. When I tried to call them through substrate contracts-ui (on my chain which is now runtime upgraded to 39 version from 36 version) it is showing contracts not found and I am unable to call my deployed contracts . The same is also happening on my other chain which I runtime upgraded from 43 version to 1.0.0 version can someone please tell me how to solve this issue.

error i am getting in ui after upgrading

  update  

i have tried these steps

1 i have added. 36 version substrate contract pallet in 39 version substrate and then ,i did runtime upgrade of substrate blockchain which is running at 36 version substrate with contracts deployed on it with the 39 version substrate which has 36 version contract pallet in it. and everything worked fine in this case.

i want to know where is the issue.

1 Answer 1

1

It looks like there is an issue with the storage migration.

  • Are you including the storage migrations contained in pallet-contracts in your runtime ? (check also this substrate issue and this SE answer)
  • In general you need to include the migrations into the Executive type of your runtime (check also this SE answer)

More information on storage migrations you can find in this page of the Substrate docs. Also, worth checking the try-runtime-cli and this SE answer on testing a migration.

Another good practice is to do the runtime upgrades "one by one" and not "jump up" multiple versions during one upgrade. If you still choose to skip versions during a runtime upgrade, you have to check that there are no storage migrations between versions.

1
  • @ Dominique i have done all the steps you mentioned but still from. 38-->39 version it is not working. and still showing contract not found in contracts ui. Sep 19 at 6:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.