@lifi/types 8.0.4 → 9.0.0-alpha.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/CHANGELOG.md +8 -1
- package/dist/base.d.ts +4 -2
- package/dist/base.js +2 -0
- package/dist/chains/supported.chains.js +2 -1
- package/dist/cjs/base.d.ts +4 -2
- package/dist/cjs/base.js +2 -0
- package/dist/cjs/chains/supported.chains.js +2 -1
- package/dist/cjs/multicall.js +5 -2
- package/dist/multicall.js +5 -2
- package/package.json +13 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,14 @@
|
|
|
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
|
-
|
|
5
|
+
## [8.2.0](https://github.com/lifinance/types/compare/v8.0.4...v8.2.0) (2023-07-26)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add LNA and update multicall addresses ([#182](https://github.com/lifinance/types/issues/182)) ([6a4b374](https://github.com/lifinance/types/commit/6a4b374cb43c822e2014e98e24c61e8d88a1f25c))
|
|
11
|
+
|
|
12
|
+
### [8.1.0](https://github.com/lifinance/types/compare/v8.0.3...v8.1.0) (2023-07-20)
|
|
6
13
|
|
|
7
14
|
|
|
8
15
|
### Bug Fixes
|
package/dist/base.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ export declare enum ChainKey {
|
|
|
97
97
|
ARN = "arn",
|
|
98
98
|
ERA = "era",
|
|
99
99
|
PZE = "pze",
|
|
100
|
+
LNA = "lna",
|
|
100
101
|
GOR = "gor",
|
|
101
102
|
METT = "mett",
|
|
102
103
|
DIOT = "diot",
|
|
@@ -157,6 +158,7 @@ export declare enum ChainId {
|
|
|
157
158
|
ARN = 42170,
|
|
158
159
|
ERA = 324,
|
|
159
160
|
PZE = 1101,
|
|
161
|
+
LNA = 59144,
|
|
160
162
|
GOR = 5,
|
|
161
163
|
METT = 12,
|
|
162
164
|
DIOT = 13,
|
|
@@ -193,8 +195,8 @@ export interface Token extends StaticToken {
|
|
|
193
195
|
priceUSD: string;
|
|
194
196
|
}
|
|
195
197
|
export interface TokenAmount extends Token {
|
|
196
|
-
amount
|
|
197
|
-
blockNumber?:
|
|
198
|
+
amount?: bigint;
|
|
199
|
+
blockNumber?: bigint;
|
|
198
200
|
}
|
|
199
201
|
export interface Coin {
|
|
200
202
|
key: CoinKey;
|
package/dist/base.js
CHANGED
|
@@ -101,6 +101,7 @@ export var ChainKey;
|
|
|
101
101
|
ChainKey["ARN"] = "arn";
|
|
102
102
|
ChainKey["ERA"] = "era";
|
|
103
103
|
ChainKey["PZE"] = "pze";
|
|
104
|
+
ChainKey["LNA"] = "lna";
|
|
104
105
|
// Testnets
|
|
105
106
|
ChainKey["GOR"] = "gor";
|
|
106
107
|
ChainKey["METT"] = "mett";
|
|
@@ -163,6 +164,7 @@ export var ChainId;
|
|
|
163
164
|
ChainId[ChainId["ARN"] = 42170] = "ARN";
|
|
164
165
|
ChainId[ChainId["ERA"] = 324] = "ERA";
|
|
165
166
|
ChainId[ChainId["PZE"] = 1101] = "PZE";
|
|
167
|
+
ChainId[ChainId["LNA"] = 59144] = "LNA";
|
|
166
168
|
// Testnets
|
|
167
169
|
ChainId[ChainId["GOR"] = 5] = "GOR";
|
|
168
170
|
ChainId[ChainId["METT"] = 12] = "METT";
|
|
@@ -773,6 +773,7 @@ export const supportedEVMChains = [
|
|
|
773
773
|
id: 324,
|
|
774
774
|
mainnet: true,
|
|
775
775
|
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/zksync.png',
|
|
776
|
+
multicallAddress: multicallAddresses[ChainId.ERA],
|
|
776
777
|
metamask: {
|
|
777
778
|
chainId: prefixChainId(324),
|
|
778
779
|
blockExplorerUrls: ['https://zkscan.io/'],
|
|
@@ -1111,7 +1112,7 @@ export const supportedEVMChains = [
|
|
|
1111
1112
|
id: 59140,
|
|
1112
1113
|
mainnet: false,
|
|
1113
1114
|
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/linea.svg',
|
|
1114
|
-
|
|
1115
|
+
multicallAddress: multicallAddresses[ChainId.LNAT],
|
|
1115
1116
|
faucetUrls: ['https://faucetlink.to/goerli'],
|
|
1116
1117
|
metamask: {
|
|
1117
1118
|
chainId: prefixChainId(59140),
|
package/dist/cjs/base.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ export declare enum ChainKey {
|
|
|
97
97
|
ARN = "arn",
|
|
98
98
|
ERA = "era",
|
|
99
99
|
PZE = "pze",
|
|
100
|
+
LNA = "lna",
|
|
100
101
|
GOR = "gor",
|
|
101
102
|
METT = "mett",
|
|
102
103
|
DIOT = "diot",
|
|
@@ -157,6 +158,7 @@ export declare enum ChainId {
|
|
|
157
158
|
ARN = 42170,
|
|
158
159
|
ERA = 324,
|
|
159
160
|
PZE = 1101,
|
|
161
|
+
LNA = 59144,
|
|
160
162
|
GOR = 5,
|
|
161
163
|
METT = 12,
|
|
162
164
|
DIOT = 13,
|
|
@@ -193,8 +195,8 @@ export interface Token extends StaticToken {
|
|
|
193
195
|
priceUSD: string;
|
|
194
196
|
}
|
|
195
197
|
export interface TokenAmount extends Token {
|
|
196
|
-
amount
|
|
197
|
-
blockNumber?:
|
|
198
|
+
amount?: bigint;
|
|
199
|
+
blockNumber?: bigint;
|
|
198
200
|
}
|
|
199
201
|
export interface Coin {
|
|
200
202
|
key: CoinKey;
|
package/dist/cjs/base.js
CHANGED
|
@@ -104,6 +104,7 @@ var ChainKey;
|
|
|
104
104
|
ChainKey["ARN"] = "arn";
|
|
105
105
|
ChainKey["ERA"] = "era";
|
|
106
106
|
ChainKey["PZE"] = "pze";
|
|
107
|
+
ChainKey["LNA"] = "lna";
|
|
107
108
|
// Testnets
|
|
108
109
|
ChainKey["GOR"] = "gor";
|
|
109
110
|
ChainKey["METT"] = "mett";
|
|
@@ -166,6 +167,7 @@ var ChainId;
|
|
|
166
167
|
ChainId[ChainId["ARN"] = 42170] = "ARN";
|
|
167
168
|
ChainId[ChainId["ERA"] = 324] = "ERA";
|
|
168
169
|
ChainId[ChainId["PZE"] = 1101] = "PZE";
|
|
170
|
+
ChainId[ChainId["LNA"] = 59144] = "LNA";
|
|
169
171
|
// Testnets
|
|
170
172
|
ChainId[ChainId["GOR"] = 5] = "GOR";
|
|
171
173
|
ChainId[ChainId["METT"] = 12] = "METT";
|
|
@@ -776,6 +776,7 @@ exports.supportedEVMChains = [
|
|
|
776
776
|
id: 324,
|
|
777
777
|
mainnet: true,
|
|
778
778
|
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/zksync.png',
|
|
779
|
+
multicallAddress: multicall_1.multicallAddresses[base_1.ChainId.ERA],
|
|
779
780
|
metamask: {
|
|
780
781
|
chainId: (0, EVMChain_1.prefixChainId)(324),
|
|
781
782
|
blockExplorerUrls: ['https://zkscan.io/'],
|
|
@@ -1114,7 +1115,7 @@ exports.supportedEVMChains = [
|
|
|
1114
1115
|
id: 59140,
|
|
1115
1116
|
mainnet: false,
|
|
1116
1117
|
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/linea.svg',
|
|
1117
|
-
|
|
1118
|
+
multicallAddress: multicall_1.multicallAddresses[base_1.ChainId.LNAT],
|
|
1118
1119
|
faucetUrls: ['https://faucetlink.to/goerli'],
|
|
1119
1120
|
metamask: {
|
|
1120
1121
|
chainId: (0, EVMChain_1.prefixChainId)(59140),
|
package/dist/cjs/multicall.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.multicallAddresses = void 0;
|
|
4
4
|
const _1 = require(".");
|
|
5
5
|
// based on:
|
|
6
|
+
// new nice tool to search for addresses: https://www.multicall3.com/deployments
|
|
6
7
|
// - https://github.com/mds1/multicall#deployments
|
|
7
8
|
// - https://github.com/sushiswap/sushiswap-sdk/blob/canary/src/constants/addresses.ts#L323
|
|
8
9
|
// - https://github.com/joshstevens19/ethereum-multicall#multicall-contracts
|
|
@@ -35,9 +36,10 @@ exports.multicallAddresses = {
|
|
|
35
36
|
[_1.ChainId.RSK]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
36
37
|
[_1.ChainId.VEL]: '0x6ede559F2Bd951777470595761672091CCD21Ac6',
|
|
37
38
|
[_1.ChainId.PZE]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
38
|
-
|
|
39
|
+
[_1.ChainId.ERA]: '0xF9cda624FBC7e059355ce98a31693d299FACd963',
|
|
40
|
+
[_1.ChainId.LNA]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
41
|
+
[_1.ChainId.ARN]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
39
42
|
// TODO
|
|
40
|
-
// [ChainId.ARN]: '', // TODO
|
|
41
43
|
// [ChainId.EXP]: '', // TODO
|
|
42
44
|
// [ChainId.TCH]: '', // TODO
|
|
43
45
|
// [ChainId.UBQ]: '', // TODO
|
|
@@ -60,6 +62,7 @@ exports.multicallAddresses = {
|
|
|
60
62
|
[_1.ChainId.FTMT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
61
63
|
[_1.ChainId.RSKT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
62
64
|
[_1.ChainId.ARBG]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
65
|
+
[_1.ChainId.LNAT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
63
66
|
// TODO
|
|
64
67
|
// [ChainId.METT]: '', // TODO
|
|
65
68
|
// [ChainId.DIOT]: '', // TODO
|
package/dist/multicall.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChainId } from '.';
|
|
2
2
|
// based on:
|
|
3
|
+
// new nice tool to search for addresses: https://www.multicall3.com/deployments
|
|
3
4
|
// - https://github.com/mds1/multicall#deployments
|
|
4
5
|
// - https://github.com/sushiswap/sushiswap-sdk/blob/canary/src/constants/addresses.ts#L323
|
|
5
6
|
// - https://github.com/joshstevens19/ethereum-multicall#multicall-contracts
|
|
@@ -32,9 +33,10 @@ export const multicallAddresses = {
|
|
|
32
33
|
[ChainId.RSK]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
33
34
|
[ChainId.VEL]: '0x6ede559F2Bd951777470595761672091CCD21Ac6',
|
|
34
35
|
[ChainId.PZE]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
35
|
-
|
|
36
|
+
[ChainId.ERA]: '0xF9cda624FBC7e059355ce98a31693d299FACd963',
|
|
37
|
+
[ChainId.LNA]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
38
|
+
[ChainId.ARN]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
36
39
|
// TODO
|
|
37
|
-
// [ChainId.ARN]: '', // TODO
|
|
38
40
|
// [ChainId.EXP]: '', // TODO
|
|
39
41
|
// [ChainId.TCH]: '', // TODO
|
|
40
42
|
// [ChainId.UBQ]: '', // TODO
|
|
@@ -57,6 +59,7 @@ export const multicallAddresses = {
|
|
|
57
59
|
[ChainId.FTMT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
58
60
|
[ChainId.RSKT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
59
61
|
[ChainId.ARBG]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
62
|
+
[ChainId.LNAT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
60
63
|
// TODO
|
|
61
64
|
// [ChainId.METT]: '', // TODO
|
|
62
65
|
// [ChainId.DIOT]: '', // TODO
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-alpha.0",
|
|
4
4
|
"description": "Types for the LI.FI stack",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -10,23 +10,25 @@
|
|
|
10
10
|
"import": "./dist/index.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"
|
|
13
|
+
"addscope": "node tools/packagejson name @lifi/types",
|
|
14
14
|
"build": "node tools/cleanup types && tsc -p ./tsconfig.json && tsc -p ./tsconfig.cjs.json",
|
|
15
15
|
"clean": "node tools/cleanup",
|
|
16
|
+
"lint:fix": "eslint --ext .tsx --ext .ts ./src --fix",
|
|
16
17
|
"package": "npm run build && npm pack",
|
|
17
|
-
"
|
|
18
|
-
"test:cov": "jest --coverage --no-cache --runInBand",
|
|
19
|
-
"addscope": "node tools/packagejson name @lifi/types",
|
|
18
|
+
"postpublish": "npm run use:gitReadme && pinst --enable",
|
|
20
19
|
"pre-commit": "lint-staged",
|
|
21
20
|
"pre-push": "yarn build && yarn test",
|
|
22
|
-
"
|
|
21
|
+
"prepare": "husky install",
|
|
22
|
+
"prepublishOnly": "run-s build use:npmReadme && pinst --enable",
|
|
23
23
|
"prettier:fix": "prettier --write ./src/.",
|
|
24
|
-
"
|
|
24
|
+
"release": "standard-version -a",
|
|
25
|
+
"release:alpha": "standard-version -a --prerelease alpha --skip.changelog",
|
|
26
|
+
"release:beta": "standard-version -a --prerelease beta --skip.changelog",
|
|
27
|
+
"test": "jest --no-cache --runInBand",
|
|
28
|
+
"test:cov": "jest --coverage --no-cache --runInBand",
|
|
25
29
|
"use:gitReadme": "mv 'README.md' 'npm.README.md' && mv 'git.README.md' 'README.md'",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"prepare": "husky install",
|
|
29
|
-
"release": "standard-version"
|
|
30
|
+
"use:npmReadme": "mv 'README.md' 'git.README.md' && mv 'npm.README.md' 'README.md'",
|
|
31
|
+
"watch": "tsc -w -p ./tsconfig.json"
|
|
30
32
|
},
|
|
31
33
|
"lint-staged": {
|
|
32
34
|
"src/**/*.{ts,tsx}": [
|