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

Deploy libs and implementation contracts on counter-factual addresses #390

Closed
guidiaz opened this issue Nov 6, 2023 · 3 comments
Closed
Assignees
Labels

Comments

@guidiaz
Copy link
Collaborator

guidiaz commented Nov 6, 2023

  • Assess Create3 Openzeppelin library
  • Assess whether WitnetProxies addresses can be counter-factual to deployer's EOA
  • Adding factory method on Create2Factory / Creating new Create3Factory
  • Adapt migration scripts accordingling
@guidiaz
Copy link
Collaborator Author

guidiaz commented Nov 6, 2023

We'd probable make use of Create3 library, instead of CREATE2, for deploying counter-factual proxies, and start using CREATE2 for deploying libs and implementations libs.

@guidiaz
Copy link
Collaborator Author

guidiaz commented Nov 6, 2023

Forseen steps:

  • Rename Create2Factory to WitnetDeployer
  • Make WitnetDeployer import WitnetProxy
  • Modify deployment scripts for libs and impls, as to use WitnetDeployer and pass concatenation of createCode + constructorArgs when calling on WitnetDeployer.deploy
  • Use WitnetProxy's creation code within WitnetDeployer constructor
  • Add new method WitnetDeployer.proxify(bytes32 _salt, address _firstImplementation, bytes _initData) as to create WitnetProxy and immediately upgrade it to provided Witnet-compatible artifact, where the address is to be determined by the provided _salt only.
  • Deploy all required proxies within same migration script (e.g. just after WitnetDeployer is deployed)
  • Improve scripts/vanity.js as to search for create3 counter-factual addresses
  • Launch vanity searches for 0x0000...0000 proxy addressess

@guidiaz guidiaz self-assigned this Nov 9, 2023
@guidiaz
Copy link
Collaborator Author

guidiaz commented Nov 9, 2023

See #392.

@guidiaz guidiaz mentioned this issue Nov 28, 2023
@guidiaz guidiaz closed this as completed Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant