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