Ability to deploy proxy using create2
See original GitHub issueIt would be helpful if it were possible to define a salt when calling deployProxy
which would indicate to use CREATE2 and deploy out a proxy at a deterministic address.
Happy to elaborate more, but for instance if I wanted to deploy the same upgradable proxy on two different chains, and make it so they have the same address, it wouldn’t be possible when using this library.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Deploying Smart Contracts Using CREATE2
The CREATE2 opcode gives us the ability predict the address where a contract will be deployed, without ever having to do so. This...
Read more >Can I use create2 to deploy minimal proxies in solidity, without ...
Solidity 0.6.2 allows the creation of contracts with the create2 opcode via the new keyword and passing a salt in addition to any...
Read more >EIP Proposal: CREATE2 contract factory precompile for ...
The idea behind this EIP is adding a precompile that executes a CREATE2 with whatever data is sent to it and a fixed...
Read more >Metamorphosis Smart Contracts using CREATE2
So far, all of the Smart Contracts are linking a Proxy to another Smart ... With this solution you deploy a Smart Contract...
Read more >Why create2?. Doing the “impossible” with create | Coinmonks
The stated idea behind this is to be able to predetermine the address of a contract in advance of deployment, such that a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@habdelra, an EOA (wallet with a private key) cannot use
create2
.create2
power can only be used by a smart contract. This is why you need a factory.You first need to use a script similar to what gnosis does to create the factory at the right address … and then (and only then) you can use create2 to instanciate “child-contracts”.
If you want a generic factory, that is available on most networks, and can be used to deploy anything (simple contract or complex factories) you can use this one.
All the details necessary to deploy it on any new chain, including hardhat/ganache chains, can be found here
Last shameless plug: my devcon talk that discuss the need for such factory
Yeah the hard thing is getting the factory in the same address on every network. As far as I know this is only possible to do reliably using “Nick’s method”.
The ability to deploy proxies on the same address on every network sounds good, but unfortunately we don’t have enough bandwidth right now to make it a priority.