@luxfi/exchange 0.2.0 → 1.0.1
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/dist/chains/lux.d.ts +6 -116
- package/dist/chains/lux.d.ts.map +1 -1
- package/dist/contracts/abis/amm-v2-factory.d.ts +148 -0
- package/dist/contracts/abis/amm-v2-factory.d.ts.map +1 -0
- package/dist/contracts/abis/{uniswap-v2-factory.js → amm-v2-factory.js} +5 -2
- package/dist/contracts/abis/amm-v2-pair.d.ts +236 -0
- package/dist/contracts/abis/amm-v2-pair.d.ts.map +1 -0
- package/dist/contracts/abis/{uniswap-v2-pair.js → amm-v2-pair.js} +5 -2
- package/dist/contracts/abis/amm-v2-router.d.ts +496 -0
- package/dist/contracts/abis/amm-v2-router.d.ts.map +1 -0
- package/dist/contracts/abis/{uniswap-v2-router.js → amm-v2-router.js} +5 -2
- package/dist/contracts/abis/amm-v3-factory.d.ts +152 -0
- package/dist/contracts/abis/amm-v3-factory.d.ts.map +1 -0
- package/dist/contracts/abis/{uniswap-v3-factory.js → amm-v3-factory.js} +5 -2
- package/dist/contracts/abis/amm-v3-pool.d.ts +254 -0
- package/dist/contracts/abis/amm-v3-pool.d.ts.map +1 -0
- package/dist/contracts/abis/{uniswap-v3-pool.js → amm-v3-pool.js} +5 -2
- package/dist/contracts/abis/index.d.ts +8 -5
- package/dist/contracts/abis/index.d.ts.map +1 -1
- package/dist/contracts/abis/index.js +13 -6
- package/dist/contracts/abis/pool-manager.d.ts +1 -1
- package/dist/contracts/abis/pool-manager.js +1 -1
- package/dist/contracts/addresses.d.ts +30 -42
- package/dist/contracts/addresses.d.ts.map +1 -1
- package/dist/contracts/addresses.js +49 -50
- package/dist/hooks/use-pools.d.ts.map +1 -1
- package/dist/hooks/use-pools.js +8 -6
- package/dist/hooks/use-swap.js +1 -1
- package/dist/hooks/use-token-allowance.d.ts +1 -1
- package/dist/tokens/index.d.ts +31 -3
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +136 -32
- package/package.json +2 -2
- package/src/contracts/abis/{uniswap-v2-factory.ts → amm-v2-factory.ts} +6 -2
- package/src/contracts/abis/{uniswap-v2-pair.ts → amm-v2-pair.ts} +6 -2
- package/src/contracts/abis/{uniswap-v2-router.ts → amm-v2-router.ts} +6 -2
- package/src/contracts/abis/{uniswap-v3-factory.ts → amm-v3-factory.ts} +6 -2
- package/src/contracts/abis/{uniswap-v3-pool.ts → amm-v3-pool.ts} +6 -2
- package/src/contracts/abis/index.ts +16 -6
- package/src/contracts/abis/pool-manager.ts +1 -1
- package/src/contracts/addresses.ts +53 -52
- package/src/hooks/use-pools.ts +8 -6
- package/src/hooks/use-positions.ts +3 -3
- package/src/hooks/use-swap-quote.ts +1 -1
- package/src/hooks/use-swap.ts +1 -1
- package/src/tokens/index.ts +148 -32
- package/dist/contracts/abis/uniswap-v2-factory.d.ts +0 -75
- package/dist/contracts/abis/uniswap-v2-factory.d.ts.map +0 -1
- package/dist/contracts/abis/uniswap-v2-pair.d.ts +0 -119
- package/dist/contracts/abis/uniswap-v2-pair.d.ts.map +0 -1
- package/dist/contracts/abis/uniswap-v2-router.d.ts +0 -249
- package/dist/contracts/abis/uniswap-v2-router.d.ts.map +0 -1
- package/dist/contracts/abis/uniswap-v3-factory.d.ts +0 -77
- package/dist/contracts/abis/uniswap-v3-factory.d.ts.map +0 -1
- package/dist/contracts/abis/uniswap-v3-pool.d.ts +0 -128
- package/dist/contracts/abis/uniswap-v3-pool.d.ts.map +0 -1
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AMM V2 Router ABI
|
|
3
|
+
* Compatible with Lux V2 Router02 interface
|
|
4
|
+
*/
|
|
5
|
+
export declare const AMM_V2_ROUTER_ABI: readonly [{
|
|
6
|
+
readonly type: "function";
|
|
7
|
+
readonly name: "factory";
|
|
8
|
+
readonly inputs: readonly [];
|
|
9
|
+
readonly outputs: readonly [{
|
|
10
|
+
readonly type: "address";
|
|
11
|
+
}];
|
|
12
|
+
readonly stateMutability: "view";
|
|
13
|
+
}, {
|
|
14
|
+
readonly type: "function";
|
|
15
|
+
readonly name: "WETH";
|
|
16
|
+
readonly inputs: readonly [];
|
|
17
|
+
readonly outputs: readonly [{
|
|
18
|
+
readonly type: "address";
|
|
19
|
+
}];
|
|
20
|
+
readonly stateMutability: "view";
|
|
21
|
+
}, {
|
|
22
|
+
readonly type: "function";
|
|
23
|
+
readonly name: "getAmountsOut";
|
|
24
|
+
readonly inputs: readonly [{
|
|
25
|
+
readonly name: "amountIn";
|
|
26
|
+
readonly type: "uint256";
|
|
27
|
+
}, {
|
|
28
|
+
readonly name: "path";
|
|
29
|
+
readonly type: "address[]";
|
|
30
|
+
}];
|
|
31
|
+
readonly outputs: readonly [{
|
|
32
|
+
readonly name: "amounts";
|
|
33
|
+
readonly type: "uint256[]";
|
|
34
|
+
}];
|
|
35
|
+
readonly stateMutability: "view";
|
|
36
|
+
}, {
|
|
37
|
+
readonly type: "function";
|
|
38
|
+
readonly name: "getAmountsIn";
|
|
39
|
+
readonly inputs: readonly [{
|
|
40
|
+
readonly name: "amountOut";
|
|
41
|
+
readonly type: "uint256";
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "path";
|
|
44
|
+
readonly type: "address[]";
|
|
45
|
+
}];
|
|
46
|
+
readonly outputs: readonly [{
|
|
47
|
+
readonly name: "amounts";
|
|
48
|
+
readonly type: "uint256[]";
|
|
49
|
+
}];
|
|
50
|
+
readonly stateMutability: "view";
|
|
51
|
+
}, {
|
|
52
|
+
readonly type: "function";
|
|
53
|
+
readonly name: "swapExactTokensForTokens";
|
|
54
|
+
readonly inputs: readonly [{
|
|
55
|
+
readonly name: "amountIn";
|
|
56
|
+
readonly type: "uint256";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "amountOutMin";
|
|
59
|
+
readonly type: "uint256";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "path";
|
|
62
|
+
readonly type: "address[]";
|
|
63
|
+
}, {
|
|
64
|
+
readonly name: "to";
|
|
65
|
+
readonly type: "address";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "deadline";
|
|
68
|
+
readonly type: "uint256";
|
|
69
|
+
}];
|
|
70
|
+
readonly outputs: readonly [{
|
|
71
|
+
readonly name: "amounts";
|
|
72
|
+
readonly type: "uint256[]";
|
|
73
|
+
}];
|
|
74
|
+
readonly stateMutability: "nonpayable";
|
|
75
|
+
}, {
|
|
76
|
+
readonly type: "function";
|
|
77
|
+
readonly name: "swapTokensForExactTokens";
|
|
78
|
+
readonly inputs: readonly [{
|
|
79
|
+
readonly name: "amountOut";
|
|
80
|
+
readonly type: "uint256";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "amountInMax";
|
|
83
|
+
readonly type: "uint256";
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "path";
|
|
86
|
+
readonly type: "address[]";
|
|
87
|
+
}, {
|
|
88
|
+
readonly name: "to";
|
|
89
|
+
readonly type: "address";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "deadline";
|
|
92
|
+
readonly type: "uint256";
|
|
93
|
+
}];
|
|
94
|
+
readonly outputs: readonly [{
|
|
95
|
+
readonly name: "amounts";
|
|
96
|
+
readonly type: "uint256[]";
|
|
97
|
+
}];
|
|
98
|
+
readonly stateMutability: "nonpayable";
|
|
99
|
+
}, {
|
|
100
|
+
readonly type: "function";
|
|
101
|
+
readonly name: "swapExactETHForTokens";
|
|
102
|
+
readonly inputs: readonly [{
|
|
103
|
+
readonly name: "amountOutMin";
|
|
104
|
+
readonly type: "uint256";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "path";
|
|
107
|
+
readonly type: "address[]";
|
|
108
|
+
}, {
|
|
109
|
+
readonly name: "to";
|
|
110
|
+
readonly type: "address";
|
|
111
|
+
}, {
|
|
112
|
+
readonly name: "deadline";
|
|
113
|
+
readonly type: "uint256";
|
|
114
|
+
}];
|
|
115
|
+
readonly outputs: readonly [{
|
|
116
|
+
readonly name: "amounts";
|
|
117
|
+
readonly type: "uint256[]";
|
|
118
|
+
}];
|
|
119
|
+
readonly stateMutability: "payable";
|
|
120
|
+
}, {
|
|
121
|
+
readonly type: "function";
|
|
122
|
+
readonly name: "swapExactTokensForETH";
|
|
123
|
+
readonly inputs: readonly [{
|
|
124
|
+
readonly name: "amountIn";
|
|
125
|
+
readonly type: "uint256";
|
|
126
|
+
}, {
|
|
127
|
+
readonly name: "amountOutMin";
|
|
128
|
+
readonly type: "uint256";
|
|
129
|
+
}, {
|
|
130
|
+
readonly name: "path";
|
|
131
|
+
readonly type: "address[]";
|
|
132
|
+
}, {
|
|
133
|
+
readonly name: "to";
|
|
134
|
+
readonly type: "address";
|
|
135
|
+
}, {
|
|
136
|
+
readonly name: "deadline";
|
|
137
|
+
readonly type: "uint256";
|
|
138
|
+
}];
|
|
139
|
+
readonly outputs: readonly [{
|
|
140
|
+
readonly name: "amounts";
|
|
141
|
+
readonly type: "uint256[]";
|
|
142
|
+
}];
|
|
143
|
+
readonly stateMutability: "nonpayable";
|
|
144
|
+
}, {
|
|
145
|
+
readonly type: "function";
|
|
146
|
+
readonly name: "addLiquidity";
|
|
147
|
+
readonly inputs: readonly [{
|
|
148
|
+
readonly name: "tokenA";
|
|
149
|
+
readonly type: "address";
|
|
150
|
+
}, {
|
|
151
|
+
readonly name: "tokenB";
|
|
152
|
+
readonly type: "address";
|
|
153
|
+
}, {
|
|
154
|
+
readonly name: "amountADesired";
|
|
155
|
+
readonly type: "uint256";
|
|
156
|
+
}, {
|
|
157
|
+
readonly name: "amountBDesired";
|
|
158
|
+
readonly type: "uint256";
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "amountAMin";
|
|
161
|
+
readonly type: "uint256";
|
|
162
|
+
}, {
|
|
163
|
+
readonly name: "amountBMin";
|
|
164
|
+
readonly type: "uint256";
|
|
165
|
+
}, {
|
|
166
|
+
readonly name: "to";
|
|
167
|
+
readonly type: "address";
|
|
168
|
+
}, {
|
|
169
|
+
readonly name: "deadline";
|
|
170
|
+
readonly type: "uint256";
|
|
171
|
+
}];
|
|
172
|
+
readonly outputs: readonly [{
|
|
173
|
+
readonly name: "amountA";
|
|
174
|
+
readonly type: "uint256";
|
|
175
|
+
}, {
|
|
176
|
+
readonly name: "amountB";
|
|
177
|
+
readonly type: "uint256";
|
|
178
|
+
}, {
|
|
179
|
+
readonly name: "liquidity";
|
|
180
|
+
readonly type: "uint256";
|
|
181
|
+
}];
|
|
182
|
+
readonly stateMutability: "nonpayable";
|
|
183
|
+
}, {
|
|
184
|
+
readonly type: "function";
|
|
185
|
+
readonly name: "addLiquidityETH";
|
|
186
|
+
readonly inputs: readonly [{
|
|
187
|
+
readonly name: "token";
|
|
188
|
+
readonly type: "address";
|
|
189
|
+
}, {
|
|
190
|
+
readonly name: "amountTokenDesired";
|
|
191
|
+
readonly type: "uint256";
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "amountTokenMin";
|
|
194
|
+
readonly type: "uint256";
|
|
195
|
+
}, {
|
|
196
|
+
readonly name: "amountETHMin";
|
|
197
|
+
readonly type: "uint256";
|
|
198
|
+
}, {
|
|
199
|
+
readonly name: "to";
|
|
200
|
+
readonly type: "address";
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "deadline";
|
|
203
|
+
readonly type: "uint256";
|
|
204
|
+
}];
|
|
205
|
+
readonly outputs: readonly [{
|
|
206
|
+
readonly name: "amountToken";
|
|
207
|
+
readonly type: "uint256";
|
|
208
|
+
}, {
|
|
209
|
+
readonly name: "amountETH";
|
|
210
|
+
readonly type: "uint256";
|
|
211
|
+
}, {
|
|
212
|
+
readonly name: "liquidity";
|
|
213
|
+
readonly type: "uint256";
|
|
214
|
+
}];
|
|
215
|
+
readonly stateMutability: "payable";
|
|
216
|
+
}, {
|
|
217
|
+
readonly type: "function";
|
|
218
|
+
readonly name: "removeLiquidity";
|
|
219
|
+
readonly inputs: readonly [{
|
|
220
|
+
readonly name: "tokenA";
|
|
221
|
+
readonly type: "address";
|
|
222
|
+
}, {
|
|
223
|
+
readonly name: "tokenB";
|
|
224
|
+
readonly type: "address";
|
|
225
|
+
}, {
|
|
226
|
+
readonly name: "liquidity";
|
|
227
|
+
readonly type: "uint256";
|
|
228
|
+
}, {
|
|
229
|
+
readonly name: "amountAMin";
|
|
230
|
+
readonly type: "uint256";
|
|
231
|
+
}, {
|
|
232
|
+
readonly name: "amountBMin";
|
|
233
|
+
readonly type: "uint256";
|
|
234
|
+
}, {
|
|
235
|
+
readonly name: "to";
|
|
236
|
+
readonly type: "address";
|
|
237
|
+
}, {
|
|
238
|
+
readonly name: "deadline";
|
|
239
|
+
readonly type: "uint256";
|
|
240
|
+
}];
|
|
241
|
+
readonly outputs: readonly [{
|
|
242
|
+
readonly name: "amountA";
|
|
243
|
+
readonly type: "uint256";
|
|
244
|
+
}, {
|
|
245
|
+
readonly name: "amountB";
|
|
246
|
+
readonly type: "uint256";
|
|
247
|
+
}];
|
|
248
|
+
readonly stateMutability: "nonpayable";
|
|
249
|
+
}];
|
|
250
|
+
/** @deprecated Use AMM_V2_ROUTER_ABI instead */
|
|
251
|
+
export declare const LUX_V2_ROUTER_ABI: readonly [{
|
|
252
|
+
readonly type: "function";
|
|
253
|
+
readonly name: "factory";
|
|
254
|
+
readonly inputs: readonly [];
|
|
255
|
+
readonly outputs: readonly [{
|
|
256
|
+
readonly type: "address";
|
|
257
|
+
}];
|
|
258
|
+
readonly stateMutability: "view";
|
|
259
|
+
}, {
|
|
260
|
+
readonly type: "function";
|
|
261
|
+
readonly name: "WETH";
|
|
262
|
+
readonly inputs: readonly [];
|
|
263
|
+
readonly outputs: readonly [{
|
|
264
|
+
readonly type: "address";
|
|
265
|
+
}];
|
|
266
|
+
readonly stateMutability: "view";
|
|
267
|
+
}, {
|
|
268
|
+
readonly type: "function";
|
|
269
|
+
readonly name: "getAmountsOut";
|
|
270
|
+
readonly inputs: readonly [{
|
|
271
|
+
readonly name: "amountIn";
|
|
272
|
+
readonly type: "uint256";
|
|
273
|
+
}, {
|
|
274
|
+
readonly name: "path";
|
|
275
|
+
readonly type: "address[]";
|
|
276
|
+
}];
|
|
277
|
+
readonly outputs: readonly [{
|
|
278
|
+
readonly name: "amounts";
|
|
279
|
+
readonly type: "uint256[]";
|
|
280
|
+
}];
|
|
281
|
+
readonly stateMutability: "view";
|
|
282
|
+
}, {
|
|
283
|
+
readonly type: "function";
|
|
284
|
+
readonly name: "getAmountsIn";
|
|
285
|
+
readonly inputs: readonly [{
|
|
286
|
+
readonly name: "amountOut";
|
|
287
|
+
readonly type: "uint256";
|
|
288
|
+
}, {
|
|
289
|
+
readonly name: "path";
|
|
290
|
+
readonly type: "address[]";
|
|
291
|
+
}];
|
|
292
|
+
readonly outputs: readonly [{
|
|
293
|
+
readonly name: "amounts";
|
|
294
|
+
readonly type: "uint256[]";
|
|
295
|
+
}];
|
|
296
|
+
readonly stateMutability: "view";
|
|
297
|
+
}, {
|
|
298
|
+
readonly type: "function";
|
|
299
|
+
readonly name: "swapExactTokensForTokens";
|
|
300
|
+
readonly inputs: readonly [{
|
|
301
|
+
readonly name: "amountIn";
|
|
302
|
+
readonly type: "uint256";
|
|
303
|
+
}, {
|
|
304
|
+
readonly name: "amountOutMin";
|
|
305
|
+
readonly type: "uint256";
|
|
306
|
+
}, {
|
|
307
|
+
readonly name: "path";
|
|
308
|
+
readonly type: "address[]";
|
|
309
|
+
}, {
|
|
310
|
+
readonly name: "to";
|
|
311
|
+
readonly type: "address";
|
|
312
|
+
}, {
|
|
313
|
+
readonly name: "deadline";
|
|
314
|
+
readonly type: "uint256";
|
|
315
|
+
}];
|
|
316
|
+
readonly outputs: readonly [{
|
|
317
|
+
readonly name: "amounts";
|
|
318
|
+
readonly type: "uint256[]";
|
|
319
|
+
}];
|
|
320
|
+
readonly stateMutability: "nonpayable";
|
|
321
|
+
}, {
|
|
322
|
+
readonly type: "function";
|
|
323
|
+
readonly name: "swapTokensForExactTokens";
|
|
324
|
+
readonly inputs: readonly [{
|
|
325
|
+
readonly name: "amountOut";
|
|
326
|
+
readonly type: "uint256";
|
|
327
|
+
}, {
|
|
328
|
+
readonly name: "amountInMax";
|
|
329
|
+
readonly type: "uint256";
|
|
330
|
+
}, {
|
|
331
|
+
readonly name: "path";
|
|
332
|
+
readonly type: "address[]";
|
|
333
|
+
}, {
|
|
334
|
+
readonly name: "to";
|
|
335
|
+
readonly type: "address";
|
|
336
|
+
}, {
|
|
337
|
+
readonly name: "deadline";
|
|
338
|
+
readonly type: "uint256";
|
|
339
|
+
}];
|
|
340
|
+
readonly outputs: readonly [{
|
|
341
|
+
readonly name: "amounts";
|
|
342
|
+
readonly type: "uint256[]";
|
|
343
|
+
}];
|
|
344
|
+
readonly stateMutability: "nonpayable";
|
|
345
|
+
}, {
|
|
346
|
+
readonly type: "function";
|
|
347
|
+
readonly name: "swapExactETHForTokens";
|
|
348
|
+
readonly inputs: readonly [{
|
|
349
|
+
readonly name: "amountOutMin";
|
|
350
|
+
readonly type: "uint256";
|
|
351
|
+
}, {
|
|
352
|
+
readonly name: "path";
|
|
353
|
+
readonly type: "address[]";
|
|
354
|
+
}, {
|
|
355
|
+
readonly name: "to";
|
|
356
|
+
readonly type: "address";
|
|
357
|
+
}, {
|
|
358
|
+
readonly name: "deadline";
|
|
359
|
+
readonly type: "uint256";
|
|
360
|
+
}];
|
|
361
|
+
readonly outputs: readonly [{
|
|
362
|
+
readonly name: "amounts";
|
|
363
|
+
readonly type: "uint256[]";
|
|
364
|
+
}];
|
|
365
|
+
readonly stateMutability: "payable";
|
|
366
|
+
}, {
|
|
367
|
+
readonly type: "function";
|
|
368
|
+
readonly name: "swapExactTokensForETH";
|
|
369
|
+
readonly inputs: readonly [{
|
|
370
|
+
readonly name: "amountIn";
|
|
371
|
+
readonly type: "uint256";
|
|
372
|
+
}, {
|
|
373
|
+
readonly name: "amountOutMin";
|
|
374
|
+
readonly type: "uint256";
|
|
375
|
+
}, {
|
|
376
|
+
readonly name: "path";
|
|
377
|
+
readonly type: "address[]";
|
|
378
|
+
}, {
|
|
379
|
+
readonly name: "to";
|
|
380
|
+
readonly type: "address";
|
|
381
|
+
}, {
|
|
382
|
+
readonly name: "deadline";
|
|
383
|
+
readonly type: "uint256";
|
|
384
|
+
}];
|
|
385
|
+
readonly outputs: readonly [{
|
|
386
|
+
readonly name: "amounts";
|
|
387
|
+
readonly type: "uint256[]";
|
|
388
|
+
}];
|
|
389
|
+
readonly stateMutability: "nonpayable";
|
|
390
|
+
}, {
|
|
391
|
+
readonly type: "function";
|
|
392
|
+
readonly name: "addLiquidity";
|
|
393
|
+
readonly inputs: readonly [{
|
|
394
|
+
readonly name: "tokenA";
|
|
395
|
+
readonly type: "address";
|
|
396
|
+
}, {
|
|
397
|
+
readonly name: "tokenB";
|
|
398
|
+
readonly type: "address";
|
|
399
|
+
}, {
|
|
400
|
+
readonly name: "amountADesired";
|
|
401
|
+
readonly type: "uint256";
|
|
402
|
+
}, {
|
|
403
|
+
readonly name: "amountBDesired";
|
|
404
|
+
readonly type: "uint256";
|
|
405
|
+
}, {
|
|
406
|
+
readonly name: "amountAMin";
|
|
407
|
+
readonly type: "uint256";
|
|
408
|
+
}, {
|
|
409
|
+
readonly name: "amountBMin";
|
|
410
|
+
readonly type: "uint256";
|
|
411
|
+
}, {
|
|
412
|
+
readonly name: "to";
|
|
413
|
+
readonly type: "address";
|
|
414
|
+
}, {
|
|
415
|
+
readonly name: "deadline";
|
|
416
|
+
readonly type: "uint256";
|
|
417
|
+
}];
|
|
418
|
+
readonly outputs: readonly [{
|
|
419
|
+
readonly name: "amountA";
|
|
420
|
+
readonly type: "uint256";
|
|
421
|
+
}, {
|
|
422
|
+
readonly name: "amountB";
|
|
423
|
+
readonly type: "uint256";
|
|
424
|
+
}, {
|
|
425
|
+
readonly name: "liquidity";
|
|
426
|
+
readonly type: "uint256";
|
|
427
|
+
}];
|
|
428
|
+
readonly stateMutability: "nonpayable";
|
|
429
|
+
}, {
|
|
430
|
+
readonly type: "function";
|
|
431
|
+
readonly name: "addLiquidityETH";
|
|
432
|
+
readonly inputs: readonly [{
|
|
433
|
+
readonly name: "token";
|
|
434
|
+
readonly type: "address";
|
|
435
|
+
}, {
|
|
436
|
+
readonly name: "amountTokenDesired";
|
|
437
|
+
readonly type: "uint256";
|
|
438
|
+
}, {
|
|
439
|
+
readonly name: "amountTokenMin";
|
|
440
|
+
readonly type: "uint256";
|
|
441
|
+
}, {
|
|
442
|
+
readonly name: "amountETHMin";
|
|
443
|
+
readonly type: "uint256";
|
|
444
|
+
}, {
|
|
445
|
+
readonly name: "to";
|
|
446
|
+
readonly type: "address";
|
|
447
|
+
}, {
|
|
448
|
+
readonly name: "deadline";
|
|
449
|
+
readonly type: "uint256";
|
|
450
|
+
}];
|
|
451
|
+
readonly outputs: readonly [{
|
|
452
|
+
readonly name: "amountToken";
|
|
453
|
+
readonly type: "uint256";
|
|
454
|
+
}, {
|
|
455
|
+
readonly name: "amountETH";
|
|
456
|
+
readonly type: "uint256";
|
|
457
|
+
}, {
|
|
458
|
+
readonly name: "liquidity";
|
|
459
|
+
readonly type: "uint256";
|
|
460
|
+
}];
|
|
461
|
+
readonly stateMutability: "payable";
|
|
462
|
+
}, {
|
|
463
|
+
readonly type: "function";
|
|
464
|
+
readonly name: "removeLiquidity";
|
|
465
|
+
readonly inputs: readonly [{
|
|
466
|
+
readonly name: "tokenA";
|
|
467
|
+
readonly type: "address";
|
|
468
|
+
}, {
|
|
469
|
+
readonly name: "tokenB";
|
|
470
|
+
readonly type: "address";
|
|
471
|
+
}, {
|
|
472
|
+
readonly name: "liquidity";
|
|
473
|
+
readonly type: "uint256";
|
|
474
|
+
}, {
|
|
475
|
+
readonly name: "amountAMin";
|
|
476
|
+
readonly type: "uint256";
|
|
477
|
+
}, {
|
|
478
|
+
readonly name: "amountBMin";
|
|
479
|
+
readonly type: "uint256";
|
|
480
|
+
}, {
|
|
481
|
+
readonly name: "to";
|
|
482
|
+
readonly type: "address";
|
|
483
|
+
}, {
|
|
484
|
+
readonly name: "deadline";
|
|
485
|
+
readonly type: "uint256";
|
|
486
|
+
}];
|
|
487
|
+
readonly outputs: readonly [{
|
|
488
|
+
readonly name: "amountA";
|
|
489
|
+
readonly type: "uint256";
|
|
490
|
+
}, {
|
|
491
|
+
readonly name: "amountB";
|
|
492
|
+
readonly type: "uint256";
|
|
493
|
+
}];
|
|
494
|
+
readonly stateMutability: "nonpayable";
|
|
495
|
+
}];
|
|
496
|
+
//# sourceMappingURL=amm-v2-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amm-v2-router.d.ts","sourceRoot":"","sources":["../../../src/contracts/abis/amm-v2-router.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8IpB,CAAA;AAEV,gDAAgD;AAChD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoB,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* AMM V2 Router ABI
|
|
3
|
+
* Compatible with Lux V2 Router02 interface
|
|
3
4
|
*/
|
|
4
|
-
export const
|
|
5
|
+
export const AMM_V2_ROUTER_ABI = [
|
|
5
6
|
{
|
|
6
7
|
type: 'function',
|
|
7
8
|
name: 'factory',
|
|
@@ -144,3 +145,5 @@ export const UNISWAP_V2_ROUTER_ABI = [
|
|
|
144
145
|
stateMutability: 'nonpayable',
|
|
145
146
|
},
|
|
146
147
|
];
|
|
148
|
+
/** @deprecated Use AMM_V2_ROUTER_ABI instead */
|
|
149
|
+
export const LUX_V2_ROUTER_ABI = AMM_V2_ROUTER_ABI;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AMM V3 Factory ABI
|
|
3
|
+
* Compatible with Lux V3 Factory interface
|
|
4
|
+
*/
|
|
5
|
+
export declare const AMM_V3_FACTORY_ABI: readonly [{
|
|
6
|
+
readonly type: "function";
|
|
7
|
+
readonly name: "getPool";
|
|
8
|
+
readonly inputs: readonly [{
|
|
9
|
+
readonly name: "tokenA";
|
|
10
|
+
readonly type: "address";
|
|
11
|
+
}, {
|
|
12
|
+
readonly name: "tokenB";
|
|
13
|
+
readonly type: "address";
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "fee";
|
|
16
|
+
readonly type: "uint24";
|
|
17
|
+
}];
|
|
18
|
+
readonly outputs: readonly [{
|
|
19
|
+
readonly name: "pool";
|
|
20
|
+
readonly type: "address";
|
|
21
|
+
}];
|
|
22
|
+
readonly stateMutability: "view";
|
|
23
|
+
}, {
|
|
24
|
+
readonly type: "function";
|
|
25
|
+
readonly name: "createPool";
|
|
26
|
+
readonly inputs: readonly [{
|
|
27
|
+
readonly name: "tokenA";
|
|
28
|
+
readonly type: "address";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "tokenB";
|
|
31
|
+
readonly type: "address";
|
|
32
|
+
}, {
|
|
33
|
+
readonly name: "fee";
|
|
34
|
+
readonly type: "uint24";
|
|
35
|
+
}];
|
|
36
|
+
readonly outputs: readonly [{
|
|
37
|
+
readonly name: "pool";
|
|
38
|
+
readonly type: "address";
|
|
39
|
+
}];
|
|
40
|
+
readonly stateMutability: "nonpayable";
|
|
41
|
+
}, {
|
|
42
|
+
readonly type: "function";
|
|
43
|
+
readonly name: "feeAmountTickSpacing";
|
|
44
|
+
readonly inputs: readonly [{
|
|
45
|
+
readonly name: "fee";
|
|
46
|
+
readonly type: "uint24";
|
|
47
|
+
}];
|
|
48
|
+
readonly outputs: readonly [{
|
|
49
|
+
readonly name: "tickSpacing";
|
|
50
|
+
readonly type: "int24";
|
|
51
|
+
}];
|
|
52
|
+
readonly stateMutability: "view";
|
|
53
|
+
}, {
|
|
54
|
+
readonly type: "event";
|
|
55
|
+
readonly name: "PoolCreated";
|
|
56
|
+
readonly inputs: readonly [{
|
|
57
|
+
readonly name: "token0";
|
|
58
|
+
readonly type: "address";
|
|
59
|
+
readonly indexed: true;
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "token1";
|
|
62
|
+
readonly type: "address";
|
|
63
|
+
readonly indexed: true;
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "fee";
|
|
66
|
+
readonly type: "uint24";
|
|
67
|
+
readonly indexed: true;
|
|
68
|
+
}, {
|
|
69
|
+
readonly name: "tickSpacing";
|
|
70
|
+
readonly type: "int24";
|
|
71
|
+
readonly indexed: false;
|
|
72
|
+
}, {
|
|
73
|
+
readonly name: "pool";
|
|
74
|
+
readonly type: "address";
|
|
75
|
+
readonly indexed: false;
|
|
76
|
+
}];
|
|
77
|
+
}];
|
|
78
|
+
/** @deprecated Use AMM_V3_FACTORY_ABI instead */
|
|
79
|
+
export declare const LUX_V3_FACTORY_ABI: readonly [{
|
|
80
|
+
readonly type: "function";
|
|
81
|
+
readonly name: "getPool";
|
|
82
|
+
readonly inputs: readonly [{
|
|
83
|
+
readonly name: "tokenA";
|
|
84
|
+
readonly type: "address";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "tokenB";
|
|
87
|
+
readonly type: "address";
|
|
88
|
+
}, {
|
|
89
|
+
readonly name: "fee";
|
|
90
|
+
readonly type: "uint24";
|
|
91
|
+
}];
|
|
92
|
+
readonly outputs: readonly [{
|
|
93
|
+
readonly name: "pool";
|
|
94
|
+
readonly type: "address";
|
|
95
|
+
}];
|
|
96
|
+
readonly stateMutability: "view";
|
|
97
|
+
}, {
|
|
98
|
+
readonly type: "function";
|
|
99
|
+
readonly name: "createPool";
|
|
100
|
+
readonly inputs: readonly [{
|
|
101
|
+
readonly name: "tokenA";
|
|
102
|
+
readonly type: "address";
|
|
103
|
+
}, {
|
|
104
|
+
readonly name: "tokenB";
|
|
105
|
+
readonly type: "address";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "fee";
|
|
108
|
+
readonly type: "uint24";
|
|
109
|
+
}];
|
|
110
|
+
readonly outputs: readonly [{
|
|
111
|
+
readonly name: "pool";
|
|
112
|
+
readonly type: "address";
|
|
113
|
+
}];
|
|
114
|
+
readonly stateMutability: "nonpayable";
|
|
115
|
+
}, {
|
|
116
|
+
readonly type: "function";
|
|
117
|
+
readonly name: "feeAmountTickSpacing";
|
|
118
|
+
readonly inputs: readonly [{
|
|
119
|
+
readonly name: "fee";
|
|
120
|
+
readonly type: "uint24";
|
|
121
|
+
}];
|
|
122
|
+
readonly outputs: readonly [{
|
|
123
|
+
readonly name: "tickSpacing";
|
|
124
|
+
readonly type: "int24";
|
|
125
|
+
}];
|
|
126
|
+
readonly stateMutability: "view";
|
|
127
|
+
}, {
|
|
128
|
+
readonly type: "event";
|
|
129
|
+
readonly name: "PoolCreated";
|
|
130
|
+
readonly inputs: readonly [{
|
|
131
|
+
readonly name: "token0";
|
|
132
|
+
readonly type: "address";
|
|
133
|
+
readonly indexed: true;
|
|
134
|
+
}, {
|
|
135
|
+
readonly name: "token1";
|
|
136
|
+
readonly type: "address";
|
|
137
|
+
readonly indexed: true;
|
|
138
|
+
}, {
|
|
139
|
+
readonly name: "fee";
|
|
140
|
+
readonly type: "uint24";
|
|
141
|
+
readonly indexed: true;
|
|
142
|
+
}, {
|
|
143
|
+
readonly name: "tickSpacing";
|
|
144
|
+
readonly type: "int24";
|
|
145
|
+
readonly indexed: false;
|
|
146
|
+
}, {
|
|
147
|
+
readonly name: "pool";
|
|
148
|
+
readonly type: "address";
|
|
149
|
+
readonly indexed: false;
|
|
150
|
+
}];
|
|
151
|
+
}];
|
|
152
|
+
//# sourceMappingURL=amm-v3-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amm-v3-factory.d.ts","sourceRoot":"","sources":["../../../src/contracts/abis/amm-v3-factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCrB,CAAA;AAEV,iDAAiD;AACjD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAqB,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* AMM V3 Factory ABI
|
|
3
|
+
* Compatible with Lux V3 Factory interface
|
|
3
4
|
*/
|
|
4
|
-
export const
|
|
5
|
+
export const AMM_V3_FACTORY_ABI = [
|
|
5
6
|
{
|
|
6
7
|
type: 'function',
|
|
7
8
|
name: 'getPool',
|
|
@@ -43,3 +44,5 @@ export const UNISWAP_V3_FACTORY_ABI = [
|
|
|
43
44
|
],
|
|
44
45
|
},
|
|
45
46
|
];
|
|
47
|
+
/** @deprecated Use AMM_V3_FACTORY_ABI instead */
|
|
48
|
+
export const LUX_V3_FACTORY_ABI = AMM_V3_FACTORY_ABI;
|