Support of Upgradable contracts
xgreenx opened this issue · comments
At the moment we don't have the ability to create upgradeable contracts like in Ethereum.
Reasons:
- We don't have a
fallback
function in ink!. This issue describes the problem(Solved). contract-pallet
doesn't support delegated call. So we can't execute the code of one contract in the context(storage) of another contract(issue to track)(Solved).
Resolving these problems will allow us to create upgradeable contracts like in Solidity via Proxy.
use-ink/ink#698 tracks an example of an upgradeable contract.
use-ink/ink#675 describes a grant to create a first upgradable contract. It contains an example of how a simple upgradable contract can be created. But the suggested solution is not usable in production. Because it requires migration of all data from one contract to another. It will have a huge gas cost.
Also with that feature upgradable contract can be implemented without Proxy
pattern. The code of the contract can be directly updated.