@lifi/types 1.0.1 → 1.2.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 +26 -0
- package/dist/api.d.ts +40 -1
- package/dist/chains/supported.chains.js +1 -1
- package/dist/coins.js +90 -30
- package/dist/step.d.ts +14 -2
- package/dist/step.js +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
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.2.0](https://github.com/lifinance/types/compare/v1.1.1...v1.2.0) (2022-07-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add custom step and contract call endpoints ([#85](https://github.com/lifinance/types/issues/85)) ([bd49fae](https://github.com/lifinance/types/commit/bd49faefc924d7a06818ab6cb3589db633c58e9c))
|
|
11
|
+
|
|
12
|
+
### [1.1.1](https://github.com/lifinance/types/compare/v1.1.0...v1.1.1) (2022-07-21)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* remove .DS_Store files ([ccd0112](https://github.com/lifinance/types/commit/ccd01122f15f099e17eb3253a87c008f65c991ba))
|
|
18
|
+
|
|
19
|
+
## [1.1.0](https://github.com/lifinance/types/compare/v1.0.1...v1.1.0) (2022-07-14)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **evmos:** add wrapped and native gas token on Evmos ([#86](https://github.com/lifinance/types/issues/86)) ([0f7eff8](https://github.com/lifinance/types/commit/0f7eff874e7dce1446bfb0b4dacb18b91cb9475f))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* publishing script ([d5e85eb](https://github.com/lifinance/types/commit/d5e85ebfd4de7695082736049bbc0b76a4ed02a2))
|
|
30
|
+
|
|
5
31
|
### [1.0.1](https://github.com/lifinance/types/compare/v1.0.0...v1.0.1) (2022-07-12)
|
|
6
32
|
|
|
7
33
|
|
package/dist/api.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export interface GetTokenRequest {
|
|
|
69
69
|
chain: number | string;
|
|
70
70
|
token: string;
|
|
71
71
|
}
|
|
72
|
-
interface ToolConfiguration {
|
|
72
|
+
export interface ToolConfiguration {
|
|
73
73
|
allowBridges?: string[];
|
|
74
74
|
denyBridges?: string[];
|
|
75
75
|
preferBridges?: string[];
|
|
@@ -90,6 +90,43 @@ export interface QuoteRequest extends ToolConfiguration {
|
|
|
90
90
|
integrator?: string;
|
|
91
91
|
referrer?: string;
|
|
92
92
|
}
|
|
93
|
+
export interface ContractCallQuoteRequest extends ToolConfiguration {
|
|
94
|
+
fromChain: number | string;
|
|
95
|
+
fromToken: string;
|
|
96
|
+
fromAddress: string;
|
|
97
|
+
toChain: number | string;
|
|
98
|
+
toToken: string;
|
|
99
|
+
toAmount: string;
|
|
100
|
+
toContractAddress: string;
|
|
101
|
+
toContractCallData: string;
|
|
102
|
+
toContractGasLimit: string;
|
|
103
|
+
toApprovalAddress?: string;
|
|
104
|
+
toFallbackAddress?: string;
|
|
105
|
+
contractOutputsToken?: string;
|
|
106
|
+
slippage?: number | string;
|
|
107
|
+
integrator?: string;
|
|
108
|
+
referrer?: string;
|
|
109
|
+
}
|
|
110
|
+
export interface ContractCallQuotesRequest extends ToolConfiguration {
|
|
111
|
+
fromChain: number | string;
|
|
112
|
+
fromToken: string;
|
|
113
|
+
fromAddress: string;
|
|
114
|
+
toChain: number | string;
|
|
115
|
+
toFallbackAddress?: string;
|
|
116
|
+
toContractCalls: {
|
|
117
|
+
sendingAmount: string;
|
|
118
|
+
sendingToken: string;
|
|
119
|
+
receivingToken: string;
|
|
120
|
+
contractAddress: string;
|
|
121
|
+
approvalAddress?: string;
|
|
122
|
+
callData: string;
|
|
123
|
+
gasLimit: string;
|
|
124
|
+
}[];
|
|
125
|
+
order?: Order;
|
|
126
|
+
slippage?: number | string;
|
|
127
|
+
integrator?: string;
|
|
128
|
+
referrer?: string;
|
|
129
|
+
}
|
|
93
130
|
export interface ConnectionsRequest extends ToolConfiguration {
|
|
94
131
|
fromChain?: number | string;
|
|
95
132
|
fromToken?: string;
|
|
@@ -168,6 +205,8 @@ export declare class LifiAPI {
|
|
|
168
205
|
getToken(request: GetTokenRequest): Promise<Token>;
|
|
169
206
|
getTokens(request: TokensRequest): Promise<TokensResponse>;
|
|
170
207
|
getQuote(request: QuoteRequest): Promise<Step>;
|
|
208
|
+
getContractCallQuote(request: ContractCallQuoteRequest): Promise<Step>;
|
|
209
|
+
getContractCallQuotes(request: ContractCallQuotesRequest): Promise<Step>;
|
|
171
210
|
getStatus(request: GetStatusRequest): Promise<StatusResponse>;
|
|
172
211
|
getTools(request: ToolsRequest): Promise<ToolsResponse>;
|
|
173
212
|
getChains(): ChainsResponse;
|
package/dist/coins.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
|
|
2
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.findTokenByChainIdAndAddress = exports.findWrappedGasOnChain = exports.findDefaultToken = exports.findDefaultCoin = exports.wrappedTokens = exports.defaultCoins = void 0;
|
|
5
5
|
var base_1 = require("./base");
|
|
@@ -497,6 +497,10 @@ var basicCoins = [
|
|
|
497
497
|
address: '0x7FF4a56B32ee13D7D4D405887E0eA37d61Ed919e',
|
|
498
498
|
decimals: 6,
|
|
499
499
|
},
|
|
500
|
+
_m[base_1.ChainId.AUR] = {
|
|
501
|
+
address: '0x4988a896b1227218e4A686fdE5EabdcAbd91571f',
|
|
502
|
+
decimals: 6,
|
|
503
|
+
},
|
|
500
504
|
// Testnets
|
|
501
505
|
_m[base_1.ChainId.ROP] = {
|
|
502
506
|
address: '0x110a13fc3efe6a245b50102d2d79b3e76125ae83',
|
|
@@ -593,6 +597,10 @@ var basicCoins = [
|
|
|
593
597
|
address: '0x51e44FfaD5C2B122C8b635671FCC8139dc636E82',
|
|
594
598
|
decimals: 6,
|
|
595
599
|
},
|
|
600
|
+
_o[base_1.ChainId.AUR] = {
|
|
601
|
+
address: '0xB12BFcA5A55806AaF64E99521918A4bf0fC40802',
|
|
602
|
+
decimals: 6,
|
|
603
|
+
},
|
|
596
604
|
// Testnets
|
|
597
605
|
_o[base_1.ChainId.ROP] = {
|
|
598
606
|
address: '0x07865c6e87b9f70255377e024ace6630c1eaa37f',
|
|
@@ -720,6 +728,10 @@ var basicCoins = [
|
|
|
720
728
|
address: '0xF80699Dc594e00aE7bA200c7533a07C1604A106D',
|
|
721
729
|
decimals: 8,
|
|
722
730
|
},
|
|
731
|
+
_q[base_1.ChainId.AUR] = {
|
|
732
|
+
address: '0xF4eB217Ba2454613b15dBdea6e5f22276410e89e',
|
|
733
|
+
decimals: 8,
|
|
734
|
+
},
|
|
723
735
|
_q),
|
|
724
736
|
},
|
|
725
737
|
// > WETH
|
|
@@ -799,6 +811,10 @@ var basicCoins = [
|
|
|
799
811
|
address: '0x5842C5532b61aCF3227679a8b1BD0242a41752f2',
|
|
800
812
|
decimals: 18,
|
|
801
813
|
},
|
|
814
|
+
_r[base_1.ChainId.AUR] = {
|
|
815
|
+
address: '0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB',
|
|
816
|
+
decimals: 18,
|
|
817
|
+
},
|
|
802
818
|
// Testnets
|
|
803
819
|
_r[base_1.ChainId.ROP] = {
|
|
804
820
|
address: '0xc778417e063141139fce010982780140aa0cd5ab',
|
|
@@ -1032,6 +1048,32 @@ var basicCoins = [
|
|
|
1032
1048
|
},
|
|
1033
1049
|
_1),
|
|
1034
1050
|
},
|
|
1051
|
+
// > EVM
|
|
1052
|
+
{
|
|
1053
|
+
key: base_1.CoinKey.EVM,
|
|
1054
|
+
name: 'Evmos',
|
|
1055
|
+
logoURI: 'https://raw.githubusercontent.com/cronus-finance/token-list/main/assets/evmos/0xD4949664cD82660AaE99bEdc034a0deA8A0bd517/logo.png',
|
|
1056
|
+
verified: true,
|
|
1057
|
+
chains: (_2 = {},
|
|
1058
|
+
_2[base_1.ChainId.EVM] = {
|
|
1059
|
+
address: '0x0000000000000000000000000000000000000000',
|
|
1060
|
+
decimals: 18,
|
|
1061
|
+
},
|
|
1062
|
+
_2),
|
|
1063
|
+
},
|
|
1064
|
+
// > AURORA
|
|
1065
|
+
{
|
|
1066
|
+
key: base_1.CoinKey.ETH,
|
|
1067
|
+
name: 'AETH',
|
|
1068
|
+
logoURI: 'https://static.debank.com/image/aurora_token/logo_url/aurora/d61441782d4a08a7479d54aea211679e.png',
|
|
1069
|
+
verified: true,
|
|
1070
|
+
chains: (_3 = {},
|
|
1071
|
+
_3[base_1.ChainId.AUR] = {
|
|
1072
|
+
address: '0x0000000000000000000000000000000000000000',
|
|
1073
|
+
decimals: 18,
|
|
1074
|
+
},
|
|
1075
|
+
_3),
|
|
1076
|
+
},
|
|
1035
1077
|
];
|
|
1036
1078
|
exports.defaultCoins = basicCoins.map(function (coin) {
|
|
1037
1079
|
var _a, _b;
|
|
@@ -1057,8 +1099,8 @@ exports.defaultCoins = basicCoins.map(function (coin) {
|
|
|
1057
1099
|
return defaultCoin;
|
|
1058
1100
|
});
|
|
1059
1101
|
// Wrapped version of gas on chain
|
|
1060
|
-
exports.wrappedTokens = (
|
|
1061
|
-
|
|
1102
|
+
exports.wrappedTokens = (_4 = {},
|
|
1103
|
+
_4[base_1.ChainId.ETH] = {
|
|
1062
1104
|
// https://ww7.etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
|
|
1063
1105
|
address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
1064
1106
|
symbol: 'WETH',
|
|
@@ -1068,7 +1110,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1068
1110
|
name: 'WETH',
|
|
1069
1111
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1070
1112
|
},
|
|
1071
|
-
|
|
1113
|
+
_4[base_1.ChainId.BSC] = {
|
|
1072
1114
|
// https://bscscan.com/token/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
|
|
1073
1115
|
address: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c',
|
|
1074
1116
|
symbol: 'WBNB',
|
|
@@ -1078,7 +1120,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1078
1120
|
name: 'WBNB',
|
|
1079
1121
|
logoURI: 'https://zapper.fi/images/networks/binance-smart-chain/0x0000000000000000000000000000000000000000.png',
|
|
1080
1122
|
},
|
|
1081
|
-
|
|
1123
|
+
_4[base_1.ChainId.POL] = {
|
|
1082
1124
|
// https://polygonscan.com/token/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270
|
|
1083
1125
|
address: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270',
|
|
1084
1126
|
symbol: 'WMATIC',
|
|
@@ -1088,7 +1130,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1088
1130
|
name: 'WMATIC',
|
|
1089
1131
|
logoURI: 'https://zapper.fi/images/networks/polygon/0x0000000000000000000000000000000000000000.png',
|
|
1090
1132
|
},
|
|
1091
|
-
|
|
1133
|
+
_4[base_1.ChainId.DAI] = {
|
|
1092
1134
|
// https://blockscout.com/xdai/mainnet/address/0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d
|
|
1093
1135
|
address: '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d',
|
|
1094
1136
|
symbol: 'WXDAI',
|
|
@@ -1098,7 +1140,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1098
1140
|
name: 'WXDAI',
|
|
1099
1141
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x6b175474e89094c44da98b954eedeac495271d0f.png',
|
|
1100
1142
|
},
|
|
1101
|
-
|
|
1143
|
+
_4[base_1.ChainId.OPT] = {
|
|
1102
1144
|
// https://optimistic.etherscan.io/token/0x4200000000000000000000000000000000000006
|
|
1103
1145
|
address: '0x4200000000000000000000000000000000000006',
|
|
1104
1146
|
symbol: 'WETH',
|
|
@@ -1108,7 +1150,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1108
1150
|
name: 'Wrapped ETH',
|
|
1109
1151
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1110
1152
|
},
|
|
1111
|
-
|
|
1153
|
+
_4[base_1.ChainId.FTM] = {
|
|
1112
1154
|
//
|
|
1113
1155
|
address: '0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83',
|
|
1114
1156
|
symbol: 'wFTM',
|
|
@@ -1118,7 +1160,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1118
1160
|
name: 'wFTM',
|
|
1119
1161
|
logoURI: 'https://assets.spookyswap.finance/coins/0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83.png',
|
|
1120
1162
|
},
|
|
1121
|
-
|
|
1163
|
+
_4[base_1.ChainId.ONE] = {
|
|
1122
1164
|
address: '0xcf664087a5bb0237a0bad6742852ec6c8d69a27a',
|
|
1123
1165
|
symbol: 'WONE',
|
|
1124
1166
|
decimals: 18,
|
|
@@ -1127,7 +1169,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1127
1169
|
name: 'WRAPPED ONE',
|
|
1128
1170
|
logoURI: 'https://d1xrz6ki9z98vb.cloudfront.net/venomswap/tokens/WONE.png',
|
|
1129
1171
|
},
|
|
1130
|
-
|
|
1172
|
+
_4[base_1.ChainId.AVA] = {
|
|
1131
1173
|
address: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7',
|
|
1132
1174
|
symbol: 'WAVAX',
|
|
1133
1175
|
decimals: 18,
|
|
@@ -1136,7 +1178,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1136
1178
|
name: 'Wrapped AVAX',
|
|
1137
1179
|
logoURI: '',
|
|
1138
1180
|
},
|
|
1139
|
-
|
|
1181
|
+
_4[base_1.ChainId.ARB] = {
|
|
1140
1182
|
address: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1',
|
|
1141
1183
|
symbol: 'WETH',
|
|
1142
1184
|
decimals: 18,
|
|
@@ -1145,7 +1187,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1145
1187
|
name: 'WETH',
|
|
1146
1188
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1147
1189
|
},
|
|
1148
|
-
|
|
1190
|
+
_4[base_1.ChainId.MOR] = {
|
|
1149
1191
|
address: '0x98878b06940ae243284ca214f92bb71a2b032b8a',
|
|
1150
1192
|
symbol: 'WMOVR',
|
|
1151
1193
|
decimals: 18,
|
|
@@ -1154,7 +1196,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1154
1196
|
name: 'WMOVR',
|
|
1155
1197
|
logoURI: 'https://assets.coingecko.com/coins/images/17984/small/9285.png',
|
|
1156
1198
|
},
|
|
1157
|
-
|
|
1199
|
+
_4[base_1.ChainId.OKT] = {
|
|
1158
1200
|
address: '0x8f8526dbfd6e38e3d8307702ca8469bae6c56c15',
|
|
1159
1201
|
symbol: 'wOKT',
|
|
1160
1202
|
decimals: 18,
|
|
@@ -1163,7 +1205,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1163
1205
|
name: 'wOKT',
|
|
1164
1206
|
logoURI: 'https://static.debank.com/image/okt_token/logo_url/okt/1228cd92320b3d33769bd08eecfb5391.png',
|
|
1165
1207
|
},
|
|
1166
|
-
|
|
1208
|
+
_4[base_1.ChainId.HEC] = {
|
|
1167
1209
|
address: '0x5545153ccfca01fbd7dd11c0b23ba694d9509a6f',
|
|
1168
1210
|
symbol: 'wHT',
|
|
1169
1211
|
decimals: 18,
|
|
@@ -1172,7 +1214,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1172
1214
|
name: 'wHT',
|
|
1173
1215
|
logoURI: 'https://static.debank.com/image/heco_token/logo_url/heco/c399dcddde07e1944c4dd8f922832b53.png',
|
|
1174
1216
|
},
|
|
1175
|
-
|
|
1217
|
+
_4[base_1.ChainId.CRO] = {
|
|
1176
1218
|
address: '0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23',
|
|
1177
1219
|
symbol: 'WCRO',
|
|
1178
1220
|
decimals: 18,
|
|
@@ -1181,7 +1223,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1181
1223
|
name: 'WCRO',
|
|
1182
1224
|
logoURI: 'https://raw.githubusercontent.com/cronaswap/default-token-list/main/assets/tokens/cronos/0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23/logo.png',
|
|
1183
1225
|
},
|
|
1184
|
-
|
|
1226
|
+
_4[base_1.ChainId.FUS] = {
|
|
1185
1227
|
address: '0x0be9e53fd7edac9f859882afdda116645287c629',
|
|
1186
1228
|
symbol: 'WFUSE',
|
|
1187
1229
|
decimals: 18,
|
|
@@ -1190,7 +1232,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1190
1232
|
name: 'Wrapped Fuse',
|
|
1191
1233
|
logoURI: 'https://fuselogo.s3.eu-central-1.amazonaws.com/wfuse.png',
|
|
1192
1234
|
},
|
|
1193
|
-
|
|
1235
|
+
_4[base_1.ChainId.MOO] = {
|
|
1194
1236
|
address: '0xacc15dc74880c9944775448304b263d191c6077f',
|
|
1195
1237
|
symbol: 'WGLMR',
|
|
1196
1238
|
decimals: 18,
|
|
@@ -1199,7 +1241,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1199
1241
|
name: 'Wrapped GLMR',
|
|
1200
1242
|
logoURI: 'https://static.debank.com/image/mobm_token/logo_url/0xacc15dc74880c9944775448304b263d191c6077f/a8442077d76b258297181c3e6eb8c9cc.png',
|
|
1201
1243
|
},
|
|
1202
|
-
|
|
1244
|
+
_4[base_1.ChainId.MAM] = {
|
|
1203
1245
|
address: '0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481',
|
|
1204
1246
|
symbol: 'WMETIS',
|
|
1205
1247
|
decimals: 18,
|
|
@@ -1208,7 +1250,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1208
1250
|
name: 'Wrapped Metis',
|
|
1209
1251
|
logoURI: 'https://s2.coinmarketcap.com/static/img/coins/64x64/9640.png',
|
|
1210
1252
|
},
|
|
1211
|
-
|
|
1253
|
+
_4[base_1.ChainId.BOB] = {
|
|
1212
1254
|
address: '0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000',
|
|
1213
1255
|
symbol: 'WETH',
|
|
1214
1256
|
decimals: 18,
|
|
@@ -1217,7 +1259,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1217
1259
|
name: 'Wrapped ETH',
|
|
1218
1260
|
logoURI: 'https://static.debank.com/image/boba_token/logo_url/0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000/b1947b38a90e559eb950453965714be4.png',
|
|
1219
1261
|
},
|
|
1220
|
-
|
|
1262
|
+
_4[base_1.ChainId.CEL] = {
|
|
1221
1263
|
address: '0x471ece3750da237f93b8e339c536989b8978a438',
|
|
1222
1264
|
symbol: 'CELO',
|
|
1223
1265
|
decimals: 18,
|
|
@@ -1226,8 +1268,26 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1226
1268
|
name: 'Celo native asset',
|
|
1227
1269
|
logoURI: 'https://s2.coinmarketcap.com/static/img/coins/64x64/5567.png',
|
|
1228
1270
|
},
|
|
1271
|
+
_4[base_1.ChainId.EVM] = {
|
|
1272
|
+
address: '0xd4949664cd82660aae99bedc034a0dea8a0bd517',
|
|
1273
|
+
symbol: 'WEVMOS',
|
|
1274
|
+
decimals: 18,
|
|
1275
|
+
chainId: base_1.ChainId.EVM,
|
|
1276
|
+
coinKey: 'WEVMOS',
|
|
1277
|
+
name: 'Wrapped Evmos',
|
|
1278
|
+
logoURI: 'https://raw.githubusercontent.com/cronus-finance/token-list/main/assets/evmos/0xD4949664cD82660AaE99bEdc034a0deA8A0bd517/logo.png',
|
|
1279
|
+
},
|
|
1280
|
+
_4[base_1.ChainId.AUR] = {
|
|
1281
|
+
address: '0x0000000000000000000000000000000000000000',
|
|
1282
|
+
symbol: 'AETH',
|
|
1283
|
+
decimals: 18,
|
|
1284
|
+
chainId: base_1.ChainId.AUR,
|
|
1285
|
+
coinKey: 'AETH',
|
|
1286
|
+
name: 'AETH',
|
|
1287
|
+
logoURI: 'https://static.debank.com/image/aurora_token/logo_url/aurora/d61441782d4a08a7479d54aea211679e.png',
|
|
1288
|
+
},
|
|
1229
1289
|
// Testnets
|
|
1230
|
-
|
|
1290
|
+
_4[base_1.ChainId.ROP] = {
|
|
1231
1291
|
// https://ropsten.etherscan.io/token/0xc778417e063141139fce010982780140aa0cd5ab
|
|
1232
1292
|
address: '0xc778417e063141139fce010982780140aa0cd5ab',
|
|
1233
1293
|
symbol: 'WETH',
|
|
@@ -1237,7 +1297,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1237
1297
|
name: 'WETH',
|
|
1238
1298
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1239
1299
|
},
|
|
1240
|
-
|
|
1300
|
+
_4[base_1.ChainId.RIN] = {
|
|
1241
1301
|
// https://rinkeby.etherscan.io/token/0xc778417e063141139fce010982780140aa0cd5ab
|
|
1242
1302
|
address: '0xc778417e063141139fce010982780140aa0cd5ab',
|
|
1243
1303
|
symbol: 'WETH',
|
|
@@ -1247,7 +1307,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1247
1307
|
name: 'WETH',
|
|
1248
1308
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1249
1309
|
},
|
|
1250
|
-
|
|
1310
|
+
_4[base_1.ChainId.GOR] = {
|
|
1251
1311
|
// https://goerli.etherscan.io/token/0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6
|
|
1252
1312
|
address: '0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6',
|
|
1253
1313
|
symbol: 'WETH',
|
|
@@ -1257,7 +1317,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1257
1317
|
name: 'WETH',
|
|
1258
1318
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1259
1319
|
},
|
|
1260
|
-
|
|
1320
|
+
_4[base_1.ChainId.KOV] = {
|
|
1261
1321
|
// https://kovan.etherscan.io/address/0xd0a1e359811322d97991e03f863a0c30c2cf029c
|
|
1262
1322
|
address: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
|
|
1263
1323
|
symbol: 'WETH',
|
|
@@ -1267,7 +1327,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1267
1327
|
name: 'WETH',
|
|
1268
1328
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1269
1329
|
},
|
|
1270
|
-
|
|
1330
|
+
_4[base_1.ChainId.MUM] = {
|
|
1271
1331
|
// https://mumbai.polygonscan.com/token/0x9c3c9283d3e44854697cd22d3faa240cfb032889
|
|
1272
1332
|
address: '0x9c3c9283d3e44854697cd22d3faa240cfb032889',
|
|
1273
1333
|
symbol: 'WMATIC',
|
|
@@ -1277,7 +1337,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1277
1337
|
name: 'WMATIC',
|
|
1278
1338
|
logoURI: 'https://zapper.fi/images/networks/polygon/0x0000000000000000000000000000000000000000.png',
|
|
1279
1339
|
},
|
|
1280
|
-
|
|
1340
|
+
_4[base_1.ChainId.ONET] = {
|
|
1281
1341
|
address: '0x7466d7d0c21fa05f32f5a0fa27e12bdc06348ce2',
|
|
1282
1342
|
symbol: 'WONE',
|
|
1283
1343
|
decimals: 18,
|
|
@@ -1286,7 +1346,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1286
1346
|
name: 'WRAPPED ONE',
|
|
1287
1347
|
logoURI: 'https://d1xrz6ki9z98vb.cloudfront.net/venomswap/tokens/WONE.png',
|
|
1288
1348
|
},
|
|
1289
|
-
|
|
1349
|
+
_4[base_1.ChainId.ARBT] = {
|
|
1290
1350
|
// https://testnet.arbiscan.io/token/0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681
|
|
1291
1351
|
address: '0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681',
|
|
1292
1352
|
symbol: 'WETH',
|
|
@@ -1296,7 +1356,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1296
1356
|
name: 'WETH',
|
|
1297
1357
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1298
1358
|
},
|
|
1299
|
-
|
|
1359
|
+
_4[base_1.ChainId.OPTT] = {
|
|
1300
1360
|
// https://kovan-optimistic.etherscan.io/token/0x4200000000000000000000000000000000000006
|
|
1301
1361
|
address: '0x4200000000000000000000000000000000000006',
|
|
1302
1362
|
symbol: 'WETH',
|
|
@@ -1306,7 +1366,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1306
1366
|
name: 'WETH',
|
|
1307
1367
|
logoURI: 'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
|
|
1308
1368
|
},
|
|
1309
|
-
|
|
1369
|
+
_4[base_1.ChainId.BSCT] = {
|
|
1310
1370
|
// https://testnet.bscscan.com/token/0xae13d989dac2f0debff460ac112a837c89baa7cd
|
|
1311
1371
|
address: '0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd',
|
|
1312
1372
|
symbol: 'WBNB',
|
|
@@ -1316,7 +1376,7 @@ exports.wrappedTokens = (_2 = {},
|
|
|
1316
1376
|
name: 'WBNB',
|
|
1317
1377
|
logoURI: 'https://zapper.fi/images/networks/binance-smart-chain/0x0000000000000000000000000000000000000000.png',
|
|
1318
1378
|
},
|
|
1319
|
-
|
|
1379
|
+
_4);
|
|
1320
1380
|
var findDefaultCoin = function (coinKey) {
|
|
1321
1381
|
var coin = exports.defaultCoins.find(function (coin) { return coin.key === coinKey; });
|
|
1322
1382
|
if (!coin) {
|
package/dist/step.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export interface Execution {
|
|
|
67
67
|
toToken?: Token;
|
|
68
68
|
}
|
|
69
69
|
export declare const emptyExecution: Execution;
|
|
70
|
-
export declare type StepType = 'swap' | 'cross' | 'lifi';
|
|
70
|
+
export declare type StepType = 'swap' | 'cross' | 'lifi' | 'custom';
|
|
71
71
|
export declare type StepTool = string;
|
|
72
72
|
export interface StepBase {
|
|
73
73
|
id: string;
|
|
@@ -100,4 +100,16 @@ export interface LifiStep extends StepBase {
|
|
|
100
100
|
includedSteps: Step[];
|
|
101
101
|
}
|
|
102
102
|
export declare function isLifiStep(step: Step): step is LifiStep;
|
|
103
|
-
export
|
|
103
|
+
export interface CustomStep extends StepBase {
|
|
104
|
+
type: 'custom';
|
|
105
|
+
action: Action;
|
|
106
|
+
estimate: Estimate;
|
|
107
|
+
destinationCallInfo: {
|
|
108
|
+
toContractAddress: string;
|
|
109
|
+
toContractCallData: string;
|
|
110
|
+
toFallbackAddress: string;
|
|
111
|
+
callDataGasLimit: string;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export declare function isCustomStep(step: Step): step is CustomStep;
|
|
115
|
+
export declare type Step = SwapStep | CrossStep | LifiStep | CustomStep;
|
package/dist/step.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isLifiStep = exports.isCrossStep = exports.isSwapStep = exports.emptyExecution = void 0;
|
|
3
|
+
exports.isCustomStep = exports.isLifiStep = exports.isCrossStep = exports.isSwapStep = exports.emptyExecution = void 0;
|
|
4
4
|
exports.emptyExecution = {
|
|
5
5
|
status: 'NOT_STARTED',
|
|
6
6
|
process: [],
|
|
@@ -17,3 +17,7 @@ function isLifiStep(step) {
|
|
|
17
17
|
return step.type === 'lifi';
|
|
18
18
|
}
|
|
19
19
|
exports.isLifiStep = isLifiStep;
|
|
20
|
+
function isCustomStep(step) {
|
|
21
|
+
return step.type === 'custom';
|
|
22
|
+
}
|
|
23
|
+
exports.isCustomStep = isCustomStep;
|