@moonbeam-network/xcm-config 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -8
- package/build/index.d.ts +21 -21
- package/build/index.mjs +62 -135
- package/build/index.mjs.map +1 -1
- package/package.json +22 -16
- package/build/index.d.mts +0 -284
package/README.md
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
The Config package contains the chains and assets configuration for the Moonbeam XCM SDK and MRL SDK.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Documentation for the Moonbeam XCM SDK
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## v3 (current)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Usage
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- [XCM SDK](https://moonbeam-foundation.github.io/xcm-sdk/latest/example-usage/xcm)
|
|
10
|
+
- [MRL SDK](https://moonbeam-foundation.github.io/xcm-sdk/latest/example-usage/mrl)
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
### References
|
|
12
13
|
|
|
13
|
-
- [
|
|
14
|
-
- [
|
|
14
|
+
- [XCM SDK](https://moonbeam-foundation.github.io/xcm-sdk/latest/reference/xcm)
|
|
15
|
+
- [MRL SDK](https://moonbeam-foundation.github.io/xcm-sdk/latest/reference/mrl)
|
|
16
|
+
|
|
17
|
+
## v2 (previous)
|
|
18
|
+
|
|
19
|
+
- [usage](https://moonbeam-foundation.github.io/xcm-sdk/v2/example-usage)
|
|
20
|
+
- [references](https://moonbeam-foundation.github.io/xcm-sdk/v2/reference/interfaces)
|
package/build/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Asset, AnyChain, SetOptional, ChainAsset, AnyAsset, Ecosystem, Parachain, EvmParachain, EvmChain } from '@moonbeam-network/xcm-types';
|
|
2
|
-
import { ContractConfigBuilder, ExtrinsicConfigBuilder, BalanceConfigBuilder, AssetMinConfigBuilder,
|
|
2
|
+
import { ContractConfigBuilder, ExtrinsicConfigBuilder, BalanceConfigBuilder, AssetMinConfigBuilder, FeeConfigBuilder, MrlConfigBuilder } from '@moonbeam-network/xcm-builder';
|
|
3
3
|
|
|
4
4
|
interface AssetRouteConstructorParams {
|
|
5
5
|
source: SourceConfig;
|
|
6
6
|
destination: DestinationConfig;
|
|
7
7
|
contract?: ContractConfigBuilder;
|
|
8
8
|
extrinsic?: ExtrinsicConfigBuilder;
|
|
9
|
-
mrl?: MrlConfig;
|
|
10
9
|
}
|
|
11
10
|
interface SourceConfig {
|
|
12
11
|
asset: Asset;
|
|
@@ -27,29 +26,15 @@ interface FeeConfig {
|
|
|
27
26
|
balance: BalanceConfigBuilder;
|
|
28
27
|
extra?: number;
|
|
29
28
|
}
|
|
30
|
-
interface MrlConfig {
|
|
31
|
-
isAutomaticPossible: boolean;
|
|
32
|
-
transfer: MrlConfigBuilder;
|
|
33
|
-
moonChain: MoonChainConfig;
|
|
34
|
-
}
|
|
35
29
|
interface DestinationFeeConfig extends SetOptional<FeeConfig, 'balance'> {
|
|
36
30
|
amount: number | FeeConfigBuilder;
|
|
37
31
|
}
|
|
38
|
-
interface MoonChainConfig {
|
|
39
|
-
asset: Asset;
|
|
40
|
-
balance: BalanceConfigBuilder;
|
|
41
|
-
fee: MoonChainFeeConfig;
|
|
42
|
-
}
|
|
43
|
-
interface MoonChainFeeConfig extends FeeConfig {
|
|
44
|
-
amount: number | FeeConfigBuilder;
|
|
45
|
-
}
|
|
46
32
|
declare class AssetRoute {
|
|
47
33
|
readonly source: SourceConfig;
|
|
48
34
|
readonly destination: DestinationConfig;
|
|
49
35
|
readonly contract?: ContractConfigBuilder;
|
|
50
36
|
readonly extrinsic?: ExtrinsicConfigBuilder;
|
|
51
|
-
|
|
52
|
-
constructor({ source, destination, contract, extrinsic, mrl, }: AssetRouteConstructorParams);
|
|
37
|
+
constructor({ source, destination, contract, extrinsic, }: AssetRouteConstructorParams);
|
|
53
38
|
getDestinationFeeAssetOnSource(): ChainAsset;
|
|
54
39
|
}
|
|
55
40
|
|
|
@@ -61,8 +46,8 @@ interface RoutesParam extends Omit<AssetRouteConstructorParams, 'source'> {
|
|
|
61
46
|
source: Omit<SourceConfig, 'chain'>;
|
|
62
47
|
}
|
|
63
48
|
declare class ChainRoutes {
|
|
64
|
-
#private;
|
|
65
49
|
readonly chain: AnyChain;
|
|
50
|
+
protected routes: Map<string, AssetRoute>;
|
|
66
51
|
constructor({ chain, routes }: ChainRoutesConstructorParams);
|
|
67
52
|
getRoutes(): AssetRoute[];
|
|
68
53
|
getAssetRoutes(keyOrAsset: string | AnyAsset): AssetRoute[];
|
|
@@ -73,6 +58,12 @@ declare class ChainRoutes {
|
|
|
73
58
|
|
|
74
59
|
interface MrlAssetRouteConstructorParams extends AssetRouteConstructorParams {
|
|
75
60
|
source: MrlSourceConfig;
|
|
61
|
+
mrl: MrlConfig;
|
|
62
|
+
}
|
|
63
|
+
interface MrlConfig {
|
|
64
|
+
isAutomaticPossible: boolean;
|
|
65
|
+
transfer: MrlConfigBuilder;
|
|
66
|
+
moonChain: MoonChainConfig;
|
|
76
67
|
}
|
|
77
68
|
interface MrlSourceConfig extends SourceConfig {
|
|
78
69
|
moonChainFee?: {
|
|
@@ -80,7 +71,16 @@ interface MrlSourceConfig extends SourceConfig {
|
|
|
80
71
|
balance: BalanceConfigBuilder;
|
|
81
72
|
};
|
|
82
73
|
}
|
|
74
|
+
interface MoonChainConfig {
|
|
75
|
+
asset: Asset;
|
|
76
|
+
balance: BalanceConfigBuilder;
|
|
77
|
+
fee: MoonChainFeeConfig;
|
|
78
|
+
}
|
|
79
|
+
interface MoonChainFeeConfig extends FeeConfig {
|
|
80
|
+
amount: number | FeeConfigBuilder;
|
|
81
|
+
}
|
|
83
82
|
declare class MrlAssetRoute extends AssetRoute {
|
|
83
|
+
readonly mrl: MrlConfig;
|
|
84
84
|
readonly source: MrlSourceConfig;
|
|
85
85
|
constructor({ source, destination, contract, extrinsic, mrl, }: MrlAssetRouteConstructorParams & {
|
|
86
86
|
source: MrlSourceConfig;
|
|
@@ -94,9 +94,10 @@ interface MrlRoutesParam extends Omit<MrlAssetRouteConstructorParams, 'source'>
|
|
|
94
94
|
source: Omit<MrlSourceConfig, 'chain'>;
|
|
95
95
|
}
|
|
96
96
|
declare class MrlChainRoutes extends ChainRoutes {
|
|
97
|
-
|
|
97
|
+
protected routes: Map<string, MrlAssetRoute>;
|
|
98
98
|
constructor({ chain, routes }: MrlChainRoutesConstructorParams);
|
|
99
99
|
getRoutes(): MrlAssetRoute[];
|
|
100
|
+
getAssetRoute(asset: string | AnyAsset, destination: string | AnyChain): MrlAssetRoute;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
interface ConfigServiceOptions {
|
|
@@ -264,7 +265,6 @@ declare const polkadotAssetHub: Parachain;
|
|
|
264
265
|
declare const robonomics: Parachain;
|
|
265
266
|
declare const shiden: Parachain;
|
|
266
267
|
declare const subsocial: Parachain;
|
|
267
|
-
declare const tinkernet: Parachain;
|
|
268
268
|
declare const turing: Parachain;
|
|
269
269
|
declare const turingAlphanet: Parachain;
|
|
270
270
|
declare const uniqueAlpha: Parachain;
|
|
@@ -281,4 +281,4 @@ declare const mrlRoutesMap: Map<string, MrlChainRoutes>;
|
|
|
281
281
|
declare const xcmRoutesList: ChainRoutes[];
|
|
282
282
|
declare const xcmRoutesMap: Map<string, ChainRoutes>;
|
|
283
283
|
|
|
284
|
-
export { AssetRoute, type AssetRouteConstructorParams, ChainRoutes, type ChainRoutesConstructorParams, ConfigService, type ConfigServiceOptions, type DestinationConfig, type DestinationFeeConfig, type FeeConfig, type MoonChainConfig, type MoonChainFeeConfig, MrlAssetRoute, type MrlAssetRouteConstructorParams, MrlChainRoutes, type MrlChainRoutesConstructorParams, type MrlConfig, type MrlSourceConfig, type SourceConfig, aca, acala, agng, alan, alphanetAssetHub, alphanetRelay, ampe, apillon, aseed, assetsList, assetsMap, astar, astr, atom, auq, axlusdc, betaDEV, bifrostKusama, bifrostPolkadot, bnc, bncs, calamari, centrifuge, cfg, chainsList, chainsMap, crab, crustShadow, csm, dai, darwinia, darwiniaCrab, ded, dev, dot, eq, eqd, eth, ethereum, fantomTestnet, fil, ftm, ftmwh, getKey, getMoonChain, glmr, hdx, hydration, hydrationAlphanet, ibtc, integritee, interlay, intr, kar, karura, kbtc, khala, kint, kintsugi, kma, ksm, kusama, kusamaAssetHub, ldot, lit, mangataKusama, manta, mantaParachain, mgx, moonbaseAlpha, moonbaseBeta, moonbeam, moonriver, movr, mrlRoutesList, mrlRoutesMap, neuro, neuroweb, nodl, originTrailAlphanet, otp, para, paring, peaq, peaqAlphanet, peaqChain, peaqEvm, peaqEvmAlphanet, pen, pendulum, pendulumAlphanet, pha, phala, pica, picasso, picassoAlphanet, pink, polkadot, polkadotAssetHub, ring, rmrk, robonomics, sdn, shiden, soon, stink, sub, subsocial, teer,
|
|
284
|
+
export { AssetRoute, type AssetRouteConstructorParams, ChainRoutes, type ChainRoutesConstructorParams, ConfigService, type ConfigServiceOptions, type DestinationConfig, type DestinationFeeConfig, type FeeConfig, type MoonChainConfig, type MoonChainFeeConfig, MrlAssetRoute, type MrlAssetRouteConstructorParams, MrlChainRoutes, type MrlChainRoutesConstructorParams, type MrlConfig, type MrlSourceConfig, type SourceConfig, aca, acala, agng, alan, alphanetAssetHub, alphanetRelay, ampe, apillon, aseed, assetsList, assetsMap, astar, astr, atom, auq, axlusdc, betaDEV, bifrostKusama, bifrostPolkadot, bnc, bncs, calamari, centrifuge, cfg, chainsList, chainsMap, crab, crustShadow, csm, dai, darwinia, darwiniaCrab, ded, dev, dot, eq, eqd, eth, ethereum, fantomTestnet, fil, ftm, ftmwh, getKey, getMoonChain, glmr, hdx, hydration, hydrationAlphanet, ibtc, integritee, interlay, intr, kar, karura, kbtc, khala, kint, kintsugi, kma, ksm, kusama, kusamaAssetHub, ldot, lit, mangataKusama, manta, mantaParachain, mgx, moonbaseAlpha, moonbaseBeta, moonbeam, moonriver, movr, mrlRoutesList, mrlRoutesMap, neuro, neuroweb, nodl, originTrailAlphanet, otp, para, paring, peaq, peaqAlphanet, peaqChain, peaqEvm, peaqEvmAlphanet, pen, pendulum, pendulumAlphanet, pha, phala, pica, picasso, picassoAlphanet, pink, polkadot, polkadotAssetHub, ring, rmrk, robonomics, sdn, shiden, soon, stink, sub, subsocial, teer, tnkr, tt1, tur, turing, turingAlphanet, uniqueAlpha, unit, usdc, usdcwh, usdt, usdtwh, vastr, vbnc, vdot, vfil, vglmr, vksm, vmanta, vmovr, wbtc, wbtce, weth, wethe, wftm, wifd, wstethe, xcmRoutesList, xcmRoutesMap, xrt, zeitgeist, ztg };
|
package/build/index.mjs
CHANGED
|
@@ -2433,24 +2433,6 @@ var subsocial = new Parachain({
|
|
|
2433
2433
|
ss58Format: 28,
|
|
2434
2434
|
ws: ["wss://para.subsocial.network", "wss://subsocial-rpc.dwellir.com"]
|
|
2435
2435
|
});
|
|
2436
|
-
var tinkernet = new Parachain({
|
|
2437
|
-
assets: [
|
|
2438
|
-
ChainAsset.fromAsset(tnkr, {
|
|
2439
|
-
decimals: 12,
|
|
2440
|
-
ids: {
|
|
2441
|
-
id: 0
|
|
2442
|
-
}
|
|
2443
|
-
})
|
|
2444
|
-
],
|
|
2445
|
-
ecosystem: Ecosystem.Kusama,
|
|
2446
|
-
genesisHash: "0xd42e9606a995dfe433dc7955dc2a70f495f350f373daa200098ae84437816ad2",
|
|
2447
|
-
key: "tinkernet",
|
|
2448
|
-
name: "InvArch Tinkernet",
|
|
2449
|
-
nativeAsset: tnkr,
|
|
2450
|
-
parachainId: 2125,
|
|
2451
|
-
ss58Format: 117,
|
|
2452
|
-
ws: ["wss://tinkernet-rpc.dwellir.com"]
|
|
2453
|
-
});
|
|
2454
2436
|
var turing = new Parachain({
|
|
2455
2437
|
assets: [
|
|
2456
2438
|
ChainAsset.fromAsset(tur, {
|
|
@@ -2591,7 +2573,6 @@ var chainsList = [
|
|
|
2591
2573
|
robonomics,
|
|
2592
2574
|
shiden,
|
|
2593
2575
|
subsocial,
|
|
2594
|
-
tinkernet,
|
|
2595
2576
|
turing,
|
|
2596
2577
|
turingAlphanet,
|
|
2597
2578
|
uniqueAlpha,
|
|
@@ -2727,19 +2708,16 @@ var AssetRoute = class {
|
|
|
2727
2708
|
destination;
|
|
2728
2709
|
contract;
|
|
2729
2710
|
extrinsic;
|
|
2730
|
-
mrl;
|
|
2731
2711
|
constructor({
|
|
2732
2712
|
source,
|
|
2733
2713
|
destination,
|
|
2734
2714
|
contract,
|
|
2735
|
-
extrinsic
|
|
2736
|
-
mrl
|
|
2715
|
+
extrinsic
|
|
2737
2716
|
}) {
|
|
2738
2717
|
this.source = source;
|
|
2739
2718
|
this.destination = destination;
|
|
2740
2719
|
this.contract = contract;
|
|
2741
2720
|
this.extrinsic = extrinsic;
|
|
2742
|
-
this.mrl = mrl;
|
|
2743
2721
|
}
|
|
2744
2722
|
getDestinationFeeAssetOnSource() {
|
|
2745
2723
|
return this.source.chain.getChainAsset(
|
|
@@ -2751,24 +2729,23 @@ var AssetRoute = class {
|
|
|
2751
2729
|
// src/types/ChainRoutes.ts
|
|
2752
2730
|
var ChainRoutes = class {
|
|
2753
2731
|
chain;
|
|
2754
|
-
|
|
2732
|
+
routes;
|
|
2755
2733
|
constructor({ chain, routes }) {
|
|
2756
2734
|
this.chain = chain;
|
|
2757
|
-
this
|
|
2758
|
-
routes.map(({ source, destination, contract, extrinsic
|
|
2735
|
+
this.routes = new Map(
|
|
2736
|
+
routes.map(({ source, destination, contract, extrinsic }) => [
|
|
2759
2737
|
`${source.asset.key}-${destination.chain.key}`,
|
|
2760
2738
|
new AssetRoute({
|
|
2761
2739
|
source: { ...source, chain },
|
|
2762
2740
|
destination,
|
|
2763
2741
|
contract,
|
|
2764
|
-
extrinsic
|
|
2765
|
-
mrl
|
|
2742
|
+
extrinsic
|
|
2766
2743
|
})
|
|
2767
2744
|
])
|
|
2768
2745
|
);
|
|
2769
2746
|
}
|
|
2770
2747
|
getRoutes() {
|
|
2771
|
-
return Array.from(this
|
|
2748
|
+
return Array.from(this.routes.values());
|
|
2772
2749
|
}
|
|
2773
2750
|
getAssetRoutes(keyOrAsset) {
|
|
2774
2751
|
const key = getKey(keyOrAsset);
|
|
@@ -2786,7 +2763,7 @@ var ChainRoutes = class {
|
|
|
2786
2763
|
getAssetRoute(asset, destination) {
|
|
2787
2764
|
const assetKey = getKey(asset);
|
|
2788
2765
|
const destKey = getKey(destination);
|
|
2789
|
-
const route = this
|
|
2766
|
+
const route = this.routes.get(`${assetKey}-${destKey}`);
|
|
2790
2767
|
if (!route) {
|
|
2791
2768
|
throw new Error(
|
|
2792
2769
|
`AssetRoute for asset ${assetKey} and destination ${destKey} not found`
|
|
@@ -2798,6 +2775,7 @@ var ChainRoutes = class {
|
|
|
2798
2775
|
|
|
2799
2776
|
// src/types/MrlAssetRoute.ts
|
|
2800
2777
|
var MrlAssetRoute = class extends AssetRoute {
|
|
2778
|
+
mrl;
|
|
2801
2779
|
source;
|
|
2802
2780
|
constructor({
|
|
2803
2781
|
source,
|
|
@@ -2806,17 +2784,18 @@ var MrlAssetRoute = class extends AssetRoute {
|
|
|
2806
2784
|
extrinsic,
|
|
2807
2785
|
mrl
|
|
2808
2786
|
}) {
|
|
2809
|
-
super({ source, destination, contract, extrinsic
|
|
2787
|
+
super({ source, destination, contract, extrinsic });
|
|
2788
|
+
this.mrl = mrl;
|
|
2810
2789
|
this.source = source;
|
|
2811
2790
|
}
|
|
2812
2791
|
};
|
|
2813
2792
|
|
|
2814
2793
|
// src/types/MrlChainRoutes.ts
|
|
2815
2794
|
var MrlChainRoutes = class extends ChainRoutes {
|
|
2816
|
-
|
|
2795
|
+
routes;
|
|
2817
2796
|
constructor({ chain, routes }) {
|
|
2818
2797
|
super({ chain, routes });
|
|
2819
|
-
this
|
|
2798
|
+
this.routes = new Map(
|
|
2820
2799
|
routes.map(({ source, destination, contract, extrinsic, mrl }) => [
|
|
2821
2800
|
`${source.asset.key}-${destination.chain.key}`,
|
|
2822
2801
|
new MrlAssetRoute({
|
|
@@ -2830,7 +2809,11 @@ var MrlChainRoutes = class extends ChainRoutes {
|
|
|
2830
2809
|
);
|
|
2831
2810
|
}
|
|
2832
2811
|
getRoutes() {
|
|
2833
|
-
return Array.from(this
|
|
2812
|
+
return Array.from(this.routes.values());
|
|
2813
|
+
}
|
|
2814
|
+
getAssetRoute(asset, destination) {
|
|
2815
|
+
const route = super.getAssetRoute(asset, destination);
|
|
2816
|
+
return route;
|
|
2834
2817
|
}
|
|
2835
2818
|
};
|
|
2836
2819
|
|
|
@@ -8171,29 +8154,6 @@ var moonriverRoutes = new ChainRoutes({
|
|
|
8171
8154
|
},
|
|
8172
8155
|
contract: ContractBuilder3().Xtokens().transfer()
|
|
8173
8156
|
},
|
|
8174
|
-
{
|
|
8175
|
-
source: {
|
|
8176
|
-
asset: tnkr,
|
|
8177
|
-
balance: BalanceBuilder34().substrate().assets().account(),
|
|
8178
|
-
fee: {
|
|
8179
|
-
asset: movr,
|
|
8180
|
-
balance: BalanceBuilder34().substrate().system().account()
|
|
8181
|
-
},
|
|
8182
|
-
destinationFee: {
|
|
8183
|
-
balance: BalanceBuilder34().substrate().assets().account()
|
|
8184
|
-
}
|
|
8185
|
-
},
|
|
8186
|
-
destination: {
|
|
8187
|
-
asset: tnkr,
|
|
8188
|
-
chain: tinkernet,
|
|
8189
|
-
balance: BalanceBuilder34().substrate().system().account(),
|
|
8190
|
-
fee: {
|
|
8191
|
-
amount: 0.4,
|
|
8192
|
-
asset: tnkr
|
|
8193
|
-
}
|
|
8194
|
-
},
|
|
8195
|
-
contract: ContractBuilder3().Xtokens().transfer()
|
|
8196
|
-
},
|
|
8197
8157
|
{
|
|
8198
8158
|
source: {
|
|
8199
8159
|
asset: tur,
|
|
@@ -9614,96 +9574,65 @@ var subsocialRoutes = new ChainRoutes({
|
|
|
9614
9574
|
]
|
|
9615
9575
|
});
|
|
9616
9576
|
|
|
9617
|
-
// src/xcm-configs/
|
|
9577
|
+
// src/xcm-configs/turing.ts
|
|
9618
9578
|
import {
|
|
9619
9579
|
BalanceBuilder as BalanceBuilder51,
|
|
9620
9580
|
ExtrinsicBuilder as ExtrinsicBuilder38,
|
|
9621
9581
|
FeeBuilder as FeeBuilder40
|
|
9622
9582
|
} from "@moonbeam-network/xcm-builder";
|
|
9623
|
-
var tinkernetRoutes = new ChainRoutes({
|
|
9624
|
-
chain: tinkernet,
|
|
9625
|
-
routes: [
|
|
9626
|
-
{
|
|
9627
|
-
source: {
|
|
9628
|
-
asset: tnkr,
|
|
9629
|
-
balance: BalanceBuilder51().substrate().system().account(),
|
|
9630
|
-
destinationFee: {
|
|
9631
|
-
balance: BalanceBuilder51().substrate().system().account()
|
|
9632
|
-
}
|
|
9633
|
-
},
|
|
9634
|
-
destination: {
|
|
9635
|
-
asset: tnkr,
|
|
9636
|
-
chain: moonriver,
|
|
9637
|
-
balance: BalanceBuilder51().substrate().assets().account(),
|
|
9638
|
-
fee: {
|
|
9639
|
-
amount: FeeBuilder40().xcmPaymentApi().xcmPaymentFee({ isAssetReserveChain: false }),
|
|
9640
|
-
asset: tnkr
|
|
9641
|
-
}
|
|
9642
|
-
},
|
|
9643
|
-
extrinsic: ExtrinsicBuilder38().xTokens().transfer()
|
|
9644
|
-
}
|
|
9645
|
-
]
|
|
9646
|
-
});
|
|
9647
|
-
|
|
9648
|
-
// src/xcm-configs/turing.ts
|
|
9649
|
-
import {
|
|
9650
|
-
BalanceBuilder as BalanceBuilder52,
|
|
9651
|
-
ExtrinsicBuilder as ExtrinsicBuilder39,
|
|
9652
|
-
FeeBuilder as FeeBuilder41
|
|
9653
|
-
} from "@moonbeam-network/xcm-builder";
|
|
9654
9583
|
var turingRoutes = new ChainRoutes({
|
|
9655
9584
|
chain: turing,
|
|
9656
9585
|
routes: [
|
|
9657
9586
|
{
|
|
9658
9587
|
source: {
|
|
9659
9588
|
asset: tur,
|
|
9660
|
-
balance:
|
|
9589
|
+
balance: BalanceBuilder51().substrate().system().account(),
|
|
9661
9590
|
destinationFee: {
|
|
9662
|
-
balance:
|
|
9591
|
+
balance: BalanceBuilder51().substrate().system().account()
|
|
9663
9592
|
}
|
|
9664
9593
|
},
|
|
9665
9594
|
destination: {
|
|
9666
9595
|
asset: tur,
|
|
9667
9596
|
chain: moonriver,
|
|
9668
|
-
balance:
|
|
9597
|
+
balance: BalanceBuilder51().substrate().assets().account(),
|
|
9669
9598
|
fee: {
|
|
9670
|
-
amount:
|
|
9599
|
+
amount: FeeBuilder40().xcmPaymentApi().xcmPaymentFee({ isAssetReserveChain: false }),
|
|
9671
9600
|
asset: tur
|
|
9672
9601
|
}
|
|
9673
9602
|
},
|
|
9674
|
-
extrinsic:
|
|
9603
|
+
extrinsic: ExtrinsicBuilder38().xTokens().transferMultiAsset(turing.parachainId).X1()
|
|
9675
9604
|
},
|
|
9676
9605
|
{
|
|
9677
9606
|
source: {
|
|
9678
9607
|
asset: movr,
|
|
9679
|
-
balance:
|
|
9608
|
+
balance: BalanceBuilder51().substrate().tokens().accounts(),
|
|
9680
9609
|
fee: {
|
|
9681
9610
|
asset: tur,
|
|
9682
|
-
balance:
|
|
9611
|
+
balance: BalanceBuilder51().substrate().system().account()
|
|
9683
9612
|
},
|
|
9684
9613
|
destinationFee: {
|
|
9685
|
-
balance:
|
|
9614
|
+
balance: BalanceBuilder51().substrate().tokens().accounts()
|
|
9686
9615
|
}
|
|
9687
9616
|
},
|
|
9688
9617
|
destination: {
|
|
9689
9618
|
asset: movr,
|
|
9690
9619
|
chain: moonriver,
|
|
9691
|
-
balance:
|
|
9620
|
+
balance: BalanceBuilder51().substrate().system().account(),
|
|
9692
9621
|
fee: {
|
|
9693
|
-
amount:
|
|
9622
|
+
amount: FeeBuilder40().xcmPaymentApi().xcmPaymentFee({ isAssetReserveChain: true }),
|
|
9694
9623
|
asset: movr
|
|
9695
9624
|
}
|
|
9696
9625
|
},
|
|
9697
|
-
extrinsic:
|
|
9626
|
+
extrinsic: ExtrinsicBuilder38().xTokens().transfer()
|
|
9698
9627
|
}
|
|
9699
9628
|
]
|
|
9700
9629
|
});
|
|
9701
9630
|
|
|
9702
9631
|
// src/xcm-configs/turingAlphanet.ts
|
|
9703
9632
|
import {
|
|
9704
|
-
BalanceBuilder as
|
|
9705
|
-
ExtrinsicBuilder as
|
|
9706
|
-
FeeBuilder as
|
|
9633
|
+
BalanceBuilder as BalanceBuilder52,
|
|
9634
|
+
ExtrinsicBuilder as ExtrinsicBuilder39,
|
|
9635
|
+
FeeBuilder as FeeBuilder41
|
|
9707
9636
|
} from "@moonbeam-network/xcm-builder";
|
|
9708
9637
|
var turingAlphanetRoutes = new ChainRoutes({
|
|
9709
9638
|
chain: turingAlphanet,
|
|
@@ -9711,53 +9640,53 @@ var turingAlphanetRoutes = new ChainRoutes({
|
|
|
9711
9640
|
{
|
|
9712
9641
|
source: {
|
|
9713
9642
|
asset: tur,
|
|
9714
|
-
balance:
|
|
9643
|
+
balance: BalanceBuilder52().substrate().system().account(),
|
|
9715
9644
|
destinationFee: {
|
|
9716
|
-
balance:
|
|
9645
|
+
balance: BalanceBuilder52().substrate().system().account()
|
|
9717
9646
|
}
|
|
9718
9647
|
},
|
|
9719
9648
|
destination: {
|
|
9720
9649
|
asset: tur,
|
|
9721
9650
|
chain: moonbaseAlpha,
|
|
9722
|
-
balance:
|
|
9651
|
+
balance: BalanceBuilder52().substrate().assets().account(),
|
|
9723
9652
|
fee: {
|
|
9724
|
-
amount:
|
|
9653
|
+
amount: FeeBuilder41().xcmPaymentApi().xcmPaymentFee({ isAssetReserveChain: false }),
|
|
9725
9654
|
asset: tur
|
|
9726
9655
|
}
|
|
9727
9656
|
},
|
|
9728
|
-
extrinsic:
|
|
9657
|
+
extrinsic: ExtrinsicBuilder39().xTokens().transferMultiAsset(turingAlphanet.parachainId).X1()
|
|
9729
9658
|
},
|
|
9730
9659
|
{
|
|
9731
9660
|
source: {
|
|
9732
9661
|
asset: dev,
|
|
9733
|
-
balance:
|
|
9662
|
+
balance: BalanceBuilder52().substrate().tokens().accounts(),
|
|
9734
9663
|
fee: {
|
|
9735
9664
|
asset: tur,
|
|
9736
|
-
balance:
|
|
9665
|
+
balance: BalanceBuilder52().substrate().system().account()
|
|
9737
9666
|
},
|
|
9738
9667
|
destinationFee: {
|
|
9739
|
-
balance:
|
|
9668
|
+
balance: BalanceBuilder52().substrate().tokens().accounts()
|
|
9740
9669
|
}
|
|
9741
9670
|
},
|
|
9742
9671
|
destination: {
|
|
9743
9672
|
asset: dev,
|
|
9744
9673
|
chain: moonbaseAlpha,
|
|
9745
|
-
balance:
|
|
9674
|
+
balance: BalanceBuilder52().substrate().system().account(),
|
|
9746
9675
|
fee: {
|
|
9747
|
-
amount:
|
|
9676
|
+
amount: FeeBuilder41().xcmPaymentApi().xcmPaymentFee({ isAssetReserveChain: true }),
|
|
9748
9677
|
asset: dev
|
|
9749
9678
|
}
|
|
9750
9679
|
},
|
|
9751
|
-
extrinsic:
|
|
9680
|
+
extrinsic: ExtrinsicBuilder39().xTokens().transfer()
|
|
9752
9681
|
}
|
|
9753
9682
|
]
|
|
9754
9683
|
});
|
|
9755
9684
|
|
|
9756
9685
|
// src/xcm-configs/zeitgeist.ts
|
|
9757
9686
|
import {
|
|
9758
|
-
BalanceBuilder as
|
|
9759
|
-
ExtrinsicBuilder as
|
|
9760
|
-
FeeBuilder as
|
|
9687
|
+
BalanceBuilder as BalanceBuilder53,
|
|
9688
|
+
ExtrinsicBuilder as ExtrinsicBuilder40,
|
|
9689
|
+
FeeBuilder as FeeBuilder42
|
|
9761
9690
|
} from "@moonbeam-network/xcm-builder";
|
|
9762
9691
|
var zeitgeistRoutes = new ChainRoutes({
|
|
9763
9692
|
chain: zeitgeist,
|
|
@@ -9765,63 +9694,63 @@ var zeitgeistRoutes = new ChainRoutes({
|
|
|
9765
9694
|
{
|
|
9766
9695
|
source: {
|
|
9767
9696
|
asset: ztg,
|
|
9768
|
-
balance:
|
|
9697
|
+
balance: BalanceBuilder53().substrate().system().account(),
|
|
9769
9698
|
destinationFee: {
|
|
9770
|
-
balance:
|
|
9699
|
+
balance: BalanceBuilder53().substrate().system().account()
|
|
9771
9700
|
}
|
|
9772
9701
|
},
|
|
9773
9702
|
destination: {
|
|
9774
9703
|
asset: ztg,
|
|
9775
9704
|
chain: moonbeam,
|
|
9776
|
-
balance:
|
|
9705
|
+
balance: BalanceBuilder53().substrate().assets().account(),
|
|
9777
9706
|
fee: {
|
|
9778
|
-
amount:
|
|
9707
|
+
amount: FeeBuilder42().xcmPaymentApi().xcmPaymentFee({ isAssetReserveChain: false }),
|
|
9779
9708
|
asset: ztg
|
|
9780
9709
|
}
|
|
9781
9710
|
},
|
|
9782
|
-
extrinsic:
|
|
9711
|
+
extrinsic: ExtrinsicBuilder40().xTokens().transfer()
|
|
9783
9712
|
},
|
|
9784
9713
|
{
|
|
9785
9714
|
source: {
|
|
9786
9715
|
asset: usdcwh,
|
|
9787
|
-
balance:
|
|
9716
|
+
balance: BalanceBuilder53().substrate().tokens().accounts(),
|
|
9788
9717
|
fee: {
|
|
9789
9718
|
asset: ztg,
|
|
9790
|
-
balance:
|
|
9719
|
+
balance: BalanceBuilder53().substrate().system().account()
|
|
9791
9720
|
},
|
|
9792
9721
|
destinationFee: {
|
|
9793
|
-
balance:
|
|
9722
|
+
balance: BalanceBuilder53().substrate().tokens().accounts()
|
|
9794
9723
|
}
|
|
9795
9724
|
},
|
|
9796
9725
|
destination: {
|
|
9797
9726
|
asset: usdcwh,
|
|
9798
9727
|
chain: moonbeam,
|
|
9799
|
-
balance:
|
|
9728
|
+
balance: BalanceBuilder53().evm().erc20(),
|
|
9800
9729
|
fee: {
|
|
9801
|
-
amount:
|
|
9730
|
+
amount: FeeBuilder42().xcmPaymentApi().xcmPaymentFee({ isAssetReserveChain: true }),
|
|
9802
9731
|
asset: glmr
|
|
9803
9732
|
}
|
|
9804
9733
|
},
|
|
9805
|
-
extrinsic:
|
|
9734
|
+
extrinsic: ExtrinsicBuilder40().xTokens().transferMultiCurrencies()
|
|
9806
9735
|
},
|
|
9807
9736
|
{
|
|
9808
9737
|
source: {
|
|
9809
9738
|
asset: glmr,
|
|
9810
|
-
balance:
|
|
9739
|
+
balance: BalanceBuilder53().substrate().tokens().accounts(),
|
|
9811
9740
|
destinationFee: {
|
|
9812
|
-
balance:
|
|
9741
|
+
balance: BalanceBuilder53().substrate().tokens().accounts()
|
|
9813
9742
|
}
|
|
9814
9743
|
},
|
|
9815
9744
|
destination: {
|
|
9816
9745
|
asset: glmr,
|
|
9817
9746
|
chain: moonbeam,
|
|
9818
|
-
balance:
|
|
9747
|
+
balance: BalanceBuilder53().substrate().system().account(),
|
|
9819
9748
|
fee: {
|
|
9820
|
-
amount:
|
|
9749
|
+
amount: FeeBuilder42().xcmPaymentApi().xcmPaymentFee({ isAssetReserveChain: true }),
|
|
9821
9750
|
asset: glmr
|
|
9822
9751
|
}
|
|
9823
9752
|
},
|
|
9824
|
-
extrinsic:
|
|
9753
|
+
extrinsic: ExtrinsicBuilder40().xTokens().transfer()
|
|
9825
9754
|
}
|
|
9826
9755
|
]
|
|
9827
9756
|
});
|
|
@@ -9870,7 +9799,6 @@ var xcmRoutesList = [
|
|
|
9870
9799
|
kusamaAssetHubRoutes,
|
|
9871
9800
|
polkadotAssetHubRoutes,
|
|
9872
9801
|
subsocialRoutes,
|
|
9873
|
-
tinkernetRoutes,
|
|
9874
9802
|
turingRoutes,
|
|
9875
9803
|
turingAlphanetRoutes,
|
|
9876
9804
|
zeitgeistRoutes
|
|
@@ -9993,7 +9921,6 @@ export {
|
|
|
9993
9921
|
sub,
|
|
9994
9922
|
subsocial,
|
|
9995
9923
|
teer,
|
|
9996
|
-
tinkernet,
|
|
9997
9924
|
tnkr,
|
|
9998
9925
|
tt1,
|
|
9999
9926
|
tur,
|