Commit 6e0da06b authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge branch 'develop' into fix/rename-deployment

parents 0da2fb5b 35527b6b
---
'@eth-optimism/contracts-bedrock': minor
'@eth-optimism/contracts': minor
'@eth-optimism/sdk': minor
---
Update sdk contract addresses for bedrock
...@@ -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,
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment