@paraspell/sdk 5.5.0 → 5.7.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/README.md +10 -7
- package/dist/index.cjs +1559 -916
- package/dist/index.d.ts +85 -27
- package/dist/index.mjs +1551 -914
- package/package.json +18 -29
package/dist/index.mjs
CHANGED
|
@@ -3,10 +3,29 @@ import { ethers } from 'ethers';
|
|
|
3
3
|
import { prodRelayPolkadot, prodRelayKusama } from '@polkadot/apps-config/endpoints';
|
|
4
4
|
import { u32 } from '@polkadot/types';
|
|
5
5
|
import { BN } from '@polkadot/util';
|
|
6
|
+
import { toPolkadot, environment, contextFactory } from '@snowbridge/api';
|
|
6
7
|
|
|
8
|
+
function _arrayLikeToArray(r, a) {
|
|
9
|
+
(null == a || a > r.length) && (a = r.length);
|
|
10
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
11
|
+
return n;
|
|
12
|
+
}
|
|
13
|
+
function _arrayWithHoles(r) {
|
|
14
|
+
if (Array.isArray(r)) return r;
|
|
15
|
+
}
|
|
16
|
+
function _arrayWithoutHoles(r) {
|
|
17
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
18
|
+
}
|
|
19
|
+
function _assertThisInitialized(e) {
|
|
20
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
21
|
+
return e;
|
|
22
|
+
}
|
|
7
23
|
function _callSuper(t, o, e) {
|
|
8
24
|
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
9
25
|
}
|
|
26
|
+
function _classCallCheck(a, n) {
|
|
27
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
28
|
+
}
|
|
10
29
|
function _construct(t, e, r) {
|
|
11
30
|
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
|
12
31
|
var o = [null];
|
|
@@ -14,6 +33,106 @@ function _construct(t, e, r) {
|
|
|
14
33
|
var p = new (t.bind.apply(t, o))();
|
|
15
34
|
return r && _setPrototypeOf(p, r.prototype), p;
|
|
16
35
|
}
|
|
36
|
+
function _defineProperties(e, r) {
|
|
37
|
+
for (var t = 0; t < r.length; t++) {
|
|
38
|
+
var o = r[t];
|
|
39
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function _createClass(e, r, t) {
|
|
43
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
44
|
+
writable: !1
|
|
45
|
+
}), e;
|
|
46
|
+
}
|
|
47
|
+
function _createForOfIteratorHelper(r, e) {
|
|
48
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
49
|
+
if (!t) {
|
|
50
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
|
|
51
|
+
t && (r = t);
|
|
52
|
+
var n = 0,
|
|
53
|
+
F = function () {};
|
|
54
|
+
return {
|
|
55
|
+
s: F,
|
|
56
|
+
n: function () {
|
|
57
|
+
return n >= r.length ? {
|
|
58
|
+
done: !0
|
|
59
|
+
} : {
|
|
60
|
+
done: !1,
|
|
61
|
+
value: r[n++]
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
e: function (r) {
|
|
65
|
+
throw r;
|
|
66
|
+
},
|
|
67
|
+
f: F
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
71
|
+
}
|
|
72
|
+
var o,
|
|
73
|
+
a = !0,
|
|
74
|
+
u = !1;
|
|
75
|
+
return {
|
|
76
|
+
s: function () {
|
|
77
|
+
t = t.call(r);
|
|
78
|
+
},
|
|
79
|
+
n: function () {
|
|
80
|
+
var r = t.next();
|
|
81
|
+
return a = r.done, r;
|
|
82
|
+
},
|
|
83
|
+
e: function (r) {
|
|
84
|
+
u = !0, o = r;
|
|
85
|
+
},
|
|
86
|
+
f: function () {
|
|
87
|
+
try {
|
|
88
|
+
a || null == t.return || t.return();
|
|
89
|
+
} finally {
|
|
90
|
+
if (u) throw o;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function _defineProperty(e, r, t) {
|
|
96
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
97
|
+
value: t,
|
|
98
|
+
enumerable: !0,
|
|
99
|
+
configurable: !0,
|
|
100
|
+
writable: !0
|
|
101
|
+
}) : e[r] = t, e;
|
|
102
|
+
}
|
|
103
|
+
function _get() {
|
|
104
|
+
return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
|
|
105
|
+
var p = _superPropBase(e, t);
|
|
106
|
+
if (p) {
|
|
107
|
+
var n = Object.getOwnPropertyDescriptor(p, t);
|
|
108
|
+
return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
|
|
109
|
+
}
|
|
110
|
+
}, _get.apply(null, arguments);
|
|
111
|
+
}
|
|
112
|
+
function _getPrototypeOf(t) {
|
|
113
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
114
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
115
|
+
}, _getPrototypeOf(t);
|
|
116
|
+
}
|
|
117
|
+
function _inherits(t, e) {
|
|
118
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
119
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
120
|
+
constructor: {
|
|
121
|
+
value: t,
|
|
122
|
+
writable: !0,
|
|
123
|
+
configurable: !0
|
|
124
|
+
}
|
|
125
|
+
}), Object.defineProperty(t, "prototype", {
|
|
126
|
+
writable: !1
|
|
127
|
+
}), e && _setPrototypeOf(t, e);
|
|
128
|
+
}
|
|
129
|
+
function _isNativeFunction(t) {
|
|
130
|
+
try {
|
|
131
|
+
return -1 !== Function.toString.call(t).indexOf("[native code]");
|
|
132
|
+
} catch (n) {
|
|
133
|
+
return "function" == typeof t;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
17
136
|
function _isNativeReflectConstruct() {
|
|
18
137
|
try {
|
|
19
138
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
@@ -22,6 +141,9 @@ function _isNativeReflectConstruct() {
|
|
|
22
141
|
return !!t;
|
|
23
142
|
})();
|
|
24
143
|
}
|
|
144
|
+
function _iterableToArray(r) {
|
|
145
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
146
|
+
}
|
|
25
147
|
function _iterableToArrayLimit(r, l) {
|
|
26
148
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
27
149
|
if (null != t) {
|
|
@@ -46,6 +168,17 @@ function _iterableToArrayLimit(r, l) {
|
|
|
46
168
|
return a;
|
|
47
169
|
}
|
|
48
170
|
}
|
|
171
|
+
function _nonIterableRest() {
|
|
172
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
173
|
+
}
|
|
174
|
+
function _nonIterableSpread() {
|
|
175
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
176
|
+
}
|
|
177
|
+
function _possibleConstructorReturn(t, e) {
|
|
178
|
+
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
179
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
180
|
+
return _assertThisInitialized(t);
|
|
181
|
+
}
|
|
49
182
|
function _regeneratorRuntime() {
|
|
50
183
|
_regeneratorRuntime = function () {
|
|
51
184
|
return e;
|
|
@@ -347,6 +480,27 @@ function _regeneratorRuntime() {
|
|
|
347
480
|
}
|
|
348
481
|
}, e;
|
|
349
482
|
}
|
|
483
|
+
function _setPrototypeOf(t, e) {
|
|
484
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
485
|
+
return t.__proto__ = e, t;
|
|
486
|
+
}, _setPrototypeOf(t, e);
|
|
487
|
+
}
|
|
488
|
+
function _slicedToArray(r, e) {
|
|
489
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
490
|
+
}
|
|
491
|
+
function _superPropBase(t, o) {
|
|
492
|
+
for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
|
|
493
|
+
return t;
|
|
494
|
+
}
|
|
495
|
+
function _superPropGet(t, e, r, o) {
|
|
496
|
+
var p = _get(_getPrototypeOf(t.prototype ), e, r);
|
|
497
|
+
return function (t) {
|
|
498
|
+
return p.apply(r, t);
|
|
499
|
+
} ;
|
|
500
|
+
}
|
|
501
|
+
function _toConsumableArray(r) {
|
|
502
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
503
|
+
}
|
|
350
504
|
function _toPrimitive(t, r) {
|
|
351
505
|
if ("object" != typeof t || !t) return t;
|
|
352
506
|
var e = t[Symbol.toPrimitive];
|
|
@@ -370,225 +524,34 @@ function _typeof(o) {
|
|
|
370
524
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
371
525
|
}, _typeof(o);
|
|
372
526
|
}
|
|
373
|
-
function
|
|
374
|
-
if (
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
function _defineProperties(target, props) {
|
|
379
|
-
for (var i = 0; i < props.length; i++) {
|
|
380
|
-
var descriptor = props[i];
|
|
381
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
382
|
-
descriptor.configurable = true;
|
|
383
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
384
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
388
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
389
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
390
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
391
|
-
writable: false
|
|
392
|
-
});
|
|
393
|
-
return Constructor;
|
|
394
|
-
}
|
|
395
|
-
function _defineProperty(obj, key, value) {
|
|
396
|
-
key = _toPropertyKey(key);
|
|
397
|
-
if (key in obj) {
|
|
398
|
-
Object.defineProperty(obj, key, {
|
|
399
|
-
value: value,
|
|
400
|
-
enumerable: true,
|
|
401
|
-
configurable: true,
|
|
402
|
-
writable: true
|
|
403
|
-
});
|
|
404
|
-
} else {
|
|
405
|
-
obj[key] = value;
|
|
406
|
-
}
|
|
407
|
-
return obj;
|
|
408
|
-
}
|
|
409
|
-
function _inherits(subClass, superClass) {
|
|
410
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
411
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
412
|
-
}
|
|
413
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
414
|
-
constructor: {
|
|
415
|
-
value: subClass,
|
|
416
|
-
writable: true,
|
|
417
|
-
configurable: true
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
Object.defineProperty(subClass, "prototype", {
|
|
421
|
-
writable: false
|
|
422
|
-
});
|
|
423
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
424
|
-
}
|
|
425
|
-
function _getPrototypeOf(o) {
|
|
426
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
427
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
428
|
-
};
|
|
429
|
-
return _getPrototypeOf(o);
|
|
430
|
-
}
|
|
431
|
-
function _setPrototypeOf(o, p) {
|
|
432
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
433
|
-
o.__proto__ = p;
|
|
434
|
-
return o;
|
|
435
|
-
};
|
|
436
|
-
return _setPrototypeOf(o, p);
|
|
437
|
-
}
|
|
438
|
-
function _isNativeFunction(fn) {
|
|
439
|
-
try {
|
|
440
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
441
|
-
} catch (e) {
|
|
442
|
-
return typeof fn === "function";
|
|
527
|
+
function _unsupportedIterableToArray(r, a) {
|
|
528
|
+
if (r) {
|
|
529
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
530
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
531
|
+
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) : void 0;
|
|
443
532
|
}
|
|
444
533
|
}
|
|
445
|
-
function _wrapNativeSuper(
|
|
446
|
-
var
|
|
447
|
-
_wrapNativeSuper = function
|
|
448
|
-
if (
|
|
449
|
-
if (typeof
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
454
|
-
_cache.set(Class, Wrapper);
|
|
534
|
+
function _wrapNativeSuper(t) {
|
|
535
|
+
var r = "function" == typeof Map ? new Map() : void 0;
|
|
536
|
+
return _wrapNativeSuper = function (t) {
|
|
537
|
+
if (null === t || !_isNativeFunction(t)) return t;
|
|
538
|
+
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
|
539
|
+
if (void 0 !== r) {
|
|
540
|
+
if (r.has(t)) return r.get(t);
|
|
541
|
+
r.set(t, Wrapper);
|
|
455
542
|
}
|
|
456
543
|
function Wrapper() {
|
|
457
|
-
return _construct(
|
|
544
|
+
return _construct(t, arguments, _getPrototypeOf(this).constructor);
|
|
458
545
|
}
|
|
459
|
-
Wrapper.prototype = Object.create(
|
|
546
|
+
return Wrapper.prototype = Object.create(t.prototype, {
|
|
460
547
|
constructor: {
|
|
461
548
|
value: Wrapper,
|
|
462
|
-
enumerable:
|
|
463
|
-
writable:
|
|
464
|
-
configurable:
|
|
465
|
-
}
|
|
466
|
-
});
|
|
467
|
-
return _setPrototypeOf(Wrapper, Class);
|
|
468
|
-
};
|
|
469
|
-
return _wrapNativeSuper(Class);
|
|
470
|
-
}
|
|
471
|
-
function _assertThisInitialized(self) {
|
|
472
|
-
if (self === void 0) {
|
|
473
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
474
|
-
}
|
|
475
|
-
return self;
|
|
476
|
-
}
|
|
477
|
-
function _possibleConstructorReturn(self, call) {
|
|
478
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
479
|
-
return call;
|
|
480
|
-
} else if (call !== void 0) {
|
|
481
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
482
|
-
}
|
|
483
|
-
return _assertThisInitialized(self);
|
|
484
|
-
}
|
|
485
|
-
function _superPropBase(object, property) {
|
|
486
|
-
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
487
|
-
object = _getPrototypeOf(object);
|
|
488
|
-
if (object === null) break;
|
|
489
|
-
}
|
|
490
|
-
return object;
|
|
491
|
-
}
|
|
492
|
-
function _get() {
|
|
493
|
-
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
494
|
-
_get = Reflect.get.bind();
|
|
495
|
-
} else {
|
|
496
|
-
_get = function _get(target, property, receiver) {
|
|
497
|
-
var base = _superPropBase(target, property);
|
|
498
|
-
if (!base) return;
|
|
499
|
-
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
500
|
-
if (desc.get) {
|
|
501
|
-
return desc.get.call(arguments.length < 3 ? target : receiver);
|
|
502
|
-
}
|
|
503
|
-
return desc.value;
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
return _get.apply(this, arguments);
|
|
507
|
-
}
|
|
508
|
-
function _slicedToArray(arr, i) {
|
|
509
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
510
|
-
}
|
|
511
|
-
function _toConsumableArray(arr) {
|
|
512
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
513
|
-
}
|
|
514
|
-
function _arrayWithoutHoles(arr) {
|
|
515
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
516
|
-
}
|
|
517
|
-
function _arrayWithHoles(arr) {
|
|
518
|
-
if (Array.isArray(arr)) return arr;
|
|
519
|
-
}
|
|
520
|
-
function _iterableToArray(iter) {
|
|
521
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
522
|
-
}
|
|
523
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
524
|
-
if (!o) return;
|
|
525
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
526
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
527
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
528
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
529
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
530
|
-
}
|
|
531
|
-
function _arrayLikeToArray(arr, len) {
|
|
532
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
533
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
534
|
-
return arr2;
|
|
535
|
-
}
|
|
536
|
-
function _nonIterableSpread() {
|
|
537
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
538
|
-
}
|
|
539
|
-
function _nonIterableRest() {
|
|
540
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
541
|
-
}
|
|
542
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
543
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
544
|
-
if (!it) {
|
|
545
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike ) {
|
|
546
|
-
if (it) o = it;
|
|
547
|
-
var i = 0;
|
|
548
|
-
var F = function () {};
|
|
549
|
-
return {
|
|
550
|
-
s: F,
|
|
551
|
-
n: function () {
|
|
552
|
-
if (i >= o.length) return {
|
|
553
|
-
done: true
|
|
554
|
-
};
|
|
555
|
-
return {
|
|
556
|
-
done: false,
|
|
557
|
-
value: o[i++]
|
|
558
|
-
};
|
|
559
|
-
},
|
|
560
|
-
e: function (e) {
|
|
561
|
-
throw e;
|
|
562
|
-
},
|
|
563
|
-
f: F
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
567
|
-
}
|
|
568
|
-
var normalCompletion = true,
|
|
569
|
-
didErr = false,
|
|
570
|
-
err;
|
|
571
|
-
return {
|
|
572
|
-
s: function () {
|
|
573
|
-
it = it.call(o);
|
|
574
|
-
},
|
|
575
|
-
n: function () {
|
|
576
|
-
var step = it.next();
|
|
577
|
-
normalCompletion = step.done;
|
|
578
|
-
return step;
|
|
579
|
-
},
|
|
580
|
-
e: function (e) {
|
|
581
|
-
didErr = true;
|
|
582
|
-
err = e;
|
|
583
|
-
},
|
|
584
|
-
f: function () {
|
|
585
|
-
try {
|
|
586
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
587
|
-
} finally {
|
|
588
|
-
if (didErr) throw err;
|
|
549
|
+
enumerable: !1,
|
|
550
|
+
writable: !0,
|
|
551
|
+
configurable: !0
|
|
589
552
|
}
|
|
590
|
-
}
|
|
591
|
-
};
|
|
553
|
+
}), _setPrototypeOf(Wrapper, t);
|
|
554
|
+
}, _wrapNativeSuper(t);
|
|
592
555
|
}
|
|
593
556
|
|
|
594
557
|
/******************************************************************************
|
|
@@ -608,18 +571,6 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
608
571
|
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
609
572
|
|
|
610
573
|
|
|
611
|
-
function __rest(s, e) {
|
|
612
|
-
var t = {};
|
|
613
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
614
|
-
t[p] = s[p];
|
|
615
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
616
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
617
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
618
|
-
t[p[i]] = s[p[i]];
|
|
619
|
-
}
|
|
620
|
-
return t;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
574
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
624
575
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
625
576
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -845,6 +796,32 @@ var Acala$3 = {
|
|
|
845
796
|
}
|
|
846
797
|
]
|
|
847
798
|
};
|
|
799
|
+
var BridgeHubPolkadot$3 = {
|
|
800
|
+
paraId: 1002,
|
|
801
|
+
relayChainAssetSymbol: "DOT",
|
|
802
|
+
nativeAssetSymbol: "DOT",
|
|
803
|
+
nativeAssets: [
|
|
804
|
+
{
|
|
805
|
+
symbol: "DOT",
|
|
806
|
+
decimals: 10
|
|
807
|
+
}
|
|
808
|
+
],
|
|
809
|
+
otherAssets: [
|
|
810
|
+
]
|
|
811
|
+
};
|
|
812
|
+
var BridgeHubKusama$3 = {
|
|
813
|
+
paraId: 1002,
|
|
814
|
+
relayChainAssetSymbol: "KSM",
|
|
815
|
+
nativeAssetSymbol: "KSM",
|
|
816
|
+
nativeAssets: [
|
|
817
|
+
{
|
|
818
|
+
symbol: "KSM",
|
|
819
|
+
decimals: 12
|
|
820
|
+
}
|
|
821
|
+
],
|
|
822
|
+
otherAssets: [
|
|
823
|
+
]
|
|
824
|
+
};
|
|
848
825
|
var Astar$3 = {
|
|
849
826
|
paraId: 2006,
|
|
850
827
|
relayChainAssetSymbol: "DOT",
|
|
@@ -1135,7 +1112,7 @@ var BifrostPolkadot$3 = {
|
|
|
1135
1112
|
},
|
|
1136
1113
|
{
|
|
1137
1114
|
symbol: "ETH",
|
|
1138
|
-
decimals:
|
|
1115
|
+
decimals: 10
|
|
1139
1116
|
},
|
|
1140
1117
|
{
|
|
1141
1118
|
symbol: "KAR",
|
|
@@ -1262,7 +1239,7 @@ var Centrifuge$3 = {
|
|
|
1262
1239
|
},
|
|
1263
1240
|
{
|
|
1264
1241
|
assetId: "1655476167",
|
|
1265
|
-
symbol: "
|
|
1242
|
+
symbol: "DYF1",
|
|
1266
1243
|
decimals: 6
|
|
1267
1244
|
},
|
|
1268
1245
|
{
|
|
@@ -1441,7 +1418,7 @@ var Darwinia$3 = {
|
|
|
1441
1418
|
otherAssets: [
|
|
1442
1419
|
]
|
|
1443
1420
|
};
|
|
1444
|
-
var
|
|
1421
|
+
var Hydration$3 = {
|
|
1445
1422
|
paraId: 2034,
|
|
1446
1423
|
relayChainAssetSymbol: "DOT",
|
|
1447
1424
|
nativeAssetSymbol: "HDX",
|
|
@@ -1532,6 +1509,11 @@ var HydraDX$3 = {
|
|
|
1532
1509
|
symbol: "RING",
|
|
1533
1510
|
decimals: 18
|
|
1534
1511
|
},
|
|
1512
|
+
{
|
|
1513
|
+
assetId: "33",
|
|
1514
|
+
symbol: "vASTR",
|
|
1515
|
+
decimals: 18
|
|
1516
|
+
},
|
|
1535
1517
|
{
|
|
1536
1518
|
assetId: "15",
|
|
1537
1519
|
symbol: "vDOT",
|
|
@@ -1547,6 +1529,11 @@ var HydraDX$3 = {
|
|
|
1547
1529
|
symbol: "CFG",
|
|
1548
1530
|
decimals: 18
|
|
1549
1531
|
},
|
|
1532
|
+
{
|
|
1533
|
+
assetId: "32",
|
|
1534
|
+
symbol: "AJUN",
|
|
1535
|
+
decimals: 12
|
|
1536
|
+
},
|
|
1550
1537
|
{
|
|
1551
1538
|
assetId: "27",
|
|
1552
1539
|
symbol: "CRU",
|
|
@@ -1582,6 +1569,11 @@ var HydraDX$3 = {
|
|
|
1582
1569
|
symbol: "NODL",
|
|
1583
1570
|
decimals: 11
|
|
1584
1571
|
},
|
|
1572
|
+
{
|
|
1573
|
+
assetId: "1000190",
|
|
1574
|
+
symbol: "WBTC",
|
|
1575
|
+
decimals: 8
|
|
1576
|
+
},
|
|
1585
1577
|
{
|
|
1586
1578
|
assetId: "22",
|
|
1587
1579
|
symbol: "USDC",
|
|
@@ -1641,6 +1633,11 @@ var HydraDX$3 = {
|
|
|
1641
1633
|
assetId: "9",
|
|
1642
1634
|
symbol: "ASTR",
|
|
1643
1635
|
decimals: 18
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
assetId: "1000189",
|
|
1639
|
+
symbol: "WETH",
|
|
1640
|
+
decimals: 18
|
|
1644
1641
|
}
|
|
1645
1642
|
]
|
|
1646
1643
|
};
|
|
@@ -1891,6 +1888,11 @@ var Moonbeam$3 = {
|
|
|
1891
1888
|
symbol: "vGLMR",
|
|
1892
1889
|
decimals: 18
|
|
1893
1890
|
},
|
|
1891
|
+
{
|
|
1892
|
+
assetId: "184218609779515850660274730699350567246",
|
|
1893
|
+
symbol: "NCTR",
|
|
1894
|
+
decimals: 18
|
|
1895
|
+
},
|
|
1894
1896
|
{
|
|
1895
1897
|
assetId: "289989900872525819559124583375550296953",
|
|
1896
1898
|
symbol: "vMANTA",
|
|
@@ -2207,6 +2209,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2207
2209
|
symbol: "HUB",
|
|
2208
2210
|
decimals: 10
|
|
2209
2211
|
},
|
|
2212
|
+
{
|
|
2213
|
+
assetId: "81",
|
|
2214
|
+
symbol: "GVN",
|
|
2215
|
+
decimals: 6
|
|
2216
|
+
},
|
|
2210
2217
|
{
|
|
2211
2218
|
assetId: "200",
|
|
2212
2219
|
symbol: "MONA",
|
|
@@ -2222,11 +2229,26 @@ var AssetHubPolkadot$3 = {
|
|
|
2222
2229
|
symbol: "PLAY",
|
|
2223
2230
|
decimals: 10
|
|
2224
2231
|
},
|
|
2232
|
+
{
|
|
2233
|
+
assetId: "2222",
|
|
2234
|
+
symbol: "DUCK",
|
|
2235
|
+
decimals: 10
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
assetId: "222",
|
|
2239
|
+
symbol: "SHL",
|
|
2240
|
+
decimals: 6
|
|
2241
|
+
},
|
|
2225
2242
|
{
|
|
2226
2243
|
assetId: "69420",
|
|
2227
2244
|
symbol: "GABE",
|
|
2228
2245
|
decimals: 20
|
|
2229
2246
|
},
|
|
2247
|
+
{
|
|
2248
|
+
assetId: "47",
|
|
2249
|
+
symbol: "TeMe6Pump",
|
|
2250
|
+
decimals: 12
|
|
2251
|
+
},
|
|
2230
2252
|
{
|
|
2231
2253
|
assetId: "50",
|
|
2232
2254
|
symbol: "CATWIF",
|
|
@@ -2242,6 +2264,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2242
2264
|
symbol: "BEEFY",
|
|
2243
2265
|
decimals: 2
|
|
2244
2266
|
},
|
|
2267
|
+
{
|
|
2268
|
+
assetId: "110",
|
|
2269
|
+
symbol: "SIX",
|
|
2270
|
+
decimals: 12
|
|
2271
|
+
},
|
|
2245
2272
|
{
|
|
2246
2273
|
assetId: "10",
|
|
2247
2274
|
symbol: "BEAST",
|
|
@@ -2252,16 +2279,46 @@ var AssetHubPolkadot$3 = {
|
|
|
2252
2279
|
symbol: "NFLR",
|
|
2253
2280
|
decimals: 10
|
|
2254
2281
|
},
|
|
2282
|
+
{
|
|
2283
|
+
assetId: "20090110",
|
|
2284
|
+
symbol: "test1",
|
|
2285
|
+
decimals: 10
|
|
2286
|
+
},
|
|
2255
2287
|
{
|
|
2256
2288
|
assetId: "256",
|
|
2257
2289
|
symbol: "ICE",
|
|
2258
2290
|
decimals: 20
|
|
2259
2291
|
},
|
|
2292
|
+
{
|
|
2293
|
+
assetId: "20090130",
|
|
2294
|
+
symbol: "SUS",
|
|
2295
|
+
decimals: 10
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
assetId: "1111",
|
|
2299
|
+
symbol: "TESTV2",
|
|
2300
|
+
decimals: 12
|
|
2301
|
+
},
|
|
2302
|
+
{
|
|
2303
|
+
assetId: "202406",
|
|
2304
|
+
symbol: "USDT",
|
|
2305
|
+
decimals: 16
|
|
2306
|
+
},
|
|
2307
|
+
{
|
|
2308
|
+
assetId: "300",
|
|
2309
|
+
symbol: "DOGE",
|
|
2310
|
+
decimals: 6
|
|
2311
|
+
},
|
|
2260
2312
|
{
|
|
2261
2313
|
assetId: "4",
|
|
2262
2314
|
symbol: "EFI",
|
|
2263
2315
|
decimals: 18
|
|
2264
2316
|
},
|
|
2317
|
+
{
|
|
2318
|
+
assetId: "48",
|
|
2319
|
+
symbol: "SAX",
|
|
2320
|
+
decimals: 2
|
|
2321
|
+
},
|
|
2265
2322
|
{
|
|
2266
2323
|
assetId: "21",
|
|
2267
2324
|
symbol: "WBTC",
|
|
@@ -2277,6 +2334,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2277
2334
|
symbol: "BULL",
|
|
2278
2335
|
decimals: 6
|
|
2279
2336
|
},
|
|
2337
|
+
{
|
|
2338
|
+
assetId: "20090109",
|
|
2339
|
+
symbol: "MATIC",
|
|
2340
|
+
decimals: 10
|
|
2341
|
+
},
|
|
2280
2342
|
{
|
|
2281
2343
|
assetId: "67",
|
|
2282
2344
|
symbol: "LINK",
|
|
@@ -2297,26 +2359,56 @@ var AssetHubPolkadot$3 = {
|
|
|
2297
2359
|
symbol: "DED",
|
|
2298
2360
|
decimals: 10
|
|
2299
2361
|
},
|
|
2362
|
+
{
|
|
2363
|
+
assetId: "39",
|
|
2364
|
+
symbol: "PEPE",
|
|
2365
|
+
decimals: 6
|
|
2366
|
+
},
|
|
2367
|
+
{
|
|
2368
|
+
assetId: "10101",
|
|
2369
|
+
symbol: "COKE",
|
|
2370
|
+
decimals: 10
|
|
2371
|
+
},
|
|
2300
2372
|
{
|
|
2301
2373
|
assetId: "101",
|
|
2302
2374
|
symbol: "DOTMA",
|
|
2303
2375
|
decimals: 0
|
|
2304
2376
|
},
|
|
2377
|
+
{
|
|
2378
|
+
assetId: "38",
|
|
2379
|
+
symbol: "SHIB",
|
|
2380
|
+
decimals: 6
|
|
2381
|
+
},
|
|
2305
2382
|
{
|
|
2306
2383
|
assetId: "46",
|
|
2307
2384
|
symbol: "PEPE",
|
|
2308
2385
|
decimals: 10
|
|
2309
2386
|
},
|
|
2387
|
+
{
|
|
2388
|
+
assetId: "20090133",
|
|
2389
|
+
symbol: "BSOD",
|
|
2390
|
+
decimals: 10
|
|
2391
|
+
},
|
|
2310
2392
|
{
|
|
2311
2393
|
assetId: "99",
|
|
2312
2394
|
symbol: "Cypress",
|
|
2313
2395
|
decimals: 0
|
|
2314
2396
|
},
|
|
2397
|
+
{
|
|
2398
|
+
assetId: "34",
|
|
2399
|
+
symbol: "MeTest",
|
|
2400
|
+
decimals: 12
|
|
2401
|
+
},
|
|
2315
2402
|
{
|
|
2316
2403
|
assetId: "7777",
|
|
2317
2404
|
symbol: "FUM",
|
|
2318
2405
|
decimals: 10
|
|
2319
2406
|
},
|
|
2407
|
+
{
|
|
2408
|
+
assetId: "20090114",
|
|
2409
|
+
symbol: "DOI",
|
|
2410
|
+
decimals: 10
|
|
2411
|
+
},
|
|
2320
2412
|
{
|
|
2321
2413
|
assetId: "16",
|
|
2322
2414
|
symbol: "COLA",
|
|
@@ -2327,18 +2419,38 @@ var AssetHubPolkadot$3 = {
|
|
|
2327
2419
|
symbol: "web3",
|
|
2328
2420
|
decimals: 18
|
|
2329
2421
|
},
|
|
2422
|
+
{
|
|
2423
|
+
assetId: "20090111",
|
|
2424
|
+
symbol: "txt",
|
|
2425
|
+
decimals: 10
|
|
2426
|
+
},
|
|
2330
2427
|
{
|
|
2331
2428
|
assetId: "30035",
|
|
2332
2429
|
symbol: "DED",
|
|
2333
2430
|
decimals: 18
|
|
2334
2431
|
},
|
|
2432
|
+
{
|
|
2433
|
+
assetId: "20090119",
|
|
2434
|
+
symbol: "MDGA",
|
|
2435
|
+
decimals: 10
|
|
2436
|
+
},
|
|
2335
2437
|
{
|
|
2336
2438
|
assetId: "111",
|
|
2337
2439
|
symbol: "DEMO",
|
|
2338
2440
|
decimals: 6
|
|
2339
2441
|
},
|
|
2340
2442
|
{
|
|
2341
|
-
assetId: "
|
|
2443
|
+
assetId: "20090121",
|
|
2444
|
+
symbol: "IBW",
|
|
2445
|
+
decimals: 10
|
|
2446
|
+
},
|
|
2447
|
+
{
|
|
2448
|
+
assetId: "122",
|
|
2449
|
+
symbol: "TESTING",
|
|
2450
|
+
decimals: 12
|
|
2451
|
+
},
|
|
2452
|
+
{
|
|
2453
|
+
assetId: "66",
|
|
2342
2454
|
symbol: "DOGE",
|
|
2343
2455
|
decimals: 6
|
|
2344
2456
|
},
|
|
@@ -2382,6 +2494,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2382
2494
|
symbol: "STINK",
|
|
2383
2495
|
decimals: 10
|
|
2384
2496
|
},
|
|
2497
|
+
{
|
|
2498
|
+
assetId: "20090117",
|
|
2499
|
+
symbol: "DEDX",
|
|
2500
|
+
decimals: 10
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
assetId: "20090112",
|
|
2504
|
+
symbol: "SOLETH",
|
|
2505
|
+
decimals: 10
|
|
2506
|
+
},
|
|
2507
|
+
{
|
|
2508
|
+
assetId: "20090131",
|
|
2509
|
+
symbol: "DVCAT",
|
|
2510
|
+
decimals: 10
|
|
2511
|
+
},
|
|
2385
2512
|
{
|
|
2386
2513
|
assetId: "1107",
|
|
2387
2514
|
symbol: "JAM",
|
|
@@ -2427,11 +2554,31 @@ var AssetHubPolkadot$3 = {
|
|
|
2427
2554
|
symbol: "COCOA",
|
|
2428
2555
|
decimals: 10
|
|
2429
2556
|
},
|
|
2557
|
+
{
|
|
2558
|
+
assetId: "20090115",
|
|
2559
|
+
symbol: "DOTCOIN",
|
|
2560
|
+
decimals: 10
|
|
2561
|
+
},
|
|
2562
|
+
{
|
|
2563
|
+
assetId: "301",
|
|
2564
|
+
symbol: "HORN",
|
|
2565
|
+
decimals: 6
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
assetId: "20090122",
|
|
2569
|
+
symbol: "0xf09fa590",
|
|
2570
|
+
decimals: 10
|
|
2571
|
+
},
|
|
2430
2572
|
{
|
|
2431
2573
|
assetId: "2020",
|
|
2432
2574
|
symbol: "HYDRA",
|
|
2433
2575
|
decimals: 10
|
|
2434
2576
|
},
|
|
2577
|
+
{
|
|
2578
|
+
assetId: "41",
|
|
2579
|
+
symbol: "TeMe4",
|
|
2580
|
+
decimals: 12
|
|
2581
|
+
},
|
|
2435
2582
|
{
|
|
2436
2583
|
assetId: "5318008",
|
|
2437
2584
|
symbol: "PXPS",
|
|
@@ -2442,16 +2589,41 @@ var AssetHubPolkadot$3 = {
|
|
|
2442
2589
|
symbol: "CATNIP",
|
|
2443
2590
|
decimals: 20
|
|
2444
2591
|
},
|
|
2592
|
+
{
|
|
2593
|
+
assetId: "37362",
|
|
2594
|
+
symbol: "TEST",
|
|
2595
|
+
decimals: 10
|
|
2596
|
+
},
|
|
2597
|
+
{
|
|
2598
|
+
assetId: "44",
|
|
2599
|
+
symbol: "SKL",
|
|
2600
|
+
decimals: 6
|
|
2601
|
+
},
|
|
2445
2602
|
{
|
|
2446
2603
|
assetId: "15",
|
|
2447
2604
|
symbol: "Meme",
|
|
2448
2605
|
decimals: 10
|
|
2449
2606
|
},
|
|
2607
|
+
{
|
|
2608
|
+
assetId: "9202",
|
|
2609
|
+
symbol: "BUG",
|
|
2610
|
+
decimals: 12
|
|
2611
|
+
},
|
|
2450
2612
|
{
|
|
2451
2613
|
assetId: "78",
|
|
2452
2614
|
symbol: "COCA",
|
|
2453
2615
|
decimals: 6
|
|
2454
2616
|
},
|
|
2617
|
+
{
|
|
2618
|
+
assetId: "20090128",
|
|
2619
|
+
symbol: "DSTINK",
|
|
2620
|
+
decimals: 10
|
|
2621
|
+
},
|
|
2622
|
+
{
|
|
2623
|
+
assetId: "61",
|
|
2624
|
+
symbol: "SUN",
|
|
2625
|
+
decimals: 6
|
|
2626
|
+
},
|
|
2455
2627
|
{
|
|
2456
2628
|
assetId: "40",
|
|
2457
2629
|
symbol: "PEPE",
|
|
@@ -2467,6 +2639,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2467
2639
|
symbol: "DBX",
|
|
2468
2640
|
decimals: 6
|
|
2469
2641
|
},
|
|
2642
|
+
{
|
|
2643
|
+
assetId: "20090106",
|
|
2644
|
+
symbol: "PMATIC",
|
|
2645
|
+
decimals: 10
|
|
2646
|
+
},
|
|
2647
|
+
{
|
|
2648
|
+
assetId: "20090116",
|
|
2649
|
+
symbol: "POO",
|
|
2650
|
+
decimals: 10
|
|
2651
|
+
},
|
|
2652
|
+
{
|
|
2653
|
+
assetId: "20090129",
|
|
2654
|
+
symbol: "FCD",
|
|
2655
|
+
decimals: 10
|
|
2656
|
+
},
|
|
2470
2657
|
{
|
|
2471
2658
|
assetId: "678",
|
|
2472
2659
|
symbol: "SATS",
|
|
@@ -2497,11 +2684,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2497
2684
|
symbol: "STAR",
|
|
2498
2685
|
decimals: 6
|
|
2499
2686
|
},
|
|
2687
|
+
{
|
|
2688
|
+
assetId: "49",
|
|
2689
|
+
symbol: "TeMe7",
|
|
2690
|
+
decimals: 12
|
|
2691
|
+
},
|
|
2500
2692
|
{
|
|
2501
2693
|
assetId: "868367",
|
|
2502
2694
|
symbol: "VSC",
|
|
2503
2695
|
decimals: 9
|
|
2504
2696
|
},
|
|
2697
|
+
{
|
|
2698
|
+
assetId: "1994",
|
|
2699
|
+
symbol: "CRT",
|
|
2700
|
+
decimals: 4
|
|
2701
|
+
},
|
|
2505
2702
|
{
|
|
2506
2703
|
assetId: "2829",
|
|
2507
2704
|
symbol: "JTO",
|
|
@@ -2522,6 +2719,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2522
2719
|
symbol: "PJS",
|
|
2523
2720
|
decimals: 18
|
|
2524
2721
|
},
|
|
2722
|
+
{
|
|
2723
|
+
assetId: "43",
|
|
2724
|
+
symbol: "TeMe5",
|
|
2725
|
+
decimals: 12
|
|
2726
|
+
},
|
|
2727
|
+
{
|
|
2728
|
+
assetId: "7777777",
|
|
2729
|
+
symbol: "DWH",
|
|
2730
|
+
decimals: 10
|
|
2731
|
+
},
|
|
2732
|
+
{
|
|
2733
|
+
assetId: "2001",
|
|
2734
|
+
symbol: "DOTA",
|
|
2735
|
+
decimals: 6
|
|
2736
|
+
},
|
|
2525
2737
|
{
|
|
2526
2738
|
assetId: "5",
|
|
2527
2739
|
symbol: "PLX",
|
|
@@ -2542,16 +2754,41 @@ var AssetHubPolkadot$3 = {
|
|
|
2542
2754
|
symbol: "POKA",
|
|
2543
2755
|
decimals: 6
|
|
2544
2756
|
},
|
|
2757
|
+
{
|
|
2758
|
+
assetId: "1010",
|
|
2759
|
+
symbol: "ETH",
|
|
2760
|
+
decimals: 10
|
|
2761
|
+
},
|
|
2762
|
+
{
|
|
2763
|
+
assetId: "201",
|
|
2764
|
+
symbol: "WUD",
|
|
2765
|
+
decimals: 6
|
|
2766
|
+
},
|
|
2545
2767
|
{
|
|
2546
2768
|
assetId: "1984",
|
|
2547
2769
|
symbol: "USDt",
|
|
2548
2770
|
decimals: 6
|
|
2549
2771
|
},
|
|
2772
|
+
{
|
|
2773
|
+
assetId: "20090104",
|
|
2774
|
+
symbol: "DOTC",
|
|
2775
|
+
decimals: 10
|
|
2776
|
+
},
|
|
2550
2777
|
{
|
|
2551
2778
|
assetId: "20090103",
|
|
2552
2779
|
symbol: "BTC",
|
|
2553
2780
|
decimals: 20
|
|
2554
2781
|
},
|
|
2782
|
+
{
|
|
2783
|
+
assetId: "20090118",
|
|
2784
|
+
symbol: "NOTDED",
|
|
2785
|
+
decimals: 10
|
|
2786
|
+
},
|
|
2787
|
+
{
|
|
2788
|
+
assetId: "20090124",
|
|
2789
|
+
symbol: "test1",
|
|
2790
|
+
decimals: 10
|
|
2791
|
+
},
|
|
2555
2792
|
{
|
|
2556
2793
|
assetId: "690",
|
|
2557
2794
|
symbol: "BORK",
|
|
@@ -2562,6 +2799,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2562
2799
|
symbol: "MPACT",
|
|
2563
2800
|
decimals: 8
|
|
2564
2801
|
},
|
|
2802
|
+
{
|
|
2803
|
+
assetId: "777777",
|
|
2804
|
+
symbol: "HLG",
|
|
2805
|
+
decimals: 18
|
|
2806
|
+
},
|
|
2565
2807
|
{
|
|
2566
2808
|
assetId: "22",
|
|
2567
2809
|
symbol: "KNRY",
|
|
@@ -2582,6 +2824,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2582
2824
|
symbol: "777",
|
|
2583
2825
|
decimals: 20
|
|
2584
2826
|
},
|
|
2827
|
+
{
|
|
2828
|
+
assetId: "86",
|
|
2829
|
+
symbol: "KOL",
|
|
2830
|
+
decimals: 12
|
|
2831
|
+
},
|
|
2832
|
+
{
|
|
2833
|
+
assetId: "20090113",
|
|
2834
|
+
symbol: "test1",
|
|
2835
|
+
decimals: 10
|
|
2836
|
+
},
|
|
2585
2837
|
{
|
|
2586
2838
|
assetId: "567",
|
|
2587
2839
|
symbol: "ANT",
|
|
@@ -2592,6 +2844,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2592
2844
|
symbol: "HAM",
|
|
2593
2845
|
decimals: 10
|
|
2594
2846
|
},
|
|
2847
|
+
{
|
|
2848
|
+
assetId: "181",
|
|
2849
|
+
symbol: "RNET",
|
|
2850
|
+
decimals: 0
|
|
2851
|
+
},
|
|
2595
2852
|
{
|
|
2596
2853
|
assetId: "9003",
|
|
2597
2854
|
symbol: "KTRL",
|
|
@@ -2602,21 +2859,41 @@ var AssetHubPolkadot$3 = {
|
|
|
2602
2859
|
symbol: "GGI",
|
|
2603
2860
|
decimals: 6
|
|
2604
2861
|
},
|
|
2862
|
+
{
|
|
2863
|
+
assetId: "20090120",
|
|
2864
|
+
symbol: "LUNCH",
|
|
2865
|
+
decimals: 10
|
|
2866
|
+
},
|
|
2605
2867
|
{
|
|
2606
2868
|
assetId: "24",
|
|
2607
2869
|
symbol: "PRDOG",
|
|
2608
2870
|
decimals: 10
|
|
2609
2871
|
},
|
|
2872
|
+
{
|
|
2873
|
+
assetId: "20090123",
|
|
2874
|
+
symbol: "GOVD",
|
|
2875
|
+
decimals: 10
|
|
2876
|
+
},
|
|
2610
2877
|
{
|
|
2611
2878
|
assetId: "2023",
|
|
2612
2879
|
symbol: "dot",
|
|
2613
2880
|
decimals: 0
|
|
2614
2881
|
},
|
|
2882
|
+
{
|
|
2883
|
+
assetId: "90",
|
|
2884
|
+
symbol: "ATC",
|
|
2885
|
+
decimals: 6
|
|
2886
|
+
},
|
|
2615
2887
|
{
|
|
2616
2888
|
assetId: "80",
|
|
2617
2889
|
symbol: "GOVD",
|
|
2618
2890
|
decimals: 10
|
|
2619
2891
|
},
|
|
2892
|
+
{
|
|
2893
|
+
assetId: "1864",
|
|
2894
|
+
symbol: "JUNK",
|
|
2895
|
+
decimals: 10
|
|
2896
|
+
},
|
|
2620
2897
|
{
|
|
2621
2898
|
assetId: "8",
|
|
2622
2899
|
symbol: "JOE",
|
|
@@ -2627,16 +2904,46 @@ var AssetHubPolkadot$3 = {
|
|
|
2627
2904
|
symbol: "HYDRA",
|
|
2628
2905
|
decimals: 10
|
|
2629
2906
|
},
|
|
2907
|
+
{
|
|
2908
|
+
assetId: "10000",
|
|
2909
|
+
symbol: "DOGE",
|
|
2910
|
+
decimals: 6
|
|
2911
|
+
},
|
|
2630
2912
|
{
|
|
2631
2913
|
assetId: "2820",
|
|
2632
2914
|
symbol: "HOOT",
|
|
2633
2915
|
decimals: 6
|
|
2634
2916
|
},
|
|
2917
|
+
{
|
|
2918
|
+
assetId: "20090125",
|
|
2919
|
+
symbol: "PP",
|
|
2920
|
+
decimals: 10
|
|
2921
|
+
},
|
|
2922
|
+
{
|
|
2923
|
+
assetId: "51",
|
|
2924
|
+
symbol: "JAMA",
|
|
2925
|
+
decimals: 6
|
|
2926
|
+
},
|
|
2927
|
+
{
|
|
2928
|
+
assetId: "20090135",
|
|
2929
|
+
symbol: "DMX",
|
|
2930
|
+
decimals: 10
|
|
2931
|
+
},
|
|
2932
|
+
{
|
|
2933
|
+
assetId: "1234",
|
|
2934
|
+
symbol: "BUNS",
|
|
2935
|
+
decimals: 10
|
|
2936
|
+
},
|
|
2635
2937
|
{
|
|
2636
2938
|
assetId: "404",
|
|
2637
2939
|
symbol: "clay",
|
|
2638
2940
|
decimals: 20
|
|
2639
2941
|
},
|
|
2942
|
+
{
|
|
2943
|
+
assetId: "20090134",
|
|
2944
|
+
symbol: "DOTCOIN",
|
|
2945
|
+
decimals: 10
|
|
2946
|
+
},
|
|
2640
2947
|
{
|
|
2641
2948
|
assetId: "1000",
|
|
2642
2949
|
symbol: "BRZ",
|
|
@@ -2647,6 +2954,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2647
2954
|
symbol: "HOBO",
|
|
2648
2955
|
decimals: 2
|
|
2649
2956
|
},
|
|
2957
|
+
{
|
|
2958
|
+
assetId: "60",
|
|
2959
|
+
symbol: "ANT",
|
|
2960
|
+
decimals: 6
|
|
2961
|
+
},
|
|
2962
|
+
{
|
|
2963
|
+
assetId: "20090126",
|
|
2964
|
+
symbol: "DOGMOON",
|
|
2965
|
+
decimals: 10
|
|
2966
|
+
},
|
|
2967
|
+
{
|
|
2968
|
+
assetId: "1992",
|
|
2969
|
+
symbol: "SITE",
|
|
2970
|
+
decimals: 10
|
|
2971
|
+
},
|
|
2650
2972
|
{
|
|
2651
2973
|
assetId: "6666",
|
|
2652
2974
|
symbol: "CHAOS",
|
|
@@ -2667,6 +2989,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2667
2989
|
symbol: "no1",
|
|
2668
2990
|
decimals: 20
|
|
2669
2991
|
},
|
|
2992
|
+
{
|
|
2993
|
+
assetId: "20090132",
|
|
2994
|
+
symbol: "Beggar",
|
|
2995
|
+
decimals: 10
|
|
2996
|
+
},
|
|
2670
2997
|
{
|
|
2671
2998
|
assetId: "12",
|
|
2672
2999
|
symbol: "USDcp",
|
|
@@ -2677,6 +3004,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2677
3004
|
symbol: "WUD",
|
|
2678
3005
|
decimals: 10
|
|
2679
3006
|
},
|
|
3007
|
+
{
|
|
3008
|
+
assetId: "97",
|
|
3009
|
+
symbol: "TeMe3",
|
|
3010
|
+
decimals: 12
|
|
3011
|
+
},
|
|
3012
|
+
{
|
|
3013
|
+
assetId: "12345",
|
|
3014
|
+
symbol: "usdc",
|
|
3015
|
+
decimals: 10
|
|
3016
|
+
},
|
|
2680
3017
|
{
|
|
2681
3018
|
assetId: "2000",
|
|
2682
3019
|
symbol: "DAO",
|
|
@@ -2737,6 +3074,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2737
3074
|
symbol: "T54",
|
|
2738
3075
|
decimals: 10
|
|
2739
3076
|
},
|
|
3077
|
+
{
|
|
3078
|
+
assetId: "20090108",
|
|
3079
|
+
symbol: "MMM",
|
|
3080
|
+
decimals: 10
|
|
3081
|
+
},
|
|
2740
3082
|
{
|
|
2741
3083
|
assetId: "69",
|
|
2742
3084
|
symbol: "DAL",
|
|
@@ -2747,6 +3089,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2747
3089
|
symbol: "PINK",
|
|
2748
3090
|
decimals: 10
|
|
2749
3091
|
},
|
|
3092
|
+
{
|
|
3093
|
+
assetId: "20090105",
|
|
3094
|
+
symbol: "ETH",
|
|
3095
|
+
decimals: 10
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
assetId: "37",
|
|
3099
|
+
symbol: "DODA",
|
|
3100
|
+
decimals: 6
|
|
3101
|
+
},
|
|
2750
3102
|
{
|
|
2751
3103
|
assetId: "5417",
|
|
2752
3104
|
symbol: "HASH",
|
|
@@ -2757,6 +3109,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2757
3109
|
symbol: "BOMB",
|
|
2758
3110
|
decimals: 10
|
|
2759
3111
|
},
|
|
3112
|
+
{
|
|
3113
|
+
assetId: "7151",
|
|
3114
|
+
symbol: "TUKI",
|
|
3115
|
+
decimals: 8
|
|
3116
|
+
},
|
|
2760
3117
|
{
|
|
2761
3118
|
assetId: "149",
|
|
2762
3119
|
symbol: "EDU",
|
|
@@ -2772,6 +3129,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2772
3129
|
symbol: "GAVIN",
|
|
2773
3130
|
decimals: 0
|
|
2774
3131
|
},
|
|
3132
|
+
{
|
|
3133
|
+
assetId: "91",
|
|
3134
|
+
symbol: "WING",
|
|
3135
|
+
decimals: 6
|
|
3136
|
+
},
|
|
3137
|
+
{
|
|
3138
|
+
assetId: "77777",
|
|
3139
|
+
symbol: "WOOP",
|
|
3140
|
+
decimals: 12
|
|
3141
|
+
},
|
|
3142
|
+
{
|
|
3143
|
+
assetId: "20090107",
|
|
3144
|
+
symbol: "ETH",
|
|
3145
|
+
decimals: 10
|
|
3146
|
+
},
|
|
2775
3147
|
{
|
|
2776
3148
|
assetId: "4157",
|
|
2777
3149
|
symbol: "PDOG",
|
|
@@ -2802,10 +3174,25 @@ var AssetHubPolkadot$3 = {
|
|
|
2802
3174
|
symbol: "WOOD",
|
|
2803
3175
|
decimals: 10
|
|
2804
3176
|
},
|
|
3177
|
+
{
|
|
3178
|
+
assetId: "20090127",
|
|
3179
|
+
symbol: "PAMPIT",
|
|
3180
|
+
decimals: 10
|
|
3181
|
+
},
|
|
2805
3182
|
{
|
|
2806
3183
|
assetId: "2230",
|
|
2807
3184
|
symbol: "GBILL",
|
|
2808
3185
|
decimals: 8
|
|
3186
|
+
},
|
|
3187
|
+
{
|
|
3188
|
+
assetId: "92",
|
|
3189
|
+
symbol: "TeMe2",
|
|
3190
|
+
decimals: 12
|
|
3191
|
+
},
|
|
3192
|
+
{
|
|
3193
|
+
assetId: "2203",
|
|
3194
|
+
symbol: "PBTC",
|
|
3195
|
+
decimals: 10
|
|
2809
3196
|
}
|
|
2810
3197
|
]
|
|
2811
3198
|
};
|
|
@@ -3577,243 +3964,65 @@ var Litmus$3 = {
|
|
|
3577
3964
|
otherAssets: [
|
|
3578
3965
|
]
|
|
3579
3966
|
};
|
|
3580
|
-
var
|
|
3581
|
-
paraId:
|
|
3967
|
+
var Moonriver$3 = {
|
|
3968
|
+
paraId: 2023,
|
|
3582
3969
|
relayChainAssetSymbol: "KSM",
|
|
3583
|
-
nativeAssetSymbol: "
|
|
3970
|
+
nativeAssetSymbol: "MOVR",
|
|
3584
3971
|
nativeAssets: [
|
|
3585
3972
|
{
|
|
3586
|
-
symbol: "
|
|
3973
|
+
symbol: "MOVR",
|
|
3587
3974
|
decimals: 18
|
|
3588
3975
|
}
|
|
3589
3976
|
],
|
|
3590
3977
|
otherAssets: [
|
|
3591
3978
|
{
|
|
3592
|
-
assetId: "
|
|
3593
|
-
symbol: "
|
|
3594
|
-
decimals:
|
|
3979
|
+
assetId: "108457044225666871745333730479173774551",
|
|
3980
|
+
symbol: "CSM",
|
|
3981
|
+
decimals: 12
|
|
3595
3982
|
},
|
|
3596
3983
|
{
|
|
3597
|
-
assetId: "
|
|
3598
|
-
symbol: "
|
|
3984
|
+
assetId: "16797826370226091782818345603793389938",
|
|
3985
|
+
symbol: "SDN",
|
|
3599
3986
|
decimals: 18
|
|
3600
3987
|
},
|
|
3601
3988
|
{
|
|
3602
|
-
assetId: "
|
|
3603
|
-
symbol: "
|
|
3604
|
-
decimals:
|
|
3989
|
+
assetId: "76100021443485661246318545281171740067",
|
|
3990
|
+
symbol: "HKO",
|
|
3991
|
+
decimals: 12
|
|
3605
3992
|
},
|
|
3606
3993
|
{
|
|
3607
|
-
assetId: "
|
|
3608
|
-
symbol: "
|
|
3609
|
-
decimals:
|
|
3994
|
+
assetId: "138512078356357941985706694377215053953",
|
|
3995
|
+
symbol: "TNKR",
|
|
3996
|
+
decimals: 12
|
|
3610
3997
|
},
|
|
3611
3998
|
{
|
|
3612
|
-
assetId: "
|
|
3613
|
-
symbol: "
|
|
3614
|
-
decimals:
|
|
3999
|
+
assetId: "328179947973504579459046439826496046832",
|
|
4000
|
+
symbol: "KBTC",
|
|
4001
|
+
decimals: 8
|
|
3615
4002
|
},
|
|
3616
4003
|
{
|
|
3617
|
-
assetId: "
|
|
3618
|
-
symbol: "
|
|
3619
|
-
decimals:
|
|
4004
|
+
assetId: "108036400430056508975016746969135344601",
|
|
4005
|
+
symbol: "XRT",
|
|
4006
|
+
decimals: 9
|
|
3620
4007
|
},
|
|
3621
4008
|
{
|
|
3622
|
-
assetId: "
|
|
3623
|
-
symbol: "
|
|
3624
|
-
decimals:
|
|
4009
|
+
assetId: "133300872918374599700079037156071917454",
|
|
4010
|
+
symbol: "TUR",
|
|
4011
|
+
decimals: 10
|
|
3625
4012
|
},
|
|
3626
4013
|
{
|
|
3627
|
-
assetId: "
|
|
3628
|
-
symbol: "
|
|
3629
|
-
decimals:
|
|
4014
|
+
assetId: "213357169630950964874127107356898319277",
|
|
4015
|
+
symbol: "KMA",
|
|
4016
|
+
decimals: 12
|
|
3630
4017
|
},
|
|
3631
4018
|
{
|
|
3632
|
-
assetId: "
|
|
3633
|
-
symbol: "
|
|
3634
|
-
decimals:
|
|
4019
|
+
assetId: "65216491554813189869575508812319036608",
|
|
4020
|
+
symbol: "LIT",
|
|
4021
|
+
decimals: 12
|
|
3635
4022
|
},
|
|
3636
4023
|
{
|
|
3637
|
-
assetId: "
|
|
3638
|
-
symbol: "
|
|
3639
|
-
decimals: 18
|
|
3640
|
-
},
|
|
3641
|
-
{
|
|
3642
|
-
assetId: "19",
|
|
3643
|
-
symbol: "TKN0x00000010-TKN0x00000004",
|
|
3644
|
-
decimals: 18
|
|
3645
|
-
},
|
|
3646
|
-
{
|
|
3647
|
-
assetId: "45",
|
|
3648
|
-
symbol: "TKN0x0000000B-TKN0x00000007",
|
|
3649
|
-
decimals: 18
|
|
3650
|
-
},
|
|
3651
|
-
{
|
|
3652
|
-
assetId: "9",
|
|
3653
|
-
symbol: "TKN0x00000004-TKN0x00000007",
|
|
3654
|
-
decimals: 18
|
|
3655
|
-
},
|
|
3656
|
-
{
|
|
3657
|
-
assetId: "16",
|
|
3658
|
-
symbol: "vsKSM",
|
|
3659
|
-
decimals: 12
|
|
3660
|
-
},
|
|
3661
|
-
{
|
|
3662
|
-
assetId: "14",
|
|
3663
|
-
symbol: "BNC",
|
|
3664
|
-
decimals: 12
|
|
3665
|
-
},
|
|
3666
|
-
{
|
|
3667
|
-
assetId: "43",
|
|
3668
|
-
symbol: "TKN0x00000000-TKN0x00000027",
|
|
3669
|
-
decimals: 18
|
|
3670
|
-
},
|
|
3671
|
-
{
|
|
3672
|
-
assetId: "31",
|
|
3673
|
-
symbol: "RMRK",
|
|
3674
|
-
decimals: 10
|
|
3675
|
-
},
|
|
3676
|
-
{
|
|
3677
|
-
assetId: "21",
|
|
3678
|
-
symbol: "TKN0x0000000F-TKN0x00000004",
|
|
3679
|
-
decimals: 18
|
|
3680
|
-
},
|
|
3681
|
-
{
|
|
3682
|
-
assetId: "15",
|
|
3683
|
-
symbol: "vKSM",
|
|
3684
|
-
decimals: 12
|
|
3685
|
-
},
|
|
3686
|
-
{
|
|
3687
|
-
assetId: "47",
|
|
3688
|
-
symbol: "TKN0x0000001E-TKN0x00000000",
|
|
3689
|
-
decimals: 18
|
|
3690
|
-
},
|
|
3691
|
-
{
|
|
3692
|
-
assetId: "27",
|
|
3693
|
-
symbol: "TKN0x0000001A-TKN0x00000000",
|
|
3694
|
-
decimals: 18
|
|
3695
|
-
},
|
|
3696
|
-
{
|
|
3697
|
-
assetId: "28",
|
|
3698
|
-
symbol: "TKN0x00000004-TKN0x0000001A",
|
|
3699
|
-
decimals: 18
|
|
3700
|
-
},
|
|
3701
|
-
{
|
|
3702
|
-
assetId: "0",
|
|
3703
|
-
symbol: "MGX",
|
|
3704
|
-
decimals: 18
|
|
3705
|
-
},
|
|
3706
|
-
{
|
|
3707
|
-
assetId: "6",
|
|
3708
|
-
symbol: "KAR",
|
|
3709
|
-
decimals: 12
|
|
3710
|
-
},
|
|
3711
|
-
{
|
|
3712
|
-
assetId: "11",
|
|
3713
|
-
symbol: "IMBU",
|
|
3714
|
-
decimals: 12
|
|
3715
|
-
},
|
|
3716
|
-
{
|
|
3717
|
-
assetId: "3",
|
|
3718
|
-
symbol: "TKN0x00000000-TKN0x00000002",
|
|
3719
|
-
decimals: 18
|
|
3720
|
-
},
|
|
3721
|
-
{
|
|
3722
|
-
assetId: "17",
|
|
3723
|
-
symbol: "TKN0x00000000-TKN0x0000000E",
|
|
3724
|
-
decimals: 18
|
|
3725
|
-
},
|
|
3726
|
-
{
|
|
3727
|
-
assetId: "23",
|
|
3728
|
-
symbol: "vBNC",
|
|
3729
|
-
decimals: 12
|
|
3730
|
-
},
|
|
3731
|
-
{
|
|
3732
|
-
assetId: "4",
|
|
3733
|
-
symbol: "KSM",
|
|
3734
|
-
decimals: 12
|
|
3735
|
-
},
|
|
3736
|
-
{
|
|
3737
|
-
assetId: "34",
|
|
3738
|
-
symbol: "TKN0x00000004-TKN0x0000001F",
|
|
3739
|
-
decimals: 18
|
|
3740
|
-
},
|
|
3741
|
-
{
|
|
3742
|
-
assetId: "32",
|
|
3743
|
-
symbol: "TKN0x00000004-TKN0x0000001E",
|
|
3744
|
-
decimals: 18
|
|
3745
|
-
},
|
|
3746
|
-
{
|
|
3747
|
-
assetId: "12",
|
|
3748
|
-
symbol: "TKN0x00000000-TKN0x0000000B",
|
|
3749
|
-
decimals: 18
|
|
3750
|
-
},
|
|
3751
|
-
{
|
|
3752
|
-
assetId: "42",
|
|
3753
|
-
symbol: "TKN0x00000004-TKN0x0000000E",
|
|
3754
|
-
decimals: 18
|
|
3755
|
-
}
|
|
3756
|
-
]
|
|
3757
|
-
};
|
|
3758
|
-
var Moonriver$3 = {
|
|
3759
|
-
paraId: 2023,
|
|
3760
|
-
relayChainAssetSymbol: "KSM",
|
|
3761
|
-
nativeAssetSymbol: "MOVR",
|
|
3762
|
-
nativeAssets: [
|
|
3763
|
-
{
|
|
3764
|
-
symbol: "MOVR",
|
|
3765
|
-
decimals: 18
|
|
3766
|
-
}
|
|
3767
|
-
],
|
|
3768
|
-
otherAssets: [
|
|
3769
|
-
{
|
|
3770
|
-
assetId: "108457044225666871745333730479173774551",
|
|
3771
|
-
symbol: "CSM",
|
|
3772
|
-
decimals: 12
|
|
3773
|
-
},
|
|
3774
|
-
{
|
|
3775
|
-
assetId: "16797826370226091782818345603793389938",
|
|
3776
|
-
symbol: "SDN",
|
|
3777
|
-
decimals: 18
|
|
3778
|
-
},
|
|
3779
|
-
{
|
|
3780
|
-
assetId: "76100021443485661246318545281171740067",
|
|
3781
|
-
symbol: "HKO",
|
|
3782
|
-
decimals: 12
|
|
3783
|
-
},
|
|
3784
|
-
{
|
|
3785
|
-
assetId: "138512078356357941985706694377215053953",
|
|
3786
|
-
symbol: "TNKR",
|
|
3787
|
-
decimals: 12
|
|
3788
|
-
},
|
|
3789
|
-
{
|
|
3790
|
-
assetId: "328179947973504579459046439826496046832",
|
|
3791
|
-
symbol: "KBTC",
|
|
3792
|
-
decimals: 8
|
|
3793
|
-
},
|
|
3794
|
-
{
|
|
3795
|
-
assetId: "108036400430056508975016746969135344601",
|
|
3796
|
-
symbol: "XRT",
|
|
3797
|
-
decimals: 9
|
|
3798
|
-
},
|
|
3799
|
-
{
|
|
3800
|
-
assetId: "133300872918374599700079037156071917454",
|
|
3801
|
-
symbol: "TUR",
|
|
3802
|
-
decimals: 10
|
|
3803
|
-
},
|
|
3804
|
-
{
|
|
3805
|
-
assetId: "213357169630950964874127107356898319277",
|
|
3806
|
-
symbol: "KMA",
|
|
3807
|
-
decimals: 12
|
|
3808
|
-
},
|
|
3809
|
-
{
|
|
3810
|
-
assetId: "65216491554813189869575508812319036608",
|
|
3811
|
-
symbol: "LIT",
|
|
3812
|
-
decimals: 12
|
|
3813
|
-
},
|
|
3814
|
-
{
|
|
3815
|
-
assetId: "173481220575862801646329923366065693029",
|
|
3816
|
-
symbol: "CRAB",
|
|
4024
|
+
assetId: "173481220575862801646329923366065693029",
|
|
4025
|
+
symbol: "CRAB",
|
|
3817
4026
|
decimals: 18
|
|
3818
4027
|
},
|
|
3819
4028
|
{
|
|
@@ -4947,11 +5156,6 @@ var AssetHubKusama$3 = {
|
|
|
4947
5156
|
symbol: "ki",
|
|
4948
5157
|
decimals: 18
|
|
4949
5158
|
},
|
|
4950
|
-
{
|
|
4951
|
-
assetId: "5797867",
|
|
4952
|
-
symbol: "TAKE",
|
|
4953
|
-
decimals: 0
|
|
4954
|
-
},
|
|
4955
5159
|
{
|
|
4956
5160
|
assetId: "33",
|
|
4957
5161
|
symbol: "BUSSY",
|
|
@@ -5880,15 +6084,18 @@ var Polkadex$3 = {
|
|
|
5880
6084
|
symbol: "DOT",
|
|
5881
6085
|
decimals: 12
|
|
5882
6086
|
},
|
|
6087
|
+
{
|
|
6088
|
+
assetId: "119367686984583275840673742485354142551",
|
|
6089
|
+
symbol: "DED",
|
|
6090
|
+
decimals: 12
|
|
6091
|
+
},
|
|
5883
6092
|
{
|
|
5884
6093
|
assetId: "339306133874233608313826294843504252047",
|
|
5885
6094
|
symbol: "PINK",
|
|
5886
6095
|
decimals: 12
|
|
5887
6096
|
},
|
|
5888
6097
|
{
|
|
5889
|
-
assetId: "
|
|
5890
|
-
symbol: "DED",
|
|
5891
|
-
decimals: 12
|
|
6098
|
+
assetId: "313524628741076911470961827389955394913"
|
|
5892
6099
|
},
|
|
5893
6100
|
{
|
|
5894
6101
|
assetId: "3496813586714279103986568049643838918",
|
|
@@ -6064,6 +6271,47 @@ var Phala$3 = {
|
|
|
6064
6271
|
}
|
|
6065
6272
|
]
|
|
6066
6273
|
};
|
|
6274
|
+
var Ethereum$1 = {
|
|
6275
|
+
paraId: 1,
|
|
6276
|
+
relayChainAssetSymbol: "DOT",
|
|
6277
|
+
nativeAssetSymbol: "ETH",
|
|
6278
|
+
nativeAssets: [
|
|
6279
|
+
{
|
|
6280
|
+
symbol: "ETH",
|
|
6281
|
+
decimals: 18
|
|
6282
|
+
}
|
|
6283
|
+
],
|
|
6284
|
+
otherAssets: [
|
|
6285
|
+
{
|
|
6286
|
+
symbol: "WETH",
|
|
6287
|
+
assetId: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
|
|
6288
|
+
},
|
|
6289
|
+
{
|
|
6290
|
+
symbol: "WBTC",
|
|
6291
|
+
assetId: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"
|
|
6292
|
+
},
|
|
6293
|
+
{
|
|
6294
|
+
symbol: "SHIB",
|
|
6295
|
+
assetId: "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE"
|
|
6296
|
+
},
|
|
6297
|
+
{
|
|
6298
|
+
symbol: "PEPE",
|
|
6299
|
+
assetId: "0x6982508145454Ce325dDbE47a25d4ec3d2311933"
|
|
6300
|
+
},
|
|
6301
|
+
{
|
|
6302
|
+
symbol: "TON",
|
|
6303
|
+
assetId: "0x582d872A1B094FC48F5DE31D3B73F2D9bE47def1"
|
|
6304
|
+
},
|
|
6305
|
+
{
|
|
6306
|
+
symbol: "wstETH",
|
|
6307
|
+
assetId: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"
|
|
6308
|
+
},
|
|
6309
|
+
{
|
|
6310
|
+
symbol: "tBTC",
|
|
6311
|
+
assetId: "0x18084fbA666a33d37592fA2633fD49a74DD93a88"
|
|
6312
|
+
}
|
|
6313
|
+
]
|
|
6314
|
+
};
|
|
6067
6315
|
var Khala$3 = {
|
|
6068
6316
|
paraId: 2004,
|
|
6069
6317
|
relayChainAssetSymbol: "KSM",
|
|
@@ -6162,8 +6410,71 @@ var Khala$3 = {
|
|
|
6162
6410
|
}
|
|
6163
6411
|
]
|
|
6164
6412
|
};
|
|
6413
|
+
var Mythos$3 = {
|
|
6414
|
+
paraId: 3369,
|
|
6415
|
+
relayChainAssetSymbol: "DOT",
|
|
6416
|
+
nativeAssetSymbol: "MYTH",
|
|
6417
|
+
nativeAssets: [
|
|
6418
|
+
{
|
|
6419
|
+
symbol: "MYTH",
|
|
6420
|
+
decimals: 18
|
|
6421
|
+
}
|
|
6422
|
+
],
|
|
6423
|
+
otherAssets: [
|
|
6424
|
+
]
|
|
6425
|
+
};
|
|
6426
|
+
var Peaq$3 = {
|
|
6427
|
+
paraId: 3338,
|
|
6428
|
+
relayChainAssetSymbol: "DOT",
|
|
6429
|
+
nativeAssetSymbol: "PEAQ",
|
|
6430
|
+
nativeAssets: [
|
|
6431
|
+
{
|
|
6432
|
+
symbol: "PEAQ",
|
|
6433
|
+
decimals: 18
|
|
6434
|
+
}
|
|
6435
|
+
],
|
|
6436
|
+
otherAssets: [
|
|
6437
|
+
{
|
|
6438
|
+
assetId: "1005",
|
|
6439
|
+
symbol: "USDT.wh",
|
|
6440
|
+
decimals: 6
|
|
6441
|
+
},
|
|
6442
|
+
{
|
|
6443
|
+
assetId: "1004",
|
|
6444
|
+
symbol: "DAI.wh",
|
|
6445
|
+
decimals: 18
|
|
6446
|
+
},
|
|
6447
|
+
{
|
|
6448
|
+
assetId: "1000",
|
|
6449
|
+
symbol: "GLMR",
|
|
6450
|
+
decimals: 18
|
|
6451
|
+
},
|
|
6452
|
+
{
|
|
6453
|
+
assetId: "1002",
|
|
6454
|
+
symbol: "WETH.wh",
|
|
6455
|
+
decimals: 18
|
|
6456
|
+
},
|
|
6457
|
+
{
|
|
6458
|
+
assetId: "1",
|
|
6459
|
+
symbol: "DOT",
|
|
6460
|
+
decimals: 10
|
|
6461
|
+
},
|
|
6462
|
+
{
|
|
6463
|
+
assetId: "1001",
|
|
6464
|
+
symbol: "USDC.wh",
|
|
6465
|
+
decimals: 6
|
|
6466
|
+
},
|
|
6467
|
+
{
|
|
6468
|
+
assetId: "1003",
|
|
6469
|
+
symbol: "WBTC.wh",
|
|
6470
|
+
decimals: 8
|
|
6471
|
+
}
|
|
6472
|
+
]
|
|
6473
|
+
};
|
|
6165
6474
|
var assets = {
|
|
6166
6475
|
Acala: Acala$3,
|
|
6476
|
+
BridgeHubPolkadot: BridgeHubPolkadot$3,
|
|
6477
|
+
BridgeHubKusama: BridgeHubKusama$3,
|
|
6167
6478
|
Astar: Astar$3,
|
|
6168
6479
|
BifrostPolkadot: BifrostPolkadot$3,
|
|
6169
6480
|
Bitgreen: Bitgreen$3,
|
|
@@ -6171,7 +6482,7 @@ var assets = {
|
|
|
6171
6482
|
Subsocial: Subsocial$3,
|
|
6172
6483
|
ComposableFinance: ComposableFinance$3,
|
|
6173
6484
|
Darwinia: Darwinia$3,
|
|
6174
|
-
|
|
6485
|
+
Hydration: Hydration$3,
|
|
6175
6486
|
Interlay: Interlay$3,
|
|
6176
6487
|
Litentry: Litentry$3,
|
|
6177
6488
|
Moonbeam: Moonbeam$3,
|
|
@@ -6194,7 +6505,6 @@ var assets = {
|
|
|
6194
6505
|
Karura: Karura$3,
|
|
6195
6506
|
Kintsugi: Kintsugi$3,
|
|
6196
6507
|
Litmus: Litmus$3,
|
|
6197
|
-
Mangata: Mangata$3,
|
|
6198
6508
|
Moonriver: Moonriver$3,
|
|
6199
6509
|
ParallelHeiko: ParallelHeiko$3,
|
|
6200
6510
|
Picasso: Picasso$3,
|
|
@@ -6215,7 +6525,10 @@ var assets = {
|
|
|
6215
6525
|
Zeitgeist: Zeitgeist$3,
|
|
6216
6526
|
Collectives: Collectives$3,
|
|
6217
6527
|
Phala: Phala$3,
|
|
6218
|
-
|
|
6528
|
+
Ethereum: Ethereum$1,
|
|
6529
|
+
Khala: Khala$3,
|
|
6530
|
+
Mythos: Mythos$3,
|
|
6531
|
+
Peaq: Peaq$3
|
|
6219
6532
|
};
|
|
6220
6533
|
|
|
6221
6534
|
var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
@@ -6231,6 +6544,8 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6231
6544
|
BifrostKusama: BifrostKusama$3,
|
|
6232
6545
|
BifrostPolkadot: BifrostPolkadot$3,
|
|
6233
6546
|
Bitgreen: Bitgreen$3,
|
|
6547
|
+
BridgeHubKusama: BridgeHubKusama$3,
|
|
6548
|
+
BridgeHubPolkadot: BridgeHubPolkadot$3,
|
|
6234
6549
|
Calamari: Calamari$3,
|
|
6235
6550
|
Centrifuge: Centrifuge$3,
|
|
6236
6551
|
Collectives: Collectives$3,
|
|
@@ -6242,7 +6557,8 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6242
6557
|
Curio: Curio$3,
|
|
6243
6558
|
Darwinia: Darwinia$3,
|
|
6244
6559
|
Encointer: Encointer$3,
|
|
6245
|
-
|
|
6560
|
+
Ethereum: Ethereum$1,
|
|
6561
|
+
Hydration: Hydration$3,
|
|
6246
6562
|
Imbue: Imbue$3,
|
|
6247
6563
|
Integritee: Integritee$3,
|
|
6248
6564
|
Interlay: Interlay$3,
|
|
@@ -6253,14 +6569,15 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6253
6569
|
Kintsugi: Kintsugi$3,
|
|
6254
6570
|
Litentry: Litentry$3,
|
|
6255
6571
|
Litmus: Litmus$3,
|
|
6256
|
-
Mangata: Mangata$3,
|
|
6257
6572
|
Manta: Manta$3,
|
|
6258
6573
|
Moonbeam: Moonbeam$3,
|
|
6259
6574
|
Moonriver: Moonriver$3,
|
|
6575
|
+
Mythos: Mythos$3,
|
|
6260
6576
|
NeuroWeb: NeuroWeb$3,
|
|
6261
6577
|
Nodle: Nodle$3,
|
|
6262
6578
|
Parallel: Parallel$3,
|
|
6263
6579
|
ParallelHeiko: ParallelHeiko$3,
|
|
6580
|
+
Peaq: Peaq$3,
|
|
6264
6581
|
Pendulum: Pendulum$3,
|
|
6265
6582
|
Phala: Phala$3,
|
|
6266
6583
|
Picasso: Picasso$3,
|
|
@@ -6312,12 +6629,20 @@ var getAllAssetsSymbols = function getAllAssetsSymbols(node) {
|
|
|
6312
6629
|
});
|
|
6313
6630
|
return [relayChainAssetSymbol].concat(_toConsumableArray(nativeAssetsSymbols), _toConsumableArray(otherAssetsSymbols));
|
|
6314
6631
|
};
|
|
6315
|
-
var
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6632
|
+
var getNativeAssetSymbol = function getNativeAssetSymbol(node) {
|
|
6633
|
+
if (node === 'Polkadot') {
|
|
6634
|
+
return 'DOT';
|
|
6635
|
+
} else if (node === 'Kusama') {
|
|
6636
|
+
return 'KSM';
|
|
6637
|
+
}
|
|
6638
|
+
return getAssetsObject(node).nativeAssetSymbol;
|
|
6639
|
+
};
|
|
6640
|
+
var hasSupportForAsset = function hasSupportForAsset(node, symbol) {
|
|
6641
|
+
return getAllAssetsSymbols(node).includes(symbol);
|
|
6642
|
+
};
|
|
6643
|
+
var getAssetDecimals = function getAssetDecimals(node, symbol) {
|
|
6644
|
+
var _getAssetsObject2 = getAssetsObject(node),
|
|
6645
|
+
otherAssets = _getAssetsObject2.otherAssets,
|
|
6321
6646
|
nativeAssets = _getAssetsObject2.nativeAssets;
|
|
6322
6647
|
var asset = [].concat(_toConsumableArray(otherAssets), _toConsumableArray(nativeAssets)).find(function (o) {
|
|
6323
6648
|
return o.symbol === symbol;
|
|
@@ -6430,7 +6755,7 @@ var Darwinia$2 = {
|
|
|
6430
6755
|
"XTokens"
|
|
6431
6756
|
]
|
|
6432
6757
|
};
|
|
6433
|
-
var
|
|
6758
|
+
var Hydration$2 = {
|
|
6434
6759
|
defaultPallet: "XTokens",
|
|
6435
6760
|
supportedPallets: [
|
|
6436
6761
|
"PolkadotXcm",
|
|
@@ -6493,9 +6818,10 @@ var Amplitude$2 = {
|
|
|
6493
6818
|
]
|
|
6494
6819
|
};
|
|
6495
6820
|
var Bajun$2 = {
|
|
6496
|
-
defaultPallet: "
|
|
6821
|
+
defaultPallet: "XTokens",
|
|
6497
6822
|
supportedPallets: [
|
|
6498
|
-
"PolkadotXcm"
|
|
6823
|
+
"PolkadotXcm",
|
|
6824
|
+
"XTokens"
|
|
6499
6825
|
]
|
|
6500
6826
|
};
|
|
6501
6827
|
var Basilisk$2 = {
|
|
@@ -6581,13 +6907,6 @@ var Litmus$2 = {
|
|
|
6581
6907
|
"XTokens"
|
|
6582
6908
|
]
|
|
6583
6909
|
};
|
|
6584
|
-
var Mangata$2 = {
|
|
6585
|
-
defaultPallet: "XTokens",
|
|
6586
|
-
supportedPallets: [
|
|
6587
|
-
"PolkadotXcm",
|
|
6588
|
-
"XTokens"
|
|
6589
|
-
]
|
|
6590
|
-
};
|
|
6591
6910
|
var Moonriver$2 = {
|
|
6592
6911
|
defaultPallet: "XTokens",
|
|
6593
6912
|
supportedPallets: [
|
|
@@ -6730,6 +7049,31 @@ var Curio$2 = {
|
|
|
6730
7049
|
"XTokens"
|
|
6731
7050
|
]
|
|
6732
7051
|
};
|
|
7052
|
+
var BridgeHubPolkadot$2 = {
|
|
7053
|
+
defaultPallet: "PolkadotXcm",
|
|
7054
|
+
supportedPallets: [
|
|
7055
|
+
"PolkadotXcm"
|
|
7056
|
+
]
|
|
7057
|
+
};
|
|
7058
|
+
var BridgeHubKusama$2 = {
|
|
7059
|
+
defaultPallet: "PolkadotXcm",
|
|
7060
|
+
supportedPallets: [
|
|
7061
|
+
"PolkadotXcm"
|
|
7062
|
+
]
|
|
7063
|
+
};
|
|
7064
|
+
var Mythos$2 = {
|
|
7065
|
+
defaultPallet: "PolkadotXcm",
|
|
7066
|
+
supportedPallets: [
|
|
7067
|
+
"PolkadotXcm"
|
|
7068
|
+
]
|
|
7069
|
+
};
|
|
7070
|
+
var Peaq$2 = {
|
|
7071
|
+
defaultPallet: "XTokens",
|
|
7072
|
+
supportedPallets: [
|
|
7073
|
+
"PolkadotXcm",
|
|
7074
|
+
"XTokens"
|
|
7075
|
+
]
|
|
7076
|
+
};
|
|
6733
7077
|
var pallets = {
|
|
6734
7078
|
AssetHubPolkadot: AssetHubPolkadot$2,
|
|
6735
7079
|
Acala: Acala$2,
|
|
@@ -6740,7 +7084,7 @@ var pallets = {
|
|
|
6740
7084
|
Centrifuge: Centrifuge$2,
|
|
6741
7085
|
ComposableFinance: ComposableFinance$2,
|
|
6742
7086
|
Darwinia: Darwinia$2,
|
|
6743
|
-
|
|
7087
|
+
Hydration: Hydration$2,
|
|
6744
7088
|
Interlay: Interlay$2,
|
|
6745
7089
|
Litentry: Litentry$2,
|
|
6746
7090
|
Moonbeam: Moonbeam$2,
|
|
@@ -6762,7 +7106,6 @@ var pallets = {
|
|
|
6762
7106
|
Karura: Karura$2,
|
|
6763
7107
|
Kintsugi: Kintsugi$2,
|
|
6764
7108
|
Litmus: Litmus$2,
|
|
6765
|
-
Mangata: Mangata$2,
|
|
6766
7109
|
Moonriver: Moonriver$2,
|
|
6767
7110
|
ParallelHeiko: ParallelHeiko$2,
|
|
6768
7111
|
Picasso: Picasso$2,
|
|
@@ -6783,7 +7126,11 @@ var pallets = {
|
|
|
6783
7126
|
Phala: Phala$2,
|
|
6784
7127
|
Subsocial: Subsocial$2,
|
|
6785
7128
|
KiltSpiritnet: KiltSpiritnet$2,
|
|
6786
|
-
Curio: Curio$2
|
|
7129
|
+
Curio: Curio$2,
|
|
7130
|
+
BridgeHubPolkadot: BridgeHubPolkadot$2,
|
|
7131
|
+
BridgeHubKusama: BridgeHubKusama$2,
|
|
7132
|
+
Mythos: Mythos$2,
|
|
7133
|
+
Peaq: Peaq$2
|
|
6787
7134
|
};
|
|
6788
7135
|
|
|
6789
7136
|
var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
@@ -6799,6 +7146,8 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6799
7146
|
BifrostKusama: BifrostKusama$2,
|
|
6800
7147
|
BifrostPolkadot: BifrostPolkadot$2,
|
|
6801
7148
|
Bitgreen: Bitgreen$2,
|
|
7149
|
+
BridgeHubKusama: BridgeHubKusama$2,
|
|
7150
|
+
BridgeHubPolkadot: BridgeHubPolkadot$2,
|
|
6802
7151
|
Calamari: Calamari$2,
|
|
6803
7152
|
Centrifuge: Centrifuge$2,
|
|
6804
7153
|
Collectives: Collectives$2,
|
|
@@ -6810,7 +7159,7 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6810
7159
|
Curio: Curio$2,
|
|
6811
7160
|
Darwinia: Darwinia$2,
|
|
6812
7161
|
Encointer: Encointer$2,
|
|
6813
|
-
|
|
7162
|
+
Hydration: Hydration$2,
|
|
6814
7163
|
Imbue: Imbue$2,
|
|
6815
7164
|
Integritee: Integritee$2,
|
|
6816
7165
|
Interlay: Interlay$2,
|
|
@@ -6821,14 +7170,15 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6821
7170
|
Kintsugi: Kintsugi$2,
|
|
6822
7171
|
Litentry: Litentry$2,
|
|
6823
7172
|
Litmus: Litmus$2,
|
|
6824
|
-
Mangata: Mangata$2,
|
|
6825
7173
|
Manta: Manta$2,
|
|
6826
7174
|
Moonbeam: Moonbeam$2,
|
|
6827
7175
|
Moonriver: Moonriver$2,
|
|
7176
|
+
Mythos: Mythos$2,
|
|
6828
7177
|
NeuroWeb: NeuroWeb$2,
|
|
6829
7178
|
Nodle: Nodle$2,
|
|
6830
7179
|
Parallel: Parallel$2,
|
|
6831
7180
|
ParallelHeiko: ParallelHeiko$2,
|
|
7181
|
+
Peaq: Peaq$2,
|
|
6832
7182
|
Pendulum: Pendulum$2,
|
|
6833
7183
|
Phala: Phala$2,
|
|
6834
7184
|
Picasso: Picasso$2,
|
|
@@ -6868,9 +7218,11 @@ var constructRelayToParaParameters = function constructRelayToParaParameters(_re
|
|
|
6868
7218
|
return parameters;
|
|
6869
7219
|
};
|
|
6870
7220
|
var isTMulti = function isTMulti(value) {
|
|
7221
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
6871
7222
|
return value && _typeof(value) === 'object' || Array.isArray(value);
|
|
6872
7223
|
};
|
|
6873
7224
|
var isTMultiLocation = function isTMultiLocation(value) {
|
|
7225
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
|
|
6874
7226
|
return value && typeof value.parents !== 'undefined' && typeof value.interior !== 'undefined';
|
|
6875
7227
|
};
|
|
6876
7228
|
var createBridgeCurrencySpec = function createBridgeCurrencySpec(amount, ecosystem) {
|
|
@@ -6892,7 +7244,11 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
|
|
|
6892
7244
|
var interior = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'Here';
|
|
6893
7245
|
if (!overriddenCurrency) {
|
|
6894
7246
|
return _defineProperty({}, version, [{
|
|
6895
|
-
|
|
7247
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
7248
|
+
id: version === Version.V4 ? {
|
|
7249
|
+
parents: parents,
|
|
7250
|
+
interior: interior
|
|
7251
|
+
} : {
|
|
6896
7252
|
Concrete: {
|
|
6897
7253
|
parents: parents,
|
|
6898
7254
|
interior: interior
|
|
@@ -6904,7 +7260,7 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
|
|
|
6904
7260
|
}]);
|
|
6905
7261
|
}
|
|
6906
7262
|
return isTMultiLocation(overriddenCurrency) ? _defineProperty({}, version, [{
|
|
6907
|
-
id: {
|
|
7263
|
+
id: version === Version.V4 ? overriddenCurrency : {
|
|
6908
7264
|
Concrete: overriddenCurrency
|
|
6909
7265
|
},
|
|
6910
7266
|
fun: {
|
|
@@ -6913,16 +7269,14 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
|
|
|
6913
7269
|
}]) : // It must be TMultiAsset if not TMultiLocation
|
|
6914
7270
|
_defineProperty({}, version, overriddenCurrency);
|
|
6915
7271
|
};
|
|
6916
|
-
var createPolkadotXcmHeader = function createPolkadotXcmHeader(scenario, version, destination, nodeId) {
|
|
6917
|
-
var
|
|
6918
|
-
var interior = scenario === 'ParaToRelay' ? 'Here' : {
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
}
|
|
6922
|
-
};
|
|
7272
|
+
var createPolkadotXcmHeader = function createPolkadotXcmHeader(scenario, version, destination, nodeId, junction, parents) {
|
|
7273
|
+
var parentsResolved = parents !== null && parents !== void 0 ? parents : scenario === 'RelayToPara' ? Parents.ZERO : Parents.ONE;
|
|
7274
|
+
var interior = scenario === 'ParaToRelay' ? 'Here' : createX1Payload(version, junction !== null && junction !== void 0 ? junction : {
|
|
7275
|
+
Parachain: nodeId
|
|
7276
|
+
});
|
|
6923
7277
|
var isMultiLocationDestination = _typeof(destination) === 'object';
|
|
6924
|
-
return _defineProperty({},
|
|
6925
|
-
parents:
|
|
7278
|
+
return _defineProperty({}, version, isMultiLocationDestination ? destination : {
|
|
7279
|
+
parents: parentsResolved,
|
|
6926
7280
|
interior: interior
|
|
6927
7281
|
});
|
|
6928
7282
|
};
|
|
@@ -6959,9 +7313,11 @@ var calculateTransactionFee$1 = function calculateTransactionFee(tx, address) {
|
|
|
6959
7313
|
}, _callee);
|
|
6960
7314
|
}));
|
|
6961
7315
|
};
|
|
7316
|
+
// TODO: Refactor this function to eliminate the any type
|
|
6962
7317
|
var findParachainJunction = function findParachainJunction(multilocation) {
|
|
6963
7318
|
var interior = multilocation.interior;
|
|
6964
7319
|
for (var key in interior) {
|
|
7320
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
6965
7321
|
var junctions = interior[key];
|
|
6966
7322
|
if (Array.isArray(junctions)) {
|
|
6967
7323
|
var _iterator = _createForOfIteratorHelper(junctions),
|
|
@@ -6970,6 +7326,7 @@ var findParachainJunction = function findParachainJunction(multilocation) {
|
|
|
6970
7326
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
6971
7327
|
var junction = _step.value;
|
|
6972
7328
|
if ('Parachain' in junction) {
|
|
7329
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
6973
7330
|
return Number(junction.Parachain);
|
|
6974
7331
|
}
|
|
6975
7332
|
}
|
|
@@ -6979,6 +7336,7 @@ var findParachainJunction = function findParachainJunction(multilocation) {
|
|
|
6979
7336
|
_iterator.f();
|
|
6980
7337
|
}
|
|
6981
7338
|
} else if (junctions !== undefined && 'Parachain' in junctions) {
|
|
7339
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
6982
7340
|
return Number(junctions.Parachain);
|
|
6983
7341
|
}
|
|
6984
7342
|
}
|
|
@@ -7134,7 +7492,7 @@ var Bitgreen$1 = "1000000000";
|
|
|
7134
7492
|
var Centrifuge$1 = "1000000000000";
|
|
7135
7493
|
var ComposableFinance$1 = "100000000000";
|
|
7136
7494
|
var Darwinia$1 = "0";
|
|
7137
|
-
var
|
|
7495
|
+
var Hydration$1 = "1000000000000";
|
|
7138
7496
|
var Litentry$1 = "100000000000";
|
|
7139
7497
|
var Moonbeam$1 = "0";
|
|
7140
7498
|
var Parallel$1 = "100000000000";
|
|
@@ -7174,13 +7532,16 @@ var Polkadot = "10000000000";
|
|
|
7174
7532
|
var Kusama = "333333333";
|
|
7175
7533
|
var Interlay$1 = "0";
|
|
7176
7534
|
var Kintsugi$1 = "0";
|
|
7177
|
-
var Mangata$1 = "0";
|
|
7178
7535
|
var Collectives$1 = "1000000000";
|
|
7179
7536
|
var Khala$1 = "10000000000";
|
|
7180
7537
|
var Phala$1 = "10000000000";
|
|
7181
7538
|
var Subsocial$1 = "100000000";
|
|
7182
7539
|
var KiltSpiritnet$1 = "10000000000000";
|
|
7183
7540
|
var Curio$1 = "10000000000000000";
|
|
7541
|
+
var BridgeHubPolkadot$1 = "1000000000";
|
|
7542
|
+
var BridgeHubKusama$1 = "33333333";
|
|
7543
|
+
var Mythos$1 = "10000000000000000";
|
|
7544
|
+
var Peaq$1 = "500";
|
|
7184
7545
|
var existentialDeposits = {
|
|
7185
7546
|
AssetHubPolkadot: AssetHubPolkadot$1,
|
|
7186
7547
|
Acala: Acala$1,
|
|
@@ -7190,7 +7551,7 @@ var existentialDeposits = {
|
|
|
7190
7551
|
Centrifuge: Centrifuge$1,
|
|
7191
7552
|
ComposableFinance: ComposableFinance$1,
|
|
7192
7553
|
Darwinia: Darwinia$1,
|
|
7193
|
-
|
|
7554
|
+
Hydration: Hydration$1,
|
|
7194
7555
|
Litentry: Litentry$1,
|
|
7195
7556
|
Moonbeam: Moonbeam$1,
|
|
7196
7557
|
Parallel: Parallel$1,
|
|
@@ -7230,13 +7591,16 @@ var existentialDeposits = {
|
|
|
7230
7591
|
Kusama: Kusama,
|
|
7231
7592
|
Interlay: Interlay$1,
|
|
7232
7593
|
Kintsugi: Kintsugi$1,
|
|
7233
|
-
Mangata: Mangata$1,
|
|
7234
7594
|
Collectives: Collectives$1,
|
|
7235
7595
|
Khala: Khala$1,
|
|
7236
7596
|
Phala: Phala$1,
|
|
7237
7597
|
Subsocial: Subsocial$1,
|
|
7238
7598
|
KiltSpiritnet: KiltSpiritnet$1,
|
|
7239
|
-
Curio: Curio$1
|
|
7599
|
+
Curio: Curio$1,
|
|
7600
|
+
BridgeHubPolkadot: BridgeHubPolkadot$1,
|
|
7601
|
+
BridgeHubKusama: BridgeHubKusama$1,
|
|
7602
|
+
Mythos: Mythos$1,
|
|
7603
|
+
Peaq: Peaq$1
|
|
7240
7604
|
};
|
|
7241
7605
|
|
|
7242
7606
|
var edMapJson = /*#__PURE__*/Object.freeze({
|
|
@@ -7252,6 +7616,8 @@ var edMapJson = /*#__PURE__*/Object.freeze({
|
|
|
7252
7616
|
BifrostKusama: BifrostKusama$1,
|
|
7253
7617
|
BifrostPolkadot: BifrostPolkadot$1,
|
|
7254
7618
|
Bitgreen: Bitgreen$1,
|
|
7619
|
+
BridgeHubKusama: BridgeHubKusama$1,
|
|
7620
|
+
BridgeHubPolkadot: BridgeHubPolkadot$1,
|
|
7255
7621
|
Calamari: Calamari$1,
|
|
7256
7622
|
Centrifuge: Centrifuge$1,
|
|
7257
7623
|
Collectives: Collectives$1,
|
|
@@ -7263,7 +7629,7 @@ var edMapJson = /*#__PURE__*/Object.freeze({
|
|
|
7263
7629
|
Curio: Curio$1,
|
|
7264
7630
|
Darwinia: Darwinia$1,
|
|
7265
7631
|
Encointer: Encointer$1,
|
|
7266
|
-
|
|
7632
|
+
Hydration: Hydration$1,
|
|
7267
7633
|
Imbue: Imbue$1,
|
|
7268
7634
|
Integritee: Integritee$1,
|
|
7269
7635
|
Interlay: Interlay$1,
|
|
@@ -7275,14 +7641,15 @@ var edMapJson = /*#__PURE__*/Object.freeze({
|
|
|
7275
7641
|
Kusama: Kusama,
|
|
7276
7642
|
Litentry: Litentry$1,
|
|
7277
7643
|
Litmus: Litmus$1,
|
|
7278
|
-
Mangata: Mangata$1,
|
|
7279
7644
|
Manta: Manta$1,
|
|
7280
7645
|
Moonbeam: Moonbeam$1,
|
|
7281
7646
|
Moonriver: Moonriver$1,
|
|
7647
|
+
Mythos: Mythos$1,
|
|
7282
7648
|
NeuroWeb: NeuroWeb$1,
|
|
7283
7649
|
Nodle: Nodle$1,
|
|
7284
7650
|
Parallel: Parallel$1,
|
|
7285
7651
|
ParallelHeiko: ParallelHeiko$1,
|
|
7652
|
+
Peaq: Peaq$1,
|
|
7286
7653
|
Pendulum: Pendulum$1,
|
|
7287
7654
|
Phala: Phala$1,
|
|
7288
7655
|
Picasso: Picasso$1,
|
|
@@ -7528,6 +7895,12 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
|
|
|
7528
7895
|
this._destApi = destApi;
|
|
7529
7896
|
return this;
|
|
7530
7897
|
}
|
|
7898
|
+
}, {
|
|
7899
|
+
key: "xcmVersion",
|
|
7900
|
+
value: function xcmVersion(version) {
|
|
7901
|
+
this._version = version;
|
|
7902
|
+
return this;
|
|
7903
|
+
}
|
|
7531
7904
|
}, {
|
|
7532
7905
|
key: "buildOptions",
|
|
7533
7906
|
value: function buildOptions() {
|
|
@@ -7537,7 +7910,8 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
|
|
|
7537
7910
|
amount: this._amount,
|
|
7538
7911
|
address: this._address,
|
|
7539
7912
|
paraIdTo: this.paraIdTo,
|
|
7540
|
-
destApiForKeepAlive: this._destApi
|
|
7913
|
+
destApiForKeepAlive: this._destApi,
|
|
7914
|
+
version: this._version
|
|
7541
7915
|
};
|
|
7542
7916
|
}
|
|
7543
7917
|
}, {
|
|
@@ -7621,6 +7995,12 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
|
|
|
7621
7995
|
this._destApi = destApi;
|
|
7622
7996
|
return this;
|
|
7623
7997
|
}
|
|
7998
|
+
}, {
|
|
7999
|
+
key: "xcmVersion",
|
|
8000
|
+
value: function xcmVersion(version) {
|
|
8001
|
+
this._version = version;
|
|
8002
|
+
return this;
|
|
8003
|
+
}
|
|
7624
8004
|
}, {
|
|
7625
8005
|
key: "buildOptions",
|
|
7626
8006
|
value: function buildOptions() {
|
|
@@ -7633,7 +8013,8 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
|
|
|
7633
8013
|
destination: this.to,
|
|
7634
8014
|
paraIdTo: this.paraIdTo,
|
|
7635
8015
|
feeAsset: this._feeAsset,
|
|
7636
|
-
destApiForKeepAlive: this._destApi
|
|
8016
|
+
destApiForKeepAlive: this._destApi,
|
|
8017
|
+
version: this._version
|
|
7637
8018
|
};
|
|
7638
8019
|
}
|
|
7639
8020
|
}, {
|
|
@@ -7704,6 +8085,12 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
|
|
|
7704
8085
|
this._destApi = destApi;
|
|
7705
8086
|
return this;
|
|
7706
8087
|
}
|
|
8088
|
+
}, {
|
|
8089
|
+
key: "xcmVersion",
|
|
8090
|
+
value: function xcmVersion(version) {
|
|
8091
|
+
this._version = version;
|
|
8092
|
+
return this;
|
|
8093
|
+
}
|
|
7707
8094
|
}, {
|
|
7708
8095
|
key: "buildOptions",
|
|
7709
8096
|
value: function buildOptions() {
|
|
@@ -7718,7 +8105,8 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
|
|
|
7718
8105
|
amount: this.amount,
|
|
7719
8106
|
address: this._address,
|
|
7720
8107
|
feeAsset: this.feeAsset,
|
|
7721
|
-
destApiForKeepAlive: this._destApi
|
|
8108
|
+
destApiForKeepAlive: this._destApi,
|
|
8109
|
+
version: this._version
|
|
7722
8110
|
};
|
|
7723
8111
|
}
|
|
7724
8112
|
}, {
|
|
@@ -7785,7 +8173,7 @@ var buildBeneficiaryInput = function buildBeneficiaryInput(api, address) {
|
|
|
7785
8173
|
if (isTMultiLocation(address)) {
|
|
7786
8174
|
return address;
|
|
7787
8175
|
}
|
|
7788
|
-
var isEthAddress = ethers.
|
|
8176
|
+
var isEthAddress = ethers.isAddress(address);
|
|
7789
8177
|
return {
|
|
7790
8178
|
parents: Parents.ZERO,
|
|
7791
8179
|
interior: {
|
|
@@ -8023,6 +8411,209 @@ var Builder = function Builder(api) {
|
|
|
8023
8411
|
return new GeneralBuilder(api);
|
|
8024
8412
|
};
|
|
8025
8413
|
|
|
8414
|
+
// Used to inform user, that currency they wish to use is not registered on either origin or destination Parachain
|
|
8415
|
+
var InvalidCurrencyError = /*#__PURE__*/function (_Error) {
|
|
8416
|
+
function InvalidCurrencyError(message) {
|
|
8417
|
+
var _this;
|
|
8418
|
+
_classCallCheck(this, InvalidCurrencyError);
|
|
8419
|
+
_this = _callSuper(this, InvalidCurrencyError, [message]);
|
|
8420
|
+
_this.name = 'InvalidCurrencyError';
|
|
8421
|
+
return _this;
|
|
8422
|
+
}
|
|
8423
|
+
_inherits(InvalidCurrencyError, _Error);
|
|
8424
|
+
return _createClass(InvalidCurrencyError);
|
|
8425
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
8426
|
+
|
|
8427
|
+
// Used to inform user, that Parachain they wish to use is not supported yet
|
|
8428
|
+
var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
8429
|
+
function NodeNotSupportedError(message) {
|
|
8430
|
+
var _this;
|
|
8431
|
+
_classCallCheck(this, NodeNotSupportedError);
|
|
8432
|
+
_this = _callSuper(this, NodeNotSupportedError, [message !== null && message !== void 0 ? message : 'These nodes do not support XCM transfers from Relay / to Relay chain.']);
|
|
8433
|
+
_this.name = 'NodeNotSupported';
|
|
8434
|
+
return _this;
|
|
8435
|
+
}
|
|
8436
|
+
_inherits(NodeNotSupportedError, _Error);
|
|
8437
|
+
return _createClass(NodeNotSupportedError);
|
|
8438
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
8439
|
+
|
|
8440
|
+
// Used to inform user, that Parachain they wish to use does not support scenario they wish to use yet
|
|
8441
|
+
var ScenarioNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
8442
|
+
function ScenarioNotSupportedError(node, scenario, message) {
|
|
8443
|
+
var _this;
|
|
8444
|
+
_classCallCheck(this, ScenarioNotSupportedError);
|
|
8445
|
+
_this = _callSuper(this, ScenarioNotSupportedError, [message !== null && message !== void 0 ? message : "Scenario ".concat(scenario, " not supported for node ").concat(node)]);
|
|
8446
|
+
_this.name = 'ScenarioNotSupported';
|
|
8447
|
+
return _this;
|
|
8448
|
+
}
|
|
8449
|
+
_inherits(ScenarioNotSupportedError, _Error);
|
|
8450
|
+
return _createClass(ScenarioNotSupportedError);
|
|
8451
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
8452
|
+
|
|
8453
|
+
var IncompatibleNodesError = /*#__PURE__*/function (_Error) {
|
|
8454
|
+
function IncompatibleNodesError() {
|
|
8455
|
+
var _this;
|
|
8456
|
+
_classCallCheck(this, IncompatibleNodesError);
|
|
8457
|
+
_this = _callSuper(this, IncompatibleNodesError, ['Transactions between nodes on different relaychains are not yet possible.']);
|
|
8458
|
+
_this.name = 'IncompatibleNodes';
|
|
8459
|
+
return _this;
|
|
8460
|
+
}
|
|
8461
|
+
_inherits(IncompatibleNodesError, _Error);
|
|
8462
|
+
return _createClass(IncompatibleNodesError);
|
|
8463
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
8464
|
+
|
|
8465
|
+
var transferEthToPolkadot = function transferEthToPolkadot(provider_1, _a) {
|
|
8466
|
+
return __awaiter(void 0, [provider_1, _a], void 0, function (provider, _ref) {
|
|
8467
|
+
var signer = _ref.signer,
|
|
8468
|
+
address = _ref.address,
|
|
8469
|
+
to = _ref.to,
|
|
8470
|
+
amount = _ref.amount,
|
|
8471
|
+
currency = _ref.currency;
|
|
8472
|
+
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8473
|
+
var ethAssets, ethAsset, env, config, context, destParaId, plan, result;
|
|
8474
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8475
|
+
while (1) switch (_context.prev = _context.next) {
|
|
8476
|
+
case 0:
|
|
8477
|
+
ethAssets = getOtherAssets('Ethereum');
|
|
8478
|
+
ethAsset = ethAssets.find(function (asset) {
|
|
8479
|
+
return asset.symbol === currency;
|
|
8480
|
+
});
|
|
8481
|
+
if (ethAsset) {
|
|
8482
|
+
_context.next = 4;
|
|
8483
|
+
break;
|
|
8484
|
+
}
|
|
8485
|
+
throw new InvalidCurrencyError("Currency ".concat(currency, " is not supported for Ethereum transfers"));
|
|
8486
|
+
case 4:
|
|
8487
|
+
env = environment.SNOWBRIDGE_ENV['polkadot_mainnet'];
|
|
8488
|
+
config = env.config;
|
|
8489
|
+
_context.next = 8;
|
|
8490
|
+
return contextFactory({
|
|
8491
|
+
ethereum: {
|
|
8492
|
+
execution_url: provider,
|
|
8493
|
+
beacon_url: config.BEACON_HTTP_API
|
|
8494
|
+
},
|
|
8495
|
+
polkadot: {
|
|
8496
|
+
url: {
|
|
8497
|
+
bridgeHub: config.BRIDGE_HUB_URL,
|
|
8498
|
+
assetHub: config.ASSET_HUB_URL,
|
|
8499
|
+
relaychain: config.RELAY_CHAIN_URL,
|
|
8500
|
+
parachains: config.PARACHAINS
|
|
8501
|
+
}
|
|
8502
|
+
},
|
|
8503
|
+
appContracts: {
|
|
8504
|
+
gateway: config.GATEWAY_CONTRACT,
|
|
8505
|
+
beefy: config.BEEFY_CONTRACT
|
|
8506
|
+
}
|
|
8507
|
+
});
|
|
8508
|
+
case 8:
|
|
8509
|
+
context = _context.sent;
|
|
8510
|
+
destParaId = getParaId(to);
|
|
8511
|
+
_context.next = 12;
|
|
8512
|
+
return toPolkadot.validateSend(context, signer, address, ethAsset.assetId, destParaId, BigInt(amount), BigInt(0));
|
|
8513
|
+
case 12:
|
|
8514
|
+
plan = _context.sent;
|
|
8515
|
+
if (!plan.failure) {
|
|
8516
|
+
_context.next = 15;
|
|
8517
|
+
break;
|
|
8518
|
+
}
|
|
8519
|
+
throw new Error("Failed to validate send: ".concat(plan.failure.errors.map(function (e) {
|
|
8520
|
+
return e.message;
|
|
8521
|
+
}).join('\n\n')));
|
|
8522
|
+
case 15:
|
|
8523
|
+
_context.next = 17;
|
|
8524
|
+
return toPolkadot.send(context, signer, plan);
|
|
8525
|
+
case 17:
|
|
8526
|
+
result = _context.sent;
|
|
8527
|
+
return _context.abrupt("return", {
|
|
8528
|
+
result: result,
|
|
8529
|
+
plan: plan
|
|
8530
|
+
});
|
|
8531
|
+
case 19:
|
|
8532
|
+
case "end":
|
|
8533
|
+
return _context.stop();
|
|
8534
|
+
}
|
|
8535
|
+
}, _callee);
|
|
8536
|
+
})();
|
|
8537
|
+
});
|
|
8538
|
+
};
|
|
8539
|
+
|
|
8540
|
+
var EvmBuilderClass = /*#__PURE__*/function () {
|
|
8541
|
+
function EvmBuilderClass(provider) {
|
|
8542
|
+
_classCallCheck(this, EvmBuilderClass);
|
|
8543
|
+
this._provider = provider;
|
|
8544
|
+
this._options = {};
|
|
8545
|
+
}
|
|
8546
|
+
return _createClass(EvmBuilderClass, [{
|
|
8547
|
+
key: "to",
|
|
8548
|
+
value: function to(node) {
|
|
8549
|
+
this._options.to = node;
|
|
8550
|
+
return this;
|
|
8551
|
+
}
|
|
8552
|
+
}, {
|
|
8553
|
+
key: "amount",
|
|
8554
|
+
value: function amount(_amount) {
|
|
8555
|
+
this._options.amount = _amount;
|
|
8556
|
+
return this;
|
|
8557
|
+
}
|
|
8558
|
+
}, {
|
|
8559
|
+
key: "currency",
|
|
8560
|
+
value: function currency(_currency) {
|
|
8561
|
+
this._options.currency = _currency;
|
|
8562
|
+
return this;
|
|
8563
|
+
}
|
|
8564
|
+
}, {
|
|
8565
|
+
key: "address",
|
|
8566
|
+
value: function address(_address) {
|
|
8567
|
+
this._options.address = _address;
|
|
8568
|
+
return this;
|
|
8569
|
+
}
|
|
8570
|
+
}, {
|
|
8571
|
+
key: "signer",
|
|
8572
|
+
value: function signer(_signer) {
|
|
8573
|
+
this._options.signer = _signer;
|
|
8574
|
+
return this;
|
|
8575
|
+
}
|
|
8576
|
+
}, {
|
|
8577
|
+
key: "build",
|
|
8578
|
+
value: function build() {
|
|
8579
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8580
|
+
var requiredParams, _i, _requiredParams, param;
|
|
8581
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8582
|
+
while (1) switch (_context.prev = _context.next) {
|
|
8583
|
+
case 0:
|
|
8584
|
+
requiredParams = ['to', 'amount', 'currency', 'address', 'signer'];
|
|
8585
|
+
_i = 0, _requiredParams = requiredParams;
|
|
8586
|
+
case 2:
|
|
8587
|
+
if (!(_i < _requiredParams.length)) {
|
|
8588
|
+
_context.next = 9;
|
|
8589
|
+
break;
|
|
8590
|
+
}
|
|
8591
|
+
param = _requiredParams[_i];
|
|
8592
|
+
if (!(this._options[param] === undefined)) {
|
|
8593
|
+
_context.next = 6;
|
|
8594
|
+
break;
|
|
8595
|
+
}
|
|
8596
|
+
throw new Error("Builder object is missing parameter: ".concat(param));
|
|
8597
|
+
case 6:
|
|
8598
|
+
_i++;
|
|
8599
|
+
_context.next = 2;
|
|
8600
|
+
break;
|
|
8601
|
+
case 9:
|
|
8602
|
+
_context.next = 11;
|
|
8603
|
+
return transferEthToPolkadot(this._provider, this._options);
|
|
8604
|
+
case 11:
|
|
8605
|
+
case "end":
|
|
8606
|
+
return _context.stop();
|
|
8607
|
+
}
|
|
8608
|
+
}, _callee, this);
|
|
8609
|
+
}));
|
|
8610
|
+
}
|
|
8611
|
+
}]);
|
|
8612
|
+
}();
|
|
8613
|
+
var EvmBuilder = function EvmBuilder(provider) {
|
|
8614
|
+
return new EvmBuilderClass(provider);
|
|
8615
|
+
};
|
|
8616
|
+
|
|
8026
8617
|
var createTx$1 = function createTx(originApi, address, amount, currencySymbol, originNode, destNode) {
|
|
8027
8618
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8028
8619
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -8128,20 +8719,12 @@ var getOriginFeeDetails = function getOriginFeeDetails(origin, destination, curr
|
|
|
8128
8719
|
}));
|
|
8129
8720
|
};
|
|
8130
8721
|
|
|
8131
|
-
var getNativeAssetSymbol = function getNativeAssetSymbol(node) {
|
|
8132
|
-
if (node === 'Polkadot') {
|
|
8133
|
-
return 'DOT';
|
|
8134
|
-
} else if (node === 'Kusama') {
|
|
8135
|
-
return 'KSM';
|
|
8136
|
-
}
|
|
8137
|
-
return getAssetsObject(node).nativeAssetSymbol;
|
|
8138
|
-
};
|
|
8139
8722
|
var getAssetSymbol = function getAssetSymbol(node, assetId) {
|
|
8140
8723
|
if (node === 'Polkadot' || node === 'Kusama') {
|
|
8141
8724
|
return getNativeAssetSymbol(node);
|
|
8142
8725
|
}
|
|
8143
8726
|
var asset = getAssetBySymbolOrId(node, assetId);
|
|
8144
|
-
return asset;
|
|
8727
|
+
return asset === null || asset === void 0 ? void 0 : asset.symbol;
|
|
8145
8728
|
};
|
|
8146
8729
|
var getAssetBalance = function getAssetBalance(account, node, assetSymbolOrId) {
|
|
8147
8730
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
@@ -8198,7 +8781,7 @@ var getAssetBalance = function getAssetBalance(account, node, assetSymbolOrId) {
|
|
|
8198
8781
|
};
|
|
8199
8782
|
var getTransferInfo = function getTransferInfo(origin, destination, accountOrigin, accountDestination, assetSymbolOrId, amount) {
|
|
8200
8783
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
8201
|
-
var
|
|
8784
|
+
var _a, originApi, originBalance, _yield$getOriginFeeDe, destXcmFee, expectedBalanceAfterXCMDelivery, asset;
|
|
8202
8785
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
8203
8786
|
while (1) switch (_context2.prev = _context2.next) {
|
|
8204
8787
|
case 0:
|
|
@@ -8226,7 +8809,7 @@ var getTransferInfo = function getTransferInfo(origin, destination, accountOrigi
|
|
|
8226
8809
|
return getAssetBalance(accountOrigin, origin, assetSymbolOrId);
|
|
8227
8810
|
case 15:
|
|
8228
8811
|
_context2.t1 = _context2.sent;
|
|
8229
|
-
_context2.t2 = asset
|
|
8812
|
+
_context2.t2 = asset !== null && asset !== void 0 ? asset : '';
|
|
8230
8813
|
_context2.t3 = {
|
|
8231
8814
|
balance: _context2.t1,
|
|
8232
8815
|
currency: _context2.t2
|
|
@@ -8240,7 +8823,7 @@ var getTransferInfo = function getTransferInfo(origin, destination, accountOrigi
|
|
|
8240
8823
|
return getOriginFeeDetails(origin, destination, assetSymbolOrId, amount, accountOrigin, originApi);
|
|
8241
8824
|
case 24:
|
|
8242
8825
|
_context2.t6 = _context2.sent;
|
|
8243
|
-
_context2.t7 = BigInt((
|
|
8826
|
+
_context2.t7 = BigInt((_a = getExistentialDeposit$1(origin)) !== null && _a !== void 0 ? _a : 0);
|
|
8244
8827
|
_context2.t8 = getNativeAssetSymbol(origin);
|
|
8245
8828
|
_context2.t9 = getMinNativeTransferableAmount(origin);
|
|
8246
8829
|
_context2.next = 30;
|
|
@@ -8289,6 +8872,7 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
8289
8872
|
getAssetsObject: getAssetsObject,
|
|
8290
8873
|
getBalanceForeign: getBalanceForeign,
|
|
8291
8874
|
getBalanceNative: getBalanceNative,
|
|
8875
|
+
getNativeAssetSymbol: getNativeAssetSymbol,
|
|
8292
8876
|
getNativeAssets: getNativeAssets,
|
|
8293
8877
|
getOtherAssets: getOtherAssets,
|
|
8294
8878
|
getParaId: getParaId,
|
|
@@ -8341,6 +8925,11 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8341
8925
|
get: function get() {
|
|
8342
8926
|
return this._assetCheckEnabled;
|
|
8343
8927
|
}
|
|
8928
|
+
}, {
|
|
8929
|
+
key: "canUseXTokens",
|
|
8930
|
+
value: function canUseXTokens(_) {
|
|
8931
|
+
return true;
|
|
8932
|
+
}
|
|
8344
8933
|
}, {
|
|
8345
8934
|
key: "transfer",
|
|
8346
8935
|
value: function transfer(options) {
|
|
@@ -8353,17 +8942,19 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8353
8942
|
paraIdTo = options.paraIdTo,
|
|
8354
8943
|
overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
|
|
8355
8944
|
feeAsset = options.feeAsset,
|
|
8945
|
+
_options$version = options.version,
|
|
8946
|
+
version = _options$version === void 0 ? this.version : _options$version,
|
|
8356
8947
|
_options$serializedAp = options.serializedApiCallEnabled,
|
|
8357
8948
|
serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
8358
8949
|
var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
|
|
8359
8950
|
var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
|
|
8360
|
-
if (supportsXTokens(this)) {
|
|
8951
|
+
if (supportsXTokens(this) && this.canUseXTokens(options)) {
|
|
8361
8952
|
return this.transferXTokens({
|
|
8362
8953
|
api: api,
|
|
8363
8954
|
currency: currencySymbol,
|
|
8364
8955
|
currencyID: currencyId,
|
|
8365
8956
|
amount: amount,
|
|
8366
|
-
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address,
|
|
8957
|
+
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, version, paraId),
|
|
8367
8958
|
fees: getFees(scenario),
|
|
8368
8959
|
origin: this.node,
|
|
8369
8960
|
scenario: scenario,
|
|
@@ -8389,11 +8980,11 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8389
8980
|
} else if (supportsPolkadotXCM(this)) {
|
|
8390
8981
|
return this.transferPolkadotXCM({
|
|
8391
8982
|
api: api,
|
|
8392
|
-
header: this.createPolkadotXcmHeader(scenario, destination, paraId),
|
|
8393
|
-
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address,
|
|
8983
|
+
header: this.createPolkadotXcmHeader(scenario, version, destination, paraId),
|
|
8984
|
+
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, version, paraId),
|
|
8394
8985
|
address: address,
|
|
8395
8986
|
amount: amount,
|
|
8396
|
-
currencySelection: this.createCurrencySpec(amount, scenario,
|
|
8987
|
+
currencySelection: this.createCurrencySpec(amount, scenario, version, currencyId, overridedCurrencyMultiLocation),
|
|
8397
8988
|
currencyId: currencyId,
|
|
8398
8989
|
scenario: scenario,
|
|
8399
8990
|
currencySymbol: currencySymbol,
|
|
@@ -8410,10 +9001,12 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8410
9001
|
}, {
|
|
8411
9002
|
key: "transferRelayToPara",
|
|
8412
9003
|
value: function transferRelayToPara(options) {
|
|
9004
|
+
var _options$version2 = options.version,
|
|
9005
|
+
version = _options$version2 === void 0 ? Version.V3 : _options$version2;
|
|
8413
9006
|
return {
|
|
8414
9007
|
module: 'xcmPallet',
|
|
8415
9008
|
section: 'reserveTransferAssets',
|
|
8416
|
-
parameters: constructRelayToParaParameters(options,
|
|
9009
|
+
parameters: constructRelayToParaParameters(options, version)
|
|
8417
9010
|
};
|
|
8418
9011
|
}
|
|
8419
9012
|
}, {
|
|
@@ -8446,8 +9039,8 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8446
9039
|
}
|
|
8447
9040
|
}, {
|
|
8448
9041
|
key: "createPolkadotXcmHeader",
|
|
8449
|
-
value: function createPolkadotXcmHeader$1(scenario, destination, paraId) {
|
|
8450
|
-
return createPolkadotXcmHeader(scenario,
|
|
9042
|
+
value: function createPolkadotXcmHeader$1(scenario, version, destination, paraId) {
|
|
9043
|
+
return createPolkadotXcmHeader(scenario, version, destination, paraId);
|
|
8451
9044
|
}
|
|
8452
9045
|
}]);
|
|
8453
9046
|
}();
|
|
@@ -8493,7 +9086,6 @@ var getParameters = function getParameters(isAssetHub, currencySelection, addres
|
|
|
8493
9086
|
}
|
|
8494
9087
|
return [currencySelection, amount, addressSelection, fees];
|
|
8495
9088
|
};
|
|
8496
|
-
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
8497
9089
|
var XTokensTransferImpl = /*#__PURE__*/function () {
|
|
8498
9090
|
function XTokensTransferImpl() {
|
|
8499
9091
|
_classCallCheck(this, XTokensTransferImpl);
|
|
@@ -8526,6 +9118,7 @@ var XTokensTransferImpl = /*#__PURE__*/function () {
|
|
|
8526
9118
|
parameters: parameters
|
|
8527
9119
|
};
|
|
8528
9120
|
}
|
|
9121
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
8529
9122
|
return (_api$tx$module = api.tx[module])[section].apply(_api$tx$module, _toConsumableArray(parameters));
|
|
8530
9123
|
}
|
|
8531
9124
|
}]);
|
|
@@ -8574,19 +9167,6 @@ var Unique = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8574
9167
|
}]);
|
|
8575
9168
|
}(ParachainNode);
|
|
8576
9169
|
|
|
8577
|
-
// Used to inform user, that currency they wish to use is not registered on either origin or destination Parachain
|
|
8578
|
-
var InvalidCurrencyError = /*#__PURE__*/function (_Error) {
|
|
8579
|
-
function InvalidCurrencyError(message) {
|
|
8580
|
-
var _this;
|
|
8581
|
-
_classCallCheck(this, InvalidCurrencyError);
|
|
8582
|
-
_this = _callSuper(this, InvalidCurrencyError, [message]);
|
|
8583
|
-
_this.name = 'InvalidCurrencyError';
|
|
8584
|
-
return _this;
|
|
8585
|
-
}
|
|
8586
|
-
_inherits(InvalidCurrencyError, _Error);
|
|
8587
|
-
return _createClass(InvalidCurrencyError);
|
|
8588
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
8589
|
-
|
|
8590
9170
|
var Crust = /*#__PURE__*/function (_ParachainNode) {
|
|
8591
9171
|
function Crust() {
|
|
8592
9172
|
_classCallCheck(this, Crust);
|
|
@@ -8674,13 +9254,13 @@ var ComposableFinance = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8674
9254
|
}]);
|
|
8675
9255
|
}(ParachainNode);
|
|
8676
9256
|
|
|
8677
|
-
var
|
|
8678
|
-
function
|
|
8679
|
-
_classCallCheck(this,
|
|
8680
|
-
return _callSuper(this,
|
|
9257
|
+
var Hydration = /*#__PURE__*/function (_ParachainNode) {
|
|
9258
|
+
function Hydration() {
|
|
9259
|
+
_classCallCheck(this, Hydration);
|
|
9260
|
+
return _callSuper(this, Hydration, ['Hydration', 'hydradx', 'polkadot', Version.V3]);
|
|
8681
9261
|
}
|
|
8682
|
-
_inherits(
|
|
8683
|
-
return _createClass(
|
|
9262
|
+
_inherits(Hydration, _ParachainNode);
|
|
9263
|
+
return _createClass(Hydration, [{
|
|
8684
9264
|
key: "transferXTokens",
|
|
8685
9265
|
value: function transferXTokens(input) {
|
|
8686
9266
|
var currencyID = input.currencyID;
|
|
@@ -8743,12 +9323,19 @@ var Moonbeam = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8743
9323
|
}, {
|
|
8744
9324
|
key: "transferRelayToPara",
|
|
8745
9325
|
value: function transferRelayToPara(options) {
|
|
9326
|
+
var _options$version = options.version,
|
|
9327
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
8746
9328
|
return {
|
|
8747
9329
|
module: 'xcmPallet',
|
|
8748
9330
|
section: 'limitedReserveTransferAssets',
|
|
8749
|
-
parameters: constructRelayToParaParameters(options,
|
|
9331
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
8750
9332
|
};
|
|
8751
9333
|
}
|
|
9334
|
+
}, {
|
|
9335
|
+
key: "getProvider",
|
|
9336
|
+
value: function getProvider() {
|
|
9337
|
+
return getAllNodeProviders(this.node)[2];
|
|
9338
|
+
}
|
|
8752
9339
|
}]);
|
|
8753
9340
|
}(ParachainNode);
|
|
8754
9341
|
|
|
@@ -8810,10 +9397,29 @@ var Amplitude = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8810
9397
|
var Bajun = /*#__PURE__*/function (_ParachainNode) {
|
|
8811
9398
|
function Bajun() {
|
|
8812
9399
|
_classCallCheck(this, Bajun);
|
|
8813
|
-
return _callSuper(this, Bajun, ['Bajun', 'bajun', 'kusama', Version.
|
|
9400
|
+
return _callSuper(this, Bajun, ['Bajun', 'bajun', 'kusama', Version.V3]);
|
|
8814
9401
|
}
|
|
8815
9402
|
_inherits(Bajun, _ParachainNode);
|
|
8816
|
-
return _createClass(Bajun
|
|
9403
|
+
return _createClass(Bajun, [{
|
|
9404
|
+
key: "transferXTokens",
|
|
9405
|
+
value: function transferXTokens(input) {
|
|
9406
|
+
var scenario = input.scenario,
|
|
9407
|
+
currency = input.currency;
|
|
9408
|
+
if (scenario !== 'ParaToPara') {
|
|
9409
|
+
throw new ScenarioNotSupportedError(this.node, scenario);
|
|
9410
|
+
}
|
|
9411
|
+
var nativeSymbol = getNativeAssetSymbol(this.node);
|
|
9412
|
+
if (currency !== nativeSymbol) {
|
|
9413
|
+
throw new InvalidCurrencyError("Node ".concat(this.node, " does not support currency ").concat(currency));
|
|
9414
|
+
}
|
|
9415
|
+
return XTokensTransferImpl.transferXTokens(input, currency);
|
|
9416
|
+
}
|
|
9417
|
+
}, {
|
|
9418
|
+
key: "transferRelayToPara",
|
|
9419
|
+
value: function transferRelayToPara() {
|
|
9420
|
+
throw new NodeNotSupportedError();
|
|
9421
|
+
}
|
|
9422
|
+
}]);
|
|
8817
9423
|
}(ParachainNode);
|
|
8818
9424
|
|
|
8819
9425
|
var Basilisk = /*#__PURE__*/function (_ParachainNode) {
|
|
@@ -8923,72 +9529,17 @@ var Moonriver = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8923
9529
|
}, {
|
|
8924
9530
|
key: "transferRelayToPara",
|
|
8925
9531
|
value: function transferRelayToPara(options) {
|
|
9532
|
+
var _options$version = options.version,
|
|
9533
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
8926
9534
|
return {
|
|
8927
9535
|
module: 'xcmPallet',
|
|
8928
9536
|
section: 'limitedReserveTransferAssets',
|
|
8929
|
-
parameters: constructRelayToParaParameters(options,
|
|
9537
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
8930
9538
|
};
|
|
8931
9539
|
}
|
|
8932
9540
|
}]);
|
|
8933
9541
|
}(ParachainNode);
|
|
8934
9542
|
|
|
8935
|
-
var Mangata = /*#__PURE__*/function (_ParachainNode) {
|
|
8936
|
-
function Mangata() {
|
|
8937
|
-
_classCallCheck(this, Mangata);
|
|
8938
|
-
return _callSuper(this, Mangata, ['Mangata', 'mangata', 'kusama', Version.V3]);
|
|
8939
|
-
}
|
|
8940
|
-
_inherits(Mangata, _ParachainNode);
|
|
8941
|
-
return _createClass(Mangata, [{
|
|
8942
|
-
key: "transferXTokens",
|
|
8943
|
-
value: function transferXTokens(input) {
|
|
8944
|
-
return XTokensTransferImpl.transferXTokens(input, input.currencyID);
|
|
8945
|
-
}
|
|
8946
|
-
}, {
|
|
8947
|
-
key: "createApiInstance",
|
|
8948
|
-
value: function createApiInstance() {
|
|
8949
|
-
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8950
|
-
var _yield$import, mTypes, mRpc, options, provider;
|
|
8951
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8952
|
-
while (1) switch (_context.prev = _context.next) {
|
|
8953
|
-
case 0:
|
|
8954
|
-
_context.next = 2;
|
|
8955
|
-
return import('@mangata-finance/type-definitions');
|
|
8956
|
-
case 2:
|
|
8957
|
-
_yield$import = _context.sent;
|
|
8958
|
-
mTypes = _yield$import.mTypes;
|
|
8959
|
-
mRpc = _yield$import.mRpc;
|
|
8960
|
-
options = function options() {
|
|
8961
|
-
var _a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8962
|
-
var _a$types = _a.types,
|
|
8963
|
-
types = _a$types === void 0 ? {} : _a$types,
|
|
8964
|
-
_a$rpc = _a.rpc,
|
|
8965
|
-
rpc = _a$rpc === void 0 ? {} : _a$rpc,
|
|
8966
|
-
otherOptions = __rest(_a, ["types", "rpc"]);
|
|
8967
|
-
return Object.assign({
|
|
8968
|
-
types: Object.assign(Object.assign({}, mTypes), types),
|
|
8969
|
-
rpc: Object.assign(Object.assign({}, mRpc), rpc)
|
|
8970
|
-
}, otherOptions);
|
|
8971
|
-
};
|
|
8972
|
-
provider = new WsProvider(this.getProvider());
|
|
8973
|
-
_context.next = 9;
|
|
8974
|
-
return ApiPromise.create(options({
|
|
8975
|
-
provider: provider,
|
|
8976
|
-
throwOnConnect: true,
|
|
8977
|
-
throwOnUnknown: true,
|
|
8978
|
-
noInitWarn: true
|
|
8979
|
-
}));
|
|
8980
|
-
case 9:
|
|
8981
|
-
return _context.abrupt("return", _context.sent);
|
|
8982
|
-
case 10:
|
|
8983
|
-
case "end":
|
|
8984
|
-
return _context.stop();
|
|
8985
|
-
}
|
|
8986
|
-
}, _callee, this);
|
|
8987
|
-
}));
|
|
8988
|
-
}
|
|
8989
|
-
}]);
|
|
8990
|
-
}(ParachainNode);
|
|
8991
|
-
|
|
8992
9543
|
var Litmus = /*#__PURE__*/function (_ParachainNode) {
|
|
8993
9544
|
function Litmus() {
|
|
8994
9545
|
_classCallCheck(this, Litmus);
|
|
@@ -9087,48 +9638,10 @@ var Imbue = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9087
9638
|
}]);
|
|
9088
9639
|
}(ParachainNode);
|
|
9089
9640
|
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
_classCallCheck(this, NodeNotSupportedError);
|
|
9095
|
-
_this = _callSuper(this, NodeNotSupportedError, [message !== null && message !== void 0 ? message : 'These nodes do not support XCM transfers from Relay / to Relay chain.']);
|
|
9096
|
-
_this.name = 'NodeNotSupported';
|
|
9097
|
-
return _this;
|
|
9098
|
-
}
|
|
9099
|
-
_inherits(NodeNotSupportedError, _Error);
|
|
9100
|
-
return _createClass(NodeNotSupportedError);
|
|
9101
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
9102
|
-
|
|
9103
|
-
// Used to inform user, that Parachain they wish to use does not support scenario they wish to use yet
|
|
9104
|
-
var ScenarioNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
9105
|
-
function ScenarioNotSupportedError(node, scenario) {
|
|
9106
|
-
var _this;
|
|
9107
|
-
_classCallCheck(this, ScenarioNotSupportedError);
|
|
9108
|
-
_this = _callSuper(this, ScenarioNotSupportedError, ["Scenario ".concat(scenario, " not supported for node ").concat(node)]);
|
|
9109
|
-
_this.name = 'ScenarioNotSupported';
|
|
9110
|
-
return _this;
|
|
9111
|
-
}
|
|
9112
|
-
_inherits(ScenarioNotSupportedError, _Error);
|
|
9113
|
-
return _createClass(ScenarioNotSupportedError);
|
|
9114
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
9115
|
-
|
|
9116
|
-
var IncompatibleNodesError = /*#__PURE__*/function (_Error) {
|
|
9117
|
-
function IncompatibleNodesError() {
|
|
9118
|
-
var _this;
|
|
9119
|
-
_classCallCheck(this, IncompatibleNodesError);
|
|
9120
|
-
_this = _callSuper(this, IncompatibleNodesError, ['Transactions between nodes on different relaychains are not yet possible.']);
|
|
9121
|
-
_this.name = 'IncompatibleNodes';
|
|
9122
|
-
return _this;
|
|
9123
|
-
}
|
|
9124
|
-
_inherits(IncompatibleNodesError, _Error);
|
|
9125
|
-
return _createClass(IncompatibleNodesError);
|
|
9126
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
9127
|
-
|
|
9128
|
-
var Integritee = /*#__PURE__*/function (_ParachainNode) {
|
|
9129
|
-
function Integritee() {
|
|
9130
|
-
_classCallCheck(this, Integritee);
|
|
9131
|
-
return _callSuper(this, Integritee, ['Integritee', 'integritee', 'kusama', Version.V3]);
|
|
9641
|
+
var Integritee = /*#__PURE__*/function (_ParachainNode) {
|
|
9642
|
+
function Integritee() {
|
|
9643
|
+
_classCallCheck(this, Integritee);
|
|
9644
|
+
return _callSuper(this, Integritee, ['Integritee', 'integritee', 'kusama', Version.V3]);
|
|
9132
9645
|
}
|
|
9133
9646
|
_inherits(Integritee, _ParachainNode);
|
|
9134
9647
|
return _createClass(Integritee, [{
|
|
@@ -9189,7 +9702,6 @@ var Karura = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9189
9702
|
|
|
9190
9703
|
// Contains basic structure of polkadotXCM call
|
|
9191
9704
|
var DEFAULT_FEE_ASSET = 0;
|
|
9192
|
-
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
9193
9705
|
var PolkadotXCMTransferImpl = /*#__PURE__*/function () {
|
|
9194
9706
|
function PolkadotXCMTransferImpl() {
|
|
9195
9707
|
_classCallCheck(this, PolkadotXCMTransferImpl);
|
|
@@ -9245,6 +9757,49 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9245
9757
|
}
|
|
9246
9758
|
throw new InvalidCurrencyError('Polkadot <-> Kusama bridge does not support this currency');
|
|
9247
9759
|
}
|
|
9760
|
+
}, {
|
|
9761
|
+
key: "handleEthBridgeTransfer",
|
|
9762
|
+
value: function handleEthBridgeTransfer(input) {
|
|
9763
|
+
var api = input.api,
|
|
9764
|
+
scenario = input.scenario,
|
|
9765
|
+
destination = input.destination,
|
|
9766
|
+
paraIdTo = input.paraIdTo,
|
|
9767
|
+
address = input.address,
|
|
9768
|
+
currencyId = input.currencyId;
|
|
9769
|
+
if (!ethers.isAddress(address)) {
|
|
9770
|
+
throw new Error('Only Ethereum addresses are supported for Ethereum transfers');
|
|
9771
|
+
}
|
|
9772
|
+
var ethAssets = getOtherAssets('Ethereum');
|
|
9773
|
+
var ethAsset = ethAssets.find(function (asset) {
|
|
9774
|
+
return asset.symbol === currencyId;
|
|
9775
|
+
});
|
|
9776
|
+
if (!ethAsset) {
|
|
9777
|
+
throw new InvalidCurrencyError("Currency ".concat(currencyId, " is not supported for Ethereum transfers"));
|
|
9778
|
+
}
|
|
9779
|
+
var ETH_CHAIN_ID = 1;
|
|
9780
|
+
var ethJunction = {
|
|
9781
|
+
GlobalConsensus: {
|
|
9782
|
+
Ethereum: {
|
|
9783
|
+
chain_id: ETH_CHAIN_ID
|
|
9784
|
+
}
|
|
9785
|
+
}
|
|
9786
|
+
};
|
|
9787
|
+
var modifiedInput = Object.assign(Object.assign({}, input), {
|
|
9788
|
+
header: createPolkadotXcmHeader(scenario, this.version, destination, paraIdTo, ethJunction, Parents.TWO),
|
|
9789
|
+
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraIdTo),
|
|
9790
|
+
currencySelection: createCurrencySpec(input.amount, Version.V3, Parents.TWO, {
|
|
9791
|
+
parents: Parents.TWO,
|
|
9792
|
+
interior: {
|
|
9793
|
+
X2: [ethJunction, {
|
|
9794
|
+
AccountKey20: {
|
|
9795
|
+
key: ethAsset.assetId
|
|
9796
|
+
}
|
|
9797
|
+
}]
|
|
9798
|
+
}
|
|
9799
|
+
})
|
|
9800
|
+
});
|
|
9801
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'transferAssets', 'Unlimited');
|
|
9802
|
+
}
|
|
9248
9803
|
}, {
|
|
9249
9804
|
key: "transferPolkadotXCM",
|
|
9250
9805
|
value: function transferPolkadotXCM(input) {
|
|
@@ -9252,16 +9807,21 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9252
9807
|
if (input.destination === 'AssetHubKusama') {
|
|
9253
9808
|
return this.handleBridgeTransfer(input, 'Kusama');
|
|
9254
9809
|
}
|
|
9810
|
+
if (input.destination === 'Ethereum') {
|
|
9811
|
+
return this.handleEthBridgeTransfer(input);
|
|
9812
|
+
}
|
|
9255
9813
|
var method = scenario === 'ParaToPara' ? 'limitedReserveTransferAssets' : 'limitedTeleportAssets';
|
|
9256
9814
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
|
|
9257
9815
|
}
|
|
9258
9816
|
}, {
|
|
9259
9817
|
key: "transferRelayToPara",
|
|
9260
9818
|
value: function transferRelayToPara(options) {
|
|
9819
|
+
var _options$version = options.version,
|
|
9820
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
9261
9821
|
return {
|
|
9262
9822
|
module: 'xcmPallet',
|
|
9263
9823
|
section: 'limitedTeleportAssets',
|
|
9264
|
-
parameters: constructRelayToParaParameters(options,
|
|
9824
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9265
9825
|
};
|
|
9266
9826
|
}
|
|
9267
9827
|
}, {
|
|
@@ -9277,7 +9837,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9277
9837
|
};
|
|
9278
9838
|
return createCurrencySpec(amount, version, Parents.ZERO, overridedMultiLocation, interior);
|
|
9279
9839
|
} else {
|
|
9280
|
-
return
|
|
9840
|
+
return _superPropGet(AssetHubPolkadot, "createCurrencySpec", this)([amount, scenario, version, currencyId]);
|
|
9281
9841
|
}
|
|
9282
9842
|
}
|
|
9283
9843
|
}]);
|
|
@@ -9307,10 +9867,12 @@ var AssetHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9307
9867
|
}, {
|
|
9308
9868
|
key: "transferRelayToPara",
|
|
9309
9869
|
value: function transferRelayToPara(options) {
|
|
9870
|
+
var _options$version = options.version,
|
|
9871
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
9310
9872
|
return {
|
|
9311
9873
|
module: 'xcmPallet',
|
|
9312
9874
|
section: 'limitedTeleportAssets',
|
|
9313
|
-
parameters: constructRelayToParaParameters(options,
|
|
9875
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9314
9876
|
};
|
|
9315
9877
|
}
|
|
9316
9878
|
}, {
|
|
@@ -9343,10 +9905,12 @@ var CoretimeKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9343
9905
|
value: function transferRelayToPara(options) {
|
|
9344
9906
|
// TESTED block hash on Rococo: 0x28929f7b2aeadbf3333f05d35bed18214a4b23dd270bd072f99e8a0131d22456
|
|
9345
9907
|
// https://rococo.subscan.io/extrinsic/0x469eec7dccb22696b0c95cf4f5eec4b367ad3dc23243a346cc2aad3cc9522800
|
|
9908
|
+
var _options$version = options.version,
|
|
9909
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
9346
9910
|
return {
|
|
9347
9911
|
module: 'xcmPallet',
|
|
9348
9912
|
section: 'limitedTeleportAssets',
|
|
9349
|
-
parameters: constructRelayToParaParameters(options,
|
|
9913
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9350
9914
|
};
|
|
9351
9915
|
}
|
|
9352
9916
|
}]);
|
|
@@ -9371,10 +9935,12 @@ var Encointer = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9371
9935
|
}, {
|
|
9372
9936
|
key: "transferRelayToPara",
|
|
9373
9937
|
value: function transferRelayToPara(options) {
|
|
9938
|
+
var _options$version = options.version,
|
|
9939
|
+
version = _options$version === void 0 ? Version.V1 : _options$version;
|
|
9374
9940
|
return {
|
|
9375
9941
|
module: 'xcmPallet',
|
|
9376
9942
|
section: 'limitedTeleportAssets',
|
|
9377
|
-
parameters: constructRelayToParaParameters(options,
|
|
9943
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9378
9944
|
};
|
|
9379
9945
|
}
|
|
9380
9946
|
}]);
|
|
@@ -9419,56 +9985,10 @@ var Astar = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9419
9985
|
return XTokensTransferImpl.transferXTokens(input, input.currencyID);
|
|
9420
9986
|
}
|
|
9421
9987
|
}, {
|
|
9422
|
-
key: "
|
|
9423
|
-
value: function
|
|
9424
|
-
var
|
|
9425
|
-
|
|
9426
|
-
currencyId = options.currencyId,
|
|
9427
|
-
amount = options.amount,
|
|
9428
|
-
address = options.address,
|
|
9429
|
-
destination = options.destination,
|
|
9430
|
-
paraIdTo = options.paraIdTo,
|
|
9431
|
-
feeAsset = options.feeAsset,
|
|
9432
|
-
overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
|
|
9433
|
-
_options$serializedAp = options.serializedApiCallEnabled,
|
|
9434
|
-
serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
9435
|
-
var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
|
|
9436
|
-
var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
|
|
9437
|
-
var node = this.node;
|
|
9438
|
-
if (supportsXTokens(this) && currencySymbol !== 'ASTR') {
|
|
9439
|
-
return this.transferXTokens({
|
|
9440
|
-
api: api,
|
|
9441
|
-
currency: currencySymbol,
|
|
9442
|
-
currencyID: currencyId,
|
|
9443
|
-
amount: amount,
|
|
9444
|
-
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, this.version, paraId),
|
|
9445
|
-
fees: getFees(scenario),
|
|
9446
|
-
origin: this.node,
|
|
9447
|
-
scenario: scenario,
|
|
9448
|
-
paraIdTo: paraId,
|
|
9449
|
-
destination: destination,
|
|
9450
|
-
overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
|
|
9451
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9452
|
-
});
|
|
9453
|
-
} else if (supportsPolkadotXCM(this)) {
|
|
9454
|
-
return this.transferPolkadotXCM({
|
|
9455
|
-
api: api,
|
|
9456
|
-
header: this.createPolkadotXcmHeader(scenario, destination, paraId),
|
|
9457
|
-
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
|
|
9458
|
-
address: address,
|
|
9459
|
-
amount: amount,
|
|
9460
|
-
currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
|
|
9461
|
-
currencyId: currencyId,
|
|
9462
|
-
scenario: scenario,
|
|
9463
|
-
currencySymbol: currencySymbol,
|
|
9464
|
-
feeAsset: feeAsset,
|
|
9465
|
-
destination: destination,
|
|
9466
|
-
paraIdTo: paraIdTo,
|
|
9467
|
-
overridedCurrency: overridedCurrencyMultiLocation,
|
|
9468
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9469
|
-
});
|
|
9470
|
-
}
|
|
9471
|
-
throw new NoXCMSupportImplementedError(node);
|
|
9988
|
+
key: "canUseXTokens",
|
|
9989
|
+
value: function canUseXTokens(_ref) {
|
|
9990
|
+
var currencySymbol = _ref.currencySymbol;
|
|
9991
|
+
return currencySymbol !== 'ASTR';
|
|
9472
9992
|
}
|
|
9473
9993
|
}]);
|
|
9474
9994
|
}(ParachainNode);
|
|
@@ -9502,7 +10022,7 @@ var Darwinia = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9502
10022
|
};
|
|
9503
10023
|
return createCurrencySpec(amount, version, Parents.ZERO, overridedMultiLocation, interior);
|
|
9504
10024
|
} else {
|
|
9505
|
-
return
|
|
10025
|
+
return _superPropGet(Darwinia, "createCurrencySpec", this)([amount, scenario, version, currencyId]);
|
|
9506
10026
|
}
|
|
9507
10027
|
}
|
|
9508
10028
|
}]);
|
|
@@ -9576,56 +10096,10 @@ var Shiden = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9576
10096
|
return XTokensTransferImpl.transferXTokens(input, input.currencyID);
|
|
9577
10097
|
}
|
|
9578
10098
|
}, {
|
|
9579
|
-
key: "
|
|
9580
|
-
value: function
|
|
9581
|
-
var
|
|
9582
|
-
|
|
9583
|
-
currencyId = options.currencyId,
|
|
9584
|
-
amount = options.amount,
|
|
9585
|
-
address = options.address,
|
|
9586
|
-
destination = options.destination,
|
|
9587
|
-
paraIdTo = options.paraIdTo,
|
|
9588
|
-
feeAsset = options.feeAsset,
|
|
9589
|
-
overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
|
|
9590
|
-
_options$serializedAp = options.serializedApiCallEnabled,
|
|
9591
|
-
serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
9592
|
-
var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
|
|
9593
|
-
var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
|
|
9594
|
-
var node = this.node;
|
|
9595
|
-
if (supportsXTokens(this) && currencySymbol !== 'SDN') {
|
|
9596
|
-
return this.transferXTokens({
|
|
9597
|
-
api: api,
|
|
9598
|
-
currency: currencySymbol,
|
|
9599
|
-
currencyID: currencyId,
|
|
9600
|
-
amount: amount,
|
|
9601
|
-
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, this.version, paraId),
|
|
9602
|
-
fees: getFees(scenario),
|
|
9603
|
-
origin: this.node,
|
|
9604
|
-
scenario: scenario,
|
|
9605
|
-
paraIdTo: paraId,
|
|
9606
|
-
destination: destination,
|
|
9607
|
-
overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
|
|
9608
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9609
|
-
});
|
|
9610
|
-
} else if (supportsPolkadotXCM(this)) {
|
|
9611
|
-
return this.transferPolkadotXCM({
|
|
9612
|
-
api: api,
|
|
9613
|
-
header: this.createPolkadotXcmHeader(scenario, destination, paraId),
|
|
9614
|
-
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
|
|
9615
|
-
address: address,
|
|
9616
|
-
amount: amount,
|
|
9617
|
-
currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
|
|
9618
|
-
currencyId: currencyId,
|
|
9619
|
-
scenario: scenario,
|
|
9620
|
-
currencySymbol: currencySymbol,
|
|
9621
|
-
feeAsset: feeAsset,
|
|
9622
|
-
destination: destination,
|
|
9623
|
-
paraIdTo: paraIdTo,
|
|
9624
|
-
overridedCurrency: overridedCurrencyMultiLocation,
|
|
9625
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9626
|
-
});
|
|
9627
|
-
}
|
|
9628
|
-
throw new NoXCMSupportImplementedError(node);
|
|
10099
|
+
key: "canUseXTokens",
|
|
10100
|
+
value: function canUseXTokens(_ref) {
|
|
10101
|
+
var currencySymbol = _ref.currencySymbol;
|
|
10102
|
+
return currencySymbol !== 'SDN';
|
|
9629
10103
|
}
|
|
9630
10104
|
}]);
|
|
9631
10105
|
}(ParachainNode);
|
|
@@ -9766,10 +10240,12 @@ var Collectives = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9766
10240
|
}, {
|
|
9767
10241
|
key: "transferRelayToPara",
|
|
9768
10242
|
value: function transferRelayToPara(options) {
|
|
10243
|
+
var _options$version = options.version,
|
|
10244
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
9769
10245
|
return {
|
|
9770
10246
|
module: 'xcmPallet',
|
|
9771
10247
|
section: 'limitedTeleportAssets',
|
|
9772
|
-
parameters: constructRelayToParaParameters(options,
|
|
10248
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9773
10249
|
};
|
|
9774
10250
|
}
|
|
9775
10251
|
}, {
|
|
@@ -9778,7 +10254,7 @@ var Collectives = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9778
10254
|
if (scenario === 'ParaToPara') {
|
|
9779
10255
|
return {};
|
|
9780
10256
|
} else {
|
|
9781
|
-
return
|
|
10257
|
+
return _superPropGet(Collectives, "createCurrencySpec", this)([amount, scenario, version, currencyId]);
|
|
9782
10258
|
}
|
|
9783
10259
|
}
|
|
9784
10260
|
}]);
|
|
@@ -9791,7 +10267,7 @@ var determineDestWeight = function determineDestWeight(destNode) {
|
|
|
9791
10267
|
proofSize: '1000000'
|
|
9792
10268
|
};
|
|
9793
10269
|
}
|
|
9794
|
-
if (destNode === 'Moonbeam' || destNode === '
|
|
10270
|
+
if (destNode === 'Moonbeam' || destNode === 'Hydration') {
|
|
9795
10271
|
return {
|
|
9796
10272
|
refTime: '5000000000',
|
|
9797
10273
|
proofSize: '0'
|
|
@@ -9807,7 +10283,7 @@ var getDestination = function getDestination(_ref) {
|
|
|
9807
10283
|
if (isMultiLocation) {
|
|
9808
10284
|
return recipientAddress;
|
|
9809
10285
|
}
|
|
9810
|
-
var isEthAddress = ethers.
|
|
10286
|
+
var isEthAddress = ethers.isAddress(recipientAddress);
|
|
9811
10287
|
var addressJunction = isEthAddress ? {
|
|
9812
10288
|
AccountKey20: {
|
|
9813
10289
|
key: recipientAddress
|
|
@@ -9826,7 +10302,6 @@ var getDestination = function getDestination(_ref) {
|
|
|
9826
10302
|
}
|
|
9827
10303
|
};
|
|
9828
10304
|
};
|
|
9829
|
-
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
9830
10305
|
var XTransferTransferImpl = /*#__PURE__*/function () {
|
|
9831
10306
|
function XTransferTransferImpl() {
|
|
9832
10307
|
_classCallCheck(this, XTransferTransferImpl);
|
|
@@ -9913,7 +10388,7 @@ var KiltSpiritnet = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9913
10388
|
key: "transferPolkadotXCM",
|
|
9914
10389
|
value: function transferPolkadotXCM(input) {
|
|
9915
10390
|
if (input.scenario !== 'ParaToPara') {
|
|
9916
|
-
throw new ScenarioNotSupportedError(
|
|
10391
|
+
throw new ScenarioNotSupportedError(this.node, input.scenario);
|
|
9917
10392
|
}
|
|
9918
10393
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, 'reserveTransferAssets');
|
|
9919
10394
|
}
|
|
@@ -9954,9 +10429,142 @@ var Curio = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9954
10429
|
}]);
|
|
9955
10430
|
}(ParachainNode);
|
|
9956
10431
|
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
var
|
|
10432
|
+
var BridgeHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
10433
|
+
function BridgeHubPolkadot() {
|
|
10434
|
+
var _this;
|
|
10435
|
+
_classCallCheck(this, BridgeHubPolkadot);
|
|
10436
|
+
_this = _callSuper(this, BridgeHubPolkadot, ['BridgeHubPolkadot', 'polkadotBridgeHub', 'polkadot', Version.V3]);
|
|
10437
|
+
_this._assetCheckEnabled = false;
|
|
10438
|
+
return _this;
|
|
10439
|
+
}
|
|
10440
|
+
_inherits(BridgeHubPolkadot, _ParachainNode);
|
|
10441
|
+
return _createClass(BridgeHubPolkadot, [{
|
|
10442
|
+
key: "transferPolkadotXCM",
|
|
10443
|
+
value: function transferPolkadotXCM(input) {
|
|
10444
|
+
var scenario = input.scenario;
|
|
10445
|
+
if (scenario === 'ParaToPara') {
|
|
10446
|
+
throw new ScenarioNotSupportedError(this.node, scenario, 'Unable to use bridge hub for transfers to other Parachains. Please move your currency to AssetHub to transfer to other Parachains.');
|
|
10447
|
+
}
|
|
10448
|
+
var method = 'limitedTeleportAssets';
|
|
10449
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
|
|
10450
|
+
}
|
|
10451
|
+
}, {
|
|
10452
|
+
key: "transferRelayToPara",
|
|
10453
|
+
value: function transferRelayToPara(options) {
|
|
10454
|
+
var _options$version = options.version,
|
|
10455
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
10456
|
+
return {
|
|
10457
|
+
module: 'xcmPallet',
|
|
10458
|
+
section: 'limitedTeleportAssets',
|
|
10459
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
10460
|
+
};
|
|
10461
|
+
}
|
|
10462
|
+
}]);
|
|
10463
|
+
}(ParachainNode);
|
|
10464
|
+
|
|
10465
|
+
var BridgeHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
10466
|
+
function BridgeHubKusama() {
|
|
10467
|
+
var _this;
|
|
10468
|
+
_classCallCheck(this, BridgeHubKusama);
|
|
10469
|
+
_this = _callSuper(this, BridgeHubKusama, ['BridgeHubKusama', 'kusamaBridgeHub', 'kusama', Version.V3]);
|
|
10470
|
+
_this._assetCheckEnabled = false;
|
|
10471
|
+
return _this;
|
|
10472
|
+
}
|
|
10473
|
+
_inherits(BridgeHubKusama, _ParachainNode);
|
|
10474
|
+
return _createClass(BridgeHubKusama, [{
|
|
10475
|
+
key: "transferPolkadotXCM",
|
|
10476
|
+
value: function transferPolkadotXCM(input) {
|
|
10477
|
+
var scenario = input.scenario;
|
|
10478
|
+
if (scenario === 'ParaToPara') {
|
|
10479
|
+
throw new ScenarioNotSupportedError(this.node, scenario, 'Unable to use bridge hub for transfers to other Parachains. Please move your currency to AssetHub to transfer to other Parachains.');
|
|
10480
|
+
}
|
|
10481
|
+
var method = 'limitedTeleportAssets';
|
|
10482
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
|
|
10483
|
+
}
|
|
10484
|
+
}, {
|
|
10485
|
+
key: "transferRelayToPara",
|
|
10486
|
+
value: function transferRelayToPara(options) {
|
|
10487
|
+
var _options$version = options.version,
|
|
10488
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
10489
|
+
return {
|
|
10490
|
+
module: 'xcmPallet',
|
|
10491
|
+
section: 'limitedTeleportAssets',
|
|
10492
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
10493
|
+
};
|
|
10494
|
+
}
|
|
10495
|
+
}]);
|
|
10496
|
+
}(ParachainNode);
|
|
10497
|
+
|
|
10498
|
+
var Ethereum = /*#__PURE__*/function (_ParachainNode) {
|
|
10499
|
+
function Ethereum() {
|
|
10500
|
+
_classCallCheck(this, Ethereum);
|
|
10501
|
+
return _callSuper(this, Ethereum, ['Ethereum', 'ethereum', 'polkadot', Version.V3]);
|
|
10502
|
+
}
|
|
10503
|
+
_inherits(Ethereum, _ParachainNode);
|
|
10504
|
+
return _createClass(Ethereum);
|
|
10505
|
+
}(ParachainNode);
|
|
10506
|
+
|
|
10507
|
+
var Mythos = /*#__PURE__*/function (_ParachainNode) {
|
|
10508
|
+
function Mythos() {
|
|
10509
|
+
_classCallCheck(this, Mythos);
|
|
10510
|
+
return _callSuper(this, Mythos, ['Mythos', 'mythos', 'polkadot', Version.V3]);
|
|
10511
|
+
}
|
|
10512
|
+
_inherits(Mythos, _ParachainNode);
|
|
10513
|
+
return _createClass(Mythos, [{
|
|
10514
|
+
key: "transferPolkadotXCM",
|
|
10515
|
+
value: function transferPolkadotXCM(input) {
|
|
10516
|
+
var scenario = input.scenario,
|
|
10517
|
+
currencySymbol = input.currencySymbol;
|
|
10518
|
+
if (scenario !== 'ParaToPara') {
|
|
10519
|
+
throw new ScenarioNotSupportedError(this.node, scenario);
|
|
10520
|
+
}
|
|
10521
|
+
var nativeSymbol = getNativeAssetSymbol(this.node);
|
|
10522
|
+
if (currencySymbol !== nativeSymbol) {
|
|
10523
|
+
throw new InvalidCurrencyError("Node ".concat(this.node, " does not support currency ").concat(currencySymbol));
|
|
10524
|
+
}
|
|
10525
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, 'limitedReserveTransferAssets', 'Unlimited');
|
|
10526
|
+
}
|
|
10527
|
+
}, {
|
|
10528
|
+
key: "transferRelayToPara",
|
|
10529
|
+
value: function transferRelayToPara() {
|
|
10530
|
+
throw new NodeNotSupportedError();
|
|
10531
|
+
}
|
|
10532
|
+
}]);
|
|
10533
|
+
}(ParachainNode);
|
|
10534
|
+
|
|
10535
|
+
var Peaq = /*#__PURE__*/function (_ParachainNode) {
|
|
10536
|
+
function Peaq() {
|
|
10537
|
+
_classCallCheck(this, Peaq);
|
|
10538
|
+
return _callSuper(this, Peaq, ['Peaq', 'peaq', 'polkadot', Version.V2]);
|
|
10539
|
+
}
|
|
10540
|
+
_inherits(Peaq, _ParachainNode);
|
|
10541
|
+
return _createClass(Peaq, [{
|
|
10542
|
+
key: "transferXTokens",
|
|
10543
|
+
value: function transferXTokens(input) {
|
|
10544
|
+
var scenario = input.scenario,
|
|
10545
|
+
currencyID = input.currencyID;
|
|
10546
|
+
if (scenario !== 'ParaToPara') {
|
|
10547
|
+
throw new ScenarioNotSupportedError(this.node, scenario);
|
|
10548
|
+
}
|
|
10549
|
+
return XTokensTransferImpl.transferXTokens(input, currencyID);
|
|
10550
|
+
}
|
|
10551
|
+
}, {
|
|
10552
|
+
key: "transferRelayToPara",
|
|
10553
|
+
value: function transferRelayToPara() {
|
|
10554
|
+
throw new NodeNotSupportedError();
|
|
10555
|
+
}
|
|
10556
|
+
}, {
|
|
10557
|
+
key: "getProvider",
|
|
10558
|
+
value: function getProvider() {
|
|
10559
|
+
return 'wss://peaq.api.onfinality.io/public-ws';
|
|
10560
|
+
}
|
|
10561
|
+
}]);
|
|
10562
|
+
}(ParachainNode);
|
|
10563
|
+
|
|
10564
|
+
var NODE_NAMES_DOT_KSM = ['AssetHubPolkadot', 'Acala', 'Astar', 'BifrostPolkadot', 'Bitgreen', 'BridgeHubPolkadot', 'BridgeHubKusama', 'Centrifuge', 'ComposableFinance', 'Darwinia', 'Hydration', 'Interlay', 'Litentry', 'Moonbeam', 'Parallel', 'AssetHubKusama', 'CoretimeKusama', 'Encointer', 'Altair', 'Amplitude', 'Bajun', 'Basilisk', 'BifrostKusama', 'Pioneer', 'Calamari', 'CrustShadow', 'Crab', 'Imbue', 'Integritee', 'InvArchTinker', 'Karura', 'Kintsugi', 'Litmus', 'Moonriver', 'ParallelHeiko', 'Picasso', 'Quartz', 'Robonomics', 'Shiden', 'Turing', 'Unique', 'Crust', 'Manta', 'Nodle', 'NeuroWeb', 'Pendulum', 'Polkadex', 'Zeitgeist', 'Collectives', 'Khala', 'Phala', 'Subsocial', 'KiltSpiritnet', 'Curio', 'Mythos', 'Peaq'];
|
|
10565
|
+
var NODE_NAMES = [].concat(NODE_NAMES_DOT_KSM, ['Ethereum']);
|
|
10566
|
+
var NODES_WITH_RELAY_CHAINS = [].concat(_toConsumableArray(NODE_NAMES), ['Polkadot', 'Kusama']);
|
|
10567
|
+
var NODES_WITH_RELAY_CHAINS_DOT_KSM = [].concat(NODE_NAMES_DOT_KSM, ['Polkadot', 'Kusama']);
|
|
9960
10568
|
var nodes = {
|
|
9961
10569
|
AssetHubPolkadot: new AssetHubPolkadot(),
|
|
9962
10570
|
Acala: new Acala(),
|
|
@@ -9964,11 +10572,13 @@ var nodes = {
|
|
|
9964
10572
|
Unique: new Unique(),
|
|
9965
10573
|
Crust: new Crust(),
|
|
9966
10574
|
BifrostPolkadot: new BifrostPolkadot(),
|
|
10575
|
+
BridgeHubPolkadot: new BridgeHubPolkadot(),
|
|
10576
|
+
BridgeHubKusama: new BridgeHubKusama(),
|
|
9967
10577
|
Bitgreen: new Bitgreen(),
|
|
9968
10578
|
Centrifuge: new Centrifuge(),
|
|
9969
10579
|
ComposableFinance: new ComposableFinance(),
|
|
9970
10580
|
Darwinia: new Darwinia(),
|
|
9971
|
-
|
|
10581
|
+
Hydration: new Hydration(),
|
|
9972
10582
|
Interlay: new Interlay(),
|
|
9973
10583
|
Litentry: new Litentry(),
|
|
9974
10584
|
Moonbeam: new Moonbeam(),
|
|
@@ -9991,7 +10601,6 @@ var nodes = {
|
|
|
9991
10601
|
Karura: new Karura(),
|
|
9992
10602
|
Kintsugi: new Kintsugi(),
|
|
9993
10603
|
Litmus: new Litmus(),
|
|
9994
|
-
Mangata: new Mangata(),
|
|
9995
10604
|
Moonriver: new Moonriver(),
|
|
9996
10605
|
ParallelHeiko: new ParallelHeiko(),
|
|
9997
10606
|
Picasso: new Picasso(),
|
|
@@ -10010,7 +10619,10 @@ var nodes = {
|
|
|
10010
10619
|
Phala: new Phala(),
|
|
10011
10620
|
Subsocial: new Subsocial(),
|
|
10012
10621
|
KiltSpiritnet: new KiltSpiritnet(),
|
|
10013
|
-
Curio: new Curio()
|
|
10622
|
+
Curio: new Curio(),
|
|
10623
|
+
Ethereum: new Ethereum(),
|
|
10624
|
+
Mythos: new Mythos(),
|
|
10625
|
+
Peaq: new Peaq()
|
|
10014
10626
|
};
|
|
10015
10627
|
var SUPPORTED_PALLETS = ['XTokens', 'OrmlXTokens', 'PolkadotXcm', 'RelayerXcm', 'XTransfer'];
|
|
10016
10628
|
|
|
@@ -10033,7 +10645,7 @@ var generateAddressMultiLocationV4 = function generateAddressMultiLocationV4(api
|
|
|
10033
10645
|
if (isMultiLocation) {
|
|
10034
10646
|
return _defineProperty({}, Version.V4, address);
|
|
10035
10647
|
}
|
|
10036
|
-
var isEthAddress = ethers.
|
|
10648
|
+
var isEthAddress = ethers.isAddress(address);
|
|
10037
10649
|
return _defineProperty({}, Version.V4, {
|
|
10038
10650
|
parents: Parents.ZERO,
|
|
10039
10651
|
interior: {
|
|
@@ -10050,24 +10662,32 @@ var generateAddressMultiLocationV4 = function generateAddressMultiLocationV4(api
|
|
|
10050
10662
|
}
|
|
10051
10663
|
});
|
|
10052
10664
|
};
|
|
10665
|
+
var createX1Payload = function createX1Payload(version, junction) {
|
|
10666
|
+
if (version === Version.V4) {
|
|
10667
|
+
return {
|
|
10668
|
+
X1: [junction]
|
|
10669
|
+
};
|
|
10670
|
+
}
|
|
10671
|
+
return {
|
|
10672
|
+
X1: junction
|
|
10673
|
+
};
|
|
10674
|
+
};
|
|
10053
10675
|
var generateAddressPayload = function generateAddressPayload(api, scenario, pallet, recipientAddress, version, nodeId) {
|
|
10054
10676
|
var isMultiLocation = _typeof(recipientAddress) === 'object';
|
|
10055
10677
|
if (isMultiLocation) {
|
|
10056
10678
|
return _defineProperty({}, version, recipientAddress);
|
|
10057
10679
|
}
|
|
10058
|
-
var isEthAddress = ethers.
|
|
10680
|
+
var isEthAddress = ethers.isAddress(recipientAddress);
|
|
10059
10681
|
if (scenario === 'ParaToRelay') {
|
|
10060
10682
|
return _defineProperty({}, version, {
|
|
10061
10683
|
parents: pallet === 'XTokens' ? Parents.ONE : Parents.ZERO,
|
|
10062
|
-
interior: {
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
}
|
|
10070
|
-
}
|
|
10684
|
+
interior: createX1Payload(version, {
|
|
10685
|
+
AccountId32: Object.assign(Object.assign({}, version === Version.V1 && {
|
|
10686
|
+
network: 'any'
|
|
10687
|
+
}), {
|
|
10688
|
+
id: createAccID(api, recipientAddress)
|
|
10689
|
+
})
|
|
10690
|
+
})
|
|
10071
10691
|
});
|
|
10072
10692
|
}
|
|
10073
10693
|
if (scenario === 'ParaToPara' && pallet === 'XTokens') {
|
|
@@ -10095,36 +10715,32 @@ var generateAddressPayload = function generateAddressPayload(api, scenario, pall
|
|
|
10095
10715
|
if (scenario === 'ParaToPara' && pallet === 'PolkadotXcm') {
|
|
10096
10716
|
return _defineProperty({}, version, {
|
|
10097
10717
|
parents: Parents.ZERO,
|
|
10098
|
-
interior: {
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
}), {
|
|
10103
|
-
key: recipientAddress
|
|
10104
|
-
})
|
|
10105
|
-
} : {
|
|
10106
|
-
AccountId32: Object.assign(Object.assign({}, version === Version.V1 && {
|
|
10107
|
-
network: 'any'
|
|
10108
|
-
}), {
|
|
10109
|
-
id: createAccID(api, recipientAddress)
|
|
10110
|
-
})
|
|
10111
|
-
}
|
|
10112
|
-
}
|
|
10113
|
-
});
|
|
10114
|
-
}
|
|
10115
|
-
return _defineProperty({}, Version.V3, {
|
|
10116
|
-
parents: Parents.ZERO,
|
|
10117
|
-
interior: {
|
|
10118
|
-
X1: isEthAddress ? {
|
|
10119
|
-
AccountKey20: {
|
|
10718
|
+
interior: createX1Payload(version, isEthAddress ? {
|
|
10719
|
+
AccountKey20: Object.assign(Object.assign({}, version === Version.V1 && {
|
|
10720
|
+
network: 'any'
|
|
10721
|
+
}), {
|
|
10120
10722
|
key: recipientAddress
|
|
10121
|
-
}
|
|
10723
|
+
})
|
|
10122
10724
|
} : {
|
|
10123
|
-
AccountId32: {
|
|
10725
|
+
AccountId32: Object.assign(Object.assign({}, version === Version.V1 && {
|
|
10726
|
+
network: 'any'
|
|
10727
|
+
}), {
|
|
10124
10728
|
id: createAccID(api, recipientAddress)
|
|
10125
|
-
}
|
|
10729
|
+
})
|
|
10730
|
+
})
|
|
10731
|
+
});
|
|
10732
|
+
}
|
|
10733
|
+
return _defineProperty({}, version, {
|
|
10734
|
+
parents: Parents.ZERO,
|
|
10735
|
+
interior: createX1Payload(version, isEthAddress ? {
|
|
10736
|
+
AccountKey20: {
|
|
10737
|
+
key: recipientAddress
|
|
10126
10738
|
}
|
|
10127
|
-
}
|
|
10739
|
+
} : {
|
|
10740
|
+
AccountId32: {
|
|
10741
|
+
id: createAccID(api, recipientAddress)
|
|
10742
|
+
}
|
|
10743
|
+
})
|
|
10128
10744
|
});
|
|
10129
10745
|
};
|
|
10130
10746
|
var getNode = function getNode(node) {
|
|
@@ -10148,7 +10764,7 @@ var getAllNodeProviders = function getAllNodeProviders(node) {
|
|
|
10148
10764
|
var _a;
|
|
10149
10765
|
var _ref9 = (_a = getNodeEndpointOption(node)) !== null && _a !== void 0 ? _a : {},
|
|
10150
10766
|
providers = _ref9.providers;
|
|
10151
|
-
if (providers.length < 1) {
|
|
10767
|
+
if (providers && Object.values(providers).length < 1) {
|
|
10152
10768
|
throw new Error("Node ".concat(node, " does not have any providers."));
|
|
10153
10769
|
}
|
|
10154
10770
|
return Object.values(providers !== null && providers !== void 0 ? providers : []);
|
|
@@ -10187,7 +10803,7 @@ var createApiInstanceForNode = function createApiInstanceForNode(node) {
|
|
|
10187
10803
|
break;
|
|
10188
10804
|
}
|
|
10189
10805
|
endpointOption = node === 'Polkadot' ? prodRelayPolkadot : prodRelayKusama;
|
|
10190
|
-
wsUrl = Object.values(endpointOption.providers)[
|
|
10806
|
+
wsUrl = Object.values(endpointOption.providers)[0];
|
|
10191
10807
|
_context2.next = 5;
|
|
10192
10808
|
return createApiInstance(wsUrl);
|
|
10193
10809
|
case 5:
|
|
@@ -10207,7 +10823,8 @@ var createApiInstanceForNode = function createApiInstanceForNode(node) {
|
|
|
10207
10823
|
var lowercaseFirstLetter = function lowercaseFirstLetter(str) {
|
|
10208
10824
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
10209
10825
|
};
|
|
10210
|
-
var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api, _ref10
|
|
10826
|
+
var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api, _ref10 // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
10827
|
+
) {
|
|
10211
10828
|
var _api$tx$module;
|
|
10212
10829
|
var module = _ref10.module,
|
|
10213
10830
|
section = _ref10.section,
|
|
@@ -10286,115 +10903,117 @@ var createTx = function createTx(originApi, destApi, address, amount, currencySy
|
|
|
10286
10903
|
}, _callee);
|
|
10287
10904
|
}));
|
|
10288
10905
|
};
|
|
10289
|
-
var checkKeepAlive = function checkKeepAlive(
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10906
|
+
var checkKeepAlive = function checkKeepAlive(_a) {
|
|
10907
|
+
return __awaiter(void 0, [_a], void 0, function (_ref) {
|
|
10908
|
+
var originApi = _ref.originApi,
|
|
10909
|
+
address = _ref.address,
|
|
10910
|
+
amount = _ref.amount,
|
|
10911
|
+
originNode = _ref.originNode,
|
|
10912
|
+
destApi = _ref.destApi,
|
|
10913
|
+
currencySymbol = _ref.currencySymbol,
|
|
10914
|
+
destNode = _ref.destNode;
|
|
10915
|
+
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
10916
|
+
var _yield$destApi$query$, data, balance, _yield$originApi$quer, originData, balanceOrigin, amountBN, ed, edOrigin, tx, xcmFee, amountBNWithoutFee, amountOriginBNWithoutFee;
|
|
10917
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10918
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
10919
|
+
case 0:
|
|
10920
|
+
if (!(destApi === undefined)) {
|
|
10921
|
+
_context2.next = 2;
|
|
10922
|
+
break;
|
|
10923
|
+
}
|
|
10924
|
+
return _context2.abrupt("return");
|
|
10925
|
+
case 2:
|
|
10926
|
+
if (!(currencySymbol === undefined)) {
|
|
10927
|
+
_context2.next = 4;
|
|
10928
|
+
break;
|
|
10929
|
+
}
|
|
10930
|
+
throw new KeepAliveError('Currency symbol not found for this asset. Cannot check keep alive.');
|
|
10931
|
+
case 4:
|
|
10932
|
+
if (!(originNode !== undefined && destNode !== undefined && currencySymbol !== getAssetsObject(destNode).nativeAssetSymbol)) {
|
|
10933
|
+
_context2.next = 6;
|
|
10934
|
+
break;
|
|
10935
|
+
}
|
|
10936
|
+
throw new KeepAliveError('Keep alive check is only supported when sending native asset of destination parachain.');
|
|
10937
|
+
case 6:
|
|
10938
|
+
_context2.next = 8;
|
|
10939
|
+
return destApi.query.system.account(address);
|
|
10940
|
+
case 8:
|
|
10941
|
+
_yield$destApi$query$ = _context2.sent;
|
|
10942
|
+
data = _yield$destApi$query$.data;
|
|
10943
|
+
balance = data.free.toBn();
|
|
10944
|
+
_context2.next = 13;
|
|
10945
|
+
return originApi.query.system.account(address);
|
|
10946
|
+
case 13:
|
|
10947
|
+
_yield$originApi$quer = _context2.sent;
|
|
10948
|
+
originData = _yield$originApi$quer.data;
|
|
10949
|
+
balanceOrigin = originData.free.toBn();
|
|
10950
|
+
amountBN = new BN(amount);
|
|
10951
|
+
ed = getExistentialDeposit(destNode !== null && destNode !== void 0 ? destNode : determineRelayChain(originNode));
|
|
10952
|
+
edOrigin = getExistentialDeposit(originNode !== null && originNode !== void 0 ? originNode : determineRelayChain(destNode));
|
|
10953
|
+
_context2.next = 21;
|
|
10954
|
+
return createTx(originApi, destApi, address, amount, currencySymbol, originNode, destNode);
|
|
10955
|
+
case 21:
|
|
10956
|
+
tx = _context2.sent;
|
|
10957
|
+
if (!(tx === null)) {
|
|
10958
|
+
_context2.next = 24;
|
|
10959
|
+
break;
|
|
10960
|
+
}
|
|
10961
|
+
throw new KeepAliveError('Transaction for XCM fee calculation could not be created.');
|
|
10962
|
+
case 24:
|
|
10963
|
+
_context2.next = 26;
|
|
10964
|
+
return calculateTransactionFee$1(tx, address);
|
|
10965
|
+
case 26:
|
|
10966
|
+
xcmFee = _context2.sent;
|
|
10967
|
+
if (!(ed === null)) {
|
|
10968
|
+
_context2.next = 29;
|
|
10969
|
+
break;
|
|
10970
|
+
}
|
|
10971
|
+
throw new KeepAliveError('Existential deposit not found for destination parachain.');
|
|
10972
|
+
case 29:
|
|
10973
|
+
if (!(edOrigin === null)) {
|
|
10974
|
+
_context2.next = 31;
|
|
10975
|
+
break;
|
|
10976
|
+
}
|
|
10977
|
+
throw new KeepAliveError('Existential deposit not found for origin parachain.');
|
|
10978
|
+
case 31:
|
|
10979
|
+
console.log('XCM FEE: ', xcmFee.toString());
|
|
10980
|
+
console.log('EXISTENTIAL DEPOSIT: ', ed.toString());
|
|
10981
|
+
console.log('EXISTENTIAL DEPOSIT ORIGIN: ', edOrigin.toString());
|
|
10982
|
+
console.log('BALANCE: ', balance.toString());
|
|
10983
|
+
console.log('ORIGIN BALANCE: ', balanceOrigin.toString());
|
|
10984
|
+
console.log('AMOUNT: ', amountBN.toString());
|
|
10985
|
+
console.log('AMOUNT WITHOUT FEE: ', amountBN.sub(xcmFee.mul(new BN(1.5))).toString());
|
|
10986
|
+
console.log('BALANCE + AMOUNT WITHOUT FEE: ', balance.add(amountBN.sub(xcmFee.mul(new BN(1.5)))).toString());
|
|
10987
|
+
console.log('ORIGIN BALANCE - AMOUNT WITH FEE: ', balanceOrigin.sub(amountBN.sub(xcmFee.mul(new BN(1.5)))).toString());
|
|
10988
|
+
amountBNWithoutFee = amountBN.sub(xcmFee.mul(new BN(1.5)));
|
|
10989
|
+
if (!balance.add(amountBNWithoutFee).lt(new BN(ed))) {
|
|
10990
|
+
_context2.next = 43;
|
|
10991
|
+
break;
|
|
10992
|
+
}
|
|
10993
|
+
throw new KeepAliveError("Keep alive check failed: Sending ".concat(amount, " ").concat(currencySymbol, " to ").concat(destNode, " would result in an account balance below the required existential deposit.\n Please increase the amount to meet the minimum balance requirement of the destination chain."));
|
|
10994
|
+
case 43:
|
|
10995
|
+
amountOriginBNWithoutFee = amountBN.sub(xcmFee.mul(new BN(1.5)));
|
|
10996
|
+
if (!((currencySymbol === 'DOT' || currencySymbol === 'KSM') && balanceOrigin.sub(amountOriginBNWithoutFee).lt(new BN(edOrigin)))) {
|
|
10997
|
+
_context2.next = 46;
|
|
10998
|
+
break;
|
|
10999
|
+
}
|
|
11000
|
+
throw new KeepAliveError("Keep alive check failed: Sending ".concat(amount, " ").concat(currencySymbol, " to ").concat(destNode, " would result in an account balance below the required existential deposit on origin.\n Please decrease the amount to meet the minimum balance requirement of the origin chain."));
|
|
11001
|
+
case 46:
|
|
11002
|
+
case "end":
|
|
11003
|
+
return _context2.stop();
|
|
11004
|
+
}
|
|
11005
|
+
}, _callee2);
|
|
11006
|
+
})();
|
|
11007
|
+
});
|
|
10389
11008
|
};
|
|
10390
11009
|
|
|
10391
11010
|
var sendCommon = function sendCommon(options) {
|
|
10392
11011
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10393
|
-
var _a, api, origin, currency, amount, address, destination, paraIdTo, destApiForKeepAlive, feeAsset, _options$serializedAp, serializedApiCallEnabled, asset, isMultiLocationDestination, isMultiLocationCurrency, originRelayChainSymbol, destinationRelayChainSymbol, supportsBridge, originNode, assetCheckEnabled, apiWithFallback, amountStr, currencyStr, currencyId;
|
|
11012
|
+
var _a, api, origin, currency, amount, address, destination, paraIdTo, destApiForKeepAlive, feeAsset, version, _options$serializedAp, serializedApiCallEnabled, asset, isMultiLocationDestination, isMultiLocationCurrency, originRelayChainSymbol, destinationRelayChainSymbol, supportsBridge, originNode, assetCheckEnabled, apiWithFallback, amountStr, currencyStr, currencyId;
|
|
10394
11013
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10395
11014
|
while (1) switch (_context.prev = _context.next) {
|
|
10396
11015
|
case 0:
|
|
10397
|
-
api = options.api, origin = options.origin, currency = options.currency, amount = options.amount, address = options.address, destination = options.destination, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, feeAsset = options.feeAsset, _options$serializedAp = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
11016
|
+
api = options.api, origin = options.origin, currency = options.currency, amount = options.amount, address = options.address, destination = options.destination, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, feeAsset = options.feeAsset, version = options.version, _options$serializedAp = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
10398
11017
|
if (!((!isTMulti(currency) || isTMultiLocation(currency)) && amount === null)) {
|
|
10399
11018
|
_context.next = 3;
|
|
10400
11019
|
break;
|
|
@@ -10494,7 +11113,7 @@ var sendCommon = function sendCommon(options) {
|
|
|
10494
11113
|
break;
|
|
10495
11114
|
}
|
|
10496
11115
|
console.warn('Keep alive check is not supported when using MultiLocation as currency.');
|
|
10497
|
-
_context.next =
|
|
11116
|
+
_context.next = 59;
|
|
10498
11117
|
break;
|
|
10499
11118
|
case 45:
|
|
10500
11119
|
if (!(_typeof(address) === 'object')) {
|
|
@@ -10502,7 +11121,7 @@ var sendCommon = function sendCommon(options) {
|
|
|
10502
11121
|
break;
|
|
10503
11122
|
}
|
|
10504
11123
|
console.warn('Keep alive check is not supported when using MultiLocation as address.');
|
|
10505
|
-
_context.next =
|
|
11124
|
+
_context.next = 59;
|
|
10506
11125
|
break;
|
|
10507
11126
|
case 49:
|
|
10508
11127
|
if (!(_typeof(destination) === 'object')) {
|
|
@@ -10510,10 +11129,18 @@ var sendCommon = function sendCommon(options) {
|
|
|
10510
11129
|
break;
|
|
10511
11130
|
}
|
|
10512
11131
|
console.warn('Keep alive check is not supported when using MultiLocation as destination.');
|
|
10513
|
-
_context.next =
|
|
11132
|
+
_context.next = 59;
|
|
10514
11133
|
break;
|
|
10515
11134
|
case 53:
|
|
10516
|
-
|
|
11135
|
+
if (!(origin === 'Ethereum' || destination === 'Ethereum')) {
|
|
11136
|
+
_context.next = 57;
|
|
11137
|
+
break;
|
|
11138
|
+
}
|
|
11139
|
+
console.warn('Keep alive check is not supported when using Ethereum as origin or destination.');
|
|
11140
|
+
_context.next = 59;
|
|
11141
|
+
break;
|
|
11142
|
+
case 57:
|
|
11143
|
+
_context.next = 59;
|
|
10517
11144
|
return checkKeepAlive({
|
|
10518
11145
|
originApi: apiWithFallback,
|
|
10519
11146
|
address: address,
|
|
@@ -10523,7 +11150,7 @@ var sendCommon = function sendCommon(options) {
|
|
|
10523
11150
|
currencySymbol: (_a = asset === null || asset === void 0 ? void 0 : asset.symbol) !== null && _a !== void 0 ? _a : currency.toString(),
|
|
10524
11151
|
destNode: destination
|
|
10525
11152
|
});
|
|
10526
|
-
case
|
|
11153
|
+
case 59:
|
|
10527
11154
|
currencyStr = isTMulti(currency) ? undefined : currency.toString();
|
|
10528
11155
|
currencyId = assetCheckEnabled ? asset === null || asset === void 0 ? void 0 : asset.assetId : currencyStr;
|
|
10529
11156
|
return _context.abrupt("return", originNode.transfer({
|
|
@@ -10536,9 +11163,10 @@ var sendCommon = function sendCommon(options) {
|
|
|
10536
11163
|
paraIdTo: paraIdTo,
|
|
10537
11164
|
overridedCurrencyMultiLocation: isTMulti(currency) ? currency : undefined,
|
|
10538
11165
|
feeAsset: feeAsset,
|
|
11166
|
+
version: version,
|
|
10539
11167
|
serializedApiCallEnabled: serializedApiCallEnabled
|
|
10540
11168
|
}));
|
|
10541
|
-
case
|
|
11169
|
+
case 62:
|
|
10542
11170
|
case "end":
|
|
10543
11171
|
return _context.stop();
|
|
10544
11172
|
}
|
|
@@ -10581,11 +11209,11 @@ var send = function send(options) {
|
|
|
10581
11209
|
};
|
|
10582
11210
|
var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
10583
11211
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
10584
|
-
var api, destination, amount, address, paraIdTo, destApiForKeepAlive, _options$serializedAp2, serializedApiCallEnabled, isMultiLocationDestination, isAddressMultiLocation, apiWithFallback, amountStr, serializedApiCall;
|
|
11212
|
+
var api, destination, amount, address, paraIdTo, destApiForKeepAlive, version, _options$serializedAp2, serializedApiCallEnabled, isMultiLocationDestination, isAddressMultiLocation, apiWithFallback, amountStr, serializedApiCall;
|
|
10585
11213
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
10586
11214
|
while (1) switch (_context4.prev = _context4.next) {
|
|
10587
11215
|
case 0:
|
|
10588
|
-
api = options.api, destination = options.destination, amount = options.amount, address = options.address, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, _options$serializedAp2 = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp2 === void 0 ? false : _options$serializedAp2;
|
|
11216
|
+
api = options.api, destination = options.destination, amount = options.amount, address = options.address, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, version = options.version, _options$serializedAp2 = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp2 === void 0 ? false : _options$serializedAp2;
|
|
10589
11217
|
isMultiLocationDestination = _typeof(destination) === 'object';
|
|
10590
11218
|
isAddressMultiLocation = _typeof(address) === 'object';
|
|
10591
11219
|
if (!(api === undefined && isMultiLocationDestination)) {
|
|
@@ -10614,7 +11242,7 @@ var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
|
10614
11242
|
break;
|
|
10615
11243
|
}
|
|
10616
11244
|
console.warn('Keep alive check is not supported when using MultiLocation as destination.');
|
|
10617
|
-
_context4.next =
|
|
11245
|
+
_context4.next = 28;
|
|
10618
11246
|
break;
|
|
10619
11247
|
case 18:
|
|
10620
11248
|
if (!isAddressMultiLocation) {
|
|
@@ -10622,10 +11250,18 @@ var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
|
10622
11250
|
break;
|
|
10623
11251
|
}
|
|
10624
11252
|
console.warn('Keep alive check is not supported when using MultiLocation as address.');
|
|
10625
|
-
_context4.next =
|
|
11253
|
+
_context4.next = 28;
|
|
10626
11254
|
break;
|
|
10627
11255
|
case 22:
|
|
10628
|
-
|
|
11256
|
+
if (!(destination === 'Ethereum')) {
|
|
11257
|
+
_context4.next = 26;
|
|
11258
|
+
break;
|
|
11259
|
+
}
|
|
11260
|
+
console.warn('Keep alive check is not supported when using Ethereum as destination.');
|
|
11261
|
+
_context4.next = 28;
|
|
11262
|
+
break;
|
|
11263
|
+
case 26:
|
|
11264
|
+
_context4.next = 28;
|
|
10629
11265
|
return checkKeepAlive({
|
|
10630
11266
|
originApi: apiWithFallback,
|
|
10631
11267
|
address: address,
|
|
@@ -10634,23 +11270,24 @@ var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
|
10634
11270
|
currencySymbol: getRelayChainSymbol(destination),
|
|
10635
11271
|
destNode: destination
|
|
10636
11272
|
});
|
|
10637
|
-
case
|
|
11273
|
+
case 28:
|
|
10638
11274
|
serializedApiCall = getNode(isMultiLocationDestination ? resolveTNodeFromMultiLocation(destination) : destination).transferRelayToPara({
|
|
10639
11275
|
api: apiWithFallback,
|
|
10640
11276
|
destination: destination,
|
|
10641
11277
|
address: address,
|
|
10642
11278
|
amount: amountStr,
|
|
10643
11279
|
paraIdTo: paraIdTo,
|
|
10644
|
-
destApiForKeepAlive: destApiForKeepAlive
|
|
11280
|
+
destApiForKeepAlive: destApiForKeepAlive,
|
|
11281
|
+
version: version
|
|
10645
11282
|
});
|
|
10646
11283
|
if (!serializedApiCallEnabled) {
|
|
10647
|
-
_context4.next =
|
|
11284
|
+
_context4.next = 31;
|
|
10648
11285
|
break;
|
|
10649
11286
|
}
|
|
10650
11287
|
return _context4.abrupt("return", serializedApiCall);
|
|
10651
|
-
case
|
|
11288
|
+
case 31:
|
|
10652
11289
|
return _context4.abrupt("return", callPolkadotJsTxFunction(apiWithFallback, serializedApiCall));
|
|
10653
|
-
case
|
|
11290
|
+
case 32:
|
|
10654
11291
|
case "end":
|
|
10655
11292
|
return _context4.stop();
|
|
10656
11293
|
}
|
|
@@ -10701,4 +11338,4 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
10701
11338
|
transferRelayToParaSerializedApiCall: transferRelayToParaSerializedApiCall
|
|
10702
11339
|
});
|
|
10703
11340
|
|
|
10704
|
-
export { Builder, IncompatibleNodesError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, Parents, SUPPORTED_PALLETS, ScenarioNotSupportedError, Version, index$1 as assets, index$3 as closeChannels, createApiInstanceForNode, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, index$2 as openChannels, index as xcmPallet };
|
|
11341
|
+
export { Builder, CloseChannelBuilder, EvmBuilder, IncompatibleNodesError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, NoXCMSupportImplementedError, NodeNotSupportedError, OpenChannelBuilder, Parents, SUPPORTED_PALLETS, ScenarioNotSupportedError, Version, index$1 as assets, index$3 as closeChannels, createApiInstanceForNode, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, index$2 as openChannels, index as xcmPallet };
|