@lifi/types 8.0.1 → 8.0.3
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/CHANGELOG.md +16 -0
- package/dist/chains/supported.chains.js +2 -2
- package/dist/cjs/chains/supported.chains.js +2 -2
- package/dist/cjs/coins.js +11 -14
- package/dist/coins.js +11 -14
- package/package.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [8.0.3](https://github.com/lifinance/types/compare/v8.0.2...v8.0.3) (2023-07-04)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* remove unused and failing install script ([#177](https://github.com/lifinance/types/issues/177)) ([334b69b](https://github.com/lifinance/types/commit/334b69bd462f60dd36fdc43a54228d08b9a43b8a))
|
|
11
|
+
* set right polygon zkevm WETH address ([67d39bb](https://github.com/lifinance/types/commit/67d39bb60423f96f142d38e3ff2e6466d2f8f0a8))
|
|
12
|
+
* validate chains with custom matchers ([#178](https://github.com/lifinance/types/issues/178)) ([780a6d0](https://github.com/lifinance/types/commit/780a6d0fabb3b07464b63d0fc1132c462d3d63de))
|
|
13
|
+
|
|
14
|
+
### [8.0.2](https://github.com/lifinance/types/compare/v8.0.1...v8.0.2) (2023-06-30)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* findTokenByChainIdAndAddress was broken ([#176](https://github.com/lifinance/types/issues/176)) ([04db211](https://github.com/lifinance/types/commit/04db2111a7254014d274352b23e90f57c48b8c7e))
|
|
20
|
+
|
|
5
21
|
### [8.0.1](https://github.com/lifinance/types/compare/v8.0.0...v8.0.1) (2023-06-29)
|
|
6
22
|
|
|
7
23
|
|
|
@@ -797,7 +797,7 @@ export const supportedEVMChains = [
|
|
|
797
797
|
multicallAddress: multicallAddresses[ChainId.PZE],
|
|
798
798
|
metamask: {
|
|
799
799
|
chainId: prefixChainId(1101),
|
|
800
|
-
blockExplorerUrls: ['https://zkevm.polygonscan.com'],
|
|
800
|
+
blockExplorerUrls: ['https://zkevm.polygonscan.com/'],
|
|
801
801
|
chainName: 'Polygon zkEVM',
|
|
802
802
|
nativeCurrency: {
|
|
803
803
|
name: 'ETH',
|
|
@@ -932,7 +932,7 @@ export const supportedEVMChains = [
|
|
|
932
932
|
faucetUrls: ['https://gateway.optimism.io/'],
|
|
933
933
|
multicallAddress: multicallAddresses[ChainId.OPTG],
|
|
934
934
|
metamask: {
|
|
935
|
-
chainId: prefixChainId(
|
|
935
|
+
chainId: prefixChainId(420),
|
|
936
936
|
blockExplorerUrls: ['https://blockscout.com/optimism/goerli/'],
|
|
937
937
|
chainName: 'Optimistic Ethereum Testnet Goerli',
|
|
938
938
|
nativeCurrency: {
|
|
@@ -800,7 +800,7 @@ exports.supportedEVMChains = [
|
|
|
800
800
|
multicallAddress: multicall_1.multicallAddresses[base_1.ChainId.PZE],
|
|
801
801
|
metamask: {
|
|
802
802
|
chainId: (0, EVMChain_1.prefixChainId)(1101),
|
|
803
|
-
blockExplorerUrls: ['https://zkevm.polygonscan.com'],
|
|
803
|
+
blockExplorerUrls: ['https://zkevm.polygonscan.com/'],
|
|
804
804
|
chainName: 'Polygon zkEVM',
|
|
805
805
|
nativeCurrency: {
|
|
806
806
|
name: 'ETH',
|
|
@@ -935,7 +935,7 @@ exports.supportedEVMChains = [
|
|
|
935
935
|
faucetUrls: ['https://gateway.optimism.io/'],
|
|
936
936
|
multicallAddress: multicall_1.multicallAddresses[base_1.ChainId.OPTG],
|
|
937
937
|
metamask: {
|
|
938
|
-
chainId: (0, EVMChain_1.prefixChainId)(
|
|
938
|
+
chainId: (0, EVMChain_1.prefixChainId)(420),
|
|
939
939
|
blockExplorerUrls: ['https://blockscout.com/optimism/goerli/'],
|
|
940
940
|
chainName: 'Optimistic Ethereum Testnet Goerli',
|
|
941
941
|
nativeCurrency: {
|
package/dist/cjs/coins.js
CHANGED
|
@@ -338,7 +338,7 @@ const basicCoins = [
|
|
|
338
338
|
{
|
|
339
339
|
key: base_1.CoinKey.FTM,
|
|
340
340
|
name: base_1.CoinKey.FTM,
|
|
341
|
-
logoURI: 'https://
|
|
341
|
+
logoURI: 'https://static.debank.com/image/ftm_token/logo_url/ftm/33fdb9c5067e94f3a1b9e78f6fa86984.png',
|
|
342
342
|
verified: true,
|
|
343
343
|
chains: {
|
|
344
344
|
[base_1.ChainId.FTM]: {
|
|
@@ -978,6 +978,7 @@ const basicCoins = [
|
|
|
978
978
|
chains: {
|
|
979
979
|
[base_1.ChainId.GOR]: {
|
|
980
980
|
address: '0x7ea6eA49B0b0Ae9c5db7907d139D9Cd3439862a1',
|
|
981
|
+
name: 'Goerli CXTT',
|
|
981
982
|
decimals: 18,
|
|
982
983
|
},
|
|
983
984
|
[base_1.ChainId.LNAT]: {
|
|
@@ -1477,7 +1478,7 @@ const basicCoins = [
|
|
|
1477
1478
|
},
|
|
1478
1479
|
];
|
|
1479
1480
|
exports.defaultCoins = basicCoins.map((coin) => {
|
|
1480
|
-
var _a, _b;
|
|
1481
|
+
var _a, _b, _c;
|
|
1481
1482
|
const defaultCoin = {
|
|
1482
1483
|
key: coin.key,
|
|
1483
1484
|
name: coin.name,
|
|
@@ -1492,7 +1493,7 @@ exports.defaultCoins = basicCoins.map((coin) => {
|
|
|
1492
1493
|
symbol: (_a = token.symbol) !== null && _a !== void 0 ? _a : coin.key,
|
|
1493
1494
|
chainId: parseInt(chainId),
|
|
1494
1495
|
coinKey: coin.key,
|
|
1495
|
-
name: (_b = token.name) !== null && _b !== void 0 ? _b : coin.key,
|
|
1496
|
+
name: (_c = (_b = token.name) !== null && _b !== void 0 ? _b : coin.name) !== null && _c !== void 0 ? _c : coin.key,
|
|
1496
1497
|
logoURI: coin.logoURI,
|
|
1497
1498
|
};
|
|
1498
1499
|
}
|
|
@@ -1571,7 +1572,7 @@ exports.wrappedTokens = {
|
|
|
1571
1572
|
},
|
|
1572
1573
|
[base_1.ChainId.PZE]: {
|
|
1573
1574
|
// https://zkevm.polygonscan.com/token/0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9
|
|
1574
|
-
address: '
|
|
1575
|
+
address: '0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9',
|
|
1575
1576
|
symbol: 'WETH',
|
|
1576
1577
|
decimals: 18,
|
|
1577
1578
|
chainId: base_1.ChainId.PZE,
|
|
@@ -1782,7 +1783,7 @@ exports.wrappedTokens = {
|
|
|
1782
1783
|
chainId: base_1.ChainId.BSCT,
|
|
1783
1784
|
coinKey: 'WBNB',
|
|
1784
1785
|
name: 'WBNB',
|
|
1785
|
-
logoURI: 'https://
|
|
1786
|
+
logoURI: 'https://static.debank.com/image/coin/logo_url/bnb/9784283a36f23a58982fc964574ea530.png',
|
|
1786
1787
|
},
|
|
1787
1788
|
[base_1.ChainId.LNAT]: {
|
|
1788
1789
|
// https://explorer.prealpha.zkevm.consensys.net/address/0x2C1b868d6596a18e32E61B901E4060C872647b6C
|
|
@@ -1831,14 +1832,10 @@ const findWrappedGasOnChain = (chainId) => {
|
|
|
1831
1832
|
};
|
|
1832
1833
|
exports.findWrappedGasOnChain = findWrappedGasOnChain;
|
|
1833
1834
|
const findTokenByChainIdAndAddress = (chainId, tokenAddress) => {
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
}
|
|
1840
|
-
});
|
|
1841
|
-
});
|
|
1842
|
-
return token;
|
|
1835
|
+
var _a;
|
|
1836
|
+
return ((_a = exports.defaultCoins
|
|
1837
|
+
.flatMap(({ chains }) => Object.values(chains))
|
|
1838
|
+
.find((token) => token.chainId === chainId &&
|
|
1839
|
+
tokenAddress.toLowerCase() === token.address.toLowerCase())) !== null && _a !== void 0 ? _a : null);
|
|
1843
1840
|
};
|
|
1844
1841
|
exports.findTokenByChainIdAndAddress = findTokenByChainIdAndAddress;
|
package/dist/coins.js
CHANGED
|
@@ -335,7 +335,7 @@ const basicCoins = [
|
|
|
335
335
|
{
|
|
336
336
|
key: CoinKey.FTM,
|
|
337
337
|
name: CoinKey.FTM,
|
|
338
|
-
logoURI: 'https://
|
|
338
|
+
logoURI: 'https://static.debank.com/image/ftm_token/logo_url/ftm/33fdb9c5067e94f3a1b9e78f6fa86984.png',
|
|
339
339
|
verified: true,
|
|
340
340
|
chains: {
|
|
341
341
|
[ChainId.FTM]: {
|
|
@@ -975,6 +975,7 @@ const basicCoins = [
|
|
|
975
975
|
chains: {
|
|
976
976
|
[ChainId.GOR]: {
|
|
977
977
|
address: '0x7ea6eA49B0b0Ae9c5db7907d139D9Cd3439862a1',
|
|
978
|
+
name: 'Goerli CXTT',
|
|
978
979
|
decimals: 18,
|
|
979
980
|
},
|
|
980
981
|
[ChainId.LNAT]: {
|
|
@@ -1474,7 +1475,7 @@ const basicCoins = [
|
|
|
1474
1475
|
},
|
|
1475
1476
|
];
|
|
1476
1477
|
export const defaultCoins = basicCoins.map((coin) => {
|
|
1477
|
-
var _a, _b;
|
|
1478
|
+
var _a, _b, _c;
|
|
1478
1479
|
const defaultCoin = {
|
|
1479
1480
|
key: coin.key,
|
|
1480
1481
|
name: coin.name,
|
|
@@ -1489,7 +1490,7 @@ export const defaultCoins = basicCoins.map((coin) => {
|
|
|
1489
1490
|
symbol: (_a = token.symbol) !== null && _a !== void 0 ? _a : coin.key,
|
|
1490
1491
|
chainId: parseInt(chainId),
|
|
1491
1492
|
coinKey: coin.key,
|
|
1492
|
-
name: (_b = token.name) !== null && _b !== void 0 ? _b : coin.key,
|
|
1493
|
+
name: (_c = (_b = token.name) !== null && _b !== void 0 ? _b : coin.name) !== null && _c !== void 0 ? _c : coin.key,
|
|
1493
1494
|
logoURI: coin.logoURI,
|
|
1494
1495
|
};
|
|
1495
1496
|
}
|
|
@@ -1568,7 +1569,7 @@ export const wrappedTokens = {
|
|
|
1568
1569
|
},
|
|
1569
1570
|
[ChainId.PZE]: {
|
|
1570
1571
|
// https://zkevm.polygonscan.com/token/0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9
|
|
1571
|
-
address: '
|
|
1572
|
+
address: '0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9',
|
|
1572
1573
|
symbol: 'WETH',
|
|
1573
1574
|
decimals: 18,
|
|
1574
1575
|
chainId: ChainId.PZE,
|
|
@@ -1779,7 +1780,7 @@ export const wrappedTokens = {
|
|
|
1779
1780
|
chainId: ChainId.BSCT,
|
|
1780
1781
|
coinKey: 'WBNB',
|
|
1781
1782
|
name: 'WBNB',
|
|
1782
|
-
logoURI: 'https://
|
|
1783
|
+
logoURI: 'https://static.debank.com/image/coin/logo_url/bnb/9784283a36f23a58982fc964574ea530.png',
|
|
1783
1784
|
},
|
|
1784
1785
|
[ChainId.LNAT]: {
|
|
1785
1786
|
// https://explorer.prealpha.zkevm.consensys.net/address/0x2C1b868d6596a18e32E61B901E4060C872647b6C
|
|
@@ -1825,13 +1826,9 @@ export const findWrappedGasOnChain = (chainId) => {
|
|
|
1825
1826
|
return token;
|
|
1826
1827
|
};
|
|
1827
1828
|
export const findTokenByChainIdAndAddress = (chainId, tokenAddress) => {
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
}
|
|
1834
|
-
});
|
|
1835
|
-
});
|
|
1836
|
-
return token;
|
|
1829
|
+
var _a;
|
|
1830
|
+
return ((_a = defaultCoins
|
|
1831
|
+
.flatMap(({ chains }) => Object.values(chains))
|
|
1832
|
+
.find((token) => token.chainId === chainId &&
|
|
1833
|
+
tokenAddress.toLowerCase() === token.address.toLowerCase())) !== null && _a !== void 0 ? _a : null);
|
|
1837
1834
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/types",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"description": "Types for the LI.FI stack",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"import": "./dist/index.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"install": "node -e \"if (!require('fs').existsSync('./dist')){process.exit(1)}\" || npm run build",
|
|
14
13
|
"watch": "tsc -w -p ./tsconfig.json",
|
|
15
14
|
"build": "node tools/cleanup types && tsc -p ./tsconfig.json && tsc -p ./tsconfig.cjs.json",
|
|
16
15
|
"clean": "node tools/cleanup",
|