Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
b49833fe
Unverified
Commit
b49833fe
authored
Mar 21, 2023
by
mergify[bot]
Committed by
GitHub
Mar 21, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5208 from ethereum-optimism/sc/sdk-default-bridges
fix(sdk): automatically create std/ETH bridges
parents
3d915fa9
67b4d669
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
cuddly-turkeys-burn.md
.changeset/cuddly-turkeys-burn.md
+5
-0
contracts.ts
packages/sdk/src/utils/contracts.ts
+3
-3
No files found.
.changeset/cuddly-turkeys-burn.md
0 → 100644
View file @
b49833fe
---
'
@eth-optimism/sdk'
:
patch
---
Have SDK automatically create Standard and ETH bridges when L1StandardBridge is provided.
packages/sdk/src/utils/contracts.ts
View file @
b49833fe
...
@@ -165,19 +165,19 @@ export const getBridgeAdapters = (
...
@@ -165,19 +165,19 @@ export const getBridgeAdapters = (
}
}
):
BridgeAdapters
=>
{
):
BridgeAdapters
=>
{
const
adapterData
:
BridgeAdapterData
=
{
const
adapterData
:
BridgeAdapterData
=
{
...(
CONTRACT_ADDRESSES
[
l2ChainId
]
...(
CONTRACT_ADDRESSES
[
l2ChainId
]
||
opts
?.
contracts
?.
l1
?.
L1StandardBridge
?
{
?
{
Standard
:
{
Standard
:
{
Adapter
:
StandardBridgeAdapter
,
Adapter
:
StandardBridgeAdapter
,
l1Bridge
:
l1Bridge
:
opts
.
contracts
?.
l1
?.
L1StandardBridge
||
opts
?
.
contracts
?.
l1
?.
L1StandardBridge
||
CONTRACT_ADDRESSES
[
l2ChainId
].
l1
.
L1StandardBridge
,
CONTRACT_ADDRESSES
[
l2ChainId
].
l1
.
L1StandardBridge
,
l2Bridge
:
predeploys
.
L2StandardBridge
,
l2Bridge
:
predeploys
.
L2StandardBridge
,
},
},
ETH
:
{
ETH
:
{
Adapter
:
ETHBridgeAdapter
,
Adapter
:
ETHBridgeAdapter
,
l1Bridge
:
l1Bridge
:
opts
.
contracts
?.
l1
?.
L1StandardBridge
||
opts
?
.
contracts
?.
l1
?.
L1StandardBridge
||
CONTRACT_ADDRESSES
[
l2ChainId
].
l1
.
L1StandardBridge
,
CONTRACT_ADDRESSES
[
l2ChainId
].
l1
.
L1StandardBridge
,
l2Bridge
:
predeploys
.
L2StandardBridge
,
l2Bridge
:
predeploys
.
L2StandardBridge
,
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment