Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 13 additions & 3 deletions .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ on:

env:
FOUNDRY_PROFILE: ci
WORLDCHAIN_PROVIDER: "${{ secrets.WORLDCHAIN_PROVIDER }}"
ETHEREUM_PROVIDER: "${{ secrets.ETHEREUM_PROVIDER }}"

jobs:
check:
Expand All @@ -34,7 +32,16 @@ jobs:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
submodules: recursive
fetch-depth: 1
submodules: true

- uses: taiki-e/install-action@18b1216eba7f8039b0f8d131d5473787f0edce68 # v2.85.3
with:
tool: just@1.57.0
fallback: none

- name: Set up Solidity dependencies
run: just setup-contracts

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@b00af27efadbc7b4ca8b82abbd903b17cc874d2a # v1
Expand All @@ -54,3 +61,6 @@ jobs:

- name: Run Forge tests
run: forge test
env:
WORLDCHAIN_PROVIDER: "${{ secrets.WORLDCHAIN_PROVIDER }}"
ETHEREUM_PROVIDER: "${{ secrets.ETHEREUM_PROVIDER }}"
11 changes: 11 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
[submodule "pkg/contracts/lib/forge-std"]
path = pkg/contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
shallow = true
[submodule "pkg/contracts/lib/BokkyPooBahsDateTimeLibrary"]
path = pkg/contracts/lib/BokkyPooBahsDateTimeLibrary
url = https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary
shallow = true
[submodule "pkg/contracts/lib/world-id-contracts"]
path = pkg/contracts/lib/world-id-contracts
url = https://github.com/worldcoin/world-id-contracts
shallow = true
[submodule "pkg/contracts/lib/safe-contracts"]
path = pkg/contracts/lib/safe-contracts
url = https://github.com/safe-global/safe-contracts
shallow = true
[submodule "pkg/contracts/lib/openzeppelin-contracts"]
path = pkg/contracts/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
shallow = true
[submodule "pkg/contracts/lib/account-abstraction"]
path = pkg/contracts/lib/account-abstraction
url = https://github.com/eth-infinitism/account-abstraction
shallow = true
[submodule "pkg/contracts/lib/openzeppelin-contracts-upgradeable"]
path = pkg/contracts/lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
shallow = true
[submodule "pkg/contracts/lib/safe-modules"]
path = pkg/contracts/lib/safe-modules
url = https://github.com/worldcoin/safe-modules
shallow = true
[submodule "pkg/contracts/lib/nitro-validator"]
path = pkg/contracts/lib/nitro-validator
url = https://github.com/base/nitro-validator
shallow = true
[submodule "pkg/contracts/lib/sp1-contracts"]
path = pkg/contracts/lib/sp1-contracts
url = https://github.com/succinctlabs/sp1-contracts
shallow = true
[submodule "pkg/contracts/lib/optimism"]
path = pkg/contracts/lib/optimism
url = https://github.com/ethereum-optimism/optimism
shallow = true
3 changes: 3 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ devnet-up: build
deploy-contracts:
@just ./pkg/contracts/deploy-contracts

setup-contracts:
@just ./pkg/contracts/setup-contracts

# Build the pinned Optimism implementation contracts in the isolated opstack/ sub-project.
build-opstack:
@just ./pkg/contracts/build-opstack
Expand Down
7 changes: 6 additions & 1 deletion pkg/contracts/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ deploy-contracts:
fmt:
forge fmt

setup-contracts:
git -C ../.. submodule update --init --depth 1 --jobs 8
git -C lib/optimism submodule update --init --depth 1 --jobs 8 -- ':(glob)packages/contracts-bedrock/lib/*'
git -C lib/world-id-contracts submodule update --init --depth 1 --jobs 8 -- ':(glob)lib/*'

# Build the pinned Optimism implementation contracts (solc 0.8.15) in the isolated
# opstack/ sub-project. Tests and deploy scripts read these artifacts via
# vm.getCode/vm.deployCode; run this before `forge test`.
build-opstack:
build-opstack: setup-contracts
cd opstack && forge build

build-contracts *args='': build-opstack
Expand Down
1 change: 1 addition & 0 deletions pkg/contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ remappings = [
"@BokkyPooBahsDateTimeLibrary/=lib/BokkyPooBahsDateTimeLibrary/contracts/",
"@pbh-lib/=src/lib/",
"openzeppelin-contracts/=lib/world-id-contracts/lib/openzeppelin-contracts/contracts/",
"contracts-upgradeable/=lib/world-id-contracts/lib/openzeppelin-contracts-upgradeable/contracts/",
"@4337=lib/safe-modules/modules/4337/contracts/",
"@safe-global/safe-contracts/contracts/=lib/safe-contracts/contracts/",
"@base-contracts/=vendor/base-contracts/",
Expand Down
Loading