From 24030ab3c10731586dda84c6989c3d76909038e5 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 09:42:33 -0700 Subject: [PATCH 01/20] update eco bridge adapter to new bridge address --- packages/sdk/src/utils/chain-constants.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/sdk/src/utils/chain-constants.ts b/packages/sdk/src/utils/chain-constants.ts index 1ef6a2eca60e..9555c46169cc 100644 --- a/packages/sdk/src/utils/chain-constants.ts +++ b/packages/sdk/src/utils/chain-constants.ts @@ -275,6 +275,11 @@ export const BRIDGE_ADAPTER_DATA: { l1Bridge: '0x10E6593CDda8c58a1d0f14C5164B376352a55f2F' as const, l2Bridge: '0x467194771dAe2967Aef3ECbEDD3Bf9a310C76C65' as const, }, + ECO: { + Adapter: ECOBridgeAdapter, + l1Bridge: '0xAa029BbdC947F5205fBa0F3C11b592420B58f824' as const, + l2Bridge: '0xAa029BbdC947F5205fBa0F3C11b592420B58f824' as const, + }, }, [L2ChainID.OPTIMISM_GOERLI]: { DAI: { @@ -284,8 +289,8 @@ export const BRIDGE_ADAPTER_DATA: { }, ECO: { Adapter: ECOBridgeAdapter, - l1Bridge: '0x7a01E277B8fDb8CDB2A2258508514716359f44A0' as const, - l2Bridge: '0x7a01E277B8fDb8CDB2A2258508514716359f44A0' as const, + l1Bridge: '0x9A4464D6bFE006715382D39D183AAf66c952a3e0' as const, + l2Bridge: '0x6aA809bAeA2e4C057b3994127cB165119c6fc3B2' as const, }, }, } From c04a3e58ba4b6369daa40e5bc807d7f87913ff49 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 09:45:16 -0700 Subject: [PATCH 02/20] changeset --- .changeset/tender-files-sort.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tender-files-sort.md diff --git a/.changeset/tender-files-sort.md b/.changeset/tender-files-sort.md new file mode 100644 index 000000000000..5bb6819d82f8 --- /dev/null +++ b/.changeset/tender-files-sort.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/sdk': patch +--- + +Update the addresses of the bridges on optimism and optimism goerli for the ECO bridge adapter From cf40d7338fe6cd16da07402f44972301ea66db85 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 10:20:45 -0700 Subject: [PATCH 03/20] update eco l2 token address in bridgeEcoToken.spec.ts --- packages/sdk/test-next/bridgeEcoToken.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/test-next/bridgeEcoToken.spec.ts b/packages/sdk/test-next/bridgeEcoToken.spec.ts index 5eda316f87d4..45fde13e7ac1 100644 --- a/packages/sdk/test-next/bridgeEcoToken.spec.ts +++ b/packages/sdk/test-next/bridgeEcoToken.spec.ts @@ -17,7 +17,7 @@ const ECO_WHALE: Address = '0xBd11c836279a1352ce737FbBFba36b20734B04e7' const ECO_L1_TOKEN_ADDRESS: Address = '0x3E87d4d9E69163E7590f9b39a70853cf25e5ABE3' const ECO_L2_TOKEN_ADDRESS: Address = - '0x54bBECeA38ff36D32323f8A754683C1F5433A89f' + '0xD2f598c826429EEe7c071C02735549aCd88F2c09' const getERC20TokenBalance = async ( publicClient: PublicClient, From 600429fddcfe4ac7a0fbcd9d95e7dc814ba4ec6a Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 11:27:15 -0700 Subject: [PATCH 04/20] update abi --- packages/sdk/src/adapters/eco-bridge.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/sdk/src/adapters/eco-bridge.ts b/packages/sdk/src/adapters/eco-bridge.ts index 428dff1f5042..8fa8668c433a 100644 --- a/packages/sdk/src/adapters/eco-bridge.ts +++ b/packages/sdk/src/adapters/eco-bridge.ts @@ -20,7 +20,7 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter { [ { inputs: [], - name: 'ecoAddress', + name: 'l1Eco', outputs: [ { internalType: 'address', @@ -40,7 +40,7 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter { [ { inputs: [], - name: 'l2EcoToken', + name: 'l2Eco', outputs: [ { internalType: 'contract L2ECO', @@ -56,8 +56,8 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter { ) const [remoteL1Token, remoteL2Token] = await Promise.all([ - l1Bridge.ecoAddress(), - l2Bridge.l2EcoToken(), + l1Bridge.l1Eco(), + l2Bridge.l2Eco(), ]) if (!hexStringEquals(remoteL1Token, toAddress(l1Token))) { From 1dc740182f339d88b52aa65f2aa53fe78752f621 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 11:39:34 -0700 Subject: [PATCH 05/20] bump forked block numbers --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 05adab2fbd73..05fb6c1a53cb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -584,12 +584,12 @@ jobs: name: anvil-l1 background: true # atm this is goerli but we should use mainnet after bedrock is live - command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9023108 + command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9139317 - run: name: anvil-l2 background: true # 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 9504811 + command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 10365187 - run: name: build command: yarn build From e5a604e8e333c1e589a03badf0c31476260bb2ed Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 11:50:51 -0700 Subject: [PATCH 06/20] bump fork block numbers --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 05fb6c1a53cb..a379b7329cca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -584,12 +584,12 @@ jobs: name: anvil-l1 background: true # atm this is goerli but we should use mainnet after bedrock is live - command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9139317 + command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9139321 - run: name: anvil-l2 background: true # 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 10365187 + command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 105497406 - run: name: build command: yarn build From 1b3cddac235061e1b95aa9e1705ae33397f04978 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 11:57:42 -0700 Subject: [PATCH 07/20] bump block number --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a379b7329cca..e676b6bdb6b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -589,7 +589,7 @@ jobs: name: anvil-l2 background: true # 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 105497406 + command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 10365200 - run: name: build command: yarn build From b2d82ee520c9d0ee9894e2e2415b089d04288517 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 12:14:49 -0700 Subject: [PATCH 08/20] remove forked block number --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e676b6bdb6b7..bf438dc2b907 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -584,12 +584,12 @@ jobs: name: anvil-l1 background: true # atm this is goerli but we should use mainnet after bedrock is live - command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9139321 + command: anvil --fork-url $ANVIL_L1_FORK_URL - run: name: anvil-l2 background: true # 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 10365200 + command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 - run: name: build command: yarn build From 607c03a2bc3dcefe5953c8b94cff7db7debf36f1 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 12:22:53 -0700 Subject: [PATCH 09/20] update whale wallet --- packages/sdk/test-next/bridgeEcoToken.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/test-next/bridgeEcoToken.spec.ts b/packages/sdk/test-next/bridgeEcoToken.spec.ts index 45fde13e7ac1..de4c009b0a4e 100644 --- a/packages/sdk/test-next/bridgeEcoToken.spec.ts +++ b/packages/sdk/test-next/bridgeEcoToken.spec.ts @@ -11,7 +11,7 @@ import { import { BRIDGE_ADAPTER_DATA, CrossChainMessenger, L2ChainID } from '../src' 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 const ECO_L1_TOKEN_ADDRESS: Address = From 17b87632d3f37777d9dfbd8b68f9454f0e09390b Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 12:35:56 -0700 Subject: [PATCH 10/20] bump fork block numbers --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bf438dc2b907..b77c0e26a80e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -584,12 +584,12 @@ jobs: name: anvil-l1 background: true # atm this is goerli but we should use mainnet after bedrock is live - command: anvil --fork-url $ANVIL_L1_FORK_URL + command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9256679 - run: name: anvil-l2 background: true # atm this is goerli but we should use mainnet after bedrock is live - command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 + command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 11276409 - run: name: build command: yarn build From a8e544b727f467afec7d92741682fed6aee78d51 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 09:42:33 -0700 Subject: [PATCH 11/20] update eco bridge adapter to new bridge address --- packages/sdk/src/utils/chain-constants.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/sdk/src/utils/chain-constants.ts b/packages/sdk/src/utils/chain-constants.ts index 1ef6a2eca60e..9555c46169cc 100644 --- a/packages/sdk/src/utils/chain-constants.ts +++ b/packages/sdk/src/utils/chain-constants.ts @@ -275,6 +275,11 @@ export const BRIDGE_ADAPTER_DATA: { l1Bridge: '0x10E6593CDda8c58a1d0f14C5164B376352a55f2F' as const, l2Bridge: '0x467194771dAe2967Aef3ECbEDD3Bf9a310C76C65' as const, }, + ECO: { + Adapter: ECOBridgeAdapter, + l1Bridge: '0xAa029BbdC947F5205fBa0F3C11b592420B58f824' as const, + l2Bridge: '0xAa029BbdC947F5205fBa0F3C11b592420B58f824' as const, + }, }, [L2ChainID.OPTIMISM_GOERLI]: { DAI: { @@ -284,8 +289,8 @@ export const BRIDGE_ADAPTER_DATA: { }, ECO: { Adapter: ECOBridgeAdapter, - l1Bridge: '0x7a01E277B8fDb8CDB2A2258508514716359f44A0' as const, - l2Bridge: '0x7a01E277B8fDb8CDB2A2258508514716359f44A0' as const, + l1Bridge: '0x9A4464D6bFE006715382D39D183AAf66c952a3e0' as const, + l2Bridge: '0x6aA809bAeA2e4C057b3994127cB165119c6fc3B2' as const, }, }, } From 3f13fd0bbea051a4550f1df6def1a53a616aa6f6 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 09:45:16 -0700 Subject: [PATCH 12/20] changeset --- .changeset/tender-files-sort.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tender-files-sort.md diff --git a/.changeset/tender-files-sort.md b/.changeset/tender-files-sort.md new file mode 100644 index 000000000000..5bb6819d82f8 --- /dev/null +++ b/.changeset/tender-files-sort.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/sdk': patch +--- + +Update the addresses of the bridges on optimism and optimism goerli for the ECO bridge adapter From ca8b96131e16aa5d4fa6df7f4c56459b7f7d8d20 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 10:20:45 -0700 Subject: [PATCH 13/20] update eco l2 token address in bridgeEcoToken.spec.ts --- packages/sdk/test-next/bridgeEcoToken.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/test-next/bridgeEcoToken.spec.ts b/packages/sdk/test-next/bridgeEcoToken.spec.ts index 5eda316f87d4..45fde13e7ac1 100644 --- a/packages/sdk/test-next/bridgeEcoToken.spec.ts +++ b/packages/sdk/test-next/bridgeEcoToken.spec.ts @@ -17,7 +17,7 @@ const ECO_WHALE: Address = '0xBd11c836279a1352ce737FbBFba36b20734B04e7' const ECO_L1_TOKEN_ADDRESS: Address = '0x3E87d4d9E69163E7590f9b39a70853cf25e5ABE3' const ECO_L2_TOKEN_ADDRESS: Address = - '0x54bBECeA38ff36D32323f8A754683C1F5433A89f' + '0xD2f598c826429EEe7c071C02735549aCd88F2c09' const getERC20TokenBalance = async ( publicClient: PublicClient, From a6d67bbb92173f33fbda8c3d6dfbc5cf3d6ae9d4 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 11:27:15 -0700 Subject: [PATCH 14/20] update abi --- packages/sdk/src/adapters/eco-bridge.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/sdk/src/adapters/eco-bridge.ts b/packages/sdk/src/adapters/eco-bridge.ts index 428dff1f5042..8fa8668c433a 100644 --- a/packages/sdk/src/adapters/eco-bridge.ts +++ b/packages/sdk/src/adapters/eco-bridge.ts @@ -20,7 +20,7 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter { [ { inputs: [], - name: 'ecoAddress', + name: 'l1Eco', outputs: [ { internalType: 'address', @@ -40,7 +40,7 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter { [ { inputs: [], - name: 'l2EcoToken', + name: 'l2Eco', outputs: [ { internalType: 'contract L2ECO', @@ -56,8 +56,8 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter { ) const [remoteL1Token, remoteL2Token] = await Promise.all([ - l1Bridge.ecoAddress(), - l2Bridge.l2EcoToken(), + l1Bridge.l1Eco(), + l2Bridge.l2Eco(), ]) if (!hexStringEquals(remoteL1Token, toAddress(l1Token))) { From 9ea628a97c6dd431b4558efbcc7e97cbbc7bf375 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 11:39:34 -0700 Subject: [PATCH 15/20] bump forked block numbers --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 95a976486972..fd96870faaaa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -626,12 +626,12 @@ jobs: name: anvil-l1 background: true # atm this is goerli but we should use mainnet after bedrock is live - command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9023108 + command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9139317 - run: name: anvil-l2 background: true # 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 9504811 + command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 10365187 - run: name: build command: pnpm build From b9e97c84ddc099b9f5734fe57fec29867c4a0c4f Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 11:50:51 -0700 Subject: [PATCH 16/20] bump fork block numbers --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fd96870faaaa..4420c02103e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -626,12 +626,12 @@ jobs: name: anvil-l1 background: true # atm this is goerli but we should use mainnet after bedrock is live - command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9139317 + command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9139321 - run: name: anvil-l2 background: true # 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 10365187 + command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 105497406 - run: name: build command: pnpm build From 1eec02b6f1d29a8ac2df0a6d62e3ea85277f32df Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 11:57:42 -0700 Subject: [PATCH 17/20] bump block number --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4420c02103e2..36c38083a488 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -631,7 +631,7 @@ jobs: name: anvil-l2 background: true # 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 105497406 + command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 10365200 - run: name: build command: pnpm build From 61c67df5d19a6451f71c6774ee105fdca4ed996d Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 12:14:49 -0700 Subject: [PATCH 18/20] remove forked block number --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 36c38083a488..ebe0aa61a194 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -626,12 +626,12 @@ jobs: name: anvil-l1 background: true # atm this is goerli but we should use mainnet after bedrock is live - command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9139321 + command: anvil --fork-url $ANVIL_L1_FORK_URL - run: name: anvil-l2 background: true # 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 10365200 + command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 - run: name: build command: pnpm build From bd8794e3ceedc03d6c471d59abe557b357ed48eb Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 12:22:53 -0700 Subject: [PATCH 19/20] update whale wallet --- packages/sdk/test-next/bridgeEcoToken.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/test-next/bridgeEcoToken.spec.ts b/packages/sdk/test-next/bridgeEcoToken.spec.ts index 45fde13e7ac1..de4c009b0a4e 100644 --- a/packages/sdk/test-next/bridgeEcoToken.spec.ts +++ b/packages/sdk/test-next/bridgeEcoToken.spec.ts @@ -11,7 +11,7 @@ import { import { BRIDGE_ADAPTER_DATA, CrossChainMessenger, L2ChainID } from '../src' 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 const ECO_L1_TOKEN_ADDRESS: Address = From 5b32397c1b3aec99943d57ebb3f9b080e775c042 Mon Sep 17 00:00:00 2001 From: tre Date: Wed, 28 Jun 2023 12:35:56 -0700 Subject: [PATCH 20/20] bump fork block numbers --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ebe0aa61a194..2818c79e5b97 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -626,12 +626,12 @@ jobs: name: anvil-l1 background: true # atm this is goerli but we should use mainnet after bedrock is live - command: anvil --fork-url $ANVIL_L1_FORK_URL + command: anvil --fork-url $ANVIL_L1_FORK_URL --fork-block-number 9256679 - run: name: anvil-l2 background: true # atm this is goerli but we should use mainnet after bedrock is live - command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 + command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 11276409 - run: name: build command: pnpm build