From 75b7646218f313a5373b90785fd71a5aebc2f175 Mon Sep 17 00:00:00 2001 From: xiaoch05 Date: Fri, 12 Jan 2024 19:51:25 +0800 Subject: [PATCH] switch to sepolia testnet --- apollo/.env.test | 14 +- apollo/src/lnbridgev20/transfer.service.ts | 532 +++------------------ apollo/src/lnv3/lnv3.service.ts | 2 +- apollo/src/lnv3/transfer.service.ts | 48 ++ subgraph/ln-default-bridge/package.json | 11 +- subgraph/ln-default-bridge/yarn.lock | 8 +- subgraph/lnv3/package.json | 1 + 7 files changed, 117 insertions(+), 499 deletions(-) diff --git a/apollo/.env.test b/apollo/.env.test index eb2ec11a..d46129f2 100644 --- a/apollo/.env.test +++ b/apollo/.env.test @@ -14,16 +14,10 @@ SUB2ETH_INBOUND=https://thegraph.darwinia.network/ethv2/subgraphs/name/sub2ethin GOERLI_A2E_LN_ENDPOINT=http://localhost:8000/subgraphs/name/arbi2ethln/ethereum ARBITRUM_A2E_LN_ENDPOINT=http://localhost:8000/subgraphs/name/arbi2ethln/arbitrum -LN_ETHEREUM_DEFAULT_ENDPOINT = https://thegraph-g2.darwinia.network/helix/subgraphs/name/lndefault/goerli -LN_ETHEREUM_OPPOSITE_ENDPOINT = https://thegraph-g2.darwinia.network/helix/subgraphs/name/lnopposite/goerli -LN_LINEA_DEFAULT_ENDPOINT = https://thegraph-g2.darwinia.network/helix/subgraphs/name/lndefault/lineagoerli -LN_LINEA_OPPOSITE_ENDPOINT = https://thegraph-g2.darwinia.network/helix/subgraphs/name/lnopposite/lineagoerli -LN_MANTLE_DEFAULT_ENDPOINT = https://thegraph-g2.darwinia.network/helix/subgraphs/name/lndefault/mantlegoerli -LN_MANTLE_OPPOSITE_ENDPOINT = https://thegraph-g2.darwinia.network/helix/subgraphs/name/lnopposite/mantlegoerli -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 +LN_ETHEREUM_DEFAULT_ENDPOINT = https://api.studio.thegraph.com/query/61328/ln-default-sepolia/version/latest +LN_ARBITRUM_DEFAULT_ENDPOINT = https://api.studio.thegraph.com/query/61328/ln-default-arbisepolia/version/latest +LN_ZKSYNC_DEFAULT_ENDPOINT = https://api.studio.thegraph.com/query/61328/ln-default-zksepolia/version/latest ETHEREUM_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/61328/lnv3-sepolia/version/latest ARBITRUM_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/61328/lnv3-arbitrum-sepolia/version/latest +ZKSYNC_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/61328/lnv3-zksepolia/version/latest diff --git a/apollo/src/lnbridgev20/transfer.service.ts b/apollo/src/lnbridgev20/transfer.service.ts index b43b56cc..b678a9b6 100644 --- a/apollo/src/lnbridgev20/transfer.service.ts +++ b/apollo/src/lnbridgev20/transfer.service.ts @@ -607,49 +607,31 @@ export class TransferService extends BaseTransferServiceT3 { testChainTransfers: PartnerT3[] = [ { - chainId: 5, - chainName: 'goerli', + chainId: 11155111, + chainName: 'sepolia', defaultEndpoint: this.lnEthereumDefaultEndpoint, - oppositeEndpoint: this.lnEthereumOppositeEndpoint, + oppositeEndpoint: null, tokens: [ { fromSymbol: 'USDC', - fromAddress: '0xe9784E0d9A939dbe966b021DE3cd877284DB1B99', - decimals: 6, + fromAddress: '0x0ac58Df0cc3542beC4cDa71B16D06C3cCc39f405', + decimals: 18, remoteInfos: [ { - toChain: 421613, - toSymbol: 'USDC', - toAddress: '0xBAD026e314a77e727dF643B02f63adA573a3757c', - protocolFee: 100000000, - decimals: 18, - bridgeType: 'default', - channel: 'arbitrum-l2', - }, - { - toChain: 5001, + toChain: 421614, toSymbol: 'USDC', - toAddress: '0xD610DE267f7590D5bCCE89489ECd2C1A4AfdF76B', + toAddress: '0x8A87497488073307E1a17e8A12475a94Afcb413f', protocolFee: 100000000, decimals: 18, bridgeType: 'default', - channel: 'axelar', - }, - { - toChain: 59140, - toSymbol: 'USDC', - toAddress: '0xeC89AF5FF618bbF667755BE9d63C69F21F1c00C8', - protocolFee: 100000000, - decimals: 18, - bridgeType: 'default', - channel: 'linea-l2', + channel: 'layerzero', }, { - toChain: 280, + toChain: 300, toSymbol: 'USDC', - toAddress: '0xAe60e005C560E869a2bad271e38e3C9D78381aFF', + toAddress: '0x253adBFE99Fcd096B9b5502753F96CF78D42eaD0', protocolFee: 100000000, - decimals: 18, + decimals: 6, bridgeType: 'default', channel: 'layerzero', }, @@ -657,49 +639,22 @@ export class TransferService extends BaseTransferServiceT3 { }, { fromSymbol: 'USDT', - fromAddress: '0xa39cffE89567eBfb5c306a07dfb6e5B3ba41F358', - decimals: 6, + fromAddress: '0x876A4f6eCF13EEb101F9E75FCeF58f19Ff383eEB', + decimals: 18, remoteInfos: [ { - toChain: 421613, + toChain: 421614, toSymbol: 'USDT', - toAddress: '0x543bf1AC41485dc78039b9351563E4Dd13A288cb', - protocolFee: 100000000, - decimals: 18, - bridgeType: 'default', - channel: 'arbitrum-l2', - }, - { - toChain: 5001, - toSymbol: 'USDT', - toAddress: '0xDb06D904AC5Bdff3b8E6Ac96AFedd3381d94CFDD', - protocolFee: 100000000, - decimals: 18, - bridgeType: 'default', - channel: 'axelar', - }, - { - toChain: 59140, - toSymbol: 'USDT', - toAddress: '0x8f3663930211f3DE17619FEB2eeB44c9c3F44a06', - protocolFee: 100000000, - decimals: 18, - bridgeType: 'default', - channel: 'linea-l2', - }, - { - toChain: 280, - toSymbol: 'USDT', - toAddress: '0xb5372ed3bb2CbA63e7908066ac10ee94d30eA839', + toAddress: '0x3b8Bb7348D4F581e67E2498574F73e4B9Fc51855', protocolFee: 100000000, decimals: 18, bridgeType: 'default', channel: 'layerzero', }, { - toChain: 84531, + toChain: 300, toSymbol: 'USDT', - toAddress: '0x876A4f6eCF13EEb101F9E75FCeF58f19Ff383eEB', + toAddress: '0x3350f1ef046e21E052dCbA60Fc575919CCaFEdeb', protocolFee: 100000000, decimals: 18, bridgeType: 'default', @@ -707,47 +662,22 @@ export class TransferService extends BaseTransferServiceT3 { }, ], }, - { - fromSymbol: 'MNT', - fromAddress: '0xc1dc2d65a2243c22344e725677a3e3bebd26e604', - decimals: 18, - remoteInfos: [ - { - toChain: 5001, - toSymbol: 'MNT', - toAddress: '0x0000000000000000000000000000000000000000', - protocolFee: 1000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'axelar', - }, - ], - }, { fromSymbol: 'ETH', fromAddress: '0x0000000000000000000000000000000000000000', decimals: 18, remoteInfos: [ { - toChain: 421613, - toSymbol: 'ETH', - toAddress: '0x0000000000000000000000000000000000000000', - protocolFee: 1000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'arbitrum-l2', - }, - { - toChain: 59140, + toChain: 421614, toSymbol: 'ETH', toAddress: '0x0000000000000000000000000000000000000000', protocolFee: 1000000000000000, decimals: 18, bridgeType: 'default', - channel: 'linea-l2', + channel: 'layerzero', }, { - toChain: 280, + toChain: 300, toSymbol: 'ETH', toAddress: '0x0000000000000000000000000000000000000000', protocolFee: 1000000000000000, @@ -760,330 +690,56 @@ export class TransferService extends BaseTransferServiceT3 { ], }, { - chainId: 421613, - chainName: 'arbitrum-goerli', + chainId: 421614, + chainName: 'arbitrum-sepolia', defaultEndpoint: this.lnArbitrumDefaultEndpoint, - oppositeEndpoint: this.lnArbitrumOppositeEndpoint, + oppositeEndpoint: null, tokens: [ { fromSymbol: 'USDC', - fromAddress: '0xBAD026e314a77e727dF643B02f63adA573a3757c', + fromAddress: '0x8A87497488073307E1a17e8A12475a94Afcb413f', decimals: 18, remoteInfos: [ { - toChain: 5, - toSymbol: 'USDC', - toAddress: '0xe9784E0d9A939dbe966b021DE3cd877284DB1B99', - protocolFee: 100000000000000000000, - decimals: 6, - bridgeType: 'opposite', - channel: 'arbitrum-l2', - }, - { - toChain: 5001, + toChain: 11155111, toSymbol: 'USDC', - toAddress: '0xD610DE267f7590D5bCCE89489ECd2C1A4AfdF76B', + toAddress: '0x0ac58Df0cc3542beC4cDa71B16D06C3cCc39f405', protocolFee: 100000000000000000000, decimals: 18, bridgeType: 'default', channel: 'layerzero', }, { - toChain: 59140, + toChain: 300, toSymbol: 'USDC', - toAddress: '0xeC89AF5FF618bbF667755BE9d63C69F21F1c00C8', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 280, - toSymbol: 'USDC', - toAddress: '0xAe60e005C560E869a2bad271e38e3C9D78381aFF', - protocolFee: 100000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - ], - }, - { - fromSymbol: 'USDT', - fromAddress: '0x543bf1AC41485dc78039b9351563E4Dd13A288cb', - decimals: 18, - remoteInfos: [ - { - toChain: 5, - toSymbol: 'USDT', - toAddress: '0xa39cffE89567eBfb5c306a07dfb6e5B3ba41F358', - protocolFee: 100000000000000000000, - decimals: 6, - bridgeType: 'opposite', - channel: 'arbitrum-l2', - }, - { - toChain: 5001, - toSymbol: 'USDT', - toAddress: '0xDb06D904AC5Bdff3b8E6Ac96AFedd3381d94CFDD', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 59140, - toSymbol: 'USDT', - toAddress: '0x8f3663930211f3DE17619FEB2eeB44c9c3F44a06', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 280, - toSymbol: 'USDT', - toAddress: '0xb5372ed3bb2CbA63e7908066ac10ee94d30eA839', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - ], - }, - { - fromSymbol: 'ETH', - fromAddress: '0x0000000000000000000000000000000000000000', - decimals: 18, - remoteInfos: [ - { - toChain: 5, - toSymbol: 'ETH', - toAddress: '0x0000000000000000000000000000000000000000', - protocolFee: 1000000000000000, - decimals: 18, - bridgeType: 'opposite', - channel: 'arbitrum-l2', - }, - { - toChain: 280, - toSymbol: 'ETH', - toAddress: '0x0000000000000000000000000000000000000000', - protocolFee: 1000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 59140, - toSymbol: 'ETH', - toAddress: '0x0000000000000000000000000000000000000000', - protocolFee: 1000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - ], - }, - ], - }, - { - chainId: 5001, - chainName: 'mantle-goerli', - defaultEndpoint: this.lnMantleDefaultEndpoint, - oppositeEndpoint: this.lnMantleOppositeEndpoint, - tokens: [ - { - fromSymbol: 'USDC', - fromAddress: '0xD610DE267f7590D5bCCE89489ECd2C1A4AfdF76B', - decimals: 18, - remoteInfos: [ - { - toChain: 5, - toSymbol: 'USDC', - toAddress: '0xe9784E0d9A939dbe966b021DE3cd877284DB1B99', + toAddress: '0x253adBFE99Fcd096B9b5502753F96CF78D42eaD0', protocolFee: 100000000000000000000, decimals: 6, bridgeType: 'default', - channel: 'axelar', - }, - { - toChain: 280, - toSymbol: 'USDC', - toAddress: '0xAe60e005C560E869a2bad271e38e3C9D78381aFF', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 421613, - toSymbol: 'USDC', - toAddress: '0xBAD026e314a77e727dF643B02f63adA573a3757c', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 59140, - toSymbol: 'USDC', - toAddress: '0xeC89AF5FF618bbF667755BE9d63C69F21F1c00C8', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', channel: 'layerzero', }, ], }, { fromSymbol: 'USDT', - fromAddress: '0xDb06D904AC5Bdff3b8E6Ac96AFedd3381d94CFDD', + fromAddress: '0x3b8Bb7348D4F581e67E2498574F73e4B9Fc51855', decimals: 18, remoteInfos: [ { - toChain: 5, - toSymbol: 'USDT', - toAddress: '0xa39cffE89567eBfb5c306a07dfb6e5B3ba41F358', - protocolFee: 100000000000000000000, - decimals: 6, - bridgeType: 'default', - channel: 'axelar', - }, - { - toChain: 280, + toChain: 11155111, toSymbol: 'USDT', - toAddress: '0xb5372ed3bb2CbA63e7908066ac10ee94d30eA839', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 421613, - toSymbol: 'USDT', - toAddress: '0x543bf1AC41485dc78039b9351563E4Dd13A288cb', + toAddress: '0x876A4f6eCF13EEb101F9E75FCeF58f19Ff383eEB', protocolFee: 100000000000000000000, decimals: 18, bridgeType: 'default', channel: 'layerzero', }, { - toChain: 59140, + toChain: 300, toSymbol: 'USDT', - toAddress: '0x8f3663930211f3DE17619FEB2eeB44c9c3F44a06', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - ], - }, - { - fromSymbol: 'MNT', - fromAddress: '0x0000000000000000000000000000000000000000', - decimals: 18, - remoteInfos: [ - { - toChain: 5, - toSymbol: 'MNT', - toAddress: '0xc1dc2d65a2243c22344e725677a3e3bebd26e604', - protocolFee: 1000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'axelar', - }, - ], - }, - ], - }, - { - chainId: 59140, - chainName: 'linea-goerli', - defaultEndpoint: this.lnLineaDefaultEndpoint, - oppositeEndpoint: this.lnLineaOppositeEndpoint, - tokens: [ - { - fromSymbol: 'USDC', - fromAddress: '0xeC89AF5FF618bbF667755BE9d63C69F21F1c00C8', - decimals: 18, - remoteInfos: [ - { - toChain: 5, - toSymbol: 'USDC', - toAddress: '0xe9784E0d9A939dbe966b021DE3cd877284DB1B99', + toAddress: '0x3350f1ef046e21E052dCbA60Fc575919CCaFEdeb', protocolFee: 100000000000000000000, decimals: 6, - bridgeType: 'opposite', - channel: 'linea-l2', - }, - { - toChain: 280, - toSymbol: 'USDC', - toAddress: '0xAe60e005C560E869a2bad271e38e3C9D78381aFF', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 421613, - toSymbol: 'USDC', - toAddress: '0xBAD026e314a77e727dF643B02f63adA573a3757c', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 5001, - toSymbol: 'USDC', - toAddress: '0xD610DE267f7590D5bCCE89489ECd2C1A4AfdF76B', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - ], - }, - { - fromSymbol: 'USDT', - fromAddress: '0x8f3663930211f3DE17619FEB2eeB44c9c3F44a06', - decimals: 18, - remoteInfos: [ - { - toChain: 5, - toSymbol: 'USDT', - toAddress: '0xa39cffE89567eBfb5c306a07dfb6e5B3ba41F358', - protocolFee: 100000000000000000000, - decimals: 6, - bridgeType: 'opposite', - channel: 'linea-l2', - }, - { - toChain: 280, - toSymbol: 'USDT', - toAddress: '0xb5372ed3bb2CbA63e7908066ac10ee94d30eA839', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 421613, - toSymbol: 'USDT', - toAddress: '0x543bf1AC41485dc78039b9351563E4Dd13A288cb', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 5001, - toSymbol: 'USDT', - toAddress: '0xDb06D904AC5Bdff3b8E6Ac96AFedd3381d94CFDD', - protocolFee: 100000000000000000000, - decimals: 18, bridgeType: 'default', channel: 'layerzero', }, @@ -1095,16 +751,7 @@ export class TransferService extends BaseTransferServiceT3 { decimals: 18, remoteInfos: [ { - toChain: 5, - toSymbol: 'ETH', - toAddress: '0x0000000000000000000000000000000000000000', - protocolFee: 1000000000000000, - decimals: 18, - bridgeType: 'opposite', - channel: 'linea-l2', - }, - { - toChain: 280, + toChain: 11155111, toSymbol: 'ETH', toAddress: '0x0000000000000000000000000000000000000000', protocolFee: 1000000000000000, @@ -1113,7 +760,7 @@ export class TransferService extends BaseTransferServiceT3 { channel: 'layerzero', }, { - toChain: 421613, + toChain: 300, toSymbol: 'ETH', toAddress: '0x0000000000000000000000000000000000000000', protocolFee: 1000000000000000, @@ -1126,48 +773,30 @@ export class TransferService extends BaseTransferServiceT3 { ], }, { - chainId: 280, - chainName: 'zksync-goerli', + chainId: 300, + chainName: 'zksync-sepolia', defaultEndpoint: this.lnZkSyncDefaultEndpoint, oppositeEndpoint: null, tokens: [ { fromSymbol: 'USDC', - fromAddress: '0xAe60e005C560E869a2bad271e38e3C9D78381aFF', - decimals: 18, + fromAddress: '0x253adBFE99Fcd096B9b5502753F96CF78D42eaD0', + decimals: 6, remoteInfos: [ { - toChain: 5, - toSymbol: 'USDC', - toAddress: '0xe9784E0d9A939dbe966b021DE3cd877284DB1B99', - protocolFee: 100000000000000000000, - decimals: 6, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 59140, - toSymbol: 'USDC', - toAddress: '0xeC89AF5FF618bbF667755BE9d63C69F21F1c00C8', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 421613, + toChain: 11155111, toSymbol: 'USDC', - toAddress: '0xBAD026e314a77e727dF643B02f63adA573a3757c', - protocolFee: 100000000000000000000, + toAddress: '0x0ac58Df0cc3542beC4cDa71B16D06C3cCc39f405', + protocolFee: 100000000, decimals: 18, bridgeType: 'default', channel: 'layerzero', }, { - toChain: 5001, + toChain: 421614, toSymbol: 'USDC', - toAddress: '0xD610DE267f7590D5bCCE89489ECd2C1A4AfdF76B', - protocolFee: 100000000000000000000, + toAddress: '0x8A87497488073307E1a17e8A12475a94Afcb413f', + protocolFee: 100000000, decimals: 18, bridgeType: 'default', channel: 'layerzero', @@ -1176,41 +805,23 @@ export class TransferService extends BaseTransferServiceT3 { }, { fromSymbol: 'USDT', - fromAddress: '0xb5372ed3bb2CbA63e7908066ac10ee94d30eA839', - decimals: 18, + fromAddress: '0x3350f1ef046e21E052dCbA60Fc575919CCaFEdeb', + decimals: 6, remoteInfos: [ { - toChain: 5, - toSymbol: 'USDT', - toAddress: '0xa39cffE89567eBfb5c306a07dfb6e5B3ba41F358', - protocolFee: 100000000000000000000, - decimals: 6, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 59140, - toSymbol: 'USDT', - toAddress: '0x8f3663930211f3DE17619FEB2eeB44c9c3F44a06', - protocolFee: 100000000000000000000, - decimals: 18, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 421613, + toChain: 11155111, toSymbol: 'USDT', - toAddress: '0x543bf1AC41485dc78039b9351563E4Dd13A288cb', - protocolFee: 100000000000000000000, + toAddress: '0x876A4f6eCF13EEb101F9E75FCeF58f19Ff383eEB', + protocolFee: 100000000, decimals: 18, bridgeType: 'default', channel: 'layerzero', }, { - toChain: 5001, + toChain: 421614, toSymbol: 'USDT', - toAddress: '0xDb06D904AC5Bdff3b8E6Ac96AFedd3381d94CFDD', - protocolFee: 100000000000000000000, + toAddress: '0x3b8Bb7348D4F581e67E2498574F73e4B9Fc51855', + protocolFee: 100000000, decimals: 18, bridgeType: 'default', channel: 'layerzero', @@ -1223,16 +834,7 @@ export class TransferService extends BaseTransferServiceT3 { decimals: 18, remoteInfos: [ { - toChain: 5, - toSymbol: 'ETH', - toAddress: '0x0000000000000000000000000000000000000000', - protocolFee: 1000000000000000, - decimals: 6, - bridgeType: 'default', - channel: 'layerzero', - }, - { - toChain: 59140, + toChain: 11155111, toSymbol: 'ETH', toAddress: '0x0000000000000000000000000000000000000000', protocolFee: 1000000000000000, @@ -1241,7 +843,7 @@ export class TransferService extends BaseTransferServiceT3 { channel: 'layerzero', }, { - toChain: 421613, + toChain: 421614, toSymbol: 'ETH', toAddress: '0x0000000000000000000000000000000000000000', protocolFee: 1000000000000000, @@ -1253,30 +855,6 @@ export class TransferService extends BaseTransferServiceT3 { }, ], }, - { - chainId: 84531, - chainName: 'base-goerli', - defaultEndpoint: this.lnBaseDefaultEndpoint, - oppositeEndpoint: null, - tokens: [ - { - fromSymbol: 'USDT', - fromAddress: '0x876A4f6eCF13EEb101F9E75FCeF58f19Ff383eEB', - decimals: 18, - remoteInfos: [ - { - toChain: 5, - toSymbol: 'USDT', - toAddress: '0xa39cffE89567eBfb5c306a07dfb6e5B3ba41F358', - protocolFee: 100000000000000000000, - decimals: 6, - bridgeType: 'default', - channel: 'layerzero', - }, - ], - }, - ], - }, ]; readonly isTest = this.configService.get('CHAIN_TYPE') === 'test'; diff --git a/apollo/src/lnv3/lnv3.service.ts b/apollo/src/lnv3/lnv3.service.ts index f8c634e7..a5e880c0 100644 --- a/apollo/src/lnv3/lnv3.service.ts +++ b/apollo/src/lnv3/lnv3.service.ts @@ -130,7 +130,7 @@ export class Lnv3Service implements OnModuleInit { endTime: endTime, result: result, fee: record.fee, - feeToken: record.sourceToken, + feeToken: fromToken.symbol, responseTxHash: responseHash, reason: '', sendTokenAddress: record.sourceToken, diff --git a/apollo/src/lnv3/transfer.service.ts b/apollo/src/lnv3/transfer.service.ts index 916aab4b..4a5c7ca3 100644 --- a/apollo/src/lnv3/transfer.service.ts +++ b/apollo/src/lnv3/transfer.service.ts @@ -7,6 +7,7 @@ import { AddressTokenMap } from '../base/AddressToken'; export class TransferService extends BaseTransferServiceT2 { private readonly ethereumEndpoint = this.configService.get('ETHEREUM_LNV3_ENDPOINT'); private readonly arbitrumEndpoint = this.configService.get('ARBITRUM_LNV3_ENDPOINT'); + private readonly zksyncEndpoint = this.configService.get('ZKSYNC_LNV3_ENDPOINT'); formalChainTransfers: PartnerT2[] = []; @@ -44,6 +45,10 @@ export class TransferService extends BaseTransferServiceT2 { chain: 'arbitrum-sepolia', channel: 'layerzero', }, + { + chain: 'zksync-sepolia', + channel: 'layerzero', + }, ], }, { @@ -79,6 +84,49 @@ export class TransferService extends BaseTransferServiceT2 { chain: 'sepolia', channel: 'layerzero', }, + { + chain: 'zksync-sepolia', + channel: 'layerzero', + }, + ], + }, + { + chainId: 300, + chain: 'zksync-sepolia', + url: this.zksyncEndpoint, + bridge: 'lnv3', + symbols: [ + { + key: 'USDC', + symbol: 'USDC', + address: '0x253adBFE99Fcd096B9b5502753F96CF78D42eaD0', + protocolFee: 100000000, + decimals: 6, + }, + { + key: 'USDT', + symbol: 'USDT', + address: '0x3350f1ef046e21E052dCbA60Fc575919CCaFEdeb', + protocolFee: 100000000, + decimals: 6, + }, + { + key: 'ETH', + symbol: 'ETH', + address: '0x0000000000000000000000000000000000000000', + protocolFee: 1000000000000000, + decimals: 18, + }, + ], + channels: [ + { + chain: 'arbitrum-sepolia', + channel: 'layerzero', + }, + { + chain: 'zksync-sepolia', + channel: 'layerzero', + }, ], }, ]; diff --git a/subgraph/ln-default-bridge/package.json b/subgraph/ln-default-bridge/package.json index cd6ad69b..eb98dfae 100644 --- a/subgraph/ln-default-bridge/package.json +++ b/subgraph/ln-default-bridge/package.json @@ -4,12 +4,9 @@ "scripts": { "codegen": "graph codegen", "build": "graph build", - "build-goerli": "sh generate.sh goerli 0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829 9844814 && graph codegen && graph build", - "build-arbigoerli": "sh generate.sh arbitrum-goerli 0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829 46913401 && graph codegen && graph build", - "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-sepolia": "sh generate.sh sepolia 0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829 4607131 && graph codegen && graph build", + "build-arbisepolia": "sh generate.sh arbitrum-sepolia 0x7e101911E5FB461d78FBde3992f76F3Bf8BbA829 639445 && graph codegen && graph build", + "build-zksepolia": "sh generate.sh zksync-era-sepolia 0xbd8434d7d330329364590822ca2D2Fae630C1424 77153 && graph codegen && graph build", "build-ethereum": "sh generate.sh mainnet 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 18411160 && graph codegen && graph build", "build-arbitrum": "sh generate.sh arbitrum-one 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 143123443 && graph codegen && graph build", "build-mantle": "sh generate.sh mantle 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 17119189 && graph codegen && graph build", @@ -28,7 +25,7 @@ "deploy-remote-pro": "graph deploy --access-token $KEY --node https://thegraph.darwinia.network/helix/deploy/ --ipfs https://ipfs.network.thegraph.com lndefault/$NETWORK" }, "dependencies": { - "@graphprotocol/graph-cli": "0.31.1", + "@graphprotocol/graph-cli": "0.64.0", "@graphprotocol/graph-ts": "0.31.0" } } diff --git a/subgraph/ln-default-bridge/yarn.lock b/subgraph/ln-default-bridge/yarn.lock index 996ce7e4..79fc7134 100644 --- a/subgraph/ln-default-bridge/yarn.lock +++ b/subgraph/ln-default-bridge/yarn.lock @@ -217,10 +217,10 @@ graphql-import-node "^0.0.5" js-yaml "^4.1.0" -"@graphprotocol/graph-cli@0.31.1": - version "0.57.0" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.57.0.tgz#dca0327f83b6fc081416cca1cc9f9d005dc10d03" - integrity sha512-UQ+4a4qTeGYdIWHNINtwTiL7izuRe4smgSeGmTxQQMSeebehTgrpa6NV3brGWcYsmN1Bo5egM4D9stkQtRnxeA== +"@graphprotocol/graph-cli@0.64.0": + version "0.64.0" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.64.0.tgz#74ddcb243d84a9d1ffaef550922d7d9dda5de0c2" + integrity sha512-JvEL3FvXEhRhEaCAk310h13UothElQgNPt0InjoXJUG+yNexsdJ6Rr1FYCC517Q/b7pfcczT6usSyOgnTgR7FA== dependencies: "@float-capital/float-subgraph-uncrashable" "^0.0.0-alpha.4" "@oclif/core" "2.8.6" diff --git a/subgraph/lnv3/package.json b/subgraph/lnv3/package.json index f428b8b3..129c3560 100644 --- a/subgraph/lnv3/package.json +++ b/subgraph/lnv3/package.json @@ -6,6 +6,7 @@ "build": "graph build", "build-sepolia": "sh generate.sh sepolia 0x38627Cb033De66a1E07e73f5D0a7a7adFB6741fa 5060070 && graph codegen && graph build", "build-arbitrum-sepolia": "sh generate.sh arbitrum-sepolia 0x38627Cb033De66a1E07e73f5D0a7a7adFB6741fa 6126325 && graph codegen && graph build", + "build-zksync-sepolia": "sh generate.sh zksync-era-sepolia 0xDc55fF59F82AA50D8A4A61dB8CcaDffD26Fb7dD2 76772 && 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}",