Skip to content

Commit

Permalink
Merge pull request #171 from helix-bridge/xiaoch05-support-moonbeam
Browse files Browse the repository at this point in the history
support moonbeam(xcUSDC & xcPINK)
  • Loading branch information
xiaoch05 authored May 20, 2024
2 parents 4799ec0 + ee4f5a8 commit 547e64a
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apollo/.env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ LN_SCROLL_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault
LN_DARWINIA_DEFAULT_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lndefault/darwinia
LN_DARWINIA_OPPOSITE_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lnopposite/darwinia
LN_CRAB_DEFAULT_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lndefault/crab
LN_BSC_DEFAULT_ENDPOINT=https://api.thegraph.com/subgraphs/name/helix-bridge/lndefault-bsc
LN_BSC_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-bsc/v0.0.1
LN_BASE_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-base/v1.0.0
LN_OP_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-optimism/v2.0.0
LN_LINEA_DEFAULT_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lndefault/linea
Expand All @@ -37,6 +37,7 @@ SCROLL_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-scroll/v1.
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
MOONBEAM_LNV3_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnv3-moonbeam/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
Expand Down
52 changes: 52 additions & 0 deletions apollo/src/lnv3/transfer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export class TransferService extends BaseTransferServiceT2 {
private readonly taikoEndpoint = this.configService.get<string>('TAIKO_LNV3_ENDPOINT');
private readonly astarZkEVMEndpoint = this.configService.get<string>('ASTAR_ZKEVM_LNV3_ENDPOINT');
private readonly morphEndpoint = this.configService.get<string>('MORPH_LNV3_ENDPOINT');
private readonly moonbeamEndpoint = this.configService.get<string>('MOONBEAM_LNV3_ENDPOINT');

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

Expand Down Expand Up @@ -472,6 +473,22 @@ export class TransferService extends BaseTransferServiceT2 {
protocolFee: 30000000000000000000,
decimals: 18,
},
{
key: 'PINK',
symbol: 'ahPINK',
address: '0x0000000000000000000000000000000000000404',
outerAddress: '0x0000000000000000000000000000000000000404',
protocolFee: 10000000,
decimals: 10,
},
{
key: 'USDT',
symbol: 'ahUSDT',
address: '0x0000000000000000000000000000000000000403',
outerAddress: '0x0000000000000000000000000000000000000403',
protocolFee: 1000,
decimals: 6,
},
],
channels: [
{
Expand All @@ -482,6 +499,10 @@ export class TransferService extends BaseTransferServiceT2 {
chain: 'polygon',
channel: 'msgline',
},
{
chain: 'moonbeam',
channel: 'msgline',
},
],
},
{
Expand Down Expand Up @@ -530,6 +551,37 @@ export class TransferService extends BaseTransferServiceT2 {
},
],
},
{
chainId: 1284,
chain: 'moonbeam',
url: this.moonbeamEndpoint,
level0Indexer: Level0Indexer.thegraph,
bridge: 'lnv3',
symbols: [
{
key: 'PINK',
symbol: 'xcPINK',
address: '0xffffffff30478fafbe935e466da114e14fb3563d',
outerAddress: '0xffffffff30478fafbe935e466da114e14fb3563d',
protocolFee: 10000000,
decimals: 10,
},
{
key: 'USDT',
symbol: 'xcUSDT',
address: '0xFFFFFFfFea09FB06d082fd1275CD48b191cbCD1d',
outerAddress: '0xFFFFFFfFea09FB06d082fd1275CD48b191cbCD1d',
protocolFee: 1000,
decimals: 6,
},
],
channels: [
{
chain: 'darwinia-dvm',
channel: 'msgline',
},
],
},
];

testChainTransfers: PartnerT2[] = [
Expand Down
1 change: 1 addition & 0 deletions subgraph/lnv3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"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",
"build-moonbeam": "sh generate.sh moonbeam 0xbA5D580B18b6436411562981e02c8A9aA1776D10 6154143 && 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}",
Expand Down

0 comments on commit 547e64a

Please sign in to comment.