@moonbeam-network/xcm-builder 1.0.0-dev.237 → 1.0.0-dev.238
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/build/index.d.ts +4 -2
- package/build/index.mjs +20 -7
- package/build/index.mjs.map +1 -1
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Chain, AnyParachain, AssetAmount, ChainAssetId, ChainAsset, AnyChain, EvmParachain } from '@moonbeam-network/xcm-types';
|
|
1
|
+
import { Chain, AnyParachain, AssetAmount, ChainAssetId, ChainAsset, Ecosystem, AnyChain, EvmParachain } from '@moonbeam-network/xcm-types';
|
|
2
2
|
import { ApiPromise } from '@polkadot/api';
|
|
3
3
|
import { FrameSystemAccountInfo, StagingXcmV3MultiLocation } from '@polkadot/types/lookup';
|
|
4
4
|
import { Struct, u128, Enum } from '@polkadot/types';
|
|
@@ -384,7 +384,9 @@ declare function polkadotXcm$1(): {
|
|
|
384
384
|
};
|
|
385
385
|
transferAssetsToEcosystem: () => {
|
|
386
386
|
X1: () => ExtrinsicConfigBuilder;
|
|
387
|
-
X2: (
|
|
387
|
+
X2: ({ globalConsensus, }?: {
|
|
388
|
+
globalConsensus?: Ecosystem;
|
|
389
|
+
}) => ExtrinsicConfigBuilder;
|
|
388
390
|
X3: () => ExtrinsicConfigBuilder;
|
|
389
391
|
X4: () => ExtrinsicConfigBuilder;
|
|
390
392
|
};
|
package/build/index.mjs
CHANGED
|
@@ -1524,9 +1524,23 @@ function getEcosystemTransferExtrinsicArgs({
|
|
|
1524
1524
|
destinationAddress,
|
|
1525
1525
|
destination,
|
|
1526
1526
|
func,
|
|
1527
|
+
globalConsensus,
|
|
1527
1528
|
feeIndex = 0
|
|
1528
1529
|
}) {
|
|
1529
1530
|
const version = getExtrinsicArgumentVersion(func);
|
|
1531
|
+
console.log(
|
|
1532
|
+
"\x1B[34m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2593\u2592\u2592\u2591 polkadotXcm.util.ts:68 \u2591\u2592\u2592\u2593\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\x1B[0m"
|
|
1533
|
+
);
|
|
1534
|
+
console.log("* destination = ");
|
|
1535
|
+
console.log(destination);
|
|
1536
|
+
console.log(
|
|
1537
|
+
"\x1B[34m\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\x1B[0m"
|
|
1538
|
+
);
|
|
1539
|
+
const GlobalConsensus = globalConsensus ? { GlobalConsensus: { ByGenesis: globalConsensus } } : {
|
|
1540
|
+
GlobalConsensus: {
|
|
1541
|
+
ByGenesis: destination.relayGenesisHash
|
|
1542
|
+
}
|
|
1543
|
+
};
|
|
1530
1544
|
return [
|
|
1531
1545
|
// dest
|
|
1532
1546
|
{
|
|
@@ -1534,11 +1548,7 @@ function getEcosystemTransferExtrinsicArgs({
|
|
|
1534
1548
|
parents: 2,
|
|
1535
1549
|
interior: {
|
|
1536
1550
|
X2: [
|
|
1537
|
-
|
|
1538
|
-
GlobalConsensus: {
|
|
1539
|
-
ByGenesis: destination.relayGenesisHash
|
|
1540
|
-
}
|
|
1541
|
-
},
|
|
1551
|
+
GlobalConsensus,
|
|
1542
1552
|
{
|
|
1543
1553
|
Parachain: destination.parachainId
|
|
1544
1554
|
}
|
|
@@ -2214,7 +2224,9 @@ function polkadotXcm() {
|
|
|
2214
2224
|
});
|
|
2215
2225
|
}
|
|
2216
2226
|
}),
|
|
2217
|
-
X2: (
|
|
2227
|
+
X2: ({
|
|
2228
|
+
globalConsensus
|
|
2229
|
+
} = {}) => ({
|
|
2218
2230
|
build: (params) => {
|
|
2219
2231
|
return new ExtrinsicConfig({
|
|
2220
2232
|
module: pallet2,
|
|
@@ -2246,7 +2258,8 @@ function polkadotXcm() {
|
|
|
2246
2258
|
return getEcosystemTransferExtrinsicArgs({
|
|
2247
2259
|
...params,
|
|
2248
2260
|
func: extrinsicFunction,
|
|
2249
|
-
assets: assets3
|
|
2261
|
+
assets: assets3,
|
|
2262
|
+
globalConsensus
|
|
2250
2263
|
});
|
|
2251
2264
|
}
|
|
2252
2265
|
});
|