Skip to content

Commit

Permalink
support darwinia<>tron mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed Aug 30, 2024
1 parent 45506be commit 93a5de9
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/xtoken-indexer/apollo/.env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ XTOKEN_CRAB=https://thegraph.darwinia.network/helix/subgraphs/name/xtokentransfe
XTOKEN_DISPATCH_DARWINIA=https://thegraph.darwinia.network/helix/subgraphs/name/xtokendispatch/darwinia
XTOKEN_DISPATCH_CRAB=https://thegraph.darwinia.network/helix/subgraphs/name/xtokendispatch/crab
XTOKEN_DISPATCH_ETHEREUM=https://api.studio.thegraph.com/query/59403/xtoken-dispatch-ethereum/v1.0.3
XTOKEN_SUPER_URL=http://g1.generic.darwinia.network:8801/graphql

CHAIN_TYPE=formal
68 changes: 67 additions & 1 deletion packages/xtoken-indexer/apollo/src/xtoken/transfer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,72 @@ export class TransferService extends BaseTransferServiceT2 {
},
],
},
{
chainId: 46,
chain: "darwinia-dvm",
urls: [
{
indexerType: Level0IndexerType.superindex,
url: this.superUrl,
},
],
dispatchUrls: [
{
indexerType: Level0IndexerType.superindex,
url: this.superUrl,
},
],
bridge: "xtoken-darwinia-tron",
symbols: [
{
key: "RING",
symbol: "RING",
address: "0xE7578598Aac020abFB918f33A20faD5B71d670b4",
outerAddress: "0x0000000000000000000000000000000000000000",
protocolFee: 0,
decimals: 18,
},
],
channels: [
{
chain: "tron",
channel: "msgport",
},
],
},
{
chainId: 728126428,
chain: "tron",
urls: [
{
indexerType: Level0IndexerType.superindex,
url: this.superUrl,
},
],
dispatchUrls: [
{
indexerType: Level0IndexerType.superindex,
url: this.superUrl,
},
],
bridge: "xtoken-darwinia-tron",
symbols: [
{
key: "RING",
symbol: "RING",
address: "0x8c92517a14889b1ef5cd27995a504f8e35a03531",
outerAddress: "0x6e0d26adf5323f5b82d5714354dc3c6870adee7c",
protocolFee: 0,
decimals: 18,
},
],
channels: [
{
chain: "darwinia-dvm",
channel: "msgport",
},
],
}
];

testChainTransfers: PartnerT2[] = [
Expand Down Expand Up @@ -297,7 +363,7 @@ export class TransferService extends BaseTransferServiceT2 {
{
key: "RING",
symbol: "RING",
address: "0xefa2f03fd5ae000f5064f3d80c2290d0eab8b685",
address: "0xefd51a1a0f28f627bd57e62ad61bd3db02b59a5d",
outerAddress: "0xefa2f03fd5ae000f5064f3d80c2290d0eab8b685",
protocolFee: 0,
decimals: 18,
Expand Down

0 comments on commit 93a5de9

Please sign in to comment.