Skip to content

Commit

Permalink
add more chains
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed Feb 1, 2024
1 parent 1a2801c commit 666697a
Show file tree
Hide file tree
Showing 3 changed files with 253 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apollo/.env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@ POLYGON_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-polygon/v
ARBITRUM_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-arbitrum/v1.0.0
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
GNOSIS_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-gnosis/v1.0.0
MANTLE_LNV3_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lnv3/mantle
SCROLL_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-scroll/v1.0.0

CHAIN_TYPE=formal
2 changes: 1 addition & 1 deletion apollo/src/aggregation/aggregation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export class AggregationService extends PrismaClient implements OnModuleInit {
const targetSymbol = lnv3TargetBridge.symbols.find(
(item) => item.address.toLowerCase() === targetToken.toLowerCase()
);
return targetSymbol === undefined;
return targetSymbol !== undefined;
}
}

Expand Down
248 changes: 248 additions & 0 deletions apollo/src/lnv3/transfer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export class TransferService extends BaseTransferServiceT2 {
private readonly polygonEndpoint = this.configService.get<string>('POLYGON_LNV3_ENDPOINT');
private readonly bscEndpoint = this.configService.get<string>('BSC_LNV3_ENDPOINT');
private readonly lineaEndpoint = this.configService.get<string>('LINEA_LNV3_ENDPOINT');
private readonly opEndpoint = this.configService.get<string>('OP_LNV3_ENDPOINT');
private readonly gnosisEndpoint = this.configService.get<string>('GNOSIS_LNV3_ENDPOINT');
private readonly mantleEndpoint = this.configService.get<string>('MANTLE_LNV3_ENDPOINT');
private readonly scrollEndpoint = this.configService.get<string>('SCROLL_LNV3_ENDPOINT');

formalChainTransfers: PartnerT2[] = [
{
Expand Down Expand Up @@ -46,6 +50,22 @@ export class TransferService extends BaseTransferServiceT2 {
{
chain: 'linea',
channel: 'layerzero',
},
{
chain: 'op',
channel: 'layerzero',
},
{
chain: 'gnosis',
channel: 'layerzero',
},
{
chain: 'mantle',
channel: 'layerzero',
},
{
chain: 'scroll',
channel: 'layerzero',
}
]
},
Expand Down Expand Up @@ -82,6 +102,22 @@ export class TransferService extends BaseTransferServiceT2 {
{
chain: 'linea',
channel: 'layerzero',
},
{
chain: 'op',
channel: 'layerzero',
},
{
chain: 'gnosis',
channel: 'layerzero',
},
{
chain: 'mantle',
channel: 'layerzero',
},
{
chain: 'scroll',
channel: 'layerzero',
}
]
},
Expand Down Expand Up @@ -111,6 +147,22 @@ export class TransferService extends BaseTransferServiceT2 {
{
chain: 'linea',
channel: 'layerzero',
},
{
chain: 'op',
channel: 'layerzero',
},
{
chain: 'gnosis',
channel: 'layerzero',
},
{
chain: 'mantle',
channel: 'layerzero',
},
{
chain: 'scroll',
channel: 'layerzero',
}
]
},
Expand Down Expand Up @@ -140,6 +192,202 @@ export class TransferService extends BaseTransferServiceT2 {
{
chain: 'arbitrum',
channel: 'layerzero',
},
{
chain: 'op',
channel: 'layerzero',
},
{
chain: 'gnosis',
channel: 'layerzero',
},
{
chain: 'mantle',
channel: 'layerzero',
},
{
chain: 'scroll',
channel: 'layerzero',
}
]
},
{
chainId: 10,
chain: 'op',
url: this.opEndpoint,
bridge: 'lnv3',
symbols: [
{
key: 'USDT',
symbol: 'USDT',
address: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58',
protocolFee: 100000,
decimals: 6,
}
],
channels: [
{
chain: 'polygon',
channel: 'layerzero',
},
{
chain: 'bsc',
channel: 'layerzero',
},
{
chain: 'arbitrum',
channel: 'layerzero',
},
{
chain: 'linea',
channel: 'layerzero',
},
{
chain: 'gnosis',
channel: 'layerzero',
},
{
chain: 'mantle',
channel: 'layerzero',
},
{
chain: 'scroll',
channel: 'layerzero',
}
]
},
{
chainId: 100,
chain: 'gnosis',
url: this.gnosisEndpoint,
bridge: 'lnv3',
symbols: [
{
key: 'USDT',
symbol: 'USDT',
address: '0x4ECaBa5870353805a9F068101A40E0f32ed605C6',
protocolFee: 100000,
decimals: 6,
}
],
channels: [
{
chain: 'polygon',
channel: 'layerzero',
},
{
chain: 'bsc',
channel: 'layerzero',
},
{
chain: 'arbitrum',
channel: 'layerzero',
},
{
chain: 'linea',
channel: 'layerzero',
},
{
chain: 'op',
channel: 'layerzero',
},
{
chain: 'mantle',
channel: 'layerzero',
},
{
chain: 'scroll',
channel: 'layerzero',
}
]
},
{
chainId: 5000,
chain: 'mantle',
url: this.mantleEndpoint,
bridge: 'lnv3',
symbols: [
{
key: 'USDT',
symbol: 'USDT',
address: '0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE',
protocolFee: 100000,
decimals: 6,
}
],
channels: [
{
chain: 'polygon',
channel: 'layerzero',
},
{
chain: 'bsc',
channel: 'layerzero',
},
{
chain: 'arbitrum',
channel: 'layerzero',
},
{
chain: 'linea',
channel: 'layerzero',
},
{
chain: 'op',
channel: 'layerzero',
},
{
chain: 'gnosis',
channel: 'layerzero',
},
{
chain: 'scroll',
channel: 'layerzero',
}
]
},
{
chainId: 534352,
chain: 'scroll',
url: this.scrollEndpoint,
bridge: 'lnv3',
symbols: [
{
key: 'USDT',
symbol: 'USDT',
address: '0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df',
protocolFee: 100000,
decimals: 6,
}
],
channels: [
{
chain: 'polygon',
channel: 'layerzero',
},
{
chain: 'bsc',
channel: 'layerzero',
},
{
chain: 'arbitrum',
channel: 'layerzero',
},
{
chain: 'linea',
channel: 'layerzero',
},
{
chain: 'op',
channel: 'layerzero',
},
{
chain: 'gnosis',
channel: 'layerzero',
},
{
chain: 'mantle',
channel: 'layerzero',
}
]
}
Expand Down

0 comments on commit 666697a

Please sign in to comment.