From a14df99692c2b2b05e8736f9f9e7e489ad964e7e Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Wed, 1 Nov 2023 11:41:52 +0800 Subject: [PATCH] support zksync<>arbitrum usdt --- packages/apps/src/bridges/lnbridge-default.ts | 5 +++++ packages/apps/src/config/chains/arbitrum.ts | 5 ++++- packages/apps/src/config/chains/zksync.ts | 12 +++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/apps/src/bridges/lnbridge-default.ts b/packages/apps/src/bridges/lnbridge-default.ts index 8f1f26192..91581e0a2 100644 --- a/packages/apps/src/bridges/lnbridge-default.ts +++ b/packages/apps/src/bridges/lnbridge-default.ts @@ -41,6 +41,11 @@ export class LnBridgeDefault extends LnBridgeBase { sourceAddress: "0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829", targetAddress: "0xe8d55759c32fb608fD092aB2C0ef8A1F52B254d4", }; + } else if (this.sourceChain?.id === ChainID.ZKSYNC) { + this.contract = { + sourceAddress: "0x767Bc046c989f5e63683fB530f939DD34b91ceAC", + targetAddress: "0x767Bc046c989f5e63683fB530f939DD34b91ceAC", + }; } else if (isProduction()) { this.contract = { sourceAddress: "0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337", diff --git a/packages/apps/src/config/chains/arbitrum.ts b/packages/apps/src/config/chains/arbitrum.ts index 256ca2089..1850ec03f 100644 --- a/packages/apps/src/config/chains/arbitrum.ts +++ b/packages/apps/src/config/chains/arbitrum.ts @@ -53,7 +53,10 @@ export const arbitrumChain: ChainConfig = { type: "erc20", address: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", logo: "usdt.svg", - cross: [{ target: { network: "mantle", symbol: "USDT" }, bridge: { category: "lnbridgev20-default" } }], + cross: [ + { target: { network: "mantle", symbol: "USDT" }, bridge: { category: "lnbridgev20-default" } }, + { target: { network: "zksync", symbol: "USDT" }, bridge: { category: "lnbridgev20-default" } }, + ], }, ], }; diff --git a/packages/apps/src/config/chains/zksync.ts b/packages/apps/src/config/chains/zksync.ts index abb032747..f75d974a7 100644 --- a/packages/apps/src/config/chains/zksync.ts +++ b/packages/apps/src/config/chains/zksync.ts @@ -26,5 +26,15 @@ export const zksyncChain: ChainConfig = { url: "https://explorer.zksync.io/", }, }, - tokens: [], + tokens: [ + { + decimals: 6, + symbol: "USDT", + name: "USDT", + type: "erc20", + address: "0x493257fD37EDB34451f62EDf8D2a0C418852bA4C", + logo: "usdt.svg", + cross: [{ target: { network: "arbitrum", symbol: "USDT" }, bridge: { category: "lnbridgev20-default" } }], + }, + ], };