Skip to content

Commit

Permalink
Merge pull request #267 from cc7768/cc7768/across_new_chains_20240716
Browse files Browse the repository at this point in the history
ENH: Add Blast/Scroll to Across adapter
  • Loading branch information
vrtnd authored Aug 10, 2024
2 parents 2161557 + 72c2bca commit efa4baf
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 14 deletions.
49 changes: 36 additions & 13 deletions src/adapters/across/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,54 @@ For all tokens using 'spokepool' contracts:
*/

const contracts = {
// Chain id: 1
ethereum: {
spokePoolv2: "0x4D9079Bb4165aeb4084c526a32695dCfd2F77381",
spokePoolv2p5: "0x5c7BCd6E7De5423a257D81B442095A1a6ced35C5",
},
polygon: {
spokePoolv2: "0x69B5c72837769eF1e7C164Abc6515DcFf217F920",
spokePoolv2p5: "0x9295ee1d8C5b022Be115A2AD3c30C72E34e7F096",
},
arbitrum: {
spokePoolv2: "0xB88690461dDbaB6f04Dfad7df66B7725942FEb9C",
spokePoolv2p5: "0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A",
},
// Chain id: 10
optimism: {
spokePoolv2: "0xa420b2d1c0841415A695b81E5B867BCD07Dff8C9",
spokePoolv2p5: "0x6f26Bf09B1C792e3228e5467807a900A503c0281",
},
// Chain id: 137
polygon: {
spokePoolv2: "0x69B5c72837769eF1e7C164Abc6515DcFf217F920",
spokePoolv2p5: "0x9295ee1d8C5b022Be115A2AD3c30C72E34e7F096",
},
// Chain id: 324
era: {
spokePoolv2p5: "0xE0B015E54d54fc84a6cB9B666099c46adE9335FF",
},
// Chain id: 1135 (TODO: Add Lisk to llama-sdk first)
// lisk: {
// spokePoolv2p5: "0x9552a0a6624A23B848060AE5901659CDDa1f83f8",
// },
// Chain id: 8453
base: {
spokePoolv2p5: "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
},
// Chain id: 34443
mode: {
spokePoolv2p5: "0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96",
},
// Chain id: 42161
arbitrum: {
spokePoolv2: "0xB88690461dDbaB6f04Dfad7df66B7725942FEb9C",
spokePoolv2p5: "0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A",
},
// Chain id: 59144
linea: {
spokePoolv2p5: "0x7E63A5f1a8F0B4d0934B2f2327DAED3F6bb2ee75",
},
mode: {
spokePoolv2p5: "0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96",
// Chain id: 81457
blast: {
spokePoolv2p5: "0x2D509190Ed0172ba588407D4c2df918F955Cc6E1",
},
// Chain id: 534352
scroll: {
spokePoolv2p5: "0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96",
}
} as const;

type SupportedChains = keyof typeof contracts;
Expand Down Expand Up @@ -218,13 +238,16 @@ const constructParams = (chain: SupportedChains) => {

const adapter: BridgeAdapter = {
ethereum: constructParams("ethereum"),
polygon: constructParams("polygon"),
arbitrum: constructParams("arbitrum"),
optimism: constructParams("optimism"),
polygon: constructParams("polygon"),
"zksync era": constructParams("era"),
// lisk: constructParams("lisk"),
base: constructParams("base"),
linea: constructParams("linea"),
mode: constructParams("mode"),
arbitrum: constructParams("arbitrum"),
linea: constructParams("linea"),
blast: constructParams("blast"),
scroll: constructParams("scroll"),
};

export default adapter;
13 changes: 12 additions & 1 deletion src/data/bridgeNetworkData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,18 @@ export default [
iconLink: "icons:across",
largeTxThreshold: 10000,
url: "https://across.to/",
chains: ["Ethereum", "Polygon", "Arbitrum", "Optimism", "zkSync Era", "Base", "Linea", "Mode"],
chains: [
"Ethereum",
"Polygon",
"Optimism",
"zkSync Era",
"Base",
"Arbitrum",
"Linea",
"Mode",
"Blast",
"Scroll"
],
chainMapping: {
"zksync era": "era",
},
Expand Down

0 comments on commit efa4baf

Please sign in to comment.