-
Notifications
You must be signed in to change notification settings - Fork 18
Implement CREATE2 factory for deterministic contract deployments #3798
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
Open
silva-fj
wants to merge
20
commits into
dev
Choose a base branch
from
p-1727-considering-deploying-a-create2-factory-contract
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,835
−0
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c2b1a49
Configure foundry for deterministic bytecode
silva-fj 127da67
Add Create2Factory for deterministic deployments
silva-fj d5e3a1e
Add comprehensive tests for Create2Factory
silva-fj 5d1995d
Add deployment script for Create2Factory
silva-fj f8c4f29
Add CREATE2-based deployment script for AA contracts
silva-fj 665035a
Add Create2Factory addresses registry
silva-fj 1bb11a1
Document CREATE2 deterministic deployment strategy
silva-fj e321695
Rename Create2Factory to Create2FactoryV1
silva-fj e520a4e
Update deployment scripts for Create2FactoryV1 and new generateSalt s…
silva-fj bb8a28a
Update tests for Create2FactoryV1 and new generateSalt signature
silva-fj c4d6c3b
Add DeployContract script for individual contract deployments
silva-fj 41ecb12
Update DEPLOYMENT.md for simplified salt generation and new DeployCon…
silva-fj 85db4da
Merge branch 'dev' into p-1727-considering-deploying-a-create2-factor…
silva-fj ecf2a47
Remove unused deployer parameter from deployment functions
silva-fj 8aa35ec
Pin Foundry version to v1.2.3 to fix AA contracts build
silva-fj 5072570
Merge branch 'dev' into p-1727-considering-deploying-a-create2-factor…
silva-fj d106ac3
Merge branch 'dev' into p-1727-considering-deploying-a-create2-factor…
BillyWooo 69ab191
Merge branch 'dev' into p-1727-considering-deploying-a-create2-factor…
BillyWooo 0ea95c4
Merge branch 'dev' into p-1727-considering-deploying-a-create2-factor…
BillyWooo 3e420aa
Merge branch 'dev' into p-1727-considering-deploying-a-create2-factor…
BillyWooo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
tee-worker/omni-executor/contracts/aa/deployments/create2-factories.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| { | ||
| "$schema": "./create2-factories.schema.json", | ||
| "description": "Registry of Create2Factory contract addresses across different networks", | ||
| "version": "1.0.0", | ||
| "factories": { | ||
| "ethereum": { | ||
| "chainId": 1, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "ethereum-sepolia": { | ||
| "chainId": 11155111, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "arbitrum": { | ||
| "chainId": 42161, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "arbitrum-sepolia": { | ||
| "chainId": 421614, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "optimism": { | ||
| "chainId": 10, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "optimism-sepolia": { | ||
| "chainId": 11155420, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "base": { | ||
| "chainId": 8453, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "base-sepolia": { | ||
| "chainId": 84532, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "polygon": { | ||
| "chainId": 137, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "polygon-amoy": { | ||
| "chainId": 80002, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "bsc": { | ||
| "chainId": 56, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "bsc-testnet": { | ||
| "chainId": 97, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "avalanche": { | ||
| "chainId": 43114, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "avalanche-fuji": { | ||
| "chainId": 43113, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "hyperevm-mainnet": { | ||
| "chainId": 999, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "hyperevm-testnet": { | ||
| "chainId": 998, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false | ||
| }, | ||
| "localhost": { | ||
| "chainId": 31337, | ||
| "address": null, | ||
| "deployer": null, | ||
| "blockNumber": null, | ||
| "deployed": false, | ||
| "note": "Local Anvil testnet - addresses will change between restarts" | ||
| } | ||
| }, | ||
| "notes": [ | ||
| "This file tracks Create2Factory deployments across all networks", | ||
| "Update this file after deploying the factory to a new network", | ||
| "Factory addresses are used by DeployWithCreate2.s.sol script", | ||
| "For deterministic deployments, use the same deployer EOA on all chains" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried to deploy contracts with create2 factory? I'm not sure if would cause any verification problem (or you'll need manually verify that) as etherscan probably expects some metadatas to verify the contract
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried deploying a contract locally on Anvil. I got these values from the docs here