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

Token bridge factory #36

Merged
merged 194 commits into from
Oct 9, 2023
Merged
Changes from 1 commit
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
32d00e7
Add foundry config
gvladika Apr 3, 2023
694f54a
forge install: forge-std
gvladika Apr 3, 2023
80b5713
Add 1st Foundry testcase
gvladika Apr 4, 2023
20d53a9
Add eth/erc20 inbox mock
gvladika Apr 5, 2023
265aa2e
Implement token deposit for ERC20-based rollup, include Foundry test …
gvladika Apr 5, 2023
98cbd9f
Add missing param
gvladika Apr 5, 2023
cccd156
Run tests as Github actions
gvladika Apr 5, 2023
33e395c
Remove circleci config
gvladika Apr 5, 2023
72e3626
Put workflow file in the right place
gvladika Apr 5, 2023
d5f916e
Reconfigure CI triggers
gvladika Apr 5, 2023
792483c
Check DepositInitiated is correctly emitted
gvladika Apr 6, 2023
92a6810
Add more event checks
gvladika Apr 6, 2023
8354537
Use IL1ArbitrumGateway interface where possible
gvladika Apr 6, 2023
bbdbda1
Test outboundTransferCustomRefund
gvladika Apr 6, 2023
2c1a092
Test finalizeInboundTransfer
gvladika Apr 6, 2023
26d4cc8
Make L1OrbitERC20GatewayTest inherit from L1ERC20GatewayTest to avoid…
gvladika Apr 11, 2023
9fb72cd
Test failure conditions of outboundTransferCustomRefund
gvladika Apr 11, 2023
b9a819c
Dummy commit to trigger CI
gvladika Apr 11, 2023
f94013b
Add tests for L1NotContract
gvladika Apr 11, 2023
82361a5
Another one
gvladika Apr 11, 2023
b928f79
Add missing steps
gvladika Apr 11, 2023
025ee91
Merge branch 'erc20-based-bridge' into erc20-based-bridge-2
gvladika Apr 11, 2023
5281ee4
Reuse buildRouterEncodedData function in test to avoid test duplication
gvladika Apr 12, 2023
54cb935
Test getOutboundCalldata
gvladika Apr 12, 2023
0f3f56e
Test supportsInterface
gvladika Apr 12, 2023
fb97ab5
test encodeWithdrawal
gvladika Apr 12, 2023
ef122bf
Test reverts in initializer
gvladika Apr 12, 2023
ae2517e
Encode native token fee to the end of the user encoded message
gvladika Apr 13, 2023
60f0340
Merge branch 'erc20-based-bridge' into erc20-based-bridge-2
gvladika Apr 13, 2023
8182569
Test calculateL2TokenAddress
gvladika Apr 13, 2023
e8df968
Test postUpgradeInit reverts
gvladika Apr 13, 2023
0c5b797
Test finalizeInboundTransfer revert if invalid sender
gvladika Apr 13, 2023
9e155f1
Add missing event checks
gvladika Apr 13, 2023
a337acf
Test functions in extended gateway
gvladika Apr 13, 2023
5b0d2d5
Add test cases for transferExitAndCall
gvladika Apr 14, 2023
3a8482f
Add more transferExitAndCall tests
gvladika Apr 14, 2023
552cbf1
Cover more branches
gvladika Apr 14, 2023
fab2260
Add test cases for router init
gvladika Apr 17, 2023
20db956
Test setting the default gateway
gvladika Apr 21, 2023
cf6151b
Merge branch 'move-to-solidity-0.8' into erc20-based-bridge
gvladika Apr 24, 2023
423684a
Switch to SOlidity 0.8
gvladika Apr 24, 2023
1d5a15f
Merge branch 'erc20-based-bridge' into erc20-based-bridge-2
gvladika Apr 24, 2023
a86a493
Adjust expected revert msg
gvladika Apr 24, 2023
5474126
Merge branch 'erc20-based-bridge-2' into orbit-extended-gw-test
gvladika Apr 24, 2023
02f5485
Update to 0.8
gvladika Apr 24, 2023
a907de0
Merge branch 'orbit-extended-gw-test' into orbit-router-test
gvladika Apr 24, 2023
f3d259d
Switch to solidity 0.8
gvladika Apr 24, 2023
e2e5ddb
Test setOwner
gvladika Apr 24, 2023
1e6542d
Add test for setGateway
gvladika Apr 26, 2023
c24e7f7
Add revert test cases for setGateway
gvladika Apr 26, 2023
82acd24
More test for setGateway
gvladika Apr 26, 2023
a8e2f1f
Test supportsInterface
gvladika Apr 27, 2023
fc11760
Test router's outboundTransfer
gvladika Apr 28, 2023
6598054
Add more coverage
gvladika Apr 28, 2023
8e75c92
Test getGateway
gvladika May 2, 2023
be2975e
Implement L1OrbitGatewayRouter and its test cases
gvladika May 2, 2023
d78c56a
Add L1OrbitCustomGateway implementation
gvladika May 3, 2023
982518a
Implement test cases for L1CustomGateway
gvladika May 4, 2023
25ce3ab
Implement test cases for L1OrbitCustomGatewayTest
gvladika May 4, 2023
d109210
Implement missing TCs
gvladika May 5, 2023
8b8645f
Check functions without nativeTokenFee are reverting
gvladika May 5, 2023
5a4a199
Add natspec
gvladika May 5, 2023
96fa019
Add comments for missing params
gvladika May 5, 2023
0638a23
Add L1ReverseCustomGateway test cases
gvladika May 8, 2023
bd9250d
Implement and test L1OrbitReverseCustomGateway
gvladika May 8, 2023
64cfba6
Revert if token being deposited is native fee token
gvladika May 10, 2023
571eead
Add script for connecting to local network
gvladika May 11, 2023
03fecc0
Add native token transfers from user to the inbox
gvladika May 18, 2023
40c2d7a
Refactor native token flow
gvladika May 19, 2023
bdb6d59
Use isRouter()
gvladika May 19, 2023
981bd97
Fuzz constraints
gvladika May 19, 2023
1264253
Add setup for integration tests
gvladika May 16, 2023
ba6306d
Merge branch 'orbit-token-flow' into orbit-deployer
gvladika May 22, 2023
decaefa
Add integration tests for L1 Orbit
gvladika May 23, 2023
9b1371c
Finish orbit token bridge deployer scripts
gvladika May 24, 2023
03424af
Add end2end test for token deposit
gvladika May 25, 2023
16f6575
Add withdrawal e2e test
gvladika May 25, 2023
44ec120
Decrease retry period
gvladika May 25, 2023
fe612be
Merge pull request #9 from OffchainLabs/orbit-token-flow
gvladika May 29, 2023
16b4af5
Merge pull request #8 from OffchainLabs/orbit-reverse-gateways
gvladika May 29, 2023
7c05a54
Merge pull request #7 from OffchainLabs/orbit-router-test
gvladika May 29, 2023
71ebece
Merge pull request #5 from OffchainLabs/orbit-extended-gw-test
gvladika May 29, 2023
432957d
Merge pull request #4 from OffchainLabs/erc20-based-bridge-2
gvladika May 29, 2023
b661def
Merge branch 'orbit' into erc20-based-bridge
gvladika May 29, 2023
feda0f7
Use library, formatting
gvladika May 29, 2023
f0f78ff
Use feature-orbit-bridge branch of nitro-contracts
gvladika Jun 1, 2023
77dfa6f
Update path
gvladika Jun 1, 2023
a071786
Update submodule commits
gvladika Jun 1, 2023
63f3bb1
Add yarn action for running e2e Orbit test in local test env
gvladika Jun 4, 2023
1fd99ff
Merge branch 'erc20-based-bridge' into orbit-deployer
gvladika Jun 4, 2023
5e98fa6
Add TypeScript deployer for token bridge
gvladika Jun 26, 2023
51f1995
In test token implementation, re-set native token allowance to 0
gvladika Jun 27, 2023
63270b0
Merge pull request #35 from OffchainLabs/orbit-deployer
gvladika Jun 27, 2023
4c42008
Add Hardhat test which checks token bridge is properly deployed
gvladika Jun 27, 2023
eb3cfb3
Add 1st implementation of token bridge L1&L2 factories
gvladika Jun 29, 2023
34e6fe2
Deploy and init L2 token bridge contracts in the same TX
gvladika Jun 29, 2023
033c233
Add plugin for checking contract sizes
gvladika Jul 3, 2023
26d02bb
Add 1st phase of atomic token bridge cross-chain deployer
gvladika Jul 3, 2023
80075af
Deploy L2 router using retryable
gvladika Jul 3, 2023
95c1431
Deploy L2 standard gateway using retryable
gvladika Jul 3, 2023
5e2954f
Deploy L2 custom gateway via retryable
gvladika Jul 3, 2023
82fa746
Use create2 instead of create3
gvladika Jul 3, 2023
fb444a6
Compute expected L2 addresses from L1 creator
gvladika Jul 4, 2023
94da561
Use computed L2 addresses to init everything properly
gvladika Jul 4, 2023
a9e9d56
Use library for L2 salts
gvladika Jul 4, 2023
093b26b
Use 2 retryables instead of 4
gvladika Jul 4, 2023
097c526
Estimate gas for retryables instead of hard-coding it
gvladika Jul 5, 2023
2ddc38a
deployL2Contracts can only be executed once
gvladika Jul 5, 2023
2e51766
Use L1Factory's address as part of salt calculation
gvladika Jul 5, 2023
bd7c8c9
Formatting, add some docs
gvladika Jul 5, 2023
5535694
Remove comment
gvladika Jul 5, 2023
30c233e
Deploy L2 Weth and WethGateway
gvladika Jul 5, 2023
ccf17c9
Update tests and fix weth bugs
gvladika Jul 5, 2023
f935423
Use CREATE2 on L1 as well, using inbox address in the salt
gvladika Jul 6, 2023
eca0062
Set rollup owner to own token bridge
gvladika Jul 6, 2023
d9bc08d
Add registry for non-canonical routers
gvladika Jul 6, 2023
9bacef0
Rename computeExpected -> getCanonical
gvladika Jul 6, 2023
5b50028
Use encodeCall, update event
gvladika Jul 6, 2023
b68888a
Use struct for L2 bytecode
gvladika Jul 6, 2023
b5275ba
Calculate maxSubmissionCost dynamically and refund the excess
gvladika Jul 6, 2023
a922cae
Make L1 creator upgradeable
gvladika Jul 7, 2023
29f119d
Use dummy logic as create2 address seed
gvladika Jul 8, 2023
267e19f
Add token bridge deployment test to CI
gvladika Jul 10, 2023
5d451b2
Match sequencer container using regex
gvladika Jul 10, 2023
522223a
Fix CI
gvladika Jul 10, 2023
a00f269
Remove factories that use 3-TX deployment of token bridge
gvladika Jul 10, 2023
1dac98a
Use pre-set gas limit for deploying L2 factory
gvladika Jul 11, 2023
22545ce
Separate L2 deployment to different contract
gvladika Jul 11, 2023
dc4ca51
Do runtime to creation code conversion on L2
gvladika Jul 11, 2023
5e130e5
Add more code comments
gvladika Jul 12, 2023
66292b2
Add comment that only 1 token bridge can be deployed per inbox
gvladika Jul 12, 2023
96fe4ca
Move logic for creating L2 side of token bridge to retryable sender c…
gvladika Jul 12, 2023
25ee719
Merge branch 'token-bridge-factory' into erc20-based-bridge
gvladika Jul 13, 2023
060c7d3
Remove unused non-atomic deployers
gvladika Jul 14, 2023
c99d9bb
Separate deployment of token bridge creator from chain specific setup
gvladika Jul 14, 2023
2f21679
Add script that deploys token bridge creator to ArbGoerli
gvladika Jul 14, 2023
33fb2c1
Add script for creating token bridge for Orbit rollup
gvladika Jul 14, 2023
8bb7316
Polish up script for creating new token bridge on Goerli
gvladika Jul 17, 2023
c00bdbd
Only L1 creator can call sendRetryable of L1TokenBridgeRetryableSender
gvladika Jul 17, 2023
33cc402
Update L1Creator Goerli address
gvladika Jul 17, 2023
d0dba75
Support testing both local and goerli deployment
gvladika Jul 18, 2023
f371c57
Merge branch 'token-bridge-factory' into erc20-based-bridge
gvladika Jul 25, 2023
902206e
Set correct templates if fee token is used
gvladika Jul 27, 2023
adf7f4b
Add support for fee token based retryables
gvladika Jul 27, 2023
db4a222
Move fee tokens to inbox to pay for retryables
gvladika Jul 27, 2023
a0029a8
Move getter for canonical L1 router address to L1 creator
gvladika Jul 27, 2023
f399dfa
Init retryable sender from init of L1 creator
gvladika Jul 27, 2023
c6ba878
Adjust script for deploying creator
gvladika Jul 27, 2023
9f0ca76
Fix L1 router address calculation
gvladika Jul 28, 2023
43542bb
Send correct bytecode to L2
gvladika Jul 28, 2023
0e9cc76
Update test script
gvladika Jul 28, 2023
46647a9
Remove unnecessary scripts
gvladika Jul 28, 2023
79bf267
Use existing proxy admin
gvladika Aug 4, 2023
b0edcfd
Do not use IEthInbox interface
gvladika Aug 4, 2023
f52ae5b
Merge branch 'erc20-based-bridge' into fee-token-deployer
gvladika Aug 4, 2023
cd35fef
Deploy UpgradeExecutor to L2
gvladika Aug 6, 2023
ab468c1
Refactor upgrade executor flow
gvladika Aug 6, 2023
18ec4b6
Rename env vars
gvladika Aug 6, 2023
6f7ad28
Make verifivier script more complete
gvladika Aug 6, 2023
c4c517d
Fix deployment test
gvladika Aug 7, 2023
38083c7
Use lower case in tests
gvladika Aug 7, 2023
3ca96b2
Don't check weth stuff in case of fee token
gvladika Aug 7, 2023
d5998c2
Use upgrade executor from npm package
gvladika Aug 18, 2023
d6b7ff6
Deploy Multicall on L3
gvladika Aug 19, 2023
30cdd75
Decrease contract size by not hashing the salt prefix
gvladika Aug 19, 2023
eeac040
Prepare crosschain hardhat tests for CI
gvladika Aug 25, 2023
d803053
Add comments
gvladika Aug 25, 2023
db20781
Merge branch 'erc20-based-bridge' into fee-token-deployer
gvladika Aug 25, 2023
14a2311
Merge branch 'fee-token-deployer' into use-executor
gvladika Aug 25, 2023
864fa61
Update address
gvladika Aug 25, 2023
9d8cc95
Revert with custom error if deployment already exists
gvladika Aug 31, 2023
e773cc2
Extract proxy deployments to _deploySeedProxy
gvladika Aug 31, 2023
b157eb9
Add function descriptions
gvladika Aug 31, 2023
a93fef9
Extract L2 proxy address calculation
gvladika Aug 31, 2023
2ebf605
Merge branch 'token-bridge-factory' into erc20-based-bridge
gvladika Aug 31, 2023
2d77950
Merge branch 'erc20-based-bridge' into fee-token-deployer
gvladika Aug 31, 2023
1525d26
Merge branch 'fee-token-deployer' into use-executor
gvladika Aug 31, 2023
2ecec9a
Update smart contracts and script to reflect latest rollup ownership …
gvladika Sep 1, 2023
8aca119
Add docs for computeAddress function
gvladika Sep 7, 2023
07234a0
Merge branch 'token-bridge-factory' into erc20-based-bridge
gvladika Sep 7, 2023
09c9715
Merge pull request #38 from OffchainLabs/use-executor
gvladika Sep 7, 2023
1f2121f
Add docs for computeAddress function
gvladika Sep 7, 2023
6cb2060
Verify retyrable sender was not frontrun
gvladika Sep 7, 2023
7606ab6
Use chainId in salt for L2 contracts.
gvladika Sep 8, 2023
ee8c5aa
Merge pull request #41 from OffchainLabs/use-chain-id
gvladika Sep 11, 2023
b408bcf
Merge branch 'erc20-based-bridge' into fee-token-deployer
gvladika Sep 11, 2023
ce11f80
Merge pull request #37 from OffchainLabs/fee-token-deployer
gvladika Sep 11, 2023
9503d3c
Verify all contracts after deployment
gvladika Sep 12, 2023
e580b98
setGateways() in OrbitGatewayRouter should not be payable
tsite Oct 3, 2023
82c5375
Require there is ether sent in erc20 token bridge
gvladika Oct 5, 2023
044d8d2
Make forceRegisterTokenToL2 in L1OrbitCustomGateway non payable
gvladika Oct 5, 2023
04aa5e6
Merge pull request #44 from OffchainLabs/audit-updates
gvladika Oct 9, 2023
95b2c40
Merge pull request #43 from tsite/erc20-based-bridge
gvladika Oct 9, 2023
c68b22b
Merge pull request #34 from OffchainLabs/erc20-based-bridge
gvladika Oct 9, 2023
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
Prev Previous commit
Next Next commit
Decrease retry period
gvladika committed May 25, 2023
commit 44ec12017445187d8c3611bc9dd9bf05a659aea0
2 changes: 1 addition & 1 deletion test-e2e/orbitTokenBridge.ts
Original file line number Diff line number Diff line change
@@ -263,7 +263,7 @@ describe('orbitTokenBridge', () => {

const messages = await l2Receipt.getL2ToL1Messages(userL1Wallet)
const l2ToL1Msg = messages[0]
const timeToWaitMs = 60 * 1000
const timeToWaitMs = 1000
await l2ToL1Msg.waitUntilReadyToExecute(l2Provider, timeToWaitMs)

// execute on L1