2

I'm looking for a way to modify/upgrade my deployed contract functions while keeping the state untouched. is there an example somewhere on doing this?

0xZiyad
  • 41
  • 2

1 Answers1

1

If you're talking about EVM contracts, then there are several examples on how to write an upgradable smart contract. From OpenZepplin.

If you're talking about WASM contracts, then I don't believe there's any example as such yet.

Ani
  • 261
  • 1
  • 6
  • 1
    more importantly, in WASM based SC, is there a way to modify the underlying ISC state storage described in the schema.yaml after being deployed? – 0xZiyad Feb 27 '23 at 22:13
  • 1
    You'll need to deploy a new contact. Or if you have constructed the contact in a way that the state storage is variable, perhaps it's possible. But updating schema.yml will not be possible past deploying. – Ani Mar 07 '23 at 11:58