@paraswap/dex-lib 2.16.1 → 2.16.2-pancakeswapv3.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/build/abi/uniswap-v3/UniswapV3Pool.abi.json +363 -67
- package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +119 -23
- package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +285 -0
- package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +583 -0
- package/build/dex/index.js +2 -0
- package/build/dex/index.js.map +1 -1
- package/build/dex/uniswap-v3/config.js +38 -0
- package/build/dex/uniswap-v3/config.js.map +1 -1
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.d.ts +12 -0
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js +23 -0
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js.map +1 -0
- package/build/dex/uniswap-v3/types.d.ts +3 -0
- package/build/dex/uniswap-v3/types.js.map +1 -1
- package/build/dex/uniswap-v3/uniswap-v3-pool.d.ts +2 -1
- package/build/dex/uniswap-v3/uniswap-v3-pool.js +3 -2
- package/build/dex/uniswap-v3/uniswap-v3-pool.js.map +1 -1
- package/build/dex/uniswap-v3/uniswap-v3.js +6 -3
- package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/uniswap-v3/UniswapV3Pool.abi.json +363 -67
- package/src/abi/uniswap-v3/UniswapV3Quoter.abi.json +119 -23
- package/src/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +285 -0
- package/src/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +583 -0
- package/src/dex/index.ts +2 -0
- package/src/dex/uniswap-v3/config.ts +42 -0
- package/src/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.ts +28 -0
- package/src/dex/uniswap-v3/types.ts +3 -0
- package/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +156 -0
- package/src/dex/uniswap-v3/uniswap-v3-pool.ts +3 -2
- package/src/dex/uniswap-v3/uniswap-v3.ts +8 -2
- package/.idea/aws.xml +0 -17
- package/.idea/codeStyles/Project.xml +0 -19
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/paraswap-dex-lib.iml +0 -9
- package/.idea/runConfigurations.xml +0 -10
- package/.idea/vcs.xml +0 -6
- package/build/abi/woo-fi/WooFeeManager.abi.json +0 -318
- package/build/abi/woo-fi/WooPP.abi.json +0 -548
- package/build/abi/woo-fi/Wooracle.abi.json +0 -260
- package/build/dex/aave-v3/tokens/arbitrum.json +0 -50
- package/build/dex/aave-v3/tokens/avalanche.json +0 -74
- package/build/dex/aave-v3/tokens/fantom.json +0 -62
- package/build/dex/aave-v3/tokens/optimism.json +0 -50
- package/build/dex/aave-v3/tokens/polygon.json +0 -116
- package/build/dex/quickswap-v3.d.ts +0 -21
- package/build/dex/quickswap-v3.js +0 -40
- package/build/dex/quickswap-v3.js.map +0 -1
- package/build/dex/woo-fi/config.d.ts +0 -4
- package/build/dex/woo-fi/config.js +0 -141
- package/build/dex/woo-fi/config.js.map +0 -1
- package/build/dex/woo-fi/constants.d.ts +0 -5
- package/build/dex/woo-fi/constants.js +0 -20
- package/build/dex/woo-fi/constants.js.map +0 -1
- package/build/dex/woo-fi/types.d.ts +0 -48
- package/build/dex/woo-fi/types.js +0 -3
- package/build/dex/woo-fi/types.js.map +0 -1
- package/build/dex/woo-fi/woo-fi-decimal-math.d.ts +0 -14
- package/build/dex/woo-fi/woo-fi-decimal-math.js +0 -42
- package/build/dex/woo-fi/woo-fi-decimal-math.js.map +0 -1
- package/build/dex/woo-fi/woo-fi-math.d.ts +0 -31
- package/build/dex/woo-fi/woo-fi-math.js +0 -300
- package/build/dex/woo-fi/woo-fi-math.js.map +0 -1
- package/build/dex/woo-fi/woo-fi.d.ts +0 -65
- package/build/dex/woo-fi/woo-fi.js +0 -480
- package/build/dex/woo-fi/woo-fi.js.map +0 -1
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{
|
|
5
|
+
"internalType": "address",
|
|
6
|
+
"name": "_deployer",
|
|
7
|
+
"type": "address"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"internalType": "address",
|
|
11
|
+
"name": "_factory",
|
|
12
|
+
"type": "address"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"internalType": "address",
|
|
16
|
+
"name": "_WETH9",
|
|
17
|
+
"type": "address"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"stateMutability": "nonpayable",
|
|
21
|
+
"type": "constructor"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"inputs": [],
|
|
25
|
+
"name": "WETH9",
|
|
26
|
+
"outputs": [
|
|
27
|
+
{
|
|
28
|
+
"internalType": "address",
|
|
29
|
+
"name": "",
|
|
30
|
+
"type": "address"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"stateMutability": "view",
|
|
34
|
+
"type": "function"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"inputs": [],
|
|
38
|
+
"name": "deployer",
|
|
39
|
+
"outputs": [
|
|
40
|
+
{
|
|
41
|
+
"internalType": "address",
|
|
42
|
+
"name": "",
|
|
43
|
+
"type": "address"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"stateMutability": "view",
|
|
47
|
+
"type": "function"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"inputs": [
|
|
51
|
+
{
|
|
52
|
+
"components": [
|
|
53
|
+
{
|
|
54
|
+
"internalType": "bytes",
|
|
55
|
+
"name": "path",
|
|
56
|
+
"type": "bytes"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"internalType": "address",
|
|
60
|
+
"name": "recipient",
|
|
61
|
+
"type": "address"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"internalType": "uint256",
|
|
65
|
+
"name": "deadline",
|
|
66
|
+
"type": "uint256"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"internalType": "uint256",
|
|
70
|
+
"name": "amountIn",
|
|
71
|
+
"type": "uint256"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"internalType": "uint256",
|
|
75
|
+
"name": "amountOutMinimum",
|
|
76
|
+
"type": "uint256"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"internalType": "struct ISwapRouter.ExactInputParams",
|
|
80
|
+
"name": "params",
|
|
81
|
+
"type": "tuple"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"name": "exactInput",
|
|
85
|
+
"outputs": [
|
|
86
|
+
{
|
|
87
|
+
"internalType": "uint256",
|
|
88
|
+
"name": "amountOut",
|
|
89
|
+
"type": "uint256"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"stateMutability": "payable",
|
|
93
|
+
"type": "function"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"inputs": [
|
|
97
|
+
{
|
|
98
|
+
"components": [
|
|
99
|
+
{
|
|
100
|
+
"internalType": "address",
|
|
101
|
+
"name": "tokenIn",
|
|
102
|
+
"type": "address"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"internalType": "address",
|
|
106
|
+
"name": "tokenOut",
|
|
107
|
+
"type": "address"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"internalType": "uint24",
|
|
111
|
+
"name": "fee",
|
|
112
|
+
"type": "uint24"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"internalType": "address",
|
|
116
|
+
"name": "recipient",
|
|
117
|
+
"type": "address"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"internalType": "uint256",
|
|
121
|
+
"name": "deadline",
|
|
122
|
+
"type": "uint256"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"internalType": "uint256",
|
|
126
|
+
"name": "amountIn",
|
|
127
|
+
"type": "uint256"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"internalType": "uint256",
|
|
131
|
+
"name": "amountOutMinimum",
|
|
132
|
+
"type": "uint256"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"internalType": "uint160",
|
|
136
|
+
"name": "sqrtPriceLimitX96",
|
|
137
|
+
"type": "uint160"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"internalType": "struct ISwapRouter.ExactInputSingleParams",
|
|
141
|
+
"name": "params",
|
|
142
|
+
"type": "tuple"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"name": "exactInputSingle",
|
|
146
|
+
"outputs": [
|
|
147
|
+
{
|
|
148
|
+
"internalType": "uint256",
|
|
149
|
+
"name": "amountOut",
|
|
150
|
+
"type": "uint256"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"stateMutability": "payable",
|
|
154
|
+
"type": "function"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"inputs": [
|
|
158
|
+
{
|
|
159
|
+
"components": [
|
|
160
|
+
{
|
|
161
|
+
"internalType": "bytes",
|
|
162
|
+
"name": "path",
|
|
163
|
+
"type": "bytes"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"internalType": "address",
|
|
167
|
+
"name": "recipient",
|
|
168
|
+
"type": "address"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"internalType": "uint256",
|
|
172
|
+
"name": "deadline",
|
|
173
|
+
"type": "uint256"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"internalType": "uint256",
|
|
177
|
+
"name": "amountOut",
|
|
178
|
+
"type": "uint256"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"internalType": "uint256",
|
|
182
|
+
"name": "amountInMaximum",
|
|
183
|
+
"type": "uint256"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"internalType": "struct ISwapRouter.ExactOutputParams",
|
|
187
|
+
"name": "params",
|
|
188
|
+
"type": "tuple"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"name": "exactOutput",
|
|
192
|
+
"outputs": [
|
|
193
|
+
{
|
|
194
|
+
"internalType": "uint256",
|
|
195
|
+
"name": "amountIn",
|
|
196
|
+
"type": "uint256"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"stateMutability": "payable",
|
|
200
|
+
"type": "function"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"inputs": [
|
|
204
|
+
{
|
|
205
|
+
"components": [
|
|
206
|
+
{
|
|
207
|
+
"internalType": "address",
|
|
208
|
+
"name": "tokenIn",
|
|
209
|
+
"type": "address"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"internalType": "address",
|
|
213
|
+
"name": "tokenOut",
|
|
214
|
+
"type": "address"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"internalType": "uint24",
|
|
218
|
+
"name": "fee",
|
|
219
|
+
"type": "uint24"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"internalType": "address",
|
|
223
|
+
"name": "recipient",
|
|
224
|
+
"type": "address"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"internalType": "uint256",
|
|
228
|
+
"name": "deadline",
|
|
229
|
+
"type": "uint256"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"internalType": "uint256",
|
|
233
|
+
"name": "amountOut",
|
|
234
|
+
"type": "uint256"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"internalType": "uint256",
|
|
238
|
+
"name": "amountInMaximum",
|
|
239
|
+
"type": "uint256"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"internalType": "uint160",
|
|
243
|
+
"name": "sqrtPriceLimitX96",
|
|
244
|
+
"type": "uint160"
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
"internalType": "struct ISwapRouter.ExactOutputSingleParams",
|
|
248
|
+
"name": "params",
|
|
249
|
+
"type": "tuple"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"name": "exactOutputSingle",
|
|
253
|
+
"outputs": [
|
|
254
|
+
{
|
|
255
|
+
"internalType": "uint256",
|
|
256
|
+
"name": "amountIn",
|
|
257
|
+
"type": "uint256"
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
"stateMutability": "payable",
|
|
261
|
+
"type": "function"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"inputs": [],
|
|
265
|
+
"name": "factory",
|
|
266
|
+
"outputs": [
|
|
267
|
+
{
|
|
268
|
+
"internalType": "address",
|
|
269
|
+
"name": "",
|
|
270
|
+
"type": "address"
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
"stateMutability": "view",
|
|
274
|
+
"type": "function"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"inputs": [
|
|
278
|
+
{
|
|
279
|
+
"internalType": "bytes[]",
|
|
280
|
+
"name": "data",
|
|
281
|
+
"type": "bytes[]"
|
|
282
|
+
}
|
|
283
|
+
],
|
|
284
|
+
"name": "multicall",
|
|
285
|
+
"outputs": [
|
|
286
|
+
{
|
|
287
|
+
"internalType": "bytes[]",
|
|
288
|
+
"name": "results",
|
|
289
|
+
"type": "bytes[]"
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
"stateMutability": "payable",
|
|
293
|
+
"type": "function"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"inputs": [
|
|
297
|
+
{
|
|
298
|
+
"internalType": "int256",
|
|
299
|
+
"name": "amount0Delta",
|
|
300
|
+
"type": "int256"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"internalType": "int256",
|
|
304
|
+
"name": "amount1Delta",
|
|
305
|
+
"type": "int256"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"internalType": "bytes",
|
|
309
|
+
"name": "_data",
|
|
310
|
+
"type": "bytes"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"name": "pancakeV3SwapCallback",
|
|
314
|
+
"outputs": [],
|
|
315
|
+
"stateMutability": "nonpayable",
|
|
316
|
+
"type": "function"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"inputs": [],
|
|
320
|
+
"name": "refundETH",
|
|
321
|
+
"outputs": [],
|
|
322
|
+
"stateMutability": "payable",
|
|
323
|
+
"type": "function"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"inputs": [
|
|
327
|
+
{
|
|
328
|
+
"internalType": "address",
|
|
329
|
+
"name": "token",
|
|
330
|
+
"type": "address"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"internalType": "uint256",
|
|
334
|
+
"name": "value",
|
|
335
|
+
"type": "uint256"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"internalType": "uint256",
|
|
339
|
+
"name": "deadline",
|
|
340
|
+
"type": "uint256"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"internalType": "uint8",
|
|
344
|
+
"name": "v",
|
|
345
|
+
"type": "uint8"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"internalType": "bytes32",
|
|
349
|
+
"name": "r",
|
|
350
|
+
"type": "bytes32"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"internalType": "bytes32",
|
|
354
|
+
"name": "s",
|
|
355
|
+
"type": "bytes32"
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
"name": "selfPermit",
|
|
359
|
+
"outputs": [],
|
|
360
|
+
"stateMutability": "payable",
|
|
361
|
+
"type": "function"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"inputs": [
|
|
365
|
+
{
|
|
366
|
+
"internalType": "address",
|
|
367
|
+
"name": "token",
|
|
368
|
+
"type": "address"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"internalType": "uint256",
|
|
372
|
+
"name": "nonce",
|
|
373
|
+
"type": "uint256"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"internalType": "uint256",
|
|
377
|
+
"name": "expiry",
|
|
378
|
+
"type": "uint256"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"internalType": "uint8",
|
|
382
|
+
"name": "v",
|
|
383
|
+
"type": "uint8"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"internalType": "bytes32",
|
|
387
|
+
"name": "r",
|
|
388
|
+
"type": "bytes32"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"internalType": "bytes32",
|
|
392
|
+
"name": "s",
|
|
393
|
+
"type": "bytes32"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"name": "selfPermitAllowed",
|
|
397
|
+
"outputs": [],
|
|
398
|
+
"stateMutability": "payable",
|
|
399
|
+
"type": "function"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"inputs": [
|
|
403
|
+
{
|
|
404
|
+
"internalType": "address",
|
|
405
|
+
"name": "token",
|
|
406
|
+
"type": "address"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"internalType": "uint256",
|
|
410
|
+
"name": "nonce",
|
|
411
|
+
"type": "uint256"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"internalType": "uint256",
|
|
415
|
+
"name": "expiry",
|
|
416
|
+
"type": "uint256"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"internalType": "uint8",
|
|
420
|
+
"name": "v",
|
|
421
|
+
"type": "uint8"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"internalType": "bytes32",
|
|
425
|
+
"name": "r",
|
|
426
|
+
"type": "bytes32"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"internalType": "bytes32",
|
|
430
|
+
"name": "s",
|
|
431
|
+
"type": "bytes32"
|
|
432
|
+
}
|
|
433
|
+
],
|
|
434
|
+
"name": "selfPermitAllowedIfNecessary",
|
|
435
|
+
"outputs": [],
|
|
436
|
+
"stateMutability": "payable",
|
|
437
|
+
"type": "function"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"inputs": [
|
|
441
|
+
{
|
|
442
|
+
"internalType": "address",
|
|
443
|
+
"name": "token",
|
|
444
|
+
"type": "address"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"internalType": "uint256",
|
|
448
|
+
"name": "value",
|
|
449
|
+
"type": "uint256"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"internalType": "uint256",
|
|
453
|
+
"name": "deadline",
|
|
454
|
+
"type": "uint256"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"internalType": "uint8",
|
|
458
|
+
"name": "v",
|
|
459
|
+
"type": "uint8"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"internalType": "bytes32",
|
|
463
|
+
"name": "r",
|
|
464
|
+
"type": "bytes32"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"internalType": "bytes32",
|
|
468
|
+
"name": "s",
|
|
469
|
+
"type": "bytes32"
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
"name": "selfPermitIfNecessary",
|
|
473
|
+
"outputs": [],
|
|
474
|
+
"stateMutability": "payable",
|
|
475
|
+
"type": "function"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"inputs": [
|
|
479
|
+
{
|
|
480
|
+
"internalType": "address",
|
|
481
|
+
"name": "token",
|
|
482
|
+
"type": "address"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"internalType": "uint256",
|
|
486
|
+
"name": "amountMinimum",
|
|
487
|
+
"type": "uint256"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"internalType": "address",
|
|
491
|
+
"name": "recipient",
|
|
492
|
+
"type": "address"
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
"name": "sweepToken",
|
|
496
|
+
"outputs": [],
|
|
497
|
+
"stateMutability": "payable",
|
|
498
|
+
"type": "function"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"inputs": [
|
|
502
|
+
{
|
|
503
|
+
"internalType": "address",
|
|
504
|
+
"name": "token",
|
|
505
|
+
"type": "address"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"internalType": "uint256",
|
|
509
|
+
"name": "amountMinimum",
|
|
510
|
+
"type": "uint256"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"internalType": "address",
|
|
514
|
+
"name": "recipient",
|
|
515
|
+
"type": "address"
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"internalType": "uint256",
|
|
519
|
+
"name": "feeBips",
|
|
520
|
+
"type": "uint256"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"internalType": "address",
|
|
524
|
+
"name": "feeRecipient",
|
|
525
|
+
"type": "address"
|
|
526
|
+
}
|
|
527
|
+
],
|
|
528
|
+
"name": "sweepTokenWithFee",
|
|
529
|
+
"outputs": [],
|
|
530
|
+
"stateMutability": "payable",
|
|
531
|
+
"type": "function"
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"inputs": [
|
|
535
|
+
{
|
|
536
|
+
"internalType": "uint256",
|
|
537
|
+
"name": "amountMinimum",
|
|
538
|
+
"type": "uint256"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"internalType": "address",
|
|
542
|
+
"name": "recipient",
|
|
543
|
+
"type": "address"
|
|
544
|
+
}
|
|
545
|
+
],
|
|
546
|
+
"name": "unwrapWETH9",
|
|
547
|
+
"outputs": [],
|
|
548
|
+
"stateMutability": "payable",
|
|
549
|
+
"type": "function"
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
"inputs": [
|
|
553
|
+
{
|
|
554
|
+
"internalType": "uint256",
|
|
555
|
+
"name": "amountMinimum",
|
|
556
|
+
"type": "uint256"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"internalType": "address",
|
|
560
|
+
"name": "recipient",
|
|
561
|
+
"type": "address"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"internalType": "uint256",
|
|
565
|
+
"name": "feeBips",
|
|
566
|
+
"type": "uint256"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"internalType": "address",
|
|
570
|
+
"name": "feeRecipient",
|
|
571
|
+
"type": "address"
|
|
572
|
+
}
|
|
573
|
+
],
|
|
574
|
+
"name": "unwrapWETH9WithFee",
|
|
575
|
+
"outputs": [],
|
|
576
|
+
"stateMutability": "payable",
|
|
577
|
+
"type": "function"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"stateMutability": "payable",
|
|
581
|
+
"type": "receive"
|
|
582
|
+
}
|
|
583
|
+
]
|
package/src/dex/index.ts
CHANGED
|
@@ -63,6 +63,7 @@ import { MaverickV1 } from './maverick-v1/maverick-v1';
|
|
|
63
63
|
import { QuickSwapV3 } from './quickswap/quickswap-v3';
|
|
64
64
|
import { ZyberSwapV3 } from './quickswap/zyberswap-v3';
|
|
65
65
|
import { TraderJoeV2 } from './trader-joe-v2';
|
|
66
|
+
import { PancakeswapV3 } from './uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3';
|
|
66
67
|
|
|
67
68
|
const LegacyDexes = [
|
|
68
69
|
CurveV2,
|
|
@@ -94,6 +95,7 @@ const Dexes = [
|
|
|
94
95
|
BalancerV2,
|
|
95
96
|
UniswapV2,
|
|
96
97
|
UniswapV3,
|
|
98
|
+
PancakeswapV3,
|
|
97
99
|
BiSwap,
|
|
98
100
|
MDEX,
|
|
99
101
|
Dfyn,
|
|
@@ -4,6 +4,7 @@ import { Network, SwapSide } from '../../constants';
|
|
|
4
4
|
import { Address } from '../../types';
|
|
5
5
|
|
|
6
6
|
const SUPPORTED_FEES = [10000n, 3000n, 500n, 100n];
|
|
7
|
+
const PANCAKE_SUPPORTED_FEES = [10000n, 2500n, 500n, 100n];
|
|
7
8
|
|
|
8
9
|
// Pools that will be initialized on app startup
|
|
9
10
|
// They are added for testing
|
|
@@ -22,6 +23,7 @@ export const PoolsToPreload: DexConfigMap<
|
|
|
22
23
|
},
|
|
23
24
|
],
|
|
24
25
|
},
|
|
26
|
+
PancakeswapV3: {},
|
|
25
27
|
};
|
|
26
28
|
|
|
27
29
|
export const UniswapV3Config: DexConfigMap<DexParams> = {
|
|
@@ -34,6 +36,8 @@ export const UniswapV3Config: DexConfigMap<DexParams> = {
|
|
|
34
36
|
stateMulticall: '0x9c764D2e92dA68E4CDfD784B902283A095ff8b63',
|
|
35
37
|
uniswapMulticall: '0x1F98415757620B543A52E61c46B32eB19261F984',
|
|
36
38
|
chunksCount: 10,
|
|
39
|
+
initHash: `0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54`,
|
|
40
|
+
subgraphURL: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3',
|
|
37
41
|
},
|
|
38
42
|
[Network.BSC]: {
|
|
39
43
|
factory: '0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7',
|
|
@@ -43,6 +47,8 @@ export const UniswapV3Config: DexConfigMap<DexParams> = {
|
|
|
43
47
|
stateMulticall: '0x593F39A4Ba26A9c8ed2128ac95D109E8e403C485',
|
|
44
48
|
uniswapMulticall: '0x963Df249eD09c358A4819E39d9Cd5736c3087184',
|
|
45
49
|
chunksCount: 10,
|
|
50
|
+
initHash: `0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54`,
|
|
51
|
+
subgraphURL: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3',
|
|
46
52
|
},
|
|
47
53
|
[Network.POLYGON]: {
|
|
48
54
|
factory: '0x1F98431c8aD98523631AE4a59f267346ea31F984',
|
|
@@ -52,6 +58,8 @@ export const UniswapV3Config: DexConfigMap<DexParams> = {
|
|
|
52
58
|
stateMulticall: '0x6Dc993Fe1e945A640576B4Dca81281d8e998DF71',
|
|
53
59
|
uniswapMulticall: '0x1F98415757620B543A52E61c46B32eB19261F984',
|
|
54
60
|
chunksCount: 10,
|
|
61
|
+
initHash: `0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54`,
|
|
62
|
+
subgraphURL: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3',
|
|
55
63
|
},
|
|
56
64
|
[Network.ARBITRUM]: {
|
|
57
65
|
factory: '0x1F98431c8aD98523631AE4a59f267346ea31F984',
|
|
@@ -61,6 +69,8 @@ export const UniswapV3Config: DexConfigMap<DexParams> = {
|
|
|
61
69
|
stateMulticall: '0xaBB58098A7B5172A9b0B38a1925A522dbf0b4FC3',
|
|
62
70
|
uniswapMulticall: '0x1F98415757620B543A52E61c46B32eB19261F984',
|
|
63
71
|
chunksCount: 10,
|
|
72
|
+
initHash: `0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54`,
|
|
73
|
+
subgraphURL: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3',
|
|
64
74
|
},
|
|
65
75
|
[Network.OPTIMISM]: {
|
|
66
76
|
factory: '0x1F98431c8aD98523631AE4a59f267346ea31F984',
|
|
@@ -70,6 +80,38 @@ export const UniswapV3Config: DexConfigMap<DexParams> = {
|
|
|
70
80
|
stateMulticall: '0x4FF0dEC5f9a763Aa1E5C2a962aa6f4eDFeE4f9eA',
|
|
71
81
|
uniswapMulticall: '0x1F98415757620B543A52E61c46B32eB19261F984',
|
|
72
82
|
chunksCount: 10,
|
|
83
|
+
initHash: `0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54`,
|
|
84
|
+
subgraphURL: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
PancakeswapV3: {
|
|
88
|
+
[Network.MAINNET]: {
|
|
89
|
+
factory: '0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865',
|
|
90
|
+
deployer: '0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9',
|
|
91
|
+
quoter: '0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997',
|
|
92
|
+
router: '0x1b81D678ffb9C0263b24A97847620C99d213eB14',
|
|
93
|
+
supportedFees: PANCAKE_SUPPORTED_FEES,
|
|
94
|
+
stateMulticall: '0x80898f80cFA3Fa3AbF410d90e69aDc432AE5D4c2',
|
|
95
|
+
uniswapMulticall: '0xac1cE734566f390A94b00eb9bf561c2625BF44ea',
|
|
96
|
+
chunksCount: 10,
|
|
97
|
+
initHash:
|
|
98
|
+
'0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2',
|
|
99
|
+
subgraphURL:
|
|
100
|
+
'https://api.thegraph.com/subgraphs/name/pancakeswap/exchange-v3-eth',
|
|
101
|
+
},
|
|
102
|
+
[Network.BSC]: {
|
|
103
|
+
factory: '0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865',
|
|
104
|
+
deployer: '0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9',
|
|
105
|
+
quoter: '0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997',
|
|
106
|
+
router: '0x1b81D678ffb9C0263b24A97847620C99d213eB14',
|
|
107
|
+
supportedFees: PANCAKE_SUPPORTED_FEES,
|
|
108
|
+
stateMulticall: '0x9DAd2ED7ADc6eaacf81589Cd043579c9684E5C81',
|
|
109
|
+
uniswapMulticall: '0xac1cE734566f390A94b00eb9bf561c2625BF44ea',
|
|
110
|
+
chunksCount: 10,
|
|
111
|
+
initHash:
|
|
112
|
+
'0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2',
|
|
113
|
+
subgraphURL:
|
|
114
|
+
'https://api.thegraph.com/subgraphs/name/pancakeswap/exchange-v3-bsc',
|
|
73
115
|
},
|
|
74
116
|
},
|
|
75
117
|
};
|