From 8e367c190c005086aba6425d6c4ea0d5eba76791 Mon Sep 17 00:00:00 2001 From: tsqxhca Date: Thu, 22 Aug 2024 18:03:31 +0800 Subject: [PATCH] Add support for new chains and rootstock adapter --- src/adapters/oooo/index.ts | 4 ++-- src/data/bridgeNetworkData.ts | 16 +++++++++++++++- src/helpers/l2scan.ts | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/adapters/oooo/index.ts b/src/adapters/oooo/index.ts index adc93365..120de286 100644 --- a/src/adapters/oooo/index.ts +++ b/src/adapters/oooo/index.ts @@ -47,7 +47,7 @@ const constructParams = (chain: SupportedChains) => { ...bridgeAddress.map(async (address: string, i: number) => { await wait(300 * i); // for etherscan let txs: any[] = []; - if (chain === "merlin" || chain === "b2-mainnet") { + if (chain === "merlin" || chain === "b2-mainnet" || chain === "rsk") { txs = await getTxsBlockRangeL2Scan(chain, address, fromBlock, toBlock, { includeSignatures: ["0x", "0x88d695b2"], }); @@ -93,7 +93,7 @@ const adapter: BridgeAdapter = { merlin: constructParams("merlin"), bsquared: constructParams("b2-mainnet"), bitlayer: constructParams("btr"), - // rootstock: constructParams("rsk"), + rootstock: constructParams("rsk"), // bevm // bevm_canary // btc diff --git a/src/data/bridgeNetworkData.ts b/src/data/bridgeNetworkData.ts index ac4a6443..3950719c 100644 --- a/src/data/bridgeNetworkData.ts +++ b/src/data/bridgeNetworkData.ts @@ -1337,12 +1337,26 @@ export default [ "Merlin", "BSquared", "Bitlayer", - // "Rootstock", + "Rootstock", + "Scroll", + "zkSync Era", + "ZkLink", + "Linea", + "Blast", + "Base", + "Optimism", + "Polygon", + "Taiko", + "Fantom", + "Ethereum", + "X Layer", ], chainMapping: { bsquared: "b2-mainnet", bitlayer: "btr", rootstock: "rsk", + "zksync era": "era", + "x layer": "xlayer", }, }, { diff --git a/src/helpers/l2scan.ts b/src/helpers/l2scan.ts index ffefc882..bd6a3d14 100644 --- a/src/helpers/l2scan.ts +++ b/src/helpers/l2scan.ts @@ -5,6 +5,7 @@ const retry = require("async-retry"); const endpoints = { merlin: "https://scan.merlinchain.io", "b2-mainnet": "https://explorer.bsquared.network", + "rsk": "https://rootstock.blockscout.com", } as { [chain: string]: string }; export const getTxsBlockRangeL2Scan = async (