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
35527b6b
Unverified
Commit
35527b6b
authored
Jun 01, 2023
by
OptimismBot
Committed by
GitHub
Jun 01, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5768 from ethereum-optimism/willc/migration-sdk
feat(bedrock): Upgrade contract addresses for sdk
parents
8b392e9b
ff105f24
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
three-colts-march.md
.changeset/three-colts-march.md
+7
-0
chain-constants.ts
packages/sdk/src/utils/chain-constants.ts
+18
-2
No files found.
.changeset/three-colts-march.md
0 → 100644
View file @
35527b6b
---
'
@eth-optimism/contracts-bedrock'
:
minor
'
@eth-optimism/contracts'
:
minor
'
@eth-optimism/sdk'
:
minor
---
Update sdk contract addresses for bedrock
packages/sdk/src/utils/chain-constants.ts
View file @
35527b6b
...
@@ -3,6 +3,20 @@ import {
...
@@ -3,6 +3,20 @@ import {
getDeployedContractDefinition
,
getDeployedContractDefinition
,
}
from
'
@eth-optimism/contracts
'
}
from
'
@eth-optimism/contracts
'
import
{
predeploys
as
bedrockPredeploys
}
from
'
@eth-optimism/contracts-bedrock
'
import
{
predeploys
as
bedrockPredeploys
}
from
'
@eth-optimism/contracts-bedrock
'
import
portalArtifactsMainnet
from
'
@eth-optimism/contracts-bedrock/deployments/mainnet/OptimismPortalProxy.json
'
import
portalArtifactsGoerli
from
'
@eth-optimism/contracts-bedrock/deployments/goerli/OptimismPortalProxy.json
'
import
l2OutputOracleArtifactsMainnet
from
'
@eth-optimism/contracts-bedrock/deployments/mainnet/L2OutputOracleProxy.json
'
import
l2OutputOracleArtifactsGoerli
from
'
@eth-optimism/contracts-bedrock/deployments/goerli/L2OutputOracleProxy.json
'
const
portalAddresses
=
{
mainnet
:
portalArtifactsMainnet
,
goerli
:
portalArtifactsGoerli
,
}
const
l2OutputOracleAddresses
=
{
mainnet
:
l2OutputOracleArtifactsMainnet
,
goerli
:
l2OutputOracleArtifactsGoerli
,
}
import
{
import
{
L1ChainID
,
L1ChainID
,
...
@@ -64,6 +78,7 @@ export const DEFAULT_L2_CONTRACT_ADDRESSES: OEL2ContractsLike = {
...
@@ -64,6 +78,7 @@ export const DEFAULT_L2_CONTRACT_ADDRESSES: OEL2ContractsLike = {
* @returns The L1 contracts for the given network.
* @returns The L1 contracts for the given network.
*/
*/
const
getL1ContractsByNetworkName
=
(
network
:
string
):
OEL1ContractsLike
=>
{
const
getL1ContractsByNetworkName
=
(
network
:
string
):
OEL1ContractsLike
=>
{
// TODO this doesn't code split and makes the sdk artifacts way too big
const
getDeployedAddress
=
(
name
:
string
)
=>
{
const
getDeployedAddress
=
(
name
:
string
)
=>
{
return
getDeployedContractDefinition
(
name
,
network
).
address
return
getDeployedContractDefinition
(
name
,
network
).
address
}
}
...
@@ -77,8 +92,8 @@ const getL1ContractsByNetworkName = (network: string): OEL1ContractsLike => {
...
@@ -77,8 +92,8 @@ const getL1ContractsByNetworkName = (network: string): OEL1ContractsLike => {
StateCommitmentChain
:
getDeployedAddress
(
'
StateCommitmentChain
'
),
StateCommitmentChain
:
getDeployedAddress
(
'
StateCommitmentChain
'
),
CanonicalTransactionChain
:
getDeployedAddress
(
'
CanonicalTransactionChain
'
),
CanonicalTransactionChain
:
getDeployedAddress
(
'
CanonicalTransactionChain
'
),
BondManager
:
getDeployedAddress
(
'
BondManager
'
),
BondManager
:
getDeployedAddress
(
'
BondManager
'
),
OptimismPortal
:
'
0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383
'
as
const
,
OptimismPortal
:
portalAddresses
[
network
].
address
,
L2OutputOracle
:
'
0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0
'
as
const
,
L2OutputOracle
:
l2OutputOracleAddresses
[
network
].
address
,
}
}
}
}
...
@@ -109,6 +124,7 @@ export const CONTRACT_ADDRESSES: {
...
@@ -109,6 +124,7 @@ export const CONTRACT_ADDRESSES: {
CanonicalTransactionChain
:
CanonicalTransactionChain
:
'
0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9
'
as
const
,
'
0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9
'
as
const
,
BondManager
:
'
0x5FC8d32690cc91D4c39d9d3abcBD16989F875707
'
as
const
,
BondManager
:
'
0x5FC8d32690cc91D4c39d9d3abcBD16989F875707
'
as
const
,
// FIXME
OptimismPortal
:
'
0x0000000000000000000000000000000000000000
'
as
const
,
OptimismPortal
:
'
0x0000000000000000000000000000000000000000
'
as
const
,
L2OutputOracle
:
'
0x0000000000000000000000000000000000000000
'
as
const
,
L2OutputOracle
:
'
0x0000000000000000000000000000000000000000
'
as
const
,
},
},
...
...
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