Skip to content

Commit

Permalink
chore: Move l1-contracts-foundry (matter-labs#504)
Browse files Browse the repository at this point in the history
Co-authored-by: Danil <[email protected]>
Co-authored-by: Agustin Aon <[email protected]>
  • Loading branch information
3 people authored Jun 3, 2024
1 parent fe0b7f4 commit 8a70bbb
Show file tree
Hide file tree
Showing 27 changed files with 42 additions and 51 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/l1-contracts-foundry-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: yarn

- name: Build artifacts
working-directory: ./l1-contracts-foundry
working-directory: ./l1-contracts
run: forge build

- name: Build system-contract artifacts
Expand All @@ -40,8 +40,8 @@ jobs:
with:
key: artifacts-l1-contracts-foudry-${{ github.sha }}
path: |
l1-contracts-foundry/cache
l1-contracts-foundry/out
l1-contracts/cache
l1-contracts/out
system-contracts/artifacts-zk
system-contracts/bootloader/build
system-contracts/cache-zk
Expand All @@ -63,8 +63,8 @@ jobs:
fail-on-cache-miss: true
key: artifacts-l1-contracts-foudry-${{ github.sha }}
path: |
l1-contracts-foundry/cache
l1-contracts-foundry/out
l1-contracts/cache
l1-contracts/out
system-contracts/artifacts-zk
system-contracts/bootloader/build
system-contracts/cache-zk
Expand All @@ -75,8 +75,8 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1

- name: Copy configs from template
working-directory: ./l1-contracts-foundry
run: cp -r script-config-template script-config
working-directory: ./l1-contracts
run: cp -r deploy-script-config-template script-config

- name: Run anvil
run: |
Expand All @@ -100,18 +100,18 @@ jobs:
fi
- name: Run DeployL1 script
working-directory: ./l1-contracts-foundry
run: forge script ./script/DeployL1.s.sol --ffi --rpc-url $ANVIL_RPC_URL --broadcast --private-key $ANVIL_PRIVATE_KEY
working-directory: ./l1-contracts
run: forge script ./deploy-scripts/DeployL1.s.sol --ffi --rpc-url $ANVIL_RPC_URL --broadcast --private-key $ANVIL_PRIVATE_KEY

- name: Run DeployErc20 script
working-directory: ./l1-contracts-foundry
run: forge script ./script/DeployErc20.s.sol --ffi --rpc-url $ANVIL_RPC_URL --broadcast --private-key $ANVIL_PRIVATE_KEY
working-directory: ./l1-contracts
run: forge script ./deploy-scripts/DeployErc20.s.sol --ffi --rpc-url $ANVIL_RPC_URL --broadcast --private-key $ANVIL_PRIVATE_KEY
# TODO restore scripts verification
# - name: Run RegisterHyperchain script
# working-directory: ./l1-contracts-foundry
# working-directory: ./l1-contracts
# run: |
# cat ./script-out/output-deploy-l1.toml >> ./script-config/register-hyperchain.toml
# forge script ./script/RegisterHyperchain.s.sol --ffi --rpc-url $ANVIL_RPC_URL --broadcast --private-key $ANVIL_PRIVATE_KEY
# forge script ./deploy-scripts/RegisterHyperchain.s.sol --ffi --rpc-url $ANVIL_RPC_URL --broadcast --private-key $ANVIL_PRIVATE_KEY
# - name: Run InitializeL2WethToken script
# working-directory: ./l1-contracts-foundry
# run: forge script ./script/InitializeL2WethToken.s.sol --ffi --rpc-url $ANVIL_RPC_URL --broadcast --private-key $ANVIL_PRIVATE_KEY
# run: forge script ./deploy-scripts/InitializeL2WethToken.s.sol --ffi --rpc-url $ANVIL_RPC_URL --broadcast --private-key $ANVIL_PRIVATE_KEY
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ l1-contracts/lcov.info
l1-contracts/report/*
l1-contracts/coverage/*
l1-contracts/out/*
l1-contracts-foundry/broadcast/*
l1-contracts-foundry/script-config/*
l1-contracts-foundry/script-out/*
!l1-contracts-foundry/script-out/.gitkeep
l1-contracts/broadcast/*
l1-contracts/script-config/*
l1-contracts/script-out/*
!l1-contracts/script-out/.gitkeep
15 changes: 7 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
[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
[submodule "l1-contracts-foundry/lib/openzeppelin-contracts-upgradeable"]
path = l1-contracts-foundry/lib/openzeppelin-contracts-upgradeable
[submodule "l1-contracts/lib/openzeppelin-contracts-upgradeable"]
path = l1-contracts/lib/openzeppelin-contracts-upgradeable
url = https://github.com/Openzeppelin/openzeppelin-contracts-upgradeable
branch = release-v4.9
[submodule "l1-contracts/lib/openzeppelin-contracts"]
path = l1-contracts/lib/openzeppelin-contracts
url = https://github.com/Openzeppelin/openzeppelin-contracts
branch = release-v4.9
20 changes: 0 additions & 20 deletions l1-contracts-foundry/foundry.toml

This file was deleted.

1 change: 0 additions & 1 deletion l1-contracts-foundry/lib/forge-std
Submodule forge-std deleted from b6a506
Submodule openzeppelin-contracts-upgradeable deleted from a40cb0
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions l1-contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
src = 'contracts'
out = 'out'
libs = ['node_modules', 'lib']
remappings = [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"l2-contracts/=../l2-contracts/contracts/"
]
allow_paths = ["../l2-contracts/contracts"]
fs_permissions = [
{ access = "read", path = "../system-contracts/bootloader/build/artifacts" },
{ access = "read", path = "../system-contracts/artifacts-zk/contracts-preprocessed" },
{ access = "read", path = "../l2-contracts/artifacts-zk/" },
{ access = "read", path = "./script-config" },
{ access = "read-write", path = "./script-out" },
{ access = "read", path = "./out" }
]
cache_path = 'cache-forge'
test = 'test/foundry'
solc_version = "0.8.24"
Expand Down
1 change: 1 addition & 0 deletions l1-contracts/lib/openzeppelin-contracts-upgradeable
1 change: 0 additions & 1 deletion l1-contracts/remappings.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@ensdomains/=node_modules/@ensdomains/
@openzeppelin/=node_modules/@openzeppelin/
ds-test/=lib/forge-std/lib/ds-test/src/
eth-gas-reporter/=node_modules/eth-gas-reporter/
forge-std/=lib/forge-std/src/
Expand Down
File renamed without changes.

0 comments on commit 8a70bbb

Please sign in to comment.