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

feat: add initial l1-contracts-foundry #267

Merged
merged 93 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
ccbede4
feat: add initial l1-contracts-foundry
aon Mar 13, 2024
e4407d5
fix: remove repeated contracts
aon Mar 13, 2024
bbf6497
feat: create makefile for building
aon Mar 13, 2024
9380820
fix: remove unnecessary log
aon Mar 13, 2024
0aeafa0
feat: move system config values to contracts
aon Mar 14, 2024
26f7f8a
feat: create testnet specific verifier to remove solpp
aon Mar 15, 2024
e4f99f2
feat: remove solpp dependency
aon Mar 15, 2024
218310a
Merge branch 'aon-feat-remove-system-configs'
aon Mar 15, 2024
3ac2214
feat: remove unnecessary preprocess
aon Mar 15, 2024
cd94453
feat: add foundry correct remappings
aon Mar 15, 2024
c011a82
Merge remote-tracking branch 'upstream/dev' into aon-feat-remove-syst…
aon Mar 15, 2024
3a68f64
fix: add missing system configs
aon Mar 15, 2024
c1ac432
fix: imports
aon Mar 15, 2024
861a314
fix: foundry tests
aon Mar 15, 2024
68f22c9
feat: remove constants from config
aon Mar 18, 2024
43df54e
fix: forge-std unwanted update
aon Mar 18, 2024
b356ac2
fix: move magic number into Config.sol
aon Mar 19, 2024
f405561
feat: add documentation to TestnetVerifier
aon Mar 19, 2024
4c018fa
fix: remove unnecessary remapping
aon Mar 19, 2024
727c16b
fix: remove one time usage contract
aon Mar 19, 2024
9367168
feat: improve testnetverifier to inherit from verifier
aon Mar 19, 2024
5770b00
fix: foundry tests
aon Mar 19, 2024
d3326fb
fix: update verifier contract template to latest verifier contract
aon Mar 19, 2024
5183401
Merge branch 'aon-feat-remove-system-configs'
aon Mar 19, 2024
2d64470
chore: forge init
aon Mar 19, 2024
4492cd6
forge install: forge-std
aon Mar 19, 2024
d3e70e8
feat: add openzeppelin submodule
aon Mar 22, 2024
8f3326d
feat: improve deployl1 script
aon Mar 22, 2024
7b7e8cf
fix: remove unnecessary files
aon Mar 22, 2024
2502db2
fix: delete unnecessary file
aon Mar 22, 2024
925d804
fix: add changes to improve script
aon Mar 22, 2024
0ac906e
feat: add sample .env
aon Mar 22, 2024
06ed9ef
Merge remote-tracking branch 'upstream/dev'
aon Mar 22, 2024
a5cf952
chore: fix lint issues
aon Mar 22, 2024
0f4e433
fix: remove unnecessary files
aon Mar 22, 2024
9f4b5e6
fix: rollback systemconfig unwanted changes
aon Mar 22, 2024
086a36b
fix: rollback unwanted changes
aon Mar 25, 2024
7e5ea03
Merge remote-tracking branch 'upstream/dev'
aon Mar 25, 2024
bc5b93f
fix: solhint issues
aon Mar 25, 2024
21f5b3e
feat: create abstract script and utils libraries
aon Mar 25, 2024
f857082
feat: add configuration through toml file
aon Mar 25, 2024
48403d7
fix: default chain id
aon Mar 25, 2024
659eada
feat: change config file name
aon Mar 25, 2024
3a2baa1
feat: add diamond proxy deploy and save script outputs to file
aon Mar 25, 2024
4762360
feat: pass private key using forge cli
aon Mar 25, 2024
896a0f3
feat: remove chainid and network from config to be parsed from block …
aon Mar 25, 2024
f8ce09d
feat: add precheck to validate if contract code is already deployed
aon Mar 26, 2024
2413280
fix: deploy via create2 check
aon Mar 26, 2024
9877123
feat: migrate to use create2 from deterministic-deployment-proxy
aon Mar 26, 2024
0cf1bb6
fix: missing config
aon Mar 26, 2024
b8141f7
feat: improve multicall3 instantiation
aon Mar 26, 2024
d33b66b
fix: camel case convention
aon Mar 26, 2024
62893ae
Merge remote-tracking branch 'upstream/dev'
aon Mar 26, 2024
d52b625
feat: move config to toml
aon Mar 26, 2024
e65fa90
feat: update evm version to cancun following l1-contracts
aon Mar 26, 2024
2ae6d22
fix: change to use eraChain Id
aon Mar 26, 2024
7e6e1b1
fix: wrong chainId on deploying DiamondProxy
aon Mar 26, 2024
9f3e07a
feat: update state transition manager deploy data
aon Mar 26, 2024
9d1692e
fix: remove unused variables
aon Mar 27, 2024
99196fb
feat: add deploy hyperchain script
aon Mar 27, 2024
30193ef
fix: issue when getting selectors from facets
aon Mar 27, 2024
99578de
feat: add deploy create2factory
aon Mar 27, 2024
7359c10
fix: compile error
aon Mar 27, 2024
7946220
feat: grab config from deployl1 script for deployHyperchain
aon Mar 27, 2024
209b98f
feat: finish script DeployHyperchain
aon Mar 27, 2024
7fc7bc8
fix: lint issues
aon Mar 27, 2024
e1210af
feat: moved hardcoded values to config
aon Mar 27, 2024
12d234a
fix: change chain_id to l1_chain_id for clarity
aon Apr 3, 2024
0030b69
feat: add multicall3 deployed address to config
aon Apr 3, 2024
667c52a
feat: add documentation to utils
aon Apr 3, 2024
76cd60d
feat: move pudata pricing mode to config
aon Apr 3, 2024
3a0a2d8
fix: change error message
aon Apr 3, 2024
dabefcb
fix: improve docs
aon Apr 3, 2024
440c311
fix: add missing broadcast
aon Apr 3, 2024
96f1801
fix: add todo
aon Apr 3, 2024
4d4b753
fix: change contract name
aon Apr 3, 2024
22f1b4c
feat: change magic number to constant
aon Apr 3, 2024
b8b43bb
fix: add owner address config
aon Apr 3, 2024
02cf637
feat: change deployer to owner address
aon Apr 3, 2024
b2f40e5
fix: add owner addr to hyperchain script
aon Apr 3, 2024
9d976b0
feat: add config for hyperchain
aon Apr 3, 2024
ff2ad2b
Merge remote-tracking branch 'upstream/dev'
aon Apr 3, 2024
114f8d0
fix: change era chain id to hyperchain chain id
aon Apr 3, 2024
3fd43fa
fix: remove repeated variables from L1SharedBridge
aon Apr 3, 2024
280c3e1
fix: test error on legacy era
aon Apr 3, 2024
eefef86
feat: improve deployment of L1SharedBridge and L1ERC20Bridge
aon Apr 3, 2024
532852c
feat: update tests to reflect changes in L1SharedBridge deployment
aon Apr 4, 2024
b363c67
feat: change register hyperchain script name for clarity
aon Apr 4, 2024
e0e5cee
fix: remove unused gas_price config
aon Apr 4, 2024
fdb5dc2
fix: remove governance unnecessary owner change
aon Apr 4, 2024
31436ae
fix: improve ordering of immutable and storage variables
aon Apr 5, 2024
3ea58c9
fix: moved console.log outside of broadcast functions
aon Apr 5, 2024
875d696
Merge branch 'dev' into main
aon Apr 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cache/
contracts-preprocessed/
era_test_node.log*
node_modules/
out/
target/
tools/data/Verifier.sol
typechain/
Expand All @@ -21,3 +22,6 @@ l1-contracts/lcov.info
l1-contracts/report/*
l1-contracts/coverage/*
l1-contracts/out/*
l1-contracts-foundry/broadcast/*
l1-contracts-foundry/script-out/*
!l1-contracts-foundry/script-out/.gitkeep
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
[submodule "l1-contracts/lib/murky"]
path = l1-contracts/lib/murky
url = https://github.com/dmfxyz/murky
[submodule "l1-contracts-foundry/lib/forge-std"]
path = l1-contracts-foundry/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "l1-contracts-foundry/lib/openzeppelin-contracts"]
path = l1-contracts-foundry/lib/openzeppelin-contracts
url = https://github.com/Openzeppelin/openzeppelin-contracts
3 changes: 3 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ node_modules
l1-contracts/lib
l1-contracts/node_modules

# l1-contracts-foundry
l1-contracts-foundry/lib

# l2-contracts
l2-contracts/node_modules

Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
tools/data
l1-contracts/lib
l1-contracts-foundry/lib
system-contracts/contracts/openzeppelin
system-contracts/contracts/Constants.sol
system-contracts/artifacts-zk
Expand Down
4 changes: 4 additions & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ l1-contracts/cache-forge
l1-contracts/lib
l1-contracts/node_modules

# l1-contracts-foundry
l1-contracts-foundry/cache
l1-contracts-foundry/lib

# l2-contracts
l2-contracts/cache-zk
l2-contracts/node_modules
Expand Down
16 changes: 16 additions & 0 deletions l1-contracts-foundry/foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[profile.default]
src = "../l1-contracts/contracts"
out = "out"
libs = ["lib"]
remappings = [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"contracts/=../l1-contracts/contracts/"
]
allow_paths = ["../l1-contracts/contracts"]
fs_permissions = [
{ access = "read", path = "../system-contracts/bootloader/build/artifacts"},
{ access = "read", path = "../system-contracts/artifacts-zk/contracts-preprocessed"},
{ access = "read", path = "./script-config" },
{ access = "read-write", path = "./script-out" }
]
evm_version="cancun"
1 change: 1 addition & 0 deletions l1-contracts-foundry/lib/forge-std
Submodule forge-std added at b6a506
1 change: 1 addition & 0 deletions l1-contracts-foundry/lib/openzeppelin-contracts
Submodule openzeppelin-contracts added at dc44c9
37 changes: 37 additions & 0 deletions l1-contracts-foundry/script-config/config-deploy-l1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
era_chain_id = 9
aon marked this conversation as resolved.
Show resolved Hide resolved
owner_address = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"

[contracts]
governance_security_council_address = "0x0000000000000000000000000000000000000000"
governance_min_delay = 0
create2_factory_salt = "0x00000000000000000000000000000000000000000000000000000000000000ff"
create2_factory_addr = "0x0000000000000000000000000000000000000000"
validator_timelock_execution_delay = 0
genesis_root = "0x0000000000000000000000000000000000000000000000000000000000000000"
genesis_rollup_leaf_index = 0
genesis_batch_commitment = "0x0000000000000000000000000000000000000000000000000000000000000000"
latest_protocol_version = 0
recursion_node_level_vk_hash = "0x0000000000000000000000000000000000000000000000000000000000000000"
recursion_leaf_level_vk_hash = "0x0000000000000000000000000000000000000000000000000000000000000000"
recursion_circuits_set_vks_hash = "0x0000000000000000000000000000000000000000000000000000000000000000"
priority_tx_max_gas_limit = 80000000
shared_bridge_upgrade_storage_switch = 0
diamond_init_pubdata_pricing_mode = 0
diamond_init_batch_overhead_l1_gas = 1000000
diamond_init_max_pubdata_per_batch = 120000
diamond_init_max_l2_gas_per_batch = 80000000
diamond_init_priority_tx_max_pubdata = 99000
diamond_init_minimal_l2_gas_price = 250000000

[tokens]
token_weth_address = "0x0000000000000000000000000000000000000000"

[hyperchain]
hyperchain_chain_id = 9
base_token_addr = "0x0000000000000000000000000000000000000001"
bridgehub_create_new_chain_salt = 0
validium_mode = false
validator_sender_operator_commit_eth = "0x0000000000000000000000000000000000000000"
validator_sender_operator_blobs_eth = "0x0000000000000000000000000000000000000001"
base_token_gas_price_multiplier_nominator = 1
base_token_gas_price_multiplier_denominator = 1
Empty file.
Loading
Loading