@paraspell/assets 11.12.2 → 11.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +601 -242
- package/dist/index.d.ts +2 -5
- package/dist/index.mjs +602 -243
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Version, deepEqual, replaceBigInt, CHAINS } from '@paraspell/sdk-common';
|
|
1
|
+
import { Version, deepEqual, replaceBigInt, isSubstrateBridge, CHAINS } from '@paraspell/sdk-common';
|
|
2
2
|
|
|
3
3
|
function _arrayLikeToArray(r, a) {
|
|
4
4
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -4259,10 +4259,13 @@ var Hydration = {
|
|
|
4259
4259
|
location: {
|
|
4260
4260
|
parents: 1,
|
|
4261
4261
|
interior: {
|
|
4262
|
-
|
|
4262
|
+
X3: [
|
|
4263
4263
|
{
|
|
4264
4264
|
Parachain: 2004
|
|
4265
4265
|
},
|
|
4266
|
+
{
|
|
4267
|
+
PalletInstance: 110
|
|
4268
|
+
},
|
|
4266
4269
|
{
|
|
4267
4270
|
AccountKey20: {
|
|
4268
4271
|
network: null,
|
|
@@ -7788,29 +7791,6 @@ var AssetHubPolkadot = {
|
|
|
7788
7791
|
},
|
|
7789
7792
|
existentialDeposit: "1000000"
|
|
7790
7793
|
},
|
|
7791
|
-
{
|
|
7792
|
-
assetId: "22222037",
|
|
7793
|
-
symbol: "KSM",
|
|
7794
|
-
decimals: 12,
|
|
7795
|
-
location: {
|
|
7796
|
-
parents: 1,
|
|
7797
|
-
interior: {
|
|
7798
|
-
X3: [
|
|
7799
|
-
{
|
|
7800
|
-
Parachain: 1000
|
|
7801
|
-
},
|
|
7802
|
-
{
|
|
7803
|
-
PalletInstance: 50
|
|
7804
|
-
},
|
|
7805
|
-
{
|
|
7806
|
-
GeneralIndex: 22222037
|
|
7807
|
-
}
|
|
7808
|
-
]
|
|
7809
|
-
}
|
|
7810
|
-
},
|
|
7811
|
-
existentialDeposit: "1000000000000",
|
|
7812
|
-
alias: "KSM1"
|
|
7813
|
-
},
|
|
7814
7794
|
{
|
|
7815
7795
|
assetId: "201",
|
|
7816
7796
|
symbol: "WUD",
|
|
@@ -8306,8 +8286,7 @@ var AssetHubPolkadot = {
|
|
|
8306
8286
|
}
|
|
8307
8287
|
},
|
|
8308
8288
|
existentialDeposit: "1000000000",
|
|
8309
|
-
isFeeAsset: true
|
|
8310
|
-
alias: "KSM2"
|
|
8289
|
+
isFeeAsset: true
|
|
8311
8290
|
},
|
|
8312
8291
|
{
|
|
8313
8292
|
symbol: "sUSDS",
|
|
@@ -11871,8 +11850,8 @@ var Quartz = {
|
|
|
11871
11850
|
nativeAssetSymbol: "QTZ",
|
|
11872
11851
|
isEVM: false,
|
|
11873
11852
|
ss58Prefix: 255,
|
|
11874
|
-
supportsDryRunApi:
|
|
11875
|
-
supportsXcmPaymentApi:
|
|
11853
|
+
supportsDryRunApi: true,
|
|
11854
|
+
supportsXcmPaymentApi: true,
|
|
11876
11855
|
nativeAssets: [
|
|
11877
11856
|
{
|
|
11878
11857
|
symbol: "QTZ",
|
|
@@ -12715,29 +12694,6 @@ var AssetHubKusama = {
|
|
|
12715
12694
|
},
|
|
12716
12695
|
existentialDeposit: "10000000000"
|
|
12717
12696
|
},
|
|
12718
|
-
{
|
|
12719
|
-
assetId: "14",
|
|
12720
|
-
symbol: "DOT",
|
|
12721
|
-
decimals: 10,
|
|
12722
|
-
location: {
|
|
12723
|
-
parents: 1,
|
|
12724
|
-
interior: {
|
|
12725
|
-
X3: [
|
|
12726
|
-
{
|
|
12727
|
-
Parachain: 1000
|
|
12728
|
-
},
|
|
12729
|
-
{
|
|
12730
|
-
PalletInstance: 50
|
|
12731
|
-
},
|
|
12732
|
-
{
|
|
12733
|
-
GeneralIndex: 14
|
|
12734
|
-
}
|
|
12735
|
-
]
|
|
12736
|
-
}
|
|
12737
|
-
},
|
|
12738
|
-
existentialDeposit: "100000000",
|
|
12739
|
-
alias: "DOT1"
|
|
12740
|
-
},
|
|
12741
12697
|
{
|
|
12742
12698
|
assetId: "360",
|
|
12743
12699
|
symbol: "uni",
|
|
@@ -13500,8 +13456,7 @@ var AssetHubKusama = {
|
|
|
13500
13456
|
}
|
|
13501
13457
|
},
|
|
13502
13458
|
existentialDeposit: "10000000",
|
|
13503
|
-
isFeeAsset: true
|
|
13504
|
-
alias: "DOT2"
|
|
13459
|
+
isFeeAsset: true
|
|
13505
13460
|
},
|
|
13506
13461
|
{
|
|
13507
13462
|
symbol: "vKSM",
|
|
@@ -18259,22 +18214,20 @@ var BifrostPaseo = {
|
|
|
18259
18214
|
supportsXcmPaymentApi: true,
|
|
18260
18215
|
nativeAssets: [
|
|
18261
18216
|
{
|
|
18262
|
-
symbol: "
|
|
18263
|
-
|
|
18264
|
-
existentialDeposit: "10000000",
|
|
18265
|
-
isNative: true
|
|
18266
|
-
},
|
|
18267
|
-
{
|
|
18268
|
-
symbol: "DOT",
|
|
18269
|
-
decimals: 10,
|
|
18270
|
-
existentialDeposit: "100000000",
|
|
18271
|
-
isNative: true
|
|
18272
|
-
},
|
|
18273
|
-
{
|
|
18274
|
-
symbol: "vBNC",
|
|
18217
|
+
symbol: "BNC",
|
|
18218
|
+
isNative: true,
|
|
18275
18219
|
decimals: 12,
|
|
18276
18220
|
existentialDeposit: "10000000000",
|
|
18277
|
-
|
|
18221
|
+
location: {
|
|
18222
|
+
parents: 1,
|
|
18223
|
+
interior: {
|
|
18224
|
+
X1: [
|
|
18225
|
+
{
|
|
18226
|
+
Parachain: 2030
|
|
18227
|
+
}
|
|
18228
|
+
]
|
|
18229
|
+
}
|
|
18230
|
+
}
|
|
18278
18231
|
}
|
|
18279
18232
|
],
|
|
18280
18233
|
otherAssets: [
|
|
@@ -18544,6 +18497,81 @@ var HydrationPaseo = {
|
|
|
18544
18497
|
},
|
|
18545
18498
|
isFeeAsset: true
|
|
18546
18499
|
},
|
|
18500
|
+
{
|
|
18501
|
+
assetId: "1113",
|
|
18502
|
+
symbol: "HUSDe",
|
|
18503
|
+
decimals: 18,
|
|
18504
|
+
existentialDeposit: "33000000000000000",
|
|
18505
|
+
location: {
|
|
18506
|
+
parents: 1,
|
|
18507
|
+
interior: {
|
|
18508
|
+
X2: [
|
|
18509
|
+
{
|
|
18510
|
+
Parachain: 2034
|
|
18511
|
+
},
|
|
18512
|
+
{
|
|
18513
|
+
AccountKey20: {
|
|
18514
|
+
network: null,
|
|
18515
|
+
key: "0x52e1311e26610e6662a1e5b5bd113130b6815213"
|
|
18516
|
+
}
|
|
18517
|
+
}
|
|
18518
|
+
]
|
|
18519
|
+
}
|
|
18520
|
+
},
|
|
18521
|
+
isFeeAsset: true
|
|
18522
|
+
},
|
|
18523
|
+
{
|
|
18524
|
+
assetId: "222",
|
|
18525
|
+
symbol: "HOLLAR",
|
|
18526
|
+
decimals: 18,
|
|
18527
|
+
existentialDeposit: "0",
|
|
18528
|
+
location: {
|
|
18529
|
+
parents: 1,
|
|
18530
|
+
interior: {
|
|
18531
|
+
X2: [
|
|
18532
|
+
{
|
|
18533
|
+
Parachain: 2034
|
|
18534
|
+
},
|
|
18535
|
+
{
|
|
18536
|
+
AccountKey20: {
|
|
18537
|
+
network: null,
|
|
18538
|
+
key: "0x531a654d1696ed52e7275a8cede955e82620f99a"
|
|
18539
|
+
}
|
|
18540
|
+
}
|
|
18541
|
+
]
|
|
18542
|
+
}
|
|
18543
|
+
},
|
|
18544
|
+
isFeeAsset: true
|
|
18545
|
+
},
|
|
18546
|
+
{
|
|
18547
|
+
assetId: "420",
|
|
18548
|
+
symbol: "GETH",
|
|
18549
|
+
decimals: 18,
|
|
18550
|
+
existentialDeposit: "8202803876747",
|
|
18551
|
+
location: {
|
|
18552
|
+
parents: 1,
|
|
18553
|
+
interior: {
|
|
18554
|
+
X2: [
|
|
18555
|
+
{
|
|
18556
|
+
Parachain: 2034
|
|
18557
|
+
},
|
|
18558
|
+
{
|
|
18559
|
+
AccountKey20: {
|
|
18560
|
+
network: null,
|
|
18561
|
+
key: "0x8a598fe3e3a471ce865332e330d303502a0e2f52"
|
|
18562
|
+
}
|
|
18563
|
+
}
|
|
18564
|
+
]
|
|
18565
|
+
}
|
|
18566
|
+
},
|
|
18567
|
+
isFeeAsset: true
|
|
18568
|
+
},
|
|
18569
|
+
{
|
|
18570
|
+
assetId: "110",
|
|
18571
|
+
symbol: "2-Pool-HUSDC",
|
|
18572
|
+
decimals: 18,
|
|
18573
|
+
existentialDeposit: "1000"
|
|
18574
|
+
},
|
|
18547
18575
|
{
|
|
18548
18576
|
assetId: "10",
|
|
18549
18577
|
symbol: "USDT",
|
|
@@ -18572,7 +18600,7 @@ var HydrationPaseo = {
|
|
|
18572
18600
|
assetId: "1001",
|
|
18573
18601
|
symbol: "aDOT",
|
|
18574
18602
|
decimals: 10,
|
|
18575
|
-
existentialDeposit: "
|
|
18603
|
+
existentialDeposit: "54125333",
|
|
18576
18604
|
location: {
|
|
18577
18605
|
parents: 1,
|
|
18578
18606
|
interior: {
|
|
@@ -18591,6 +18619,29 @@ var HydrationPaseo = {
|
|
|
18591
18619
|
},
|
|
18592
18620
|
isFeeAsset: true
|
|
18593
18621
|
},
|
|
18622
|
+
{
|
|
18623
|
+
assetId: "1111",
|
|
18624
|
+
symbol: "HUSDT",
|
|
18625
|
+
decimals: 18,
|
|
18626
|
+
existentialDeposit: "33000000000000000",
|
|
18627
|
+
location: {
|
|
18628
|
+
parents: 1,
|
|
18629
|
+
interior: {
|
|
18630
|
+
X2: [
|
|
18631
|
+
{
|
|
18632
|
+
Parachain: 2034
|
|
18633
|
+
},
|
|
18634
|
+
{
|
|
18635
|
+
AccountKey20: {
|
|
18636
|
+
network: null,
|
|
18637
|
+
key: "0x1806860d27ee903c1ec7586d4f7d598d7591f124"
|
|
18638
|
+
}
|
|
18639
|
+
}
|
|
18640
|
+
]
|
|
18641
|
+
}
|
|
18642
|
+
},
|
|
18643
|
+
isFeeAsset: true
|
|
18644
|
+
},
|
|
18594
18645
|
{
|
|
18595
18646
|
assetId: "4",
|
|
18596
18647
|
symbol: "WETH",
|
|
@@ -18726,6 +18777,33 @@ var HydrationPaseo = {
|
|
|
18726
18777
|
},
|
|
18727
18778
|
isFeeAsset: true
|
|
18728
18779
|
},
|
|
18780
|
+
{
|
|
18781
|
+
assetId: "39",
|
|
18782
|
+
symbol: "PAXG",
|
|
18783
|
+
decimals: 18,
|
|
18784
|
+
existentialDeposit: "2374169040836",
|
|
18785
|
+
location: {
|
|
18786
|
+
parents: 2,
|
|
18787
|
+
interior: {
|
|
18788
|
+
X2: [
|
|
18789
|
+
{
|
|
18790
|
+
GlobalConsensus: {
|
|
18791
|
+
Ethereum: {
|
|
18792
|
+
chainId: 1
|
|
18793
|
+
}
|
|
18794
|
+
}
|
|
18795
|
+
},
|
|
18796
|
+
{
|
|
18797
|
+
AccountKey20: {
|
|
18798
|
+
network: null,
|
|
18799
|
+
key: "0x45804880de22913dafe09f4980848ece6ecbaf78"
|
|
18800
|
+
}
|
|
18801
|
+
}
|
|
18802
|
+
]
|
|
18803
|
+
}
|
|
18804
|
+
},
|
|
18805
|
+
isFeeAsset: true
|
|
18806
|
+
},
|
|
18729
18807
|
{
|
|
18730
18808
|
assetId: "101",
|
|
18731
18809
|
symbol: "2-Pool",
|
|
@@ -18733,6 +18811,33 @@ var HydrationPaseo = {
|
|
|
18733
18811
|
existentialDeposit: "1000",
|
|
18734
18812
|
alias: "2-Pool1"
|
|
18735
18813
|
},
|
|
18814
|
+
{
|
|
18815
|
+
assetId: "38",
|
|
18816
|
+
symbol: "ENA",
|
|
18817
|
+
decimals: 18,
|
|
18818
|
+
existentialDeposit: "17337031900138700",
|
|
18819
|
+
location: {
|
|
18820
|
+
parents: 2,
|
|
18821
|
+
interior: {
|
|
18822
|
+
X2: [
|
|
18823
|
+
{
|
|
18824
|
+
GlobalConsensus: {
|
|
18825
|
+
Ethereum: {
|
|
18826
|
+
chainId: 1
|
|
18827
|
+
}
|
|
18828
|
+
}
|
|
18829
|
+
},
|
|
18830
|
+
{
|
|
18831
|
+
AccountKey20: {
|
|
18832
|
+
network: null,
|
|
18833
|
+
key: "0x57e114b691db790c35207b2e685d4a43181e6061"
|
|
18834
|
+
}
|
|
18835
|
+
}
|
|
18836
|
+
]
|
|
18837
|
+
}
|
|
18838
|
+
},
|
|
18839
|
+
isFeeAsset: true
|
|
18840
|
+
},
|
|
18736
18841
|
{
|
|
18737
18842
|
assetId: "34",
|
|
18738
18843
|
symbol: "ETH",
|
|
@@ -18798,22 +18903,22 @@ var HydrationPaseo = {
|
|
|
18798
18903
|
isFeeAsset: true
|
|
18799
18904
|
},
|
|
18800
18905
|
{
|
|
18801
|
-
assetId: "
|
|
18802
|
-
symbol: "
|
|
18803
|
-
decimals:
|
|
18804
|
-
existentialDeposit: "
|
|
18906
|
+
assetId: "1008",
|
|
18907
|
+
symbol: "a3-Pool",
|
|
18908
|
+
decimals: 18,
|
|
18909
|
+
existentialDeposit: "33000000000000000",
|
|
18805
18910
|
location: {
|
|
18806
18911
|
parents: 1,
|
|
18807
18912
|
interior: {
|
|
18808
|
-
|
|
18809
|
-
{
|
|
18810
|
-
Parachain: 1000
|
|
18811
|
-
},
|
|
18913
|
+
X2: [
|
|
18812
18914
|
{
|
|
18813
|
-
|
|
18915
|
+
Parachain: 2034
|
|
18814
18916
|
},
|
|
18815
18917
|
{
|
|
18816
|
-
|
|
18918
|
+
AccountKey20: {
|
|
18919
|
+
network: null,
|
|
18920
|
+
key: "0xc09cf2f85367f3c2ab66e094283de3a499cb9108"
|
|
18921
|
+
}
|
|
18817
18922
|
}
|
|
18818
18923
|
]
|
|
18819
18924
|
}
|
|
@@ -18821,8 +18926,66 @@ var HydrationPaseo = {
|
|
|
18821
18926
|
isFeeAsset: true
|
|
18822
18927
|
},
|
|
18823
18928
|
{
|
|
18824
|
-
assetId: "
|
|
18825
|
-
symbol: "
|
|
18929
|
+
assetId: "1000085",
|
|
18930
|
+
symbol: "WUD",
|
|
18931
|
+
decimals: 10,
|
|
18932
|
+
existentialDeposit: "200000000000000",
|
|
18933
|
+
location: {
|
|
18934
|
+
parents: 1,
|
|
18935
|
+
interior: {
|
|
18936
|
+
X3: [
|
|
18937
|
+
{
|
|
18938
|
+
Parachain: 1000
|
|
18939
|
+
},
|
|
18940
|
+
{
|
|
18941
|
+
PalletInstance: 50
|
|
18942
|
+
},
|
|
18943
|
+
{
|
|
18944
|
+
GeneralIndex: 31337
|
|
18945
|
+
}
|
|
18946
|
+
]
|
|
18947
|
+
}
|
|
18948
|
+
},
|
|
18949
|
+
isFeeAsset: true
|
|
18950
|
+
},
|
|
18951
|
+
{
|
|
18952
|
+
assetId: "103",
|
|
18953
|
+
symbol: "3-Pool",
|
|
18954
|
+
decimals: 18,
|
|
18955
|
+
existentialDeposit: "20000000000000000"
|
|
18956
|
+
},
|
|
18957
|
+
{
|
|
18958
|
+
assetId: "111",
|
|
18959
|
+
symbol: "2-Pool-HUSDT",
|
|
18960
|
+
decimals: 18,
|
|
18961
|
+
existentialDeposit: "1000"
|
|
18962
|
+
},
|
|
18963
|
+
{
|
|
18964
|
+
assetId: "1112",
|
|
18965
|
+
symbol: "HUSDS",
|
|
18966
|
+
decimals: 18,
|
|
18967
|
+
existentialDeposit: "33000000000000000",
|
|
18968
|
+
location: {
|
|
18969
|
+
parents: 1,
|
|
18970
|
+
interior: {
|
|
18971
|
+
X2: [
|
|
18972
|
+
{
|
|
18973
|
+
Parachain: 2034
|
|
18974
|
+
},
|
|
18975
|
+
{
|
|
18976
|
+
AccountKey20: {
|
|
18977
|
+
network: null,
|
|
18978
|
+
key: "0x7e3ce0257506c3e1f96a2a9b25a9440959b0d453"
|
|
18979
|
+
}
|
|
18980
|
+
}
|
|
18981
|
+
]
|
|
18982
|
+
}
|
|
18983
|
+
},
|
|
18984
|
+
isFeeAsset: true
|
|
18985
|
+
},
|
|
18986
|
+
{
|
|
18987
|
+
assetId: "1000099",
|
|
18988
|
+
symbol: "ACA",
|
|
18826
18989
|
decimals: 12,
|
|
18827
18990
|
existentialDeposit: "90744101633",
|
|
18828
18991
|
location: {
|
|
@@ -18894,6 +19057,29 @@ var HydrationPaseo = {
|
|
|
18894
19057
|
},
|
|
18895
19058
|
isFeeAsset: true
|
|
18896
19059
|
},
|
|
19060
|
+
{
|
|
19061
|
+
assetId: "1006",
|
|
19062
|
+
symbol: "atBTC",
|
|
19063
|
+
decimals: 18,
|
|
19064
|
+
existentialDeposit: "208779411374",
|
|
19065
|
+
location: {
|
|
19066
|
+
parents: 1,
|
|
19067
|
+
interior: {
|
|
19068
|
+
X2: [
|
|
19069
|
+
{
|
|
19070
|
+
Parachain: 2034
|
|
19071
|
+
},
|
|
19072
|
+
{
|
|
19073
|
+
AccountKey20: {
|
|
19074
|
+
network: null,
|
|
19075
|
+
key: "0x69003a65189f6ed993d3bd3e2b74f1db39f405ce"
|
|
19076
|
+
}
|
|
19077
|
+
}
|
|
19078
|
+
]
|
|
19079
|
+
}
|
|
19080
|
+
},
|
|
19081
|
+
isFeeAsset: true
|
|
19082
|
+
},
|
|
18897
19083
|
{
|
|
18898
19084
|
assetId: "6",
|
|
18899
19085
|
symbol: "APE",
|
|
@@ -18999,10 +19185,57 @@ var HydrationPaseo = {
|
|
|
18999
19185
|
isFeeAsset: true
|
|
19000
19186
|
},
|
|
19001
19187
|
{
|
|
19002
|
-
assetId: "
|
|
19003
|
-
symbol: "
|
|
19004
|
-
decimals:
|
|
19005
|
-
existentialDeposit: "
|
|
19188
|
+
assetId: "35",
|
|
19189
|
+
symbol: "TRAC",
|
|
19190
|
+
decimals: 18,
|
|
19191
|
+
existentialDeposit: "27777777777777800",
|
|
19192
|
+
location: {
|
|
19193
|
+
parents: 2,
|
|
19194
|
+
interior: {
|
|
19195
|
+
X2: [
|
|
19196
|
+
{
|
|
19197
|
+
GlobalConsensus: {
|
|
19198
|
+
Ethereum: {
|
|
19199
|
+
chainId: 1
|
|
19200
|
+
}
|
|
19201
|
+
}
|
|
19202
|
+
},
|
|
19203
|
+
{
|
|
19204
|
+
AccountKey20: {
|
|
19205
|
+
network: null,
|
|
19206
|
+
key: "0xaa7a9ca87d3694b5755f213b5d04094b8d0f0a6f"
|
|
19207
|
+
}
|
|
19208
|
+
}
|
|
19209
|
+
]
|
|
19210
|
+
}
|
|
19211
|
+
},
|
|
19212
|
+
isFeeAsset: true
|
|
19213
|
+
},
|
|
19214
|
+
{
|
|
19215
|
+
assetId: "4200",
|
|
19216
|
+
symbol: "2-Pool-GETH",
|
|
19217
|
+
decimals: 18,
|
|
19218
|
+
existentialDeposit: "1000"
|
|
19219
|
+
},
|
|
19220
|
+
{
|
|
19221
|
+
assetId: "36",
|
|
19222
|
+
symbol: "NEURO",
|
|
19223
|
+
decimals: 12,
|
|
19224
|
+
existentialDeposit: "588235294118",
|
|
19225
|
+
location: {
|
|
19226
|
+
parents: 1,
|
|
19227
|
+
interior: {
|
|
19228
|
+
X2: [
|
|
19229
|
+
{
|
|
19230
|
+
Parachain: 2043
|
|
19231
|
+
},
|
|
19232
|
+
{
|
|
19233
|
+
PalletInstance: 10
|
|
19234
|
+
}
|
|
19235
|
+
]
|
|
19236
|
+
}
|
|
19237
|
+
},
|
|
19238
|
+
isFeeAsset: true
|
|
19006
19239
|
},
|
|
19007
19240
|
{
|
|
19008
19241
|
assetId: "31",
|
|
@@ -19047,6 +19280,34 @@ var HydrationPaseo = {
|
|
|
19047
19280
|
},
|
|
19048
19281
|
isFeeAsset: true
|
|
19049
19282
|
},
|
|
19283
|
+
{
|
|
19284
|
+
assetId: "41",
|
|
19285
|
+
symbol: "CFG",
|
|
19286
|
+
decimals: 18,
|
|
19287
|
+
existentialDeposit: "36297640653357500",
|
|
19288
|
+
location: {
|
|
19289
|
+
parents: 2,
|
|
19290
|
+
interior: {
|
|
19291
|
+
X2: [
|
|
19292
|
+
{
|
|
19293
|
+
GlobalConsensus: {
|
|
19294
|
+
Ethereum: {
|
|
19295
|
+
chainId: 1
|
|
19296
|
+
}
|
|
19297
|
+
}
|
|
19298
|
+
},
|
|
19299
|
+
{
|
|
19300
|
+
AccountKey20: {
|
|
19301
|
+
network: null,
|
|
19302
|
+
key: "0xcccccccccc33d538dbc2ee4feab0a7a1ff4e8a94"
|
|
19303
|
+
}
|
|
19304
|
+
}
|
|
19305
|
+
]
|
|
19306
|
+
}
|
|
19307
|
+
},
|
|
19308
|
+
isFeeAsset: true,
|
|
19309
|
+
alias: "CFG2"
|
|
19310
|
+
},
|
|
19050
19311
|
{
|
|
19051
19312
|
assetId: "15",
|
|
19052
19313
|
symbol: "vDOT",
|
|
@@ -19097,6 +19358,29 @@ var HydrationPaseo = {
|
|
|
19097
19358
|
},
|
|
19098
19359
|
isFeeAsset: true
|
|
19099
19360
|
},
|
|
19361
|
+
{
|
|
19362
|
+
assetId: "40",
|
|
19363
|
+
symbol: "jitoSOL",
|
|
19364
|
+
decimals: 9,
|
|
19365
|
+
existentialDeposit: "2651",
|
|
19366
|
+
location: {
|
|
19367
|
+
parents: 1,
|
|
19368
|
+
interior: {
|
|
19369
|
+
X2: [
|
|
19370
|
+
{
|
|
19371
|
+
Parachain: 2004
|
|
19372
|
+
},
|
|
19373
|
+
{
|
|
19374
|
+
AccountKey20: {
|
|
19375
|
+
network: null,
|
|
19376
|
+
key: "0xe9f9a2e3deae4093c00fbc57b22bb51a4c05ad88"
|
|
19377
|
+
}
|
|
19378
|
+
}
|
|
19379
|
+
]
|
|
19380
|
+
}
|
|
19381
|
+
},
|
|
19382
|
+
isFeeAsset: true
|
|
19383
|
+
},
|
|
19100
19384
|
{
|
|
19101
19385
|
assetId: "2",
|
|
19102
19386
|
symbol: "DAI",
|
|
@@ -19142,13 +19426,14 @@ var HydrationPaseo = {
|
|
|
19142
19426
|
]
|
|
19143
19427
|
}
|
|
19144
19428
|
},
|
|
19145
|
-
isFeeAsset: true
|
|
19429
|
+
isFeeAsset: true,
|
|
19430
|
+
alias: "CFG1"
|
|
19146
19431
|
},
|
|
19147
19432
|
{
|
|
19148
19433
|
assetId: "1002",
|
|
19149
19434
|
symbol: "aUSDT",
|
|
19150
19435
|
decimals: 6,
|
|
19151
|
-
existentialDeposit: "
|
|
19436
|
+
existentialDeposit: "22409",
|
|
19152
19437
|
location: {
|
|
19153
19438
|
parents: 1,
|
|
19154
19439
|
interior: {
|
|
@@ -19261,6 +19546,12 @@ var HydrationPaseo = {
|
|
|
19261
19546
|
},
|
|
19262
19547
|
isFeeAsset: true
|
|
19263
19548
|
},
|
|
19549
|
+
{
|
|
19550
|
+
assetId: "104",
|
|
19551
|
+
symbol: "2-Pool-WETH",
|
|
19552
|
+
decimals: 18,
|
|
19553
|
+
existentialDeposit: "2583311805735"
|
|
19554
|
+
},
|
|
19264
19555
|
{
|
|
19265
19556
|
assetId: "29",
|
|
19266
19557
|
symbol: "PLMC",
|
|
@@ -19443,7 +19734,7 @@ var HydrationPaseo = {
|
|
|
19443
19734
|
assetId: "1003",
|
|
19444
19735
|
symbol: "aUSDC",
|
|
19445
19736
|
decimals: 6,
|
|
19446
|
-
existentialDeposit: "
|
|
19737
|
+
existentialDeposit: "22409",
|
|
19447
19738
|
location: {
|
|
19448
19739
|
parents: 1,
|
|
19449
19740
|
interior: {
|
|
@@ -19490,6 +19781,12 @@ var HydrationPaseo = {
|
|
|
19490
19781
|
isFeeAsset: true,
|
|
19491
19782
|
alias: "WBTC1"
|
|
19492
19783
|
},
|
|
19784
|
+
{
|
|
19785
|
+
assetId: "690",
|
|
19786
|
+
symbol: "2-Pool-GDOT",
|
|
19787
|
+
decimals: 18,
|
|
19788
|
+
existentialDeposit: "1"
|
|
19789
|
+
},
|
|
19493
19790
|
{
|
|
19494
19791
|
assetId: "22",
|
|
19495
19792
|
symbol: "USDC",
|
|
@@ -19514,11 +19811,17 @@ var HydrationPaseo = {
|
|
|
19514
19811
|
isFeeAsset: true,
|
|
19515
19812
|
alias: "USDC3"
|
|
19516
19813
|
},
|
|
19814
|
+
{
|
|
19815
|
+
assetId: "112",
|
|
19816
|
+
symbol: "2-Pool-HUSDS",
|
|
19817
|
+
decimals: 18,
|
|
19818
|
+
existentialDeposit: "1000"
|
|
19819
|
+
},
|
|
19517
19820
|
{
|
|
19518
19821
|
assetId: "1005",
|
|
19519
19822
|
symbol: "avDOT",
|
|
19520
19823
|
decimals: 10,
|
|
19521
|
-
existentialDeposit: "
|
|
19824
|
+
existentialDeposit: "36627790",
|
|
19522
19825
|
location: {
|
|
19523
19826
|
parents: 1,
|
|
19524
19827
|
interior: {
|
|
@@ -19537,6 +19840,29 @@ var HydrationPaseo = {
|
|
|
19537
19840
|
},
|
|
19538
19841
|
isFeeAsset: true
|
|
19539
19842
|
},
|
|
19843
|
+
{
|
|
19844
|
+
assetId: "1007",
|
|
19845
|
+
symbol: "aETH",
|
|
19846
|
+
decimals: 18,
|
|
19847
|
+
existentialDeposit: "8202803876747",
|
|
19848
|
+
location: {
|
|
19849
|
+
parents: 1,
|
|
19850
|
+
interior: {
|
|
19851
|
+
X2: [
|
|
19852
|
+
{
|
|
19853
|
+
Parachain: 2034
|
|
19854
|
+
},
|
|
19855
|
+
{
|
|
19856
|
+
AccountKey20: {
|
|
19857
|
+
network: null,
|
|
19858
|
+
key: "0x11a8f7ffbb7e0fbed88bc20179dd45b4bd6874ff"
|
|
19859
|
+
}
|
|
19860
|
+
}
|
|
19861
|
+
]
|
|
19862
|
+
}
|
|
19863
|
+
},
|
|
19864
|
+
isFeeAsset: true
|
|
19865
|
+
},
|
|
19540
19866
|
{
|
|
19541
19867
|
assetId: "24",
|
|
19542
19868
|
symbol: "SUB",
|
|
@@ -19626,6 +19952,29 @@ var HydrationPaseo = {
|
|
|
19626
19952
|
},
|
|
19627
19953
|
isFeeAsset: true
|
|
19628
19954
|
},
|
|
19955
|
+
{
|
|
19956
|
+
assetId: "1110",
|
|
19957
|
+
symbol: "HUSDC",
|
|
19958
|
+
decimals: 18,
|
|
19959
|
+
existentialDeposit: "33000000000000000",
|
|
19960
|
+
location: {
|
|
19961
|
+
parents: 1,
|
|
19962
|
+
interior: {
|
|
19963
|
+
X2: [
|
|
19964
|
+
{
|
|
19965
|
+
Parachain: 2034
|
|
19966
|
+
},
|
|
19967
|
+
{
|
|
19968
|
+
AccountKey20: {
|
|
19969
|
+
network: null,
|
|
19970
|
+
key: "0x35774c305aaf441a102d47988d35f0f5428471b3"
|
|
19971
|
+
}
|
|
19972
|
+
}
|
|
19973
|
+
]
|
|
19974
|
+
}
|
|
19975
|
+
},
|
|
19976
|
+
isFeeAsset: true
|
|
19977
|
+
},
|
|
19629
19978
|
{
|
|
19630
19979
|
assetId: "1000100",
|
|
19631
19980
|
symbol: "LDOT",
|
|
@@ -19653,7 +20002,7 @@ var HydrationPaseo = {
|
|
|
19653
20002
|
assetId: "1004",
|
|
19654
20003
|
symbol: "aWBTC",
|
|
19655
20004
|
decimals: 8,
|
|
19656
|
-
existentialDeposit: "
|
|
20005
|
+
existentialDeposit: "40",
|
|
19657
20006
|
location: {
|
|
19658
20007
|
parents: 1,
|
|
19659
20008
|
interior: {
|
|
@@ -19727,6 +20076,12 @@ var HydrationPaseo = {
|
|
|
19727
20076
|
},
|
|
19728
20077
|
isFeeAsset: true
|
|
19729
20078
|
},
|
|
20079
|
+
{
|
|
20080
|
+
assetId: "113",
|
|
20081
|
+
symbol: "2-Pool-HUSDe",
|
|
20082
|
+
decimals: 18,
|
|
20083
|
+
existentialDeposit: "1000"
|
|
20084
|
+
},
|
|
19730
20085
|
{
|
|
19731
20086
|
assetId: "1",
|
|
19732
20087
|
symbol: "H2O",
|
|
@@ -19793,26 +20148,6 @@ var HydrationPaseo = {
|
|
|
19793
20148
|
},
|
|
19794
20149
|
isFeeAsset: true
|
|
19795
20150
|
},
|
|
19796
|
-
{
|
|
19797
|
-
assetId: "12345",
|
|
19798
|
-
symbol: "KPGT",
|
|
19799
|
-
decimals: 18,
|
|
19800
|
-
existentialDeposit: "10000000000000000",
|
|
19801
|
-
location: {
|
|
19802
|
-
parents: 1,
|
|
19803
|
-
interior: {
|
|
19804
|
-
X2: [
|
|
19805
|
-
{
|
|
19806
|
-
Parachain: 4818
|
|
19807
|
-
},
|
|
19808
|
-
{
|
|
19809
|
-
GeneralIndex: 0
|
|
19810
|
-
}
|
|
19811
|
-
]
|
|
19812
|
-
}
|
|
19813
|
-
},
|
|
19814
|
-
isFeeAsset: true
|
|
19815
|
-
},
|
|
19816
20151
|
{
|
|
19817
20152
|
assetId: "3",
|
|
19818
20153
|
symbol: "WBTC",
|
|
@@ -19912,6 +20247,29 @@ var HydrationPaseo = {
|
|
|
19912
20247
|
},
|
|
19913
20248
|
isFeeAsset: true
|
|
19914
20249
|
},
|
|
20250
|
+
{
|
|
20251
|
+
assetId: "69",
|
|
20252
|
+
symbol: "GDOT",
|
|
20253
|
+
decimals: 18,
|
|
20254
|
+
existentialDeposit: "5290724013368937",
|
|
20255
|
+
location: {
|
|
20256
|
+
parents: 1,
|
|
20257
|
+
interior: {
|
|
20258
|
+
X2: [
|
|
20259
|
+
{
|
|
20260
|
+
Parachain: 2034
|
|
20261
|
+
},
|
|
20262
|
+
{
|
|
20263
|
+
AccountKey20: {
|
|
20264
|
+
network: null,
|
|
20265
|
+
key: "0x34d5ffb83d14d82f87aaf2f13be895a3c814c2ad"
|
|
20266
|
+
}
|
|
20267
|
+
}
|
|
20268
|
+
]
|
|
20269
|
+
}
|
|
20270
|
+
},
|
|
20271
|
+
isFeeAsset: true
|
|
20272
|
+
},
|
|
19915
20273
|
{
|
|
19916
20274
|
assetId: "23",
|
|
19917
20275
|
symbol: "USDT",
|
|
@@ -19939,6 +20297,56 @@ var HydrationPaseo = {
|
|
|
19939
20297
|
isFeeAsset: true,
|
|
19940
20298
|
alias: "USDT3"
|
|
19941
20299
|
},
|
|
20300
|
+
{
|
|
20301
|
+
assetId: "37",
|
|
20302
|
+
symbol: "SQD",
|
|
20303
|
+
decimals: 18,
|
|
20304
|
+
existentialDeposit: "61012812690665100",
|
|
20305
|
+
location: {
|
|
20306
|
+
parents: 1,
|
|
20307
|
+
interior: {
|
|
20308
|
+
X2: [
|
|
20309
|
+
{
|
|
20310
|
+
Parachain: 2004
|
|
20311
|
+
},
|
|
20312
|
+
{
|
|
20313
|
+
AccountKey20: {
|
|
20314
|
+
network: null,
|
|
20315
|
+
key: "0x9c4c6eaad9b926ba09f702f4ad880ef71998ef18"
|
|
20316
|
+
}
|
|
20317
|
+
}
|
|
20318
|
+
]
|
|
20319
|
+
}
|
|
20320
|
+
},
|
|
20321
|
+
isFeeAsset: true
|
|
20322
|
+
},
|
|
20323
|
+
{
|
|
20324
|
+
assetId: "1000851",
|
|
20325
|
+
symbol: "LBTC",
|
|
20326
|
+
decimals: 8,
|
|
20327
|
+
existentialDeposit: "11",
|
|
20328
|
+
location: {
|
|
20329
|
+
parents: 2,
|
|
20330
|
+
interior: {
|
|
20331
|
+
X2: [
|
|
20332
|
+
{
|
|
20333
|
+
GlobalConsensus: {
|
|
20334
|
+
Ethereum: {
|
|
20335
|
+
chainId: 1
|
|
20336
|
+
}
|
|
20337
|
+
}
|
|
20338
|
+
},
|
|
20339
|
+
{
|
|
20340
|
+
AccountKey20: {
|
|
20341
|
+
network: null,
|
|
20342
|
+
key: "0x8236a87084f8b84306f72007f36f2618a5634494"
|
|
20343
|
+
}
|
|
20344
|
+
}
|
|
20345
|
+
]
|
|
20346
|
+
}
|
|
20347
|
+
},
|
|
20348
|
+
isFeeAsset: true
|
|
20349
|
+
},
|
|
19942
20350
|
{
|
|
19943
20351
|
assetId: "9",
|
|
19944
20352
|
symbol: "ASTR",
|
|
@@ -20655,6 +21063,42 @@ var throwDuplicateAssetError = function throwDuplicateAssetError(symbol, nativeM
|
|
|
20655
21063
|
}
|
|
20656
21064
|
};
|
|
20657
21065
|
|
|
21066
|
+
var removePrefix = function removePrefix(symbol) {
|
|
21067
|
+
return symbol.slice(2);
|
|
21068
|
+
};
|
|
21069
|
+
var removeSuffix = function removeSuffix(symbol) {
|
|
21070
|
+
return symbol.slice(0, -2);
|
|
21071
|
+
};
|
|
21072
|
+
var findEthAssetBySymbol = function findEthAssetBySymbol(symbol) {
|
|
21073
|
+
var ethereumAssets = getOtherAssets('Ethereum');
|
|
21074
|
+
return findBestMatches(ethereumAssets, symbol)[0];
|
|
21075
|
+
};
|
|
21076
|
+
var findEthMatch = function findEthMatch(symbol) {
|
|
21077
|
+
var match = findEthAssetBySymbol(symbol);
|
|
21078
|
+
if (match) return match;
|
|
21079
|
+
var altSymbol = symbol.toLowerCase().endsWith('.e') ? removeSuffix(symbol) : "".concat(symbol, ".e");
|
|
21080
|
+
return findEthAssetBySymbol(altSymbol.toLowerCase());
|
|
21081
|
+
};
|
|
21082
|
+
var findWithXcVariant = function findWithXcVariant(items, value) {
|
|
21083
|
+
var lower = value.toLowerCase();
|
|
21084
|
+
var candidate = lower.startsWith('xc') ? removePrefix(value) : "xc".concat(value);
|
|
21085
|
+
return findBestMatches(items, candidate);
|
|
21086
|
+
};
|
|
21087
|
+
var pickOtherOrThrow = function pickOtherOrThrow(input, otherMatches) {
|
|
21088
|
+
if (otherMatches.length > 1) {
|
|
21089
|
+
throwDuplicateAssetError(input, [], otherMatches);
|
|
21090
|
+
}
|
|
21091
|
+
return otherMatches[0];
|
|
21092
|
+
};
|
|
21093
|
+
var pickAny = function pickAny(_native, other) {
|
|
21094
|
+
var _other$;
|
|
21095
|
+
return (_other$ = other[0]) !== null && _other$ !== void 0 ? _other$ : _native[0];
|
|
21096
|
+
};
|
|
21097
|
+
var throwIfDuplicate = function throwIfDuplicate(input, nativeMatches, otherMatches) {
|
|
21098
|
+
if (nativeMatches.length + otherMatches.length > 1) {
|
|
21099
|
+
throwDuplicateAssetError(input, nativeMatches, otherMatches);
|
|
21100
|
+
}
|
|
21101
|
+
};
|
|
20658
21102
|
var findAssetInfoBySymbol = function findAssetInfoBySymbol(destination, otherAssets, nativeAssets, symbol) {
|
|
20659
21103
|
var isSpecifier = isSymbolSpecifier(symbol);
|
|
20660
21104
|
var assetsMatches = [];
|
|
@@ -20667,78 +21111,30 @@ var findAssetInfoBySymbol = function findAssetInfoBySymbol(destination, otherAss
|
|
|
20667
21111
|
var lowerSymbol = value.toLowerCase();
|
|
20668
21112
|
var otherAssetsMatches = [];
|
|
20669
21113
|
if (destination === 'Ethereum') {
|
|
20670
|
-
|
|
20671
|
-
var _assetsMatches = findBestMatches(ethereumAssets, value);
|
|
20672
|
-
if (_assetsMatches.length === 0) {
|
|
20673
|
-
if (lowerSymbol.endsWith('.e')) {
|
|
20674
|
-
// Symbol ends with '.e', strip it and search again
|
|
20675
|
-
var strippedSymbol = value.slice(0, -2).toLowerCase();
|
|
20676
|
-
_assetsMatches = findBestMatches(ethereumAssets, strippedSymbol);
|
|
20677
|
-
} else {
|
|
20678
|
-
// Symbol does not end with '.e', add '.e' suffix and search
|
|
20679
|
-
var suffixedSymbol = "".concat(value, ".e").toLowerCase();
|
|
20680
|
-
_assetsMatches = findBestMatches(ethereumAssets, suffixedSymbol);
|
|
20681
|
-
}
|
|
20682
|
-
}
|
|
20683
|
-
return _assetsMatches[0];
|
|
21114
|
+
return findEthMatch(value);
|
|
20684
21115
|
}
|
|
20685
21116
|
if (lowerSymbol.endsWith('.e')) {
|
|
20686
21117
|
// Symbol ends with '.e', indicating a Snowbridge asset
|
|
20687
|
-
var
|
|
21118
|
+
var strippedSymbol = removeSuffix(value);
|
|
20688
21119
|
// If not found, search normal assets with '.e' suffix
|
|
20689
21120
|
otherAssetsMatches = findBestMatches(otherAssets, value);
|
|
20690
|
-
|
|
20691
|
-
|
|
20692
|
-
|
|
20693
|
-
|
|
20694
|
-
|
|
20695
|
-
|
|
20696
|
-
|
|
20697
|
-
var _strippedSymbol2 = value.substring(2);
|
|
20698
|
-
otherAssetsMatches = findBestMatches(otherAssets, _strippedSymbol2);
|
|
20699
|
-
} else {
|
|
20700
|
-
// Try adding 'xc' prefix
|
|
20701
|
-
var prefixedSymbol = "xc".concat(value);
|
|
20702
|
-
otherAssetsMatches = findBestMatches(otherAssets, prefixedSymbol);
|
|
20703
|
-
}
|
|
20704
|
-
if (otherAssetsMatches.length > 1) {
|
|
20705
|
-
throwDuplicateAssetError(value, [], otherAssetsMatches);
|
|
20706
|
-
} else if (otherAssetsMatches.length > 0) {
|
|
20707
|
-
return otherAssetsMatches[0];
|
|
20708
|
-
}
|
|
20709
|
-
// Search in Ethereum assets without the '.e' suffix
|
|
20710
|
-
var _ethereumAssets = getOtherAssets('Ethereum');
|
|
20711
|
-
var ethereumMatches = findBestMatches(_ethereumAssets, _strippedSymbol);
|
|
20712
|
-
if (ethereumMatches.length > 0) {
|
|
20713
|
-
return ethereumMatches[0];
|
|
20714
|
-
}
|
|
21121
|
+
var foundAsset = pickOtherOrThrow(value, otherAssetsMatches);
|
|
21122
|
+
if (foundAsset) return foundAsset;
|
|
21123
|
+
otherAssetsMatches = findWithXcVariant(otherAssets, value);
|
|
21124
|
+
foundAsset = pickOtherOrThrow(value, otherAssetsMatches);
|
|
21125
|
+
if (foundAsset) return foundAsset;
|
|
21126
|
+
var ethAsset = findEthAssetBySymbol(strippedSymbol);
|
|
21127
|
+
if (ethAsset) return ethAsset;
|
|
20715
21128
|
// If still not found, search normal assets without suffix
|
|
20716
|
-
otherAssetsMatches = findBestMatches(otherAssets,
|
|
20717
|
-
|
|
20718
|
-
throwDuplicateAssetError(value, [], otherAssetsMatches);
|
|
20719
|
-
} else if (otherAssetsMatches.length > 0) {
|
|
20720
|
-
return otherAssetsMatches[0];
|
|
20721
|
-
}
|
|
20722
|
-
// No matches found
|
|
20723
|
-
return undefined;
|
|
21129
|
+
otherAssetsMatches = findBestMatches(otherAssets, strippedSymbol);
|
|
21130
|
+
return pickOtherOrThrow(value, otherAssetsMatches);
|
|
20724
21131
|
} else {
|
|
20725
21132
|
// Symbol does not end with '.e', proceed with existing logic
|
|
20726
21133
|
otherAssetsMatches = findBestMatches(otherAssets, value);
|
|
20727
21134
|
if (otherAssetsMatches.length === 0) {
|
|
20728
|
-
|
|
20729
|
-
// Symbol starts with 'xc', try stripping 'xc' prefix
|
|
20730
|
-
var _strippedSymbol3 = value.substring(2);
|
|
20731
|
-
otherAssetsMatches = findBestMatches(otherAssets, _strippedSymbol3);
|
|
20732
|
-
} else {
|
|
20733
|
-
// Try adding 'xc' prefix
|
|
20734
|
-
var _prefixedSymbol = "xc".concat(value);
|
|
20735
|
-
otherAssetsMatches = findBestMatches(otherAssets, _prefixedSymbol);
|
|
20736
|
-
}
|
|
21135
|
+
otherAssetsMatches = findWithXcVariant(otherAssets, value);
|
|
20737
21136
|
}
|
|
20738
|
-
|
|
20739
|
-
throwDuplicateAssetError(value, [], otherAssetsMatches);
|
|
20740
|
-
}
|
|
20741
|
-
return otherAssetsMatches[0] || undefined;
|
|
21137
|
+
return pickOtherOrThrow(value, otherAssetsMatches);
|
|
20742
21138
|
}
|
|
20743
21139
|
} else if (type === 'ForeignAbstract') {
|
|
20744
21140
|
assetsMatches = findBestMatches(otherAssets, value, 'alias');
|
|
@@ -20751,91 +21147,41 @@ var findAssetInfoBySymbol = function findAssetInfoBySymbol(destination, otherAss
|
|
|
20751
21147
|
var _otherAssetsMatches = [];
|
|
20752
21148
|
var nativeAssetsMatches = [];
|
|
20753
21149
|
if (destination === 'Ethereum') {
|
|
20754
|
-
|
|
20755
|
-
var _assetsMatches2 = findBestMatches(_ethereumAssets2, symbol);
|
|
20756
|
-
if (_assetsMatches2.length === 0) {
|
|
20757
|
-
if (_lowerSymbol.endsWith('.e')) {
|
|
20758
|
-
// Symbol ends with '.e', strip it and search again
|
|
20759
|
-
var _strippedSymbol4 = symbol.slice(0, -2).toLowerCase();
|
|
20760
|
-
_assetsMatches2 = findBestMatches(_ethereumAssets2, _strippedSymbol4);
|
|
20761
|
-
} else {
|
|
20762
|
-
// Symbol does not end with '.e', add '.e' suffix and search
|
|
20763
|
-
var _suffixedSymbol = "".concat(symbol, ".e").toLowerCase();
|
|
20764
|
-
_assetsMatches2 = findBestMatches(_ethereumAssets2, _suffixedSymbol);
|
|
20765
|
-
}
|
|
20766
|
-
}
|
|
20767
|
-
return _assetsMatches2[0];
|
|
21150
|
+
return findEthMatch(symbol);
|
|
20768
21151
|
}
|
|
20769
21152
|
if (_lowerSymbol.endsWith('.e')) {
|
|
20770
21153
|
// Symbol ends with '.e', indicating a Snowbridge asset
|
|
20771
|
-
var
|
|
21154
|
+
var _strippedSymbol = removeSuffix(symbol);
|
|
20772
21155
|
// If not found, search normal assets with '.e' suffix
|
|
20773
21156
|
_otherAssetsMatches = findBestMatches(otherAssets, symbol);
|
|
20774
21157
|
nativeAssetsMatches = findBestMatches(nativeAssets, symbol);
|
|
20775
21158
|
if (nativeAssetsMatches.length > 0 || _otherAssetsMatches.length > 0) {
|
|
20776
|
-
return _otherAssetsMatches
|
|
20777
|
-
}
|
|
20778
|
-
if (_lowerSymbol.startsWith('xc')) {
|
|
20779
|
-
// Symbol starts with 'xc', try stripping 'xc' prefix
|
|
20780
|
-
var _strippedSymbol6 = symbol.substring(2);
|
|
20781
|
-
_otherAssetsMatches = findBestMatches(otherAssets, _strippedSymbol6);
|
|
20782
|
-
} else {
|
|
20783
|
-
// Try adding 'xc' prefix
|
|
20784
|
-
var _prefixedSymbol2 = "xc".concat(symbol);
|
|
20785
|
-
_otherAssetsMatches = findBestMatches(otherAssets, _prefixedSymbol2);
|
|
20786
|
-
}
|
|
20787
|
-
if (_otherAssetsMatches.length > 1) {
|
|
20788
|
-
throwDuplicateAssetError(symbol, [], _otherAssetsMatches);
|
|
20789
|
-
} else if (_otherAssetsMatches.length > 0) {
|
|
20790
|
-
return _otherAssetsMatches[0];
|
|
21159
|
+
return pickAny(nativeAssetsMatches, _otherAssetsMatches);
|
|
20791
21160
|
}
|
|
21161
|
+
_otherAssetsMatches = findWithXcVariant(otherAssets, symbol);
|
|
21162
|
+
var _foundAsset = pickOtherOrThrow(symbol, _otherAssetsMatches);
|
|
21163
|
+
if (_foundAsset) return _foundAsset;
|
|
20792
21164
|
// Search in Ethereum assets without the '.e' suffix
|
|
20793
|
-
var
|
|
20794
|
-
|
|
20795
|
-
if (_ethereumMatches.length > 0) {
|
|
20796
|
-
return _ethereumMatches[0];
|
|
20797
|
-
}
|
|
21165
|
+
var _ethAsset = findEthAssetBySymbol(_strippedSymbol);
|
|
21166
|
+
if (_ethAsset) return _ethAsset;
|
|
20798
21167
|
// If still not found, search normal assets without suffix
|
|
20799
|
-
_otherAssetsMatches = findBestMatches(otherAssets,
|
|
20800
|
-
nativeAssetsMatches = findBestMatches(nativeAssets,
|
|
20801
|
-
|
|
20802
|
-
return _otherAssetsMatches[0] || nativeAssetsMatches[0];
|
|
20803
|
-
}
|
|
20804
|
-
// No matches found
|
|
20805
|
-
return undefined;
|
|
21168
|
+
_otherAssetsMatches = findBestMatches(otherAssets, _strippedSymbol);
|
|
21169
|
+
nativeAssetsMatches = findBestMatches(nativeAssets, _strippedSymbol);
|
|
21170
|
+
return pickAny(nativeAssetsMatches, _otherAssetsMatches);
|
|
20806
21171
|
} else {
|
|
20807
21172
|
// Symbol does not end with '.e'
|
|
20808
21173
|
_otherAssetsMatches = findBestMatches(otherAssets, symbol);
|
|
20809
21174
|
nativeAssetsMatches = findBestMatches(nativeAssets, symbol);
|
|
20810
21175
|
if (_otherAssetsMatches.length === 0 && nativeAssetsMatches.length === 0) {
|
|
20811
|
-
|
|
20812
|
-
|
|
20813
|
-
|
|
20814
|
-
_otherAssetsMatches = findBestMatches(otherAssets, _strippedSymbol7);
|
|
20815
|
-
nativeAssetsMatches = findBestMatches(nativeAssets, _strippedSymbol7);
|
|
20816
|
-
var _totalMatches = _otherAssetsMatches.length + nativeAssetsMatches.length;
|
|
20817
|
-
if (_totalMatches > 1) {
|
|
20818
|
-
throwDuplicateAssetError(symbol, nativeAssetsMatches, _otherAssetsMatches);
|
|
20819
|
-
}
|
|
20820
|
-
} else {
|
|
20821
|
-
// Try adding 'xc' prefix
|
|
20822
|
-
var _prefixedSymbol3 = "xc".concat(symbol);
|
|
20823
|
-
_otherAssetsMatches = findBestMatches(otherAssets, _prefixedSymbol3);
|
|
20824
|
-
nativeAssetsMatches = findBestMatches(nativeAssets, _prefixedSymbol3);
|
|
20825
|
-
var _totalMatches2 = _otherAssetsMatches.length + nativeAssetsMatches.length;
|
|
20826
|
-
if (_totalMatches2 > 1) {
|
|
20827
|
-
throwDuplicateAssetError(symbol, nativeAssetsMatches, _otherAssetsMatches);
|
|
20828
|
-
}
|
|
20829
|
-
}
|
|
20830
|
-
}
|
|
20831
|
-
var totalMatches = _otherAssetsMatches.length + nativeAssetsMatches.length;
|
|
20832
|
-
if (totalMatches > 1) {
|
|
20833
|
-
throwDuplicateAssetError(symbol, nativeAssetsMatches, _otherAssetsMatches);
|
|
21176
|
+
_otherAssetsMatches = findWithXcVariant(otherAssets, symbol);
|
|
21177
|
+
nativeAssetsMatches = findWithXcVariant(nativeAssets, symbol);
|
|
21178
|
+
throwIfDuplicate(symbol, nativeAssetsMatches, _otherAssetsMatches);
|
|
20834
21179
|
}
|
|
20835
|
-
|
|
21180
|
+
throwIfDuplicate(symbol, nativeAssetsMatches, _otherAssetsMatches);
|
|
21181
|
+
return pickAny(nativeAssetsMatches, _otherAssetsMatches);
|
|
20836
21182
|
}
|
|
20837
21183
|
}
|
|
20838
|
-
return assetsMatches[0]
|
|
21184
|
+
return assetsMatches[0];
|
|
20839
21185
|
};
|
|
20840
21186
|
|
|
20841
21187
|
var findAssetInfo = function findAssetInfo(chain, currency, destination) {
|
|
@@ -20887,9 +21233,22 @@ var findAssetInfoOrThrow = function findAssetInfoOrThrow(chain, currency, destin
|
|
|
20887
21233
|
};
|
|
20888
21234
|
|
|
20889
21235
|
var findAssetInfoOnDest = function findAssetInfoOnDest(origin, destination, currency, originAsset) {
|
|
20890
|
-
var
|
|
21236
|
+
var isBridge = isSubstrateBridge(origin, destination);
|
|
20891
21237
|
var resolvedOriginAsset = originAsset !== null && originAsset !== void 0 ? originAsset : findAssetInfoOrThrow(origin, currency, destination);
|
|
20892
|
-
|
|
21238
|
+
if (isBridge) {
|
|
21239
|
+
// Try native first
|
|
21240
|
+
var nativeMatch = findAssetInfo(destination, {
|
|
21241
|
+
symbol: Native(resolvedOriginAsset.symbol)
|
|
21242
|
+
}, null);
|
|
21243
|
+
if (nativeMatch) return nativeMatch;
|
|
21244
|
+
// Then try foreign
|
|
21245
|
+
var foreignMatch = findAssetInfo(destination, {
|
|
21246
|
+
symbol: Foreign(resolvedOriginAsset.symbol)
|
|
21247
|
+
}, null);
|
|
21248
|
+
if (foreignMatch) return foreignMatch;
|
|
21249
|
+
return null;
|
|
21250
|
+
}
|
|
21251
|
+
var assetByLocation = resolvedOriginAsset.location ? findAssetInfo(destination, {
|
|
20893
21252
|
location: resolvedOriginAsset.location
|
|
20894
21253
|
}, null) : null;
|
|
20895
21254
|
return assetByLocation !== null && assetByLocation !== void 0 ? assetByLocation : findAssetInfo(destination, {
|
|
@@ -21231,9 +21590,9 @@ var getSupportedDestinations = function getSupportedDestinations(origin, currenc
|
|
|
21231
21590
|
};
|
|
21232
21591
|
|
|
21233
21592
|
var isAssetEqual = function isAssetEqual(asset1, asset2) {
|
|
21234
|
-
var
|
|
21235
|
-
var
|
|
21236
|
-
if (
|
|
21593
|
+
var loc1 = asset1.location;
|
|
21594
|
+
var loc2 = asset2.location;
|
|
21595
|
+
if (loc1 && loc2) return deepEqual(loc1, loc2);
|
|
21237
21596
|
if (isForeignAsset(asset1) && isForeignAsset(asset2) && asset1.assetId === asset2.assetId) return true;
|
|
21238
21597
|
return isSymbolMatch(asset1.symbol, asset2.symbol);
|
|
21239
21598
|
};
|