@lifi/types 8.0.4 → 8.2.1-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 +10 -1
- package/dist/api.d.ts +10 -4
- package/dist/base.d.ts +2 -0
- package/dist/base.js +2 -0
- package/dist/chains/supported.chains.js +2 -1
- package/dist/cjs/api.d.ts +10 -4
- package/dist/cjs/base.d.ts +2 -0
- 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 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,16 @@
|
|
|
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
|
|
5
|
+
### [8.2.1-alpha.0](https://github.com/lifinance/types/compare/v8.2.0...v8.2.1-alpha.0) (2023-08-08)
|
|
6
|
+
|
|
7
|
+
## [8.2.0](https://github.com/lifinance/types/compare/v8.0.4...v8.2.0) (2023-07-26)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add LNA and update multicall addresses ([#182](https://github.com/lifinance/types/issues/182)) ([6a4b374](https://github.com/lifinance/types/commit/6a4b374cb43c822e2014e98e24c61e8d88a1f25c))
|
|
13
|
+
|
|
14
|
+
### [8.1.0](https://github.com/lifinance/types/compare/v8.0.3...v8.1.0) (2023-07-20)
|
|
6
15
|
|
|
7
16
|
|
|
8
17
|
### Bug Fixes
|
package/dist/api.d.ts
CHANGED
|
@@ -146,6 +146,15 @@ export interface QuoteRequest extends ToolConfiguration {
|
|
|
146
146
|
fromAmountForGas?: string;
|
|
147
147
|
maxPriceImpact?: number;
|
|
148
148
|
}
|
|
149
|
+
export interface ContractCall {
|
|
150
|
+
fromAmount: string;
|
|
151
|
+
fromTokenAddress: string;
|
|
152
|
+
toContractAddress: string;
|
|
153
|
+
toContractCallData: string;
|
|
154
|
+
toContractGasLimit: string;
|
|
155
|
+
toApprovalAddress?: string;
|
|
156
|
+
toTokenAddress?: string;
|
|
157
|
+
}
|
|
149
158
|
export interface ContractCallQuoteRequest extends ToolConfiguration {
|
|
150
159
|
fromChain: number | string;
|
|
151
160
|
fromToken: string;
|
|
@@ -153,12 +162,9 @@ export interface ContractCallQuoteRequest extends ToolConfiguration {
|
|
|
153
162
|
toChain: number | string;
|
|
154
163
|
toToken: string;
|
|
155
164
|
toAmount: string;
|
|
156
|
-
toContractAddress: string;
|
|
157
|
-
toContractCallData: string;
|
|
158
|
-
toContractGasLimit: string;
|
|
159
|
-
toApprovalAddress?: string;
|
|
160
165
|
toFallbackAddress?: string;
|
|
161
166
|
contractOutputsToken?: string;
|
|
167
|
+
contractCalls: ContractCall[];
|
|
162
168
|
slippage?: number | string;
|
|
163
169
|
integrator?: string;
|
|
164
170
|
referrer?: string;
|
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,
|
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/api.d.ts
CHANGED
|
@@ -146,6 +146,15 @@ export interface QuoteRequest extends ToolConfiguration {
|
|
|
146
146
|
fromAmountForGas?: string;
|
|
147
147
|
maxPriceImpact?: number;
|
|
148
148
|
}
|
|
149
|
+
export interface ContractCall {
|
|
150
|
+
fromAmount: string;
|
|
151
|
+
fromTokenAddress: string;
|
|
152
|
+
toContractAddress: string;
|
|
153
|
+
toContractCallData: string;
|
|
154
|
+
toContractGasLimit: string;
|
|
155
|
+
toApprovalAddress?: string;
|
|
156
|
+
toTokenAddress?: string;
|
|
157
|
+
}
|
|
149
158
|
export interface ContractCallQuoteRequest extends ToolConfiguration {
|
|
150
159
|
fromChain: number | string;
|
|
151
160
|
fromToken: string;
|
|
@@ -153,12 +162,9 @@ export interface ContractCallQuoteRequest extends ToolConfiguration {
|
|
|
153
162
|
toChain: number | string;
|
|
154
163
|
toToken: string;
|
|
155
164
|
toAmount: string;
|
|
156
|
-
toContractAddress: string;
|
|
157
|
-
toContractCallData: string;
|
|
158
|
-
toContractGasLimit: string;
|
|
159
|
-
toApprovalAddress?: string;
|
|
160
165
|
toFallbackAddress?: string;
|
|
161
166
|
contractOutputsToken?: string;
|
|
167
|
+
contractCalls: ContractCall[];
|
|
162
168
|
slippage?: number | string;
|
|
163
169
|
integrator?: string;
|
|
164
170
|
referrer?: string;
|
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,
|
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
|