From 6c6c75a4c7f3da27b31431242461f5e543da96e2 Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Mon, 23 Oct 2023 14:51:09 +0800 Subject: [PATCH] config lnbridge production contract --- packages/apps/src/bridges/lnbridge-default.ts | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/packages/apps/src/bridges/lnbridge-default.ts b/packages/apps/src/bridges/lnbridge-default.ts index c11134e3e..dc96b135d 100644 --- a/packages/apps/src/bridges/lnbridge-default.ts +++ b/packages/apps/src/bridges/lnbridge-default.ts @@ -24,23 +24,29 @@ export class LnBridgeDefault extends LnBridgeBase { private initContract() { if (this.sourceChain?.id === ChainID.LINEA_GOERLI && this.targetChain?.id === ChainID.GOERLI) { + // Linea Goerli => Goerli this.contract = { sourceAddress: "0x4C538EfA6e3f9Dfb939AA4F0B224577DA665923a", targetAddress: "0x4C538EfA6e3f9Dfb939AA4F0B224577DA665923a", }; - } else if (this.sourceChain?.id === ChainID.ZKSYNC_GOERLI || this.targetChain?.id === ChainID.ZKSYNC_GOERLI) { - if (this.sourceChain?.id === ChainID.ZKSYNC_GOERLI) { - this.contract = { - sourceAddress: "0xe8d55759c32fb608fD092aB2C0ef8A1F52B254d4", - targetAddress: "0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829", - }; - } else { - this.contract = { - sourceAddress: "0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829", - targetAddress: "0xe8d55759c32fb608fD092aB2C0ef8A1F52B254d4", - }; - } - } else if (!isProduction()) { + } else if (this.sourceChain?.id === ChainID.ZKSYNC_GOERLI) { + // zkSync Goerli => * + this.contract = { + sourceAddress: "0xe8d55759c32fb608fD092aB2C0ef8A1F52B254d4", + targetAddress: "0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829", + }; + } else if (this.targetChain?.id === ChainID.ZKSYNC_GOERLI) { + // * => zkSync Goerli + this.contract = { + sourceAddress: "0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829", + targetAddress: "0xe8d55759c32fb608fD092aB2C0ef8A1F52B254d4", + }; + } else if (isProduction()) { + this.contract = { + sourceAddress: "0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337", + targetAddress: "0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337", + }; + } else { this.contract = { sourceAddress: "0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829", targetAddress: "0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829",