Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update eco bridge adapter with the new bridge addresses for the ECO bridges on OP and OP Goerli #6182

Merged
merged 26 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
269ed96
Merge branch 'develop' of https://github.com/ethereum-optimism/optimi…
tremarkley May 18, 2023
42e7977
Merge branch 'develop' of https://github.com/ethereum-optimism/optimi…
tremarkley May 18, 2023
ab26d1a
Merge branch 'develop' of https://github.com/ethereum-optimism/optimi…
tremarkley Jun 28, 2023
24030ab
update eco bridge adapter to new bridge address
tremarkley Jun 28, 2023
c04a3e5
changeset
tremarkley Jun 28, 2023
cf40d73
update eco l2 token address in bridgeEcoToken.spec.ts
tremarkley Jun 28, 2023
600429f
update abi
tremarkley Jun 28, 2023
1dc7401
bump forked block numbers
tremarkley Jun 28, 2023
e5a604e
bump fork block numbers
tremarkley Jun 28, 2023
1b3cdda
bump block number
tremarkley Jun 28, 2023
b2d82ee
remove forked block number
tremarkley Jun 28, 2023
607c03a
update whale wallet
tremarkley Jun 28, 2023
17b8763
bump fork block numbers
tremarkley Jun 28, 2023
15009ac
Merge branch 'develop' into update_eco_bridge
tremarkley Jun 29, 2023
a8e544b
update eco bridge adapter to new bridge address
tremarkley Jun 28, 2023
3f13fd0
changeset
tremarkley Jun 28, 2023
ca8b961
update eco l2 token address in bridgeEcoToken.spec.ts
tremarkley Jun 28, 2023
a6d67bb
update abi
tremarkley Jun 28, 2023
9ea628a
bump forked block numbers
tremarkley Jun 28, 2023
b9e97c8
bump fork block numbers
tremarkley Jun 28, 2023
1eec02b
bump block number
tremarkley Jun 28, 2023
61c67df
remove forked block number
tremarkley Jun 28, 2023
bd8794e
update whale wallet
tremarkley Jun 28, 2023
5b32397
bump fork block numbers
tremarkley Jun 28, 2023
9d2270b
Merge branch 'update_eco_bridge' of https://github.com/ethereum-optim…
tremarkley Jun 29, 2023
59abd46
Merge branch 'develop' into update_eco_bridge
roninjin10 Jun 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tender-files-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/sdk': patch
---

Update the addresses of the bridges on optimism and optimism goerli for the ECO bridge adapter
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -626,12 +626,14 @@ 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 9190101
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 --fork-block-number 10756611
command: anvil --fork-url $ANVIL_L2_FORK_URL --port 9545 --fork-block-number 11276409

- run:
name: build
command: pnpm build
Expand Down
8 changes: 4 additions & 4 deletions packages/sdk/src/adapters/eco-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter {
[
{
inputs: [],
name: 'ecoAddress',
name: 'l1Eco',
outputs: [
{
internalType: 'address',
Expand All @@ -40,7 +40,7 @@ export class ECOBridgeAdapter extends StandardBridgeAdapter {
[
{
inputs: [],
name: 'l2EcoToken',
name: 'l2Eco',
outputs: [
{
internalType: 'contract L2ECO',
Expand All @@ -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))) {
Expand Down
9 changes: 7 additions & 2 deletions packages/sdk/src/utils/chain-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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,
},
},
}
4 changes: 2 additions & 2 deletions packages/sdk/test-next/bridgeEcoToken.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ 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 =
'0x3E87d4d9E69163E7590f9b39a70853cf25e5ABE3'
const ECO_L2_TOKEN_ADDRESS: Address =
'0x54bBECeA38ff36D32323f8A754683C1F5433A89f'
'0xD2f598c826429EEe7c071C02735549aCd88F2c09'

const getERC20TokenBalance = async (
publicClient: PublicClient,
Expand Down