Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of Upgradable contracts #7

Closed
xgreenx opened this issue Jun 8, 2021 · 0 comments
Closed

Support of Upgradable contracts #7

xgreenx opened this issue Jun 8, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@xgreenx
Copy link
Contributor

xgreenx commented Jun 8, 2021

At the moment we don't have the ability to create upgradeable contracts like in Ethereum.

Reasons:

  1. We don't have a fallback function in ink!. This issue describes the problem(Solved).
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant