From 24c51ecc3aec5e9020709abca4ec9ff9e10c7100 Mon Sep 17 00:00:00 2001 From: xiaoch05 Date: Sat, 11 Nov 2023 15:49:10 +0800 Subject: [PATCH] add base testnet --- apollo/.env.test | 2 +- apollo/src/lnbridgev20/transfer.service.ts | 21 +++++++++++++++++++++ subgraph/ln-default-bridge/package.json | 4 +++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/apollo/.env.test b/apollo/.env.test index 282bcfc8..0bdda9e8 100644 --- a/apollo/.env.test +++ b/apollo/.env.test @@ -23,4 +23,4 @@ LN_MANTLE_OPPOSITE_ENDPOINT = https://thegraph-g2.darwinia.network/helix/subgrap LN_ARBITRUM_DEFAULT_ENDPOINT = https://thegraph-g2.darwinia.network/helix/subgraphs/name/lndefault/arbigoerli LN_ARBITRUM_OPPOSITE_ENDPOINT = https://thegraph-g2.darwinia.network/helix/subgraphs/name/lnopposite/arbigoerli LN_ZKSYNC_DEFAULT_ENDPOINT = https://thegraph-g2.darwinia.network/helix/subgraphs/name/lndefault/zkgoerli - +LN_BASE_DEFAULT_ENDPOINT = https://thegraph-g2.darwinia.network/helix/subgraphs/name/lndefault/basegoerli diff --git a/apollo/src/lnbridgev20/transfer.service.ts b/apollo/src/lnbridgev20/transfer.service.ts index a768bd04..b8bddc0c 100644 --- a/apollo/src/lnbridgev20/transfer.service.ts +++ b/apollo/src/lnbridgev20/transfer.service.ts @@ -38,6 +38,9 @@ export class TransferService extends BaseTransferServiceT2 { private readonly lnScrollDefaultEndpoint = this.configService.get( 'LN_SCROLL_DEFAULT_ENDPOINT' ); + private readonly lnBaseDefaultEndpoint = this.configService.get( + 'LN_BASE_DEFAULT_ENDPOINT' + ); formalChainTransfers: PartnerT2[] = [ { @@ -407,6 +410,20 @@ export class TransferService extends BaseTransferServiceT2 { }, ], }, + { + chainId: 84531, + chain: 'base-goerli', + url: this.lnBaseDefaultEndpoint, + bridge: 'default', + symbols: [ + { + symbol: 'USDT', + address: '0x876A4f6eCF13EEb101F9E75FCeF58f19Ff383eEB', + protocolFee: 10000000000000000000, + decimals: 18, + }, + ], + }, ]; addressToTokenInfo: { [key: string]: AddressTokenMap } = {}; @@ -418,6 +435,10 @@ export class TransferService extends BaseTransferServiceT2 { 'linea-goerli': 'linea-l2', 'mantle-goerli': 'axelar', 'zksync-goerli': 'layerzero', + 'base-goerli': 'layerzero', + }, + 'base-goerli': { + goerli: 'layerzero', }, 'arbitrum-goerli': { goerli: 'arbitrum-l2', diff --git a/subgraph/ln-default-bridge/package.json b/subgraph/ln-default-bridge/package.json index faf3a365..451a52a5 100644 --- a/subgraph/ln-default-bridge/package.json +++ b/subgraph/ln-default-bridge/package.json @@ -9,11 +9,13 @@ "build-lineagoerli": "sh generate.sh lineagoerli 0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829 1698146 && graph codegen && graph build", "build-mantlegoerli": "sh generate.sh mantlegoerli 0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829 23364372 && graph codegen && graph build", "build-zkgoerli": "sh generate.sh zkgoerli 0xe8d55759c32fb608fD092aB2C0ef8A1F52B254d4 12529843 && graph codegen && graph build", + "build-basegoerli": "sh generate.sh basegoerli 0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829 12244330 && graph codegen && graph build", "build-ethereum": "sh generate.sh ethereum 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 18411160 && graph codegen && graph build", "build-arbitrum": "sh generate.sh arbi 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 143123443 && graph codegen && graph build", "build-mantle": "sh generate.sh mantle 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 17119189 && graph codegen && graph build", - "build-polygon": "sh generate.sh polygon 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 49361963 && graph codegen && graph build", + "build-polygon": "sh generate.sh polygon 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 49443762 && graph codegen && graph build", "build-zksync": "sh generate.sh zksync 0x767Bc046c989f5e63683fB530f939DD34b91ceAC 17763103 && graph codegen && graph build", + "build-scroll": "sh generate.sh scroll 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 660609 && graph codegen && graph build", "create-remote-dev": "graph create --access-token ${KEY} --node https://thegraph-g2.darwinia.network/helix/deploy/ lndefault/${NETWORK}", "deploy-remote-dev": "graph deploy --access-token $KEY --node https://thegraph-g2.darwinia.network/helix/deploy/ --ipfs http://g2.generic.darwinia.network:5001/ lndefault/$NETWORK", "create-remote-pro": "graph create --access-token ${KEY} --node https://thegraph.darwinia.network/helix/deploy/ lndefault/${NETWORK}",