@paraswap/dex-lib 4.6.21 → 4.6.22

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.
Files changed (77) hide show
  1. package/build/abi/PendleRouterStatic.json +19 -0
  2. package/build/abi/apex-defi/ApexDefiFactory.abi.json +1749 -0
  3. package/build/abi/apex-defi/ApexDefiRouter.abi.json +1120 -0
  4. package/build/abi/apex-defi/ApexDefiToken.abi.json +229 -0
  5. package/build/abi/apex-defi/ApexDefiWrapper.abi.json +92 -0
  6. package/build/abi/apex-defi/ApexDefiWrapperFactory.abi.json +1107 -0
  7. package/build/abi/ekubo/router.json +416 -398
  8. package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.d.ts +2 -3
  9. package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.js +53 -26
  10. package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.js.map +1 -1
  11. package/build/dex/aave-pt-to-underlying/config.js +3 -0
  12. package/build/dex/aave-pt-to-underlying/config.js.map +1 -1
  13. package/build/dex/aave-pt-to-underlying/types.d.ts +1 -0
  14. package/build/dex/apex-defi/apex-defi-factory.d.ts +26 -0
  15. package/build/dex/apex-defi/apex-defi-factory.js +53 -0
  16. package/build/dex/apex-defi/apex-defi-factory.js.map +1 -0
  17. package/build/dex/apex-defi/apex-defi-pool.d.ts +55 -0
  18. package/build/dex/apex-defi/apex-defi-pool.js +247 -0
  19. package/build/dex/apex-defi/apex-defi-pool.js.map +1 -0
  20. package/build/dex/apex-defi/apex-defi-wrapper-factory.d.ts +57 -0
  21. package/build/dex/apex-defi/apex-defi-wrapper-factory.js +250 -0
  22. package/build/dex/apex-defi/apex-defi-wrapper-factory.js.map +1 -0
  23. package/build/dex/apex-defi/apex-defi.d.ts +97 -0
  24. package/build/dex/apex-defi/apex-defi.js +1021 -0
  25. package/build/dex/apex-defi/apex-defi.js.map +1 -0
  26. package/build/dex/apex-defi/config.d.ts +4 -0
  27. package/build/dex/apex-defi/config.js +138 -0
  28. package/build/dex/apex-defi/config.js.map +1 -0
  29. package/build/dex/apex-defi/types.d.ts +32 -0
  30. package/build/dex/apex-defi/types.js +3 -0
  31. package/build/dex/apex-defi/types.js.map +1 -0
  32. package/build/dex/apex-defi/utils.d.ts +46 -0
  33. package/build/dex/apex-defi/utils.js +133 -0
  34. package/build/dex/apex-defi/utils.js.map +1 -0
  35. package/build/dex/ekubo/config.d.ts +2 -1
  36. package/build/dex/ekubo/config.js +6 -4
  37. package/build/dex/ekubo/config.js.map +1 -1
  38. package/build/dex/ekubo/ekubo.d.ts +13 -12
  39. package/build/dex/ekubo/ekubo.js +282 -234
  40. package/build/dex/ekubo/ekubo.js.map +1 -1
  41. package/build/dex/ekubo/pools/base.d.ts +6 -2
  42. package/build/dex/ekubo/pools/base.js +120 -113
  43. package/build/dex/ekubo/pools/base.js.map +1 -1
  44. package/build/dex/ekubo/pools/full-range.d.ts +6 -5
  45. package/build/dex/ekubo/pools/full-range.js +50 -40
  46. package/build/dex/ekubo/pools/full-range.js.map +1 -1
  47. package/build/dex/ekubo/pools/math/swap.js +3 -3
  48. package/build/dex/ekubo/pools/math/swap.js.map +1 -1
  49. package/build/dex/ekubo/pools/math/tick.d.ts +1 -0
  50. package/build/dex/ekubo/pools/math/tick.js +9 -4
  51. package/build/dex/ekubo/pools/math/tick.js.map +1 -1
  52. package/build/dex/ekubo/pools/oracle.d.ts +5 -6
  53. package/build/dex/ekubo/pools/oracle.js +8 -10
  54. package/build/dex/ekubo/pools/oracle.js.map +1 -1
  55. package/build/dex/ekubo/pools/twamm.d.ts +5 -3
  56. package/build/dex/ekubo/pools/twamm.js +102 -94
  57. package/build/dex/ekubo/pools/twamm.js.map +1 -1
  58. package/build/dex/ekubo/pools/utils.d.ts +8 -7
  59. package/build/dex/ekubo/pools/utils.js +31 -18
  60. package/build/dex/ekubo/pools/utils.js.map +1 -1
  61. package/build/dex/ekubo/types.d.ts +1 -0
  62. package/build/dex/ekubo/utils.d.ts +0 -1
  63. package/build/dex/ekubo/utils.js +0 -4
  64. package/build/dex/ekubo/utils.js.map +1 -1
  65. package/build/dex/yo/config.d.ts +3 -0
  66. package/build/dex/yo/config.js +21 -0
  67. package/build/dex/yo/config.js.map +1 -0
  68. package/build/dex/yo/types.d.ts +13 -0
  69. package/build/dex/yo/types.js +3 -0
  70. package/build/dex/yo/types.js.map +1 -0
  71. package/build/dex/yo/yo-pool.d.ts +13 -0
  72. package/build/dex/yo/yo-pool.js +26 -0
  73. package/build/dex/yo/yo-pool.js.map +1 -0
  74. package/build/dex/yo/yo.d.ts +39 -0
  75. package/build/dex/yo/yo.js +248 -0
  76. package/build/dex/yo/yo.js.map +1 -0
  77. package/package.json +1 -1
@@ -1,803 +1,821 @@
1
1
  [
2
2
  {
3
- "type": "constructor",
4
3
  "inputs": [
5
4
  {
5
+ "internalType": "contract ICore",
6
6
  "name": "core",
7
- "type": "address",
8
- "internalType": "contract ICore"
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "_mevResist",
12
+ "type": "address"
9
13
  }
10
14
  ],
11
- "stateMutability": "nonpayable"
15
+ "stateMutability": "nonpayable",
16
+ "type": "constructor"
17
+ },
18
+ {
19
+ "inputs": [],
20
+ "name": "BaseLockerAccountantOnly",
21
+ "type": "error"
22
+ },
23
+ {
24
+ "inputs": [],
25
+ "name": "CoreOnly",
26
+ "type": "error"
27
+ },
28
+ {
29
+ "inputs": [],
30
+ "name": "ExpectedRevertWithinLock",
31
+ "type": "error"
32
+ },
33
+ {
34
+ "inputs": [
35
+ {
36
+ "internalType": "address",
37
+ "name": "token",
38
+ "type": "address"
39
+ },
40
+ {
41
+ "internalType": "uint256",
42
+ "name": "maximumInput",
43
+ "type": "uint256"
44
+ }
45
+ ],
46
+ "name": "MaximumInputExceeded",
47
+ "type": "error"
48
+ },
49
+ {
50
+ "inputs": [
51
+ {
52
+ "internalType": "address",
53
+ "name": "token",
54
+ "type": "address"
55
+ },
56
+ {
57
+ "internalType": "uint256",
58
+ "name": "minimumOutput",
59
+ "type": "uint256"
60
+ }
61
+ ],
62
+ "name": "MinimumOutputNotReceived",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [],
67
+ "name": "PartialSwapsDisallowed",
68
+ "type": "error"
69
+ },
70
+ {
71
+ "inputs": [
72
+ {
73
+ "internalType": "int128",
74
+ "name": "delta0",
75
+ "type": "int128"
76
+ },
77
+ {
78
+ "internalType": "int128",
79
+ "name": "delta1",
80
+ "type": "int128"
81
+ }
82
+ ],
83
+ "name": "QuoteReturnValue",
84
+ "type": "error"
85
+ },
86
+ {
87
+ "inputs": [
88
+ {
89
+ "internalType": "int256",
90
+ "name": "expectedAmount",
91
+ "type": "int256"
92
+ },
93
+ {
94
+ "internalType": "int256",
95
+ "name": "calculatedAmount",
96
+ "type": "int256"
97
+ }
98
+ ],
99
+ "name": "SlippageCheckFailed",
100
+ "type": "error"
12
101
  },
13
102
  {
14
- "type": "function",
15
- "name": "checkDeadline",
16
103
  "inputs": [
17
104
  {
105
+ "internalType": "uint256",
106
+ "name": "index",
107
+ "type": "uint256"
108
+ }
109
+ ],
110
+ "name": "TokensMismatch",
111
+ "type": "error"
112
+ },
113
+ {
114
+ "inputs": [
115
+ {
116
+ "internalType": "uint256",
117
+ "name": "deadline",
118
+ "type": "uint256"
119
+ }
120
+ ],
121
+ "name": "TransactionExpired",
122
+ "type": "error"
123
+ },
124
+ {
125
+ "inputs": [
126
+ {
127
+ "internalType": "uint256",
18
128
  "name": "deadline",
19
- "type": "uint256",
20
- "internalType": "uint256"
129
+ "type": "uint256"
21
130
  }
22
131
  ],
132
+ "name": "checkDeadline",
23
133
  "outputs": [],
24
- "stateMutability": "payable"
134
+ "stateMutability": "payable",
135
+ "type": "function"
25
136
  },
26
137
  {
27
- "type": "function",
28
- "name": "checkMaximumInputNotExceeded",
29
138
  "inputs": [
30
139
  {
140
+ "internalType": "address",
31
141
  "name": "token",
32
- "type": "address",
33
- "internalType": "address"
142
+ "type": "address"
34
143
  },
35
144
  {
145
+ "internalType": "uint256",
36
146
  "name": "maximumInput",
37
- "type": "uint256",
38
- "internalType": "uint256"
147
+ "type": "uint256"
39
148
  }
40
149
  ],
150
+ "name": "checkMaximumInputNotExceeded",
41
151
  "outputs": [],
42
- "stateMutability": "payable"
152
+ "stateMutability": "payable",
153
+ "type": "function"
43
154
  },
44
155
  {
45
- "type": "function",
46
- "name": "checkMinimumOutputReceived",
47
156
  "inputs": [
48
157
  {
158
+ "internalType": "address",
49
159
  "name": "token",
50
- "type": "address",
51
- "internalType": "address"
160
+ "type": "address"
52
161
  },
53
162
  {
163
+ "internalType": "uint256",
54
164
  "name": "minimumOutput",
55
- "type": "uint256",
56
- "internalType": "uint256"
165
+ "type": "uint256"
57
166
  }
58
167
  ],
168
+ "name": "checkMinimumOutputReceived",
59
169
  "outputs": [],
60
- "stateMutability": "payable"
170
+ "stateMutability": "payable",
171
+ "type": "function"
61
172
  },
62
173
  {
63
- "type": "function",
64
- "name": "locked",
65
174
  "inputs": [
66
175
  {
176
+ "internalType": "uint256",
67
177
  "name": "id",
68
- "type": "uint256",
69
- "internalType": "uint256"
178
+ "type": "uint256"
70
179
  }
71
180
  ],
181
+ "name": "locked",
72
182
  "outputs": [],
73
- "stateMutability": "nonpayable"
183
+ "stateMutability": "nonpayable",
184
+ "type": "function"
185
+ },
186
+ {
187
+ "inputs": [],
188
+ "name": "mevResist",
189
+ "outputs": [
190
+ {
191
+ "internalType": "address",
192
+ "name": "",
193
+ "type": "address"
194
+ }
195
+ ],
196
+ "stateMutability": "view",
197
+ "type": "function"
74
198
  },
75
199
  {
76
- "type": "function",
77
- "name": "multiMultihopSwap",
78
200
  "inputs": [
79
201
  {
80
- "name": "swaps",
81
- "type": "tuple[]",
82
- "internalType": "struct Swap[]",
83
202
  "components": [
84
203
  {
85
- "name": "route",
86
- "type": "tuple[]",
87
- "internalType": "struct RouteNode[]",
88
204
  "components": [
89
205
  {
90
- "name": "poolKey",
91
- "type": "tuple",
92
- "internalType": "struct PoolKey",
93
206
  "components": [
94
207
  {
208
+ "internalType": "address",
95
209
  "name": "token0",
96
- "type": "address",
97
- "internalType": "address"
210
+ "type": "address"
98
211
  },
99
212
  {
213
+ "internalType": "address",
100
214
  "name": "token1",
101
- "type": "address",
102
- "internalType": "address"
215
+ "type": "address"
103
216
  },
104
217
  {
218
+ "internalType": "Config",
105
219
  "name": "config",
106
- "type": "bytes32",
107
- "internalType": "Config"
220
+ "type": "bytes32"
108
221
  }
109
- ]
222
+ ],
223
+ "internalType": "struct PoolKey",
224
+ "name": "poolKey",
225
+ "type": "tuple"
110
226
  },
111
227
  {
228
+ "internalType": "SqrtRatio",
112
229
  "name": "sqrtRatioLimit",
113
- "type": "uint96",
114
- "internalType": "SqrtRatio"
230
+ "type": "uint96"
115
231
  },
116
232
  {
233
+ "internalType": "uint256",
117
234
  "name": "skipAhead",
118
- "type": "uint256",
119
- "internalType": "uint256"
235
+ "type": "uint256"
120
236
  }
121
- ]
237
+ ],
238
+ "internalType": "struct RouteNode[]",
239
+ "name": "route",
240
+ "type": "tuple[]"
122
241
  },
123
242
  {
124
- "name": "tokenAmount",
125
- "type": "tuple",
126
- "internalType": "struct TokenAmount",
127
243
  "components": [
128
244
  {
245
+ "internalType": "address",
129
246
  "name": "token",
130
- "type": "address",
131
- "internalType": "address"
247
+ "type": "address"
132
248
  },
133
249
  {
250
+ "internalType": "int128",
134
251
  "name": "amount",
135
- "type": "int128",
136
- "internalType": "int128"
252
+ "type": "int128"
137
253
  }
138
- ]
254
+ ],
255
+ "internalType": "struct TokenAmount",
256
+ "name": "tokenAmount",
257
+ "type": "tuple"
139
258
  }
140
- ]
259
+ ],
260
+ "internalType": "struct Swap[]",
261
+ "name": "swaps",
262
+ "type": "tuple[]"
141
263
  },
142
264
  {
265
+ "internalType": "int256",
143
266
  "name": "calculatedAmountThreshold",
144
- "type": "int256",
145
- "internalType": "int256"
267
+ "type": "int256"
146
268
  }
147
269
  ],
270
+ "name": "multiMultihopSwap",
148
271
  "outputs": [
149
272
  {
150
- "name": "results",
151
- "type": "tuple[][]",
152
- "internalType": "struct Delta[][]",
153
273
  "components": [
154
274
  {
275
+ "internalType": "int128",
155
276
  "name": "amount0",
156
- "type": "int128",
157
- "internalType": "int128"
277
+ "type": "int128"
158
278
  },
159
279
  {
280
+ "internalType": "int128",
160
281
  "name": "amount1",
161
- "type": "int128",
162
- "internalType": "int128"
282
+ "type": "int128"
163
283
  }
164
- ]
284
+ ],
285
+ "internalType": "struct Delta[][]",
286
+ "name": "results",
287
+ "type": "tuple[][]"
165
288
  }
166
289
  ],
167
- "stateMutability": "payable"
290
+ "stateMutability": "payable",
291
+ "type": "function"
168
292
  },
169
293
  {
170
- "type": "function",
171
- "name": "multicall",
172
294
  "inputs": [
173
295
  {
296
+ "internalType": "bytes[]",
174
297
  "name": "data",
175
- "type": "bytes[]",
176
- "internalType": "bytes[]"
298
+ "type": "bytes[]"
177
299
  }
178
300
  ],
301
+ "name": "multicall",
179
302
  "outputs": [
180
303
  {
304
+ "internalType": "bytes[]",
181
305
  "name": "",
182
- "type": "bytes[]",
183
- "internalType": "bytes[]"
306
+ "type": "bytes[]"
184
307
  }
185
308
  ],
186
- "stateMutability": "payable"
309
+ "stateMutability": "payable",
310
+ "type": "function"
187
311
  },
188
312
  {
189
- "type": "function",
190
- "name": "multihopSwap",
191
313
  "inputs": [
192
314
  {
193
- "name": "s",
194
- "type": "tuple",
195
- "internalType": "struct Swap",
196
315
  "components": [
197
316
  {
198
- "name": "route",
199
- "type": "tuple[]",
200
- "internalType": "struct RouteNode[]",
201
317
  "components": [
202
318
  {
203
- "name": "poolKey",
204
- "type": "tuple",
205
- "internalType": "struct PoolKey",
206
319
  "components": [
207
320
  {
321
+ "internalType": "address",
208
322
  "name": "token0",
209
- "type": "address",
210
- "internalType": "address"
323
+ "type": "address"
211
324
  },
212
325
  {
326
+ "internalType": "address",
213
327
  "name": "token1",
214
- "type": "address",
215
- "internalType": "address"
328
+ "type": "address"
216
329
  },
217
330
  {
331
+ "internalType": "Config",
218
332
  "name": "config",
219
- "type": "bytes32",
220
- "internalType": "Config"
333
+ "type": "bytes32"
221
334
  }
222
- ]
335
+ ],
336
+ "internalType": "struct PoolKey",
337
+ "name": "poolKey",
338
+ "type": "tuple"
223
339
  },
224
340
  {
341
+ "internalType": "SqrtRatio",
225
342
  "name": "sqrtRatioLimit",
226
- "type": "uint96",
227
- "internalType": "SqrtRatio"
343
+ "type": "uint96"
228
344
  },
229
345
  {
346
+ "internalType": "uint256",
230
347
  "name": "skipAhead",
231
- "type": "uint256",
232
- "internalType": "uint256"
348
+ "type": "uint256"
233
349
  }
234
- ]
350
+ ],
351
+ "internalType": "struct RouteNode[]",
352
+ "name": "route",
353
+ "type": "tuple[]"
235
354
  },
236
355
  {
237
- "name": "tokenAmount",
238
- "type": "tuple",
239
- "internalType": "struct TokenAmount",
240
356
  "components": [
241
357
  {
358
+ "internalType": "address",
242
359
  "name": "token",
243
- "type": "address",
244
- "internalType": "address"
360
+ "type": "address"
245
361
  },
246
362
  {
363
+ "internalType": "int128",
247
364
  "name": "amount",
248
- "type": "int128",
249
- "internalType": "int128"
365
+ "type": "int128"
250
366
  }
251
- ]
367
+ ],
368
+ "internalType": "struct TokenAmount",
369
+ "name": "tokenAmount",
370
+ "type": "tuple"
252
371
  }
253
- ]
372
+ ],
373
+ "internalType": "struct Swap",
374
+ "name": "s",
375
+ "type": "tuple"
254
376
  },
255
377
  {
378
+ "internalType": "int256",
256
379
  "name": "calculatedAmountThreshold",
257
- "type": "int256",
258
- "internalType": "int256"
380
+ "type": "int256"
259
381
  }
260
382
  ],
383
+ "name": "multihopSwap",
261
384
  "outputs": [
262
385
  {
263
- "name": "result",
264
- "type": "tuple[]",
265
- "internalType": "struct Delta[]",
266
386
  "components": [
267
387
  {
388
+ "internalType": "int128",
268
389
  "name": "amount0",
269
- "type": "int128",
270
- "internalType": "int128"
390
+ "type": "int128"
271
391
  },
272
392
  {
393
+ "internalType": "int128",
273
394
  "name": "amount1",
274
- "type": "int128",
275
- "internalType": "int128"
395
+ "type": "int128"
276
396
  }
277
- ]
397
+ ],
398
+ "internalType": "struct Delta[]",
399
+ "name": "result",
400
+ "type": "tuple[]"
278
401
  }
279
402
  ],
280
- "stateMutability": "payable"
403
+ "stateMutability": "payable",
404
+ "type": "function"
281
405
  },
282
406
  {
283
- "type": "function",
284
- "name": "payCallback",
285
407
  "inputs": [
286
408
  {
409
+ "internalType": "uint256",
287
410
  "name": "",
288
- "type": "uint256",
289
- "internalType": "uint256"
411
+ "type": "uint256"
290
412
  },
291
413
  {
414
+ "internalType": "address",
292
415
  "name": "token",
293
- "type": "address",
294
- "internalType": "address"
416
+ "type": "address"
295
417
  }
296
418
  ],
419
+ "name": "payCallback",
297
420
  "outputs": [],
298
- "stateMutability": "nonpayable"
421
+ "stateMutability": "nonpayable",
422
+ "type": "function"
299
423
  },
300
424
  {
301
- "type": "function",
302
- "name": "permit",
303
425
  "inputs": [
304
426
  {
427
+ "internalType": "address",
305
428
  "name": "token",
306
- "type": "address",
307
- "internalType": "address"
429
+ "type": "address"
308
430
  },
309
431
  {
432
+ "internalType": "uint256",
310
433
  "name": "amount",
311
- "type": "uint256",
312
- "internalType": "uint256"
434
+ "type": "uint256"
313
435
  },
314
436
  {
437
+ "internalType": "uint256",
315
438
  "name": "deadline",
316
- "type": "uint256",
317
- "internalType": "uint256"
439
+ "type": "uint256"
318
440
  },
319
441
  {
442
+ "internalType": "uint8",
320
443
  "name": "v",
321
- "type": "uint8",
322
- "internalType": "uint8"
444
+ "type": "uint8"
323
445
  },
324
446
  {
447
+ "internalType": "bytes32",
325
448
  "name": "r",
326
- "type": "bytes32",
327
- "internalType": "bytes32"
449
+ "type": "bytes32"
328
450
  },
329
451
  {
452
+ "internalType": "bytes32",
330
453
  "name": "s",
331
- "type": "bytes32",
332
- "internalType": "bytes32"
454
+ "type": "bytes32"
333
455
  }
334
456
  ],
457
+ "name": "permit",
335
458
  "outputs": [],
336
- "stateMutability": "payable"
459
+ "stateMutability": "payable",
460
+ "type": "function"
337
461
  },
338
462
  {
339
- "type": "function",
340
- "name": "quote",
341
463
  "inputs": [
342
464
  {
343
- "name": "poolKey",
344
- "type": "tuple",
345
- "internalType": "struct PoolKey",
346
465
  "components": [
347
466
  {
467
+ "internalType": "address",
348
468
  "name": "token0",
349
- "type": "address",
350
- "internalType": "address"
469
+ "type": "address"
351
470
  },
352
471
  {
472
+ "internalType": "address",
353
473
  "name": "token1",
354
- "type": "address",
355
- "internalType": "address"
474
+ "type": "address"
356
475
  },
357
476
  {
477
+ "internalType": "Config",
358
478
  "name": "config",
359
- "type": "bytes32",
360
- "internalType": "Config"
479
+ "type": "bytes32"
361
480
  }
362
- ]
481
+ ],
482
+ "internalType": "struct PoolKey",
483
+ "name": "poolKey",
484
+ "type": "tuple"
363
485
  },
364
486
  {
487
+ "internalType": "bool",
365
488
  "name": "isToken1",
366
- "type": "bool",
367
- "internalType": "bool"
489
+ "type": "bool"
368
490
  },
369
491
  {
492
+ "internalType": "int128",
370
493
  "name": "amount",
371
- "type": "int128",
372
- "internalType": "int128"
494
+ "type": "int128"
373
495
  },
374
496
  {
497
+ "internalType": "SqrtRatio",
375
498
  "name": "sqrtRatioLimit",
376
- "type": "uint96",
377
- "internalType": "SqrtRatio"
499
+ "type": "uint96"
378
500
  },
379
501
  {
502
+ "internalType": "uint256",
380
503
  "name": "skipAhead",
381
- "type": "uint256",
382
- "internalType": "uint256"
504
+ "type": "uint256"
383
505
  }
384
506
  ],
507
+ "name": "quote",
385
508
  "outputs": [
386
509
  {
510
+ "internalType": "int128",
387
511
  "name": "delta0",
388
- "type": "int128",
389
- "internalType": "int128"
512
+ "type": "int128"
390
513
  },
391
514
  {
515
+ "internalType": "int128",
392
516
  "name": "delta1",
393
- "type": "int128",
394
- "internalType": "int128"
517
+ "type": "int128"
395
518
  }
396
519
  ],
397
- "stateMutability": "nonpayable"
520
+ "stateMutability": "nonpayable",
521
+ "type": "function"
398
522
  },
399
523
  {
400
- "type": "function",
401
- "name": "recordBalanceForSlippageCheck",
402
524
  "inputs": [
403
525
  {
526
+ "internalType": "address",
404
527
  "name": "token",
405
- "type": "address",
406
- "internalType": "address"
528
+ "type": "address"
407
529
  }
408
530
  ],
531
+ "name": "recordBalanceForSlippageCheck",
409
532
  "outputs": [],
410
- "stateMutability": "payable"
533
+ "stateMutability": "payable",
534
+ "type": "function"
411
535
  },
412
536
  {
413
- "type": "function",
414
- "name": "refundNativeToken",
415
537
  "inputs": [],
538
+ "name": "refundNativeToken",
416
539
  "outputs": [],
417
- "stateMutability": "payable"
540
+ "stateMutability": "payable",
541
+ "type": "function"
418
542
  },
419
543
  {
420
- "type": "function",
421
- "name": "swap",
422
544
  "inputs": [
423
545
  {
424
- "name": "poolKey",
425
- "type": "tuple",
426
- "internalType": "struct PoolKey",
427
546
  "components": [
428
547
  {
548
+ "internalType": "address",
429
549
  "name": "token0",
430
- "type": "address",
431
- "internalType": "address"
550
+ "type": "address"
432
551
  },
433
552
  {
553
+ "internalType": "address",
434
554
  "name": "token1",
435
- "type": "address",
436
- "internalType": "address"
555
+ "type": "address"
437
556
  },
438
557
  {
558
+ "internalType": "Config",
439
559
  "name": "config",
440
- "type": "bytes32",
441
- "internalType": "Config"
560
+ "type": "bytes32"
442
561
  }
443
- ]
562
+ ],
563
+ "internalType": "struct PoolKey",
564
+ "name": "poolKey",
565
+ "type": "tuple"
444
566
  },
445
567
  {
568
+ "internalType": "bool",
446
569
  "name": "isToken1",
447
- "type": "bool",
448
- "internalType": "bool"
570
+ "type": "bool"
449
571
  },
450
572
  {
573
+ "internalType": "int128",
451
574
  "name": "amount",
452
- "type": "int128",
453
- "internalType": "int128"
575
+ "type": "int128"
454
576
  },
455
577
  {
578
+ "internalType": "SqrtRatio",
456
579
  "name": "sqrtRatioLimit",
457
- "type": "uint96",
458
- "internalType": "SqrtRatio"
580
+ "type": "uint96"
459
581
  },
460
582
  {
583
+ "internalType": "uint256",
461
584
  "name": "skipAhead",
462
- "type": "uint256",
463
- "internalType": "uint256"
585
+ "type": "uint256"
464
586
  }
465
587
  ],
588
+ "name": "swap",
466
589
  "outputs": [
467
590
  {
591
+ "internalType": "int128",
468
592
  "name": "delta0",
469
- "type": "int128",
470
- "internalType": "int128"
593
+ "type": "int128"
471
594
  },
472
595
  {
596
+ "internalType": "int128",
473
597
  "name": "delta1",
474
- "type": "int128",
475
- "internalType": "int128"
598
+ "type": "int128"
476
599
  }
477
600
  ],
478
- "stateMutability": "payable"
601
+ "stateMutability": "payable",
602
+ "type": "function"
479
603
  },
480
604
  {
481
- "type": "function",
482
- "name": "swap",
483
605
  "inputs": [
484
606
  {
485
- "name": "poolKey",
486
- "type": "tuple",
487
- "internalType": "struct PoolKey",
488
607
  "components": [
489
608
  {
609
+ "internalType": "address",
490
610
  "name": "token0",
491
- "type": "address",
492
- "internalType": "address"
611
+ "type": "address"
493
612
  },
494
613
  {
614
+ "internalType": "address",
495
615
  "name": "token1",
496
- "type": "address",
497
- "internalType": "address"
616
+ "type": "address"
498
617
  },
499
618
  {
619
+ "internalType": "Config",
500
620
  "name": "config",
501
- "type": "bytes32",
502
- "internalType": "Config"
621
+ "type": "bytes32"
503
622
  }
504
- ]
623
+ ],
624
+ "internalType": "struct PoolKey",
625
+ "name": "poolKey",
626
+ "type": "tuple"
505
627
  },
506
628
  {
629
+ "internalType": "bool",
507
630
  "name": "isToken1",
508
- "type": "bool",
509
- "internalType": "bool"
631
+ "type": "bool"
510
632
  },
511
633
  {
634
+ "internalType": "int128",
512
635
  "name": "amount",
513
- "type": "int128",
514
- "internalType": "int128"
636
+ "type": "int128"
515
637
  },
516
638
  {
639
+ "internalType": "SqrtRatio",
517
640
  "name": "sqrtRatioLimit",
518
- "type": "uint96",
519
- "internalType": "SqrtRatio"
641
+ "type": "uint96"
520
642
  },
521
643
  {
644
+ "internalType": "uint256",
522
645
  "name": "skipAhead",
523
- "type": "uint256",
524
- "internalType": "uint256"
646
+ "type": "uint256"
525
647
  },
526
648
  {
649
+ "internalType": "int256",
527
650
  "name": "calculatedAmountThreshold",
528
- "type": "int256",
529
- "internalType": "int256"
651
+ "type": "int256"
530
652
  }
531
653
  ],
654
+ "name": "swap",
532
655
  "outputs": [
533
656
  {
657
+ "internalType": "int128",
534
658
  "name": "delta0",
535
- "type": "int128",
536
- "internalType": "int128"
659
+ "type": "int128"
537
660
  },
538
661
  {
662
+ "internalType": "int128",
539
663
  "name": "delta1",
540
- "type": "int128",
541
- "internalType": "int128"
664
+ "type": "int128"
542
665
  }
543
666
  ],
544
- "stateMutability": "payable"
667
+ "stateMutability": "payable",
668
+ "type": "function"
545
669
  },
546
670
  {
547
- "type": "function",
548
- "name": "swap",
549
671
  "inputs": [
550
672
  {
551
- "name": "node",
552
- "type": "tuple",
553
- "internalType": "struct RouteNode",
554
673
  "components": [
555
674
  {
556
- "name": "poolKey",
557
- "type": "tuple",
558
- "internalType": "struct PoolKey",
559
675
  "components": [
560
676
  {
677
+ "internalType": "address",
561
678
  "name": "token0",
562
- "type": "address",
563
- "internalType": "address"
679
+ "type": "address"
564
680
  },
565
681
  {
682
+ "internalType": "address",
566
683
  "name": "token1",
567
- "type": "address",
568
- "internalType": "address"
684
+ "type": "address"
569
685
  },
570
686
  {
687
+ "internalType": "Config",
571
688
  "name": "config",
572
- "type": "bytes32",
573
- "internalType": "Config"
689
+ "type": "bytes32"
574
690
  }
575
- ]
691
+ ],
692
+ "internalType": "struct PoolKey",
693
+ "name": "poolKey",
694
+ "type": "tuple"
576
695
  },
577
696
  {
697
+ "internalType": "SqrtRatio",
578
698
  "name": "sqrtRatioLimit",
579
- "type": "uint96",
580
- "internalType": "SqrtRatio"
699
+ "type": "uint96"
581
700
  },
582
701
  {
702
+ "internalType": "uint256",
583
703
  "name": "skipAhead",
584
- "type": "uint256",
585
- "internalType": "uint256"
704
+ "type": "uint256"
586
705
  }
587
- ]
706
+ ],
707
+ "internalType": "struct RouteNode",
708
+ "name": "node",
709
+ "type": "tuple"
588
710
  },
589
711
  {
590
- "name": "tokenAmount",
591
- "type": "tuple",
592
- "internalType": "struct TokenAmount",
593
712
  "components": [
594
713
  {
714
+ "internalType": "address",
595
715
  "name": "token",
596
- "type": "address",
597
- "internalType": "address"
716
+ "type": "address"
598
717
  },
599
718
  {
719
+ "internalType": "int128",
600
720
  "name": "amount",
601
- "type": "int128",
602
- "internalType": "int128"
721
+ "type": "int128"
603
722
  }
604
- ]
723
+ ],
724
+ "internalType": "struct TokenAmount",
725
+ "name": "tokenAmount",
726
+ "type": "tuple"
605
727
  },
606
728
  {
729
+ "internalType": "int256",
607
730
  "name": "calculatedAmountThreshold",
608
- "type": "int256",
609
- "internalType": "int256"
731
+ "type": "int256"
610
732
  }
611
733
  ],
734
+ "name": "swap",
612
735
  "outputs": [
613
736
  {
737
+ "internalType": "int128",
614
738
  "name": "delta0",
615
- "type": "int128",
616
- "internalType": "int128"
739
+ "type": "int128"
617
740
  },
618
741
  {
742
+ "internalType": "int128",
619
743
  "name": "delta1",
620
- "type": "int128",
621
- "internalType": "int128"
744
+ "type": "int128"
622
745
  }
623
746
  ],
624
- "stateMutability": "payable"
747
+ "stateMutability": "payable",
748
+ "type": "function"
625
749
  },
626
750
  {
627
- "type": "function",
628
- "name": "swap",
629
751
  "inputs": [
630
752
  {
631
- "name": "poolKey",
632
- "type": "tuple",
633
- "internalType": "struct PoolKey",
634
753
  "components": [
635
754
  {
755
+ "internalType": "address",
636
756
  "name": "token0",
637
- "type": "address",
638
- "internalType": "address"
757
+ "type": "address"
639
758
  },
640
759
  {
760
+ "internalType": "address",
641
761
  "name": "token1",
642
- "type": "address",
643
- "internalType": "address"
762
+ "type": "address"
644
763
  },
645
764
  {
765
+ "internalType": "Config",
646
766
  "name": "config",
647
- "type": "bytes32",
648
- "internalType": "Config"
767
+ "type": "bytes32"
649
768
  }
650
- ]
769
+ ],
770
+ "internalType": "struct PoolKey",
771
+ "name": "poolKey",
772
+ "type": "tuple"
651
773
  },
652
774
  {
775
+ "internalType": "bool",
653
776
  "name": "isToken1",
654
- "type": "bool",
655
- "internalType": "bool"
777
+ "type": "bool"
656
778
  },
657
779
  {
780
+ "internalType": "int128",
658
781
  "name": "amount",
659
- "type": "int128",
660
- "internalType": "int128"
782
+ "type": "int128"
661
783
  },
662
784
  {
785
+ "internalType": "SqrtRatio",
663
786
  "name": "sqrtRatioLimit",
664
- "type": "uint96",
665
- "internalType": "SqrtRatio"
787
+ "type": "uint96"
666
788
  },
667
789
  {
790
+ "internalType": "uint256",
668
791
  "name": "skipAhead",
669
- "type": "uint256",
670
- "internalType": "uint256"
792
+ "type": "uint256"
671
793
  },
672
794
  {
795
+ "internalType": "int256",
673
796
  "name": "calculatedAmountThreshold",
674
- "type": "int256",
675
- "internalType": "int256"
797
+ "type": "int256"
676
798
  },
677
799
  {
800
+ "internalType": "address",
678
801
  "name": "recipient",
679
- "type": "address",
680
- "internalType": "address"
802
+ "type": "address"
681
803
  }
682
804
  ],
805
+ "name": "swap",
683
806
  "outputs": [
684
807
  {
808
+ "internalType": "int128",
685
809
  "name": "delta0",
686
- "type": "int128",
687
- "internalType": "int128"
810
+ "type": "int128"
688
811
  },
689
812
  {
813
+ "internalType": "int128",
690
814
  "name": "delta1",
691
- "type": "int128",
692
- "internalType": "int128"
815
+ "type": "int128"
693
816
  }
694
817
  ],
695
- "stateMutability": "payable"
696
- },
697
- {
698
- "type": "error",
699
- "name": "BaseLockerAccountantOnly",
700
- "inputs": []
701
- },
702
- {
703
- "type": "error",
704
- "name": "CoreOnly",
705
- "inputs": []
706
- },
707
- {
708
- "type": "error",
709
- "name": "ExpectedRevertWithinLock",
710
- "inputs": []
711
- },
712
- {
713
- "type": "error",
714
- "name": "MaximumInputExceeded",
715
- "inputs": [
716
- {
717
- "name": "token",
718
- "type": "address",
719
- "internalType": "address"
720
- },
721
- {
722
- "name": "maximumInput",
723
- "type": "uint256",
724
- "internalType": "uint256"
725
- }
726
- ]
727
- },
728
- {
729
- "type": "error",
730
- "name": "MinimumOutputNotReceived",
731
- "inputs": [
732
- {
733
- "name": "token",
734
- "type": "address",
735
- "internalType": "address"
736
- },
737
- {
738
- "name": "minimumOutput",
739
- "type": "uint256",
740
- "internalType": "uint256"
741
- }
742
- ]
743
- },
744
- {
745
- "type": "error",
746
- "name": "PartialSwapsDisallowed",
747
- "inputs": []
748
- },
749
- {
750
- "type": "error",
751
- "name": "QuoteReturnValue",
752
- "inputs": [
753
- {
754
- "name": "delta0",
755
- "type": "int128",
756
- "internalType": "int128"
757
- },
758
- {
759
- "name": "delta1",
760
- "type": "int128",
761
- "internalType": "int128"
762
- }
763
- ]
764
- },
765
- {
766
- "type": "error",
767
- "name": "SlippageCheckFailed",
768
- "inputs": [
769
- {
770
- "name": "expectedAmount",
771
- "type": "int256",
772
- "internalType": "int256"
773
- },
774
- {
775
- "name": "calculatedAmount",
776
- "type": "int256",
777
- "internalType": "int256"
778
- }
779
- ]
780
- },
781
- {
782
- "type": "error",
783
- "name": "TokensMismatch",
784
- "inputs": [
785
- {
786
- "name": "index",
787
- "type": "uint256",
788
- "internalType": "uint256"
789
- }
790
- ]
791
- },
792
- {
793
- "type": "error",
794
- "name": "TransactionExpired",
795
- "inputs": [
796
- {
797
- "name": "deadline",
798
- "type": "uint256",
799
- "internalType": "uint256"
800
- }
801
- ]
818
+ "stateMutability": "payable",
819
+ "type": "function"
802
820
  }
803
821
  ]