I deployed a smart contract to a substrate chain. How can I upgrade the
smart contract's logic to a newer version?
Edit: I'm using
ink! and deployed on
Shibuya (Astar testnet)
You currently have two options for writing upgradeable smart contracts in ink!. For both of them we have example contracts. They differ in the following key characteristics.
forward-calls example implements a classic forward-pattern:
delegate-calls example on the other hand utilizes an API similar to Ethereum's
Future versions of OpenBrush (a library similar to OpenZeppelin, but for ink!) will contain support for the diamond pattern, another way of building upgradeable contracts.
You can have a look at Parity upgradeable example: https://github.com/paritytech/ink/tree/master/examples/upgradeable-contracts (fixed broken link)
It follows proxy pattern of OpenZeppelin