@subwallet/chain-list 0.0.23 → 0.0.25
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/bundle-subwallet-chain-list.js +10 -16
- package/cjs/logo/index.js +0 -2
- package/cjs/packageInfo.js +1 -1
- package/data/AssetRef.json +7 -0
- package/data/ChainAsset.json +2 -15
- package/data/MultiChainAsset.json +1 -1
- package/logo/index.js +0 -2
- package/migrate/add-ED.js +0 -13
- package/migrate/add-decimals.js +0 -21
- package/migrate/convert-change-list.js +0 -22
- package/migrate/generate-native-tokens.js +0 -21
- package/migrate/subscan-support-map.js +15 -0
- package/migrate/update-price-symbol.js +39 -15
- package/package.json +2 -1
- package/packageInfo.js +1 -1
|
@@ -286,6 +286,13 @@
|
|
|
286
286
|
srcChain: "astar",
|
|
287
287
|
destChain: "polkadot",
|
|
288
288
|
path: "XCM"
|
|
289
|
+
},
|
|
290
|
+
"pioneer-NATIVE-NEER___karura-LOCAL-NEER": {
|
|
291
|
+
srcAsset: "pioneer-NATIVE-NEER",
|
|
292
|
+
destAsset: "karura-LOCAL-NEER",
|
|
293
|
+
srcChain: "pioneer",
|
|
294
|
+
destChain: "karura",
|
|
295
|
+
path: "XCM"
|
|
289
296
|
}
|
|
290
297
|
};
|
|
291
298
|
|
|
@@ -965,7 +972,7 @@
|
|
|
965
972
|
name: "Bobabase",
|
|
966
973
|
symbol: "BOBA",
|
|
967
974
|
decimals: 18,
|
|
968
|
-
priceId:
|
|
975
|
+
priceId: null,
|
|
969
976
|
minAmount: "0",
|
|
970
977
|
assetType: "NATIVE",
|
|
971
978
|
metadata: null,
|
|
@@ -1698,7 +1705,7 @@
|
|
|
1698
1705
|
slug: "sakura-NATIVE-SKU",
|
|
1699
1706
|
name: "Sakura",
|
|
1700
1707
|
symbol: "SKU",
|
|
1701
|
-
decimals:
|
|
1708
|
+
decimals: 18,
|
|
1702
1709
|
priceId: "sakura",
|
|
1703
1710
|
minAmount: "500",
|
|
1704
1711
|
assetType: "NATIVE",
|
|
@@ -2174,19 +2181,6 @@
|
|
|
2174
2181
|
metadata: null,
|
|
2175
2182
|
multiChainAsset: null,
|
|
2176
2183
|
hasValue: true
|
|
2177
|
-
},
|
|
2178
|
-
"boba_rinkeby-NATIVE-ETH": {
|
|
2179
|
-
originChain: "boba_rinkeby",
|
|
2180
|
-
slug: "boba_rinkeby-NATIVE-ETH",
|
|
2181
|
-
name: "Boba Rinkeby (Testnet)",
|
|
2182
|
-
symbol: "ETH",
|
|
2183
|
-
decimals: 18,
|
|
2184
|
-
priceId: null,
|
|
2185
|
-
minAmount: "0",
|
|
2186
|
-
assetType: "NATIVE",
|
|
2187
|
-
metadata: null,
|
|
2188
|
-
multiChainAsset: null,
|
|
2189
|
-
hasValue: false
|
|
2190
2184
|
},
|
|
2191
2185
|
"bobabeam-NATIVE-BOBA": {
|
|
2192
2186
|
originChain: "bobabeam",
|
|
@@ -7103,7 +7097,7 @@
|
|
|
7103
7097
|
slug: "kBTC-KintsugiWrappedBTC",
|
|
7104
7098
|
originChainAsset: "kintsugi-LOCAL-kBTC",
|
|
7105
7099
|
name: "Kintsugi Wrapped BTC",
|
|
7106
|
-
symbol: "
|
|
7100
|
+
symbol: "kBTC",
|
|
7107
7101
|
priceId: null,
|
|
7108
7102
|
hasValue: true
|
|
7109
7103
|
}
|
package/cjs/logo/index.js
CHANGED
|
@@ -471,8 +471,6 @@ const LogoMap = {
|
|
|
471
471
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
472
472
|
ada: require('./158.cardano.png'),
|
|
473
473
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
474
|
-
boba_rinkeby: require('./163.boba.png'),
|
|
475
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
476
474
|
boba: require('./163.boba.png'),
|
|
477
475
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
478
476
|
bobabase: require('./163.boba.png'),
|
package/cjs/packageInfo.js
CHANGED
package/data/AssetRef.json
CHANGED
|
@@ -280,5 +280,12 @@
|
|
|
280
280
|
"srcChain": "astar",
|
|
281
281
|
"destChain": "polkadot",
|
|
282
282
|
"path": "XCM"
|
|
283
|
+
},
|
|
284
|
+
"pioneer-NATIVE-NEER___karura-LOCAL-NEER": {
|
|
285
|
+
"srcAsset": "pioneer-NATIVE-NEER",
|
|
286
|
+
"destAsset": "karura-LOCAL-NEER",
|
|
287
|
+
"srcChain": "pioneer",
|
|
288
|
+
"destChain": "karura",
|
|
289
|
+
"path": "XCM"
|
|
283
290
|
}
|
|
284
291
|
}
|
package/data/ChainAsset.json
CHANGED
|
@@ -674,7 +674,7 @@
|
|
|
674
674
|
"name": "Bobabase",
|
|
675
675
|
"symbol": "BOBA",
|
|
676
676
|
"decimals": 18,
|
|
677
|
-
"priceId":
|
|
677
|
+
"priceId": null,
|
|
678
678
|
"minAmount": "0",
|
|
679
679
|
"assetType": "NATIVE",
|
|
680
680
|
"metadata": null,
|
|
@@ -1407,7 +1407,7 @@
|
|
|
1407
1407
|
"slug": "sakura-NATIVE-SKU",
|
|
1408
1408
|
"name": "Sakura",
|
|
1409
1409
|
"symbol": "SKU",
|
|
1410
|
-
"decimals":
|
|
1410
|
+
"decimals": 18,
|
|
1411
1411
|
"priceId": "sakura",
|
|
1412
1412
|
"minAmount": "500",
|
|
1413
1413
|
"assetType": "NATIVE",
|
|
@@ -1884,19 +1884,6 @@
|
|
|
1884
1884
|
"multiChainAsset": null,
|
|
1885
1885
|
"hasValue": true
|
|
1886
1886
|
},
|
|
1887
|
-
"boba_rinkeby-NATIVE-ETH": {
|
|
1888
|
-
"originChain": "boba_rinkeby",
|
|
1889
|
-
"slug": "boba_rinkeby-NATIVE-ETH",
|
|
1890
|
-
"name": "Boba Rinkeby (Testnet)",
|
|
1891
|
-
"symbol": "ETH",
|
|
1892
|
-
"decimals": 18,
|
|
1893
|
-
"priceId": null,
|
|
1894
|
-
"minAmount": "0",
|
|
1895
|
-
"assetType": "NATIVE",
|
|
1896
|
-
"metadata": null,
|
|
1897
|
-
"multiChainAsset": null,
|
|
1898
|
-
"hasValue": false
|
|
1899
|
-
},
|
|
1900
1887
|
"bobabeam-NATIVE-BOBA": {
|
|
1901
1888
|
"originChain": "bobabeam",
|
|
1902
1889
|
"slug": "bobabeam-NATIVE-BOBA",
|
package/logo/index.js
CHANGED
|
@@ -465,8 +465,6 @@ const LogoMap = {
|
|
|
465
465
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
466
466
|
ada: require("./158.cardano.png"),
|
|
467
467
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
468
|
-
boba_rinkeby: require("./163.boba.png"),
|
|
469
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
470
468
|
boba: require("./163.boba.png"),
|
|
471
469
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
472
470
|
bobabase: require("./163.boba.png"),
|
package/migrate/add-ED.js
CHANGED
|
@@ -1707,19 +1707,6 @@ const data = {
|
|
|
1707
1707
|
"multiChainAsset": null,
|
|
1708
1708
|
"hasValue": true
|
|
1709
1709
|
},
|
|
1710
|
-
"boba_rinkeby-NATIVE-ETH": {
|
|
1711
|
-
"originChain": "boba_rinkeby",
|
|
1712
|
-
"slug": "boba_rinkeby-NATIVE-ETH",
|
|
1713
|
-
"name": "Boba Rinkeby (Testnet)",
|
|
1714
|
-
"symbol": "ETH",
|
|
1715
|
-
"decimals": 18,
|
|
1716
|
-
"priceId": null,
|
|
1717
|
-
"minAmount": "0",
|
|
1718
|
-
"assetType": "NATIVE",
|
|
1719
|
-
"metadata": null,
|
|
1720
|
-
"multiChainAsset": null,
|
|
1721
|
-
"hasValue": false
|
|
1722
|
-
},
|
|
1723
1710
|
"bobabeam-NATIVE-BOBA": {
|
|
1724
1711
|
"originChain": "bobabeam",
|
|
1725
1712
|
"slug": "bobabeam-NATIVE-BOBA",
|
package/migrate/add-decimals.js
CHANGED
|
@@ -2700,27 +2700,6 @@ const inputMap = {
|
|
|
2700
2700
|
]
|
|
2701
2701
|
}
|
|
2702
2702
|
},
|
|
2703
|
-
"boba_rinkeby": {
|
|
2704
|
-
"slug": "boba_rinkeby",
|
|
2705
|
-
"name": "Boba Rinkeby (Testnet)",
|
|
2706
|
-
"chainStatus": "ACTIVE",
|
|
2707
|
-
"providers": {
|
|
2708
|
-
"RPC": "https://rinkeby.boba.network"
|
|
2709
|
-
},
|
|
2710
|
-
"isTestnet": true,
|
|
2711
|
-
"substrateInfo": null,
|
|
2712
|
-
"evmInfo": {
|
|
2713
|
-
"evmChainId": 28,
|
|
2714
|
-
"blockExplorer": "https://blockexplorer.rinkeby.boba.network",
|
|
2715
|
-
"symbol": "ETH",
|
|
2716
|
-
"decimals": 18,
|
|
2717
|
-
"existentialDeposit": "0",
|
|
2718
|
-
"supportSmartContract": [
|
|
2719
|
-
"ERC20",
|
|
2720
|
-
"ERC721"
|
|
2721
|
-
]
|
|
2722
|
-
}
|
|
2723
|
-
},
|
|
2724
2703
|
"bobabeam": {
|
|
2725
2704
|
"slug": "bobabeam",
|
|
2726
2705
|
"name": "Bobabeam",
|
|
@@ -2054,27 +2054,6 @@ const inputMap = {
|
|
|
2054
2054
|
abiExplorer: 'https://blockexplorer.boba.network',
|
|
2055
2055
|
supportSmartContract: [ContractType.evm]
|
|
2056
2056
|
},
|
|
2057
|
-
boba_rinkeby: {
|
|
2058
|
-
key: 'boba_rinkeby',
|
|
2059
|
-
chain: 'Boba Rinkeby (Testnet)',
|
|
2060
|
-
genesisHash: '0x6854c3f614bd5096f3b4cf142c9fbad8b95ced2eda2f5d64f97e8136b80e3677',
|
|
2061
|
-
ss58Format: 0,
|
|
2062
|
-
providers: {
|
|
2063
|
-
RPC: 'https://rinkeby.boba.network'
|
|
2064
|
-
},
|
|
2065
|
-
active: false,
|
|
2066
|
-
currentProviderMode: 'http',
|
|
2067
|
-
currentProvider: 'RPC',
|
|
2068
|
-
groups: ['TEST_NET'],
|
|
2069
|
-
isEthereum: true,
|
|
2070
|
-
nativeToken: 'ETH',
|
|
2071
|
-
decimals: 18,
|
|
2072
|
-
evmChainId: 28,
|
|
2073
|
-
supportBonding: false,
|
|
2074
|
-
getStakingOnChain: false,
|
|
2075
|
-
abiExplorer: 'https://blockexplorer.rinkeby.boba.network',
|
|
2076
|
-
supportSmartContract: [ContractType.evm]
|
|
2077
|
-
},
|
|
2078
2057
|
bobabeam: {
|
|
2079
2058
|
key: 'bobabeam',
|
|
2080
2059
|
chain: 'Bobabeam',
|
|
@@ -2889,7 +2868,6 @@ const evmExplorerMap = {
|
|
|
2889
2868
|
ethereum_goerli: 'https://goerli.etherscan.io',
|
|
2890
2869
|
binance: 'https://bscscan.com',
|
|
2891
2870
|
binance_test: 'https://testnet.bscscan.com',
|
|
2892
|
-
boba_rinkeby: 'https://blockexplorer.rinkeby.boba.network',
|
|
2893
2871
|
boba: 'https://blockexplorer.boba.network',
|
|
2894
2872
|
bobabase: 'https://blockexplorer.bobabase.boba.network',
|
|
2895
2873
|
bobabeam: 'https://blockexplorer.bobabeam.boba.network'
|
|
@@ -2767,27 +2767,6 @@ const chainMap = {
|
|
|
2767
2767
|
]
|
|
2768
2768
|
}
|
|
2769
2769
|
},
|
|
2770
|
-
"boba_rinkeby": {
|
|
2771
|
-
"slug": "boba_rinkeby",
|
|
2772
|
-
"name": "Boba Rinkeby (Testnet)",
|
|
2773
|
-
"chainStatus": "ACTIVE",
|
|
2774
|
-
"providers": {
|
|
2775
|
-
"RPC": "https://rinkeby.boba.network"
|
|
2776
|
-
},
|
|
2777
|
-
"isTestnet": true,
|
|
2778
|
-
"substrateInfo": null,
|
|
2779
|
-
"evmInfo": {
|
|
2780
|
-
"evmChainId": 28,
|
|
2781
|
-
"blockExplorer": "https://blockexplorer.rinkeby.boba.network",
|
|
2782
|
-
"symbol": "ETH",
|
|
2783
|
-
"decimals": 18,
|
|
2784
|
-
"existentialDeposit": "0",
|
|
2785
|
-
"supportSmartContract": [
|
|
2786
|
-
"ERC20",
|
|
2787
|
-
"ERC721"
|
|
2788
|
-
]
|
|
2789
|
-
}
|
|
2790
|
-
},
|
|
2791
2770
|
"bobabeam": {
|
|
2792
2771
|
"slug": "bobabeam",
|
|
2793
2772
|
"name": "Bobabeam",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Convert chain list
|
|
2
|
+
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
|
|
5
|
+
const ChainMap = JSON.parse(fs.readFileSync('../data/ChainInfo.json'));
|
|
6
|
+
|
|
7
|
+
const regex = /^https?:\/\/(.+)\.subscan\.io\//;
|
|
8
|
+
Object.entries(ChainMap).forEach(([slug, chain]) => {
|
|
9
|
+
const link = chain.substrateInfo?.blockExplorer || chain.evmInfo?.blockExplorer;
|
|
10
|
+
const match = link && link.match(regex);
|
|
11
|
+
|
|
12
|
+
if (match) {
|
|
13
|
+
console.log(slug, `'${match[1]}'`);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -6,27 +6,51 @@ const CoinGeckoList = JSON.parse(fs.readFileSync('./CoinGeckoTokens.json'));
|
|
|
6
6
|
const AssetMap = JSON.parse(fs.readFileSync('../data/ChainAsset.json'));
|
|
7
7
|
const ChainMap = JSON.parse(fs.readFileSync('../data/ChainInfo.json'));
|
|
8
8
|
|
|
9
|
-
const symbolMap = CoinGeckoList.reduce((map, item) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
// const symbolMap = CoinGeckoList.reduce((map, item) => {
|
|
10
|
+
// if (map[item.symbol]) {
|
|
11
|
+
// map[item.symbol].push(item.id);
|
|
12
|
+
// } else {
|
|
13
|
+
// map[item.symbol] = [item.id];
|
|
14
|
+
// }
|
|
15
|
+
//
|
|
16
|
+
// return map;
|
|
17
|
+
// }, {});
|
|
18
|
+
//
|
|
19
|
+
// Object.entries(AssetMap).forEach(([slug, asset]) => {
|
|
20
|
+
// const lsym = (asset.symbol || '').toLowerCase();
|
|
21
|
+
//
|
|
22
|
+
// if (!asset.priceId && symbolMap[lsym]) {
|
|
23
|
+
// if (ChainMap[asset.originChain] && ChainMap[asset.originChain].isTestnet) {
|
|
24
|
+
// if (asset.priceId) {
|
|
25
|
+
// console.warn(slug);
|
|
26
|
+
// }
|
|
27
|
+
// return;
|
|
28
|
+
// }
|
|
29
|
+
//
|
|
30
|
+
// console.log(slug, asset.originChain, asset.symbol, symbolMap[lsym]);
|
|
31
|
+
// }
|
|
32
|
+
// });
|
|
33
|
+
|
|
34
|
+
// Check priceId not support by coingecko
|
|
35
|
+
const priceIdMap = CoinGeckoList.reduce((map, item) => {
|
|
36
|
+
map[item.id] = item.symbol.toLowerCase();
|
|
15
37
|
|
|
16
38
|
return map;
|
|
17
39
|
}, {});
|
|
18
40
|
|
|
19
41
|
Object.entries(AssetMap).forEach(([slug, asset]) => {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
return;
|
|
42
|
+
const priceId = asset.priceId;
|
|
43
|
+
const networkInfo = ChainMap[asset.originChain];
|
|
44
|
+
|
|
45
|
+
if (networkInfo.isTestnet || !priceId) {
|
|
46
|
+
if (priceId) {
|
|
47
|
+
console.error('error', slug);
|
|
28
48
|
}
|
|
29
49
|
|
|
30
|
-
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if ((priceId && !priceIdMap[priceId]) || (asset.symbol.toLowerCase() !== priceIdMap[priceId])) {
|
|
54
|
+
console.log(slug, asset.priceId, priceIdMap[priceId]);
|
|
31
55
|
}
|
|
32
56
|
});
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"./cjs/detectPackage.js"
|
|
21
21
|
],
|
|
22
22
|
"type": "module",
|
|
23
|
-
"version": "0.0.
|
|
23
|
+
"version": "0.0.25",
|
|
24
24
|
"main": "./cjs/index.js",
|
|
25
25
|
"module": "./index.js",
|
|
26
26
|
"types": "./index.d.ts",
|
|
@@ -251,6 +251,7 @@
|
|
|
251
251
|
"./migrate/CoinGeckoTokens.json": "./migrate/CoinGeckoTokens.json",
|
|
252
252
|
"./migrate/convert-change-list": "./migrate/convert-change-list.js",
|
|
253
253
|
"./migrate/generate-native-tokens": "./migrate/generate-native-tokens.js",
|
|
254
|
+
"./migrate/subscan-support-map": "./migrate/subscan-support-map.js",
|
|
254
255
|
"./migrate/update-price-symbol": "./migrate/update-price-symbol.js",
|
|
255
256
|
"./migrate/validate-chainAsset": "./migrate/validate-chainAsset.js",
|
|
256
257
|
"./package.json": "./package.json",
|
package/packageInfo.js
CHANGED
|
@@ -7,5 +7,5 @@ export const packageInfo = {
|
|
|
7
7
|
name: '@subwallet/chain-list',
|
|
8
8
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
9
9
|
type: 'esm',
|
|
10
|
-
version: '0.0.
|
|
10
|
+
version: '0.0.25'
|
|
11
11
|
};
|