Skip to content

Commit

Permalink
support base & avalanche lnv3
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed Jul 26, 2024
1 parent 003c451 commit 3acf18e
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apollo/.env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ LN_LINEA_DEFAULT_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/n

POLYGON_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-polygon/v1.0.0
ARBITRUM_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-arbitrum/v2.0.0
ARBITRUM_LNV3_ENVIO_ENDPOINT=https://indexer.bigdevenergy.link/e5a45aa/v1/graphql
BSC_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-bsc/v1.0.0
LINEA_LNV3_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lnv3/linea
OP_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-op/v1.0.0
Expand All @@ -39,6 +38,7 @@ DARWINIA_LNV3_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name
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
MOONBEAM_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-moonbeam/v1.0.0
LNV3_ENVIO_ENDPOINT=https://indexer.bigdevenergy.link/e5a45aa/v1/graphql

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
Expand Down
60 changes: 56 additions & 4 deletions apollo/src/lnv3/transfer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import { AddressTokenMap } from '../base/AddressToken';
export class TransferService extends BaseTransferServiceT2 {
private readonly ethereumEndpoint = this.configService.get<string>('ETHEREUM_LNV3_ENDPOINT');
private readonly arbitrumEndpoint = this.configService.get<string>('ARBITRUM_LNV3_ENDPOINT');
private readonly arbitrumEnvioEndpoint = this.configService.get<string>(
'ARBITRUM_LNV3_ENVIO_ENDPOINT'
);
private readonly zksyncEndpoint = this.configService.get<string>('ZKSYNC_LNV3_ENDPOINT');
private readonly polygonEndpoint = this.configService.get<string>('POLYGON_LNV3_ENDPOINT');
private readonly bscEndpoint = this.configService.get<string>('BSC_LNV3_ENDPOINT');
Expand All @@ -29,6 +26,7 @@ export class TransferService extends BaseTransferServiceT2 {
private readonly moonbeamEndpoint = this.configService.get<string>('MOONBEAM_LNV3_ENDPOINT');

public readonly ponderEndpoint = this.configService.get<string>('PONDER_LNV3_ENDPOINT');
private readonly dnvioEndpoint = this.configService.get<string>('LNV3_ENVIO_ENDPOINT');

formalChainTransfers: PartnerT2[] = [
{
Expand All @@ -37,6 +35,10 @@ export class TransferService extends BaseTransferServiceT2 {
indexerType: Level0IndexerType.thegraph,
url: this.polygonEndpoint,
},
{
indexerType: Level0IndexerType.envio,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.polygon,
},
Expand All @@ -48,7 +50,7 @@ export class TransferService extends BaseTransferServiceT2 {
},
{
indexerType: Level0IndexerType.envio,
url: this.arbitrumEnvioEndpoint,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.arbitrum,
Expand All @@ -59,6 +61,10 @@ export class TransferService extends BaseTransferServiceT2 {
indexerType: Level0IndexerType.thegraph,
url: this.bscEndpoint,
},
{
indexerType: Level0IndexerType.envio,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.bsc,
},
Expand All @@ -68,6 +74,10 @@ export class TransferService extends BaseTransferServiceT2 {
indexerType: Level0IndexerType.thegraph,
url: this.lineaEndpoint,
},
{
indexerType: Level0IndexerType.envio,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.linea,
},
Expand All @@ -77,6 +87,10 @@ export class TransferService extends BaseTransferServiceT2 {
indexerType: Level0IndexerType.thegraph,
url: this.opEndpoint,
},
{
indexerType: Level0IndexerType.envio,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.op,
},
Expand All @@ -86,6 +100,10 @@ export class TransferService extends BaseTransferServiceT2 {
indexerType: Level0IndexerType.thegraph,
url: this.gnosisEndpoint,
},
{
indexerType: Level0IndexerType.envio,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.gnosis,
},
Expand All @@ -95,6 +113,10 @@ export class TransferService extends BaseTransferServiceT2 {
indexerType: Level0IndexerType.thegraph,
url: this.mantleEndpoint,
},
{
indexerType: Level0IndexerType.envio,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.mantle,
},
Expand All @@ -104,6 +126,10 @@ export class TransferService extends BaseTransferServiceT2 {
indexerType: Level0IndexerType.thegraph,
url: this.scrollEndpoint,
},
{
indexerType: Level0IndexerType.envio,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.scroll,
},
Expand All @@ -113,6 +139,10 @@ export class TransferService extends BaseTransferServiceT2 {
indexerType: Level0IndexerType.thegraph,
url: this.darwiniaEndpoint,
},
{
indexerType: Level0IndexerType.envio,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.darwiniaDvm,
},
Expand Down Expand Up @@ -140,9 +170,31 @@ export class TransferService extends BaseTransferServiceT2 {
indexerType: Level0IndexerType.thegraph,
url: this.moonbeamEndpoint,
},
{
indexerType: Level0IndexerType.envio,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.moonbeam,
},
{
level0Indexers: [
{
indexerType: Level0IndexerType.envio,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.avalanche,
},
{
level0Indexers: [
{
indexerType: Level0IndexerType.envio,
url: this.dnvioEndpoint,
},
],
chainConfig: HelixChain.base,
},
];

testChainTransfers: PartnerT2[] = [
Expand Down

0 comments on commit 3acf18e

Please sign in to comment.