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

Features for set_code_hash pattern #163

Open
Artemka374 opened this issue Sep 18, 2023 · 0 comments
Open

Features for set_code_hash pattern #163

Artemka374 opened this issue Sep 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Artemka374
Copy link
Contributor

  • AdminUpgradeableImpl : This contract will manage who can upgrade a contract,
    allowing roles to be separated between the owner of the contract and the administrator
    of the upgradeability features. Unlike Solidity and the Proxy Pattern, where the storage
    layouts of the proxy and the implementation are defined separately (even though the
    storage itself is the same), using set_code_hash directly changes the code of a
    contract at a given address, meaning both the storage layout and storage are shared and
    defined in the implementation contract. By implementing an AdminUpgradeableImpl
    contract, it becomes possible to easily separate the roles of the contract owner and the
    administrator of upgradeability.
  • An upgradeAndCall function: This permissioned function allows the caller to both
    upgrade the code of the contract and call a function and/or the constructor to initialize
    new variables introduced in the newest implementation in the same transaction.
  • An Initialize contract: This contract sets the initializing function mentioned above
    to be callable only once.
@Artemka374 Artemka374 added the enhancement New feature or request label Sep 18, 2023
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