Skip to content

Commit 4faef13

Browse files
authored
[UNTRACKED] V2 (#57)
Faster-than-finality cross-chain USDC transfers
2 parents 377c9bd + c0b9ea7 commit 4faef13

File tree

86 files changed

+12857
-244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+12857
-244
lines changed

.github/workflows/ci-olympix.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "Olympix Scan"
2+
on:
3+
pull_request:
4+
branches: [ "master" ]
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '31 14 * * 1' # Every Monday 2:31PM UTC
8+
9+
jobs:
10+
run_olympix:
11+
if: ${{ github.repository_owner == 'circlefin' }}
12+
uses: circlefin/security-seceng-templates/.github/workflows/olympix_scan.yml@v1
13+

.github/workflows/ci.yml

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ jobs:
1212
with:
1313
submodules: 'true'
1414

15+
- name: Setup Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.10'
19+
1520
- name: Install Node
1621
uses: actions/setup-node@v4
1722

@@ -30,10 +35,56 @@ jobs:
3035
- name: Run Integration Tests
3136
run: make anvil-test
3237

33-
- name: Run Slither
34-
uses: crytic/[email protected]
38+
- name: Run v2 Integration Tests
39+
run: make anvil-test-v2
40+
41+
analyze-message-transmitter:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Check out repository code
45+
uses: actions/checkout@v4
46+
with:
47+
submodules: 'true'
48+
49+
- name: Set up Python
50+
uses: actions/setup-python@v5
3551
with:
36-
fail-on: none
52+
python-version: '3.10'
53+
54+
- name: Run Static Analysis on Message Transmitter
55+
run: make analyze-message-transmitter
56+
57+
analyze-message-transmitter-v2:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Check out repository code
61+
uses: actions/checkout@v4
62+
with:
63+
submodules: 'true'
64+
65+
- name: Set up Python
66+
uses: actions/setup-python@v5
67+
with:
68+
python-version: '3.10'
69+
70+
- name: Run Static Analysis on Message Transmitter V2
71+
run: make analyze-message-transmitter-v2
72+
73+
analyze-token-messenger-minter:
74+
runs-on: ubuntu-latest
75+
steps:
76+
- name: Check out repository code
77+
uses: actions/checkout@v4
78+
with:
79+
submodules: 'true'
80+
81+
- name: Set up Python
82+
uses: actions/setup-python@v5
83+
with:
84+
python-version: '3.10'
85+
86+
- name: Run Static Analysis on Token Messenger Minter
87+
run: make analyze-token-messenger-minter
3788

3889
scan:
3990
needs: lint-and-test

.vscode/settings.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2-
"editor.formatOnSave": true,
3-
"solidity.compilerOptimization": 200,
4-
"solidity.enabledAsYouTypeCompilationErrorCheck": true,
5-
"solidity.compileUsingRemoteVersion": "v0.7.6+commit.7338295f",
6-
"solidity.formatter": "prettier",
7-
"solidity.linter": "solhint",
8-
"solidity.validationDelay": 1500,
9-
"[solidity]": {
10-
"editor.tabSize": 4,
11-
}
2+
"editor.formatOnSave": true,
3+
"solidity.compilerOptimization": 200,
4+
"solidity.enabledAsYouTypeCompilationErrorCheck": true,
5+
"solidity.compileUsingRemoteVersion": "v0.7.6+commit.7338295f",
6+
"solidity.formatter": "prettier",
7+
"solidity.linter": "solhint",
8+
"solidity.validationDelay": 1500,
9+
"[solidity]": {
10+
"editor.tabSize": 4,
11+
},
12+
"security.olympix.project.includePath": "/src",
13+
"security.olympix.project.testsPath": "/test"
1214
}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
ARG FOUNDRY_VERSION=nightly-3fa02706ca732c994715ba42d923605692062375
12
# Use fixed foundry image
2-
3-
FROM ghcr.io/foundry-rs/foundry:nightly-4a8c7d0e26a1befa526222e22737740f80a7f1c5
3+
FROM ghcr.io/foundry-rs/foundry:${FOUNDRY_VERSION}
44

55
# Copy our source code into the container
66
WORKDIR /app

Makefile

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,59 @@ build:
99
test:
1010
@${FOUNDRY} "forge test -vv"
1111

12-
simulate:
13-
forge script scripts/deploy.s.sol:DeployScript --rpc-url ${RPC_URL} --sender ${SENDER}
12+
simulate-deploy:
13+
forge script scripts/v1/deploy.s.sol:DeployScript --rpc-url ${RPC_URL} --sender ${SENDER}
1414

1515
deploy:
16-
forge script scripts/deploy.s.sol:DeployScript --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
16+
forge script scripts/v1/deploy.s.sol:DeployScript --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
17+
18+
simulate-deploy-implementations-v2:
19+
forge script scripts/v2/DeployImplementationsV2.s.sol:DeployImplementationsV2Script --rpc-url ${RPC_URL} --sender ${SENDER}
20+
21+
deploy-implementations-v2:
22+
forge script scripts/v2/DeployImplementationsV2.s.sol:DeployImplementationsV2Script --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
23+
24+
simulate-deploy-create2-factory:
25+
forge script scripts/DeployCreate2Factory.s.sol:DeployCreate2FactoryScript --rpc-url ${RPC_URL} --sender ${SENDER}
26+
27+
deploy-create2-factory:
28+
forge script scripts/DeployCreate2Factory.s.sol:DeployCreate2FactoryScript --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
29+
30+
simulate-deploy-proxies-v2:
31+
forge script scripts/v2/DeployProxiesV2.s.sol:DeployProxiesV2Script --rpc-url ${RPC_URL} --sender ${SENDER}
32+
33+
deploy-proxies-v2:
34+
forge script scripts/v2/DeployProxiesV2.s.sol:DeployProxiesV2Script --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
35+
36+
simulate-setup-remote-resources-v2:
37+
forge script scripts/v2/SetupRemoteResourcesV2.s.sol:SetupRemoteResourcesV2Script --rpc-url ${RPC_URL} --sender ${SENDER}
38+
39+
setup-remote-resources-v2:
40+
forge script scripts/v2/SetupRemoteResourcesV2.s.sol:SetupRemoteResourcesV2Script --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
41+
42+
simulate-rotate-keys-v2:
43+
forge script scripts/v2/RotateKeysV2.s.sol:RotateKeysV2Script --rpc-url ${RPC_URL} --sender ${SENDER}
44+
45+
rotate-keys-v2:
46+
forge script scripts/v2/RotateKeysV2.s.sol:RotateKeysV2Script --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
47+
48+
simulate-deploy-address-utils-external:
49+
forge script scripts/v2/DeployAddressUtilsExternal.s.sol:DeployAddressUtilsExternalScript --rpc-url ${RPC_URL} --sender ${SENDER}
50+
51+
deploy-address-utils-external:
52+
forge script scripts/v2/DeployAddressUtilsExternal.s.sol:DeployAddressUtilsExternalScript --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
1753

1854
anvil:
1955
docker rm -f anvil || true
20-
@${ANVIL} "anvil --host 0.0.0.0 -a 13 --code-size-limit 250000"
56+
@${ANVIL} "anvil --host 0.0.0.0 -a 13 --code-size-limit 250000"
2157

2258
anvil-test: anvil
2359
pip3 install -r requirements.txt
24-
python3 anvil/crosschainTransferIT.py
60+
python anvil/crosschainTransferIT.py
61+
62+
anvil-test-v2: anvil
63+
pip3 install -r requirements.txt
64+
python anvil/crosschainTransferITV2.py
2565

2666
deploy-local:
2767
@docker exec anvil forge script anvil/scripts/${contract}.s.sol:${contract}Script --rpc-url http://localhost:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --broadcast
@@ -31,10 +71,21 @@ cast-call:
3171

3272
cast-send:
3373
@docker exec anvil cast send ${contract_address} "${function}" --rpc-url http://localhost:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
34-
74+
3575
clean:
3676
@${FOUNDRY} "forge clean"
3777

38-
analyze:
39-
pip3 install -r requirements.txt
40-
slither .
78+
analyze-message-transmitter:
79+
pip3 install mythril==0.24.8
80+
myth -v4 analyze src/MessageTransmitter.sol --solc-json mythril.config.json --solv 0.7.6
81+
82+
analyze-message-transmitter-v2:
83+
pip3 install mythril==0.24.8
84+
myth -v4 analyze src/v2/MessageTransmitterV2.sol --solc-json mythril.config.json --solv 0.7.6
85+
86+
analyze-token-messenger-minter:
87+
pip3 install mythril==0.24.8
88+
myth -v4 analyze src/TokenMessenger.sol --solc-json mythril.config.json --solv 0.7.6
89+
myth -v4 analyze src/TokenMinter.sol --solc-json mythril.config.json --solv 0.7.6
90+
myth -v4 analyze src/v2/TokenMessengerV2.sol --solc-json mythril.config.json --solv 0.7.6
91+
myth -v4 analyze src/v2/TokenMinterV2.sol --solc-json mythril.config.json --solv 0.7.6

0 commit comments

Comments
 (0)