@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.mjs
CHANGED
|
@@ -10,7 +10,7 @@ function _arrayWithoutHoles(r) {
|
|
|
10
10
|
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
11
11
|
}
|
|
12
12
|
function _assertThisInitialized(e) {
|
|
13
|
-
if (
|
|
13
|
+
if (undefined === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
14
14
|
return e;
|
|
15
15
|
}
|
|
16
16
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
@@ -34,7 +34,7 @@ function _asyncToGenerator(n) {
|
|
|
34
34
|
function _throw(n) {
|
|
35
35
|
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
36
36
|
}
|
|
37
|
-
_next(
|
|
37
|
+
_next(undefined);
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
40
|
}
|
|
@@ -54,12 +54,12 @@ function _construct(t, e, r) {
|
|
|
54
54
|
function _defineProperties(e, r) {
|
|
55
55
|
for (var t = 0; t < r.length; t++) {
|
|
56
56
|
var o = r[t];
|
|
57
|
-
o.enumerable = o.enumerable ||
|
|
57
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
function _createClass(e, r, t) {
|
|
61
61
|
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
62
|
-
writable:
|
|
62
|
+
writable: false
|
|
63
63
|
}), e;
|
|
64
64
|
}
|
|
65
65
|
function _createForOfIteratorHelper(r, e) {
|
|
@@ -73,9 +73,9 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
73
73
|
s: F,
|
|
74
74
|
n: function () {
|
|
75
75
|
return n >= r.length ? {
|
|
76
|
-
done:
|
|
76
|
+
done: true
|
|
77
77
|
} : {
|
|
78
|
-
done:
|
|
78
|
+
done: false,
|
|
79
79
|
value: r[n++]
|
|
80
80
|
};
|
|
81
81
|
},
|
|
@@ -88,8 +88,8 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
88
88
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
89
89
|
}
|
|
90
90
|
var o,
|
|
91
|
-
a =
|
|
92
|
-
u =
|
|
91
|
+
a = true,
|
|
92
|
+
u = false;
|
|
93
93
|
return {
|
|
94
94
|
s: function () {
|
|
95
95
|
t = t.call(r);
|
|
@@ -99,7 +99,7 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
99
99
|
return a = r.done, r;
|
|
100
100
|
},
|
|
101
101
|
e: function (r) {
|
|
102
|
-
u =
|
|
102
|
+
u = true, o = r;
|
|
103
103
|
},
|
|
104
104
|
f: function () {
|
|
105
105
|
try {
|
|
@@ -113,9 +113,9 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
113
113
|
function _defineProperty(e, r, t) {
|
|
114
114
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
115
115
|
value: t,
|
|
116
|
-
enumerable:
|
|
117
|
-
configurable:
|
|
118
|
-
writable:
|
|
116
|
+
enumerable: true,
|
|
117
|
+
configurable: true,
|
|
118
|
+
writable: true
|
|
119
119
|
}) : e[r] = t, e;
|
|
120
120
|
}
|
|
121
121
|
function _get() {
|
|
@@ -137,11 +137,11 @@ function _inherits(t, e) {
|
|
|
137
137
|
t.prototype = Object.create(e && e.prototype, {
|
|
138
138
|
constructor: {
|
|
139
139
|
value: t,
|
|
140
|
-
writable:
|
|
141
|
-
configurable:
|
|
140
|
+
writable: true,
|
|
141
|
+
configurable: true
|
|
142
142
|
}
|
|
143
143
|
}), Object.defineProperty(t, "prototype", {
|
|
144
|
-
writable:
|
|
144
|
+
writable: false
|
|
145
145
|
}), e && _setPrototypeOf(t, e);
|
|
146
146
|
}
|
|
147
147
|
function _isNativeFunction(t) {
|
|
@@ -178,7 +178,7 @@ function ownKeys(e, r) {
|
|
|
178
178
|
function _objectSpread2(e) {
|
|
179
179
|
for (var r = 1; r < arguments.length; r++) {
|
|
180
180
|
var t = null != arguments[r] ? arguments[r] : {};
|
|
181
|
-
r % 2 ? ownKeys(Object(t),
|
|
181
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
182
182
|
_defineProperty(e, r, t[r]);
|
|
183
183
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
184
184
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
@@ -188,7 +188,7 @@ function _objectSpread2(e) {
|
|
|
188
188
|
}
|
|
189
189
|
function _possibleConstructorReturn(t, e) {
|
|
190
190
|
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
191
|
-
if (
|
|
191
|
+
if (undefined !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
192
192
|
return _assertThisInitialized(t);
|
|
193
193
|
}
|
|
194
194
|
function _regeneratorRuntime() {
|
|
@@ -209,9 +209,9 @@ function _regeneratorRuntime() {
|
|
|
209
209
|
function define(t, e, r) {
|
|
210
210
|
return Object.defineProperty(t, e, {
|
|
211
211
|
value: r,
|
|
212
|
-
enumerable:
|
|
213
|
-
configurable:
|
|
214
|
-
writable:
|
|
212
|
+
enumerable: true,
|
|
213
|
+
configurable: true,
|
|
214
|
+
writable: true
|
|
215
215
|
}), t[e];
|
|
216
216
|
}
|
|
217
217
|
try {
|
|
@@ -304,7 +304,7 @@ function _regeneratorRuntime() {
|
|
|
304
304
|
if ("throw" === i) throw a;
|
|
305
305
|
return {
|
|
306
306
|
value: t,
|
|
307
|
-
done:
|
|
307
|
+
done: true
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
310
|
for (n.method = i, n.arg = a;;) {
|
|
@@ -355,7 +355,7 @@ function _regeneratorRuntime() {
|
|
|
355
355
|
function Context(t) {
|
|
356
356
|
this.tryEntries = [{
|
|
357
357
|
tryLoc: "root"
|
|
358
|
-
}], t.forEach(pushTryEntry, this), this.reset(
|
|
358
|
+
}], t.forEach(pushTryEntry, this), this.reset(true);
|
|
359
359
|
}
|
|
360
360
|
function values(e) {
|
|
361
361
|
if (e || "" === e) {
|
|
@@ -365,8 +365,8 @@ function _regeneratorRuntime() {
|
|
|
365
365
|
if (!isNaN(e.length)) {
|
|
366
366
|
var o = -1,
|
|
367
367
|
i = function next() {
|
|
368
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done =
|
|
369
|
-
return next.value = t, next.done =
|
|
368
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = false, next;
|
|
369
|
+
return next.value = t, next.done = true, next;
|
|
370
370
|
};
|
|
371
371
|
return i.next = i;
|
|
372
372
|
}
|
|
@@ -375,10 +375,10 @@ function _regeneratorRuntime() {
|
|
|
375
375
|
}
|
|
376
376
|
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
377
377
|
value: GeneratorFunctionPrototype,
|
|
378
|
-
configurable:
|
|
378
|
+
configurable: true
|
|
379
379
|
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
380
380
|
value: GeneratorFunction,
|
|
381
|
-
configurable:
|
|
381
|
+
configurable: true
|
|
382
382
|
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
383
383
|
var e = "function" == typeof t && t.constructor;
|
|
384
384
|
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
@@ -391,7 +391,7 @@ function _regeneratorRuntime() {
|
|
|
391
391
|
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
392
392
|
return this;
|
|
393
393
|
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
394
|
-
|
|
394
|
+
undefined === i && (i = Promise);
|
|
395
395
|
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
396
396
|
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
397
397
|
return t.done ? t.value : a.next();
|
|
@@ -407,17 +407,17 @@ function _regeneratorRuntime() {
|
|
|
407
407
|
return r.reverse(), function next() {
|
|
408
408
|
for (; r.length;) {
|
|
409
409
|
var t = r.pop();
|
|
410
|
-
if (t in e) return next.value = t, next.done =
|
|
410
|
+
if (t in e) return next.value = t, next.done = false, next;
|
|
411
411
|
}
|
|
412
|
-
return next.done =
|
|
412
|
+
return next.done = true, next;
|
|
413
413
|
};
|
|
414
414
|
}, e.values = values, Context.prototype = {
|
|
415
415
|
constructor: Context,
|
|
416
416
|
reset: function (e) {
|
|
417
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done =
|
|
417
|
+
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);
|
|
418
418
|
},
|
|
419
419
|
stop: function () {
|
|
420
|
-
this.done =
|
|
420
|
+
this.done = true;
|
|
421
421
|
var t = this.tryEntries[0].completion;
|
|
422
422
|
if ("throw" === t.type) throw t.arg;
|
|
423
423
|
return this.rval;
|
|
@@ -436,10 +436,10 @@ function _regeneratorRuntime() {
|
|
|
436
436
|
var c = n.call(i, "catchLoc"),
|
|
437
437
|
u = n.call(i, "finallyLoc");
|
|
438
438
|
if (c && u) {
|
|
439
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc,
|
|
439
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
440
440
|
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
441
441
|
} else if (c) {
|
|
442
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc,
|
|
442
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
443
443
|
} else {
|
|
444
444
|
if (!u) throw Error("try statement without catch or finally");
|
|
445
445
|
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
@@ -513,7 +513,7 @@ function _toConsumableArray(r) {
|
|
|
513
513
|
function _toPrimitive(t, r) {
|
|
514
514
|
if ("object" != typeof t || !t) return t;
|
|
515
515
|
var e = t[Symbol.toPrimitive];
|
|
516
|
-
if (
|
|
516
|
+
if (undefined !== e) {
|
|
517
517
|
var i = e.call(t, r || "default");
|
|
518
518
|
if ("object" != typeof i) return i;
|
|
519
519
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
@@ -537,15 +537,15 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
537
537
|
if (r) {
|
|
538
538
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
539
539
|
var t = {}.toString.call(r).slice(8, -1);
|
|
540
|
-
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) :
|
|
540
|
+
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;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
function _wrapNativeSuper(t) {
|
|
544
|
-
var r = "function" == typeof Map ? new Map() :
|
|
544
|
+
var r = "function" == typeof Map ? new Map() : undefined;
|
|
545
545
|
return _wrapNativeSuper = function (t) {
|
|
546
546
|
if (null === t || !_isNativeFunction(t)) return t;
|
|
547
547
|
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
|
548
|
-
if (
|
|
548
|
+
if (undefined !== r) {
|
|
549
549
|
if (r.has(t)) return r.get(t);
|
|
550
550
|
r.set(t, Wrapper);
|
|
551
551
|
}
|
|
@@ -555,9 +555,9 @@ function _wrapNativeSuper(t) {
|
|
|
555
555
|
return Wrapper.prototype = Object.create(t.prototype, {
|
|
556
556
|
constructor: {
|
|
557
557
|
value: Wrapper,
|
|
558
|
-
enumerable:
|
|
559
|
-
writable:
|
|
560
|
-
configurable:
|
|
558
|
+
enumerable: false,
|
|
559
|
+
writable: true,
|
|
560
|
+
configurable: true
|
|
561
561
|
}
|
|
562
562
|
}), _setPrototypeOf(Wrapper, t);
|
|
563
563
|
}, _wrapNativeSuper(t);
|
|
@@ -597,7 +597,7 @@ var Polimec$3 = {
|
|
|
597
597
|
relayChainAssetSymbol: "DOT",
|
|
598
598
|
nativeAssetSymbol: "PLMC",
|
|
599
599
|
isEVM: false,
|
|
600
|
-
supportsDryRunApi:
|
|
600
|
+
supportsDryRunApi: true,
|
|
601
601
|
nativeAssets: [
|
|
602
602
|
{
|
|
603
603
|
symbol: "PLMC",
|
|
@@ -696,6 +696,28 @@ var Acala$3 = {
|
|
|
696
696
|
}
|
|
697
697
|
],
|
|
698
698
|
otherAssets: [
|
|
699
|
+
{
|
|
700
|
+
assetId: "18",
|
|
701
|
+
symbol: "LOVA",
|
|
702
|
+
decimals: 12,
|
|
703
|
+
multiLocation: {
|
|
704
|
+
parents: 1,
|
|
705
|
+
interior: {
|
|
706
|
+
X3: [
|
|
707
|
+
{
|
|
708
|
+
Parachain: 1000
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
PalletInstance: 50
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
GeneralIndex: 50000028
|
|
715
|
+
}
|
|
716
|
+
]
|
|
717
|
+
}
|
|
718
|
+
},
|
|
719
|
+
existentialDeposit: "1"
|
|
720
|
+
},
|
|
699
721
|
{
|
|
700
722
|
assetId: "14",
|
|
701
723
|
symbol: "USDC",
|
|
@@ -806,6 +828,50 @@ var Acala$3 = {
|
|
|
806
828
|
},
|
|
807
829
|
existentialDeposit: "3000"
|
|
808
830
|
},
|
|
831
|
+
{
|
|
832
|
+
assetId: "19",
|
|
833
|
+
symbol: "DAMN",
|
|
834
|
+
decimals: 12,
|
|
835
|
+
multiLocation: {
|
|
836
|
+
parents: 1,
|
|
837
|
+
interior: {
|
|
838
|
+
X3: [
|
|
839
|
+
{
|
|
840
|
+
Parachain: 1000
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
PalletInstance: 50
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
GeneralIndex: 22222012
|
|
847
|
+
}
|
|
848
|
+
]
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
existentialDeposit: "1"
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
assetId: "20",
|
|
855
|
+
symbol: "LOTY",
|
|
856
|
+
decimals: 12,
|
|
857
|
+
multiLocation: {
|
|
858
|
+
parents: 1,
|
|
859
|
+
interior: {
|
|
860
|
+
X3: [
|
|
861
|
+
{
|
|
862
|
+
Parachain: 1000
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
PalletInstance: 50
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
GeneralIndex: 50000069
|
|
869
|
+
}
|
|
870
|
+
]
|
|
871
|
+
}
|
|
872
|
+
},
|
|
873
|
+
existentialDeposit: "100000000"
|
|
874
|
+
},
|
|
809
875
|
{
|
|
810
876
|
assetId: "0",
|
|
811
877
|
symbol: "GLMR",
|
|
@@ -2698,12 +2764,55 @@ var Hydration$3 = {
|
|
|
2698
2764
|
}
|
|
2699
2765
|
],
|
|
2700
2766
|
otherAssets: [
|
|
2767
|
+
{
|
|
2768
|
+
assetId: "1000771",
|
|
2769
|
+
symbol: "KSM",
|
|
2770
|
+
decimals: 12,
|
|
2771
|
+
multiLocation: {
|
|
2772
|
+
parents: 1,
|
|
2773
|
+
interior: {
|
|
2774
|
+
X1: {
|
|
2775
|
+
GlobalConsensus: {
|
|
2776
|
+
kusama: null
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
},
|
|
2781
|
+
existentialDeposit: "313283208"
|
|
2782
|
+
},
|
|
2783
|
+
{
|
|
2784
|
+
assetId: "1000766",
|
|
2785
|
+
symbol: "USDC",
|
|
2786
|
+
decimals: 6,
|
|
2787
|
+
multiLocation: {
|
|
2788
|
+
parents: 2,
|
|
2789
|
+
interior: {
|
|
2790
|
+
X2: [
|
|
2791
|
+
{
|
|
2792
|
+
GlobalConsensus: {
|
|
2793
|
+
Ethereum: {
|
|
2794
|
+
chainId: 1
|
|
2795
|
+
}
|
|
2796
|
+
}
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
AccountKey20: {
|
|
2800
|
+
network: null,
|
|
2801
|
+
key: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
|
|
2802
|
+
}
|
|
2803
|
+
}
|
|
2804
|
+
]
|
|
2805
|
+
}
|
|
2806
|
+
},
|
|
2807
|
+
existentialDeposit: "10000",
|
|
2808
|
+
alias: "USDC1"
|
|
2809
|
+
},
|
|
2701
2810
|
{
|
|
2702
2811
|
assetId: "1000625",
|
|
2703
2812
|
symbol: "sUSDe",
|
|
2704
2813
|
decimals: 18,
|
|
2705
2814
|
multiLocation: {
|
|
2706
|
-
parents:
|
|
2815
|
+
parents: 2,
|
|
2707
2816
|
interior: {
|
|
2708
2817
|
X2: [
|
|
2709
2818
|
{
|
|
@@ -2741,7 +2850,7 @@ var Hydration$3 = {
|
|
|
2741
2850
|
symbol: "AAVE",
|
|
2742
2851
|
decimals: 18,
|
|
2743
2852
|
multiLocation: {
|
|
2744
|
-
parents:
|
|
2853
|
+
parents: 2,
|
|
2745
2854
|
interior: {
|
|
2746
2855
|
X2: [
|
|
2747
2856
|
{
|
|
@@ -2767,7 +2876,7 @@ var Hydration$3 = {
|
|
|
2767
2876
|
symbol: "WBTC",
|
|
2768
2877
|
decimals: 8,
|
|
2769
2878
|
multiLocation: {
|
|
2770
|
-
parents:
|
|
2879
|
+
parents: 2,
|
|
2771
2880
|
interior: {
|
|
2772
2881
|
X2: [
|
|
2773
2882
|
{
|
|
@@ -2794,7 +2903,7 @@ var Hydration$3 = {
|
|
|
2794
2903
|
symbol: "sUSDS",
|
|
2795
2904
|
decimals: 18,
|
|
2796
2905
|
multiLocation: {
|
|
2797
|
-
parents:
|
|
2906
|
+
parents: 2,
|
|
2798
2907
|
interior: {
|
|
2799
2908
|
X2: [
|
|
2800
2909
|
{
|
|
@@ -2816,6 +2925,59 @@ var Hydration$3 = {
|
|
|
2816
2925
|
existentialDeposit: "9910802775024780",
|
|
2817
2926
|
alias: "sUSDS1"
|
|
2818
2927
|
},
|
|
2928
|
+
{
|
|
2929
|
+
assetId: "1000767",
|
|
2930
|
+
symbol: "USDT",
|
|
2931
|
+
decimals: 6,
|
|
2932
|
+
multiLocation: {
|
|
2933
|
+
parents: 2,
|
|
2934
|
+
interior: {
|
|
2935
|
+
X2: [
|
|
2936
|
+
{
|
|
2937
|
+
GlobalConsensus: {
|
|
2938
|
+
Ethereum: {
|
|
2939
|
+
chainId: 1
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
AccountKey20: {
|
|
2945
|
+
network: null,
|
|
2946
|
+
key: "0xdac17f958d2ee523a2206206994597c13d831ec7"
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
]
|
|
2950
|
+
}
|
|
2951
|
+
},
|
|
2952
|
+
existentialDeposit: "10000",
|
|
2953
|
+
alias: "USDT2"
|
|
2954
|
+
},
|
|
2955
|
+
{
|
|
2956
|
+
assetId: "1000765",
|
|
2957
|
+
symbol: "tBTC",
|
|
2958
|
+
decimals: 18,
|
|
2959
|
+
multiLocation: {
|
|
2960
|
+
parents: 2,
|
|
2961
|
+
interior: {
|
|
2962
|
+
X2: [
|
|
2963
|
+
{
|
|
2964
|
+
GlobalConsensus: {
|
|
2965
|
+
Ethereum: {
|
|
2966
|
+
chainId: 1
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
},
|
|
2970
|
+
{
|
|
2971
|
+
AccountKey20: {
|
|
2972
|
+
network: null,
|
|
2973
|
+
key: "0x18084fba666a33d37592fa2633fd49a74dd93a88"
|
|
2974
|
+
}
|
|
2975
|
+
}
|
|
2976
|
+
]
|
|
2977
|
+
}
|
|
2978
|
+
},
|
|
2979
|
+
existentialDeposit: "106803374987"
|
|
2980
|
+
},
|
|
2819
2981
|
{
|
|
2820
2982
|
assetId: "1000189",
|
|
2821
2983
|
symbol: "WETH",
|
|
@@ -2909,7 +3071,7 @@ var Hydration$3 = {
|
|
|
2909
3071
|
}
|
|
2910
3072
|
},
|
|
2911
3073
|
existentialDeposit: "10000",
|
|
2912
|
-
alias: "
|
|
3074
|
+
alias: "USDC3"
|
|
2913
3075
|
},
|
|
2914
3076
|
{
|
|
2915
3077
|
assetId: "4",
|
|
@@ -3022,7 +3184,7 @@ var Hydration$3 = {
|
|
|
3022
3184
|
}
|
|
3023
3185
|
},
|
|
3024
3186
|
existentialDeposit: "10000",
|
|
3025
|
-
alias: "
|
|
3187
|
+
alias: "USDC4"
|
|
3026
3188
|
},
|
|
3027
3189
|
{
|
|
3028
3190
|
assetId: "1000100",
|
|
@@ -3093,7 +3255,7 @@ var Hydration$3 = {
|
|
|
3093
3255
|
}
|
|
3094
3256
|
},
|
|
3095
3257
|
existentialDeposit: "10000",
|
|
3096
|
-
alias: "
|
|
3258
|
+
alias: "USDC2"
|
|
3097
3259
|
},
|
|
3098
3260
|
{
|
|
3099
3261
|
assetId: "20",
|
|
@@ -3267,7 +3429,7 @@ var Hydration$3 = {
|
|
|
3267
3429
|
}
|
|
3268
3430
|
},
|
|
3269
3431
|
existentialDeposit: "10000",
|
|
3270
|
-
alias: "
|
|
3432
|
+
alias: "USDT3"
|
|
3271
3433
|
},
|
|
3272
3434
|
{
|
|
3273
3435
|
assetId: "1000752",
|
|
@@ -3539,6 +3701,28 @@ var Hydration$3 = {
|
|
|
3539
3701
|
},
|
|
3540
3702
|
existentialDeposit: "0"
|
|
3541
3703
|
},
|
|
3704
|
+
{
|
|
3705
|
+
assetId: "1005",
|
|
3706
|
+
symbol: "avDOT",
|
|
3707
|
+
decimals: 10,
|
|
3708
|
+
multiLocation: {
|
|
3709
|
+
parents: 1,
|
|
3710
|
+
interior: {
|
|
3711
|
+
X2: [
|
|
3712
|
+
{
|
|
3713
|
+
Parachain: 2034
|
|
3714
|
+
},
|
|
3715
|
+
{
|
|
3716
|
+
AccountKey20: {
|
|
3717
|
+
network: null,
|
|
3718
|
+
key: "0x0e13b904f4168f93814216b6874ca8349457f263"
|
|
3719
|
+
}
|
|
3720
|
+
}
|
|
3721
|
+
]
|
|
3722
|
+
}
|
|
3723
|
+
},
|
|
3724
|
+
existentialDeposit: "0"
|
|
3725
|
+
},
|
|
3542
3726
|
{
|
|
3543
3727
|
assetId: "1004",
|
|
3544
3728
|
symbol: "aWBTC",
|
|
@@ -5605,6 +5789,26 @@ var AssetHubPolkadot$3 = {
|
|
|
5605
5789
|
],
|
|
5606
5790
|
existentialDeposit: "3000"
|
|
5607
5791
|
},
|
|
5792
|
+
{
|
|
5793
|
+
assetId: "22222012",
|
|
5794
|
+
symbol: "DAMN",
|
|
5795
|
+
decimals: 12,
|
|
5796
|
+
xcmInterior: [
|
|
5797
|
+
{
|
|
5798
|
+
Network: "polkadot"
|
|
5799
|
+
},
|
|
5800
|
+
{
|
|
5801
|
+
Parachain: 1000
|
|
5802
|
+
},
|
|
5803
|
+
{
|
|
5804
|
+
PalletInstance: 50
|
|
5805
|
+
},
|
|
5806
|
+
{
|
|
5807
|
+
GeneralIndex: 22222012
|
|
5808
|
+
}
|
|
5809
|
+
],
|
|
5810
|
+
existentialDeposit: "1000000000000"
|
|
5811
|
+
},
|
|
5608
5812
|
{
|
|
5609
5813
|
assetId: "23",
|
|
5610
5814
|
symbol: "PINK",
|
|
@@ -5685,6 +5889,46 @@ var AssetHubPolkadot$3 = {
|
|
|
5685
5889
|
],
|
|
5686
5890
|
existentialDeposit: "1000000"
|
|
5687
5891
|
},
|
|
5892
|
+
{
|
|
5893
|
+
assetId: "50000028",
|
|
5894
|
+
symbol: "LOVA",
|
|
5895
|
+
decimals: 12,
|
|
5896
|
+
xcmInterior: [
|
|
5897
|
+
{
|
|
5898
|
+
Network: "polkadot"
|
|
5899
|
+
},
|
|
5900
|
+
{
|
|
5901
|
+
Parachain: 1000
|
|
5902
|
+
},
|
|
5903
|
+
{
|
|
5904
|
+
PalletInstance: 50
|
|
5905
|
+
},
|
|
5906
|
+
{
|
|
5907
|
+
GeneralIndex: 50000028
|
|
5908
|
+
}
|
|
5909
|
+
],
|
|
5910
|
+
existentialDeposit: "1000000000000"
|
|
5911
|
+
},
|
|
5912
|
+
{
|
|
5913
|
+
assetId: "50000069",
|
|
5914
|
+
symbol: "LOTY",
|
|
5915
|
+
decimals: 12,
|
|
5916
|
+
xcmInterior: [
|
|
5917
|
+
{
|
|
5918
|
+
Network: "polkadot"
|
|
5919
|
+
},
|
|
5920
|
+
{
|
|
5921
|
+
Parachain: 1000
|
|
5922
|
+
},
|
|
5923
|
+
{
|
|
5924
|
+
PalletInstance: 50
|
|
5925
|
+
},
|
|
5926
|
+
{
|
|
5927
|
+
GeneralIndex: 50000069
|
|
5928
|
+
}
|
|
5929
|
+
],
|
|
5930
|
+
existentialDeposit: "100000000"
|
|
5931
|
+
},
|
|
5688
5932
|
{
|
|
5689
5933
|
assetId: "555",
|
|
5690
5934
|
symbol: "GAME",
|
|
@@ -5777,6 +6021,21 @@ var AssetHubPolkadot$3 = {
|
|
|
5777
6021
|
},
|
|
5778
6022
|
existentialDeposit: "1000000000"
|
|
5779
6023
|
},
|
|
6024
|
+
{
|
|
6025
|
+
symbol: "PLMC",
|
|
6026
|
+
decimals: 10,
|
|
6027
|
+
multiLocation: {
|
|
6028
|
+
parents: 1,
|
|
6029
|
+
interior: {
|
|
6030
|
+
X1: [
|
|
6031
|
+
{
|
|
6032
|
+
Parachain: 3344
|
|
6033
|
+
}
|
|
6034
|
+
]
|
|
6035
|
+
}
|
|
6036
|
+
},
|
|
6037
|
+
existentialDeposit: "1000000000"
|
|
6038
|
+
},
|
|
5780
6039
|
{
|
|
5781
6040
|
symbol: "LAOS",
|
|
5782
6041
|
decimals: 18,
|
|
@@ -6856,7 +7115,7 @@ var Crab$3 = {
|
|
|
6856
7115
|
relayChainAssetSymbol: "KSM",
|
|
6857
7116
|
nativeAssetSymbol: "CRAB",
|
|
6858
7117
|
isEVM: true,
|
|
6859
|
-
supportsDryRunApi:
|
|
7118
|
+
supportsDryRunApi: true,
|
|
6860
7119
|
nativeAssets: [
|
|
6861
7120
|
{
|
|
6862
7121
|
symbol: "CRAB",
|
|
@@ -9652,6 +9911,81 @@ var Unique$3 = {
|
|
|
9652
9911
|
}
|
|
9653
9912
|
],
|
|
9654
9913
|
otherAssets: [
|
|
9914
|
+
{
|
|
9915
|
+
assetId: "459",
|
|
9916
|
+
symbol: "PINK",
|
|
9917
|
+
decimals: 10,
|
|
9918
|
+
multiLocation: {
|
|
9919
|
+
parents: 1,
|
|
9920
|
+
interior: {
|
|
9921
|
+
X3: [
|
|
9922
|
+
{
|
|
9923
|
+
Parachain: 1000
|
|
9924
|
+
},
|
|
9925
|
+
{
|
|
9926
|
+
PalletInstance: 50
|
|
9927
|
+
},
|
|
9928
|
+
{
|
|
9929
|
+
GeneralIndex: 23
|
|
9930
|
+
}
|
|
9931
|
+
]
|
|
9932
|
+
}
|
|
9933
|
+
},
|
|
9934
|
+
existentialDeposit: "0"
|
|
9935
|
+
},
|
|
9936
|
+
{
|
|
9937
|
+
assetId: "473",
|
|
9938
|
+
symbol: "USDt",
|
|
9939
|
+
decimals: 6,
|
|
9940
|
+
multiLocation: {
|
|
9941
|
+
parents: 1,
|
|
9942
|
+
interior: {
|
|
9943
|
+
X3: [
|
|
9944
|
+
{
|
|
9945
|
+
Parachain: 1000
|
|
9946
|
+
},
|
|
9947
|
+
{
|
|
9948
|
+
PalletInstance: 50
|
|
9949
|
+
},
|
|
9950
|
+
{
|
|
9951
|
+
GeneralIndex: 1984
|
|
9952
|
+
}
|
|
9953
|
+
]
|
|
9954
|
+
}
|
|
9955
|
+
},
|
|
9956
|
+
existentialDeposit: "0"
|
|
9957
|
+
},
|
|
9958
|
+
{
|
|
9959
|
+
assetId: "498",
|
|
9960
|
+
symbol: "GLMR",
|
|
9961
|
+
decimals: 18,
|
|
9962
|
+
multiLocation: {
|
|
9963
|
+
parents: 1,
|
|
9964
|
+
interior: {
|
|
9965
|
+
X2: [
|
|
9966
|
+
{
|
|
9967
|
+
Parachain: 2004
|
|
9968
|
+
},
|
|
9969
|
+
{
|
|
9970
|
+
PalletInstance: 10
|
|
9971
|
+
}
|
|
9972
|
+
]
|
|
9973
|
+
}
|
|
9974
|
+
},
|
|
9975
|
+
existentialDeposit: "0"
|
|
9976
|
+
},
|
|
9977
|
+
{
|
|
9978
|
+
assetId: "437",
|
|
9979
|
+
symbol: "DOT",
|
|
9980
|
+
decimals: 10,
|
|
9981
|
+
multiLocation: {
|
|
9982
|
+
parents: 1,
|
|
9983
|
+
interior: {
|
|
9984
|
+
Here: null
|
|
9985
|
+
}
|
|
9986
|
+
},
|
|
9987
|
+
existentialDeposit: "0"
|
|
9988
|
+
}
|
|
9655
9989
|
]
|
|
9656
9990
|
};
|
|
9657
9991
|
var Crust$3 = {
|
|
@@ -10872,6 +11206,30 @@ var Ethereum = {
|
|
|
10872
11206
|
]
|
|
10873
11207
|
}
|
|
10874
11208
|
}
|
|
11209
|
+
},
|
|
11210
|
+
{
|
|
11211
|
+
symbol: "AAVE",
|
|
11212
|
+
assetId: "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
|
|
11213
|
+
existentialDeposit: "1",
|
|
11214
|
+
multiLocation: {
|
|
11215
|
+
parents: 2,
|
|
11216
|
+
interior: {
|
|
11217
|
+
X2: [
|
|
11218
|
+
{
|
|
11219
|
+
GlobalConsensus: {
|
|
11220
|
+
Ethereum: {
|
|
11221
|
+
chain_id: 1
|
|
11222
|
+
}
|
|
11223
|
+
}
|
|
11224
|
+
},
|
|
11225
|
+
{
|
|
11226
|
+
AccountKey20: {
|
|
11227
|
+
key: "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
|
|
11228
|
+
}
|
|
11229
|
+
}
|
|
11230
|
+
]
|
|
11231
|
+
}
|
|
11232
|
+
}
|
|
10875
11233
|
}
|
|
10876
11234
|
]
|
|
10877
11235
|
};
|
|
@@ -11540,7 +11898,7 @@ var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
|
11540
11898
|
function NodeNotSupportedError(message) {
|
|
11541
11899
|
var _this;
|
|
11542
11900
|
_classCallCheck(this, NodeNotSupportedError);
|
|
11543
|
-
_this = _callSuper(this, NodeNotSupportedError, [message !== null && message !==
|
|
11901
|
+
_this = _callSuper(this, NodeNotSupportedError, [message !== null && message !== undefined ? message : 'These nodes do not support XCM transfers from Relay / to Relay chain.']);
|
|
11544
11902
|
_this.name = 'NodeNotSupported';
|
|
11545
11903
|
return _this;
|
|
11546
11904
|
}
|
|
@@ -11562,7 +11920,7 @@ var ScenarioNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
|
11562
11920
|
function ScenarioNotSupportedError(node, scenario, message) {
|
|
11563
11921
|
var _this;
|
|
11564
11922
|
_classCallCheck(this, ScenarioNotSupportedError);
|
|
11565
|
-
_this = _callSuper(this, ScenarioNotSupportedError, [message !== null && message !==
|
|
11923
|
+
_this = _callSuper(this, ScenarioNotSupportedError, [message !== null && message !== undefined ? message : "Scenario ".concat(scenario, " not supported for node ").concat(node)]);
|
|
11566
11924
|
_this.name = 'ScenarioNotSupported';
|
|
11567
11925
|
return _this;
|
|
11568
11926
|
}
|
|
@@ -11582,7 +11940,7 @@ var IncompatibleNodesError = /*#__PURE__*/function (_Error) {
|
|
|
11582
11940
|
function IncompatibleNodesError(message) {
|
|
11583
11941
|
var _this;
|
|
11584
11942
|
_classCallCheck(this, IncompatibleNodesError);
|
|
11585
|
-
_this = _callSuper(this, IncompatibleNodesError, [message !== null && message !==
|
|
11943
|
+
_this = _callSuper(this, IncompatibleNodesError, [message !== null && message !== undefined ? message : 'Transactions between nodes on different relaychains are not yet possible.']);
|
|
11586
11944
|
_this.name = 'IncompatibleNodes';
|
|
11587
11945
|
return _this;
|
|
11588
11946
|
}
|
|
@@ -13171,8 +13529,8 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
|
|
|
13171
13529
|
_defineProperty({}, version, overriddenCurrency);
|
|
13172
13530
|
};
|
|
13173
13531
|
var createPolkadotXcmHeader = function createPolkadotXcmHeader(scenario, version, destination, nodeId, junction, parents) {
|
|
13174
|
-
var parentsResolved = parents !== null && parents !==
|
|
13175
|
-
var interior = scenario === 'ParaToRelay' ? 'Here' : createX1Payload(version, junction !== null && junction !==
|
|
13532
|
+
var parentsResolved = parents !== null && parents !== undefined ? parents : scenario === 'RelayToPara' ? Parents.ZERO : Parents.ONE;
|
|
13533
|
+
var interior = scenario === 'ParaToRelay' ? 'Here' : createX1Payload(version, junction !== null && junction !== undefined ? junction : {
|
|
13176
13534
|
Parachain: nodeId
|
|
13177
13535
|
});
|
|
13178
13536
|
var isMultiLocationDestination = _typeof(destination) === 'object';
|
|
@@ -13203,7 +13561,7 @@ var resolveTNodeFromMultiLocation = function resolveTNodeFromMultiLocation(relay
|
|
|
13203
13561
|
}
|
|
13204
13562
|
var node = (_NODE_NAMES_DOT_KSM$f = NODE_NAMES_DOT_KSM.find(function (nodeName) {
|
|
13205
13563
|
return getParaId(nodeName) === parachainId && determineRelayChain(nodeName) === relayChain;
|
|
13206
|
-
})) !== null && _NODE_NAMES_DOT_KSM$f !==
|
|
13564
|
+
})) !== null && _NODE_NAMES_DOT_KSM$f !== undefined ? _NODE_NAMES_DOT_KSM$f : null;
|
|
13207
13565
|
if (node === null) {
|
|
13208
13566
|
throw new Error('Node with specified paraId not found in destination multi location.');
|
|
13209
13567
|
}
|
|
@@ -13236,7 +13594,7 @@ var buildMultiLocation = function buildMultiLocation(_ref) {
|
|
|
13236
13594
|
// If it is a native asset, search by symbol on AssetHub and use the multiLocation from there
|
|
13237
13595
|
var assetHubAsset = getOtherAssets(destination).find(function (ahAsset) {
|
|
13238
13596
|
var _ahAsset$symbol, _asset$symbol;
|
|
13239
|
-
return ((_ahAsset$symbol = ahAsset.symbol) === null || _ahAsset$symbol ===
|
|
13597
|
+
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());
|
|
13240
13598
|
});
|
|
13241
13599
|
if (assetHubAsset === undefined) {
|
|
13242
13600
|
throw new InvalidCurrencyError("Asset ".concat(asset.symbol, " not found in AssetHub"));
|
|
@@ -13350,8 +13708,8 @@ var XTokensTransferImpl = /*#__PURE__*/function () {
|
|
|
13350
13708
|
var section = shouldUseMultiasset ? isMultiAsset ? 'transfer_multiassets' : 'transfer_multiasset' : 'transfer';
|
|
13351
13709
|
var parameters = getXTokensParameters(shouldUseMultiasset, modifiedCurrencySelection, addressSelection, asset.amount, fees, overriddenAsset);
|
|
13352
13710
|
var call = {
|
|
13353
|
-
module: pallet !== null && pallet !==
|
|
13354
|
-
section: method !== null && method !==
|
|
13711
|
+
module: pallet !== null && pallet !== undefined ? pallet : 'XTokens',
|
|
13712
|
+
section: method !== null && method !== undefined ? method : section,
|
|
13355
13713
|
parameters: parameters
|
|
13356
13714
|
};
|
|
13357
13715
|
return api.callTxMethod(call);
|
|
@@ -13363,7 +13721,7 @@ var resolveParaId = function resolveParaId(paraId, destination) {
|
|
|
13363
13721
|
if (isTMultiLocation(destination) || isRelayChain(destination) || destination === 'Ethereum') {
|
|
13364
13722
|
return undefined;
|
|
13365
13723
|
}
|
|
13366
|
-
return paraId !== null && paraId !==
|
|
13724
|
+
return paraId !== null && paraId !== undefined ? paraId : getParaId(destination);
|
|
13367
13725
|
};
|
|
13368
13726
|
|
|
13369
13727
|
var supportsXTokens = function supportsXTokens(obj) {
|
|
@@ -13432,7 +13790,7 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
13432
13790
|
}
|
|
13433
13791
|
throw new Error('Sending assets to Polimec is supported only from AssetHubPolkadot');
|
|
13434
13792
|
case 6:
|
|
13435
|
-
versionOrDefault = version !== null && version !==
|
|
13793
|
+
versionOrDefault = version !== null && version !== undefined ? version : this.version;
|
|
13436
13794
|
if (!(supportsXTokens(this) && this.canUseXTokens(options))) {
|
|
13437
13795
|
_context.next = 17;
|
|
13438
13796
|
break;
|
|
@@ -13522,15 +13880,15 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
13522
13880
|
key: "transferRelayToPara",
|
|
13523
13881
|
value: function transferRelayToPara(options) {
|
|
13524
13882
|
var _options$version = options.version,
|
|
13525
|
-
version = _options$version ===
|
|
13883
|
+
version = _options$version === undefined ? Version.V3 : _options$version,
|
|
13526
13884
|
pallet = options.pallet,
|
|
13527
13885
|
method = options.method;
|
|
13528
13886
|
var _this$getRelayToParaO = this.getRelayToParaOverrides(),
|
|
13529
13887
|
section = _this$getRelayToParaO.section,
|
|
13530
13888
|
includeFee = _this$getRelayToParaO.includeFee;
|
|
13531
13889
|
return {
|
|
13532
|
-
module: pallet !== null && pallet !==
|
|
13533
|
-
section: method !== null && method !==
|
|
13890
|
+
module: pallet !== null && pallet !== undefined ? pallet : 'XcmPallet',
|
|
13891
|
+
section: method !== null && method !== undefined ? method : section,
|
|
13534
13892
|
parameters: constructRelayToParaParameters(options, version, {
|
|
13535
13893
|
includeFee: includeFee
|
|
13536
13894
|
})
|
|
@@ -13584,16 +13942,17 @@ var Unique$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
13584
13942
|
key: "transferXTokens",
|
|
13585
13943
|
value: function transferXTokens(input) {
|
|
13586
13944
|
var asset = input.asset;
|
|
13945
|
+
if (asset.symbol === this.getNativeAssetSymbol()) {
|
|
13946
|
+
return XTokensTransferImpl.transferXTokens(input, Unique.NATIVE_ASSET_ID);
|
|
13947
|
+
}
|
|
13587
13948
|
if (!isForeignAsset(asset) || !asset.assetId) {
|
|
13588
13949
|
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " has no assetId"));
|
|
13589
13950
|
}
|
|
13590
|
-
|
|
13591
|
-
ForeignAssetId: BigInt(asset.assetId)
|
|
13592
|
-
};
|
|
13593
|
-
return XTokensTransferImpl.transferXTokens(input, currencySelection);
|
|
13951
|
+
return XTokensTransferImpl.transferXTokens(input, Number(asset.assetId));
|
|
13594
13952
|
}
|
|
13595
13953
|
}]);
|
|
13596
13954
|
}(ParachainNode);
|
|
13955
|
+
Unique$1.NATIVE_ASSET_ID = 0;
|
|
13597
13956
|
|
|
13598
13957
|
var Crust$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
13599
13958
|
function Crust() {
|
|
@@ -13643,8 +14002,8 @@ var PolkadotXCMTransferImpl = /*#__PURE__*/function () {
|
|
|
13643
14002
|
return asset.isFeeAsset;
|
|
13644
14003
|
});
|
|
13645
14004
|
var call = {
|
|
13646
|
-
module: pallet !== null && pallet !==
|
|
13647
|
-
section: method !== null && method !==
|
|
14005
|
+
module: pallet !== null && pallet !== undefined ? pallet : 'PolkadotXcm',
|
|
14006
|
+
section: method !== null && method !== undefined ? method : section,
|
|
13648
14007
|
parameters: _objectSpread2({
|
|
13649
14008
|
dest: header,
|
|
13650
14009
|
beneficiary: addressSelection,
|
|
@@ -13713,7 +14072,7 @@ var BifrostPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
13713
14072
|
currencySelection: createCurrencySpec(asset.amount, this.version, asset.symbol === 'DOT' ? Parents.ONE : Parents.TWO, overriddenAsset, asset.symbol === 'WETH' ? {
|
|
13714
14073
|
X2: [ETHEREUM_JUNCTION, {
|
|
13715
14074
|
AccountKey20: {
|
|
13716
|
-
key: (_getAssetId = getAssetId('Ethereum', 'WETH')) !== null && _getAssetId !==
|
|
14075
|
+
key: (_getAssetId = getAssetId('Ethereum', 'WETH')) !== null && _getAssetId !== undefined ? _getAssetId : ''
|
|
13717
14076
|
}
|
|
13718
14077
|
}]
|
|
13719
14078
|
} : undefined)
|
|
@@ -13857,7 +14216,7 @@ var createCustomXcmOnDest = function createCustomXcmOnDest(_ref4, version) {
|
|
|
13857
14216
|
assets: {
|
|
13858
14217
|
Wild: 'All'
|
|
13859
14218
|
},
|
|
13860
|
-
beneficiary: Object.values(generateAddressPayload(api, scenario, 'PolkadotXcm', ahAddress !== null && ahAddress !==
|
|
14219
|
+
beneficiary: Object.values(generateAddressPayload(api, scenario, 'PolkadotXcm', ahAddress !== null && ahAddress !== undefined ? ahAddress : '', version, undefined))[0]
|
|
13861
14220
|
}
|
|
13862
14221
|
}]
|
|
13863
14222
|
}, {
|
|
@@ -13865,7 +14224,7 @@ var createCustomXcmOnDest = function createCustomXcmOnDest(_ref4, version) {
|
|
|
13865
14224
|
assets: {
|
|
13866
14225
|
Wild: {
|
|
13867
14226
|
AllOf: {
|
|
13868
|
-
id: createEthereumTokenLocation((_asset$assetId = asset.assetId) !== null && _asset$assetId !==
|
|
14227
|
+
id: createEthereumTokenLocation((_asset$assetId = asset.assetId) !== null && _asset$assetId !== undefined ? _asset$assetId : ''),
|
|
13869
14228
|
fun: 'Fungible'
|
|
13870
14229
|
}
|
|
13871
14230
|
}
|
|
@@ -13941,7 +14300,7 @@ var Hydration$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
13941
14300
|
}
|
|
13942
14301
|
throw new Error('Only Ethereum addresses are supported for Ethereum transfers');
|
|
13943
14302
|
case 3:
|
|
13944
|
-
if (!(((_asset$symbol = asset.symbol) === null || _asset$symbol ===
|
|
14303
|
+
if (!(((_asset$symbol = asset.symbol) === null || _asset$symbol === undefined ? undefined : _asset$symbol.toUpperCase()) !== 'WETH')) {
|
|
13945
14304
|
_context2.next = 5;
|
|
13946
14305
|
break;
|
|
13947
14306
|
}
|
|
@@ -13959,8 +14318,8 @@ var Hydration$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
13959
14318
|
}
|
|
13960
14319
|
throw new Error('AssetHub address is required for Ethereum transfers');
|
|
13961
14320
|
case 9:
|
|
13962
|
-
versionOrDefault = version !== null && version !==
|
|
13963
|
-
ethMultiAsset = Object.values(createCurrencySpec(asset.amount, versionOrDefault, Parents.TWO, createEthereumTokenLocation((_asset$assetId2 = asset.assetId) !== null && _asset$assetId2 !==
|
|
14321
|
+
versionOrDefault = version !== null && version !== undefined ? version : Version.V4;
|
|
14322
|
+
ethMultiAsset = Object.values(createCurrencySpec(asset.amount, versionOrDefault, Parents.TWO, createEthereumTokenLocation((_asset$assetId2 = asset.assetId) !== null && _asset$assetId2 !== undefined ? _asset$assetId2 : '')))[0][0];
|
|
13964
14323
|
_context2.next = 13;
|
|
13965
14324
|
return calculateFee(api);
|
|
13966
14325
|
case 13:
|
|
@@ -14001,7 +14360,7 @@ var Hydration$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14001
14360
|
scenario = input.scenario,
|
|
14002
14361
|
version = input.version,
|
|
14003
14362
|
destination = input.destination;
|
|
14004
|
-
var versionOrDefault = version !== null && version !==
|
|
14363
|
+
var versionOrDefault = version !== null && version !== undefined ? version : Version.V3;
|
|
14005
14364
|
var call = {
|
|
14006
14365
|
module: 'PolkadotXcm',
|
|
14007
14366
|
section: 'transfer_assets_using_type_and_then',
|
|
@@ -14100,10 +14459,17 @@ var Litentry$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14100
14459
|
}
|
|
14101
14460
|
_inherits(Litentry, _ParachainNode);
|
|
14102
14461
|
return _createClass(Litentry, [{
|
|
14103
|
-
key: "
|
|
14104
|
-
value: function
|
|
14105
|
-
var
|
|
14106
|
-
|
|
14462
|
+
key: "transferPolkadotXCM",
|
|
14463
|
+
value: function transferPolkadotXCM(input) {
|
|
14464
|
+
var scenario = input.scenario,
|
|
14465
|
+
asset = input.asset;
|
|
14466
|
+
if (scenario !== 'ParaToPara') {
|
|
14467
|
+
throw new ScenarioNotSupportedError(this.node, scenario);
|
|
14468
|
+
}
|
|
14469
|
+
if (asset.symbol !== this.getNativeAssetSymbol()) {
|
|
14470
|
+
throw new InvalidCurrencyError("Asset ".concat(asset.symbol, " is not supported by node ").concat(this.node, "."));
|
|
14471
|
+
}
|
|
14472
|
+
return Promise.resolve(PolkadotXCMTransferImpl.transferPolkadotXCM(input, 'limited_reserve_transfer_assets', 'Unlimited'));
|
|
14107
14473
|
}
|
|
14108
14474
|
}]);
|
|
14109
14475
|
}(ParachainNode);
|
|
@@ -14137,7 +14503,7 @@ var Moonbeam$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14137
14503
|
var asset = input.asset,
|
|
14138
14504
|
scenario = input.scenario,
|
|
14139
14505
|
_input$version = input.version,
|
|
14140
|
-
version = _input$version ===
|
|
14506
|
+
version = _input$version === undefined ? this.version : _input$version,
|
|
14141
14507
|
overriddenAsset = input.overriddenAsset;
|
|
14142
14508
|
var multiLocation = this.getJunctions(asset, scenario);
|
|
14143
14509
|
return Promise.resolve(PolkadotXCMTransferImpl.transferPolkadotXCM(_objectSpread2(_objectSpread2({}, input), {}, {
|
|
@@ -14360,7 +14726,7 @@ var Moonriver$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14360
14726
|
var asset = input.asset,
|
|
14361
14727
|
scenario = input.scenario,
|
|
14362
14728
|
_input$version = input.version,
|
|
14363
|
-
version = _input$version ===
|
|
14729
|
+
version = _input$version === undefined ? this.version : _input$version,
|
|
14364
14730
|
overriddenAsset = input.overriddenAsset;
|
|
14365
14731
|
var multiLocation = this.getJunctions(asset, scenario);
|
|
14366
14732
|
return Promise.resolve(PolkadotXCMTransferImpl.transferPolkadotXCM(_objectSpread2(_objectSpread2({}, input), {}, {
|
|
@@ -14619,8 +14985,8 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14619
14985
|
if (!isForeignAsset(asset)) {
|
|
14620
14986
|
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " has no assetId"));
|
|
14621
14987
|
}
|
|
14622
|
-
var versionOrDefault = version !== null && version !==
|
|
14623
|
-
var ethereumTokenLocation = createEthereumTokenLocation((_asset$assetId = asset.assetId) !== null && _asset$assetId !==
|
|
14988
|
+
var versionOrDefault = version !== null && version !== undefined ? version : _this.version;
|
|
14989
|
+
var ethereumTokenLocation = createEthereumTokenLocation((_asset$assetId = asset.assetId) !== null && _asset$assetId !== undefined ? _asset$assetId : '');
|
|
14624
14990
|
var call = {
|
|
14625
14991
|
module: 'PolkadotXcm',
|
|
14626
14992
|
section: 'transfer_assets_using_type_and_then',
|
|
@@ -14645,14 +15011,14 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14645
15011
|
key: "handleBridgeTransfer",
|
|
14646
15012
|
value: function handleBridgeTransfer(input, targetChain) {
|
|
14647
15013
|
var _input$asset$symbol, _input$asset$symbol2, _input$asset$symbol3, _input$asset$symbol4;
|
|
14648
|
-
if (targetChain === 'Kusama' && ((_input$asset$symbol = input.asset.symbol) === null || _input$asset$symbol ===
|
|
15014
|
+
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') {
|
|
14649
15015
|
var modifiedInput = _objectSpread2(_objectSpread2({}, input), {}, {
|
|
14650
15016
|
header: createBridgePolkadotXcmDest(Version.V4, targetChain, input.destination, input.paraIdTo),
|
|
14651
15017
|
addressSelection: generateAddressMultiLocationV4(input.api, input.address),
|
|
14652
15018
|
currencySelection: createBridgeCurrencySpec(input.asset.amount, targetChain)
|
|
14653
15019
|
});
|
|
14654
15020
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'transfer_assets', 'Unlimited');
|
|
14655
|
-
} else if (targetChain === 'Polkadot' && ((_input$asset$symbol3 = input.asset.symbol) === null || _input$asset$symbol3 ===
|
|
15021
|
+
} 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') {
|
|
14656
15022
|
var _modifiedInput = _objectSpread2(_objectSpread2({}, input), {}, {
|
|
14657
15023
|
header: createBridgePolkadotXcmDest(Version.V3, targetChain, input.destination, input.paraIdTo),
|
|
14658
15024
|
currencySelection: createCurrencySpec(input.asset.amount, Version.V3, Parents.ONE, input.overriddenAsset)
|
|
@@ -14689,7 +15055,7 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14689
15055
|
interior: {
|
|
14690
15056
|
X2: [ETHEREUM_JUNCTION, {
|
|
14691
15057
|
AccountKey20: {
|
|
14692
|
-
key: (_ethAsset$assetId = ethAsset.assetId) !== null && _ethAsset$assetId !==
|
|
15058
|
+
key: (_ethAsset$assetId = ethAsset.assetId) !== null && _ethAsset$assetId !== undefined ? _ethAsset$assetId : ''
|
|
14693
15059
|
}
|
|
14694
15060
|
}]
|
|
14695
15061
|
}
|
|
@@ -14720,7 +15086,7 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14720
15086
|
var modifiedInput = _objectSpread2(_objectSpread2({}, input), {}, {
|
|
14721
15087
|
header: this.createPolkadotXcmHeader(scenario, version, destination, paraId),
|
|
14722
15088
|
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, version, paraId),
|
|
14723
|
-
currencySelection: this.createCurrencySpec(asset.amount, scenario, version, asset, overriddenAsset !== null && overriddenAsset !==
|
|
15089
|
+
currencySelection: this.createCurrencySpec(asset.amount, scenario, version, asset, overriddenAsset !== null && overriddenAsset !== undefined ? overriddenAsset : customMultiLocation)
|
|
14724
15090
|
});
|
|
14725
15091
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'limited_teleport_assets', 'Unlimited');
|
|
14726
15092
|
}
|
|
@@ -14736,9 +15102,9 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14736
15102
|
api = input.api,
|
|
14737
15103
|
version = input.version,
|
|
14738
15104
|
address = input.address;
|
|
14739
|
-
if ((((_asset$symbol = asset.symbol) === null || _asset$symbol ===
|
|
15105
|
+
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') {
|
|
14740
15106
|
var _input$version;
|
|
14741
|
-
var versionOrDefault = (_input$version = input.version) !== null && _input$version !==
|
|
15107
|
+
var versionOrDefault = (_input$version = input.version) !== null && _input$version !== undefined ? _input$version : Version.V2;
|
|
14742
15108
|
return _objectSpread2(_objectSpread2({}, input), {}, {
|
|
14743
15109
|
header: this.createPolkadotXcmHeader(scenario, versionOrDefault, destination, paraIdTo),
|
|
14744
15110
|
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, versionOrDefault, paraIdTo),
|
|
@@ -14746,7 +15112,7 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
14746
15112
|
});
|
|
14747
15113
|
}
|
|
14748
15114
|
if ((destination === 'Hydration' || destination === 'Polimec') && asset.symbol === 'DOT') {
|
|
14749
|
-
var _versionOrDefault = version !== null && version !==
|
|
15115
|
+
var _versionOrDefault = version !== null && version !== undefined ? version : this.version;
|
|
14750
15116
|
return _objectSpread2(_objectSpread2({}, input), {}, {
|
|
14751
15117
|
currencySelection: _superPropGet(AssetHubPolkadot, "createCurrencySpec", this, 3)([asset.amount, 'ParaToRelay', _versionOrDefault, asset, overriddenAsset])
|
|
14752
15118
|
});
|
|
@@ -15136,20 +15502,25 @@ var Crab$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15136
15502
|
|
|
15137
15503
|
var Quartz$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
15138
15504
|
function Quartz() {
|
|
15139
|
-
var _this;
|
|
15140
15505
|
_classCallCheck(this, Quartz);
|
|
15141
|
-
|
|
15142
|
-
_this._assetCheckEnabled = false;
|
|
15143
|
-
return _this;
|
|
15506
|
+
return _callSuper(this, Quartz, ['Quartz', 'quartz', 'kusama', Version.V3]);
|
|
15144
15507
|
}
|
|
15145
15508
|
_inherits(Quartz, _ParachainNode);
|
|
15146
15509
|
return _createClass(Quartz, [{
|
|
15147
15510
|
key: "transferXTokens",
|
|
15148
15511
|
value: function transferXTokens(input) {
|
|
15149
|
-
|
|
15512
|
+
var asset = input.asset;
|
|
15513
|
+
if (asset.symbol === this.getNativeAssetSymbol()) {
|
|
15514
|
+
return XTokensTransferImpl.transferXTokens(input, Quartz.NATIVE_ASSET_ID);
|
|
15515
|
+
}
|
|
15516
|
+
if (!isForeignAsset(asset) || !asset.assetId) {
|
|
15517
|
+
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " has no assetId"));
|
|
15518
|
+
}
|
|
15519
|
+
return XTokensTransferImpl.transferXTokens(input, Number(asset.assetId));
|
|
15150
15520
|
}
|
|
15151
15521
|
}]);
|
|
15152
15522
|
}(ParachainNode);
|
|
15523
|
+
Quartz$1.NATIVE_ASSET_ID = 0;
|
|
15153
15524
|
|
|
15154
15525
|
var Shiden$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
15155
15526
|
function Shiden() {
|
|
@@ -15338,14 +15709,14 @@ var Collectives$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15338
15709
|
var determineDestWeight = function determineDestWeight(destNode) {
|
|
15339
15710
|
if (destNode === 'Astar') {
|
|
15340
15711
|
return {
|
|
15341
|
-
|
|
15342
|
-
|
|
15712
|
+
ref_time: 6000000000n,
|
|
15713
|
+
proof_size: 1000000n
|
|
15343
15714
|
};
|
|
15344
15715
|
}
|
|
15345
15716
|
if (destNode === 'Moonbeam' || destNode === 'Hydration') {
|
|
15346
15717
|
return {
|
|
15347
|
-
|
|
15348
|
-
|
|
15718
|
+
ref_time: 5000000000n,
|
|
15719
|
+
proof_size: 0n
|
|
15349
15720
|
};
|
|
15350
15721
|
}
|
|
15351
15722
|
throw new NodeNotSupportedError("Node ".concat(destNode, " is not supported"));
|
|
@@ -15402,8 +15773,8 @@ var XTransferTransferImpl = /*#__PURE__*/function () {
|
|
|
15402
15773
|
var section = 'transfer';
|
|
15403
15774
|
var destWeight = origin === 'Khala' ? null : determineDestWeight(destination);
|
|
15404
15775
|
var call = {
|
|
15405
|
-
module: pallet !== null && pallet !==
|
|
15406
|
-
section: method !== null && method !==
|
|
15776
|
+
module: pallet !== null && pallet !== undefined ? pallet : 'XTransfer',
|
|
15777
|
+
section: method !== null && method !== undefined ? method : section,
|
|
15407
15778
|
parameters: {
|
|
15408
15779
|
asset: currencySpec,
|
|
15409
15780
|
dest: dest,
|
|
@@ -15425,7 +15796,7 @@ var Khala$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15425
15796
|
key: "transferXTransfer",
|
|
15426
15797
|
value: function transferXTransfer(input) {
|
|
15427
15798
|
var asset = input.asset;
|
|
15428
|
-
if (asset.symbol !==
|
|
15799
|
+
if (asset.symbol !== this.getNativeAssetSymbol()) {
|
|
15429
15800
|
throw new InvalidCurrencyError("Node ".concat(this.node, " does not support currency ").concat(asset.symbol));
|
|
15430
15801
|
}
|
|
15431
15802
|
return XTransferTransferImpl.transferXTransfer(input);
|
|
@@ -15695,7 +16066,7 @@ var Polimec$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15695
16066
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15696
16067
|
while (1) switch (_context.prev = _context.next) {
|
|
15697
16068
|
case 0:
|
|
15698
|
-
api = input.api, _input$version = input.version, version = _input$version ===
|
|
16069
|
+
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;
|
|
15699
16070
|
if (!(scenario === 'ParaToPara' && destination === 'AssetHubPolkadot')) {
|
|
15700
16071
|
_context.next = 4;
|
|
15701
16072
|
break;
|
|
@@ -15711,7 +16082,7 @@ var Polimec$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15711
16082
|
}
|
|
15712
16083
|
throw new ScenarioNotSupportedError(this.node, scenario);
|
|
15713
16084
|
case 6:
|
|
15714
|
-
versionOrDefault = version !== null && version !==
|
|
16085
|
+
versionOrDefault = version !== null && version !== undefined ? version : Version.V3;
|
|
15715
16086
|
call = {
|
|
15716
16087
|
module: 'PolkadotXcm',
|
|
15717
16088
|
section: 'transfer_assets_using_type_and_then',
|
|
@@ -15746,7 +16117,7 @@ var Polimec$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
15746
16117
|
key: "transferRelayToPara",
|
|
15747
16118
|
value: function transferRelayToPara(options) {
|
|
15748
16119
|
var _options$version = options.version,
|
|
15749
|
-
version = _options$version ===
|
|
16120
|
+
version = _options$version === undefined ? Version.V3 : _options$version,
|
|
15750
16121
|
api = options.api,
|
|
15751
16122
|
asset = options.asset,
|
|
15752
16123
|
address = options.address,
|
|
@@ -15884,7 +16255,7 @@ var findBestMatches = function findBestMatches(assets, value) {
|
|
|
15884
16255
|
// Case-insensitive match
|
|
15885
16256
|
matches = assets.filter(function (asset) {
|
|
15886
16257
|
var _asset$property;
|
|
15887
|
-
return ((_asset$property = asset[property]) === null || _asset$property ===
|
|
16258
|
+
return ((_asset$property = asset[property]) === null || _asset$property === undefined ? undefined : _asset$property.toLowerCase()) === lowerValue;
|
|
15888
16259
|
});
|
|
15889
16260
|
return matches;
|
|
15890
16261
|
};
|
|
@@ -16065,8 +16436,8 @@ var findAssetByMultiLocation = function findAssetByMultiLocation(foreignAssets,
|
|
|
16065
16436
|
var sanitizedInput = sanitizeMultiLocation(multiLocation);
|
|
16066
16437
|
return foreignAssets.find(function (asset) {
|
|
16067
16438
|
var _asset$multiLocation, _asset$xcmInterior;
|
|
16068
|
-
var assetMLStr = JSON.stringify((_asset$multiLocation = asset.multiLocation) !== null && _asset$multiLocation !==
|
|
16069
|
-
var assetMLInteriorStr = JSON.stringify((_asset$xcmInterior = asset.xcmInterior) !== null && _asset$xcmInterior !==
|
|
16439
|
+
var assetMLStr = JSON.stringify((_asset$multiLocation = asset.multiLocation) !== null && _asset$multiLocation !== undefined ? _asset$multiLocation : '');
|
|
16440
|
+
var assetMLInteriorStr = JSON.stringify((_asset$xcmInterior = asset.xcmInterior) !== null && _asset$xcmInterior !== undefined ? _asset$xcmInterior : '');
|
|
16070
16441
|
var sanitizedAssetMLStr = sanitizeMultiLocation(assetMLStr);
|
|
16071
16442
|
var sanitizedAssetMLInteriorStr = sanitizeMultiLocation(assetMLInteriorStr);
|
|
16072
16443
|
return (
|
|
@@ -16126,13 +16497,13 @@ var getExistentialDeposit = function getExistentialDeposit(node, currency) {
|
|
|
16126
16497
|
var assetsObject = getAssetsObject(node);
|
|
16127
16498
|
if (!currency) {
|
|
16128
16499
|
var _assetsObject$nativeA;
|
|
16129
|
-
return (_assetsObject$nativeA = assetsObject.nativeAssets[0].existentialDeposit) !== null && _assetsObject$nativeA !==
|
|
16500
|
+
return (_assetsObject$nativeA = assetsObject.nativeAssets[0].existentialDeposit) !== null && _assetsObject$nativeA !== undefined ? _assetsObject$nativeA : null;
|
|
16130
16501
|
}
|
|
16131
|
-
var asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !==
|
|
16502
|
+
var asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !== undefined ? _getAssetBySymbolOrId : node === 'AssetHubPolkadot' ? getAssetBySymbolOrId('Ethereum', currency, null) : null;
|
|
16132
16503
|
if (!asset) {
|
|
16133
16504
|
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(currency), " not found on ").concat(node));
|
|
16134
16505
|
}
|
|
16135
|
-
return (_asset$existentialDep = asset.existentialDeposit) !== null && _asset$existentialDep !==
|
|
16506
|
+
return (_asset$existentialDep = asset.existentialDeposit) !== null && _asset$existentialDep !== undefined ? _asset$existentialDep : null;
|
|
16136
16507
|
};
|
|
16137
16508
|
|
|
16138
16509
|
var assetsMap = assetsMapJson;
|
|
@@ -16276,7 +16647,7 @@ var getAssetDecimals = function getAssetDecimals(node, symbol) {
|
|
|
16276
16647
|
var asset = [].concat(_toConsumableArray(otherAssets), _toConsumableArray(nativeAssets)).find(function (o) {
|
|
16277
16648
|
return o.symbol === symbol;
|
|
16278
16649
|
});
|
|
16279
|
-
return (asset === null || asset ===
|
|
16650
|
+
return (asset === null || asset === undefined ? undefined : asset.decimals) !== undefined ? asset.decimals : null;
|
|
16280
16651
|
};
|
|
16281
16652
|
/**
|
|
16282
16653
|
* Retrieves the node name corresponding to a specified parachain ID.
|
|
@@ -16291,7 +16662,7 @@ var getTNode = function getTNode(paraId, ecosystem) {
|
|
|
16291
16662
|
}
|
|
16292
16663
|
return (_NODE_NAMES_DOT_KSM$f = NODE_NAMES_DOT_KSM.find(function (nodeName) {
|
|
16293
16664
|
return getNode(nodeName).type === ecosystem && getParaId(nodeName) === paraId;
|
|
16294
|
-
})) !== null && _NODE_NAMES_DOT_KSM$f !==
|
|
16665
|
+
})) !== null && _NODE_NAMES_DOT_KSM$f !== undefined ? _NODE_NAMES_DOT_KSM$f : null;
|
|
16295
16666
|
};
|
|
16296
16667
|
|
|
16297
16668
|
var AssetHubPolkadot = {
|
|
@@ -17232,7 +17603,7 @@ var getBalanceForeignInternal = /*#__PURE__*/function () {
|
|
|
17232
17603
|
_context.next = 3;
|
|
17233
17604
|
return api.init(node);
|
|
17234
17605
|
case 3:
|
|
17235
|
-
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !==
|
|
17606
|
+
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !== undefined ? _getAssetBySymbolOrId : node === 'AssetHubPolkadot' ? getAssetBySymbolOrId('Ethereum', currency, null) : null;
|
|
17236
17607
|
if (asset) {
|
|
17237
17608
|
_context.next = 6;
|
|
17238
17609
|
break;
|
|
@@ -17409,7 +17780,7 @@ var getAssetBalanceInternal = /*#__PURE__*/function () {
|
|
|
17409
17780
|
_context.next = 16;
|
|
17410
17781
|
break;
|
|
17411
17782
|
}
|
|
17412
|
-
_context.t1 = _yield$getBalanceFore !==
|
|
17783
|
+
_context.t1 = _yield$getBalanceFore !== undefined;
|
|
17413
17784
|
case 16:
|
|
17414
17785
|
if (!_context.t1) {
|
|
17415
17786
|
_context.next = 20;
|
|
@@ -17463,10 +17834,6 @@ var getAssetBalance = /*#__PURE__*/function () {
|
|
|
17463
17834
|
};
|
|
17464
17835
|
}();
|
|
17465
17836
|
|
|
17466
|
-
var isPjsClient = function isPjsClient(api) {
|
|
17467
|
-
return _typeof(api) === 'object' && api !== null && 'disconnect' in api && typeof api.disconnect === 'function';
|
|
17468
|
-
};
|
|
17469
|
-
|
|
17470
17837
|
var buildBeneficiaryInput = function buildBeneficiaryInput(api, address) {
|
|
17471
17838
|
if (isTMultiLocation(address)) {
|
|
17472
17839
|
return address;
|
|
@@ -17493,7 +17860,7 @@ var buildClaimAssetsInput = function buildClaimAssetsInput(_ref) {
|
|
|
17493
17860
|
multiAssets = _ref.multiAssets,
|
|
17494
17861
|
address = _ref.address,
|
|
17495
17862
|
_ref$version = _ref.version,
|
|
17496
|
-
version = _ref$version ===
|
|
17863
|
+
version = _ref$version === undefined ? Version.V3 : _ref$version;
|
|
17497
17864
|
return {
|
|
17498
17865
|
assets: _defineProperty({}, version, multiAssets),
|
|
17499
17866
|
beneficiary: _defineProperty({}, version, buildBeneficiaryInput(api, address))
|
|
@@ -17510,7 +17877,6 @@ var claimAssets = /*#__PURE__*/function () {
|
|
|
17510
17877
|
_context.next = 3;
|
|
17511
17878
|
return api.init(node);
|
|
17512
17879
|
case 3:
|
|
17513
|
-
_context.prev = 3;
|
|
17514
17880
|
args = buildClaimAssetsInput(options);
|
|
17515
17881
|
module = isRelayChain(node) ? 'XcmPallet' : 'PolkadotXcm';
|
|
17516
17882
|
call = {
|
|
@@ -17519,21 +17885,11 @@ var claimAssets = /*#__PURE__*/function () {
|
|
|
17519
17885
|
parameters: args
|
|
17520
17886
|
};
|
|
17521
17887
|
return _context.abrupt("return", api.callTxMethod(call));
|
|
17522
|
-
case
|
|
17523
|
-
_context.prev = 8;
|
|
17524
|
-
if (!isPjsClient(api.getApi())) {
|
|
17525
|
-
_context.next = 12;
|
|
17526
|
-
break;
|
|
17527
|
-
}
|
|
17528
|
-
_context.next = 12;
|
|
17529
|
-
return api.disconnect();
|
|
17530
|
-
case 12:
|
|
17531
|
-
return _context.finish(8);
|
|
17532
|
-
case 13:
|
|
17888
|
+
case 7:
|
|
17533
17889
|
case "end":
|
|
17534
17890
|
return _context.stop();
|
|
17535
17891
|
}
|
|
17536
|
-
}, _callee
|
|
17892
|
+
}, _callee);
|
|
17537
17893
|
}));
|
|
17538
17894
|
return function claimAssets(_x) {
|
|
17539
17895
|
return _ref.apply(this, arguments);
|
|
@@ -17626,6 +17982,25 @@ var AssetClaimBuilder = /*#__PURE__*/function () {
|
|
|
17626
17982
|
}
|
|
17627
17983
|
return build;
|
|
17628
17984
|
}())
|
|
17985
|
+
}, {
|
|
17986
|
+
key: "disconnect",
|
|
17987
|
+
value: function () {
|
|
17988
|
+
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
17989
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
17990
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
17991
|
+
case 0:
|
|
17992
|
+
return _context2.abrupt("return", this.api.disconnect(true));
|
|
17993
|
+
case 1:
|
|
17994
|
+
case "end":
|
|
17995
|
+
return _context2.stop();
|
|
17996
|
+
}
|
|
17997
|
+
}, _callee2, this);
|
|
17998
|
+
}));
|
|
17999
|
+
function disconnect() {
|
|
18000
|
+
return _disconnect.apply(this, arguments);
|
|
18001
|
+
}
|
|
18002
|
+
return disconnect;
|
|
18003
|
+
}()
|
|
17629
18004
|
}], [{
|
|
17630
18005
|
key: "create",
|
|
17631
18006
|
value: function create(api, node) {
|
|
@@ -17691,13 +18066,7 @@ var BatchTransactionManager = /*#__PURE__*/function () {
|
|
|
17691
18066
|
return Promise.all(results);
|
|
17692
18067
|
case 12:
|
|
17693
18068
|
txs = _context.sent;
|
|
17694
|
-
return _context.abrupt("return", api.
|
|
17695
|
-
module: 'Utility',
|
|
17696
|
-
section: mode === BatchMode.BATCH_ALL ? 'batch_all' : 'batch',
|
|
17697
|
-
parameters: {
|
|
17698
|
-
data: [txs]
|
|
17699
|
-
}
|
|
17700
|
-
}));
|
|
18069
|
+
return _context.abrupt("return", api.callBatchMethod(txs, mode));
|
|
17701
18070
|
case 14:
|
|
17702
18071
|
case "end":
|
|
17703
18072
|
return _context.stop();
|
|
@@ -17942,6 +18311,25 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
17942
18311
|
}
|
|
17943
18312
|
return dryRun;
|
|
17944
18313
|
}()
|
|
18314
|
+
}, {
|
|
18315
|
+
key: "disconnect",
|
|
18316
|
+
value: function () {
|
|
18317
|
+
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
18318
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
18319
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
18320
|
+
case 0:
|
|
18321
|
+
return _context4.abrupt("return", this.api.disconnect(true));
|
|
18322
|
+
case 1:
|
|
18323
|
+
case "end":
|
|
18324
|
+
return _context4.stop();
|
|
18325
|
+
}
|
|
18326
|
+
}, _callee4, this);
|
|
18327
|
+
}));
|
|
18328
|
+
function disconnect() {
|
|
18329
|
+
return _disconnect.apply(this, arguments);
|
|
18330
|
+
}
|
|
18331
|
+
return disconnect;
|
|
18332
|
+
}()
|
|
17945
18333
|
}]);
|
|
17946
18334
|
}();
|
|
17947
18335
|
/**
|
|
@@ -17961,7 +18349,7 @@ var getOriginFeeDetailsInternal = /*#__PURE__*/function () {
|
|
|
17961
18349
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17962
18350
|
while (1) switch (_context.prev = _context.next) {
|
|
17963
18351
|
case 0:
|
|
17964
|
-
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 ===
|
|
18352
|
+
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;
|
|
17965
18353
|
_context.next = 3;
|
|
17966
18354
|
return api.init(origin);
|
|
17967
18355
|
case 3:
|
|
@@ -17982,7 +18370,7 @@ var getOriginFeeDetailsInternal = /*#__PURE__*/function () {
|
|
|
17982
18370
|
});
|
|
17983
18371
|
case 12:
|
|
17984
18372
|
nativeBalance = _context.sent;
|
|
17985
|
-
existentialDeposit = BigInt((_getExistentialDeposi = getExistentialDeposit(origin)) !== null && _getExistentialDeposi !==
|
|
18373
|
+
existentialDeposit = BigInt((_getExistentialDeposi = getExistentialDeposit(origin)) !== null && _getExistentialDeposi !== undefined ? _getExistentialDeposi : '0');
|
|
17986
18374
|
sufficientForXCM = nativeBalance - existentialDeposit - xcmFeeWithMargin > 0;
|
|
17987
18375
|
return _context.abrupt("return", {
|
|
17988
18376
|
sufficientForXCM: sufficientForXCM,
|
|
@@ -18090,7 +18478,7 @@ var getMaxForeignTransferableAmount = /*#__PURE__*/function () {
|
|
|
18090
18478
|
case 0:
|
|
18091
18479
|
api = _ref3.api, address = _ref3.address, node = _ref3.node, currency = _ref3.currency;
|
|
18092
18480
|
validateAddress(address, node, false);
|
|
18093
|
-
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !==
|
|
18481
|
+
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId !== undefined ? _getAssetBySymbolOrId : node === 'AssetHubPolkadot' ? getAssetBySymbolOrId('Ethereum', currency, null) : null;
|
|
18094
18482
|
if (asset) {
|
|
18095
18483
|
_context2.next = 5;
|
|
18096
18484
|
break;
|
|
@@ -18141,7 +18529,7 @@ var getTransferableAmount = /*#__PURE__*/function () {
|
|
|
18141
18529
|
case 0:
|
|
18142
18530
|
api = _ref5.api, address = _ref5.address, node = _ref5.node, currency = _ref5.currency;
|
|
18143
18531
|
validateAddress(address, node, false);
|
|
18144
|
-
asset = (_getAssetBySymbolOrId2 = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId2 !==
|
|
18532
|
+
asset = (_getAssetBySymbolOrId2 = getAssetBySymbolOrId(node, currency, null)) !== null && _getAssetBySymbolOrId2 !== undefined ? _getAssetBySymbolOrId2 : node === 'AssetHubPolkadot' ? getAssetBySymbolOrId('Ethereum', currency, null) : null;
|
|
18145
18533
|
if (asset) {
|
|
18146
18534
|
_context3.next = 5;
|
|
18147
18535
|
break;
|
|
@@ -18215,7 +18603,7 @@ var getTransferInfo = /*#__PURE__*/function () {
|
|
|
18215
18603
|
case 14:
|
|
18216
18604
|
xcmFeeDetails = _context.sent;
|
|
18217
18605
|
expectedBalanceAfterXCMDelivery = originBalance - xcmFeeDetails.xcmFee;
|
|
18218
|
-
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(origin, currency, destination)) !== null && _getAssetBySymbolOrId !==
|
|
18606
|
+
asset = (_getAssetBySymbolOrId = getAssetBySymbolOrId(origin, currency, destination)) !== null && _getAssetBySymbolOrId !== undefined ? _getAssetBySymbolOrId : origin === 'AssetHubPolkadot' ? getAssetBySymbolOrId('Ethereum', currency, null) : null;
|
|
18219
18607
|
if (asset) {
|
|
18220
18608
|
_context.next = 19;
|
|
18221
18609
|
break;
|
|
@@ -18236,7 +18624,7 @@ var getTransferInfo = /*#__PURE__*/function () {
|
|
|
18236
18624
|
});
|
|
18237
18625
|
case 22:
|
|
18238
18626
|
_context.t1 = _context.sent;
|
|
18239
|
-
_context.t2 = (_asset$symbol = asset === null || asset ===
|
|
18627
|
+
_context.t2 = (_asset$symbol = asset === null || asset === undefined ? undefined : asset.symbol) !== null && _asset$symbol !== undefined ? _asset$symbol : '';
|
|
18240
18628
|
_context.t3 = {
|
|
18241
18629
|
balance: _context.t1,
|
|
18242
18630
|
currency: _context.t2
|
|
@@ -18244,9 +18632,9 @@ var getTransferInfo = /*#__PURE__*/function () {
|
|
|
18244
18632
|
_context.t4 = originBalance;
|
|
18245
18633
|
_context.t5 = expectedBalanceAfterXCMDelivery;
|
|
18246
18634
|
_context.t6 = xcmFeeDetails;
|
|
18247
|
-
_context.t7 = BigInt((_getExistentialDeposi = getExistentialDeposit(origin)) !== null && _getExistentialDeposi !==
|
|
18635
|
+
_context.t7 = BigInt((_getExistentialDeposi = getExistentialDeposit(origin)) !== null && _getExistentialDeposi !== undefined ? _getExistentialDeposi : 0);
|
|
18248
18636
|
_context.t8 = getNativeAssetSymbol(origin);
|
|
18249
|
-
_context.t9 = BigInt((_getExistentialDeposi2 = getExistentialDeposit(origin)) !== null && _getExistentialDeposi2 !==
|
|
18637
|
+
_context.t9 = BigInt((_getExistentialDeposi2 = getExistentialDeposit(origin)) !== null && _getExistentialDeposi2 !== undefined ? _getExistentialDeposi2 : 0);
|
|
18250
18638
|
_context.next = 33;
|
|
18251
18639
|
return getMaxNativeTransferableAmount({
|
|
18252
18640
|
api: api,
|
|
@@ -18273,7 +18661,7 @@ var getTransferInfo = /*#__PURE__*/function () {
|
|
|
18273
18661
|
case 37:
|
|
18274
18662
|
_context.t12 = _context.sent;
|
|
18275
18663
|
_context.t13 = getNativeAssetSymbol(destination);
|
|
18276
|
-
_context.t14 = BigInt((_getExistentialDeposi3 = getExistentialDeposit(destination)) !== null && _getExistentialDeposi3 !==
|
|
18664
|
+
_context.t14 = BigInt((_getExistentialDeposi3 = getExistentialDeposit(destination)) !== null && _getExistentialDeposi3 !== undefined ? _getExistentialDeposi3 : 0);
|
|
18277
18665
|
_context.t15 = {
|
|
18278
18666
|
balance: _context.t12,
|
|
18279
18667
|
currency: _context.t13,
|
|
@@ -18511,7 +18899,7 @@ var getMultiLocationTokenId = function getMultiLocationTokenId(location, node) {
|
|
|
18511
18899
|
var assetId = location.interior.value[1].value;
|
|
18512
18900
|
return (_foreignAssets$find$a = (_foreignAssets$find = foreignAssets.find(function (asset) {
|
|
18513
18901
|
return asset.assetId === String(assetId);
|
|
18514
|
-
})) === null || _foreignAssets$find ===
|
|
18902
|
+
})) === null || _foreignAssets$find === undefined ? undefined : _foreignAssets$find.assetId) !== null && _foreignAssets$find$a !== undefined ? _foreignAssets$find$a : null;
|
|
18515
18903
|
}
|
|
18516
18904
|
}
|
|
18517
18905
|
return null;
|
|
@@ -18580,7 +18968,7 @@ var getMultiLocationTokenIdPjs = function getMultiLocationTokenIdPjs(location, n
|
|
|
18580
18968
|
var assetId = junctions[1].GeneralIndex;
|
|
18581
18969
|
return (_foreignAssets$find$s = (_foreignAssets$find = foreignAssets.find(function (asset) {
|
|
18582
18970
|
return asset.assetId === String(assetId);
|
|
18583
|
-
})) === null || _foreignAssets$find ===
|
|
18971
|
+
})) === null || _foreignAssets$find === undefined ? undefined : _foreignAssets$find.symbol) !== null && _foreignAssets$find$s !== undefined ? _foreignAssets$find$s : null;
|
|
18584
18972
|
}
|
|
18585
18973
|
}
|
|
18586
18974
|
return null;
|
|
@@ -18694,6 +19082,9 @@ var validateCurrency = function validateCurrency(currency) {
|
|
|
18694
19082
|
}
|
|
18695
19083
|
};
|
|
18696
19084
|
var validateDestination = function validateDestination(origin, destination) {
|
|
19085
|
+
if (isRelayChain(origin) && !isTMultiLocation(destination) && isRelayChain(destination)) {
|
|
19086
|
+
throw new IncompatibleNodesError('Direct relay chain to relay chain transfers are not supported. Please use Polkadot <-> Kusama bridge through AssetHub.');
|
|
19087
|
+
}
|
|
18697
19088
|
if (destination === 'Ethereum' && origin !== 'AssetHubPolkadot' && origin !== 'Hydration') {
|
|
18698
19089
|
throw new IncompatibleNodesError('Transfers to Ethereum are only supported from AssetHubPolkadot and Hydration.');
|
|
18699
19090
|
}
|
|
@@ -18734,12 +19125,12 @@ var validateAssetSupport = function validateAssetSupport(_ref, assetCheckEnabled
|
|
|
18734
19125
|
}
|
|
18735
19126
|
if ('symbol' in currency && nativeAssets.some(function (nativeAsset) {
|
|
18736
19127
|
var _asset$symbol;
|
|
18737
|
-
return nativeAsset.symbol.toLowerCase() === (asset === null || asset ===
|
|
19128
|
+
return nativeAsset.symbol.toLowerCase() === (asset === null || asset === undefined || (_asset$symbol = asset.symbol) === null || _asset$symbol === undefined ? undefined : _asset$symbol.toLowerCase());
|
|
18738
19129
|
})) {
|
|
18739
|
-
throw new InvalidCurrencyError("".concat(JSON.stringify(asset === null || asset ===
|
|
19130
|
+
throw new InvalidCurrencyError("".concat(JSON.stringify(asset === null || asset === undefined ? undefined : asset.symbol), " is not supported for transfers to ").concat(destination, "."));
|
|
18740
19131
|
}
|
|
18741
19132
|
}
|
|
18742
|
-
if (!isBridge && !isRelayDestination && !isMultiLocationDestination && (asset === null || asset ===
|
|
19133
|
+
if (!isBridge && !isRelayDestination && !isMultiLocationDestination && (asset === null || asset === undefined ? undefined : asset.symbol) !== undefined && assetCheckEnabled && !('id' in currency) && !hasSupportForAsset(destination, asset.symbol)) {
|
|
18743
19134
|
throw new InvalidCurrencyError("Destination node ".concat(destination, " does not support currency ").concat(JSON.stringify(currency), "."));
|
|
18744
19135
|
}
|
|
18745
19136
|
if (!isBridge && asset === null && assetCheckEnabled) {
|
|
@@ -18764,7 +19155,6 @@ var transferRelayToPara = /*#__PURE__*/function () {
|
|
|
18764
19155
|
_context.next = 6;
|
|
18765
19156
|
return api.init(origin);
|
|
18766
19157
|
case 6:
|
|
18767
|
-
_context.prev = 6;
|
|
18768
19158
|
serializedApiCall = getNode(isMultiLocationDestination ? resolveTNodeFromMultiLocation(origin, destination) : destination).transferRelayToPara({
|
|
18769
19159
|
api: api,
|
|
18770
19160
|
origin: origin,
|
|
@@ -18777,21 +19167,11 @@ var transferRelayToPara = /*#__PURE__*/function () {
|
|
|
18777
19167
|
method: method
|
|
18778
19168
|
});
|
|
18779
19169
|
return _context.abrupt("return", api.callTxMethod(serializedApiCall));
|
|
18780
|
-
case
|
|
18781
|
-
_context.prev = 9;
|
|
18782
|
-
if (!isPjsClient(api.getApi())) {
|
|
18783
|
-
_context.next = 13;
|
|
18784
|
-
break;
|
|
18785
|
-
}
|
|
18786
|
-
_context.next = 13;
|
|
18787
|
-
return api.disconnect();
|
|
18788
|
-
case 13:
|
|
18789
|
-
return _context.finish(9);
|
|
18790
|
-
case 14:
|
|
19170
|
+
case 8:
|
|
18791
19171
|
case "end":
|
|
18792
19172
|
return _context.stop();
|
|
18793
19173
|
}
|
|
18794
|
-
}, _callee
|
|
19174
|
+
}, _callee);
|
|
18795
19175
|
}));
|
|
18796
19176
|
return function transferRelayToPara(_x) {
|
|
18797
19177
|
return _ref.apply(this, arguments);
|
|
@@ -18822,8 +19202,8 @@ var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge,
|
|
|
18822
19202
|
var originTyped = origin;
|
|
18823
19203
|
var originNode = getNode(originTyped);
|
|
18824
19204
|
return _objectSpread2({
|
|
18825
|
-
isFeeAsset: (_currency$isFeeAsset = currency.isFeeAsset) !== null && _currency$isFeeAsset !==
|
|
18826
|
-
}, createMultiAsset(originNode.version, currency.amount, asset === null || asset ===
|
|
19205
|
+
isFeeAsset: (_currency$isFeeAsset = currency.isFeeAsset) !== null && _currency$isFeeAsset !== undefined ? _currency$isFeeAsset : false
|
|
19206
|
+
}, createMultiAsset(originNode.version, currency.amount, asset === null || asset === undefined ? undefined : asset.multiLocation));
|
|
18827
19207
|
});
|
|
18828
19208
|
return assets;
|
|
18829
19209
|
}
|
|
@@ -18885,14 +19265,12 @@ var send = /*#__PURE__*/function () {
|
|
|
18885
19265
|
_context.next = 20;
|
|
18886
19266
|
return api.init(origin);
|
|
18887
19267
|
case 20:
|
|
18888
|
-
_context.prev = 20;
|
|
18889
19268
|
// In case asset check is disabled, we create asset object from currency symbol
|
|
18890
|
-
resolvedAsset = asset !== null && asset !==
|
|
19269
|
+
resolvedAsset = asset !== null && asset !== undefined ? asset : {
|
|
18891
19270
|
symbol: 'symbol' in currency ? currency.symbol : undefined
|
|
18892
19271
|
};
|
|
18893
19272
|
originNode = getNode(origin);
|
|
18894
|
-
_context.
|
|
18895
|
-
return originNode.transfer({
|
|
19273
|
+
return _context.abrupt("return", originNode.transfer({
|
|
18896
19274
|
api: api,
|
|
18897
19275
|
asset: _objectSpread2(_objectSpread2({}, resolvedAsset), {}, {
|
|
18898
19276
|
amount: 'multiasset' in currency ? 0 : currency.amount
|
|
@@ -18905,24 +19283,12 @@ var send = /*#__PURE__*/function () {
|
|
|
18905
19283
|
ahAddress: ahAddress,
|
|
18906
19284
|
pallet: pallet,
|
|
18907
19285
|
method: method
|
|
18908
|
-
});
|
|
18909
|
-
case
|
|
18910
|
-
return _context.abrupt("return", _context.sent);
|
|
18911
|
-
case 26:
|
|
18912
|
-
_context.prev = 26;
|
|
18913
|
-
if (!isPjsClient(api.getApi())) {
|
|
18914
|
-
_context.next = 30;
|
|
18915
|
-
break;
|
|
18916
|
-
}
|
|
18917
|
-
_context.next = 30;
|
|
18918
|
-
return api.disconnect();
|
|
18919
|
-
case 30:
|
|
18920
|
-
return _context.finish(26);
|
|
18921
|
-
case 31:
|
|
19286
|
+
}));
|
|
19287
|
+
case 23:
|
|
18922
19288
|
case "end":
|
|
18923
19289
|
return _context.stop();
|
|
18924
19290
|
}
|
|
18925
|
-
}, _callee
|
|
19291
|
+
}, _callee);
|
|
18926
19292
|
}));
|
|
18927
19293
|
return function send(_x) {
|
|
18928
19294
|
return _ref.apply(this, arguments);
|
|
@@ -19173,7 +19539,7 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
19173
19539
|
break;
|
|
19174
19540
|
}
|
|
19175
19541
|
_context.next = 25;
|
|
19176
|
-
return createTx('transferMultiCurrencies', [[[asset, currency.amount], [formatAssetIdToERC20((_usdtAsset$assetId = usdtAsset.assetId) !== null && _usdtAsset$assetId !==
|
|
19542
|
+
return createTx('transferMultiCurrencies', [[[asset, currency.amount], [formatAssetIdToERC20((_usdtAsset$assetId = usdtAsset.assetId) !== null && _usdtAsset$assetId !== undefined ? _usdtAsset$assetId : ''), '200000']], 1,
|
|
19177
19543
|
// index of the fee asset
|
|
19178
19544
|
destMultiLocation, weight]);
|
|
19179
19545
|
case 25:
|