@paraswap/dex-lib 2.24.0 → 2.24.1-algebra-event-based-quickswapv3.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.
Files changed (122) hide show
  1. package/build/constants.d.ts +1 -0
  2. package/build/constants.js +1 -0
  3. package/build/constants.js.map +1 -1
  4. package/build/dex/index.js +2 -0
  5. package/build/dex/index.js.map +1 -1
  6. package/build/dex/pancakeswap-v3/pancakeswap-v3-pool.d.ts +0 -2
  7. package/build/dex/pancakeswap-v3/pancakeswap-v3-pool.js +3 -23
  8. package/build/dex/pancakeswap-v3/pancakeswap-v3-pool.js.map +1 -1
  9. package/build/dex/quickswap/config.js +1 -8
  10. package/build/dex/quickswap/config.js.map +1 -1
  11. package/build/dex/quickswap/quickswap-v3.js +2 -1
  12. package/build/dex/quickswap/quickswap-v3.js.map +1 -1
  13. package/build/dex/uniswap-v3/config.js +18 -1
  14. package/build/dex/uniswap-v3/config.js.map +1 -1
  15. package/build/dex/uniswap-v3/contract-math/Tick.d.ts +2 -2
  16. package/build/dex/uniswap-v3/contract-math/Tick.js.map +1 -1
  17. package/build/dex/uniswap-v3/contract-math/TickBitMap.d.ts +2 -2
  18. package/build/dex/uniswap-v3/contract-math/TickBitMap.js.map +1 -1
  19. package/build/dex/uniswap-v3/contract-math/uniswap-v3-math.d.ts +19 -0
  20. package/build/dex/uniswap-v3/contract-math/uniswap-v3-math.js +2 -1
  21. package/build/dex/uniswap-v3/contract-math/uniswap-v3-math.js.map +1 -1
  22. package/build/dex/uniswap-v3/contract-math/utils.d.ts +4 -0
  23. package/build/dex/uniswap-v3/contract-math/utils.js +25 -1
  24. package/build/dex/uniswap-v3/contract-math/utils.js.map +1 -1
  25. package/build/dex/uniswap-v3/uniswap-v3-pool.d.ts +0 -2
  26. package/build/dex/uniswap-v3/uniswap-v3-pool.js +3 -23
  27. package/build/dex/uniswap-v3/uniswap-v3-pool.js.map +1 -1
  28. package/build/dex/uniswap-v3/uniswap-v3.js +5 -3
  29. package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
  30. package/build/dex/weth/config.js +3 -0
  31. package/build/dex/weth/config.js.map +1 -1
  32. package/build/utils.d.ts +10 -0
  33. package/build/utils.js +15 -1
  34. package/build/utils.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/abi/algebra/AlgebraPool.abi.json +727 -0
  37. package/src/abi/algebra/AlgebraQuoter.abi.json +138 -0
  38. package/src/abi/algebra/AlgebraStateMulticall.abi.json +801 -0
  39. package/src/constants.ts +1 -0
  40. package/src/dex/algebra/algebra-e2e.test.ts +158 -0
  41. package/src/dex/algebra/algebra-events.test.ts +120 -0
  42. package/src/dex/algebra/algebra-integration.test.ts +257 -0
  43. package/src/dex/algebra/algebra-pool.ts +454 -0
  44. package/src/dex/algebra/algebra.ts +709 -0
  45. package/src/dex/algebra/config.ts +45 -0
  46. package/src/dex/algebra/lib/AlgebraMath.ts +676 -0
  47. package/src/dex/algebra/lib/Constants.ts +5 -0
  48. package/src/dex/algebra/types.ts +82 -0
  49. package/src/dex/algebra/utils.ts +68 -0
  50. package/src/dex/index.ts +2 -0
  51. package/src/dex/pancakeswap-v3/pancakeswap-v3-pool.ts +6 -41
  52. package/src/dex/quickswap/config.ts +1 -9
  53. package/src/dex/quickswap/quickswap-v3.ts +2 -1
  54. package/src/dex/uniswap-v3/config.ts +19 -1
  55. package/src/dex/uniswap-v3/contract-math/Tick.ts +2 -2
  56. package/src/dex/uniswap-v3/contract-math/TickBitMap.ts +6 -2
  57. package/src/dex/uniswap-v3/contract-math/uniswap-v3-math.ts +3 -3
  58. package/src/dex/uniswap-v3/contract-math/utils.ts +42 -0
  59. package/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +35 -11
  60. package/src/dex/uniswap-v3/uniswap-v3-pool.ts +3 -41
  61. package/src/dex/uniswap-v3/uniswap-v3.ts +9 -3
  62. package/src/dex/weth/config.ts +3 -0
  63. package/src/utils.ts +17 -0
  64. package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +0 -285
  65. package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +0 -583
  66. package/build/abi/woo-fi/WooFeeManager.abi.json +0 -318
  67. package/build/abi/woo-fi/WooPP.abi.json +0 -548
  68. package/build/abi/woo-fi/Wooracle.abi.json +0 -260
  69. package/build/dex/algebra/lib/AlgebraXUniV3.d.ts +0 -5
  70. package/build/dex/algebra/lib/AlgebraXUniV3.js +0 -45
  71. package/build/dex/algebra/lib/AlgebraXUniV3.js.map +0 -1
  72. package/build/dex/algebra/lib/DataStorage.d.ts +0 -19
  73. package/build/dex/algebra/lib/DataStorage.js +0 -466
  74. package/build/dex/algebra/lib/DataStorage.js.map +0 -1
  75. package/build/dex/algebra/lib/DataStorageOperator.d.ts +0 -10
  76. package/build/dex/algebra/lib/DataStorageOperator.js +0 -93
  77. package/build/dex/algebra/lib/DataStorageOperator.js.map +0 -1
  78. package/build/dex/algebra/lib/Sqrt.d.ts +0 -3
  79. package/build/dex/algebra/lib/Sqrt.js +0 -60
  80. package/build/dex/algebra/lib/Sqrt.js.map +0 -1
  81. package/build/dex/algebra/lib/TickManager.d.ts +0 -10
  82. package/build/dex/algebra/lib/TickManager.js +0 -3
  83. package/build/dex/algebra/lib/TickManager.js.map +0 -1
  84. package/build/dex/balancer-v2/LinearMath.d.ts +0 -19
  85. package/build/dex/balancer-v2/LinearMath.js +0 -179
  86. package/build/dex/balancer-v2/LinearMath.js.map +0 -1
  87. package/build/dex/balancer-v2/LinearPool.d.ts +0 -47
  88. package/build/dex/balancer-v2/LinearPool.js +0 -324
  89. package/build/dex/balancer-v2/LinearPool.js.map +0 -1
  90. package/build/dex/balancer-v2/PhantomStablePool.d.ts +0 -47
  91. package/build/dex/balancer-v2/PhantomStablePool.js +0 -294
  92. package/build/dex/balancer-v2/PhantomStablePool.js.map +0 -1
  93. package/build/dex/balancer-v2/StableMath.d.ts +0 -9
  94. package/build/dex/balancer-v2/StableMath.js +0 -272
  95. package/build/dex/balancer-v2/StableMath.js.map +0 -1
  96. package/build/dex/balancer-v2/balancer-v2-pool.d.ts +0 -75
  97. package/build/dex/balancer-v2/balancer-v2-pool.js +0 -417
  98. package/build/dex/balancer-v2/balancer-v2-pool.js.map +0 -1
  99. package/build/dex/quickswap-v3.d.ts +0 -21
  100. package/build/dex/quickswap-v3.js +0 -40
  101. package/build/dex/quickswap-v3.js.map +0 -1
  102. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.d.ts +0 -12
  103. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js +0 -23
  104. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js.map +0 -1
  105. package/build/dex/woo-fi/config.d.ts +0 -4
  106. package/build/dex/woo-fi/config.js +0 -141
  107. package/build/dex/woo-fi/config.js.map +0 -1
  108. package/build/dex/woo-fi/constants.d.ts +0 -5
  109. package/build/dex/woo-fi/constants.js +0 -20
  110. package/build/dex/woo-fi/constants.js.map +0 -1
  111. package/build/dex/woo-fi/types.d.ts +0 -48
  112. package/build/dex/woo-fi/types.js +0 -3
  113. package/build/dex/woo-fi/types.js.map +0 -1
  114. package/build/dex/woo-fi/woo-fi-decimal-math.d.ts +0 -14
  115. package/build/dex/woo-fi/woo-fi-decimal-math.js +0 -42
  116. package/build/dex/woo-fi/woo-fi-decimal-math.js.map +0 -1
  117. package/build/dex/woo-fi/woo-fi-math.d.ts +0 -31
  118. package/build/dex/woo-fi/woo-fi-math.js +0 -300
  119. package/build/dex/woo-fi/woo-fi-math.js.map +0 -1
  120. package/build/dex/woo-fi/woo-fi.d.ts +0 -65
  121. package/build/dex/woo-fi/woo-fi.js +0 -480
  122. package/build/dex/woo-fi/woo-fi.js.map +0 -1
@@ -0,0 +1,801 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "contract IAlgebraFactory",
6
+ "name": "factory",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "tokenIn",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "internalType": "address",
16
+ "name": "tokenOut",
17
+ "type": "address"
18
+ },
19
+ {
20
+ "internalType": "int16",
21
+ "name": "tickBitmapStart",
22
+ "type": "int16"
23
+ },
24
+ {
25
+ "internalType": "int16",
26
+ "name": "tickBitmapEnd",
27
+ "type": "int16"
28
+ }
29
+ ],
30
+ "name": "getAdditionalBitmapWithoutTicks",
31
+ "outputs": [
32
+ {
33
+ "components": [
34
+ {
35
+ "internalType": "int16",
36
+ "name": "index",
37
+ "type": "int16"
38
+ },
39
+ {
40
+ "internalType": "uint256",
41
+ "name": "value",
42
+ "type": "uint256"
43
+ }
44
+ ],
45
+ "internalType": "struct IAlgebraStateMulticall.TickBitMapMappings[]",
46
+ "name": "tickBitmap",
47
+ "type": "tuple[]"
48
+ }
49
+ ],
50
+ "stateMutability": "view",
51
+ "type": "function"
52
+ },
53
+ {
54
+ "inputs": [
55
+ {
56
+ "internalType": "contract IAlgebraFactory",
57
+ "name": "factory",
58
+ "type": "address"
59
+ },
60
+ {
61
+ "internalType": "address",
62
+ "name": "tokenIn",
63
+ "type": "address"
64
+ },
65
+ {
66
+ "internalType": "address",
67
+ "name": "tokenOut",
68
+ "type": "address"
69
+ },
70
+ {
71
+ "internalType": "int16",
72
+ "name": "tickBitmapStart",
73
+ "type": "int16"
74
+ },
75
+ {
76
+ "internalType": "int16",
77
+ "name": "tickBitmapEnd",
78
+ "type": "int16"
79
+ }
80
+ ],
81
+ "name": "getAdditionalBitmapWithTicks",
82
+ "outputs": [
83
+ {
84
+ "components": [
85
+ {
86
+ "internalType": "int16",
87
+ "name": "index",
88
+ "type": "int16"
89
+ },
90
+ {
91
+ "internalType": "uint256",
92
+ "name": "value",
93
+ "type": "uint256"
94
+ }
95
+ ],
96
+ "internalType": "struct IAlgebraStateMulticall.TickBitMapMappings[]",
97
+ "name": "tickBitmap",
98
+ "type": "tuple[]"
99
+ },
100
+ {
101
+ "components": [
102
+ {
103
+ "internalType": "int24",
104
+ "name": "index",
105
+ "type": "int24"
106
+ },
107
+ {
108
+ "components": [
109
+ {
110
+ "internalType": "uint128",
111
+ "name": "liquidityGross",
112
+ "type": "uint128"
113
+ },
114
+ {
115
+ "internalType": "int128",
116
+ "name": "liquidityNet",
117
+ "type": "int128"
118
+ },
119
+ {
120
+ "internalType": "int56",
121
+ "name": "tickCumulativeOutside",
122
+ "type": "int56"
123
+ },
124
+ {
125
+ "internalType": "uint160",
126
+ "name": "secondsPerLiquidityOutsideX128",
127
+ "type": "uint160"
128
+ },
129
+ {
130
+ "internalType": "uint32",
131
+ "name": "secondsOutside",
132
+ "type": "uint32"
133
+ },
134
+ {
135
+ "internalType": "bool",
136
+ "name": "initialized",
137
+ "type": "bool"
138
+ }
139
+ ],
140
+ "internalType": "struct IAlgebraStateMulticall.TickInfo",
141
+ "name": "value",
142
+ "type": "tuple"
143
+ }
144
+ ],
145
+ "internalType": "struct IAlgebraStateMulticall.TickInfoMappings[]",
146
+ "name": "ticks",
147
+ "type": "tuple[]"
148
+ }
149
+ ],
150
+ "stateMutability": "view",
151
+ "type": "function"
152
+ },
153
+ {
154
+ "inputs": [
155
+ {
156
+ "internalType": "contract IAlgebraFactory",
157
+ "name": "factory",
158
+ "type": "address"
159
+ },
160
+ {
161
+ "internalType": "address",
162
+ "name": "tokenIn",
163
+ "type": "address"
164
+ },
165
+ {
166
+ "internalType": "address",
167
+ "name": "tokenOut",
168
+ "type": "address"
169
+ },
170
+ {
171
+ "internalType": "int16",
172
+ "name": "tickBitmapStart",
173
+ "type": "int16"
174
+ },
175
+ {
176
+ "internalType": "int16",
177
+ "name": "tickBitmapEnd",
178
+ "type": "int16"
179
+ }
180
+ ],
181
+ "name": "getFullState",
182
+ "outputs": [
183
+ {
184
+ "components": [
185
+ {
186
+ "internalType": "contract IAlgebraPool",
187
+ "name": "pool",
188
+ "type": "address"
189
+ },
190
+ {
191
+ "internalType": "uint256",
192
+ "name": "blockTimestamp",
193
+ "type": "uint256"
194
+ },
195
+ {
196
+ "components": [
197
+ {
198
+ "internalType": "uint160",
199
+ "name": "price",
200
+ "type": "uint160"
201
+ },
202
+ {
203
+ "internalType": "int24",
204
+ "name": "tick",
205
+ "type": "int24"
206
+ },
207
+ {
208
+ "internalType": "uint16",
209
+ "name": "fee",
210
+ "type": "uint16"
211
+ },
212
+ {
213
+ "internalType": "uint16",
214
+ "name": "timepointIndex",
215
+ "type": "uint16"
216
+ },
217
+ {
218
+ "internalType": "uint8",
219
+ "name": "communityFeeToken0",
220
+ "type": "uint8"
221
+ },
222
+ {
223
+ "internalType": "uint8",
224
+ "name": "communityFeeToken1",
225
+ "type": "uint8"
226
+ },
227
+ {
228
+ "internalType": "bool",
229
+ "name": "unlocked",
230
+ "type": "bool"
231
+ }
232
+ ],
233
+ "internalType": "struct IAlgebraStateMulticall.GlobalState",
234
+ "name": "globalState",
235
+ "type": "tuple"
236
+ },
237
+ {
238
+ "internalType": "uint128",
239
+ "name": "liquidity",
240
+ "type": "uint128"
241
+ },
242
+ {
243
+ "internalType": "int24",
244
+ "name": "tickSpacing",
245
+ "type": "int24"
246
+ },
247
+ {
248
+ "internalType": "uint128",
249
+ "name": "maxLiquidityPerTick",
250
+ "type": "uint128"
251
+ },
252
+ {
253
+ "components": [
254
+ {
255
+ "internalType": "bool",
256
+ "name": "initialized",
257
+ "type": "bool"
258
+ },
259
+ {
260
+ "internalType": "uint32",
261
+ "name": "blockTimestamp",
262
+ "type": "uint32"
263
+ },
264
+ {
265
+ "internalType": "int56",
266
+ "name": "tickCumulative",
267
+ "type": "int56"
268
+ },
269
+ {
270
+ "internalType": "uint160",
271
+ "name": "secondsPerLiquidityCumulative",
272
+ "type": "uint160"
273
+ },
274
+ {
275
+ "internalType": "uint88",
276
+ "name": "volatilityCumulative",
277
+ "type": "uint88"
278
+ },
279
+ {
280
+ "internalType": "int24",
281
+ "name": "averageTick",
282
+ "type": "int24"
283
+ },
284
+ {
285
+ "internalType": "uint144",
286
+ "name": "volumePerLiquidityCumulative",
287
+ "type": "uint144"
288
+ }
289
+ ],
290
+ "internalType": "struct IAlgebraStateMulticall.Timepoints",
291
+ "name": "timepoints",
292
+ "type": "tuple"
293
+ },
294
+ {
295
+ "components": [
296
+ {
297
+ "internalType": "int16",
298
+ "name": "index",
299
+ "type": "int16"
300
+ },
301
+ {
302
+ "internalType": "uint256",
303
+ "name": "value",
304
+ "type": "uint256"
305
+ }
306
+ ],
307
+ "internalType": "struct IAlgebraStateMulticall.TickBitMapMappings[]",
308
+ "name": "tickBitmap",
309
+ "type": "tuple[]"
310
+ },
311
+ {
312
+ "components": [
313
+ {
314
+ "internalType": "int24",
315
+ "name": "index",
316
+ "type": "int24"
317
+ },
318
+ {
319
+ "components": [
320
+ {
321
+ "internalType": "uint128",
322
+ "name": "liquidityGross",
323
+ "type": "uint128"
324
+ },
325
+ {
326
+ "internalType": "int128",
327
+ "name": "liquidityNet",
328
+ "type": "int128"
329
+ },
330
+ {
331
+ "internalType": "int56",
332
+ "name": "tickCumulativeOutside",
333
+ "type": "int56"
334
+ },
335
+ {
336
+ "internalType": "uint160",
337
+ "name": "secondsPerLiquidityOutsideX128",
338
+ "type": "uint160"
339
+ },
340
+ {
341
+ "internalType": "uint32",
342
+ "name": "secondsOutside",
343
+ "type": "uint32"
344
+ },
345
+ {
346
+ "internalType": "bool",
347
+ "name": "initialized",
348
+ "type": "bool"
349
+ }
350
+ ],
351
+ "internalType": "struct IAlgebraStateMulticall.TickInfo",
352
+ "name": "value",
353
+ "type": "tuple"
354
+ }
355
+ ],
356
+ "internalType": "struct IAlgebraStateMulticall.TickInfoMappings[]",
357
+ "name": "ticks",
358
+ "type": "tuple[]"
359
+ }
360
+ ],
361
+ "internalType": "struct IAlgebraStateMulticall.StateResult",
362
+ "name": "state",
363
+ "type": "tuple"
364
+ }
365
+ ],
366
+ "stateMutability": "view",
367
+ "type": "function"
368
+ },
369
+ {
370
+ "inputs": [
371
+ {
372
+ "internalType": "contract IAlgebraFactory",
373
+ "name": "factory",
374
+ "type": "address"
375
+ },
376
+ {
377
+ "internalType": "address",
378
+ "name": "tokenIn",
379
+ "type": "address"
380
+ },
381
+ {
382
+ "internalType": "address",
383
+ "name": "tokenOut",
384
+ "type": "address"
385
+ },
386
+ {
387
+ "internalType": "int16",
388
+ "name": "tickBitmapStart",
389
+ "type": "int16"
390
+ },
391
+ {
392
+ "internalType": "int16",
393
+ "name": "tickBitmapEnd",
394
+ "type": "int16"
395
+ }
396
+ ],
397
+ "name": "getFullStateWithoutTicks",
398
+ "outputs": [
399
+ {
400
+ "components": [
401
+ {
402
+ "internalType": "contract IAlgebraPool",
403
+ "name": "pool",
404
+ "type": "address"
405
+ },
406
+ {
407
+ "internalType": "uint256",
408
+ "name": "blockTimestamp",
409
+ "type": "uint256"
410
+ },
411
+ {
412
+ "components": [
413
+ {
414
+ "internalType": "uint160",
415
+ "name": "price",
416
+ "type": "uint160"
417
+ },
418
+ {
419
+ "internalType": "int24",
420
+ "name": "tick",
421
+ "type": "int24"
422
+ },
423
+ {
424
+ "internalType": "uint16",
425
+ "name": "fee",
426
+ "type": "uint16"
427
+ },
428
+ {
429
+ "internalType": "uint16",
430
+ "name": "timepointIndex",
431
+ "type": "uint16"
432
+ },
433
+ {
434
+ "internalType": "uint8",
435
+ "name": "communityFeeToken0",
436
+ "type": "uint8"
437
+ },
438
+ {
439
+ "internalType": "uint8",
440
+ "name": "communityFeeToken1",
441
+ "type": "uint8"
442
+ },
443
+ {
444
+ "internalType": "bool",
445
+ "name": "unlocked",
446
+ "type": "bool"
447
+ }
448
+ ],
449
+ "internalType": "struct IAlgebraStateMulticall.GlobalState",
450
+ "name": "globalState",
451
+ "type": "tuple"
452
+ },
453
+ {
454
+ "internalType": "uint128",
455
+ "name": "liquidity",
456
+ "type": "uint128"
457
+ },
458
+ {
459
+ "internalType": "int24",
460
+ "name": "tickSpacing",
461
+ "type": "int24"
462
+ },
463
+ {
464
+ "internalType": "uint128",
465
+ "name": "maxLiquidityPerTick",
466
+ "type": "uint128"
467
+ },
468
+ {
469
+ "components": [
470
+ {
471
+ "internalType": "bool",
472
+ "name": "initialized",
473
+ "type": "bool"
474
+ },
475
+ {
476
+ "internalType": "uint32",
477
+ "name": "blockTimestamp",
478
+ "type": "uint32"
479
+ },
480
+ {
481
+ "internalType": "int56",
482
+ "name": "tickCumulative",
483
+ "type": "int56"
484
+ },
485
+ {
486
+ "internalType": "uint160",
487
+ "name": "secondsPerLiquidityCumulative",
488
+ "type": "uint160"
489
+ },
490
+ {
491
+ "internalType": "uint88",
492
+ "name": "volatilityCumulative",
493
+ "type": "uint88"
494
+ },
495
+ {
496
+ "internalType": "int24",
497
+ "name": "averageTick",
498
+ "type": "int24"
499
+ },
500
+ {
501
+ "internalType": "uint144",
502
+ "name": "volumePerLiquidityCumulative",
503
+ "type": "uint144"
504
+ }
505
+ ],
506
+ "internalType": "struct IAlgebraStateMulticall.Timepoints",
507
+ "name": "timepoints",
508
+ "type": "tuple"
509
+ },
510
+ {
511
+ "components": [
512
+ {
513
+ "internalType": "int16",
514
+ "name": "index",
515
+ "type": "int16"
516
+ },
517
+ {
518
+ "internalType": "uint256",
519
+ "name": "value",
520
+ "type": "uint256"
521
+ }
522
+ ],
523
+ "internalType": "struct IAlgebraStateMulticall.TickBitMapMappings[]",
524
+ "name": "tickBitmap",
525
+ "type": "tuple[]"
526
+ },
527
+ {
528
+ "components": [
529
+ {
530
+ "internalType": "int24",
531
+ "name": "index",
532
+ "type": "int24"
533
+ },
534
+ {
535
+ "components": [
536
+ {
537
+ "internalType": "uint128",
538
+ "name": "liquidityGross",
539
+ "type": "uint128"
540
+ },
541
+ {
542
+ "internalType": "int128",
543
+ "name": "liquidityNet",
544
+ "type": "int128"
545
+ },
546
+ {
547
+ "internalType": "int56",
548
+ "name": "tickCumulativeOutside",
549
+ "type": "int56"
550
+ },
551
+ {
552
+ "internalType": "uint160",
553
+ "name": "secondsPerLiquidityOutsideX128",
554
+ "type": "uint160"
555
+ },
556
+ {
557
+ "internalType": "uint32",
558
+ "name": "secondsOutside",
559
+ "type": "uint32"
560
+ },
561
+ {
562
+ "internalType": "bool",
563
+ "name": "initialized",
564
+ "type": "bool"
565
+ }
566
+ ],
567
+ "internalType": "struct IAlgebraStateMulticall.TickInfo",
568
+ "name": "value",
569
+ "type": "tuple"
570
+ }
571
+ ],
572
+ "internalType": "struct IAlgebraStateMulticall.TickInfoMappings[]",
573
+ "name": "ticks",
574
+ "type": "tuple[]"
575
+ }
576
+ ],
577
+ "internalType": "struct IAlgebraStateMulticall.StateResult",
578
+ "name": "state",
579
+ "type": "tuple"
580
+ }
581
+ ],
582
+ "stateMutability": "view",
583
+ "type": "function"
584
+ },
585
+ {
586
+ "inputs": [
587
+ {
588
+ "internalType": "contract IAlgebraFactory",
589
+ "name": "factory",
590
+ "type": "address"
591
+ },
592
+ {
593
+ "internalType": "address",
594
+ "name": "tokenIn",
595
+ "type": "address"
596
+ },
597
+ {
598
+ "internalType": "address",
599
+ "name": "tokenOut",
600
+ "type": "address"
601
+ },
602
+ {
603
+ "internalType": "int16",
604
+ "name": "leftBitmapAmount",
605
+ "type": "int16"
606
+ },
607
+ {
608
+ "internalType": "int16",
609
+ "name": "rightBitmapAmount",
610
+ "type": "int16"
611
+ }
612
+ ],
613
+ "name": "getFullStateWithRelativeBitmaps",
614
+ "outputs": [
615
+ {
616
+ "components": [
617
+ {
618
+ "internalType": "contract IAlgebraPool",
619
+ "name": "pool",
620
+ "type": "address"
621
+ },
622
+ {
623
+ "internalType": "uint256",
624
+ "name": "blockTimestamp",
625
+ "type": "uint256"
626
+ },
627
+ {
628
+ "components": [
629
+ {
630
+ "internalType": "uint160",
631
+ "name": "price",
632
+ "type": "uint160"
633
+ },
634
+ {
635
+ "internalType": "int24",
636
+ "name": "tick",
637
+ "type": "int24"
638
+ },
639
+ {
640
+ "internalType": "uint16",
641
+ "name": "fee",
642
+ "type": "uint16"
643
+ },
644
+ {
645
+ "internalType": "uint16",
646
+ "name": "timepointIndex",
647
+ "type": "uint16"
648
+ },
649
+ {
650
+ "internalType": "uint8",
651
+ "name": "communityFeeToken0",
652
+ "type": "uint8"
653
+ },
654
+ {
655
+ "internalType": "uint8",
656
+ "name": "communityFeeToken1",
657
+ "type": "uint8"
658
+ },
659
+ {
660
+ "internalType": "bool",
661
+ "name": "unlocked",
662
+ "type": "bool"
663
+ }
664
+ ],
665
+ "internalType": "struct IAlgebraStateMulticall.GlobalState",
666
+ "name": "globalState",
667
+ "type": "tuple"
668
+ },
669
+ {
670
+ "internalType": "uint128",
671
+ "name": "liquidity",
672
+ "type": "uint128"
673
+ },
674
+ {
675
+ "internalType": "int24",
676
+ "name": "tickSpacing",
677
+ "type": "int24"
678
+ },
679
+ {
680
+ "internalType": "uint128",
681
+ "name": "maxLiquidityPerTick",
682
+ "type": "uint128"
683
+ },
684
+ {
685
+ "components": [
686
+ {
687
+ "internalType": "bool",
688
+ "name": "initialized",
689
+ "type": "bool"
690
+ },
691
+ {
692
+ "internalType": "uint32",
693
+ "name": "blockTimestamp",
694
+ "type": "uint32"
695
+ },
696
+ {
697
+ "internalType": "int56",
698
+ "name": "tickCumulative",
699
+ "type": "int56"
700
+ },
701
+ {
702
+ "internalType": "uint160",
703
+ "name": "secondsPerLiquidityCumulative",
704
+ "type": "uint160"
705
+ },
706
+ {
707
+ "internalType": "uint88",
708
+ "name": "volatilityCumulative",
709
+ "type": "uint88"
710
+ },
711
+ {
712
+ "internalType": "int24",
713
+ "name": "averageTick",
714
+ "type": "int24"
715
+ },
716
+ {
717
+ "internalType": "uint144",
718
+ "name": "volumePerLiquidityCumulative",
719
+ "type": "uint144"
720
+ }
721
+ ],
722
+ "internalType": "struct IAlgebraStateMulticall.Timepoints",
723
+ "name": "timepoints",
724
+ "type": "tuple"
725
+ },
726
+ {
727
+ "components": [
728
+ {
729
+ "internalType": "int16",
730
+ "name": "index",
731
+ "type": "int16"
732
+ },
733
+ {
734
+ "internalType": "uint256",
735
+ "name": "value",
736
+ "type": "uint256"
737
+ }
738
+ ],
739
+ "internalType": "struct IAlgebraStateMulticall.TickBitMapMappings[]",
740
+ "name": "tickBitmap",
741
+ "type": "tuple[]"
742
+ },
743
+ {
744
+ "components": [
745
+ {
746
+ "internalType": "int24",
747
+ "name": "index",
748
+ "type": "int24"
749
+ },
750
+ {
751
+ "components": [
752
+ {
753
+ "internalType": "uint128",
754
+ "name": "liquidityGross",
755
+ "type": "uint128"
756
+ },
757
+ {
758
+ "internalType": "int128",
759
+ "name": "liquidityNet",
760
+ "type": "int128"
761
+ },
762
+ {
763
+ "internalType": "int56",
764
+ "name": "tickCumulativeOutside",
765
+ "type": "int56"
766
+ },
767
+ {
768
+ "internalType": "uint160",
769
+ "name": "secondsPerLiquidityOutsideX128",
770
+ "type": "uint160"
771
+ },
772
+ {
773
+ "internalType": "uint32",
774
+ "name": "secondsOutside",
775
+ "type": "uint32"
776
+ },
777
+ {
778
+ "internalType": "bool",
779
+ "name": "initialized",
780
+ "type": "bool"
781
+ }
782
+ ],
783
+ "internalType": "struct IAlgebraStateMulticall.TickInfo",
784
+ "name": "value",
785
+ "type": "tuple"
786
+ }
787
+ ],
788
+ "internalType": "struct IAlgebraStateMulticall.TickInfoMappings[]",
789
+ "name": "ticks",
790
+ "type": "tuple[]"
791
+ }
792
+ ],
793
+ "internalType": "struct IAlgebraStateMulticall.StateResult",
794
+ "name": "state",
795
+ "type": "tuple"
796
+ }
797
+ ],
798
+ "stateMutability": "view",
799
+ "type": "function"
800
+ }
801
+ ]