Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #24

Merged
merged 2 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/xcm-cfg/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,12 @@ export const moonbeam = new EvmParachain({
metadataId: 0,
decimals: 6,
},
{
asset: usdc,
id: '166377000701797186346254371275954761085',
metadataId: 0,
decimals: 6,
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down
21 changes: 1 addition & 20 deletions packages/xcm-cfg/src/configs/assethub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,6 @@ const toHydraDX: AssetConfig[] = [
},
min: AssetMinBuilder().assets().asset(),
}),
new AssetConfig({
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
destination: hydraDX,
destinationFee: {
amount: 0.02,
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder()
.polkadotXcm()
.limitedReserveTransferAssets()
.X1(),
fee: {
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assets().asset(),
}),
];

const toPolkadot: AssetConfig[] = [
Expand All @@ -79,7 +60,7 @@ const toPolkadot: AssetConfig[] = [
balance: BalanceBuilder().substrate().system().account(),
destination: polkadot,
destinationFee: {
amount: 0.02,
amount: 0.003,
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
},
Expand Down
12 changes: 6 additions & 6 deletions packages/xcm-cfg/src/configs/astar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const toHydraDX: AssetConfig[] = [
balance: BalanceBuilder().substrate().assets().account(),
destination: hydraDX,
destinationFee: {
amount: 0.6,
asset: hdx,
balance: BalanceBuilder().substrate().tokens().accounts(),
amount: 0.044306118,
asset: astr,
balance: BalanceBuilder().substrate().system().account(),
},
fee: {
asset: astr,
Expand All @@ -40,9 +40,9 @@ const toHydraDX: AssetConfig[] = [
balance: BalanceBuilder().substrate().assets().account(),
destination: hydraDX,
destinationFee: {
amount: 0.6,
asset: hdx,
balance: BalanceBuilder().substrate().tokens().accounts(),
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: astr,
Expand Down
4 changes: 2 additions & 2 deletions packages/xcm-cfg/src/configs/bifrost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ const toHydraDX: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: hydraDX,
destinationFee: {
amount: 0.0013,
asset: hdx,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transfer(),
Expand Down
56 changes: 28 additions & 28 deletions packages/xcm-cfg/src/configs/hydraDX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,6 @@ const toAssetHub: AssetConfig[] = [
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: assetHub,
destinationFee: {
amount: 0.02,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transfer(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
},
}),
];

const toAstar: AssetConfig[] = [
Expand Down Expand Up @@ -173,7 +158,7 @@ const toAstar: AssetConfig[] = [
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
extrinsic: ExtrinsicBuilderV2().xTokens().transfer(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
Expand All @@ -184,8 +169,8 @@ const toAstar: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: astar,
destinationFee: {
amount: 0.004,
asset: astr,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transferMultiasset(1000).X3(),
Expand Down Expand Up @@ -247,7 +232,7 @@ const toBifrost: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: bifrost,
destinationFee: {
amount: 0.7,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
Expand Down Expand Up @@ -313,11 +298,11 @@ const toInterlay: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: interlay,
destinationFee: {
amount: 0.0019213457,
asset: intr,
amount: 0.002,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
extrinsic: ExtrinsicBuilderV2().xTokens().transfer(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
Expand All @@ -328,8 +313,8 @@ const toInterlay: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: interlay,
destinationFee: {
amount: 0.0019213457,
asset: intr,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transferMultiasset(1000).X3(),
Expand Down Expand Up @@ -433,11 +418,11 @@ const toMoonbeam: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.001,
amount: 0.003,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
extrinsic: ExtrinsicBuilderV2().xTokens().transfer(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
Expand All @@ -463,8 +448,23 @@ const toMoonbeam: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.04,
asset: glmr,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transferMultiasset(1000).X3(),
fee: {
asset: hdx,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: usdc,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 1.4,
asset: usdc,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilderV2().xTokens().transferMultiasset(1000).X3(),
Expand Down
8 changes: 4 additions & 4 deletions packages/xcm-cfg/src/configs/interlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const toHydraDX: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: hydraDX,
destinationFee: {
amount: 0.6,
asset: hdx,
amount: 0.002,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
Expand All @@ -54,8 +54,8 @@ const toHydraDX: AssetConfig[] = [
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: hydraDX,
destinationFee: {
amount: 0.6,
asset: hdx,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
Expand Down
24 changes: 20 additions & 4 deletions packages/xcm-cfg/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
wbtc_mwh,
weth_mwh,
dot,
usdt
usdt,
usdc
} from '../assets';
import { hydraDX, moonbeam } from '../chains';

Expand Down Expand Up @@ -122,7 +123,7 @@ const toHydraDX: AssetConfig[] = [
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destinationFee: {
amount: 0.02,
amount: 0.002,
asset: dot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
Expand All @@ -137,8 +138,23 @@ const toHydraDX: AssetConfig[] = [
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destinationFee: {
amount: 0.6,
asset: hdx,
amount: 1.4,
asset: usdt,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: usdc,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: hydraDX,
destinationFee: {
amount: 1.4,
asset: usdc,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
fee: {
Expand Down
2 changes: 1 addition & 1 deletion packages/xcm-cfg/src/configs/polkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const toAssetHub: AssetConfig[] = [
balance: BalanceBuilder().substrate().system().account(),
destination: assetHub,
destinationFee: {
amount: 0.001,
amount: 0.00014,
asset: dot,
balance: BalanceBuilder().substrate().system().account(),
},
Expand Down
Loading