@paraspell/sdk-core 8.0.3 → 8.2.0
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/dist/index.cjs +557 -191
- package/dist/index.d.ts +13 -7
- package/dist/index.mjs +557 -191
- package/package.json +10 -10
package/dist/index.cjs
CHANGED
|
@@ -12,7 +12,7 @@ function _arrayWithoutHoles(r) {
|
|
|
12
12
|
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
13
13
|
}
|
|
14
14
|
function _assertThisInitialized(e) {
|
|
15
|
-
if (
|
|
15
|
+
if (undefined === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
16
|
return e;
|
|
17
17
|
}
|
|
18
18
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
@@ -36,7 +36,7 @@ function _asyncToGenerator(n) {
|
|
|
36
36
|
function _throw(n) {
|
|
37
37
|
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
38
38
|
}
|
|
39
|
-
_next(
|
|
39
|
+
_next(undefined);
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
}
|
|
@@ -56,12 +56,12 @@ function _construct(t, e, r) {
|
|
|
56
56
|
function _defineProperties(e, r) {
|
|
57
57
|
for (var t = 0; t < r.length; t++) {
|
|
58
58
|
var o = r[t];
|
|
59
|
-
o.enumerable = o.enumerable ||
|
|
59
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
function _createClass(e, r, t) {
|
|
63
63
|
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
64
|
-
writable:
|
|
64
|
+
writable: false
|
|
65
65
|
}), e;
|
|
66
66
|
}
|
|
67
67
|
function _createForOfIteratorHelper(r, e) {
|
|
@@ -75,9 +75,9 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
75
75
|
s: F,
|
|
76
76
|
n: function () {
|
|
77
77
|
return n >= r.length ? {
|
|
78
|
-
done:
|
|
78
|
+
done: true
|
|
79
79
|
} : {
|
|
80
|
-
done:
|
|
80
|
+
done: false,
|
|
81
81
|
value: r[n++]
|
|
82
82
|
};
|
|
83
83
|
},
|
|
@@ -90,8 +90,8 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
90
90
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
91
91
|
}
|
|
92
92
|
var o,
|
|
93
|
-
a =
|
|
94
|
-
u =
|
|
93
|
+
a = true,
|
|
94
|
+
u = false;
|
|
95
95
|
return {
|
|
96
96
|
s: function () {
|
|
97
97
|
t = t.call(r);
|
|
@@ -101,7 +101,7 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
101
101
|
return a = r.done, r;
|
|
102
102
|
},
|
|
103
103
|
e: function (r) {
|
|
104
|
-
u =
|
|
104
|
+
u = true, o = r;
|
|
105
105
|
},
|
|
106
106
|
f: function () {
|
|
107
107
|
try {
|
|
@@ -115,9 +115,9 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
115
115
|
function _defineProperty(e, r, t) {
|
|
116
116
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
117
117
|
value: t,
|
|
118
|
-
enumerable:
|
|
119
|
-
configurable:
|
|
120
|
-
writable:
|
|
118
|
+
enumerable: true,
|
|
119
|
+
configurable: true,
|
|
120
|
+
writable: true
|
|
121
121
|
}) : e[r] = t, e;
|
|
122
122
|
}
|
|
123
123
|
function _get() {
|
|
@@ -139,11 +139,11 @@ function _inherits(t, e) {
|
|
|
139
139
|
t.prototype = Object.create(e && e.prototype, {
|
|
140
140
|
constructor: {
|
|
141
141
|
value: t,
|
|
142
|
-
writable:
|
|
143
|
-
configurable:
|
|
142
|
+
writable: true,
|
|
143
|
+
configurable: true
|
|
144
144
|
}
|
|
145
145
|
}), Object.defineProperty(t, "prototype", {
|
|
146
|
-
writable:
|
|
146
|
+
writable: false
|
|
147
147
|
}), e && _setPrototypeOf(t, e);
|
|
148
148
|
}
|
|
149
149
|
function _isNativeFunction(t) {
|
|
@@ -180,7 +180,7 @@ function ownKeys(e, r) {
|
|
|
180
180
|
function _objectSpread2(e) {
|
|
181
181
|
for (var r = 1; r < arguments.length; r++) {
|
|
182
182
|
var t = null != arguments[r] ? arguments[r] : {};
|
|
183
|
-
r % 2 ? ownKeys(Object(t),
|
|
183
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
184
184
|
_defineProperty(e, r, t[r]);
|
|
185
185
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
186
186
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
@@ -190,7 +190,7 @@ function _objectSpread2(e) {
|
|
|
190
190
|
}
|
|
191
191
|
function _possibleConstructorReturn(t, e) {
|
|
192
192
|
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
193
|
-
if (
|
|
193
|
+
if (undefined !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
194
194
|
return _assertThisInitialized(t);
|
|
195
195
|
}
|
|
196
196
|
function _regeneratorRuntime() {
|
|
@@ -211,9 +211,9 @@ function _regeneratorRuntime() {
|
|
|
211
211
|
function define(t, e, r) {
|
|
212
212
|
return Object.defineProperty(t, e, {
|
|
213
213
|
value: r,
|
|
214
|
-
enumerable:
|
|
215
|
-
configurable:
|
|
216
|
-
writable:
|
|
214
|
+
enumerable: true,
|
|
215
|
+
configurable: true,
|
|
216
|
+
writable: true
|
|
217
217
|
}), t[e];
|
|
218
218
|
}
|
|
219
219
|
try {
|
|
@@ -306,7 +306,7 @@ function _regeneratorRuntime() {
|
|
|
306
306
|
if ("throw" === i) throw a;
|
|
307
307
|
return {
|
|
308
308
|
value: t,
|
|
309
|
-
done:
|
|
309
|
+
done: true
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
312
|
for (n.method = i, n.arg = a;;) {
|
|
@@ -357,7 +357,7 @@ function _regeneratorRuntime() {
|
|
|
357
357
|
function Context(t) {
|
|
358
358
|
this.tryEntries = [{
|
|
359
359
|
tryLoc: "root"
|
|
360
|
-
}], t.forEach(pushTryEntry, this), this.reset(
|
|
360
|
+
}], t.forEach(pushTryEntry, this), this.reset(true);
|
|
361
361
|
}
|
|
362
362
|
function values(e) {
|
|
363
363
|
if (e || "" === e) {
|
|
@@ -367,8 +367,8 @@ function _regeneratorRuntime() {
|
|
|
367
367
|
if (!isNaN(e.length)) {
|
|
368
368
|
var o = -1,
|
|
369
369
|
i = function next() {
|
|
370
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done =
|
|
371
|
-
return next.value = t, next.done =
|
|
370
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = false, next;
|
|
371
|
+
return next.value = t, next.done = true, next;
|
|
372
372
|
};
|
|
373
373
|
return i.next = i;
|
|
374
374
|
}
|
|
@@ -377,10 +377,10 @@ function _regeneratorRuntime() {
|
|
|
377
377
|
}
|
|
378
378
|
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
379
379
|
value: GeneratorFunctionPrototype,
|
|
380
|
-
configurable:
|
|
380
|
+
configurable: true
|
|
381
381
|
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
382
382
|
value: GeneratorFunction,
|
|
383
|
-
configurable:
|
|
383
|
+
configurable: true
|
|
384
384
|
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
385
385
|
var e = "function" == typeof t && t.constructor;
|
|
386
386
|
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
@@ -393,7 +393,7 @@ function _regeneratorRuntime() {
|
|
|
393
393
|
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
394
394
|
return this;
|
|
395
395
|
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
396
|
-
|
|
396
|
+
undefined === i && (i = Promise);
|
|
397
397
|
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
398
398
|
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
399
399
|
return t.done ? t.value : a.next();
|
|
@@ -409,17 +409,17 @@ function _regeneratorRuntime() {
|
|
|
409
409
|
return r.reverse(), function next() {
|
|
410
410
|
for (; r.length;) {
|
|
411
411
|
var t = r.pop();
|
|
412
|
-
if (t in e) return next.value = t, next.done =
|
|
412
|
+
if (t in e) return next.value = t, next.done = false, next;
|
|
413
413
|
}
|
|
414
|
-
return next.done =
|
|
414
|
+
return next.done = true, next;
|
|
415
415
|
};
|
|
416
416
|
}, e.values = values, Context.prototype = {
|
|
417
417
|
constructor: Context,
|
|
418
418
|
reset: function (e) {
|
|
419
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done =
|
|
419
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
420
420
|
},
|
|
421
421
|
stop: function () {
|
|
422
|
-
this.done =
|
|
422
|
+
this.done = true;
|
|
423
423
|
var t = this.tryEntries[0].completion;
|
|
424
424
|
if ("throw" === t.type) throw t.arg;
|
|
425
425
|
return this.rval;
|
|
@@ -438,10 +438,10 @@ function _regeneratorRuntime() {
|
|
|
438
438
|
var c = n.call(i, "catchLoc"),
|
|
439
439
|
u = n.call(i, "finallyLoc");
|
|
440
440
|
if (c && u) {
|
|
441
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc,
|
|
441
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
442
442
|
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
443
443
|
} else if (c) {
|
|
444
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc,
|
|
444
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
445
445
|
} else {
|
|
446
446
|
if (!u) throw Error("try statement without catch or finally");
|
|
447
447
|
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
@@ -515,7 +515,7 @@ function _toConsumableArray(r) {
|
|
|
515
515
|
function _toPrimitive(t, r) {
|
|
516
516
|
if ("object" != typeof t || !t) return t;
|
|
517
517
|
var e = t[Symbol.toPrimitive];
|
|
518
|
-
if (
|
|
518
|
+
if (undefined !== e) {
|
|
519
519
|
var i = e.call(t, r || "default");
|
|
520
520
|
if ("object" != typeof i) return i;
|
|
521
521
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
@@ -539,15 +539,15 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
539
539
|
if (r) {
|
|
540
540
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
541
541
|
var t = {}.toString.call(r).slice(8, -1);
|
|
542
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) :
|
|
542
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined;
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
function _wrapNativeSuper(t) {
|
|
546
|
-
var r = "function" == typeof Map ? new Map() :
|
|
546
|
+
var r = "function" == typeof Map ? new Map() : undefined;
|
|
547
547
|
return _wrapNativeSuper = function (t) {
|
|
548
548
|
if (null === t || !_isNativeFunction(t)) return t;
|
|
549
549
|
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
|
550
|
-
if (
|
|
550
|
+
if (undefined !== r) {
|
|
551
551
|
if (r.has(t)) return r.get(t);
|
|
552
552
|
r.set(t, Wrapper);
|
|
553
553
|
}
|
|
@@ -557,9 +557,9 @@ function _wrapNativeSuper(t) {
|
|
|
557
557
|
return Wrapper.prototype = Object.create(t.prototype, {
|
|
558
558
|
constructor: {
|
|
559
559
|
value: Wrapper,
|
|
560
|
-
enumerable:
|
|
561
|
-
writable:
|
|
562
|
-
configurable:
|
|
560
|
+
enumerable: false,
|
|
561
|
+
writable: true,
|
|
562
|
+
configurable: true
|
|
563
563
|
}
|
|
564
564
|
}), _setPrototypeOf(Wrapper, t);
|
|
565
565
|
}, _wrapNativeSuper(t);
|
|
@@ -599,7 +599,7 @@ var Polimec$3 = {
|
|
|
599
599
|
relayChainAssetSymbol: "DOT",
|
|
600
600
|
nativeAssetSymbol: "PLMC",
|
|
601
601
|
isEVM: false,
|
|
602
|
-
supportsDryRunApi:
|
|
602
|
+
supportsDryRunApi: true,
|
|
603
603
|
nativeAssets: [
|
|
604
604
|
{
|
|
605
605
|
symbol: "PLMC",
|
|
@@ -698,6 +698,28 @@ var Acala$3 = {
|
|
|
698
698
|
}
|
|
699
699
|
],
|
|
700
700
|
otherAssets: [
|
|
701
|
+
{
|
|
702
|
+
assetId: "18",
|
|
703
|
+
symbol: "LOVA",
|
|
704
|
+
decimals: 12,
|
|
705
|
+
multiLocation: {
|
|
706
|
+
parents: 1,
|
|
707
|
+
interior: {
|
|
708
|
+
X3: [
|
|
709
|
+
{
|
|
710
|
+
Parachain: 1000
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
PalletInstance: 50
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
GeneralIndex: 50000028
|
|
717
|
+
}
|
|
718
|
+
]
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
existentialDeposit: "1"
|
|
722
|
+
},
|
|
701
723
|
{
|
|
702
724
|
assetId: "14",
|
|
703
725
|
symbol: "USDC",
|
|
@@ -808,6 +830,50 @@ var Acala$3 = {
|
|
|
808
830
|
},
|
|
809
831
|
existentialDeposit: "3000"
|
|
810
832
|
},
|
|
833
|
+
{
|
|
834
|
+
assetId: "19",
|
|
835
|
+
symbol: "DAMN",
|
|
836
|
+
decimals: 12,
|
|
837
|
+
multiLocation: {
|
|
838
|
+
parents: 1,
|
|
839
|
+
interior: {
|
|
840
|
+
X3: [
|
|
841
|
+
{
|
|
842
|
+
Parachain: 1000
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
PalletInstance: 50
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
GeneralIndex: 22222012
|
|
849
|
+
}
|
|
850
|
+
]
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
existentialDeposit: "1"
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
assetId: "20",
|
|
857
|
+
symbol: "LOTY",
|
|
858
|
+
decimals: 12,
|
|
859
|
+
multiLocation: {
|
|
860
|
+
parents: 1,
|
|
861
|
+
interior: {
|
|
862
|
+
X3: [
|
|
863
|
+
{
|
|
864
|
+
Parachain: 1000
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
PalletInstance: 50
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
GeneralIndex: 50000069
|
|
871
|
+
}
|
|
872
|
+
]
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
existentialDeposit: "100000000"
|
|
876
|
+
},
|
|
811
877
|
{
|
|
812
878
|
assetId: "0",
|
|
813
879
|
symbol: "GLMR",
|
|
@@ -2700,12 +2766,55 @@ var Hydration$3 = {
|
|
|
2700
2766
|
}
|
|
2701
2767
|
],
|
|
2702
2768
|
otherAssets: [
|
|
2769
|
+
{
|
|
2770
|
+
assetId: "1000771",
|
|
2771
|
+
symbol: "KSM",
|
|
2772
|
+
decimals: 12,
|
|
2773
|
+
multiLocation: {
|
|
2774
|
+
parents: 1,
|
|
2775
|
+
interior: {
|
|
2776
|
+
X1: {
|
|
2777
|
+
GlobalConsensus: {
|
|
2778
|
+
kusama: null
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
},
|
|
2783
|
+
existentialDeposit: "313283208"
|
|
2784
|
+
},
|
|
2785
|
+
{
|
|
2786
|
+
assetId: "1000766",
|
|
2787
|
+
symbol: "USDC",
|
|
2788
|
+
decimals: 6,
|
|
2789
|
+
multiLocation: {
|
|
2790
|
+
parents: 2,
|
|
2791
|
+
interior: {
|
|
2792
|
+
X2: [
|
|
2793
|
+
{
|
|
2794
|
+
GlobalConsensus: {
|
|
2795
|
+
Ethereum: {
|
|
2796
|
+
chainId: 1
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2799
|
+
},
|
|
2800
|
+
{
|
|
2801
|
+
AccountKey20: {
|
|
2802
|
+
network: null,
|
|
2803
|
+
key: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
|
|
2804
|
+
}
|
|
2805
|
+
}
|
|
2806
|
+
]
|
|
2807
|
+
}
|
|
2808
|
+
},
|
|
2809
|
+
existentialDeposit: "10000",
|
|
2810
|
+
alias: "USDC1"
|
|
2811
|
+
},
|
|
2703
2812
|
{
|
|
2704
2813
|
assetId: "1000625",
|
|
2705
2814
|
symbol: "sUSDe",
|
|
2706
2815
|
decimals: 18,
|
|
2707
2816
|
multiLocation: {
|
|
2708
|
-
parents:
|
|
2817
|
+
parents: 2,
|
|
2709
2818
|
interior: {
|
|
2710
2819
|
X2: [
|
|
2711
2820
|
{
|
|
@@ -2743,7 +2852,7 @@ var Hydration$3 = {
|
|
|
2743
2852
|
symbol: "AAVE",
|
|
2744
2853
|
decimals: 18,
|
|
2745
2854
|
multiLocation: {
|
|
2746
|
-
parents:
|
|
2855
|
+
parents: 2,
|
|
2747
2856
|
interior: {
|
|
2748
2857
|
X2: [
|
|
2749
2858
|
{
|
|
@@ -2769,7 +2878,7 @@ var Hydration$3 = {
|
|
|
2769
2878
|
symbol: "WBTC",
|
|
2770
2879
|
decimals: 8,
|
|
2771
2880
|
multiLocation: {
|
|
2772
|
-
parents:
|
|
2881
|
+
parents: 2,
|
|
2773
2882
|
interior: {
|
|
2774
2883
|
X2: [
|
|
2775
2884
|
{
|
|
@@ -2796,7 +2905,7 @@ var Hydration$3 = {
|
|
|
2796
2905
|
symbol: "sUSDS",
|
|
2797
2906
|
decimals: 18,
|
|
2798
2907
|
multiLocation: {
|
|
2799
|
-
parents:
|
|
2908
|
+
parents: 2,
|
|
2800
2909
|
interior: {
|
|
2801
2910
|
X2: [
|
|
2802
2911
|
{
|
|
@@ -2818,6 +2927,59 @@ var Hydration$3 = {
|
|
|
2818
2927
|
existentialDeposit: "9910802775024780",
|
|
2819
2928
|
alias: "sUSDS1"
|
|
2820
2929
|
},
|
|
2930
|
+
{
|
|
2931
|
+
assetId: "1000767",
|
|
2932
|
+
symbol: "USDT",
|
|
2933
|
+
decimals: 6,
|
|
2934
|
+
multiLocation: {
|
|
2935
|
+
parents: 2,
|
|
2936
|
+
interior: {
|
|
2937
|
+
X2: [
|
|
2938
|
+
{
|
|
2939
|
+
GlobalConsensus: {
|
|
2940
|
+
Ethereum: {
|
|
2941
|
+
chainId: 1
|
|
2942
|
+
}
|
|
2943
|
+
}
|
|
2944
|
+
},
|
|
2945
|
+
{
|
|
2946
|
+
AccountKey20: {
|
|
2947
|
+
network: null,
|
|
2948
|
+
key: "0xdac17f958d2ee523a2206206994597c13d831ec7"
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2951
|
+
]
|
|
2952
|
+
}
|
|
2953
|
+
},
|
|
2954
|
+
existentialDeposit: "10000",
|
|
2955
|
+
alias: "USDT2"
|
|
2956
|
+
},
|
|
2957
|
+
{
|
|
2958
|
+
assetId: "1000765",
|
|
2959
|
+
symbol: "tBTC",
|
|
2960
|
+
decimals: 18,
|
|
2961
|
+
multiLocation: {
|
|
2962
|
+
parents: 2,
|
|
2963
|
+
interior: {
|
|
2964
|
+
X2: [
|
|
2965
|
+
{
|
|
2966
|
+
GlobalConsensus: {
|
|
2967
|
+
Ethereum: {
|
|
2968
|
+
chainId: 1
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
},
|
|
2972
|
+
{
|
|
2973
|
+
AccountKey20: {
|
|
2974
|
+
network: null,
|
|
2975
|
+
key: "0x18084fba666a33d37592fa2633fd49a74dd93a88"
|
|
2976
|
+
}
|
|
2977
|
+
}
|
|
2978
|
+
]
|
|
2979
|
+
}
|
|
2980
|
+
},
|
|
2981
|
+
existentialDeposit: "106803374987"
|
|
2982
|
+
},
|
|
2821
2983
|
{
|
|
2822
2984
|
assetId: "1000189",
|
|
2823
2985
|
symbol: "WETH",
|
|
@@ -2911,7 +3073,7 @@ var Hydration$3 = {
|
|
|
2911
3073
|
}
|
|
2912
3074
|
},
|
|
2913
3075
|
existentialDeposit: "10000",
|
|
2914
|
-
alias: "
|
|
3076
|
+
alias: "USDC3"
|
|
2915
3077
|
},
|
|
2916
3078
|
{
|
|
2917
3079
|
assetId: "4",
|
|
@@ -3024,7 +3186,7 @@ var Hydration$3 = {
|
|
|
3024
3186
|
}
|
|
3025
3187
|
},
|
|
3026
3188
|
existentialDeposit: "10000",
|
|
3027
|
-
alias: "
|
|
3189
|
+
alias: "USDC4"
|
|
3028
3190
|
},
|
|
3029
3191
|
{
|
|
3030
3192
|
assetId: "1000100",
|
|
@@ -3095,7 +3257,7 @@ var Hydration$3 = {
|
|
|
3095
3257
|
}
|
|
3096
3258
|
},
|
|
3097
3259
|
existentialDeposit: "10000",
|
|
3098
|
-
alias: "
|
|
3260
|
+
alias: "USDC2"
|
|
3099
3261
|
},
|
|
3100
3262
|
{
|
|
3101
3263
|
assetId: "20",
|
|
@@ -3269,7 +3431,7 @@ var Hydration$3 = {
|
|
|
3269
3431
|
}
|
|
3270
3432
|
},
|
|
3271
3433
|
existentialDeposit: "10000",
|
|
3272
|
-
alias: "
|
|
3434
|
+
alias: "USDT3"
|
|
3273
3435
|
},
|
|
3274
3436
|
{
|
|
3275
3437
|
assetId: "1000752",
|
|
@@ -3541,6 +3703,28 @@ var Hydration$3 = {
|
|
|
3541
3703
|
},
|
|
3542
3704
|
existentialDeposit: "0"
|
|
3543
3705
|
},
|
|
3706
|
+
{
|
|
3707
|
+
assetId: "1005",
|
|
3708
|
+
symbol: "avDOT",
|
|
3709
|
+
decimals: 10,
|
|
3710
|
+
multiLocation: {
|
|
3711
|
+
parents: 1,
|
|
3712
|
+
interior: {
|
|
3713
|
+
X2: [
|
|
3714
|
+
{
|
|
3715
|
+
Parachain: 2034
|
|
3716
|
+
},
|
|
3717
|
+
{
|
|
3718
|
+
AccountKey20: {
|
|
3719
|
+
network: null,
|
|
3720
|
+
key: "0x0e13b904f4168f93814216b6874ca8349457f263"
|
|
3721
|
+
}
|
|
3722
|
+
}
|
|
3723
|
+
]
|
|
3724
|
+
}
|
|
3725
|
+
},
|
|
3726
|
+
existentialDeposit: "0"
|
|
3727
|
+
},
|
|
3544
3728
|
{
|
|
3545
3729
|
assetId: "1004",
|
|
3546
3730
|
symbol: "aWBTC",
|
|
@@ -5607,6 +5791,26 @@ var AssetHubPolkadot$3 = {
|
|
|
5607
5791
|
],
|
|
5608
5792
|
existentialDeposit: "3000"
|
|
5609
5793
|
},
|
|
5794
|
+
{
|
|
5795
|
+
assetId: "22222012",
|
|
5796
|
+
symbol: "DAMN",
|
|
5797
|
+
decimals: 12,
|
|
5798
|
+
xcmInterior: [
|
|
5799
|
+
{
|
|
5800
|
+
Network: "polkadot"
|
|
5801
|
+
},
|
|
5802
|
+
{
|
|
5803
|
+
Parachain: 1000
|
|
5804
|
+
},
|
|
5805
|
+
{
|
|
5806
|
+
PalletInstance: 50
|
|
5807
|
+
},
|
|
5808
|
+
{
|
|
5809
|
+
GeneralIndex: 22222012
|
|
5810
|
+
}
|
|
5811
|
+
],
|
|
5812
|
+
existentialDeposit: "1000000000000"
|
|
5813
|
+
},
|
|
5610
5814
|
{
|
|
5611
5815
|
assetId: "23",
|
|
5612
5816
|
symbol: "PINK",
|
|
@@ -5687,6 +5891,46 @@ var AssetHubPolkadot$3 = {
|
|
|
5687
5891
|
],
|
|
5688
5892
|
existentialDeposit: "1000000"
|
|
5689
5893
|
},
|
|
5894
|
+
{
|
|
5895
|
+
assetId: "50000028",
|
|
5896
|
+
symbol: "LOVA",
|
|
5897
|
+
decimals: 12,
|
|
5898
|
+
xcmInterior: [
|
|
5899
|
+
{
|
|
5900
|
+
Network: "polkadot"
|
|
5901
|
+
},
|
|
5902
|
+
{
|
|
5903
|
+
Parachain: 1000
|
|
5904
|
+
},
|
|
5905
|
+
{
|
|
5906
|
+
PalletInstance: 50
|
|
5907
|
+
},
|
|
5908
|
+
{
|
|
5909
|
+
GeneralIndex: 50000028
|
|
5910
|
+
}
|
|
5911
|
+
],
|
|
5912
|
+
existentialDeposit: "1000000000000"
|
|
5913
|
+
},
|
|
5914
|
+
{
|
|
5915
|
+
assetId: "50000069",
|
|
5916
|
+
symbol: "LOTY",
|
|
5917
|
+
decimals: 12,
|
|
5918
|
+
xcmInterior: [
|
|
5919
|
+
{
|
|
5920
|
+
Network: "polkadot"
|
|
5921
|
+
},
|
|
5922
|
+
{
|
|
5923
|
+
Parachain: 1000
|
|
5924
|
+
},
|
|
5925
|
+
{
|
|
5926
|
+
PalletInstance: 50
|
|
5927
|
+
},
|
|
5928
|
+
{
|
|
5929
|
+
GeneralIndex: 50000069
|
|
5930
|
+
}
|
|
5931
|
+
],
|
|
5932
|
+
existentialDeposit: "100000000"
|
|
5933
|
+
},
|
|
5690
5934
|
{
|
|
5691
5935
|
assetId: "555",
|
|
5692
5936
|
symbol: "GAME",
|
|
@@ -5779,6 +6023,21 @@ var AssetHubPolkadot$3 = {
|
|
|
5779
6023
|
},
|
|
5780
6024
|
existentialDeposit: "1000000000"
|
|
5781
6025
|
},
|
|
6026
|
+
{
|
|
6027
|
+
symbol: "PLMC",
|
|
6028
|
+
decimals: 10,
|
|
6029
|
+
multiLocation: {
|
|
6030
|
+
parents: 1,
|
|
6031
|
+
interior: {
|
|
6032
|
+
X1: [
|
|
6033
|
+
{
|
|
6034
|
+
Parachain: 3344
|
|
6035
|
+
}
|
|
6036
|
+
]
|
|
6037
|
+
}
|
|
6038
|
+
},
|
|
6039
|
+
existentialDeposit: "1000000000"
|
|
6040
|
+
},
|
|
5782
6041
|
{
|
|
5783
6042
|
symbol: "LAOS",
|
|
5784
6043
|
decimals: 18,
|
|
@@ -6858,7 +7117,7 @@ var Crab$3 = {
|
|
|
6858
7117
|
relayChainAssetSymbol: "KSM",
|
|
6859
7118
|
nativeAssetSymbol: "CRAB",
|
|
6860
7119
|
isEVM: true,
|
|
6861
|
-
supportsDryRunApi:
|
|
7120
|
+
supportsDryRunApi: true,
|
|
6862
7121
|
nativeAssets: [
|
|
6863
7122
|
{
|
|
6864
7123
|
symbol: "CRAB",
|
|
@@ -9654,6 +9913,81 @@ var Unique$3 = {
|
|
|
9654
9913
|
}
|
|
9655
9914
|
],
|
|
9656
9915
|
otherAssets: [
|
|
9916
|
+
{
|
|
9917
|
+
assetId: "459",
|
|
9918
|
+
symbol: "PINK",
|
|
9919
|
+
decimals: 10,
|
|
9920
|
+
multiLocation: {
|
|
9921
|
+
parents: 1,
|
|
9922
|
+
interior: {
|
|
9923
|
+
X3: [
|
|
9924
|
+
{
|
|
9925
|
+
Parachain: 1000
|
|
9926
|
+
},
|
|
9927
|
+
{
|
|
9928
|
+
PalletInstance: 50
|
|
9929
|
+
},
|
|
9930
|
+
{
|
|
9931
|
+
GeneralIndex: 23
|
|
9932
|
+
}
|
|
9933
|
+
]
|
|
9934
|
+
}
|
|
9935
|
+
},
|
|
9936
|
+
existentialDeposit: "0"
|
|
9937
|
+
},
|
|
9938
|
+
{
|
|
9939
|
+
assetId: "473",
|
|
9940
|
+
symbol: "USDt",
|
|
9941
|
+
decimals: 6,
|
|
9942
|
+
multiLocation: {
|
|
9943
|
+
parents: 1,
|
|
9944
|
+
interior: {
|
|
9945
|
+
X3: [
|
|
9946
|
+
{
|
|
9947
|
+
Parachain: 1000
|
|
9948
|
+
},
|
|
9949
|
+
{
|
|
9950
|
+
PalletInstance: 50
|
|
9951
|
+
},
|
|
9952
|
+
{
|
|
9953
|
+
GeneralIndex: 1984
|
|
9954
|
+
}
|
|
9955
|
+
]
|
|
9956
|
+
}
|
|
9957
|
+
},
|
|
9958
|
+
existentialDeposit: "0"
|
|
9959
|
+
},
|
|
9960
|
+
{
|
|
9961
|
+
assetId: "498",
|
|
9962
|
+
symbol: "GLMR",
|
|
9963
|
+
decimals: 18,
|
|
9964
|
+
multiLocation: {
|
|
9965
|
+
parents: 1,
|
|
9966
|
+
interior: {
|
|
9967
|
+
X2: [
|
|
9968
|
+
{
|
|
9969
|
+
Parachain: 2004
|
|
9970
|
+
},
|
|
9971
|
+
{
|
|
9972
|
+
PalletInstance: 10
|
|
9973
|
+
}
|
|
9974
|
+
]
|
|
9975
|
+
}
|
|
9976
|
+
},
|
|
9977
|
+
existentialDeposit: "0"
|
|
9978
|
+
},
|
|
9979
|
+
{
|
|
9980
|
+
assetId: "437",
|
|
9981
|
+
symbol: "DOT",
|
|
9982
|
+
decimals: 10,
|
|
9983
|
+
multiLocation: {
|
|
9984
|
+
parents: 1,
|
|
9985
|
+
interior: {
|
|
9986
|
+
Here: null
|
|
9987
|
+
}
|
|
9988
|
+
},
|
|
9989
|
+
existentialDeposit: "0"
|
|
9990
|
+
}
|
|
9657
9991
|
]
|
|
9658
9992
|
};
|
|
9659
9993
|
var Crust$3 = {
|
|
@@ -10874,6 +11208,30 @@ var Ethereum = {
|
|
|
10874
11208
|
]
|
|
10875
11209
|
}
|
|
10876
11210
|
}
|
|
11211
|
+
},
|
|
11212
|
+
{
|
|
11213
|
+
symbol: "AAVE",
|
|
11214
|
+
assetId: "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
|
|
11215
|
+
existentialDeposit: "1",
|
|
11216
|
+
multiLocation: {
|
|
11217
|
+
parents: 2,
|
|
11218
|
+
interior: {
|
|
11219
|
+
X2: [
|
|
11220
|
+
{
|
|
11221
|
+
GlobalConsensus: {
|
|
11222
|
+
Ethereum: {
|
|
11223
|
+
chain_id: 1
|
|
11224
|
+
}
|
|
11225
|
+
}
|
|
11226
|
+
},
|
|
11227
|
+
{
|
|
11228
|
+
AccountKey20: {
|
|
11229
|
+
key: "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
|
|
11230
|
+
}
|
|
11231
|
+
}
|
|
11232
|
+
]
|
|
11233
|
+
}
|
|
11234
|
+
}
|
|
10877
11235
|
}
|
|
10878
11236
|
]
|
|
10879
11237
|
};
|
|
@@ -11542,7 +11900,7 @@ var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
|
11542
11900
|
function NodeNotSupportedError(message) {
|
|
11543
11901
|
var _this;
|
|
11544
11902
|
_classCallCheck(this, NodeNotSupportedError);
|
|
11545
|
-
_this = _callSuper(this, NodeNotSupportedError, [message !== null && message !==
|
|
11903
|
+
_this = _callSuper(this, NodeNotSupportedError, [message !== null && message !== undefined ? message : 'These nodes do not support XCM transfers from Relay / to Relay chain.']);
|
|
11546
11904
|
_this.name = 'NodeNotSupported';
|
|
11547
11905
|
return _this;
|
|
11548
11906
|
}
|
|
@@ -11564,7 +11922,7 @@ var ScenarioNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
|
11564
11922
|
function ScenarioNotSupportedError(node, scenario, message) {
|
|
11565
11923
|
var _this;
|
|
11566
11924
|
_classCallCheck(this, ScenarioNotSupportedError);
|
|
11567
|
-
_this = _callSuper(this, ScenarioNotSupportedError, [message !== null && message !==
|
|
11925
|
+
_this = _callSuper(this, ScenarioNotSupportedError, [message !== null && message !== undefined ? message : "Scenario ".concat(scenario, " not supported for node ").concat(node)]);
|
|
11568
11926
|
_this.name = 'ScenarioNotSupported';
|
|
11569
11927
|
return _this;
|
|
11570
11928
|
}
|
|
@@ -11584,7 +11942,7 @@ var IncompatibleNodesError = /*#__PURE__*/function (_Error) {
|
|
|
11584
11942
|
function IncompatibleNodesError(message) {
|
|
11585
11943
|
var _this;
|
|
11586
11944
|
_classCallCheck(this, IncompatibleNodesError);
|
|
11587
|
-
_this = _callSuper(this, IncompatibleNodesError, [message !== null && message !==
|
|
11945
|
+
_this = _callSuper(this, IncompatibleNodesError, [message !== null && message !== undefined ? message : 'Transactions between nodes on different relaychains are not yet possible.']);
|
|
11588
11946
|
_this.name = 'IncompatibleNodes';
|
|
11589
11947
|
return _this;
|
|
11590
11948
|
}
|
|
@@ -13173,8 +13531,8 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
|
|
|
13173
13531
|
_defineProperty({}, version, overriddenCurrency);
|
|
13174
13532
|
};
|
|
13175
13533
|
var createPolkadotXcmHeader = function createPolkadotXcmHeader(scenario, version, destination, nodeId, junction, parents) {
|
|
13176
|
-
var parentsResolved = parents !== null && parents !==
|
|
13177
|
-
var interior = scenario === 'ParaToRelay' ? 'Here' : createX1Payload(version, junction !== null && junction !==
|
|
13534
|
+
var parentsResolved = parents !== null && parents !== undefined ? parents : scenario === 'RelayToPara' ? exports.Parents.ZERO : exports.Parents.ONE;
|
|
13535
|
+
var interior = scenario === 'ParaToRelay' ? 'Here' : createX1Payload(version, junction !== null && junction !== undefined ? junction : {
|
|
13178
13536
|
Parachain: nodeId
|
|
13179
13537
|
});
|
|
13180
13538
|
var isMultiLocationDestination = _typeof(destination) === 'object';
|
|
@@ -13205,7 +13563,7 @@ var resolveTNodeFromMultiLocation = function resolveTNodeFromMultiLocation(relay
|
|
|
13205
13563
|
}
|
|
13206
13564
|
var node = (_NODE_NAMES_DOT_KSM$f = NODE_NAMES_DOT_KSM.find(function (nodeName) {
|
|
13207
13565
|
return getParaId(nodeName) === parachainId && determineRelayChain(nodeName) === relayChain;
|
|
13208
|
-
})) !== null && _NODE_NAMES_DOT_KSM$f !==
|
|
13566
|
+
})) !== null && _NODE_NAMES_DOT_KSM$f !== undefined ? _NODE_NAMES_DOT_KSM$f : null;
|
|
13209
13567
|
if (node === null) {
|
|
13210
13568
|
throw new Error('Node with specified paraId not found in destination multi location.');
|
|
13211
13569
|
}
|
|
@@ -13238,7 +13596,7 @@ var buildMultiLocation = function buildMultiLocation(_ref) {
|
|
|
13238
13596
|
// If it is a native asset, search by symbol on AssetHub and use the multiLocation from there
|
|
13239
13597
|
var assetHubAsset = getOtherAssets(destination).find(function (ahAsset) {
|
|
13240
13598
|
var _ahAsset$symbol, _asset$symbol;
|
|
13241
|
-
return ((_ahAsset$symbol = ahAsset.symbol) === null || _ahAsset$symbol ===
|
|
13599
|
+
return ((_ahAsset$symbol = ahAsset.symbol) === null || _ahAsset$symbol === undefined ? undefined : _ahAsset$symbol.toLowerCase()) === ((_asset$symbol = asset.symbol) === null || _asset$symbol === undefined ? undefined : _asset$symbol.toLowerCase());
|
|
13242
13600
|
});
|
|
13243
13601
|
if (assetHubAsset === undefined) {
|
|
13244
13602
|
throw new InvalidCurrencyError("Asset ".concat(asset.symbol, " not found in AssetHub"));
|
|
@@ -13352,8 +13710,8 @@ var XTokensTransferImpl = /*#__PURE__*/function () {
|
|
|
13352
13710
|
var section = shouldUseMultiasset ? isMultiAsset ? 'transfer_multiassets' : 'transfer_multiasset' : 'transfer';
|
|
13353
13711
|
var parameters = getXTokensParameters(shouldUseMultiasset, modifiedCurrencySelection, addressSelection, asset.amount, fees, overriddenAsset);
|
|
13354
13712
|
var call = {
|
|
13355
|
-
module: pallet !== null && pallet !==
|
|
13356
|
-
section: method !== null && method !==
|
|
13713
|
+
module: pallet !== null && pallet !== undefined ? pallet : 'XTokens',
|
|
13714
|
+
section: method !== null && method !== undefined ? method : section,
|
|
13357
13715
|
parameters: parameters
|
|
13358
13716
|
};
|
|
13359
13717
|
return api.callTxMethod(call);
|
|
@@ -13365,7 +13723,7 @@ var resolveParaId = function resolveParaId(paraId, destination) {
|
|
|
13365
13723
|
if (isTMultiLocation(destination) || isRelayChain(destination) || destination === 'Ethereum') {
|
|
13366
13724
|
return undefined;
|
|
13367
13725
|
}
|
|
13368
|
-
return paraId !== null && paraId !==
|
|
13726
|
+
return paraId !== null && paraId !== undefined ? paraId : getParaId(destination);
|
|
13369
13727
|
};
|
|
13370
13728
|
|
|
13371
13729
|
var supportsXTokens = function supportsXTokens(obj) {
|
|
@@ -13434,7 +13792,7 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
13434
13792
|
}
|
|
13435
13793
|
throw new Error('Sending assets to Polimec is supported only from AssetHubPolkadot');
|
|
13436
13794
|
case 6:
|
|
13437
|
-
versionOrDefault = version !== null && version !==
|
|
13795
|
+
versionOrDefault = version !== null && version !== undefined ? version : this.version;
|
|
13438
13796
|
if (!(supportsXTokens(this) && this.canUseXTokens(options))) {
|
|
13439
13797
|
_context.next = 17;
|
|
13440
13798
|
break;
|
|
@@ -13524,15 +13882,15 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
13524
13882
|
key: "transferRelayToPara",
|
|
13525
13883
|
value: function transferRelayToPara(options) {
|
|
13526
13884
|
var _options$version = options.version,
|
|
13527
|
-
version = _options$version ===
|
|
13885
|
+
version = _options$version === undefined ? exports.Version.V3 : _options$version,
|
|
13528
13886
|
pallet = options.pallet,
|
|
13529
13887
|
method = options.method;
|
|
13530
13888
|
var _this$getRelayToParaO = this.getRelayToParaOverrides(),
|
|
13531
13889
|
section = _this$getRelayToParaO.section,
|
|
13532
13890
|
includeFee = _this$getRelayToParaO.includeFee;
|
|
13533
13891
|
return {
|
|
13534
|
-
module: pallet !== null && pallet !==
|
|
13535
|
-
section: method !== null && method !==
|
|
13892
|
+
module: pallet !== null && pallet !== undefined ? pallet : 'XcmPallet',
|
|
13893
|
+
section: method !== null && method !== undefined ? method : section,
|
|
13536
13894
|
parameters: constructRelayToParaParameters(options, version, {
|
|
13537
13895
|
includeFee: includeFee
|
|
13538
13896
|
})
|
|
@@ -13586,16 +13944,17 @@ var Unique$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
13586
13944
|
key: "transferXTokens",
|
|
13587
13945
|
value: function transferXTokens(input) {
|
|
13588
13946
|
var asset = input.asset;
|
|
13947
|
+
if (asset.symbol === this.getNativeAssetSymbol()) {
|
|
13948
|
+
return XTokensTransferImpl.transferXTokens(input, Unique.NATIVE_ASSET_ID);
|
|
13949
|
+
}
|
|
13589
13950
|
if (!isForeignAsset(asset) || !asset.assetId) {
|
|
13590
13951
|
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " has no assetId"));
|
|
13591
13952
|
}
|
|
13592
|
-
|
|
13593
|
-
ForeignAssetId: BigInt(asset.assetId)
|
|
13594
|
-
};
|
|
13595
|
-
return XTokensTransferImpl.transferXTokens(input, currencySelection);
|
|
13953
|
+
return XTokensTransferImpl.transferXTokens(input, Number(asset.assetId));
|
|
13596
13954
|
}
|
|
13597
13955
|
}]);
|
|
13598
13956
|
}(ParachainNode);
|
|
13957
|
+
Unique$1.NATIVE_ASSET_ID = 0;
|
|
13599
13958
|
|
|
13600
13959
|
var Crust$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
13601
13960
|
function Crust() {
|
|
@@ -13645,8 +14004,8 @@ var PolkadotXCMTransferImpl = /*#__PURE__*/function () {
|
|
|
13645
14004
|
return asset.isFeeAsset;
|
|
13646
14005
|
});
|
|
13647
14006
|
var call = {
|
|
13648
|
-
module: pallet !== null && pallet !==
|
|
13649
|
-
section: method !== null && method !==
|
|
14007
|
+
module: pallet !== null && pallet !== undefined ? pallet : 'PolkadotXcm',
|
|
14008
|
+
section: method !== null && method !== undefined ? method : section,
|
|
13650
14009
|
parameters: _objectSpread2({
|
|
13651
14010
|
dest: header,
|
|
13652
14011
|
beneficiary: addressSelection,
|
|
@@ -13715,7 +14074,7 @@ var BifrostPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
13715
14074
|
currencySelection: createCurrencySpec(asset.amount, this.version, asset.symbol === 'DOT' ? exports.Parents.ONE : exports.Parents.TWO, overriddenAsset, asset.symbol === 'WETH' ? {
|
|
13716
14075
|
X2: [ETHEREUM_JUNCTION, {
|
|
13717
14076
|
AccountKey20: {
|
|
13718
|
-
key: (_getAssetId = getAssetId('Ethereum', 'WETH')) !== null && _getAssetId !==
|
|
14077
|
+
key: (_getAssetId = getAssetId('Ethereum', 'WETH')) !== null && _getAssetId !== undefined ? _getAssetId : ''
|
|
13719
14078
|
}
|
|
13720
14079
|
}]
|
|
13721
14080
|
} : undefined)
|
|
@@ -13859,7 +14218,7 @@ var createCustomXcmOnDest = function createCustomXcmOnDest(_ref4, version) {
|
|
|
13859
14218
|
assets: {
|
|
13860
14219
|
Wild: 'All'
|
|
13861
14220
|
},
|
|
13862
|
-
beneficiary: Object.values(generateAddressPayload(api, scenario, 'PolkadotXcm', ahAddress !== null && ahAddress !==
|
|
14221
|
+
beneficiary: Object.values(generateAddressPayload(api, scenario, 'PolkadotXcm', ahAddress !== null && ahAddress !== undefined ? ahAddress : '', version, undefined))[0]
|
|
13863
14222
|
}
|
|
13864
14223
|
}]
|
|
13865
14224
|
}, {
|
|
@@ -13867,7 +14226,7 @@ var createCustomXcmOnDest = function createCustomXcmOnDest(_ref4, version) {
|
|
|
13867
14226
|
assets: {
|
|
13868
14227
|
Wild: {
|
|
13869
14228
|
AllOf: {
|
|
13870
|
-
id: createEthereumTokenLocation((_asset$assetId = asset.assetId) !== null && _asset$assetId !==
|
|
14229
|
+
id: createEthereumTokenLocation((_asset$assetId = asset.assetId) !== null && _asset$assetId !== undefined ? _asset$assetId : ''),
|
|
13871
14230
|
fun: 'Fungible'
|
|
13872
14231
|
}
|
|
13873
14232
|
}
|
|
@@ -13943,7 +14302,7 @@ var Hydration$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
13943
14302
|
}
|
|
13944
14303
|
throw new Error('Only Ethereum addresses are supported for Ethereum transfers');
|
|
13945
14304
|
case 3:
|
|
13946
|
-
if (!(((_asset$symbol = asset.symbol) === null || _asset$symbol ===
|
|
14305
|
+
if (!(((_asset$symbol = asset.symbol) === null || _asset$symbol === undefined ? undefined : _asset$symbol.toUpperCase()) !== 'WETH')) {
|
|
13947
14306
|
_context2.next = 5;
|
|
13948
14307
|
break;
|
|
13949
14308
|
}
|
|
@@ -13961,8 +14320,8 @@ var Hydration$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
13961
14320
|
}
|
|
13962
14321
|
throw new Error('AssetHub address is required for Ethereum transfers');
|
|
13963
14322
|
case 9:
|
|
13964
|
-
versionOrDefault = version !== null && version !==
|
|
13965
|
-
ethMultiAsset = Object.values(createCurrencySpec(asset.amount, versionOrDefault, exports.Parents.TWO, createEthereumTokenLocation((_asset$assetId2 = asset.assetId) !== null && _asset$assetId2 !==
|
|
14323
|
+
versionOrDefault = version !== null && version !== undefined ? version : exports.Version.V4;
|
|
14324
|
+
ethMultiAsset = Object.values(createCurrencySpec(asset.amount, versionOrDefault, exports.Parents.TWO, createEthereumTokenLocation((_asset$assetId2 = asset.assetId) !== null && _asset$assetId2 !== undefined ? _asset$assetId2 : '')))[0][0];
|
|
13966
14325
|
_context2.next = 13;
|
|
13967
14326
|
return calculateFee(api);
|
|
13968
14327
|
case 13:
|
|
@@ -14003,7 +14362,7 @@ var Hydration$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14003
14362
|
scenario = input.scenario,
|
|
14004
14363
|
version = input.version,
|
|
14005
14364
|
destination = input.destination;
|
|
14006
|
-
var versionOrDefault = version !== null && version !==
|
|
14365
|
+
var versionOrDefault = version !== null && version !== undefined ? version : exports.Version.V3;
|
|
14007
14366
|
var call = {
|
|
14008
14367
|
module: 'PolkadotXcm',
|
|
14009
14368
|
section: 'transfer_assets_using_type_and_then',
|
|
@@ -14102,10 +14461,17 @@ var Litentry$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14102
14461
|
}
|
|
14103
14462
|
_inherits(Litentry, _ParachainNode);
|
|
14104
14463
|
return _createClass(Litentry, [{
|
|
14105
|
-
key: "
|
|
14106
|
-
value: function
|
|
14107
|
-
var
|
|
14108
|
-
|
|
14464
|
+
key: "transferPolkadotXCM",
|
|
14465
|
+
value: function transferPolkadotXCM(input) {
|
|
14466
|
+
var scenario = input.scenario,
|
|
14467
|
+
asset = input.asset;
|
|
14468
|
+
if (scenario !== 'ParaToPara') {
|
|
14469
|
+
throw new ScenarioNotSupportedError(this.node, scenario);
|
|
14470
|
+
}
|
|
14471
|
+
if (asset.symbol !== this.getNativeAssetSymbol()) {
|
|
14472
|
+
throw new InvalidCurrencyError("Asset ".concat(asset.symbol, " is not supported by node ").concat(this.node, "."));
|
|
14473
|
+
}
|
|
14474
|
+
return Promise.resolve(PolkadotXCMTransferImpl.transferPolkadotXCM(input, 'limited_reserve_transfer_assets', 'Unlimited'));
|
|
14109
14475
|
}
|
|
14110
14476
|
}]);
|
|
14111
14477
|
}(ParachainNode);
|
|
@@ -14139,7 +14505,7 @@ var Moonbeam$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14139
14505
|
var asset = input.asset,
|
|
14140
14506
|
scenario = input.scenario,
|
|
14141
14507
|
_input$version = input.version,
|
|
14142
|
-
version = _input$version ===
|
|
14508
|
+
version = _input$version === undefined ? this.version : _input$version,
|
|
14143
14509
|
overriddenAsset = input.overriddenAsset;
|
|
14144
14510
|
var multiLocation = this.getJunctions(asset, scenario);
|
|
14145
14511
|
return Promise.resolve(PolkadotXCMTransferImpl.transferPolkadotXCM(_objectSpread2(_objectSpread2({}, input), {}, {
|
|
@@ -14362,7 +14728,7 @@ var Moonriver$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14362
14728
|
var asset = input.asset,
|
|
14363
14729
|
scenario = input.scenario,
|
|
14364
14730
|
_input$version = input.version,
|
|
14365
|
-
version = _input$version ===
|
|
14731
|
+
version = _input$version === undefined ? this.version : _input$version,
|
|
14366
14732
|
overriddenAsset = input.overriddenAsset;
|
|
14367
14733
|
var multiLocation = this.getJunctions(asset, scenario);
|
|
14368
14734
|
return Promise.resolve(PolkadotXCMTransferImpl.transferPolkadotXCM(_objectSpread2(_objectSpread2({}, input), {}, {
|
|
@@ -14621,8 +14987,8 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14621
14987
|
if (!isForeignAsset(asset)) {
|
|
14622
14988
|
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " has no assetId"));
|
|
14623
14989
|
}
|
|
14624
|
-
var versionOrDefault = version !== null && version !==
|
|
14625
|
-
var ethereumTokenLocation = createEthereumTokenLocation((_asset$assetId = asset.assetId) !== null && _asset$assetId !==
|
|
14990
|
+
var versionOrDefault = version !== null && version !== undefined ? version : _this.version;
|
|
14991
|
+
var ethereumTokenLocation = createEthereumTokenLocation((_asset$assetId = asset.assetId) !== null && _asset$assetId !== undefined ? _asset$assetId : '');
|
|
14626
14992
|
var call = {
|
|
14627
14993
|
module: 'PolkadotXcm',
|
|
14628
14994
|
section: 'transfer_assets_using_type_and_then',
|
|
@@ -14647,14 +15013,14 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14647
15013
|
key: "handleBridgeTransfer",
|
|
14648
15014
|
value: function handleBridgeTransfer(input, targetChain) {
|
|
14649
15015
|
var _input$asset$symbol, _input$asset$symbol2, _input$asset$symbol3, _input$asset$symbol4;
|
|
14650
|
-
if (targetChain === 'Kusama' && ((_input$asset$symbol = input.asset.symbol) === null || _input$asset$symbol ===
|
|
15016
|
+
if (targetChain === 'Kusama' && ((_input$asset$symbol = input.asset.symbol) === null || _input$asset$symbol === undefined ? undefined : _input$asset$symbol.toUpperCase()) === 'KSM' || targetChain === 'Polkadot' && ((_input$asset$symbol2 = input.asset.symbol) === null || _input$asset$symbol2 === undefined ? undefined : _input$asset$symbol2.toUpperCase()) === 'DOT') {
|
|
14651
15017
|
var modifiedInput = _objectSpread2(_objectSpread2({}, input), {}, {
|
|
14652
15018
|
header: createBridgePolkadotXcmDest(exports.Version.V4, targetChain, input.destination, input.paraIdTo),
|
|
14653
15019
|
addressSelection: generateAddressMultiLocationV4(input.api, input.address),
|
|
14654
15020
|
currencySelection: createBridgeCurrencySpec(input.asset.amount, targetChain)
|
|
14655
15021
|
});
|
|
14656
15022
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'transfer_assets', 'Unlimited');
|
|
14657
|
-
} else if (targetChain === 'Polkadot' && ((_input$asset$symbol3 = input.asset.symbol) === null || _input$asset$symbol3 ===
|
|
15023
|
+
} else if (targetChain === 'Polkadot' && ((_input$asset$symbol3 = input.asset.symbol) === null || _input$asset$symbol3 === undefined ? undefined : _input$asset$symbol3.toUpperCase()) === 'KSM' || targetChain === 'Kusama' && ((_input$asset$symbol4 = input.asset.symbol) === null || _input$asset$symbol4 === undefined ? undefined : _input$asset$symbol4.toUpperCase()) === 'DOT') {
|
|
14658
15024
|
var _modifiedInput = _objectSpread2(_objectSpread2({}, input), {}, {
|
|
14659
15025
|
header: createBridgePolkadotXcmDest(exports.Version.V3, targetChain, input.destination, input.paraIdTo),
|
|
14660
15026
|
currencySelection: createCurrencySpec(input.asset.amount, exports.Version.V3, exports.Parents.ONE, input.overriddenAsset)
|
|
@@ -14691,7 +15057,7 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14691
15057
|
interior: {
|
|
14692
15058
|
X2: [ETHEREUM_JUNCTION, {
|
|
14693
15059
|
AccountKey20: {
|
|
14694
|
-
key: (_ethAsset$assetId = ethAsset.assetId) !== null && _ethAsset$assetId !==
|
|
15060
|
+
key: (_ethAsset$assetId = ethAsset.assetId) !== null && _ethAsset$assetId !== undefined ? _ethAsset$assetId : ''
|
|
14695
15061
|
}
|
|
14696
15062
|
}]
|
|
14697
15063
|
}
|
|
@@ -14722,7 +15088,7 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14722
15088
|
var modifiedInput = _objectSpread2(_objectSpread2({}, input), {}, {
|
|
14723
15089
|
header: this.createPolkadotXcmHeader(scenario, version, destination, paraId),
|
|
14724
15090
|
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, version, paraId),
|
|
14725
|
-
currencySelection: this.createCurrencySpec(asset.amount, scenario, version, asset, overriddenAsset !== null && overriddenAsset !==
|
|
15091
|
+
currencySelection: this.createCurrencySpec(asset.amount, scenario, version, asset, overriddenAsset !== null && overriddenAsset !== undefined ? overriddenAsset : customMultiLocation)
|
|
14726
15092
|
});
|
|
14727
15093
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'limited_teleport_assets', 'Unlimited');
|
|
14728
15094
|
}
|
|
@@ -14738,9 +15104,9 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14738
15104
|
api = input.api,
|
|
14739
15105
|
version = input.version,
|
|
14740
15106
|
address = input.address;
|
|
14741
|
-
if ((((_asset$symbol = asset.symbol) === null || _asset$symbol ===
|
|
15107
|
+
if ((((_asset$symbol = asset.symbol) === null || _asset$symbol === undefined ? undefined : _asset$symbol.toUpperCase()) === 'USDT' || ((_asset$symbol2 = asset.symbol) === null || _asset$symbol2 === undefined ? undefined : _asset$symbol2.toUpperCase()) === 'USDC') && destination === 'BifrostPolkadot') {
|
|
14742
15108
|
var _input$version;
|
|
14743
|
-
var versionOrDefault = (_input$version = input.version) !== null && _input$version !==
|
|
15109
|
+
var versionOrDefault = (_input$version = input.version) !== null && _input$version !== undefined ? _input$version : exports.Version.V2;
|
|
14744
15110
|
return _objectSpread2(_objectSpread2({}, input), {}, {
|
|
14745
15111
|
header: this.createPolkadotXcmHeader(scenario, versionOrDefault, destination, paraIdTo),
|
|
14746
15112
|
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, versionOrDefault, paraIdTo),
|
|
@@ -14748,7 +15114,7 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14748
15114
|
});
|
|
14749
15115
|
}
|
|
14750
15116
|
if ((destination === 'Hydration' || destination === 'Polimec') && asset.symbol === 'DOT') {
|
|
14751
|
-
var _versionOrDefault = version !== null && version !==
|
|
15117
|
+
var _versionOrDefault = version !== null && version !== undefined ? version : this.version;
|
|
14752
15118
|
return _objectSpread2(_objectSpread2({}, input), {}, {
|
|
14753
15119
|
currencySelection: _superPropGet(AssetHubPolkadot, "createCurrencySpec", this, 3)([asset.amount, 'ParaToRelay', _versionOrDefault, asset, overriddenAsset])
|
|
14754
15120
|
});
|
|
@@ -15138,20 +15504,25 @@ var Crab$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15138
15504
|
|
|
15139
15505
|
var Quartz$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
15140
15506
|
function Quartz() {
|
|
15141
|
-
var _this;
|
|
15142
15507
|
_classCallCheck(this, Quartz);
|
|
15143
|
-
|
|
15144
|
-
_this._assetCheckEnabled = false;
|
|
15145
|
-
return _this;
|
|
15508
|
+
return _callSuper(this, Quartz, ['Quartz', 'quartz', 'kusama', exports.Version.V3]);
|
|
15146
15509
|
}
|
|
15147
15510
|
_inherits(Quartz, _ParachainNode);
|
|
15148
15511
|
return _createClass(Quartz, [{
|
|
15149
15512
|
key: "transferXTokens",
|
|
15150
15513
|
value: function transferXTokens(input) {
|
|
15151
|
-
|
|
15514
|
+
var asset = input.asset;
|
|
15515
|
+
if (asset.symbol === this.getNativeAssetSymbol()) {
|
|
15516
|
+
return XTokensTransferImpl.transferXTokens(input, Quartz.NATIVE_ASSET_ID);
|
|
15517
|
+
}
|
|
15518
|
+
if (!isForeignAsset(asset) || !asset.assetId) {
|
|
15519
|
+
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " has no assetId"));
|
|
15520
|
+
}
|
|
15521
|
+
return XTokensTransferImpl.transferXTokens(input, Number(asset.assetId));
|
|
15152
15522
|
}
|
|
15153
15523
|
}]);
|
|
15154
15524
|
}(ParachainNode);
|
|
15525
|
+
Quartz$1.NATIVE_ASSET_ID = 0;
|
|
15155
15526
|
|
|
15156
15527
|
var Shiden$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
15157
15528
|
function Shiden() {
|
|
@@ -15340,14 +15711,14 @@ var Collectives$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15340
15711
|
var determineDestWeight = function determineDestWeight(destNode) {
|
|
15341
15712
|
if (destNode === 'Astar') {
|
|
15342
15713
|
return {
|
|
15343
|
-
|
|
15344
|
-
|
|
15714
|
+
ref_time: 6000000000n,
|
|
15715
|
+
proof_size: 1000000n
|
|
15345
15716
|
};
|
|
15346
15717
|
}
|
|
15347
15718
|
if (destNode === 'Moonbeam' || destNode === 'Hydration') {
|
|
15348
15719
|
return {
|
|
15349
|
-
|
|
15350
|
-
|
|
15720
|
+
ref_time: 5000000000n,
|
|
15721
|
+
proof_size: 0n
|
|
15351
15722
|
};
|
|
15352
15723
|
}
|
|
15353
15724
|
throw new NodeNotSupportedError("Node ".concat(destNode, " is not supported"));
|
|
@@ -15404,8 +15775,8 @@ var XTransferTransferImpl = /*#__PURE__*/function () {
|
|
|
15404
15775
|
var section = 'transfer';
|
|
15405
15776
|
var destWeight = origin === 'Khala' ? null : determineDestWeight(destination);
|
|
15406
15777
|
var call = {
|
|
15407
|
-
module: pallet !== null && pallet !==
|
|
15408
|
-
section: method !== null && method !==
|
|
15778
|
+
module: pallet !== null && pallet !== undefined ? pallet : 'XTransfer',
|
|
15779
|
+
section: method !== null && method !== undefined ? method : section,
|
|
15409
15780
|
parameters: {
|
|
15410
15781
|
asset: currencySpec,
|
|
15411
15782
|
dest: dest,
|
|
@@ -15427,7 +15798,7 @@ var Khala$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15427
15798
|
key: "transferXTransfer",
|
|
15428
15799
|
value: function transferXTransfer(input) {
|
|
15429
15800
|
var asset = input.asset;
|
|
15430
|
-
if (asset.symbol !==
|
|
15801
|
+
if (asset.symbol !== this.getNativeAssetSymbol()) {
|
|
15431
15802
|
throw new InvalidCurrencyError("Node ".concat(this.node, " does not support currency ").concat(asset.symbol));
|
|
15432
15803
|
}
|
|
15433
15804
|
return XTransferTransferImpl.transferXTransfer(input);
|
|
@@ -15697,7 +16068,7 @@ var Polimec$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15697
16068
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15698
16069
|
while (1) switch (_context.prev = _context.next) {
|
|
15699
16070
|
case 0:
|
|
15700
|
-
api = input.api, _input$version = input.version, version = _input$version ===
|
|
16071
|
+
api = input.api, _input$version = input.version, version = _input$version === undefined ? this.version : _input$version, asset = input.asset, destination = input.destination, address = input.address, scenario = input.scenario, paraIdTo = input.paraIdTo;
|
|
15701
16072
|
if (!(scenario === 'ParaToPara' && destination === 'AssetHubPolkadot')) {
|
|
15702
16073
|
_context.next = 4;
|
|
15703
16074
|
break;
|
|
@@ -15713,7 +16084,7 @@ var Polimec$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15713
16084
|
}
|
|
15714
16085
|
throw new ScenarioNotSupportedError(this.node, scenario);
|
|
15715
16086
|
case 6:
|
|
15716
|
-
versionOrDefault = version !== null && version !==
|
|
16087
|
+
versionOrDefault = version !== null && version !== undefined ? version : exports.Version.V3;
|
|
15717
16088
|
call = {
|
|
15718
16089
|
module: 'PolkadotXcm',
|
|
15719
16090
|
section: 'transfer_assets_using_type_and_then',
|
|
@@ -15748,7 +16119,7 @@ var Polimec$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15748
16119
|
key: "transferRelayToPara",
|
|
15749
16120
|
value: function transferRelayToPara(options) {
|
|
15750
16121
|
var _options$version = options.version,
|
|
15751
|
-
version = _options$version ===
|
|
16122
|
+
version = _options$version === undefined ? exports.Version.V3 : _options$version,
|
|
15752
16123
|
api = options.api,
|
|
15753
16124
|
asset = options.asset,
|
|
15754
16125
|
address = options.address,
|
|
@@ -15886,7 +16257,7 @@ var findBestMatches = function findBestMatches(assets, value) {
|
|
|
15886
16257
|
// Case-insensitive match
|
|
15887
16258
|
matches = assets.filter(function (asset) {
|
|
15888
16259
|
var _asset$property;
|
|
15889
|
-
return ((_asset$property = asset[property]) === null || _asset$property ===
|
|
16260
|
+
return ((_asset$property = asset[property]) === null || _asset$property === undefined ? undefined : _asset$property.toLowerCase()) === lowerValue;
|
|
15890
16261
|
});
|
|
15891
16262
|
return matches;
|
|
15892
16263
|
};
|
|
@@ -16067,8 +16438,8 @@ var findAssetByMultiLocation = function findAssetByMultiLocation(foreignAssets,
|
|
|
16067
16438
|
var sanitizedInput = sanitizeMultiLocation(multiLocation);
|
|
16068
16439
|
return foreignAssets.find(function (asset) {
|
|
16069
16440
|
var _asset$multiLocation, _asset$xcmInterior;
|
|
16070
|
-
var assetMLStr = JSON.stringify((_asset$multiLocation = asset.multiLocation) !== null && _asset$multiLocation !==
|
|
16071
|
-
var assetMLInteriorStr = JSON.stringify((_asset$xcmInterior = asset.xcmInterior) !== null && _asset$xcmInterior !==
|
|
16441
|
+
var assetMLStr = JSON.stringify((_asset$multiLocation = asset.multiLocation) !== null && _asset$multiLocation !== undefined ? _asset$multiLocation : '');
|
|
16442
|
+
var assetMLInteriorStr = JSON.stringify((_asset$xcmInterior = asset.xcmInterior) !== null && _asset$xcmInterior !== undefined ? _asset$xcmInterior : '');
|
|
16072
16443
|
var sanitizedAssetMLStr = sanitizeMultiLocation(assetMLStr);
|
|
16073
16444
|
var sanitizedAssetMLInteriorStr = sanitizeMultiLocation(assetMLInteriorStr);
|
|
16074
16445
|
return (
|
|
@@ -16128,13 +16499,13 @@ var getExistentialDeposit = function getExistentialDeposit(node, currency) {
|
|
|
16128
16499
|
var assetsObject = getAssetsObject(node);
|
|
16129
16500
|
if (!currency) {
|
|
16130
16501
|
var _assetsObject$nativeA;
|
|
16131
|
-
return (_assetsObject$nativeA = assetsObject.nativeAssets[0].existentialDeposit) !== null && _assetsObject$nativeA !==
|
|
16502
|
+
return (_assetsObject$nativeA = assetsObject.nativeAssets[0].existentialDeposit) !== null && _assetsObject$nativeA !== undefined ? _assetsObject$nativeA : null;
|
|
16132
16503
|
}
|
|
16133
|
-
var asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !==
|
|
16504
|
+
var asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !== undefined ? _getAssetBySymbolOrId : node === 'AssetHubPolkadot' ? getAssetBySymbolOrId('Ethereum', currency, null) : null;
|
|
16134
16505
|
if (!asset) {
|
|
16135
16506
|
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(currency), " not found on ").concat(node));
|
|
16136
16507
|
}
|
|
16137
|
-
return (_asset$existentialDep = asset.existentialDeposit) !== null && _asset$existentialDep !==
|
|
16508
|
+
return (_asset$existentialDep = asset.existentialDeposit) !== null && _asset$existentialDep !== undefined ? _asset$existentialDep : null;
|
|
16138
16509
|
};
|
|
16139
16510
|
|
|
16140
16511
|
var assetsMap = assetsMapJson;
|
|
@@ -16278,7 +16649,7 @@ var getAssetDecimals = function getAssetDecimals(node, symbol) {
|
|
|
16278
16649
|
var asset = [].concat(_toConsumableArray(otherAssets), _toConsumableArray(nativeAssets)).find(function (o) {
|
|
16279
16650
|
return o.symbol === symbol;
|
|
16280
16651
|
});
|
|
16281
|
-
return (asset === null || asset ===
|
|
16652
|
+
return (asset === null || asset === undefined ? undefined : asset.decimals) !== undefined ? asset.decimals : null;
|
|
16282
16653
|
};
|
|
16283
16654
|
/**
|
|
16284
16655
|
* Retrieves the node name corresponding to a specified parachain ID.
|
|
@@ -16293,7 +16664,7 @@ var getTNode = function getTNode(paraId, ecosystem) {
|
|
|
16293
16664
|
}
|
|
16294
16665
|
return (_NODE_NAMES_DOT_KSM$f = NODE_NAMES_DOT_KSM.find(function (nodeName) {
|
|
16295
16666
|
return getNode(nodeName).type === ecosystem && getParaId(nodeName) === paraId;
|
|
16296
|
-
})) !== null && _NODE_NAMES_DOT_KSM$f !==
|
|
16667
|
+
})) !== null && _NODE_NAMES_DOT_KSM$f !== undefined ? _NODE_NAMES_DOT_KSM$f : null;
|
|
16297
16668
|
};
|
|
16298
16669
|
|
|
16299
16670
|
var AssetHubPolkadot = {
|
|
@@ -17234,7 +17605,7 @@ var getBalanceForeignInternal = /*#__PURE__*/function () {
|
|
|
17234
17605
|
_context.next = 3;
|
|
17235
17606
|
return api.init(node);
|
|
17236
17607
|
case 3:
|
|
17237
|
-
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !==
|
|
17608
|
+
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !== undefined ? _getAssetBySymbolOrId : node === 'AssetHubPolkadot' ? getAssetBySymbolOrId('Ethereum', currency, null) : null;
|
|
17238
17609
|
if (asset) {
|
|
17239
17610
|
_context.next = 6;
|
|
17240
17611
|
break;
|
|
@@ -17411,7 +17782,7 @@ var getAssetBalanceInternal = /*#__PURE__*/function () {
|
|
|
17411
17782
|
_context.next = 16;
|
|
17412
17783
|
break;
|
|
17413
17784
|
}
|
|
17414
|
-
_context.t1 = _yield$getBalanceFore !==
|
|
17785
|
+
_context.t1 = _yield$getBalanceFore !== undefined;
|
|
17415
17786
|
case 16:
|
|
17416
17787
|
if (!_context.t1) {
|
|
17417
17788
|
_context.next = 20;
|
|
@@ -17465,10 +17836,6 @@ var getAssetBalance = /*#__PURE__*/function () {
|
|
|
17465
17836
|
};
|
|
17466
17837
|
}();
|
|
17467
17838
|
|
|
17468
|
-
var isPjsClient = function isPjsClient(api) {
|
|
17469
|
-
return _typeof(api) === 'object' && api !== null && 'disconnect' in api && typeof api.disconnect === 'function';
|
|
17470
|
-
};
|
|
17471
|
-
|
|
17472
17839
|
var buildBeneficiaryInput = function buildBeneficiaryInput(api, address) {
|
|
17473
17840
|
if (isTMultiLocation(address)) {
|
|
17474
17841
|
return address;
|
|
@@ -17495,7 +17862,7 @@ var buildClaimAssetsInput = function buildClaimAssetsInput(_ref) {
|
|
|
17495
17862
|
multiAssets = _ref.multiAssets,
|
|
17496
17863
|
address = _ref.address,
|
|
17497
17864
|
_ref$version = _ref.version,
|
|
17498
|
-
version = _ref$version ===
|
|
17865
|
+
version = _ref$version === undefined ? exports.Version.V3 : _ref$version;
|
|
17499
17866
|
return {
|
|
17500
17867
|
assets: _defineProperty({}, version, multiAssets),
|
|
17501
17868
|
beneficiary: _defineProperty({}, version, buildBeneficiaryInput(api, address))
|
|
@@ -17512,7 +17879,6 @@ var claimAssets = /*#__PURE__*/function () {
|
|
|
17512
17879
|
_context.next = 3;
|
|
17513
17880
|
return api.init(node);
|
|
17514
17881
|
case 3:
|
|
17515
|
-
_context.prev = 3;
|
|
17516
17882
|
args = buildClaimAssetsInput(options);
|
|
17517
17883
|
module = isRelayChain(node) ? 'XcmPallet' : 'PolkadotXcm';
|
|
17518
17884
|
call = {
|
|
@@ -17521,21 +17887,11 @@ var claimAssets = /*#__PURE__*/function () {
|
|
|
17521
17887
|
parameters: args
|
|
17522
17888
|
};
|
|
17523
17889
|
return _context.abrupt("return", api.callTxMethod(call));
|
|
17524
|
-
case
|
|
17525
|
-
_context.prev = 8;
|
|
17526
|
-
if (!isPjsClient(api.getApi())) {
|
|
17527
|
-
_context.next = 12;
|
|
17528
|
-
break;
|
|
17529
|
-
}
|
|
17530
|
-
_context.next = 12;
|
|
17531
|
-
return api.disconnect();
|
|
17532
|
-
case 12:
|
|
17533
|
-
return _context.finish(8);
|
|
17534
|
-
case 13:
|
|
17890
|
+
case 7:
|
|
17535
17891
|
case "end":
|
|
17536
17892
|
return _context.stop();
|
|
17537
17893
|
}
|
|
17538
|
-
}, _callee
|
|
17894
|
+
}, _callee);
|
|
17539
17895
|
}));
|
|
17540
17896
|
return function claimAssets(_x) {
|
|
17541
17897
|
return _ref.apply(this, arguments);
|
|
@@ -17628,6 +17984,25 @@ var AssetClaimBuilder = /*#__PURE__*/function () {
|
|
|
17628
17984
|
}
|
|
17629
17985
|
return build;
|
|
17630
17986
|
}())
|
|
17987
|
+
}, {
|
|
17988
|
+
key: "disconnect",
|
|
17989
|
+
value: function () {
|
|
17990
|
+
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
17991
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
17992
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
17993
|
+
case 0:
|
|
17994
|
+
return _context2.abrupt("return", this.api.disconnect(true));
|
|
17995
|
+
case 1:
|
|
17996
|
+
case "end":
|
|
17997
|
+
return _context2.stop();
|
|
17998
|
+
}
|
|
17999
|
+
}, _callee2, this);
|
|
18000
|
+
}));
|
|
18001
|
+
function disconnect() {
|
|
18002
|
+
return _disconnect.apply(this, arguments);
|
|
18003
|
+
}
|
|
18004
|
+
return disconnect;
|
|
18005
|
+
}()
|
|
17631
18006
|
}], [{
|
|
17632
18007
|
key: "create",
|
|
17633
18008
|
value: function create(api, node) {
|
|
@@ -17693,13 +18068,7 @@ var BatchTransactionManager = /*#__PURE__*/function () {
|
|
|
17693
18068
|
return Promise.all(results);
|
|
17694
18069
|
case 12:
|
|
17695
18070
|
txs = _context.sent;
|
|
17696
|
-
return _context.abrupt("return", api.
|
|
17697
|
-
module: 'Utility',
|
|
17698
|
-
section: mode === exports.BatchMode.BATCH_ALL ? 'batch_all' : 'batch',
|
|
17699
|
-
parameters: {
|
|
17700
|
-
data: [txs]
|
|
17701
|
-
}
|
|
17702
|
-
}));
|
|
18071
|
+
return _context.abrupt("return", api.callBatchMethod(txs, mode));
|
|
17703
18072
|
case 14:
|
|
17704
18073
|
case "end":
|
|
17705
18074
|
return _context.stop();
|
|
@@ -17944,6 +18313,25 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
17944
18313
|
}
|
|
17945
18314
|
return dryRun;
|
|
17946
18315
|
}()
|
|
18316
|
+
}, {
|
|
18317
|
+
key: "disconnect",
|
|
18318
|
+
value: function () {
|
|
18319
|
+
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
18320
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
18321
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
18322
|
+
case 0:
|
|
18323
|
+
return _context4.abrupt("return", this.api.disconnect(true));
|
|
18324
|
+
case 1:
|
|
18325
|
+
case "end":
|
|
18326
|
+
return _context4.stop();
|
|
18327
|
+
}
|
|
18328
|
+
}, _callee4, this);
|
|
18329
|
+
}));
|
|
18330
|
+
function disconnect() {
|
|
18331
|
+
return _disconnect.apply(this, arguments);
|
|
18332
|
+
}
|
|
18333
|
+
return disconnect;
|
|
18334
|
+
}()
|
|
17947
18335
|
}]);
|
|
17948
18336
|
}();
|
|
17949
18337
|
/**
|
|
@@ -17963,7 +18351,7 @@ var getOriginFeeDetailsInternal = /*#__PURE__*/function () {
|
|
|
17963
18351
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17964
18352
|
while (1) switch (_context.prev = _context.next) {
|
|
17965
18353
|
case 0:
|
|
17966
|
-
api = _ref.api, account = _ref.account, accountDestination = _ref.accountDestination, currency = _ref.currency, origin = _ref.origin, destination = _ref.destination, _ref$feeMarginPercent = _ref.feeMarginPercentage, feeMarginPercentage = _ref$feeMarginPercent ===
|
|
18354
|
+
api = _ref.api, account = _ref.account, accountDestination = _ref.accountDestination, currency = _ref.currency, origin = _ref.origin, destination = _ref.destination, _ref$feeMarginPercent = _ref.feeMarginPercentage, feeMarginPercentage = _ref$feeMarginPercent === undefined ? 10 : _ref$feeMarginPercent;
|
|
17967
18355
|
_context.next = 3;
|
|
17968
18356
|
return api.init(origin);
|
|
17969
18357
|
case 3:
|
|
@@ -17984,7 +18372,7 @@ var getOriginFeeDetailsInternal = /*#__PURE__*/function () {
|
|
|
17984
18372
|
});
|
|
17985
18373
|
case 12:
|
|
17986
18374
|
nativeBalance = _context.sent;
|
|
17987
|
-
existentialDeposit = BigInt((_getExistentialDeposi = getExistentialDeposit(origin)) !== null && _getExistentialDeposi !==
|
|
18375
|
+
existentialDeposit = BigInt((_getExistentialDeposi = getExistentialDeposit(origin)) !== null && _getExistentialDeposi !== undefined ? _getExistentialDeposi : '0');
|
|
17988
18376
|
sufficientForXCM = nativeBalance - existentialDeposit - xcmFeeWithMargin > 0;
|
|
17989
18377
|
return _context.abrupt("return", {
|
|
17990
18378
|
sufficientForXCM: sufficientForXCM,
|
|
@@ -18092,7 +18480,7 @@ var getMaxForeignTransferableAmount = /*#__PURE__*/function () {
|
|
|
18092
18480
|
case 0:
|
|
18093
18481
|
api = _ref3.api, address = _ref3.address, node = _ref3.node, currency = _ref3.currency;
|
|
18094
18482
|
validateAddress(address, node, false);
|
|
18095
|
-
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !==
|
|
18483
|
+
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !== undefined ? _getAssetBySymbolOrId : node === 'AssetHubPolkadot' ? getAssetBySymbolOrId('Ethereum', currency, null) : null;
|
|
18096
18484
|
if (asset) {
|
|
18097
18485
|
_context2.next = 5;
|
|
18098
18486
|
break;
|
|
@@ -18143,7 +18531,7 @@ var getTransferableAmount = /*#__PURE__*/function () {
|
|
|
18143
18531
|
case 0:
|
|
18144
18532
|
api = _ref5.api, address = _ref5.address, node = _ref5.node, currency = _ref5.currency;
|
|
18145
18533
|
validateAddress(address, node, false);
|
|
18146
|
-
asset = (_getAssetBySymbolOrId2 = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId2 !==
|
|
18534
|
+
asset = (_getAssetBySymbolOrId2 = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId2 !== undefined ? _getAssetBySymbolOrId2 : node === 'AssetHubPolkadot' ? getAssetBySymbolOrId('Ethereum', currency, null) : null;
|
|
18147
18535
|
if (asset) {
|
|
18148
18536
|
_context3.next = 5;
|
|
18149
18537
|
break;
|
|
@@ -18217,7 +18605,7 @@ var getTransferInfo = /*#__PURE__*/function () {
|
|
|
18217
18605
|
case 14:
|
|
18218
18606
|
xcmFeeDetails = _context.sent;
|
|
18219
18607
|
expectedBalanceAfterXCMDelivery = originBalance - xcmFeeDetails.xcmFee;
|
|
18220
|
-
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(origin, currency, destination)) !== null && _getAssetBySymbolOrId !==
|
|
18608
|
+
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(origin, currency, destination)) !== null && _getAssetBySymbolOrId !== undefined ? _getAssetBySymbolOrId : origin === 'AssetHubPolkadot' ? getAssetBySymbolOrId('Ethereum', currency, null) : null;
|
|
18221
18609
|
if (asset) {
|
|
18222
18610
|
_context.next = 19;
|
|
18223
18611
|
break;
|
|
@@ -18238,7 +18626,7 @@ var getTransferInfo = /*#__PURE__*/function () {
|
|
|
18238
18626
|
});
|
|
18239
18627
|
case 22:
|
|
18240
18628
|
_context.t1 = _context.sent;
|
|
18241
|
-
_context.t2 = (_asset$symbol = asset === null || asset ===
|
|
18629
|
+
_context.t2 = (_asset$symbol = asset === null || asset === undefined ? undefined : asset.symbol) !== null && _asset$symbol !== undefined ? _asset$symbol : '';
|
|
18242
18630
|
_context.t3 = {
|
|
18243
18631
|
balance: _context.t1,
|
|
18244
18632
|
currency: _context.t2
|
|
@@ -18246,9 +18634,9 @@ var getTransferInfo = /*#__PURE__*/function () {
|
|
|
18246
18634
|
_context.t4 = originBalance;
|
|
18247
18635
|
_context.t5 = expectedBalanceAfterXCMDelivery;
|
|
18248
18636
|
_context.t6 = xcmFeeDetails;
|
|
18249
|
-
_context.t7 = BigInt((_getExistentialDeposi = getExistentialDeposit(origin)) !== null && _getExistentialDeposi !==
|
|
18637
|
+
_context.t7 = BigInt((_getExistentialDeposi = getExistentialDeposit(origin)) !== null && _getExistentialDeposi !== undefined ? _getExistentialDeposi : 0);
|
|
18250
18638
|
_context.t8 = getNativeAssetSymbol(origin);
|
|
18251
|
-
_context.t9 = BigInt((_getExistentialDeposi2 = getExistentialDeposit(origin)) !== null && _getExistentialDeposi2 !==
|
|
18639
|
+
_context.t9 = BigInt((_getExistentialDeposi2 = getExistentialDeposit(origin)) !== null && _getExistentialDeposi2 !== undefined ? _getExistentialDeposi2 : 0);
|
|
18252
18640
|
_context.next = 33;
|
|
18253
18641
|
return getMaxNativeTransferableAmount({
|
|
18254
18642
|
api: api,
|
|
@@ -18275,7 +18663,7 @@ var getTransferInfo = /*#__PURE__*/function () {
|
|
|
18275
18663
|
case 37:
|
|
18276
18664
|
_context.t12 = _context.sent;
|
|
18277
18665
|
_context.t13 = getNativeAssetSymbol(destination);
|
|
18278
|
-
_context.t14 = BigInt((_getExistentialDeposi3 = getExistentialDeposit(destination)) !== null && _getExistentialDeposi3 !==
|
|
18666
|
+
_context.t14 = BigInt((_getExistentialDeposi3 = getExistentialDeposit(destination)) !== null && _getExistentialDeposi3 !== undefined ? _getExistentialDeposi3 : 0);
|
|
18279
18667
|
_context.t15 = {
|
|
18280
18668
|
balance: _context.t12,
|
|
18281
18669
|
currency: _context.t13,
|
|
@@ -18513,7 +18901,7 @@ var getMultiLocationTokenId = function getMultiLocationTokenId(location, node) {
|
|
|
18513
18901
|
var assetId = location.interior.value[1].value;
|
|
18514
18902
|
return (_foreignAssets$find$a = (_foreignAssets$find = foreignAssets.find(function (asset) {
|
|
18515
18903
|
return asset.assetId === String(assetId);
|
|
18516
|
-
})) === null || _foreignAssets$find ===
|
|
18904
|
+
})) === null || _foreignAssets$find === undefined ? undefined : _foreignAssets$find.assetId) !== null && _foreignAssets$find$a !== undefined ? _foreignAssets$find$a : null;
|
|
18517
18905
|
}
|
|
18518
18906
|
}
|
|
18519
18907
|
return null;
|
|
@@ -18582,7 +18970,7 @@ var getMultiLocationTokenIdPjs = function getMultiLocationTokenIdPjs(location, n
|
|
|
18582
18970
|
var assetId = junctions[1].GeneralIndex;
|
|
18583
18971
|
return (_foreignAssets$find$s = (_foreignAssets$find = foreignAssets.find(function (asset) {
|
|
18584
18972
|
return asset.assetId === String(assetId);
|
|
18585
|
-
})) === null || _foreignAssets$find ===
|
|
18973
|
+
})) === null || _foreignAssets$find === undefined ? undefined : _foreignAssets$find.symbol) !== null && _foreignAssets$find$s !== undefined ? _foreignAssets$find$s : null;
|
|
18586
18974
|
}
|
|
18587
18975
|
}
|
|
18588
18976
|
return null;
|
|
@@ -18696,6 +19084,9 @@ var validateCurrency = function validateCurrency(currency) {
|
|
|
18696
19084
|
}
|
|
18697
19085
|
};
|
|
18698
19086
|
var validateDestination = function validateDestination(origin, destination) {
|
|
19087
|
+
if (isRelayChain(origin) && !isTMultiLocation(destination) && isRelayChain(destination)) {
|
|
19088
|
+
throw new IncompatibleNodesError('Direct relay chain to relay chain transfers are not supported. Please use Polkadot <-> Kusama bridge through AssetHub.');
|
|
19089
|
+
}
|
|
18699
19090
|
if (destination === 'Ethereum' && origin !== 'AssetHubPolkadot' && origin !== 'Hydration') {
|
|
18700
19091
|
throw new IncompatibleNodesError('Transfers to Ethereum are only supported from AssetHubPolkadot and Hydration.');
|
|
18701
19092
|
}
|
|
@@ -18736,12 +19127,12 @@ var validateAssetSupport = function validateAssetSupport(_ref, assetCheckEnabled
|
|
|
18736
19127
|
}
|
|
18737
19128
|
if ('symbol' in currency && nativeAssets.some(function (nativeAsset) {
|
|
18738
19129
|
var _asset$symbol;
|
|
18739
|
-
return nativeAsset.symbol.toLowerCase() === (asset === null || asset ===
|
|
19130
|
+
return nativeAsset.symbol.toLowerCase() === (asset === null || asset === undefined || (_asset$symbol = asset.symbol) === null || _asset$symbol === undefined ? undefined : _asset$symbol.toLowerCase());
|
|
18740
19131
|
})) {
|
|
18741
|
-
throw new InvalidCurrencyError("".concat(JSON.stringify(asset === null || asset ===
|
|
19132
|
+
throw new InvalidCurrencyError("".concat(JSON.stringify(asset === null || asset === undefined ? undefined : asset.symbol), " is not supported for transfers to ").concat(destination, "."));
|
|
18742
19133
|
}
|
|
18743
19134
|
}
|
|
18744
|
-
if (!isBridge && !isRelayDestination && !isMultiLocationDestination && (asset === null || asset ===
|
|
19135
|
+
if (!isBridge && !isRelayDestination && !isMultiLocationDestination && (asset === null || asset === undefined ? undefined : asset.symbol) !== undefined && assetCheckEnabled && !('id' in currency) && !hasSupportForAsset(destination, asset.symbol)) {
|
|
18745
19136
|
throw new InvalidCurrencyError("Destination node ".concat(destination, " does not support currency ").concat(JSON.stringify(currency), "."));
|
|
18746
19137
|
}
|
|
18747
19138
|
if (!isBridge && asset === null && assetCheckEnabled) {
|
|
@@ -18766,7 +19157,6 @@ var transferRelayToPara = /*#__PURE__*/function () {
|
|
|
18766
19157
|
_context.next = 6;
|
|
18767
19158
|
return api.init(origin);
|
|
18768
19159
|
case 6:
|
|
18769
|
-
_context.prev = 6;
|
|
18770
19160
|
serializedApiCall = getNode(isMultiLocationDestination ? resolveTNodeFromMultiLocation(origin, destination) : destination).transferRelayToPara({
|
|
18771
19161
|
api: api,
|
|
18772
19162
|
origin: origin,
|
|
@@ -18779,21 +19169,11 @@ var transferRelayToPara = /*#__PURE__*/function () {
|
|
|
18779
19169
|
method: method
|
|
18780
19170
|
});
|
|
18781
19171
|
return _context.abrupt("return", api.callTxMethod(serializedApiCall));
|
|
18782
|
-
case
|
|
18783
|
-
_context.prev = 9;
|
|
18784
|
-
if (!isPjsClient(api.getApi())) {
|
|
18785
|
-
_context.next = 13;
|
|
18786
|
-
break;
|
|
18787
|
-
}
|
|
18788
|
-
_context.next = 13;
|
|
18789
|
-
return api.disconnect();
|
|
18790
|
-
case 13:
|
|
18791
|
-
return _context.finish(9);
|
|
18792
|
-
case 14:
|
|
19172
|
+
case 8:
|
|
18793
19173
|
case "end":
|
|
18794
19174
|
return _context.stop();
|
|
18795
19175
|
}
|
|
18796
|
-
}, _callee
|
|
19176
|
+
}, _callee);
|
|
18797
19177
|
}));
|
|
18798
19178
|
return function transferRelayToPara(_x) {
|
|
18799
19179
|
return _ref.apply(this, arguments);
|
|
@@ -18824,8 +19204,8 @@ var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge,
|
|
|
18824
19204
|
var originTyped = origin;
|
|
18825
19205
|
var originNode = getNode(originTyped);
|
|
18826
19206
|
return _objectSpread2({
|
|
18827
|
-
isFeeAsset: (_currency$isFeeAsset = currency.isFeeAsset) !== null && _currency$isFeeAsset !==
|
|
18828
|
-
}, createMultiAsset(originNode.version, currency.amount, asset === null || asset ===
|
|
19207
|
+
isFeeAsset: (_currency$isFeeAsset = currency.isFeeAsset) !== null && _currency$isFeeAsset !== undefined ? _currency$isFeeAsset : false
|
|
19208
|
+
}, createMultiAsset(originNode.version, currency.amount, asset === null || asset === undefined ? undefined : asset.multiLocation));
|
|
18829
19209
|
});
|
|
18830
19210
|
return assets;
|
|
18831
19211
|
}
|
|
@@ -18887,14 +19267,12 @@ var send = /*#__PURE__*/function () {
|
|
|
18887
19267
|
_context.next = 20;
|
|
18888
19268
|
return api.init(origin);
|
|
18889
19269
|
case 20:
|
|
18890
|
-
_context.prev = 20;
|
|
18891
19270
|
// In case asset check is disabled, we create asset object from currency symbol
|
|
18892
|
-
resolvedAsset = asset !== null && asset !==
|
|
19271
|
+
resolvedAsset = asset !== null && asset !== undefined ? asset : {
|
|
18893
19272
|
symbol: 'symbol' in currency ? currency.symbol : undefined
|
|
18894
19273
|
};
|
|
18895
19274
|
originNode = getNode(origin);
|
|
18896
|
-
_context.
|
|
18897
|
-
return originNode.transfer({
|
|
19275
|
+
return _context.abrupt("return", originNode.transfer({
|
|
18898
19276
|
api: api,
|
|
18899
19277
|
asset: _objectSpread2(_objectSpread2({}, resolvedAsset), {}, {
|
|
18900
19278
|
amount: 'multiasset' in currency ? 0 : currency.amount
|
|
@@ -18907,24 +19285,12 @@ var send = /*#__PURE__*/function () {
|
|
|
18907
19285
|
ahAddress: ahAddress,
|
|
18908
19286
|
pallet: pallet,
|
|
18909
19287
|
method: method
|
|
18910
|
-
});
|
|
18911
|
-
case
|
|
18912
|
-
return _context.abrupt("return", _context.sent);
|
|
18913
|
-
case 26:
|
|
18914
|
-
_context.prev = 26;
|
|
18915
|
-
if (!isPjsClient(api.getApi())) {
|
|
18916
|
-
_context.next = 30;
|
|
18917
|
-
break;
|
|
18918
|
-
}
|
|
18919
|
-
_context.next = 30;
|
|
18920
|
-
return api.disconnect();
|
|
18921
|
-
case 30:
|
|
18922
|
-
return _context.finish(26);
|
|
18923
|
-
case 31:
|
|
19288
|
+
}));
|
|
19289
|
+
case 23:
|
|
18924
19290
|
case "end":
|
|
18925
19291
|
return _context.stop();
|
|
18926
19292
|
}
|
|
18927
|
-
}, _callee
|
|
19293
|
+
}, _callee);
|
|
18928
19294
|
}));
|
|
18929
19295
|
return function send(_x) {
|
|
18930
19296
|
return _ref.apply(this, arguments);
|
|
@@ -19175,7 +19541,7 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
19175
19541
|
break;
|
|
19176
19542
|
}
|
|
19177
19543
|
_context.next = 25;
|
|
19178
|
-
return createTx('transferMultiCurrencies', [[[asset, currency.amount], [formatAssetIdToERC20((_usdtAsset$assetId = usdtAsset.assetId) !== null && _usdtAsset$assetId !==
|
|
19544
|
+
return createTx('transferMultiCurrencies', [[[asset, currency.amount], [formatAssetIdToERC20((_usdtAsset$assetId = usdtAsset.assetId) !== null && _usdtAsset$assetId !== undefined ? _usdtAsset$assetId : ''), '200000']], 1,
|
|
19179
19545
|
// index of the fee asset
|
|
19180
19546
|
destMultiLocation, weight]);
|
|
19181
19547
|
case 25:
|