Commit ef6fd959 authored by OptimismBot's avatar OptimismBot Committed by GitHub

Merge pull request #6182 from ethereum-optimism/update_eco_bridge

Update eco bridge adapter with the new bridge addresses for the ECO bridges on OP and OP Goerli
parents 6856455c 59abd46f
---
'@eth-optimism/sdk': patch
---
Update the addresses of the bridges on optimism and optimism goerli for the ECO bridge adapter
...@@ -626,12 +626,14 @@ jobs: ...@@ -626,12 +626,14 @@ jobs:
name: anvil-l1 name: anvil-l1
background: true background: true
# atm this is goerli but we should use mainnet after bedrock is live # atm this is goerli but we should use mainnet after bedrock is live
command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9190101 command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9256679
- run: - run:
name: anvil-l2 name: anvil-l2
background: true background: true
# atm this is goerli but we should use mainnet after bedrock is live # atm this is goerli but we should use mainnet after bedrock is live
command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 10756611 command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 11276409
- run: - run:
name: build name: build
command: pnpm build command: pnpm build
......
...@@ -20,7 +20,7 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter { ...@@ -20,7 +20,7 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter {
[ [
{ {
inputs: [], inputs: [],
name: 'ecoAddress', name: 'l1Eco',
outputs: [ outputs: [
{ {
internalType: 'address', internalType: 'address',
...@@ -40,7 +40,7 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter { ...@@ -40,7 +40,7 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter {
[ [
{ {
inputs: [], inputs: [],
name: 'l2EcoToken', name: 'l2Eco',
outputs: [ outputs: [
{ {
internalType: 'contract L2ECO', internalType: 'contract L2ECO',
...@@ -56,8 +56,8 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter { ...@@ -56,8 +56,8 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter {
) )
const [remoteL1Token, remoteL2Token] = await Promise.all([ const [remoteL1Token, remoteL2Token] = await Promise.all([
l1Bridge.ecoAddress(), l1Bridge.l1Eco(),
l2Bridge.l2EcoToken(), l2Bridge.l2Eco(),
]) ])
if (!hexStringEquals(remoteL1Token, toAddress(l1Token))) { if (!hexStringEquals(remoteL1Token, toAddress(l1Token))) {
......
...@@ -275,6 +275,11 @@ export const BRIDGE_ADAPTER_DATA: { ...@@ -275,6 +275,11 @@ export const BRIDGE_ADAPTER_DATA: {
l1Bridge: '0x10E6593CDda8c58a1d0f14C5164B376352a55f2F' as const, l1Bridge: '0x10E6593CDda8c58a1d0f14C5164B376352a55f2F' as const,
l2Bridge: '0x467194771dAe2967Aef3ECbEDD3Bf9a310C76C65' as const, l2Bridge: '0x467194771dAe2967Aef3ECbEDD3Bf9a310C76C65' as const,
}, },
ECO: {
Adapter: ECOBridgeAdapter,
l1Bridge: '0xAa029BbdC947F5205fBa0F3C11b592420B58f824' as const,
l2Bridge: '0xAa029BbdC947F5205fBa0F3C11b592420B58f824' as const,
},
}, },
[L2ChainID.OPTIMISM_GOERLI]: { [L2ChainID.OPTIMISM_GOERLI]: {
DAI: { DAI: {
...@@ -284,8 +289,8 @@ export const BRIDGE_ADAPTER_DATA: { ...@@ -284,8 +289,8 @@ export const BRIDGE_ADAPTER_DATA: {
}, },
ECO: { ECO: {
Adapter: ECOBridgeAdapter, Adapter: ECOBridgeAdapter,
l1Bridge: '0x7a01E277B8fDb8CDB2A2258508514716359f44A0' as const, l1Bridge: '0x9A4464D6bFE006715382D39D183AAf66c952a3e0' as const,
l2Bridge: '0x7a01E277B8fDb8CDB2A2258508514716359f44A0' as const, l2Bridge: '0x6aA809bAeA2e4C057b3994127cB165119c6fc3B2' as const,
}, },
}, },
} }
...@@ -11,13 +11,13 @@ import { ...@@ -11,13 +11,13 @@ import {
import { BRIDGE_ADAPTER_DATA, CrossChainMessenger, L2ChainID } from '../src' import { BRIDGE_ADAPTER_DATA, CrossChainMessenger, L2ChainID } from '../src'
import { l1Provider, l2Provider } from './testUtils/ethersProviders' import { l1Provider, l2Provider } from './testUtils/ethersProviders'
const ECO_WHALE: Address = '0xBd11c836279a1352ce737FbBFba36b20734B04e7' const ECO_WHALE: Address = '0x982E148216E3Aa6B38f9D901eF578B5c06DD7502'
// we should instead use tokenlist as source of truth // we should instead use tokenlist as source of truth
const ECO_L1_TOKEN_ADDRESS: Address = const ECO_L1_TOKEN_ADDRESS: Address =
'0x3E87d4d9E69163E7590f9b39a70853cf25e5ABE3' '0x3E87d4d9E69163E7590f9b39a70853cf25e5ABE3'
const ECO_L2_TOKEN_ADDRESS: Address = const ECO_L2_TOKEN_ADDRESS: Address =
'0x54bBECeA38ff36D32323f8A754683C1F5433A89f' '0xD2f598c826429EEe7c071C02735549aCd88F2c09'
const getERC20TokenBalance = async ( const getERC20TokenBalance = async (
publicClient: PublicClient, publicClient: PublicClient,
......
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