Skip to content

Commit 3b35ea7

Browse files
committed
Merge branch 'dcmt/multicall-2771'
2 parents 1d0b590 + 38bc40d commit 3b35ea7

11 files changed

+989
-200
lines changed

.github/workflows/integration.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
run: git submodule update --recursive --init
2424

2525
- name: Check contract sizes
26-
run: forge build --sizes --skip UniswapV4UnitTest.t.sol
26+
run: forge build --sizes --skip UniswapV4UnitTest.t.sol --skip MultiCall.sol
2727

2828
- name: Run tests
29-
run: forge test
29+
run: forge test --skip UniswapV4UnitTest.t.sol --skip MultiCall.sol --skip 'src/*'
3030
env:
3131
FOUNDRY_PROFILE: integration
3232
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}

.github/workflows/test.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,27 @@ jobs:
2222
- name: Install dependencies
2323
run: git submodule update --recursive --init
2424

25+
- name: Build MultiCall
26+
run: forge build -- src/multicall/MultiCall.sol
27+
env:
28+
FOUNDRY_EVM_VERSION: london
29+
FOUNDRY_OPTIMIZER_RUNS: 1000000
30+
31+
- name: Run the MultiCall tests
32+
run: forge test --skip 'src/*' --mc MultiCall
33+
env:
34+
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
35+
2536
- name: Build UniswapV4
26-
run: forge build lib/v4-core/src/PoolManager.sol
37+
run: forge build -- lib/v4-core/src/PoolManager.sol
2738

2839
- name: Build contracts
29-
run: forge build --skip UniswapV4UnitTest.t.sol
40+
run: forge build --skip UniswapV4UnitTest.t.sol --skip MultiCall.sol --skip 'test/*'
3041

3142
- name: Build UniswapV4 tests
32-
run: forge build
43+
run: forge build --skip MultiCall.sol --skip 'test/*'
3344

34-
- name: Run tests
35-
run: forge test
45+
- name: Run all the other tests
46+
run: forge test --skip 'src/*' --nmc MultiCall
3647
env:
3748
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}

README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -1394,20 +1394,29 @@ asset than the `"deployer"` address because the final transaction of the
13941394
deployment is extremely gas-intensive. The amount of eth you need can be a
13951395
little wonky on L2s, so beware and overprovision the amount of native asset.
13961396

1397-
Fifth, deploy `AllowanceHolder`. Obviously, if you're deploying to a
1397+
Fifth, deploy `MultiCall`. Run [`BROADCAST=no ./sh/deploy_multicall.sh
1398+
<CHAIN_NAME>`](sh/deploy_multicall.sh). Then switch to `BROADCAST=yes` to
1399+
actually do the deployment. This one is low-stakes because if you mess it up and
1400+
it reverts, you can just try again. This deploys using the [Arachnid
1401+
deterministic deployment
1402+
proxy](https://github.com/Arachnid/deterministic-deployment-proxy). If you mess
1403+
it up, make sure you learn from your mistakes for the next step.
1404+
1405+
Sixth, deploy `AllowanceHolder`. Obviously, if you're deploying to a
13981406
Cancun-supporting chain, you don't need to fund the deployer for the old
13991407
`AllowanceHolder` (and vice versa). Run [`BROADCAST=no
14001408
./sh/deploy_allowanceholder.sh
14011409
<CHAIN_NAME>`](sh/deploy_allowanceholder.sh). Then switch to `BROADCAST=yes` to
1402-
actually do the deployment.
1410+
actually do the deployment. Don't mess this one up. You will burn the vanity
1411+
address.
14031412

1404-
Sixth, check that the Safe deployment on the new chain is complete. You can
1413+
Seventh, check that the Safe deployment on the new chain is complete. You can
14051414
check this by running the main deployment script with `BROADCAST=no`. If it
14061415
completes without reverting, you don't need to do anything. If the Safe
14071416
deployment on the new chain is incomplete, run [`./sh/deploy_safe_infra.sh
14081417
<CHAIN_NAME>`](sh/deploy_safe_infra.sh). You will have to modify this script.
14091418

1410-
Seventh, make _damn_ sure that you've got the correct configuration in
1419+
Eighth, make _damn_ sure that you've got the correct configuration in
14111420
[`chain_config.json`](chain_config.json). If you screw this up, you'll burn the
14121421
vanity address. Run [`BROADCAST=no ./sh/deploy_new_chain.sh
14131422
<CHAIN_NAME>`](sh/deploy_new_chain.sh) a bunch of times. Deploy to a

chain_config.json

+42-21
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
},
2222
"deployment": {
2323
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
24-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
24+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
25+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
2526
},
2627
"etherscanApi": "https://api-sepolia.etherscan.io/api"
2728
},
@@ -47,7 +48,8 @@
4748
},
4849
"deployment": {
4950
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
50-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
51+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
52+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
5153
},
5254
"etherscanApi": "https://api.etherscan.io/api"
5355
},
@@ -73,7 +75,8 @@
7375
},
7476
"deployment": {
7577
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
76-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
78+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
79+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
7780
},
7881
"etherscanApi": "https://api.polygonscan.com/api"
7982
},
@@ -99,7 +102,8 @@
99102
},
100103
"deployment": {
101104
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
102-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
105+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
106+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
103107
},
104108
"etherscanApi": "https://api.basescan.org/api"
105109
},
@@ -125,7 +129,8 @@
125129
},
126130
"deployment": {
127131
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
128-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
132+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
133+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
129134
},
130135
"etherscanApi": "https://api-optimistic.etherscan.io/api"
131136
},
@@ -151,7 +156,8 @@
151156
},
152157
"deployment": {
153158
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
154-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
159+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
160+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
155161
},
156162
"etherscanApi": "https://api.arbiscan.io/api"
157163
},
@@ -177,7 +183,8 @@
177183
},
178184
"deployment": {
179185
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
180-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
186+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
187+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
181188
},
182189
"etherscanApi": "https://api.bscscan.com/api"
183190
},
@@ -203,7 +210,8 @@
203210
},
204211
"deployment": {
205212
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
206-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
213+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
214+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
207215
},
208216
"etherscanApi": "https://api.snowtrace.io/api"
209217
},
@@ -229,7 +237,8 @@
229237
},
230238
"deployment": {
231239
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
232-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
240+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
241+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
233242
},
234243
"etherscanApi": "https://api.blastscan.io/api"
235244
},
@@ -255,7 +264,8 @@
255264
},
256265
"deployment": {
257266
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
258-
"allowanceHolder": "0x000000000000175a8b9bC6d539B3708EEd92EA6c"
267+
"allowanceHolder": "0x000000000000175a8b9bC6d539B3708EEd92EA6c",
268+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
259269
},
260270
"etherscanApi": "https://api.lineascan.build/api"
261271
},
@@ -281,7 +291,8 @@
281291
},
282292
"deployment": {
283293
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
284-
"allowanceHolder": "0x0000000000005E88410CcDFaDe4a5EfaE4b49562"
294+
"allowanceHolder": "0x0000000000005E88410CcDFaDe4a5EfaE4b49562",
295+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
285296
},
286297
"etherscanApi": "https://api.scrollscan.com/api"
287298
},
@@ -307,7 +318,8 @@
307318
},
308319
"deployment": {
309320
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
310-
"allowanceHolder": "0x0000000000005E88410CcDFaDe4a5EfaE4b49562"
321+
"allowanceHolder": "0x0000000000005E88410CcDFaDe4a5EfaE4b49562",
322+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
311323
},
312324
"etherscanApi": "https://api.mantlescan.xyz/api"
313325
},
@@ -333,7 +345,8 @@
333345
},
334346
"deployment": {
335347
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
336-
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae"
348+
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
349+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
337350
},
338351
"blockscoutApi": "https://explorer.mode.network/api"
339352
},
@@ -359,7 +372,8 @@
359372
},
360373
"deployment": {
361374
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
362-
"allowanceHolder": "0x0000000000005E88410CcDFaDe4a5EfaE4b49562"
375+
"allowanceHolder": "0x0000000000005E88410CcDFaDe4a5EfaE4b49562",
376+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
363377
},
364378
"etherscanApi": "https://api.taikoscan.io/api"
365379
},
@@ -385,7 +399,8 @@
385399
},
386400
"deployment": {
387401
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
388-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
402+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
403+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
389404
},
390405
"etherscanApi": "https://api.worldscan.org/api",
391406
"blockscoutApi": "https://worldchain-mainnet.explorer.alchemy.com/api"
@@ -412,7 +427,8 @@
412427
},
413428
"deployment": {
414429
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
415-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
430+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
431+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
416432
},
417433
"etherscanApi": "https://api.gnosisscan.io/api"
418434
},
@@ -438,7 +454,8 @@
438454
},
439455
"deployment": {
440456
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
441-
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae"
457+
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
458+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
442459
},
443460
"etherscanApi": "https://api.sonicscan.org/api"
444461
},
@@ -464,7 +481,8 @@
464481
},
465482
"deployment": {
466483
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
467-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
484+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
485+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
468486
},
469487
"blockscoutApi": "https://explorer.inkonchain.com/api"
470488
},
@@ -490,7 +508,8 @@
490508
},
491509
"deployment": {
492510
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
493-
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734"
511+
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
512+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
494513
}
495514
},
496515
"unichain": {
@@ -515,7 +534,8 @@
515534
},
516535
"deployment": {
517536
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
518-
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae"
537+
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
538+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
519539
},
520540
"etherscanApi": "https://api.uniscan.xyz/api",
521541
"blockscoutApi": "https://unichain.blockscout.com/api"
@@ -542,7 +562,8 @@
542562
},
543563
"deployment": {
544564
"allowanceHolder": "0x0000000000001fF3684f28c67538d4D072C22734",
545-
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae"
565+
"deployer": "0x00000000000004533Fe15556B1E086BB1A72cEae",
566+
"forwardingMultiCall": "0x00000000000000CF9E3c5A26621af382fA17f24f"
546567
},
547568
"etherscanApi": "https://api.berascan.com/api"
548569
}

secrets.json.template

+10
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,15 @@
2323
"address": "0x000000000000175a8b9bC6d539B3708EEd92EA6c",
2424
"deployer": "0x5c50b56D83Db01245d4B7db9eAc9199c9CdbAEE1",
2525
"key": ""
26+
},
27+
"intentWorkers": {
28+
"mnemonic": {
29+
"production": "",
30+
"staging": ""
31+
},
32+
"limit": {
33+
"production": 50,
34+
"staging": 10
35+
}
2636
}
2737
}

sh/common_secrets.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [[ $secrets_permissions != '-rw-------' ]] ; then
1818
exit 1
1919
fi
2020

21-
if ! sha256sum -c <<<'bb82de121880f1182dbae410b341749e5ac1355954ae6c03151a1826e7bba745 secrets.json' >/dev/null ; then
21+
if ! sha256sum -c <<<'aecc29dbca963a4397effa7e019a754aa2108c0b80f8cd67db7ee8e2b3c76c2b secrets.json' >/dev/null ; then
2222
echo 'Secrets are wrong' >&2
2323
exit 1
2424
fi

0 commit comments

Comments
 (0)