@moonbeam-network/xcm-builder 1.0.0-dev.186 → 1.0.0-dev.187
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 +3 -0
- package/build/index.mjs +75 -0
- package/build/index.mjs.map +1 -1
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
|
@@ -376,6 +376,9 @@ declare function polkadotXcm$1(): {
|
|
|
376
376
|
here: () => ExtrinsicConfigBuilder;
|
|
377
377
|
globalConsensusEthereum: () => ExtrinsicConfigBuilder;
|
|
378
378
|
};
|
|
379
|
+
transferAssetsToEcosystem: () => {
|
|
380
|
+
byGenesis: () => ExtrinsicConfigBuilder;
|
|
381
|
+
};
|
|
379
382
|
};
|
|
380
383
|
|
|
381
384
|
declare function xTokens(): {
|
package/build/index.mjs
CHANGED
|
@@ -1489,6 +1489,7 @@ function getPolkadotXcmExtrinsicArgs({
|
|
|
1489
1489
|
}) {
|
|
1490
1490
|
const version = getExtrinsicArgumentVersion(func);
|
|
1491
1491
|
return [
|
|
1492
|
+
// dest
|
|
1492
1493
|
{
|
|
1493
1494
|
[version]: normalizeX1(version, {
|
|
1494
1495
|
parents,
|
|
@@ -1499,6 +1500,7 @@ function getPolkadotXcmExtrinsicArgs({
|
|
|
1499
1500
|
}
|
|
1500
1501
|
})
|
|
1501
1502
|
},
|
|
1503
|
+
// beneficiary
|
|
1502
1504
|
{
|
|
1503
1505
|
[version]: normalizeX1(version, {
|
|
1504
1506
|
parents: 0,
|
|
@@ -1507,10 +1509,13 @@ function getPolkadotXcmExtrinsicArgs({
|
|
|
1507
1509
|
}
|
|
1508
1510
|
})
|
|
1509
1511
|
},
|
|
1512
|
+
// assets
|
|
1510
1513
|
{
|
|
1511
1514
|
[version]: asset
|
|
1512
1515
|
},
|
|
1516
|
+
// feeAssetItem
|
|
1513
1517
|
feeIndex,
|
|
1518
|
+
// weightLimit
|
|
1514
1519
|
"Unlimited"
|
|
1515
1520
|
];
|
|
1516
1521
|
}
|
|
@@ -1909,6 +1914,76 @@ function polkadotXcm() {
|
|
|
1909
1914
|
})
|
|
1910
1915
|
})
|
|
1911
1916
|
};
|
|
1917
|
+
},
|
|
1918
|
+
transferAssetsToEcosystem: () => {
|
|
1919
|
+
const func = "transferAssets";
|
|
1920
|
+
return {
|
|
1921
|
+
byGenesis: () => ({
|
|
1922
|
+
build: (params) => {
|
|
1923
|
+
return new ExtrinsicConfig({
|
|
1924
|
+
module: pallet2,
|
|
1925
|
+
func,
|
|
1926
|
+
getArgs: (extrinsicFunction) => {
|
|
1927
|
+
const version = getExtrinsicArgumentVersion(extrinsicFunction);
|
|
1928
|
+
const genesis = params.destination.key === "moonbase-stage" ? "0x64d25a5d58d8d330b8804103e6452be6258ebfd7c4f4c1294835130e75628401" : "0xe1ea3ab1d46ba8f4898b6b4b9c54ffc05282d299f89e84bd0fd08067758c9443";
|
|
1929
|
+
return [
|
|
1930
|
+
// dest
|
|
1931
|
+
{
|
|
1932
|
+
[version]: normalizeX1(version, {
|
|
1933
|
+
parents: 2,
|
|
1934
|
+
interior: {
|
|
1935
|
+
X2: [
|
|
1936
|
+
{
|
|
1937
|
+
GlobalConsensus: {
|
|
1938
|
+
ByGenesis: genesis
|
|
1939
|
+
// Relay of destination ecosystem
|
|
1940
|
+
}
|
|
1941
|
+
},
|
|
1942
|
+
{
|
|
1943
|
+
Parachain: params.destination.parachainId
|
|
1944
|
+
}
|
|
1945
|
+
]
|
|
1946
|
+
}
|
|
1947
|
+
})
|
|
1948
|
+
},
|
|
1949
|
+
// beneficiary
|
|
1950
|
+
{
|
|
1951
|
+
[version]: normalizeX1(version, {
|
|
1952
|
+
parents: 0,
|
|
1953
|
+
interior: {
|
|
1954
|
+
X1: getExtrinsicAccount(params.destinationAddress)
|
|
1955
|
+
}
|
|
1956
|
+
})
|
|
1957
|
+
},
|
|
1958
|
+
// assets
|
|
1959
|
+
{
|
|
1960
|
+
[version]: {
|
|
1961
|
+
id: normalizeConcrete(
|
|
1962
|
+
version,
|
|
1963
|
+
normalizeX1(version, {
|
|
1964
|
+
parents: 0,
|
|
1965
|
+
interior: {
|
|
1966
|
+
X1: {
|
|
1967
|
+
PalletInstance: params.asset.getAssetPalletInstance()
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
})
|
|
1971
|
+
),
|
|
1972
|
+
fun: {
|
|
1973
|
+
Fungible: params.asset.amount
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
},
|
|
1977
|
+
// feeAssetItem
|
|
1978
|
+
0,
|
|
1979
|
+
// weightLimit
|
|
1980
|
+
"Unlimited"
|
|
1981
|
+
];
|
|
1982
|
+
}
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
})
|
|
1986
|
+
};
|
|
1912
1987
|
}
|
|
1913
1988
|
};
|
|
1914
1989
|
}
|