Skip to content

Commit

Permalink
Change to LnBridge for transfering RING from Ethereum to Arbitrum (#543)
Browse files Browse the repository at this point in the history
* config lnbridge production contract

* change to lnbridge for transfering ring from ethereum to arbitrum

* create .env.test
  • Loading branch information
JayJay1024 authored Oct 23, 2023
1 parent 351d1da commit d9cc5fc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
2 changes: 2 additions & 0 deletions packages/apps/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NEXT_PUBLIC_GRAPHQL_ENDPOINT=https://apollo-test.helixbridge.app/graphql
NEXT_PUBLIC_APP_ENV=test
32 changes: 19 additions & 13 deletions packages/apps/src/bridges/lnbridge-default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/src/config/chains/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const ethereumChain: ChainConfig = {
address: "0x9469d013805bffb7d3debe5e7839237e535ec483",
logo: "ring.svg",
cross: [
{ target: { network: "arbitrum", symbol: "RING" }, bridge: { category: "l2arbitrumbridge-ethereum" } },
{ target: { network: "arbitrum", symbol: "RING" }, bridge: { category: "lnbridgev20-default" } },
{
target: { network: "darwinia-dvm", symbol: "RING" },
bridge: { category: "helix-sub2ethv2(unlock)" },
Expand Down

0 comments on commit d9cc5fc

Please sign in to comment.