@lifi/types 1.5.1 → 1.6.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 -0
- package/dist/base.d.ts +2 -0
- package/dist/base.js +2 -0
- package/dist/chains/supported.chains.js +23 -0
- package/dist/cjs/base.d.ts +2 -0
- package/dist/cjs/base.js +2 -0
- package/dist/cjs/chains/supported.chains.js +23 -0
- package/dist/cjs/coins.js +18 -0
- package/dist/cjs/multicall.js +1 -0
- package/dist/cjs/step.d.ts +2 -0
- package/dist/coins.js +18 -0
- package/dist/multicall.js +1 -0
- package/dist/step.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +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
|
+
## [1.6.0](https://github.com/lifinance/types/compare/v1.5.1...v1.6.0) (2022-09-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add gasInformation to execution object ([#89](https://github.com/lifinance/types/issues/89)) ([a0e30e9](https://github.com/lifinance/types/commit/a0e30e96497b58d02b980efcff1578e8aeb424c3))
|
|
11
|
+
* add optimism goerli ([#94](https://github.com/lifinance/types/issues/94)) ([899089a](https://github.com/lifinance/types/commit/899089acd3572678614a898f958abcbde00d2bd9))
|
|
12
|
+
|
|
5
13
|
### [1.5.1](https://github.com/lifinance/types/compare/v1.5.0...v1.5.1) (2022-08-19)
|
|
6
14
|
|
|
7
15
|
## [1.5.0](https://github.com/lifinance/types/compare/v1.4.1...v1.5.0) (2022-08-10)
|
package/dist/base.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export declare enum ChainKey {
|
|
|
90
90
|
MUM = "mum",
|
|
91
91
|
ARBT = "arbt",
|
|
92
92
|
OPTT = "optt",
|
|
93
|
+
OPTG = "optg",
|
|
93
94
|
BSCT = "bsct",
|
|
94
95
|
HECT = "hect",
|
|
95
96
|
ONET = "onet",
|
|
@@ -149,6 +150,7 @@ export declare enum ChainId {
|
|
|
149
150
|
MUM = 80001,
|
|
150
151
|
ARBT = 421611,
|
|
151
152
|
OPTT = 69,
|
|
153
|
+
OPTG = 420,
|
|
152
154
|
BSCT = 97,
|
|
153
155
|
HECT = 256,
|
|
154
156
|
ONET = 1666700000,
|
package/dist/base.js
CHANGED
|
@@ -94,6 +94,7 @@ export var ChainKey;
|
|
|
94
94
|
ChainKey["MUM"] = "mum";
|
|
95
95
|
ChainKey["ARBT"] = "arbt";
|
|
96
96
|
ChainKey["OPTT"] = "optt";
|
|
97
|
+
ChainKey["OPTG"] = "optg";
|
|
97
98
|
ChainKey["BSCT"] = "bsct";
|
|
98
99
|
ChainKey["HECT"] = "hect";
|
|
99
100
|
ChainKey["ONET"] = "onet";
|
|
@@ -155,6 +156,7 @@ export var ChainId;
|
|
|
155
156
|
ChainId[ChainId["MUM"] = 80001] = "MUM";
|
|
156
157
|
ChainId[ChainId["ARBT"] = 421611] = "ARBT";
|
|
157
158
|
ChainId[ChainId["OPTT"] = 69] = "OPTT";
|
|
159
|
+
ChainId[ChainId["OPTG"] = 420] = "OPTG";
|
|
158
160
|
ChainId[ChainId["BSCT"] = 97] = "BSCT";
|
|
159
161
|
ChainId[ChainId["HECT"] = 256] = "HECT";
|
|
160
162
|
ChainId[ChainId["ONET"] = 1666700000] = "ONET";
|
|
@@ -981,6 +981,29 @@ export const supportedEVMChains = [
|
|
|
981
981
|
rpcUrls: ['https://kovan.optimism.io'],
|
|
982
982
|
},
|
|
983
983
|
},
|
|
984
|
+
// 420 - Optimistic Ethereum (Kovan)
|
|
985
|
+
{
|
|
986
|
+
key: ChainKey.OPTG,
|
|
987
|
+
chainType: ChainType.EVM,
|
|
988
|
+
name: 'Optimistic Ethereum Testnet Goerli',
|
|
989
|
+
coin: CoinKey.ETH,
|
|
990
|
+
id: 420,
|
|
991
|
+
mainnet: false,
|
|
992
|
+
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/optimism_test.png',
|
|
993
|
+
faucetUrls: ['https://gateway.optimism.io/'],
|
|
994
|
+
multicallAddress: multicallAddresses[ChainId.OPTG],
|
|
995
|
+
metamask: {
|
|
996
|
+
chainId: prefixChainId(69),
|
|
997
|
+
blockExplorerUrls: ['https://blockscout.com/optimism/goerli/'],
|
|
998
|
+
chainName: 'Optimistic Ethereum Testnet Goerli',
|
|
999
|
+
nativeCurrency: {
|
|
1000
|
+
name: 'tETH',
|
|
1001
|
+
symbol: 'tETH',
|
|
1002
|
+
decimals: 18,
|
|
1003
|
+
},
|
|
1004
|
+
rpcUrls: ['https://goerli.optimism.io/'],
|
|
1005
|
+
},
|
|
1006
|
+
},
|
|
984
1007
|
// 97 - Binance Smart Chain Testnet
|
|
985
1008
|
{
|
|
986
1009
|
key: ChainKey.BSCT,
|
package/dist/cjs/base.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export declare enum ChainKey {
|
|
|
90
90
|
MUM = "mum",
|
|
91
91
|
ARBT = "arbt",
|
|
92
92
|
OPTT = "optt",
|
|
93
|
+
OPTG = "optg",
|
|
93
94
|
BSCT = "bsct",
|
|
94
95
|
HECT = "hect",
|
|
95
96
|
ONET = "onet",
|
|
@@ -149,6 +150,7 @@ export declare enum ChainId {
|
|
|
149
150
|
MUM = 80001,
|
|
150
151
|
ARBT = 421611,
|
|
151
152
|
OPTT = 69,
|
|
153
|
+
OPTG = 420,
|
|
152
154
|
BSCT = 97,
|
|
153
155
|
HECT = 256,
|
|
154
156
|
ONET = 1666700000,
|
package/dist/cjs/base.js
CHANGED
|
@@ -97,6 +97,7 @@ var ChainKey;
|
|
|
97
97
|
ChainKey["MUM"] = "mum";
|
|
98
98
|
ChainKey["ARBT"] = "arbt";
|
|
99
99
|
ChainKey["OPTT"] = "optt";
|
|
100
|
+
ChainKey["OPTG"] = "optg";
|
|
100
101
|
ChainKey["BSCT"] = "bsct";
|
|
101
102
|
ChainKey["HECT"] = "hect";
|
|
102
103
|
ChainKey["ONET"] = "onet";
|
|
@@ -158,6 +159,7 @@ var ChainId;
|
|
|
158
159
|
ChainId[ChainId["MUM"] = 80001] = "MUM";
|
|
159
160
|
ChainId[ChainId["ARBT"] = 421611] = "ARBT";
|
|
160
161
|
ChainId[ChainId["OPTT"] = 69] = "OPTT";
|
|
162
|
+
ChainId[ChainId["OPTG"] = 420] = "OPTG";
|
|
161
163
|
ChainId[ChainId["BSCT"] = 97] = "BSCT";
|
|
162
164
|
ChainId[ChainId["HECT"] = 256] = "HECT";
|
|
163
165
|
ChainId[ChainId["ONET"] = 1666700000] = "ONET";
|
|
@@ -984,6 +984,29 @@ exports.supportedEVMChains = [
|
|
|
984
984
|
rpcUrls: ['https://kovan.optimism.io'],
|
|
985
985
|
},
|
|
986
986
|
},
|
|
987
|
+
// 420 - Optimistic Ethereum (Kovan)
|
|
988
|
+
{
|
|
989
|
+
key: base_1.ChainKey.OPTG,
|
|
990
|
+
chainType: Chain_1.ChainType.EVM,
|
|
991
|
+
name: 'Optimistic Ethereum Testnet Goerli',
|
|
992
|
+
coin: base_1.CoinKey.ETH,
|
|
993
|
+
id: 420,
|
|
994
|
+
mainnet: false,
|
|
995
|
+
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/optimism_test.png',
|
|
996
|
+
faucetUrls: ['https://gateway.optimism.io/'],
|
|
997
|
+
multicallAddress: multicall_1.multicallAddresses[base_1.ChainId.OPTG],
|
|
998
|
+
metamask: {
|
|
999
|
+
chainId: (0, EVMChain_1.prefixChainId)(69),
|
|
1000
|
+
blockExplorerUrls: ['https://blockscout.com/optimism/goerli/'],
|
|
1001
|
+
chainName: 'Optimistic Ethereum Testnet Goerli',
|
|
1002
|
+
nativeCurrency: {
|
|
1003
|
+
name: 'tETH',
|
|
1004
|
+
symbol: 'tETH',
|
|
1005
|
+
decimals: 18,
|
|
1006
|
+
},
|
|
1007
|
+
rpcUrls: ['https://goerli.optimism.io/'],
|
|
1008
|
+
},
|
|
1009
|
+
},
|
|
987
1010
|
// 97 - Binance Smart Chain Testnet
|
|
988
1011
|
{
|
|
989
1012
|
key: base_1.ChainKey.BSCT,
|
package/dist/cjs/coins.js
CHANGED
|
@@ -108,6 +108,10 @@ const basicCoins = [
|
|
|
108
108
|
address: '0x0000000000000000000000000000000000000000',
|
|
109
109
|
decimals: 18,
|
|
110
110
|
},
|
|
111
|
+
[base_1.ChainId.OPTG]: {
|
|
112
|
+
address: '0x0000000000000000000000000000000000000000',
|
|
113
|
+
decimals: 18,
|
|
114
|
+
},
|
|
111
115
|
[base_1.ChainId.ARBT]: {
|
|
112
116
|
address: '0x0000000000000000000000000000000000000000',
|
|
113
117
|
decimals: 18,
|
|
@@ -841,6 +845,10 @@ const basicCoins = [
|
|
|
841
845
|
address: '0x4200000000000000000000000000000000000006',
|
|
842
846
|
decimals: 18,
|
|
843
847
|
},
|
|
848
|
+
[base_1.ChainId.OPTG]: {
|
|
849
|
+
address: '0x4200000000000000000000000000000000000006',
|
|
850
|
+
decimals: 18,
|
|
851
|
+
},
|
|
844
852
|
},
|
|
845
853
|
},
|
|
846
854
|
// > SUSHI
|
|
@@ -1353,6 +1361,16 @@ exports.wrappedTokens = {
|
|
|
1353
1361
|
name: 'WETH',
|
|
1354
1362
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1355
1363
|
},
|
|
1364
|
+
[base_1.ChainId.OPTG]: {
|
|
1365
|
+
// https://blockscout.com/optimism/goerli/address/0x4200000000000000000000000000000000000006
|
|
1366
|
+
address: '0x4200000000000000000000000000000000000006',
|
|
1367
|
+
symbol: 'WETH',
|
|
1368
|
+
decimals: 18,
|
|
1369
|
+
chainId: base_1.ChainId.OPTG,
|
|
1370
|
+
coinKey: base_1.CoinKey.WETH,
|
|
1371
|
+
name: 'WETH',
|
|
1372
|
+
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1373
|
+
},
|
|
1356
1374
|
[base_1.ChainId.BSCT]: {
|
|
1357
1375
|
// https://testnet.bscscan.com/token/0xae13d989dac2f0debff460ac112a837c89baa7cd
|
|
1358
1376
|
address: '0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd',
|
package/dist/cjs/multicall.js
CHANGED
|
@@ -54,6 +54,7 @@ exports.multicallAddresses = {
|
|
|
54
54
|
[_1.ChainId.ONET]: '0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3',
|
|
55
55
|
[_1.ChainId.AVAT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
56
56
|
[_1.ChainId.OPTT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
57
|
+
[_1.ChainId.OPTG]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
57
58
|
[_1.ChainId.EVMT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
58
59
|
[_1.ChainId.MORT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
59
60
|
[_1.ChainId.FTMT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
package/dist/cjs/step.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ export interface Execution {
|
|
|
65
65
|
fromAmount?: string;
|
|
66
66
|
toAmount?: string;
|
|
67
67
|
toToken?: Token;
|
|
68
|
+
gasUsed?: string;
|
|
69
|
+
gasPrice?: string;
|
|
68
70
|
}
|
|
69
71
|
export declare const emptyExecution: Execution;
|
|
70
72
|
export declare type StepType = 'swap' | 'cross' | 'lifi' | 'custom';
|
package/dist/coins.js
CHANGED
|
@@ -105,6 +105,10 @@ const basicCoins = [
|
|
|
105
105
|
address: '0x0000000000000000000000000000000000000000',
|
|
106
106
|
decimals: 18,
|
|
107
107
|
},
|
|
108
|
+
[ChainId.OPTG]: {
|
|
109
|
+
address: '0x0000000000000000000000000000000000000000',
|
|
110
|
+
decimals: 18,
|
|
111
|
+
},
|
|
108
112
|
[ChainId.ARBT]: {
|
|
109
113
|
address: '0x0000000000000000000000000000000000000000',
|
|
110
114
|
decimals: 18,
|
|
@@ -838,6 +842,10 @@ const basicCoins = [
|
|
|
838
842
|
address: '0x4200000000000000000000000000000000000006',
|
|
839
843
|
decimals: 18,
|
|
840
844
|
},
|
|
845
|
+
[ChainId.OPTG]: {
|
|
846
|
+
address: '0x4200000000000000000000000000000000000006',
|
|
847
|
+
decimals: 18,
|
|
848
|
+
},
|
|
841
849
|
},
|
|
842
850
|
},
|
|
843
851
|
// > SUSHI
|
|
@@ -1350,6 +1358,16 @@ export const wrappedTokens = {
|
|
|
1350
1358
|
name: 'WETH',
|
|
1351
1359
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1352
1360
|
},
|
|
1361
|
+
[ChainId.OPTG]: {
|
|
1362
|
+
// https://blockscout.com/optimism/goerli/address/0x4200000000000000000000000000000000000006
|
|
1363
|
+
address: '0x4200000000000000000000000000000000000006',
|
|
1364
|
+
symbol: 'WETH',
|
|
1365
|
+
decimals: 18,
|
|
1366
|
+
chainId: ChainId.OPTG,
|
|
1367
|
+
coinKey: CoinKey.WETH,
|
|
1368
|
+
name: 'WETH',
|
|
1369
|
+
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1370
|
+
},
|
|
1353
1371
|
[ChainId.BSCT]: {
|
|
1354
1372
|
// https://testnet.bscscan.com/token/0xae13d989dac2f0debff460ac112a837c89baa7cd
|
|
1355
1373
|
address: '0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd',
|
package/dist/multicall.js
CHANGED
|
@@ -51,6 +51,7 @@ export const multicallAddresses = {
|
|
|
51
51
|
[ChainId.ONET]: '0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3',
|
|
52
52
|
[ChainId.AVAT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
53
53
|
[ChainId.OPTT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
54
|
+
[ChainId.OPTG]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
54
55
|
[ChainId.EVMT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
55
56
|
[ChainId.MORT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
56
57
|
[ChainId.FTMT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
package/dist/step.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ export interface Execution {
|
|
|
65
65
|
fromAmount?: string;
|
|
66
66
|
toAmount?: string;
|
|
67
67
|
toToken?: Token;
|
|
68
|
+
gasUsed?: string;
|
|
69
|
+
gasPrice?: string;
|
|
68
70
|
}
|
|
69
71
|
export declare const emptyExecution: Execution;
|
|
70
72
|
export declare type StepType = 'swap' | 'cross' | 'lifi' | 'custom';
|