Skip to content

Commit

Permalink
Add DOT Hydra<->Bifrost
Browse files Browse the repository at this point in the history
  • Loading branch information
green-jay committed Jan 12, 2024
1 parent c630383 commit c395317
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/xcm-cfg/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ export const bifrost = new Parachain({
metadataId: { VToken2: 0 },
decimals: 10,
},
{
asset: dot,
id: { Token2: 0 },
metadataId: { Token2: 0 },
decimals: 10,
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down
17 changes: 16 additions & 1 deletion packages/xcm-cfg/src/configs/bifrost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from '@moonbeam-network/xcm-builder';
import { AssetConfig, ChainConfig } from '@moonbeam-network/xcm-config';

import { bnc, vdot } from '../assets';
import { bnc, vdot, dot } from '../assets';
import { bifrost, hydraDX } from '../chains';
import { ExtrinsicBuilderV2 } from '../builders';

Expand Down Expand Up @@ -35,6 +35,21 @@ const toHydraDX: AssetConfig[] = [
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: hydraDX,
destinationFee: {
amount: 0.0013,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transfer(),
fee: {
asset: bnc,
balance: BalanceBuilder().substrate().system().account(),
}
}),
];

export const bifrostConfig = new ChainConfig({
Expand Down
15 changes: 15 additions & 0 deletions packages/xcm-cfg/src/configs/hydraDX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,21 @@ const toBifrost: AssetConfig[] = [
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: bifrost,
destinationFee: {
amount: 0.001,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
},
}),
];

const toCentrifuge: AssetConfig[] = [
Expand Down

0 comments on commit c395317

Please sign in to comment.