@moonbeam-network/xcm-builder 1.0.0-dev.239 → 1.0.0-dev.240

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 CHANGED
@@ -1,4 +1,4 @@
1
- import { Chain, AnyParachain, AssetAmount, ChainAssetId, ChainAsset, Ecosystem, AnyChain, EvmParachain } from '@moonbeam-network/xcm-types';
1
+ import { Chain, AnyParachain, AssetAmount, ChainAssetId, ChainAsset, 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';
@@ -360,9 +360,6 @@ declare function eqBalances(): {
360
360
  transferXcm: () => ExtrinsicConfigBuilder;
361
361
  };
362
362
 
363
- type ParamsWithGlobalConsensus = {
364
- globalConsensus?: Ecosystem;
365
- };
366
363
  declare function polkadotXcm$1(): {
367
364
  limitedReserveTransferAssets: () => {
368
365
  here: () => ExtrinsicConfigBuilder;
@@ -387,9 +384,9 @@ declare function polkadotXcm$1(): {
387
384
  };
388
385
  transferAssetsToEcosystem: () => {
389
386
  X1: () => ExtrinsicConfigBuilder;
390
- X2: ({ globalConsensus, }?: ParamsWithGlobalConsensus) => ExtrinsicConfigBuilder;
387
+ X2: () => ExtrinsicConfigBuilder;
391
388
  X3: () => ExtrinsicConfigBuilder;
392
- X4: ({ globalConsensus, }?: ParamsWithGlobalConsensus) => ExtrinsicConfigBuilder;
389
+ X4: () => ExtrinsicConfigBuilder;
393
390
  };
394
391
  };
395
392
 
package/build/index.mjs CHANGED
@@ -1524,15 +1524,9 @@ function getEcosystemTransferExtrinsicArgs({
1524
1524
  destinationAddress,
1525
1525
  destination,
1526
1526
  func,
1527
- globalConsensus,
1528
1527
  feeIndex = 0
1529
1528
  }) {
1530
1529
  const version = getExtrinsicArgumentVersion(func);
1531
- const GlobalConsensus = globalConsensus ? { GlobalConsensus: globalConsensus } : {
1532
- GlobalConsensus: {
1533
- ByGenesis: destination.relayGenesisHash
1534
- }
1535
- };
1536
1530
  return [
1537
1531
  // dest
1538
1532
  {
@@ -1540,7 +1534,11 @@ function getEcosystemTransferExtrinsicArgs({
1540
1534
  parents: 2,
1541
1535
  interior: {
1542
1536
  X2: [
1543
- GlobalConsensus,
1537
+ {
1538
+ GlobalConsensus: {
1539
+ ByGenesis: destination.relayGenesisHash
1540
+ }
1541
+ },
1544
1542
  {
1545
1543
  Parachain: destination.parachainId
1546
1544
  }
@@ -2216,9 +2214,7 @@ function polkadotXcm() {
2216
2214
  });
2217
2215
  }
2218
2216
  }),
2219
- X2: ({
2220
- globalConsensus
2221
- } = {}) => ({
2217
+ X2: () => ({
2222
2218
  build: (params) => {
2223
2219
  return new ExtrinsicConfig({
2224
2220
  module: pallet2,
@@ -2247,13 +2243,11 @@ function polkadotXcm() {
2247
2243
  }
2248
2244
  }
2249
2245
  ];
2250
- const result = getEcosystemTransferExtrinsicArgs({
2246
+ return getEcosystemTransferExtrinsicArgs({
2251
2247
  ...params,
2252
2248
  func: extrinsicFunction,
2253
- assets: assets3,
2254
- globalConsensus
2249
+ assets: assets3
2255
2250
  });
2256
- return result;
2257
2251
  }
2258
2252
  });
2259
2253
  }
@@ -2302,9 +2296,7 @@ function polkadotXcm() {
2302
2296
  });
2303
2297
  }
2304
2298
  }),
2305
- X4: ({
2306
- globalConsensus
2307
- } = {}) => ({
2299
+ X4: () => ({
2308
2300
  build: (params) => {
2309
2301
  return new ExtrinsicConfig({
2310
2302
  module: pallet2,
@@ -2370,21 +2362,11 @@ function polkadotXcm() {
2370
2362
  }
2371
2363
  }
2372
2364
  ];
2373
- const result = getEcosystemTransferExtrinsicArgs({
2365
+ return getEcosystemTransferExtrinsicArgs({
2374
2366
  ...params,
2375
2367
  func: extrinsicFunction,
2376
- assets: assets3,
2377
- globalConsensus
2368
+ assets: assets3
2378
2369
  });
2379
- console.log(
2380
- "\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.ts:886 \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"
2381
- );
2382
- console.log("* result = ");
2383
- console.log(result);
2384
- console.log(
2385
- "\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"
2386
- );
2387
- return result;
2388
2370
  }
2389
2371
  });
2390
2372
  }