From ce8f34c55fc69ba90ab1d81a2d98af49b1b83b96 Mon Sep 17 00:00:00 2001 From: xiaoch05 Date: Wed, 3 Apr 2024 12:13:41 +0800 Subject: [PATCH] support astar zkevm mainnet --- apollo/.env.prod | 1 + apollo/src/lnv3/transfer.service.ts | 28 +++++++++++++++++++++++++++- subgraph/lnv3/package.json | 1 + 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/apollo/.env.prod b/apollo/.env.prod index 84849e86..82ebd01f 100644 --- a/apollo/.env.prod +++ b/apollo/.env.prod @@ -36,6 +36,7 @@ MANTLE_LNV3_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/l SCROLL_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-scroll/v1.0.0 DARWINIA_LNV3_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lnv3/darwinia BLAST_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-blast/v1.0.0 +ASTAR_ZKEVM_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-astar-zkevm/v1.0.0 XTOKEN_DARWINIA_CRAB_BACKING=https://thegraph.darwinia.network/helix/subgraphs/name/xtokentransfer/darwinia-crab-backing XTOKEN_DARWINIA_CRAB_ISSUING=https://thegraph.darwinia.network/helix/subgraphs/name/xtokentransfer/darwinia-crab-issuing diff --git a/apollo/src/lnv3/transfer.service.ts b/apollo/src/lnv3/transfer.service.ts index c44bd19b..9d20767f 100644 --- a/apollo/src/lnv3/transfer.service.ts +++ b/apollo/src/lnv3/transfer.service.ts @@ -19,6 +19,7 @@ export class TransferService extends BaseTransferServiceT2 { private readonly blastEndpoint = this.configService.get('BLAST_LNV3_ENDPOINT'); private readonly beraEndpoint = this.configService.get('BERA_LNV3_ENDPOINT'); private readonly taikoEndpoint = this.configService.get('TAIKO_LNV3_ENDPOINT'); + private readonly astarZkEVMEndpoint = this.configService.get('ASTAR_ZKEVM_LNV3_ENDPOINT'); formalChainTransfers: PartnerT2[] = [ { @@ -146,6 +147,10 @@ export class TransferService extends BaseTransferServiceT2 { { chain: 'blast', channel: 'layerzero', + }, + { + chain: 'astar-zkevm', + channel: 'layerzero', } ] }, @@ -480,8 +485,29 @@ export class TransferService extends BaseTransferServiceT2 { channel: 'layerzero', } ] + }, + { + chainId: 3776, + chain: 'astar-zkevm', + url: this.astarZkEVMEndpoint, + bridge: 'lnv3', + symbols: [ + { + key: 'ETH', + symbol: 'ETH', + address: '0x0000000000000000000000000000000000000000', + outerAddress: '0x0000000000000000000000000000000000000000', + protocolFee: 10000000000000, + decimals: 18, + } + ], + channels: [ + { + chain: 'arbitrum', + channel: 'layerzero', + } + ] } - ]; testChainTransfers: PartnerT2[] = [ diff --git a/subgraph/lnv3/package.json b/subgraph/lnv3/package.json index 95aaed05..d258f6c0 100644 --- a/subgraph/lnv3/package.json +++ b/subgraph/lnv3/package.json @@ -19,6 +19,7 @@ "build-scroll": "sh generate.sh scroll 0xbA5D580B18b6436411562981e02c8A9aA1776D10 2932126 && graph codegen && graph build", "build-darwinia": "sh generate.sh darwinia2 0xbA5D580B18b6436411562981e02c8A9aA1776D10 2013481 && graph codegen && graph build", "build-blast": "sh generate.sh blast-mainnet 0xB180D7DcB5CC161C862aD60442FA37527546cAFC 459939 && graph codegen && graph build", + "build-astar-zkevm": "sh generate.sh astar-zkevm-mainnet 0xD476650e03a45E70202b0bcAfa04E1513920f83a 1039985 && graph codegen && graph build", "create-remote-dev": "graph create --access-token ${KEY} --node https://thegraph-g2.darwinia.network/helix/deploy/ lnv3/${NETWORK}", "deploy-remote-dev": "graph deploy --access-token $KEY --node https://thegraph-g2.darwinia.network/helix/deploy/ --ipfs https://ipfs.network.thegraph.com lnv3/$NETWORK", "create-remote-pro": "graph create --access-token ${KEY} --node https://thegraph.darwinia.network/helix/deploy/ lnv3/${NETWORK}",