Skip to content

Commit

Permalink
More fixes after integration (#385)
Browse files Browse the repository at this point in the history
* adjust USDT fees for asset hub coins and enable sovereing account fee balance checking

* more fixes discovered with integration

* kill nodle and add min balances in destionation for asset hub tokens

* add destination min balance builders and fix aseed configuration in moonriver

* update snapshot with config fixes
  • Loading branch information
mmaurello authored Nov 14, 2024
1 parent 9ea36ad commit 5c0fb5c
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 155 deletions.
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"neuro",
"neuroweb",
"nodl",
"nodle",
"npmjs",
"onfinality",
"parachain",
Expand Down
2 changes: 1 addition & 1 deletion packages/builder/src/contract/contracts/Xtokens/Xtokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function Xtokens() {
fee.address
? formatAssetIdToERC20(fee.address)
: fee.getAssetId(),
fee,
fee.amount,
],
],
1, // index of the fee asset
Expand Down
19 changes: 10 additions & 9 deletions packages/builder/src/extrinsic/pallets/polkadotXcm/polkadotXcm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,24 +195,25 @@ export function polkadotXcm() {
new ExtrinsicConfig({
module: pallet,
func,
getArgs: (extrinsicFunction) =>
getPolkadotXcmExtrinsicArgs({
getArgs: (extrinsicFunction) => {
const version = getExtrinsicArgumentVersion(extrinsicFunction);

return getPolkadotXcmExtrinsicArgs({
...params,
func: extrinsicFunction,
asset: [
{
id: {
Concrete: {
parents: 1,
interior: 'Here',
},
},
id: normalizeConcrete(version, {
parents: 1,
interior: 'Here',
}),
fun: {
Fungible: params.asset.amount,
},
},
],
}),
});
},
}),
}),
};
Expand Down
24 changes: 14 additions & 10 deletions packages/builder/src/extrinsic/pallets/xcmPallet/xcmPallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import {
type Parents,
XcmVersion,
} from '../../ExtrinsicBuilder.interfaces';
import { getExtrinsicAccount } from '../../ExtrinsicBuilder.utils';
import {
getExtrinsicAccount,
getExtrinsicArgumentVersion,
normalizeConcrete,
} from '../../ExtrinsicBuilder.utils';
import { getPolkadotXcmExtrinsicArgs } from '../polkadotXcm/polkadotXcm.util';

const pallet = 'xcmPallet';
Expand All @@ -20,25 +24,25 @@ export function xcmPallet() {
new ExtrinsicConfig({
module: pallet,
func,
getArgs: (extrinsicFunction) =>
getPolkadotXcmExtrinsicArgs({
getArgs: (extrinsicFunction) => {
const version = getExtrinsicArgumentVersion(extrinsicFunction);
return getPolkadotXcmExtrinsicArgs({
...params,
parents,
func: extrinsicFunction,
asset: [
{
id: {
Concrete: {
parents: 0,
interior: 'Here',
},
},
id: normalizeConcrete(version, {
parents: 0,
interior: 'Here',
}),
fun: {
Fungible: params.asset.amount,
},
},
],
}),
});
},
}),
}),
};
Expand Down
26 changes: 1 addition & 25 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ export const moonbeam = new EvmParachain({
}),
ChainAsset.fromAsset(wifd, {
address: '0xffffffff2e1d1ac9ea1686255befe995b31abc96',
decimals: 18,
decimals: 10,
ids: {
id: '61295607754960722617854661686514597014',
},
Expand Down Expand Up @@ -1539,29 +1539,6 @@ export const neuroweb = new Parachain({
],
});

export const nodle = new Parachain({
assets: [
ChainAsset.fromAsset(nodl, {
decimals: 11,
ids: {
id: 'NodleNative',
},
}),
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
'0x97da7ede98d7bad4e36b4d734b6055425a3be036da2a332ea5a7037656427a21',
key: 'nodle',
name: 'Nodle',
nativeAsset: nodl,
parachainId: 2026,
ss58Format: 37,
ws: [
'wss://nodle-rpc.dwellir.com',
'wss://nodle-parachain.api.onfinality.io/public-ws',
],
});

export const originTrailAlphanet = new Parachain({
assets: [
ChainAsset.fromAsset(otp, {
Expand Down Expand Up @@ -2250,7 +2227,6 @@ export const chainsList: AnyChain[] = [
moonbeam,
moonriver,
neuroweb,
nodle,
originTrailAlphanet,
peaqChain,
peaqEvm,
Expand Down
2 changes: 0 additions & 2 deletions packages/config/src/xcm-configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { moonbaseBetaRoutes } from './moonbaseBeta';
import { moonbeamRoutes } from './moonbeam';
import { moonriverRoutes } from './moonriver';
import { neurowebRoutes } from './neuroweb';
import { nodleRoutes } from './nodle';
import { originTrailAlphanetRoutes } from './originTrailAlphanet';
import { peaqRoutes } from './peaq';
import { peaqAlphanetRoutes } from './peaqAlphanet';
Expand Down Expand Up @@ -74,7 +73,6 @@ export const xcmRoutesList: ChainRoutes[] = [
moonbeamRoutes,
moonriverRoutes,
neurowebRoutes,
nodleRoutes,
originTrailAlphanetRoutes,
peaqRoutes,
peaqEvmRoutes,
Expand Down
11 changes: 10 additions & 1 deletion packages/config/src/xcm-configs/moonbaseAlpha.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { BalanceBuilder, ContractBuilder } from '@moonbeam-network/xcm-builder';
import {
AssetMinBuilder,
BalanceBuilder,
ContractBuilder,
} from '@moonbeam-network/xcm-builder';
import {
agng,
alan,
Expand Down Expand Up @@ -243,6 +247,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({
amount: 5,
asset: tt1,
},
min: AssetMinBuilder().assets().asset(),
},
contract: ContractBuilder().Xtokens().transfer(),
},
Expand Down Expand Up @@ -419,6 +424,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({
amount: 0.00000001,
asset: dev,
},
min: AssetMinBuilder().assets().asset(),
},
contract: ContractBuilder().Xtokens().transfer(),
},
Expand All @@ -442,6 +448,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({
amount: 0.01,
asset: ftmwh,
},
min: AssetMinBuilder().assets().asset(),
},
contract: ContractBuilder().Xtokens().transfer(),
},
Expand Down Expand Up @@ -484,6 +491,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({
amount: 0.00000001,
asset: dev,
},
min: AssetMinBuilder().assets().asset(),
},
contract: ContractBuilder().Xtokens().transferWithEvmTo32(),
},
Expand All @@ -507,6 +515,7 @@ export const moonbaseAlphaRoutes = new ChainRoutes({
amount: 0.01,
asset: ftmwh,
},
min: AssetMinBuilder().assets().asset(),
},
contract: ContractBuilder().Xtokens().transferWithEvmTo32(),
},
Expand Down
Loading

0 comments on commit 5c0fb5c

Please sign in to comment.