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

feat: add support for L1 to L3 bridging #409

Merged
merged 282 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
282 commits
Select commit Hold shift + click to select a range
3033b90
reverse cases
spsjvc Jul 19, 2023
0dbdcaa
support erc-20 deposits paid by custom fee token
spsjvc Jul 19, 2023
4c67e85
rename stuff
spsjvc Jul 19, 2023
d75bddf
just commit
spsjvc Aug 2, 2023
11c1f8a
support L2 parent chains
brtkx Aug 2, 2023
7f758a5
add partnerChainIDs
brtkx Aug 2, 2023
b477a8a
extra error message
brtkx Aug 4, 2023
e14337b
update
brtkx Aug 9, 2023
8936273
add jsdoc
brtkx Aug 9, 2023
9ba357c
fix issues
brtkx Aug 9, 2023
50820b0
try thing
spsjvc Aug 10, 2023
f408fad
add parentChains, chains
brtkx Aug 11, 2023
0b030c2
reduce diff
brtkx Aug 11, 2023
2fd86ec
reduce diff
brtkx Aug 11, 2023
8205daa
clean up
brtkx Aug 11, 2023
2954097
clean up
brtkx Aug 11, 2023
96b7c23
fix addCustomNetwork
brtkx Aug 11, 2023
6365728
comment
brtkx Aug 11, 2023
2100d07
fix comments and addCustomNetwork
brtkx Aug 11, 2023
413f9e5
clean up
brtkx Aug 11, 2023
67e49c5
var name
brtkx Aug 11, 2023
7571156
fix
brtkx Aug 11, 2023
c086850
export types and methods
brtkx Aug 11, 2023
6f78538
fixes
brtkx Aug 11, 2023
796c64b
change bridger type for l1network
brtkx Aug 11, 2023
fbc4df7
chore: bump contracts to 1.1.0-alpha.4
gzeoneth Aug 14, 2023
eb15634
remove thing
spsjvc Aug 14, 2023
b850c2e
remove unused imporT
spsjvc Aug 14, 2023
3b4364d
v3.1.6-orbit-custom-fee-token.0
spsjvc Aug 14, 2023
100c3a8
chore: bump contracts to 1.1.0-alpha.5
gzeoneth Aug 14, 2023
2e76d7e
chore: bump contracts to 1.1.0-alpha.7
gzeoneth Aug 14, 2023
f07aab0
Merge branch 'feat-custom-fee-token' of github.com:OffchainLabs/arbit…
spsjvc Aug 15, 2023
1bf66bb
Merge branch 'main' of ssh://github.com/OffchainLabs/arbitrum-sdk int…
brtkx Aug 21, 2023
5a864e1
separate method for adding custom chains
brtkx Aug 21, 2023
7de3b79
spread l2networks
brtkx Aug 21, 2023
af42cc1
clean up
brtkx Aug 21, 2023
0f67d96
default blocktime to 12sec
brtkx Aug 21, 2023
d716532
clean up
brtkx Aug 21, 2023
b2f0c8b
clean up
brtkx Aug 21, 2023
d2e3502
fix assetBridger
brtkx Aug 21, 2023
649dca4
read l2network from l2Networks or chains
brtkx Aug 22, 2023
0119fd9
clean up
brtkx Aug 23, 2023
31ab5d3
unused import
brtkx Aug 23, 2023
4582b54
unused import
brtkx Aug 23, 2023
d3597cb
clean up, unit tests
brtkx Aug 24, 2023
ade62ad
Merge branch 'main' of ssh://github.com/OffchainLabs/arbitrum-sdk int…
brtkx Aug 24, 2023
3d22c14
v3.1.10-beta.0
gzeoneth Aug 28, 2023
cf3cfac
fix multicall
brtkx Aug 28, 2023
76eb545
Merge branch 'support-l2-parent-chains' of ssh://github.com/OffchainL…
brtkx Aug 28, 2023
41ffe31
Merge branch 'support-l2-parent-chains' into feat-custom-fee-token
spsjvc Sep 28, 2023
a589888
v
spsjvc Oct 2, 2023
ebc7870
Merge branch 'main' of ssh://github.com/OffchainLabs/arbitrum-sdk int…
brtkx Oct 5, 2023
c4934d8
merge main
brtkx Oct 5, 2023
158b8d4
bump version
spsjvc Oct 5, 2023
cc48da2
add stylus to partner chains for arb sepolia
brtkx Oct 5, 2023
980ca7a
bump version
spsjvc Oct 5, 2023
38cecca
Merge branch 'support-l2-parent-chains' into feat-custom-fee-token
spsjvc Nov 1, 2023
9615ca8
make consistent
spsjvc Nov 1, 2023
b150be0
bump version
spsjvc Nov 1, 2023
d35e6d6
handle zero address native token as eth
spsjvc Nov 3, 2023
d31e2ef
bump version
spsjvc Nov 3, 2023
388322a
Merge branch 'main' into support-l2-parent-chains
spsjvc Nov 3, 2023
8551202
bump version
spsjvc Nov 3, 2023
c84e20c
Merge branch 'support-l2-parent-chains' into feat-custom-fee-token
spsjvc Nov 3, 2023
611c48a
bump version
spsjvc Nov 3, 2023
cf61bb8
Testing the flat chains option
douglance Nov 18, 2023
814acf9
cleans up flat chains implementation
douglance Nov 20, 2023
500ced0
exports getters to fix unused function error
douglance Nov 20, 2023
a4999a6
sets type isOrbit to true rather than boolean
douglance Nov 21, 2023
c72eaac
swap getParentOf Network to getParentForNetwork
douglance Nov 21, 2023
08c27b3
swap getChildrenOf Network to getChildrenForNetwork
douglance Nov 21, 2023
ca6f1dc
responds to PR feedback
douglance Nov 21, 2023
21cbc1d
abstracts out getting chains by type
douglance Nov 28, 2023
0b194c2
Merge branch 'main' into dl/query
fionnachan Nov 30, 2023
49e7aea
responds to pr feedback
douglance Nov 30, 2023
769bb6c
Adds jsdocs for parent/child predicates
douglance Nov 30, 2023
b3737b6
fix lint issue
douglance Nov 30, 2023
6645ce8
actually fix lint issue
douglance Nov 30, 2023
5f3737a
updates `getNetwork` to return all parent chains for layer 1
douglance Nov 30, 2023
26538b4
removes exports from networks.ts
douglance Nov 30, 2023
290cf61
renames network object
douglance Nov 30, 2023
74a9f53
removes parentChain and l1NetworkOrParentChain from asset bridger
douglance Nov 30, 2023
34b7e28
adds generic customNetwork param to `addCustomNetwork`
douglance Dec 1, 2023
5b4b50b
fix add custom network param type
douglance Dec 1, 2023
f72e011
reverts change to addCustomNetwork
douglance Dec 4, 2023
e2a2dc9
implement pr changes
douglance Dec 12, 2023
a67a678
improves tests by resetting network state between tests
douglance Dec 15, 2023
842edcc
get rid of extra type
spsjvc Dec 18, 2023
bffe1f4
improves tests and simplifies AssetBridger constructor
douglance Dec 18, 2023
d63c7b6
Adds L1/L2Network types to asset bridger
douglance Dec 18, 2023
ee9f9d8
Merge branch 'main' into dl/query
douglance Jan 4, 2024
c6a0efa
update build script for l3 testing
douglance Jan 9, 2024
626ce8f
sets up tests to be orbit compatible
douglance Jan 9, 2024
058337a
reverts getL1Network type change
douglance Jan 9, 2024
5f50b5f
fix blocktime
douglance Jan 9, 2024
d259c2c
testing with restored build file
douglance Jan 9, 2024
c32084e
test with just l3-node
douglance Jan 9, 2024
e26e0f0
run only orbit tests
douglance Jan 9, 2024
c60f510
fix testnode ref
douglance Jan 9, 2024
584bb42
test without local network
douglance Jan 9, 2024
2cd6add
sets up l1 before localnetwork.json for orbit
douglance Jan 9, 2024
e0bdd34
improve ci labels
douglance Jan 9, 2024
743d168
Update name to use matrix label
douglance Jan 9, 2024
e2d9ba4
simplify name gen
douglance Jan 9, 2024
8d11b9c
clean up types (#389)
spsjvc Jan 10, 2024
0b5d100
clean up plus docs
spsjvc Jan 10, 2024
8379045
add test for l1Networks and l2Networks
spsjvc Jan 11, 2024
0c97ade
wrap in describe
spsjvc Jan 11, 2024
18f6d85
docs
spsjvc Jan 11, 2024
4c2ee0b
Merge branch 'main' into dl/query
spsjvc Jan 11, 2024
b775779
refactor: clean up networks (#390)
spsjvc Jan 11, 2024
2b7c643
bump version
spsjvc Jan 11, 2024
b14d4fb
Merge branch 'dl/query' into feat-custom-fee-token
spsjvc Jan 11, 2024
024ff03
bump packages
spsjvc Jan 11, 2024
aaa5997
bump version
spsjvc Jan 11, 2024
b68b6ca
chore: updates jsdoc comments on new functions/values
douglance Jan 12, 2024
edc038c
Merge branch 'main' into dl/query
douglance Jan 12, 2024
e8b29f7
swaps test setup to use arb_min_block_time
douglance Jan 16, 2024
da32655
adds more jsdoc comments to testsetup
douglance Jan 16, 2024
a1c70aa
adds another comment
douglance Jan 16, 2024
203d665
Merge branch 'dl/query' into feat-custom-fee-token
douglance Jan 18, 2024
c987678
clean up
spsjvc Jan 24, 2024
a118de2
clean up
spsjvc Jan 24, 2024
44d0036
update custom fee token support to prepare for merge to main (#398)
douglance Jan 26, 2024
400c457
Merge branch 'dl/query' into feat-custom-fee-token
douglance Jan 26, 2024
5200584
restores getParentChains to fix tests
douglance Jan 26, 2024
88f8fa5
Merge branch 'main' into dl/query
douglance Jan 26, 2024
b9e4e16
Merge branch 'dl/query' into feat-custom-fee-token
douglance Jan 26, 2024
6395ee2
linting
douglance Jan 26, 2024
eda81be
update lockfile
douglance Jan 29, 2024
be3708f
remove obsolete tests
spsjvc Jan 30, 2024
5824ef4
update ref
spsjvc Jan 30, 2024
191026b
use testnode bridge
godzillaba Jan 30, 2024
609642b
fmt
godzillaba Jan 30, 2024
9db9b6b
chore: new path
gzeoneth Jan 31, 2024
12ae9a9
chore: remove unused
gzeoneth Jan 31, 2024
e1c7b10
new teleporter pr
godzillaba Jan 31, 2024
cad6392
gas estimate updates
godzillaba Jan 31, 2024
87550ef
starting fee token tests
godzillaba Jan 31, 2024
d63b395
deposit timing out for custom fee
godzillaba Jan 31, 2024
93a66ad
checkSupport and return fee token amount in deposit request
godzillaba Jan 31, 2024
c008d82
fmt
godzillaba Jan 31, 2024
c7f60f1
major gas estimation refactor
godzillaba Jan 31, 2024
c18410e
minor refactor
godzillaba Jan 31, 2024
967b8c8
getAddress and teleportation type
godzillaba Jan 31, 2024
72fa8dd
fmt
godzillaba Jan 31, 2024
67e4161
all three happy path tests passing
godzillaba Jan 31, 2024
660ce0f
use interfaces
godzillaba Feb 1, 2024
16cd57d
some renaming
godzillaba Feb 1, 2024
b0f4877
factory submission cost param
godzillaba Feb 1, 2024
48056bc
fix
spsjvc Feb 2, 2024
05b8540
revert comments
spsjvc Feb 2, 2024
555de69
remove obsolete test
spsjvc Feb 2, 2024
7fd3af8
start cleaning up tests
spsjvc Feb 2, 2024
5d95a0d
more
spsjvc Feb 2, 2024
0861bd1
add more assertions
spsjvc Feb 2, 2024
d478039
finish cleanup
spsjvc Feb 2, 2024
0d91ae4
bump version
spsjvc Feb 2, 2024
e1c5819
Merge branch 'dl/query' into feat-custom-fee-token
spsjvc Feb 2, 2024
c133974
revert changes
spsjvc Feb 2, 2024
abdc024
remove bangs
spsjvc Feb 2, 2024
6fe62da
bump
spsjvc Feb 2, 2024
61794ae
switch to early return
spsjvc Feb 2, 2024
fa3916e
don't increase submission cost, use fake l2 forwarder for gas estimation
godzillaba Feb 2, 2024
4e9b557
clean up
spsjvc Feb 4, 2024
49a8c5b
move property up
spsjvc Feb 5, 2024
d1e2fc5
bump version
spsjvc Feb 5, 2024
8264a5b
Merge branch 'dl/query' into feat-custom-fee-token
spsjvc Feb 5, 2024
d1236dd
Merge branch 'main' into feat-custom-fee-token
spsjvc Feb 5, 2024
d2ea33a
fix script
spsjvc Feb 5, 2024
4fbb2ca
fix
spsjvc Feb 5, 2024
f2b43da
clean up job names
spsjvc Feb 5, 2024
eb31f69
use testnode bridge (#408)
godzillaba Feb 5, 2024
31243d1
Merge branch 'main' into feat-custom-fee-token
spsjvc Feb 5, 2024
27127b4
move nativeToken to parent class
spsjvc Feb 5, 2024
fdf1526
move nativeTokenIsEth to parent class
spsjvc Feb 5, 2024
45e63a8
clean up jsdoc
spsjvc Feb 5, 2024
243f020
clean up gen abi
spsjvc Feb 5, 2024
716fb1a
rename fee token to gas token
spsjvc Feb 5, 2024
49dd42a
small updates to contracts
godzillaba Feb 7, 2024
46e60d9
remove todos
godzillaba Feb 7, 2024
54f00b7
check fee token decimals, network guard tests
godzillaba Feb 8, 2024
3a7a608
Merge branch 'feat-custom-fee-token' into ha/teleporter-custom-fee-2
godzillaba Feb 8, 2024
50fd5da
use main action
godzillaba Feb 8, 2024
47af901
yarn link teleport contracts
godzillaba Feb 8, 2024
6484696
Revert "yarn link teleport contracts"
godzillaba Feb 8, 2024
ebc4fe7
change eth bridger interface and more tests
godzillaba Feb 9, 2024
4fbaed0
add some comments
godzillaba Feb 12, 2024
ed550f0
misc comments
godzillaba Feb 12, 2024
a2e0f75
misc renaming, guard some tests with only eth fee
godzillaba Feb 12, 2024
b12dfa7
rm teleporter abigen
godzillaba Feb 12, 2024
4152610
exports
godzillaba Feb 12, 2024
558b93f
remove dup TeleporterAddresses type
godzillaba Feb 12, 2024
ca08e03
allow txHash, tx or txReceipt for erc20 deposit messages
godzillaba Feb 12, 2024
9c11785
simplify type checking
godzillaba Feb 12, 2024
cfdcf04
format
godzillaba Feb 12, 2024
ca9504a
Merge branch 'main' into ha/teleporter-custom-fee-2
godzillaba Feb 14, 2024
3a200c3
align with main
godzillaba Feb 14, 2024
a0c6e89
Merge branch 'main' into ha/teleporter-custom-fee-2
godzillaba Feb 21, 2024
db6622d
skip fee token
godzillaba Feb 22, 2024
b733229
update teleport contracts, use new conditional test skips
godzillaba Feb 22, 2024
74d59dc
fix gen:abi
godzillaba Feb 22, 2024
528a36c
...
godzillaba Feb 22, 2024
32c2295
use release testnode
godzillaba Feb 22, 2024
ecf7657
...
godzillaba Feb 22, 2024
b1d5ffc
remove tsignore
godzillaba Feb 22, 2024
edcf6f5
audit
godzillaba Feb 22, 2024
decbf9c
sepolia deployment
godzillaba Feb 22, 2024
a5e5b76
skip fee token option
godzillaba Mar 4, 2024
14fb144
format
godzillaba Mar 4, 2024
952eda4
allow txHash, tx or txReceipt for eth deposit messages
godzillaba Mar 4, 2024
f3f1c79
format
godzillaba Mar 4, 2024
f7af599
Merge branch 'main' into ha/teleporter-custom-fee-2
godzillaba Mar 25, 2024
7647c42
Merge branch 'main' into ha/teleporter-custom-fee-2
godzillaba Apr 23, 2024
79b1161
Merge branch 'main' into ha/teleporter-custom-fee-2
spsjvc Apr 30, 2024
a343ed1
Merge branch 'main' into ha/teleporter-custom-fee-2
spsjvc Apr 30, 2024
4c31825
Merge branch 'main' into ha/teleporter-custom-fee-2
spsjvc May 9, 2024
9e0ed92
add mainnet addresses and pin contracts
godzillaba May 13, 2024
b4ae902
add nova
godzillaba May 13, 2024
b1b36d2
getL2ForwarderAndBalanceFromStatus
godzillaba May 15, 2024
0865502
format
godzillaba May 15, 2024
18e914d
change completed status
godzillaba May 16, 2024
f910326
comment
godzillaba May 16, 2024
de263f2
getDepositParameters
godzillaba May 20, 2024
263b894
to -> destinationAddress
godzillaba May 22, 2024
7718d79
gas increase
godzillaba May 22, 2024
1c8b45b
OnlyGasToken
godzillaba May 22, 2024
1b99113
suffix retryable
godzillaba May 22, 2024
025cbc2
fix status
godzillaba May 22, 2024
8306075
format
godzillaba May 22, 2024
e7f07b1
make it throw getting unsupported/unavailable l1 gas token
godzillaba May 22, 2024
76958fd
comment
godzillaba May 22, 2024
acd71b5
helpful error
godzillaba May 22, 2024
2f302c6
fix tests
godzillaba May 22, 2024
a7d6790
fmt
godzillaba May 23, 2024
98b5944
fix tests
godzillaba May 23, 2024
f24842b
fmt
godzillaba May 23, 2024
86cfdaf
bump name and v
spsjvc May 24, 2024
1f131b6
fix: weth
godzillaba Jun 4, 2024
ae86a49
bump version
spsjvc Jun 4, 2024
e17e913
remove unused import
spsjvc Jun 4, 2024
9373f11
Merge branch 'main' into ha/teleporter-custom-fee-2
spsjvc Jun 14, 2024
90ac9cd
bump v
spsjvc Jun 14, 2024
0da6502
Merge branch 'main' into ha/teleporter-custom-fee-2
spsjvc Jun 17, 2024
7887ac9
Merge branch 'main' into ha/teleporter-custom-fee-2
spsjvc Jun 26, 2024
a8d78e2
bump v
spsjvc Jun 26, 2024
57dc635
chore: adds audit allowlist items for sol2uml (#499)
douglance Jul 1, 2024
9c0eec7
rename teleporter fee token to gas token (#500)
spsjvc Jul 2, 2024
64bb2cd
bump v
spsjvc Jul 2, 2024
99c4d6f
revert v
spsjvc Jul 2, 2024
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
21 changes: 20 additions & 1 deletion audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
// from @arbitrum/nitro-contracts>@offchainlabs/upgrade-executor>@openzeppelin/contracts-upgradeable
// from @arbitrum/nitro-contracts>@offchainlabs/upgrade-executor>@openzeppelin/contracts
"GHSA-wprv-93r4-jj2p",
// https://github.com/advisories/GHSA-3787-6prv-h9w3
// Undici proxy-authorization header not cleared on cross-origin redirect in fetch
"GHSA-3787-6prv-h9w3",
// https://github.com/advisories/GHSA-699g-q6qh-q4v8
// OpenZeppelin Contracts and Contracts Upgradeable duplicated execution of subcalls in v4.9.4
// from: @offchainlabs/l1-l3-teleport-contracts>@openzeppelin/contracts
"GHSA-699g-q6qh-q4v8",
// https://github.com/advisories/GHSA-9vx6-7xxf-x967
// OpenZeppelin Contracts base64 encoding may read from potentially dirty memory
// we don't use the base64 functions
Expand Down Expand Up @@ -85,6 +92,18 @@
// Uncontrolled resource consumption in braces
// eslint and hardhat dependency, only used in dev
// from: hardhat>braces & eslint>braces
"GHSA-grv7-fg5c-xmjg"
"GHSA-grv7-fg5c-xmjg",
// https://github.com/advisories/GHSA-3h5v-q93c-6h6q
// Exposure of Sensitive Information in ws
// Issue with sol2uml library that generates UML diagrams from Solidity code. Only used at build time.
// from: @offchainlabs/l1-l3-teleport-contracts>@arbitrum/nitro-contracts>sol2uml>convert-svg-to-png>convert-svg-core>puppeteer>ws
// from: @offchainlabs/l1-l3-teleport-contracts>@arbitrum/token-bridge-contracts>@arbitrum/nitro-contracts>sol2uml>convert-svg-to-png>convert-svg-core>puppeteer>ws
"GHSA-3h5v-q93c-6h6q",
// https://github.com/advisories/GHSA-wf5p-g6vw-rhxx
// Axios: Server-Side Request Forgery vulnerability
// Issue with sol2uml library that generates UML diagrams from Solidity code. Only used at build time.
// from: @offchainlabs/l1-l3-teleport-contracts>@arbitrum/nitro-contracts>sol2uml>axios
// from: @offchainlabs/l1-l3-teleport-contracts>@arbitrum/token-bridge-contracts>@arbitrum/nitro-contracts>sol2uml>axios
"GHSA-wf5p-g6vw-rhxx"
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@arbitrum/nitro-contracts": "^1.1.1",
"@arbitrum/token-bridge-contracts": "^1.2.1",
"@nomiclabs/hardhat-ethers": "^2.0.4",
"@offchainlabs/l1-l3-teleport-contracts": "1.0.1",
"@typechain/ethers-v5": "9.0.0",
"@types/chai": "^4.2.11",
"@types/mocha": "^9.0.0",
Expand Down
9 changes: 9 additions & 0 deletions scripts/genAbi.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ async function main() {

const nitroPath = getPackagePath('@arbitrum/nitro-contracts')
const tokenBridgePath = getPackagePath('@arbitrum/token-bridge-contracts')
const teleporterPath = getPackagePath(
'@offchainlabs/l1-l3-teleport-contracts'
)

console.log('Compiling paths.')

Expand All @@ -38,11 +41,17 @@ async function main() {
console.log('building @arbitrum/token-bridge-contracts')
execSync(`${npmExec} run build`, { cwd: tokenBridgePath })

console.log('building @offchainlabs/l1-l3-teleport-contracts')
execSync(`${npmExec} run build`, {
cwd: teleporterPath,
})

console.log('Done compiling')

const nitroFiles = glob(cwd, [
`${tokenBridgePath}/build/contracts/!(build-info)/**/+([a-zA-Z0-9_]).json`,
`${nitroPath}/build/contracts/!(build-info)/**/+([a-zA-Z0-9_]).json`,
`${teleporterPath}/build/contracts/!(build-info)/**/+([a-zA-Z0-9_]).json`,
])

// TODO: generate files into different subfolders (ie `/nitro/*`) to avoid overwrite of contracts with the same name
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
/* eslint-env node */
'use strict'

export {
Erc20L1L3Bridger,
EthL1L3Bridger,
} from './lib/assetBridger/l1l3Bridger'
export { EthBridger } from './lib/assetBridger/ethBridger'
export { Erc20Bridger } from './lib/assetBridger/erc20Bridger'
export {
Expand Down
Loading
Loading