Skip to content

Commit 6ace529

Browse files
committed
kill nodle and add min balances in destionation for asset hub tokens
1 parent 5bd5d44 commit 6ace529

File tree

7 files changed

+34
-106
lines changed

7 files changed

+34
-106
lines changed

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"neuro",
5353
"neuroweb",
5454
"nodl",
55-
"nodle",
5655
"npmjs",
5756
"onfinality",
5857
"parachain",

packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,24 +195,25 @@ export function polkadotXcm() {
195195
new ExtrinsicConfig({
196196
module: pallet,
197197
func,
198-
getArgs: (extrinsicFunction) =>
199-
getPolkadotXcmExtrinsicArgs({
198+
getArgs: (extrinsicFunction) => {
199+
const version = getExtrinsicArgumentVersion(extrinsicFunction);
200+
201+
return getPolkadotXcmExtrinsicArgs({
200202
...params,
201203
func: extrinsicFunction,
202204
asset: [
203205
{
204-
id: {
205-
Concrete: {
206-
parents: 1,
207-
interior: 'Here',
208-
},
209-
},
206+
id: normalizeConcrete(version, {
207+
parents: 1,
208+
interior: 'Here',
209+
}),
210210
fun: {
211211
Fungible: params.asset.amount,
212212
},
213213
},
214214
],
215-
}),
215+
});
216+
},
216217
}),
217218
}),
218219
};

packages/builder/src/extrinsic/pallets/xcmPallet/xcmPallet.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import {
44
type Parents,
55
XcmVersion,
66
} from '../../ExtrinsicBuilder.interfaces';
7-
import { getExtrinsicAccount } from '../../ExtrinsicBuilder.utils';
7+
import {
8+
getExtrinsicAccount,
9+
getExtrinsicArgumentVersion,
10+
normalizeConcrete,
11+
} from '../../ExtrinsicBuilder.utils';
812
import { getPolkadotXcmExtrinsicArgs } from '../polkadotXcm/polkadotXcm.util';
913

1014
const pallet = 'xcmPallet';
@@ -20,25 +24,25 @@ export function xcmPallet() {
2024
new ExtrinsicConfig({
2125
module: pallet,
2226
func,
23-
getArgs: (extrinsicFunction) =>
24-
getPolkadotXcmExtrinsicArgs({
27+
getArgs: (extrinsicFunction) => {
28+
const version = getExtrinsicArgumentVersion(extrinsicFunction);
29+
return getPolkadotXcmExtrinsicArgs({
2530
...params,
2631
parents,
2732
func: extrinsicFunction,
2833
asset: [
2934
{
30-
id: {
31-
Concrete: {
32-
parents: 0,
33-
interior: 'Here',
34-
},
35-
},
35+
id: normalizeConcrete(version, {
36+
parents: 0,
37+
interior: 'Here',
38+
}),
3639
fun: {
3740
Fungible: params.asset.amount,
3841
},
3942
},
4043
],
41-
}),
44+
});
45+
},
4246
}),
4347
}),
4448
};

packages/config/src/chains.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,29 +1539,6 @@ export const neuroweb = new Parachain({
15391539
],
15401540
});
15411541

1542-
export const nodle = new Parachain({
1543-
assets: [
1544-
ChainAsset.fromAsset(nodl, {
1545-
decimals: 11,
1546-
ids: {
1547-
id: 'NodleNative',
1548-
},
1549-
}),
1550-
],
1551-
ecosystem: Ecosystem.Polkadot,
1552-
genesisHash:
1553-
'0x97da7ede98d7bad4e36b4d734b6055425a3be036da2a332ea5a7037656427a21',
1554-
key: 'nodle',
1555-
name: 'Nodle',
1556-
nativeAsset: nodl,
1557-
parachainId: 2026,
1558-
ss58Format: 37,
1559-
ws: [
1560-
'wss://nodle-rpc.dwellir.com',
1561-
'wss://nodle-parachain.api.onfinality.io/public-ws',
1562-
],
1563-
});
1564-
15651542
export const originTrailAlphanet = new Parachain({
15661543
assets: [
15671544
ChainAsset.fromAsset(otp, {
@@ -2250,7 +2227,6 @@ export const chainsList: AnyChain[] = [
22502227
moonbeam,
22512228
moonriver,
22522229
neuroweb,
2253-
nodle,
22542230
originTrailAlphanet,
22552231
peaqChain,
22562232
peaqEvm,

packages/config/src/xcm-configs/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { moonbaseBetaRoutes } from './moonbaseBeta';
2727
import { moonbeamRoutes } from './moonbeam';
2828
import { moonriverRoutes } from './moonriver';
2929
import { neurowebRoutes } from './neuroweb';
30-
import { nodleRoutes } from './nodle';
3130
import { originTrailAlphanetRoutes } from './originTrailAlphanet';
3231
import { peaqRoutes } from './peaq';
3332
import { peaqAlphanetRoutes } from './peaqAlphanet';
@@ -74,7 +73,6 @@ export const xcmRoutesList: ChainRoutes[] = [
7473
moonbeamRoutes,
7574
moonriverRoutes,
7675
neurowebRoutes,
77-
nodleRoutes,
7876
originTrailAlphanetRoutes,
7977
peaqRoutes,
8078
peaqEvmRoutes,

packages/config/src/xcm-configs/moonbeam.ts

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { BalanceBuilder, ContractBuilder } from '@moonbeam-network/xcm-builder';
1+
import {
2+
AssetMinBuilder,
3+
BalanceBuilder,
4+
ContractBuilder,
5+
} from '@moonbeam-network/xcm-builder';
26
import {
37
aca,
48
apillon,
@@ -52,7 +56,6 @@ import {
5256
mantaParachain,
5357
moonbeam,
5458
neuroweb,
55-
nodle,
5659
peaqChain,
5760
peaqEvm,
5861
pendulum,
@@ -491,29 +494,6 @@ export const moonbeamRoutes = new ChainRoutes({
491494
},
492495
contract: ContractBuilder().Xtokens().transfer(),
493496
},
494-
{
495-
source: {
496-
asset: nodl,
497-
balance: BalanceBuilder().substrate().assets().account(),
498-
fee: {
499-
asset: glmr,
500-
balance: BalanceBuilder().substrate().system().account(),
501-
},
502-
destinationFee: {
503-
balance: BalanceBuilder().substrate().assets().account(),
504-
},
505-
},
506-
destination: {
507-
asset: nodl,
508-
balance: BalanceBuilder().substrate().system().account(),
509-
chain: nodle,
510-
fee: {
511-
amount: 0.02,
512-
asset: nodl,
513-
},
514-
},
515-
contract: ContractBuilder().Xtokens().transfer(),
516-
},
517497
{
518498
source: {
519499
asset: neuro,
@@ -673,6 +653,7 @@ export const moonbeamRoutes = new ChainRoutes({
673653
asset: usdt,
674654
balance: BalanceBuilder().substrate().assets().account(), // TODO change when DOT pays for fees
675655
},
656+
min: AssetMinBuilder().assets().asset(),
676657
},
677658
contract: ContractBuilder().Xtokens().transferMultiCurrencies(),
678659
},
@@ -700,6 +681,7 @@ export const moonbeamRoutes = new ChainRoutes({
700681
// asset: dot,
701682
// balance: BalanceBuilder().substrate().system().account(),
702683
},
684+
min: AssetMinBuilder().assets().asset(),
703685
},
704686
contract: ContractBuilder().Xtokens().transferMultiCurrencies(),
705687
},
@@ -724,6 +706,7 @@ export const moonbeamRoutes = new ChainRoutes({
724706
asset: usdt,
725707
balance: BalanceBuilder().substrate().assets().account(), // TODO change when DOT pays for fees
726708
},
709+
min: AssetMinBuilder().assets().asset(),
727710
},
728711
contract: ContractBuilder().Xtokens().transferMultiCurrencies(),
729712
},
@@ -748,6 +731,7 @@ export const moonbeamRoutes = new ChainRoutes({
748731
asset: usdt,
749732
balance: BalanceBuilder().substrate().assets().account(), // TODO change when DOT pays for fees
750733
},
734+
min: AssetMinBuilder().assets().asset(),
751735
},
752736
contract: ContractBuilder().Xtokens().transferMultiCurrencies(),
753737
},
@@ -1431,6 +1415,7 @@ export const moonbeamRoutes = new ChainRoutes({
14311415
asset: usdt,
14321416
balance: BalanceBuilder().substrate().assets().account(), // TODO change when DOT pays for fees
14331417
},
1418+
min: AssetMinBuilder().assets().asset(),
14341419
},
14351420
contract: ContractBuilder().Xtokens().transferMultiCurrencies(),
14361421
},

packages/config/src/xcm-configs/nodle.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)