Skip to content

Commit 220878d

Browse files
authored
Added DAI for HydraDX - Moonbeam (#120)
1 parent 72e86c0 commit 220878d

File tree

4 files changed

+40
-36
lines changed

4 files changed

+40
-36
lines changed

.changeset/slow-clouds-bathe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@moonbeam-network/xcm-config': patch
3+
---
4+
5+
Added DAI for HydraDX - Moonbeam

packages/config/src/chains.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -741,11 +741,11 @@ export const moonbeam = new EvmParachain({
741741
asset: cfg,
742742
id: '91372035960551235635465443179559840483',
743743
},
744-
// {
745-
// asset: dai,
746-
// id: '0x06e605775296e851FF43b4dAa541Bb0984E9D6fD',
747-
// metadataId: 0, // no metadata for ERC20 tokens
748-
// },
744+
{
745+
asset: dai,
746+
id: '0x06e605775296e851FF43b4dAa541Bb0984E9D6fD',
747+
metadataId: 0, // no metadata for ERC20 tokens
748+
},
749749
{
750750
asset: dot,
751751
id: '42259045809535163221576417993425387648',

packages/config/src/configs/hydraDX.ts

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
ExtrinsicBuilder,
44
FeeBuilder,
55
} from '@moonbeam-network/xcm-builder';
6-
import { glmr, hdx, usdc, wbtc, weth } from '../assets';
6+
import { dai, glmr, hdx, usdc, wbtc, weth } from '../assets';
77
import { hydraDX, moonbeam } from '../chains';
88
import { AssetConfig } from '../types/AssetConfig';
99
import { ChainConfig } from '../types/ChainConfig';
@@ -30,21 +30,20 @@ export const hydraDxConfig = new ChainConfig({
3030
},
3131
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
3232
}),
33-
// TODO pending tests
34-
// new AssetConfig({
35-
// asset: dai,
36-
// balance: BalanceBuilder().substrate().tokens().accounts(),
37-
// destination: moonbeam,
38-
// destinationFee: {
39-
// amount: 0.04,
40-
// asset: glmr,
41-
// },
42-
// extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
43-
// fee: {
44-
// asset: hdx,
45-
// balance: BalanceBuilder().substrate().system().account(),
46-
// },
47-
// }),
33+
new AssetConfig({
34+
asset: dai,
35+
balance: BalanceBuilder().substrate().tokens().accounts(),
36+
destination: moonbeam,
37+
destinationFee: {
38+
amount: 0.04,
39+
asset: glmr,
40+
},
41+
extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
42+
fee: {
43+
asset: hdx,
44+
balance: BalanceBuilder().substrate().system().account(),
45+
},
46+
}),
4847
new AssetConfig({
4948
asset: usdc,
5049
balance: BalanceBuilder().substrate().tokens().accounts(),

packages/config/src/configs/moonbeam.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
astr,
66
bnc,
77
cfg,
8+
dai,
89
dot,
910
eq,
1011
eqd,
@@ -336,21 +337,20 @@ export const moonbeamConfig = new ChainConfig({
336337
balance: BalanceBuilder().substrate().system().account(),
337338
},
338339
}),
339-
// TODO pending tests
340-
// new AssetConfig({
341-
// asset: dai,
342-
// balance: BalanceBuilder().evm().erc20(),
343-
// contract: ContractBuilder().Xtokens().transfer(),
344-
// destination: hydraDX,
345-
// destinationFee: {
346-
// amount: 0.0002, // TODO
347-
// asset: glmr,
348-
// },
349-
// fee: {
350-
// asset: glmr,
351-
// balance: BalanceBuilder().substrate().system().account(),
352-
// },
353-
// }),
340+
new AssetConfig({
341+
asset: dai,
342+
balance: BalanceBuilder().evm().erc20(),
343+
contract: ContractBuilder().Xtokens().transfer(),
344+
destination: hydraDX,
345+
destinationFee: {
346+
amount: 0.004,
347+
asset: dai,
348+
},
349+
fee: {
350+
asset: glmr,
351+
balance: BalanceBuilder().substrate().system().account(),
352+
},
353+
}),
354354
new AssetConfig({
355355
asset: usdc,
356356
balance: BalanceBuilder().evm().erc20(),

0 commit comments

Comments
 (0)