@paraswap/dex-lib 3.6.2 → 3.6.3

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 (109) hide show
  1. package/build/dex/aave-v1/aave-v1.d.ts +1 -2
  2. package/build/dex/aave-v1/aave-v1.js +0 -23
  3. package/build/dex/aave-v1/aave-v1.js.map +1 -1
  4. package/build/dex/compound.js +1 -1
  5. package/build/dex/compound.js.map +1 -1
  6. package/build/dex/etherfi/etherfi.d.ts +26 -0
  7. package/build/dex/etherfi/etherfi.js +96 -0
  8. package/build/dex/etherfi/etherfi.js.map +1 -0
  9. package/build/dex/index.js +2 -0
  10. package/build/dex/index.js.map +1 -1
  11. package/build/dex/maverick-v2/config.d.ts +2 -2
  12. package/build/dex/maverick-v2/config.js +16 -9
  13. package/build/dex/maverick-v2/config.js.map +1 -1
  14. package/build/dex/maverick-v2/maverick-math/maverick-basic-math.js +3 -3
  15. package/build/dex/maverick-v2/maverick-math/maverick-basic-math.js.map +1 -1
  16. package/build/dex/maverick-v2/maverick-math/maverick-bin-math.js +4 -4
  17. package/build/dex/maverick-v2/maverick-math/maverick-bin-math.js.map +1 -1
  18. package/build/dex/maverick-v2/maverick-math/maverick-math.js +3 -3
  19. package/build/dex/maverick-v2/maverick-math/maverick-math.js.map +1 -1
  20. package/build/dex/maverick-v2/maverick-math/maverick-pool-math.js +13 -13
  21. package/build/dex/maverick-v2/maverick-math/maverick-pool-math.js.map +1 -1
  22. package/build/dex/maverick-v2/maverick-math/maverick-swap-math.js +1 -1
  23. package/build/dex/maverick-v2/maverick-math/maverick-swap-math.js.map +1 -1
  24. package/build/dex/maverick-v2/maverick-math/maverick-tick-math.js +4 -4
  25. package/build/dex/maverick-v2/maverick-math/maverick-tick-math.js.map +1 -1
  26. package/build/dex/maverick-v2/maverick-math/maverick-twa-math.js +3 -3
  27. package/build/dex/maverick-v2/maverick-math/maverick-twa-math.js.map +1 -1
  28. package/build/dex/maverick-v2/maverick-v2-pool.d.ts +12 -9
  29. package/build/dex/maverick-v2/maverick-v2-pool.js +71 -16
  30. package/build/dex/maverick-v2/maverick-v2-pool.js.map +1 -1
  31. package/build/dex/maverick-v2/maverick-v2.d.ts +4 -8
  32. package/build/dex/maverick-v2/maverick-v2.js +62 -90
  33. package/build/dex/maverick-v2/maverick-v2.js.map +1 -1
  34. package/build/dex/maverick-v2/types.d.ts +1 -2
  35. package/build/dex/platypus/platypus.d.ts +1 -2
  36. package/build/dex/platypus/platypus.js +0 -45
  37. package/build/dex/platypus/platypus.js.map +1 -1
  38. package/build/dex/sdai/config.d.ts +11 -0
  39. package/build/dex/sdai/config.js +21 -0
  40. package/build/dex/sdai/config.js.map +1 -0
  41. package/build/dex/sdai/constants.d.ts +2 -0
  42. package/build/dex/sdai/constants.js +6 -0
  43. package/build/dex/sdai/constants.js.map +1 -0
  44. package/build/dex/sdai/scripts/validate-state.js +102 -0
  45. package/build/dex/sdai/scripts/validate-state.js.map +1 -0
  46. package/build/dex/sdai/sdai-pool.d.ts +16 -0
  47. package/build/dex/sdai/sdai-pool.js +85 -0
  48. package/build/dex/sdai/sdai-pool.js.map +1 -0
  49. package/build/dex/sdai/sdai.d.ts +51 -0
  50. package/build/dex/sdai/sdai.js +172 -0
  51. package/build/dex/sdai/sdai.js.map +1 -0
  52. package/build/dex/sdai/types.d.ts +21 -0
  53. package/build/dex/sdai/types.js +11 -0
  54. package/build/dex/sdai/types.js.map +1 -0
  55. package/build/dex/sdai/utils.d.ts +4 -0
  56. package/build/dex/sdai/utils.js +39 -0
  57. package/build/dex/sdai/utils.js.map +1 -0
  58. package/build/dex/stable-pool.js +8 -1
  59. package/build/dex/stable-pool.js.map +1 -1
  60. package/build/dex/swaap-v1/swaap-v1.d.ts +1 -2
  61. package/build/dex/swaap-v1/swaap-v1.js +0 -14
  62. package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
  63. package/package.json +1 -1
  64. package/src/abi/maverick-v2/MaverickV2Pool.json +1234 -0
  65. package/src/abi/maverick-v2/MaverickV2PoolLens.json +1232 -0
  66. package/src/abi/maverick-v2/MaverickV2Quoter.json +278 -0
  67. package/src/dex/index.ts +2 -0
  68. package/src/dex/maverick-v2/config.ts +28 -0
  69. package/src/dex/maverick-v2/maverick-math/maverick-basic-math.ts +152 -0
  70. package/src/dex/maverick-v2/maverick-math/maverick-bin-math.ts +288 -0
  71. package/src/dex/maverick-v2/maverick-math/maverick-delta-math.ts +32 -0
  72. package/src/dex/maverick-v2/maverick-math/maverick-math.ts +30 -0
  73. package/src/dex/maverick-v2/maverick-math/maverick-pool-lib.ts +42 -0
  74. package/src/dex/maverick-v2/maverick-math/maverick-pool-math.ts +709 -0
  75. package/src/dex/maverick-v2/maverick-math/maverick-swap-math.ts +199 -0
  76. package/src/dex/maverick-v2/maverick-math/maverick-tick-math.ts +171 -0
  77. package/src/dex/maverick-v2/maverick-math/maverick-twa-math.ts +54 -0
  78. package/src/dex/maverick-v2/maverick-v2-e2e.test.ts +193 -0
  79. package/src/dex/maverick-v2/maverick-v2-events.test.ts +112 -0
  80. package/src/dex/maverick-v2/maverick-v2-integration.test.ts +283 -0
  81. package/src/dex/maverick-v2/maverick-v2-pool.ts +346 -0
  82. package/src/dex/maverick-v2/maverick-v2.ts +380 -0
  83. package/src/dex/maverick-v2/types.ts +151 -0
  84. package/tests/constants-e2e.ts +2 -2
  85. package/.vscode/launch.json +0 -53
  86. package/.vscode/settings.json +0 -2
  87. package/.vscode/tasks.json +0 -15
  88. package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +0 -52
  89. package/build/abi/wombat/pool.json +0 -1289
  90. package/build/dex/aave-v2/tokens-avalanche.json +0 -44
  91. package/build/dex/aave-v2/tokens-mainnet.json +0 -188
  92. package/build/dex/aave-v2/tokens-polygon.json +0 -44
  93. package/build/dex/maker-psm/scripts/gem.abi.json +0 -136
  94. package/build/dex/maker-psm/scripts/validate-state.d.ts +0 -0
  95. package/build/dex/maker-psm/scripts/validate-state.js +0 -185
  96. package/build/dex/maker-psm/scripts/validate-state.js.map +0 -1
  97. package/build/dex/maker-psm/scripts/vat.abi.json +0 -243
  98. package/build/dex/solidly-v3/scripts/check-event-pool-event.js +0 -53
  99. package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +0 -1
  100. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +0 -17
  101. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +0 -64
  102. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +0 -1
  103. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +0 -17
  104. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +0 -79
  105. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +0 -1
  106. package/src/dex/maker-psm/scripts/gem.abi.json +0 -136
  107. package/src/dex/maker-psm/scripts/validate-state.ts +0 -221
  108. package/src/dex/maker-psm/scripts/vat.abi.json +0 -243
  109. /package/build/dex/{solidly-v3/scripts/check-event-pool-event.d.ts → sdai/scripts/validate-state.d.ts} +0 -0
@@ -0,0 +1,1234 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "stateMutability": "nonpayable",
5
+ "type": "constructor"
6
+ },
7
+ {
8
+ "inputs": [],
9
+ "name": "MathOverflowedMulDiv",
10
+ "type": "error"
11
+ },
12
+ {
13
+ "inputs": [
14
+ {
15
+ "internalType": "uint256",
16
+ "name": "binIdsLength",
17
+ "type": "uint256"
18
+ },
19
+ {
20
+ "internalType": "uint256",
21
+ "name": "amountsLength",
22
+ "type": "uint256"
23
+ }
24
+ ],
25
+ "name": "PoolBinIdsAmountsLengthMismatch",
26
+ "type": "error"
27
+ },
28
+ {
29
+ "inputs": [
30
+ {
31
+ "internalType": "int32",
32
+ "name": "startingTick",
33
+ "type": "int32"
34
+ }
35
+ ],
36
+ "name": "PoolCurrentTickBeyondSwapLimit",
37
+ "type": "error"
38
+ },
39
+ {
40
+ "inputs": [],
41
+ "name": "PoolFunctionNotImplemented",
42
+ "type": "error"
43
+ },
44
+ {
45
+ "inputs": [
46
+ {
47
+ "internalType": "uint256",
48
+ "name": "deltaLpAmount",
49
+ "type": "uint256"
50
+ },
51
+ {
52
+ "internalType": "uint256",
53
+ "name": "accountBalance",
54
+ "type": "uint256"
55
+ }
56
+ ],
57
+ "name": "PoolInsufficientBalance",
58
+ "type": "error"
59
+ },
60
+ {
61
+ "inputs": [],
62
+ "name": "PoolInvalidFee",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [
67
+ {
68
+ "internalType": "uint256",
69
+ "name": "kinds",
70
+ "type": "uint256"
71
+ },
72
+ {
73
+ "internalType": "uint256",
74
+ "name": "kind",
75
+ "type": "uint256"
76
+ }
77
+ ],
78
+ "name": "PoolKindNotSupported",
79
+ "type": "error"
80
+ },
81
+ {
82
+ "inputs": [],
83
+ "name": "PoolLocked",
84
+ "type": "error"
85
+ },
86
+ {
87
+ "inputs": [],
88
+ "name": "PoolMigrateBinFirst",
89
+ "type": "error"
90
+ },
91
+ {
92
+ "inputs": [],
93
+ "name": "PoolMinimumLiquidityNotMet",
94
+ "type": "error"
95
+ },
96
+ {
97
+ "inputs": [
98
+ {
99
+ "internalType": "uint256",
100
+ "name": "amount",
101
+ "type": "uint256"
102
+ }
103
+ ],
104
+ "name": "PoolReservesExceedMaximum",
105
+ "type": "error"
106
+ },
107
+ {
108
+ "inputs": [
109
+ {
110
+ "internalType": "address",
111
+ "name": "sender_",
112
+ "type": "address"
113
+ },
114
+ {
115
+ "internalType": "address",
116
+ "name": "accessor",
117
+ "type": "address"
118
+ }
119
+ ],
120
+ "name": "PoolSenderNotAccessor",
121
+ "type": "error"
122
+ },
123
+ {
124
+ "inputs": [
125
+ {
126
+ "internalType": "address",
127
+ "name": "sender_",
128
+ "type": "address"
129
+ },
130
+ {
131
+ "internalType": "address",
132
+ "name": "accessor",
133
+ "type": "address"
134
+ }
135
+ ],
136
+ "name": "PoolSenderNotFactory",
137
+ "type": "error"
138
+ },
139
+ {
140
+ "inputs": [
141
+ {
142
+ "internalType": "uint256",
143
+ "name": "tick",
144
+ "type": "uint256"
145
+ }
146
+ ],
147
+ "name": "PoolTickMaxExceeded",
148
+ "type": "error"
149
+ },
150
+ {
151
+ "inputs": [
152
+ {
153
+ "internalType": "uint256",
154
+ "name": "ticksLength",
155
+ "type": "uint256"
156
+ },
157
+ {
158
+ "internalType": "uint256",
159
+ "name": "amountsLength",
160
+ "type": "uint256"
161
+ }
162
+ ],
163
+ "name": "PoolTicksAmountsLengthMismatch",
164
+ "type": "error"
165
+ },
166
+ {
167
+ "inputs": [
168
+ {
169
+ "internalType": "uint256",
170
+ "name": "index",
171
+ "type": "uint256"
172
+ },
173
+ {
174
+ "internalType": "int256",
175
+ "name": "previousTick",
176
+ "type": "int256"
177
+ },
178
+ {
179
+ "internalType": "int256",
180
+ "name": "tick",
181
+ "type": "int256"
182
+ }
183
+ ],
184
+ "name": "PoolTicksNotSorted",
185
+ "type": "error"
186
+ },
187
+ {
188
+ "inputs": [
189
+ {
190
+ "internalType": "uint256",
191
+ "name": "internalReserve",
192
+ "type": "uint256"
193
+ },
194
+ {
195
+ "internalType": "uint256",
196
+ "name": "tokenBalance",
197
+ "type": "uint256"
198
+ },
199
+ {
200
+ "internalType": "contract IERC20",
201
+ "name": "token",
202
+ "type": "address"
203
+ }
204
+ ],
205
+ "name": "PoolTokenNotSolvent",
206
+ "type": "error"
207
+ },
208
+ {
209
+ "inputs": [
210
+ {
211
+ "internalType": "uint256",
212
+ "name": "amount",
213
+ "type": "uint256"
214
+ },
215
+ {
216
+ "internalType": "uint256",
217
+ "name": "bits",
218
+ "type": "uint256"
219
+ }
220
+ ],
221
+ "name": "PoolValueExceedsBits",
222
+ "type": "error"
223
+ },
224
+ {
225
+ "inputs": [],
226
+ "name": "PoolZeroLiquidityAdded",
227
+ "type": "error"
228
+ },
229
+ {
230
+ "inputs": [
231
+ {
232
+ "internalType": "uint8",
233
+ "name": "bits",
234
+ "type": "uint8"
235
+ },
236
+ {
237
+ "internalType": "uint256",
238
+ "name": "value",
239
+ "type": "uint256"
240
+ }
241
+ ],
242
+ "name": "SafeCastOverflowedUintDowncast",
243
+ "type": "error"
244
+ },
245
+ {
246
+ "inputs": [
247
+ {
248
+ "internalType": "int256",
249
+ "name": "tick",
250
+ "type": "int256"
251
+ }
252
+ ],
253
+ "name": "TickMaxExceeded",
254
+ "type": "error"
255
+ },
256
+ {
257
+ "inputs": [
258
+ {
259
+ "internalType": "contract IERC20",
260
+ "name": "token",
261
+ "type": "address"
262
+ },
263
+ {
264
+ "internalType": "address",
265
+ "name": "to",
266
+ "type": "address"
267
+ },
268
+ {
269
+ "internalType": "uint256",
270
+ "name": "amount",
271
+ "type": "uint256"
272
+ }
273
+ ],
274
+ "name": "TransferFailed",
275
+ "type": "error"
276
+ },
277
+ {
278
+ "anonymous": false,
279
+ "inputs": [
280
+ {
281
+ "indexed": false,
282
+ "internalType": "address",
283
+ "name": "sender",
284
+ "type": "address"
285
+ },
286
+ {
287
+ "indexed": false,
288
+ "internalType": "address",
289
+ "name": "recipient",
290
+ "type": "address"
291
+ },
292
+ {
293
+ "indexed": false,
294
+ "internalType": "uint256",
295
+ "name": "subaccount",
296
+ "type": "uint256"
297
+ },
298
+ {
299
+ "components": [
300
+ {
301
+ "internalType": "uint8",
302
+ "name": "kind",
303
+ "type": "uint8"
304
+ },
305
+ {
306
+ "internalType": "int32[]",
307
+ "name": "ticks",
308
+ "type": "int32[]"
309
+ },
310
+ {
311
+ "internalType": "uint128[]",
312
+ "name": "amounts",
313
+ "type": "uint128[]"
314
+ }
315
+ ],
316
+ "indexed": false,
317
+ "internalType": "struct IMaverickV2Pool.AddLiquidityParams",
318
+ "name": "params",
319
+ "type": "tuple"
320
+ },
321
+ {
322
+ "indexed": false,
323
+ "internalType": "uint256",
324
+ "name": "tokenAAmount",
325
+ "type": "uint256"
326
+ },
327
+ {
328
+ "indexed": false,
329
+ "internalType": "uint256",
330
+ "name": "tokenBAmount",
331
+ "type": "uint256"
332
+ },
333
+ {
334
+ "indexed": false,
335
+ "internalType": "uint32[]",
336
+ "name": "binIds",
337
+ "type": "uint32[]"
338
+ }
339
+ ],
340
+ "name": "PoolAddLiquidity",
341
+ "type": "event"
342
+ },
343
+ {
344
+ "anonymous": false,
345
+ "inputs": [
346
+ {
347
+ "indexed": false,
348
+ "internalType": "address",
349
+ "name": "sender",
350
+ "type": "address"
351
+ },
352
+ {
353
+ "indexed": false,
354
+ "internalType": "uint32",
355
+ "name": "binId",
356
+ "type": "uint32"
357
+ },
358
+ {
359
+ "indexed": false,
360
+ "internalType": "uint32",
361
+ "name": "maxRecursion",
362
+ "type": "uint32"
363
+ }
364
+ ],
365
+ "name": "PoolMigrateBinsUpStack",
366
+ "type": "event"
367
+ },
368
+ {
369
+ "anonymous": false,
370
+ "inputs": [
371
+ {
372
+ "indexed": false,
373
+ "internalType": "uint256",
374
+ "name": "feeCollected",
375
+ "type": "uint256"
376
+ },
377
+ {
378
+ "indexed": false,
379
+ "internalType": "bool",
380
+ "name": "isTokenA",
381
+ "type": "bool"
382
+ }
383
+ ],
384
+ "name": "PoolProtocolFeeCollected",
385
+ "type": "event"
386
+ },
387
+ {
388
+ "anonymous": false,
389
+ "inputs": [
390
+ {
391
+ "indexed": false,
392
+ "internalType": "address",
393
+ "name": "sender",
394
+ "type": "address"
395
+ },
396
+ {
397
+ "indexed": false,
398
+ "internalType": "address",
399
+ "name": "recipient",
400
+ "type": "address"
401
+ },
402
+ {
403
+ "indexed": false,
404
+ "internalType": "uint256",
405
+ "name": "subaccount",
406
+ "type": "uint256"
407
+ },
408
+ {
409
+ "components": [
410
+ {
411
+ "internalType": "uint32[]",
412
+ "name": "binIds",
413
+ "type": "uint32[]"
414
+ },
415
+ {
416
+ "internalType": "uint128[]",
417
+ "name": "amounts",
418
+ "type": "uint128[]"
419
+ }
420
+ ],
421
+ "indexed": false,
422
+ "internalType": "struct IMaverickV2Pool.RemoveLiquidityParams",
423
+ "name": "params",
424
+ "type": "tuple"
425
+ },
426
+ {
427
+ "indexed": false,
428
+ "internalType": "uint256",
429
+ "name": "tokenAOut",
430
+ "type": "uint256"
431
+ },
432
+ {
433
+ "indexed": false,
434
+ "internalType": "uint256",
435
+ "name": "tokenBOut",
436
+ "type": "uint256"
437
+ }
438
+ ],
439
+ "name": "PoolRemoveLiquidity",
440
+ "type": "event"
441
+ },
442
+ {
443
+ "anonymous": false,
444
+ "inputs": [
445
+ {
446
+ "indexed": false,
447
+ "internalType": "uint256",
448
+ "name": "lendingFeeRateD18",
449
+ "type": "uint256"
450
+ }
451
+ ],
452
+ "name": "PoolSetLendingFeeRate",
453
+ "type": "event"
454
+ },
455
+ {
456
+ "anonymous": false,
457
+ "inputs": [
458
+ {
459
+ "indexed": false,
460
+ "internalType": "uint256",
461
+ "name": "protocolFeeRatioD3",
462
+ "type": "uint256"
463
+ }
464
+ ],
465
+ "name": "PoolSetProtocolFeeRatio",
466
+ "type": "event"
467
+ },
468
+ {
469
+ "anonymous": false,
470
+ "inputs": [
471
+ {
472
+ "indexed": false,
473
+ "internalType": "uint256",
474
+ "name": "newFeeAIn",
475
+ "type": "uint256"
476
+ },
477
+ {
478
+ "indexed": false,
479
+ "internalType": "uint256",
480
+ "name": "newFeeBIn",
481
+ "type": "uint256"
482
+ }
483
+ ],
484
+ "name": "PoolSetVariableFee",
485
+ "type": "event"
486
+ },
487
+ {
488
+ "anonymous": false,
489
+ "inputs": [
490
+ {
491
+ "indexed": false,
492
+ "internalType": "address",
493
+ "name": "sender",
494
+ "type": "address"
495
+ },
496
+ {
497
+ "indexed": false,
498
+ "internalType": "address",
499
+ "name": "recipient",
500
+ "type": "address"
501
+ },
502
+ {
503
+ "components": [
504
+ {
505
+ "internalType": "uint256",
506
+ "name": "amount",
507
+ "type": "uint256"
508
+ },
509
+ {
510
+ "internalType": "bool",
511
+ "name": "tokenAIn",
512
+ "type": "bool"
513
+ },
514
+ {
515
+ "internalType": "bool",
516
+ "name": "exactOutput",
517
+ "type": "bool"
518
+ },
519
+ {
520
+ "internalType": "int32",
521
+ "name": "tickLimit",
522
+ "type": "int32"
523
+ }
524
+ ],
525
+ "indexed": false,
526
+ "internalType": "struct IMaverickV2Pool.SwapParams",
527
+ "name": "params",
528
+ "type": "tuple"
529
+ },
530
+ {
531
+ "indexed": false,
532
+ "internalType": "uint256",
533
+ "name": "amountIn",
534
+ "type": "uint256"
535
+ },
536
+ {
537
+ "indexed": false,
538
+ "internalType": "uint256",
539
+ "name": "amountOut",
540
+ "type": "uint256"
541
+ }
542
+ ],
543
+ "name": "PoolSwap",
544
+ "type": "event"
545
+ },
546
+ {
547
+ "inputs": [],
548
+ "name": "accessor",
549
+ "outputs": [
550
+ {
551
+ "internalType": "address",
552
+ "name": "",
553
+ "type": "address"
554
+ }
555
+ ],
556
+ "stateMutability": "view",
557
+ "type": "function"
558
+ },
559
+ {
560
+ "inputs": [
561
+ {
562
+ "internalType": "address",
563
+ "name": "recipient",
564
+ "type": "address"
565
+ },
566
+ {
567
+ "internalType": "uint256",
568
+ "name": "subaccount",
569
+ "type": "uint256"
570
+ },
571
+ {
572
+ "components": [
573
+ {
574
+ "internalType": "uint8",
575
+ "name": "kind",
576
+ "type": "uint8"
577
+ },
578
+ {
579
+ "internalType": "int32[]",
580
+ "name": "ticks",
581
+ "type": "int32[]"
582
+ },
583
+ {
584
+ "internalType": "uint128[]",
585
+ "name": "amounts",
586
+ "type": "uint128[]"
587
+ }
588
+ ],
589
+ "internalType": "struct IMaverickV2Pool.AddLiquidityParams",
590
+ "name": "params",
591
+ "type": "tuple"
592
+ },
593
+ {
594
+ "internalType": "bytes",
595
+ "name": "data",
596
+ "type": "bytes"
597
+ }
598
+ ],
599
+ "name": "addLiquidity",
600
+ "outputs": [
601
+ {
602
+ "internalType": "uint256",
603
+ "name": "tokenAAmount",
604
+ "type": "uint256"
605
+ },
606
+ {
607
+ "internalType": "uint256",
608
+ "name": "tokenBAmount",
609
+ "type": "uint256"
610
+ },
611
+ {
612
+ "internalType": "uint32[]",
613
+ "name": "binIds",
614
+ "type": "uint32[]"
615
+ }
616
+ ],
617
+ "stateMutability": "nonpayable",
618
+ "type": "function"
619
+ },
620
+ {
621
+ "inputs": [
622
+ {
623
+ "internalType": "enum IMaverickV2PoolAdmin.AdminAction",
624
+ "name": "action",
625
+ "type": "uint8"
626
+ },
627
+ {
628
+ "internalType": "uint256",
629
+ "name": "value",
630
+ "type": "uint256"
631
+ }
632
+ ],
633
+ "name": "adminAction",
634
+ "outputs": [],
635
+ "stateMutability": "nonpayable",
636
+ "type": "function"
637
+ },
638
+ {
639
+ "inputs": [
640
+ {
641
+ "internalType": "address",
642
+ "name": "user",
643
+ "type": "address"
644
+ },
645
+ {
646
+ "internalType": "uint256",
647
+ "name": "subaccount",
648
+ "type": "uint256"
649
+ },
650
+ {
651
+ "internalType": "uint32",
652
+ "name": "binId",
653
+ "type": "uint32"
654
+ }
655
+ ],
656
+ "name": "balanceOf",
657
+ "outputs": [
658
+ {
659
+ "internalType": "uint128",
660
+ "name": "lpBalance",
661
+ "type": "uint128"
662
+ }
663
+ ],
664
+ "stateMutability": "view",
665
+ "type": "function"
666
+ },
667
+ {
668
+ "inputs": [
669
+ {
670
+ "internalType": "int32",
671
+ "name": "tick",
672
+ "type": "int32"
673
+ },
674
+ {
675
+ "internalType": "uint256",
676
+ "name": "kind",
677
+ "type": "uint256"
678
+ }
679
+ ],
680
+ "name": "binIdByTickKind",
681
+ "outputs": [
682
+ {
683
+ "internalType": "uint32",
684
+ "name": "binId",
685
+ "type": "uint32"
686
+ }
687
+ ],
688
+ "stateMutability": "view",
689
+ "type": "function"
690
+ },
691
+ {
692
+ "inputs": [],
693
+ "name": "factory",
694
+ "outputs": [
695
+ {
696
+ "internalType": "contract IMaverickV2Factory",
697
+ "name": "",
698
+ "type": "address"
699
+ }
700
+ ],
701
+ "stateMutability": "view",
702
+ "type": "function"
703
+ },
704
+ {
705
+ "inputs": [
706
+ {
707
+ "internalType": "bool",
708
+ "name": "tokenAIn",
709
+ "type": "bool"
710
+ }
711
+ ],
712
+ "name": "fee",
713
+ "outputs": [
714
+ {
715
+ "internalType": "uint256",
716
+ "name": "",
717
+ "type": "uint256"
718
+ }
719
+ ],
720
+ "stateMutability": "view",
721
+ "type": "function"
722
+ },
723
+ {
724
+ "inputs": [
725
+ {
726
+ "internalType": "address",
727
+ "name": "recipient",
728
+ "type": "address"
729
+ },
730
+ {
731
+ "internalType": "uint256",
732
+ "name": "amountA",
733
+ "type": "uint256"
734
+ },
735
+ {
736
+ "internalType": "uint256",
737
+ "name": "amountB",
738
+ "type": "uint256"
739
+ },
740
+ {
741
+ "internalType": "bytes",
742
+ "name": "data",
743
+ "type": "bytes"
744
+ }
745
+ ],
746
+ "name": "flashLoan",
747
+ "outputs": [
748
+ {
749
+ "internalType": "uint128",
750
+ "name": "lendingFeeA",
751
+ "type": "uint128"
752
+ },
753
+ {
754
+ "internalType": "uint128",
755
+ "name": "lendingFeeB",
756
+ "type": "uint128"
757
+ }
758
+ ],
759
+ "stateMutability": "nonpayable",
760
+ "type": "function"
761
+ },
762
+ {
763
+ "inputs": [
764
+ {
765
+ "internalType": "uint32",
766
+ "name": "binId",
767
+ "type": "uint32"
768
+ }
769
+ ],
770
+ "name": "getBin",
771
+ "outputs": [
772
+ {
773
+ "components": [
774
+ {
775
+ "internalType": "uint128",
776
+ "name": "mergeBinBalance",
777
+ "type": "uint128"
778
+ },
779
+ {
780
+ "internalType": "uint128",
781
+ "name": "tickBalance",
782
+ "type": "uint128"
783
+ },
784
+ {
785
+ "internalType": "uint128",
786
+ "name": "totalSupply",
787
+ "type": "uint128"
788
+ },
789
+ {
790
+ "internalType": "uint8",
791
+ "name": "kind",
792
+ "type": "uint8"
793
+ },
794
+ {
795
+ "internalType": "int32",
796
+ "name": "tick",
797
+ "type": "int32"
798
+ },
799
+ {
800
+ "internalType": "uint32",
801
+ "name": "mergeId",
802
+ "type": "uint32"
803
+ }
804
+ ],
805
+ "internalType": "struct IMaverickV2Pool.BinState",
806
+ "name": "bin",
807
+ "type": "tuple"
808
+ }
809
+ ],
810
+ "stateMutability": "view",
811
+ "type": "function"
812
+ },
813
+ {
814
+ "inputs": [],
815
+ "name": "getCurrentTwa",
816
+ "outputs": [
817
+ {
818
+ "internalType": "int256",
819
+ "name": "",
820
+ "type": "int256"
821
+ }
822
+ ],
823
+ "stateMutability": "view",
824
+ "type": "function"
825
+ },
826
+ {
827
+ "inputs": [],
828
+ "name": "getState",
829
+ "outputs": [
830
+ {
831
+ "components": [
832
+ {
833
+ "internalType": "uint128",
834
+ "name": "reserveA",
835
+ "type": "uint128"
836
+ },
837
+ {
838
+ "internalType": "uint128",
839
+ "name": "reserveB",
840
+ "type": "uint128"
841
+ },
842
+ {
843
+ "internalType": "int64",
844
+ "name": "lastTwaD8",
845
+ "type": "int64"
846
+ },
847
+ {
848
+ "internalType": "int64",
849
+ "name": "lastLogPriceD8",
850
+ "type": "int64"
851
+ },
852
+ {
853
+ "internalType": "uint40",
854
+ "name": "lastTimestamp",
855
+ "type": "uint40"
856
+ },
857
+ {
858
+ "internalType": "int32",
859
+ "name": "activeTick",
860
+ "type": "int32"
861
+ },
862
+ {
863
+ "internalType": "bool",
864
+ "name": "isLocked",
865
+ "type": "bool"
866
+ },
867
+ {
868
+ "internalType": "uint32",
869
+ "name": "binCounter",
870
+ "type": "uint32"
871
+ },
872
+ {
873
+ "internalType": "uint8",
874
+ "name": "protocolFeeRatioD3",
875
+ "type": "uint8"
876
+ }
877
+ ],
878
+ "internalType": "struct IMaverickV2Pool.State",
879
+ "name": "",
880
+ "type": "tuple"
881
+ }
882
+ ],
883
+ "stateMutability": "view",
884
+ "type": "function"
885
+ },
886
+ {
887
+ "inputs": [
888
+ {
889
+ "internalType": "int32",
890
+ "name": "tick",
891
+ "type": "int32"
892
+ }
893
+ ],
894
+ "name": "getTick",
895
+ "outputs": [
896
+ {
897
+ "components": [
898
+ {
899
+ "internalType": "uint128",
900
+ "name": "reserveA",
901
+ "type": "uint128"
902
+ },
903
+ {
904
+ "internalType": "uint128",
905
+ "name": "reserveB",
906
+ "type": "uint128"
907
+ },
908
+ {
909
+ "internalType": "uint128",
910
+ "name": "totalSupply",
911
+ "type": "uint128"
912
+ },
913
+ {
914
+ "internalType": "uint32[4]",
915
+ "name": "binIdsByTick",
916
+ "type": "uint32[4]"
917
+ }
918
+ ],
919
+ "internalType": "struct IMaverickV2Pool.TickState",
920
+ "name": "_tick",
921
+ "type": "tuple"
922
+ }
923
+ ],
924
+ "stateMutability": "view",
925
+ "type": "function"
926
+ },
927
+ {
928
+ "inputs": [],
929
+ "name": "kinds",
930
+ "outputs": [
931
+ {
932
+ "internalType": "uint8",
933
+ "name": "_kinds",
934
+ "type": "uint8"
935
+ }
936
+ ],
937
+ "stateMutability": "view",
938
+ "type": "function"
939
+ },
940
+ {
941
+ "inputs": [],
942
+ "name": "lendingFeeRateD18",
943
+ "outputs": [
944
+ {
945
+ "internalType": "uint256",
946
+ "name": "",
947
+ "type": "uint256"
948
+ }
949
+ ],
950
+ "stateMutability": "view",
951
+ "type": "function"
952
+ },
953
+ {
954
+ "inputs": [],
955
+ "name": "lookback",
956
+ "outputs": [
957
+ {
958
+ "internalType": "uint256",
959
+ "name": "",
960
+ "type": "uint256"
961
+ }
962
+ ],
963
+ "stateMutability": "view",
964
+ "type": "function"
965
+ },
966
+ {
967
+ "inputs": [
968
+ {
969
+ "internalType": "uint32",
970
+ "name": "binId",
971
+ "type": "uint32"
972
+ },
973
+ {
974
+ "internalType": "uint32",
975
+ "name": "maxRecursion",
976
+ "type": "uint32"
977
+ }
978
+ ],
979
+ "name": "migrateBinUpStack",
980
+ "outputs": [],
981
+ "stateMutability": "nonpayable",
982
+ "type": "function"
983
+ },
984
+ {
985
+ "inputs": [],
986
+ "name": "permissionedLiquidity",
987
+ "outputs": [
988
+ {
989
+ "internalType": "bool",
990
+ "name": "_permissionedLiquidity",
991
+ "type": "bool"
992
+ }
993
+ ],
994
+ "stateMutability": "view",
995
+ "type": "function"
996
+ },
997
+ {
998
+ "inputs": [],
999
+ "name": "permissionedPool",
1000
+ "outputs": [
1001
+ {
1002
+ "internalType": "bool",
1003
+ "name": "_permissionedPool",
1004
+ "type": "bool"
1005
+ }
1006
+ ],
1007
+ "stateMutability": "pure",
1008
+ "type": "function"
1009
+ },
1010
+ {
1011
+ "inputs": [],
1012
+ "name": "permissionedSwap",
1013
+ "outputs": [
1014
+ {
1015
+ "internalType": "bool",
1016
+ "name": "_permissionedSwap",
1017
+ "type": "bool"
1018
+ }
1019
+ ],
1020
+ "stateMutability": "view",
1021
+ "type": "function"
1022
+ },
1023
+ {
1024
+ "inputs": [],
1025
+ "name": "protocolFeeA",
1026
+ "outputs": [
1027
+ {
1028
+ "internalType": "uint128",
1029
+ "name": "",
1030
+ "type": "uint128"
1031
+ }
1032
+ ],
1033
+ "stateMutability": "view",
1034
+ "type": "function"
1035
+ },
1036
+ {
1037
+ "inputs": [],
1038
+ "name": "protocolFeeB",
1039
+ "outputs": [
1040
+ {
1041
+ "internalType": "uint128",
1042
+ "name": "",
1043
+ "type": "uint128"
1044
+ }
1045
+ ],
1046
+ "stateMutability": "view",
1047
+ "type": "function"
1048
+ },
1049
+ {
1050
+ "inputs": [
1051
+ {
1052
+ "internalType": "address",
1053
+ "name": "recipient",
1054
+ "type": "address"
1055
+ },
1056
+ {
1057
+ "internalType": "uint256",
1058
+ "name": "subaccount",
1059
+ "type": "uint256"
1060
+ },
1061
+ {
1062
+ "components": [
1063
+ {
1064
+ "internalType": "uint32[]",
1065
+ "name": "binIds",
1066
+ "type": "uint32[]"
1067
+ },
1068
+ {
1069
+ "internalType": "uint128[]",
1070
+ "name": "amounts",
1071
+ "type": "uint128[]"
1072
+ }
1073
+ ],
1074
+ "internalType": "struct IMaverickV2Pool.RemoveLiquidityParams",
1075
+ "name": "params",
1076
+ "type": "tuple"
1077
+ }
1078
+ ],
1079
+ "name": "removeLiquidity",
1080
+ "outputs": [
1081
+ {
1082
+ "internalType": "uint256",
1083
+ "name": "tokenAOut",
1084
+ "type": "uint256"
1085
+ },
1086
+ {
1087
+ "internalType": "uint256",
1088
+ "name": "tokenBOut",
1089
+ "type": "uint256"
1090
+ }
1091
+ ],
1092
+ "stateMutability": "nonpayable",
1093
+ "type": "function"
1094
+ },
1095
+ {
1096
+ "inputs": [
1097
+ {
1098
+ "internalType": "uint256",
1099
+ "name": "",
1100
+ "type": "uint256"
1101
+ },
1102
+ {
1103
+ "internalType": "uint256",
1104
+ "name": "",
1105
+ "type": "uint256"
1106
+ }
1107
+ ],
1108
+ "name": "setFee",
1109
+ "outputs": [],
1110
+ "stateMutability": "nonpayable",
1111
+ "type": "function"
1112
+ },
1113
+ {
1114
+ "inputs": [
1115
+ {
1116
+ "internalType": "address",
1117
+ "name": "recipient",
1118
+ "type": "address"
1119
+ },
1120
+ {
1121
+ "components": [
1122
+ {
1123
+ "internalType": "uint256",
1124
+ "name": "amount",
1125
+ "type": "uint256"
1126
+ },
1127
+ {
1128
+ "internalType": "bool",
1129
+ "name": "tokenAIn",
1130
+ "type": "bool"
1131
+ },
1132
+ {
1133
+ "internalType": "bool",
1134
+ "name": "exactOutput",
1135
+ "type": "bool"
1136
+ },
1137
+ {
1138
+ "internalType": "int32",
1139
+ "name": "tickLimit",
1140
+ "type": "int32"
1141
+ }
1142
+ ],
1143
+ "internalType": "struct IMaverickV2Pool.SwapParams",
1144
+ "name": "params",
1145
+ "type": "tuple"
1146
+ },
1147
+ {
1148
+ "internalType": "bytes",
1149
+ "name": "data",
1150
+ "type": "bytes"
1151
+ }
1152
+ ],
1153
+ "name": "swap",
1154
+ "outputs": [
1155
+ {
1156
+ "internalType": "uint256",
1157
+ "name": "amountIn",
1158
+ "type": "uint256"
1159
+ },
1160
+ {
1161
+ "internalType": "uint256",
1162
+ "name": "amountOut",
1163
+ "type": "uint256"
1164
+ }
1165
+ ],
1166
+ "stateMutability": "nonpayable",
1167
+ "type": "function"
1168
+ },
1169
+ {
1170
+ "inputs": [],
1171
+ "name": "tickSpacing",
1172
+ "outputs": [
1173
+ {
1174
+ "internalType": "uint256",
1175
+ "name": "",
1176
+ "type": "uint256"
1177
+ }
1178
+ ],
1179
+ "stateMutability": "view",
1180
+ "type": "function"
1181
+ },
1182
+ {
1183
+ "inputs": [],
1184
+ "name": "tokenA",
1185
+ "outputs": [
1186
+ {
1187
+ "internalType": "contract IERC20",
1188
+ "name": "",
1189
+ "type": "address"
1190
+ }
1191
+ ],
1192
+ "stateMutability": "view",
1193
+ "type": "function"
1194
+ },
1195
+ {
1196
+ "inputs": [],
1197
+ "name": "tokenAScale",
1198
+ "outputs": [
1199
+ {
1200
+ "internalType": "uint256",
1201
+ "name": "",
1202
+ "type": "uint256"
1203
+ }
1204
+ ],
1205
+ "stateMutability": "view",
1206
+ "type": "function"
1207
+ },
1208
+ {
1209
+ "inputs": [],
1210
+ "name": "tokenB",
1211
+ "outputs": [
1212
+ {
1213
+ "internalType": "contract IERC20",
1214
+ "name": "",
1215
+ "type": "address"
1216
+ }
1217
+ ],
1218
+ "stateMutability": "view",
1219
+ "type": "function"
1220
+ },
1221
+ {
1222
+ "inputs": [],
1223
+ "name": "tokenBScale",
1224
+ "outputs": [
1225
+ {
1226
+ "internalType": "uint256",
1227
+ "name": "",
1228
+ "type": "uint256"
1229
+ }
1230
+ ],
1231
+ "stateMutability": "view",
1232
+ "type": "function"
1233
+ }
1234
+ ]