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?
1 Answer
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.
-
1more importantly, in WASM based SC, is there a way to modify the underlying ISC state storage described in the
schema.yaml
after being deployed?– 0xZiyadCommented Feb 27, 2023 at 22:13 -
1You'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.– AniCommented Mar 7, 2023 at 11:58