@paraswap/dex-lib 2.49.2 → 2.50.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 (151) hide show
  1. package/build/abi/algebra/AlgebraPool.abi.json +727 -0
  2. package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +52 -0
  3. package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +193 -0
  4. package/build/dex/algebra/algebra-pool-v1_1.d.ts +3 -2
  5. package/build/dex/algebra/algebra-pool-v1_1.js +3 -2
  6. package/build/dex/algebra/algebra-pool-v1_1.js.map +1 -1
  7. package/build/dex/algebra/algebra-pool-v1_9_bidirectional_fee.d.ts +16 -0
  8. package/build/dex/algebra/algebra-pool-v1_9_bidirectional_fee.js +26 -0
  9. package/build/dex/algebra/algebra-pool-v1_9_bidirectional_fee.js.map +1 -0
  10. package/build/dex/algebra/algebra-pool-v1_9_directional_fee.d.ts +54 -0
  11. package/build/dex/algebra/algebra-pool-v1_9_directional_fee.js +356 -0
  12. package/build/dex/algebra/algebra-pool-v1_9_directional_fee.js.map +1 -0
  13. package/build/dex/algebra/algebra-pool.d.ts +46 -0
  14. package/build/dex/algebra/algebra-pool.js +336 -0
  15. package/build/dex/algebra/algebra-pool.js.map +1 -0
  16. package/build/dex/algebra/algebra.d.ts +2 -1
  17. package/build/dex/algebra/algebra.js +6 -1
  18. package/build/dex/algebra/algebra.js.map +1 -1
  19. package/build/dex/algebra/config.js +16 -0
  20. package/build/dex/algebra/config.js.map +1 -1
  21. package/build/dex/algebra/types.d.ts +1 -1
  22. package/build/dex/quickswap/camelot-v3.d.ts +6 -0
  23. package/build/dex/quickswap/camelot-v3.js +19 -0
  24. package/build/dex/quickswap/camelot-v3.js.map +1 -0
  25. package/build/dex/quickswap/zyberswap-v3.d.ts +6 -0
  26. package/build/dex/quickswap/zyberswap-v3.js +19 -0
  27. package/build/dex/quickswap/zyberswap-v3.js.map +1 -0
  28. package/build/dex/uniswap-v2/rebase-tokens.json +7 -0
  29. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +17 -0
  30. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +64 -0
  31. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +1 -0
  32. package/package.json +1 -1
  33. package/src/dex/algebra/algebra-e2e.test.ts +22 -0
  34. package/src/dex/algebra/algebra-pool-v1_1.ts +3 -2
  35. package/src/dex/algebra/algebra-pool-v1_9_bidirectional_fee.ts +55 -0
  36. package/src/dex/algebra/algebra.ts +12 -3
  37. package/src/dex/algebra/config.ts +18 -0
  38. package/src/dex/algebra/types.ts +1 -1
  39. package/build/abi/Redstone.json +0 -739
  40. package/build/abi/angle/stagToken.json +0 -963
  41. package/build/abi/angle-transmuter/MorphoOracle.json +0 -193
  42. package/build/abi/angle-transmuter/MorphoVault.json +0 -2506
  43. package/build/abi/angle-transmuter/Pyth.json +0 -1534
  44. package/build/abi/angle-transmuter/Transmuter.json +0 -1711
  45. package/build/abi/pharaoh/PharaohPool.abi.json +0 -1582
  46. package/build/abi/smardex/smardex-factory.json +0 -185
  47. package/build/abi/smardex/smardex-pool.json +0 -578
  48. package/build/abi/smardex/smardex-router.json +0 -648
  49. package/build/abi/trader-joe-v2_1/FactoryABI.json +0 -1208
  50. package/build/abi/trader-joe-v2_1/PairABI.json +0 -1493
  51. package/build/abi/trader-joe-v2_1/RouterABI.json +0 -1489
  52. package/build/abi/trader-joe-v2_1/StateMulticall.json +0 -193
  53. package/build/dex/angle-staked-stable/angle-staked-stable-pool.d.ts +0 -55
  54. package/build/dex/angle-staked-stable/angle-staked-stable-pool.js +0 -183
  55. package/build/dex/angle-staked-stable/angle-staked-stable-pool.js.map +0 -1
  56. package/build/dex/angle-staked-stable/angle-staked-stable.d.ts +0 -50
  57. package/build/dex/angle-staked-stable/angle-staked-stable.js +0 -280
  58. package/build/dex/angle-staked-stable/angle-staked-stable.js.map +0 -1
  59. package/build/dex/angle-staked-stable/config.d.ts +0 -4
  60. package/build/dex/angle-staked-stable/config.js +0 -46
  61. package/build/dex/angle-staked-stable/config.js.map +0 -1
  62. package/build/dex/angle-staked-stable/types.d.ts +0 -17
  63. package/build/dex/angle-staked-stable/types.js +0 -3
  64. package/build/dex/angle-staked-stable/types.js.map +0 -1
  65. package/build/dex/angle-transmuter/angle-transmuter-pool.d.ts +0 -61
  66. package/build/dex/angle-transmuter/angle-transmuter-pool.js +0 -415
  67. package/build/dex/angle-transmuter/angle-transmuter-pool.js.map +0 -1
  68. package/build/dex/angle-transmuter/angle-transmuter.d.ts +0 -59
  69. package/build/dex/angle-transmuter/angle-transmuter.js +0 -262
  70. package/build/dex/angle-transmuter/angle-transmuter.js.map +0 -1
  71. package/build/dex/angle-transmuter/backedOracle.d.ts +0 -19
  72. package/build/dex/angle-transmuter/backedOracle.js +0 -56
  73. package/build/dex/angle-transmuter/backedOracle.js.map +0 -1
  74. package/build/dex/angle-transmuter/config.d.ts +0 -4
  75. package/build/dex/angle-transmuter/config.js +0 -30
  76. package/build/dex/angle-transmuter/config.js.map +0 -1
  77. package/build/dex/angle-transmuter/constants.d.ts +0 -77
  78. package/build/dex/angle-transmuter/constants.js +0 -94
  79. package/build/dex/angle-transmuter/constants.js.map +0 -1
  80. package/build/dex/angle-transmuter/morphoOracle.d.ts +0 -42
  81. package/build/dex/angle-transmuter/morphoOracle.js +0 -179
  82. package/build/dex/angle-transmuter/morphoOracle.js.map +0 -1
  83. package/build/dex/angle-transmuter/morphoVault.d.ts +0 -19
  84. package/build/dex/angle-transmuter/morphoVault.js +0 -78
  85. package/build/dex/angle-transmuter/morphoVault.js.map +0 -1
  86. package/build/dex/angle-transmuter/pyth.d.ts +0 -19
  87. package/build/dex/angle-transmuter/pyth.js +0 -70
  88. package/build/dex/angle-transmuter/pyth.js.map +0 -1
  89. package/build/dex/angle-transmuter/redstone.d.ts +0 -20
  90. package/build/dex/angle-transmuter/redstone.js +0 -73
  91. package/build/dex/angle-transmuter/redstone.js.map +0 -1
  92. package/build/dex/angle-transmuter/transmuter.d.ts +0 -52
  93. package/build/dex/angle-transmuter/transmuter.js +0 -374
  94. package/build/dex/angle-transmuter/transmuter.js.map +0 -1
  95. package/build/dex/angle-transmuter/types.d.ts +0 -188
  96. package/build/dex/angle-transmuter/types.js +0 -33
  97. package/build/dex/angle-transmuter/types.js.map +0 -1
  98. package/build/dex/angle-transmuter/utils.d.ts +0 -9
  99. package/build/dex/angle-transmuter/utils.js +0 -252
  100. package/build/dex/angle-transmuter/utils.js.map +0 -1
  101. package/build/dex/smardex/subgraph-queries.d.ts +0 -1
  102. package/build/dex/smardex/subgraph-queries.js +0 -17
  103. package/build/dex/smardex/subgraph-queries.js.map +0 -1
  104. package/build/dex/smardex/usd-reserves.d.ts +0 -23
  105. package/build/dex/smardex/usd-reserves.js +0 -86
  106. package/build/dex/smardex/usd-reserves.js.map +0 -1
  107. package/build/dex/trader-joe-v2-1-2/config.d.ts +0 -4
  108. package/build/dex/trader-joe-v2-1-2/config.js +0 -47
  109. package/build/dex/trader-joe-v2-1-2/config.js.map +0 -1
  110. package/build/dex/trader-joe-v2-1-2/constants.d.ts +0 -20
  111. package/build/dex/trader-joe-v2-1-2/constants.js +0 -22
  112. package/build/dex/trader-joe-v2-1-2/constants.js.map +0 -1
  113. package/build/dex/trader-joe-v2-1-2/math/index.d.ts +0 -37
  114. package/build/dex/trader-joe-v2-1-2/math/index.js +0 -291
  115. package/build/dex/trader-joe-v2-1-2/math/index.js.map +0 -1
  116. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2-pool.d.ts +0 -60
  117. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2-pool.js +0 -248
  118. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2-pool.js.map +0 -1
  119. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2.d.ts +0 -53
  120. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2.js +0 -307
  121. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2.js.map +0 -1
  122. package/build/dex/trader-joe-v2-1-2/types.d.ts +0 -82
  123. package/build/dex/trader-joe-v2-1-2/types.js +0 -9
  124. package/build/dex/trader-joe-v2-1-2/types.js.map +0 -1
  125. package/build/dex/trader-joe-v2_1/config.d.ts +0 -4
  126. package/build/dex/trader-joe-v2_1/config.js +0 -47
  127. package/build/dex/trader-joe-v2_1/config.js.map +0 -1
  128. package/build/dex/trader-joe-v2_1/constants.d.ts +0 -20
  129. package/build/dex/trader-joe-v2_1/constants.js +0 -22
  130. package/build/dex/trader-joe-v2_1/constants.js.map +0 -1
  131. package/build/dex/trader-joe-v2_1/math/index.d.ts +0 -37
  132. package/build/dex/trader-joe-v2_1/math/index.js +0 -291
  133. package/build/dex/trader-joe-v2_1/math/index.js.map +0 -1
  134. package/build/dex/trader-joe-v2_1/trader-joe-v2.1.d.ts +0 -0
  135. package/build/dex/trader-joe-v2_1/trader-joe-v2.1.js +0 -384
  136. package/build/dex/trader-joe-v2_1/trader-joe-v2.1.js.map +0 -1
  137. package/build/dex/trader-joe-v2_1/trader-joe-v2_1-pool.d.ts +0 -60
  138. package/build/dex/trader-joe-v2_1/trader-joe-v2_1-pool.js +0 -247
  139. package/build/dex/trader-joe-v2_1/trader-joe-v2_1-pool.js.map +0 -1
  140. package/build/dex/trader-joe-v2_1/trader-joe-v2_1.d.ts +0 -53
  141. package/build/dex/trader-joe-v2_1/trader-joe-v2_1.js +0 -307
  142. package/build/dex/trader-joe-v2_1/trader-joe-v2_1.js.map +0 -1
  143. package/build/dex/trader-joe-v2_1/types.d.ts +0 -82
  144. package/build/dex/trader-joe-v2_1/types.js +0 -9
  145. package/build/dex/trader-joe-v2_1/types.js.map +0 -1
  146. package/build/dex/wombat/wombat-pool-poller.d.ts +0 -22
  147. package/build/dex/wombat/wombat-pool-poller.js +0 -164
  148. package/build/dex/wombat/wombat-pool-poller.js.map +0 -1
  149. package/build/dex-helper/RedisBatcher.d.ts +0 -20
  150. package/build/dex-helper/RedisBatcher.js +0 -75
  151. package/build/dex-helper/RedisBatcher.js.map +0 -1
@@ -1,1493 +0,0 @@
1
- [
2
- {
3
- "inputs": [
4
- {
5
- "internalType": "contract ILBFactory",
6
- "name": "factory_",
7
- "type": "address"
8
- }
9
- ],
10
- "stateMutability": "nonpayable",
11
- "type": "constructor"
12
- },
13
- {
14
- "inputs": [],
15
- "name": "AddressHelper__CallFailed",
16
- "type": "error"
17
- },
18
- {
19
- "inputs": [],
20
- "name": "AddressHelper__NonContract",
21
- "type": "error"
22
- },
23
- {
24
- "inputs": [
25
- {
26
- "internalType": "uint24",
27
- "name": "id",
28
- "type": "uint24"
29
- }
30
- ],
31
- "name": "BinHelper__CompositionFactorFlawed",
32
- "type": "error"
33
- },
34
- {
35
- "inputs": [],
36
- "name": "BinHelper__LiquidityOverflow",
37
- "type": "error"
38
- },
39
- {
40
- "inputs": [],
41
- "name": "FeeHelper__FeeTooLarge",
42
- "type": "error"
43
- },
44
- {
45
- "inputs": [],
46
- "name": "LBPair__AddressZero",
47
- "type": "error"
48
- },
49
- {
50
- "inputs": [],
51
- "name": "LBPair__AlreadyInitialized",
52
- "type": "error"
53
- },
54
- {
55
- "inputs": [],
56
- "name": "LBPair__EmptyMarketConfigs",
57
- "type": "error"
58
- },
59
- {
60
- "inputs": [],
61
- "name": "LBPair__FlashLoanCallbackFailed",
62
- "type": "error"
63
- },
64
- {
65
- "inputs": [],
66
- "name": "LBPair__FlashLoanInsufficientAmount",
67
- "type": "error"
68
- },
69
- {
70
- "inputs": [],
71
- "name": "LBPair__InsufficientAmountIn",
72
- "type": "error"
73
- },
74
- {
75
- "inputs": [],
76
- "name": "LBPair__InsufficientAmountOut",
77
- "type": "error"
78
- },
79
- {
80
- "inputs": [],
81
- "name": "LBPair__InvalidInput",
82
- "type": "error"
83
- },
84
- {
85
- "inputs": [],
86
- "name": "LBPair__InvalidStaticFeeParameters",
87
- "type": "error"
88
- },
89
- {
90
- "inputs": [],
91
- "name": "LBPair__MaxTotalFeeExceeded",
92
- "type": "error"
93
- },
94
- {
95
- "inputs": [],
96
- "name": "LBPair__OnlyFactory",
97
- "type": "error"
98
- },
99
- {
100
- "inputs": [],
101
- "name": "LBPair__OnlyProtocolFeeRecipient",
102
- "type": "error"
103
- },
104
- {
105
- "inputs": [],
106
- "name": "LBPair__OutOfLiquidity",
107
- "type": "error"
108
- },
109
- {
110
- "inputs": [],
111
- "name": "LBPair__TokenNotSupported",
112
- "type": "error"
113
- },
114
- {
115
- "inputs": [
116
- {
117
- "internalType": "uint24",
118
- "name": "id",
119
- "type": "uint24"
120
- }
121
- ],
122
- "name": "LBPair__ZeroAmount",
123
- "type": "error"
124
- },
125
- {
126
- "inputs": [
127
- {
128
- "internalType": "uint24",
129
- "name": "id",
130
- "type": "uint24"
131
- }
132
- ],
133
- "name": "LBPair__ZeroAmountsOut",
134
- "type": "error"
135
- },
136
- {
137
- "inputs": [],
138
- "name": "LBPair__ZeroBorrowAmount",
139
- "type": "error"
140
- },
141
- {
142
- "inputs": [
143
- {
144
- "internalType": "uint24",
145
- "name": "id",
146
- "type": "uint24"
147
- }
148
- ],
149
- "name": "LBPair__ZeroShares",
150
- "type": "error"
151
- },
152
- {
153
- "inputs": [],
154
- "name": "LBToken__AddressThisOrZero",
155
- "type": "error"
156
- },
157
- {
158
- "inputs": [
159
- {
160
- "internalType": "address",
161
- "name": "from",
162
- "type": "address"
163
- },
164
- {
165
- "internalType": "uint256",
166
- "name": "id",
167
- "type": "uint256"
168
- },
169
- {
170
- "internalType": "uint256",
171
- "name": "amount",
172
- "type": "uint256"
173
- }
174
- ],
175
- "name": "LBToken__BurnExceedsBalance",
176
- "type": "error"
177
- },
178
- {
179
- "inputs": [],
180
- "name": "LBToken__InvalidLength",
181
- "type": "error"
182
- },
183
- {
184
- "inputs": [
185
- {
186
- "internalType": "address",
187
- "name": "owner",
188
- "type": "address"
189
- }
190
- ],
191
- "name": "LBToken__SelfApproval",
192
- "type": "error"
193
- },
194
- {
195
- "inputs": [
196
- {
197
- "internalType": "address",
198
- "name": "from",
199
- "type": "address"
200
- },
201
- {
202
- "internalType": "address",
203
- "name": "spender",
204
- "type": "address"
205
- }
206
- ],
207
- "name": "LBToken__SpenderNotApproved",
208
- "type": "error"
209
- },
210
- {
211
- "inputs": [
212
- {
213
- "internalType": "address",
214
- "name": "from",
215
- "type": "address"
216
- },
217
- {
218
- "internalType": "uint256",
219
- "name": "id",
220
- "type": "uint256"
221
- },
222
- {
223
- "internalType": "uint256",
224
- "name": "amount",
225
- "type": "uint256"
226
- }
227
- ],
228
- "name": "LBToken__TransferExceedsBalance",
229
- "type": "error"
230
- },
231
- {
232
- "inputs": [],
233
- "name": "LiquidityConfigurations__InvalidConfig",
234
- "type": "error"
235
- },
236
- {
237
- "inputs": [],
238
- "name": "OracleHelper__InvalidOracleId",
239
- "type": "error"
240
- },
241
- {
242
- "inputs": [],
243
- "name": "OracleHelper__LookUpTimestampTooOld",
244
- "type": "error"
245
- },
246
- {
247
- "inputs": [],
248
- "name": "OracleHelper__NewLengthTooSmall",
249
- "type": "error"
250
- },
251
- {
252
- "inputs": [],
253
- "name": "PackedUint128Math__AddOverflow",
254
- "type": "error"
255
- },
256
- {
257
- "inputs": [],
258
- "name": "PackedUint128Math__MultiplierTooLarge",
259
- "type": "error"
260
- },
261
- {
262
- "inputs": [],
263
- "name": "PackedUint128Math__SubUnderflow",
264
- "type": "error"
265
- },
266
- {
267
- "inputs": [],
268
- "name": "PairParametersHelper__InvalidParameter",
269
- "type": "error"
270
- },
271
- {
272
- "inputs": [],
273
- "name": "ReentrancyGuard__ReentrantCall",
274
- "type": "error"
275
- },
276
- {
277
- "inputs": [],
278
- "name": "SafeCast__Exceeds128Bits",
279
- "type": "error"
280
- },
281
- {
282
- "inputs": [],
283
- "name": "SafeCast__Exceeds24Bits",
284
- "type": "error"
285
- },
286
- {
287
- "inputs": [],
288
- "name": "SafeCast__Exceeds40Bits",
289
- "type": "error"
290
- },
291
- {
292
- "inputs": [],
293
- "name": "TokenHelper__TransferFailed",
294
- "type": "error"
295
- },
296
- {
297
- "inputs": [],
298
- "name": "Uint128x128Math__LogUnderflow",
299
- "type": "error"
300
- },
301
- {
302
- "inputs": [
303
- {
304
- "internalType": "uint256",
305
- "name": "x",
306
- "type": "uint256"
307
- },
308
- {
309
- "internalType": "int256",
310
- "name": "y",
311
- "type": "int256"
312
- }
313
- ],
314
- "name": "Uint128x128Math__PowUnderflow",
315
- "type": "error"
316
- },
317
- {
318
- "inputs": [],
319
- "name": "Uint256x256Math__MulDivOverflow",
320
- "type": "error"
321
- },
322
- {
323
- "inputs": [],
324
- "name": "Uint256x256Math__MulShiftOverflow",
325
- "type": "error"
326
- },
327
- {
328
- "anonymous": false,
329
- "inputs": [
330
- {
331
- "indexed": true,
332
- "internalType": "address",
333
- "name": "account",
334
- "type": "address"
335
- },
336
- {
337
- "indexed": true,
338
- "internalType": "address",
339
- "name": "sender",
340
- "type": "address"
341
- },
342
- {
343
- "indexed": false,
344
- "internalType": "bool",
345
- "name": "approved",
346
- "type": "bool"
347
- }
348
- ],
349
- "name": "ApprovalForAll",
350
- "type": "event"
351
- },
352
- {
353
- "anonymous": false,
354
- "inputs": [
355
- {
356
- "indexed": true,
357
- "internalType": "address",
358
- "name": "feeRecipient",
359
- "type": "address"
360
- },
361
- {
362
- "indexed": false,
363
- "internalType": "bytes32",
364
- "name": "protocolFees",
365
- "type": "bytes32"
366
- }
367
- ],
368
- "name": "CollectedProtocolFees",
369
- "type": "event"
370
- },
371
- {
372
- "anonymous": false,
373
- "inputs": [
374
- {
375
- "indexed": true,
376
- "internalType": "address",
377
- "name": "sender",
378
- "type": "address"
379
- },
380
- {
381
- "indexed": false,
382
- "internalType": "uint24",
383
- "name": "id",
384
- "type": "uint24"
385
- },
386
- {
387
- "indexed": false,
388
- "internalType": "bytes32",
389
- "name": "totalFees",
390
- "type": "bytes32"
391
- },
392
- {
393
- "indexed": false,
394
- "internalType": "bytes32",
395
- "name": "protocolFees",
396
- "type": "bytes32"
397
- }
398
- ],
399
- "name": "CompositionFees",
400
- "type": "event"
401
- },
402
- {
403
- "anonymous": false,
404
- "inputs": [
405
- {
406
- "indexed": true,
407
- "internalType": "address",
408
- "name": "sender",
409
- "type": "address"
410
- },
411
- {
412
- "indexed": true,
413
- "internalType": "address",
414
- "name": "to",
415
- "type": "address"
416
- },
417
- {
418
- "indexed": false,
419
- "internalType": "uint256[]",
420
- "name": "ids",
421
- "type": "uint256[]"
422
- },
423
- {
424
- "indexed": false,
425
- "internalType": "bytes32[]",
426
- "name": "amounts",
427
- "type": "bytes32[]"
428
- }
429
- ],
430
- "name": "DepositedToBins",
431
- "type": "event"
432
- },
433
- {
434
- "anonymous": false,
435
- "inputs": [
436
- {
437
- "indexed": true,
438
- "internalType": "address",
439
- "name": "sender",
440
- "type": "address"
441
- },
442
- {
443
- "indexed": true,
444
- "internalType": "contract ILBFlashLoanCallback",
445
- "name": "receiver",
446
- "type": "address"
447
- },
448
- {
449
- "indexed": false,
450
- "internalType": "uint24",
451
- "name": "activeId",
452
- "type": "uint24"
453
- },
454
- {
455
- "indexed": false,
456
- "internalType": "bytes32",
457
- "name": "amounts",
458
- "type": "bytes32"
459
- },
460
- {
461
- "indexed": false,
462
- "internalType": "bytes32",
463
- "name": "totalFees",
464
- "type": "bytes32"
465
- },
466
- {
467
- "indexed": false,
468
- "internalType": "bytes32",
469
- "name": "protocolFees",
470
- "type": "bytes32"
471
- }
472
- ],
473
- "name": "FlashLoan",
474
- "type": "event"
475
- },
476
- {
477
- "anonymous": false,
478
- "inputs": [
479
- {
480
- "indexed": true,
481
- "internalType": "address",
482
- "name": "sender",
483
- "type": "address"
484
- },
485
- {
486
- "indexed": false,
487
- "internalType": "uint24",
488
- "name": "idReference",
489
- "type": "uint24"
490
- },
491
- {
492
- "indexed": false,
493
- "internalType": "uint24",
494
- "name": "volatilityReference",
495
- "type": "uint24"
496
- }
497
- ],
498
- "name": "ForcedDecay",
499
- "type": "event"
500
- },
501
- {
502
- "anonymous": false,
503
- "inputs": [
504
- {
505
- "indexed": true,
506
- "internalType": "address",
507
- "name": "sender",
508
- "type": "address"
509
- },
510
- {
511
- "indexed": false,
512
- "internalType": "uint16",
513
- "name": "oracleLength",
514
- "type": "uint16"
515
- }
516
- ],
517
- "name": "OracleLengthIncreased",
518
- "type": "event"
519
- },
520
- {
521
- "anonymous": false,
522
- "inputs": [
523
- {
524
- "indexed": true,
525
- "internalType": "address",
526
- "name": "sender",
527
- "type": "address"
528
- },
529
- {
530
- "indexed": false,
531
- "internalType": "uint16",
532
- "name": "baseFactor",
533
- "type": "uint16"
534
- },
535
- {
536
- "indexed": false,
537
- "internalType": "uint16",
538
- "name": "filterPeriod",
539
- "type": "uint16"
540
- },
541
- {
542
- "indexed": false,
543
- "internalType": "uint16",
544
- "name": "decayPeriod",
545
- "type": "uint16"
546
- },
547
- {
548
- "indexed": false,
549
- "internalType": "uint16",
550
- "name": "reductionFactor",
551
- "type": "uint16"
552
- },
553
- {
554
- "indexed": false,
555
- "internalType": "uint24",
556
- "name": "variableFeeControl",
557
- "type": "uint24"
558
- },
559
- {
560
- "indexed": false,
561
- "internalType": "uint16",
562
- "name": "protocolShare",
563
- "type": "uint16"
564
- },
565
- {
566
- "indexed": false,
567
- "internalType": "uint24",
568
- "name": "maxVolatilityAccumulator",
569
- "type": "uint24"
570
- }
571
- ],
572
- "name": "StaticFeeParametersSet",
573
- "type": "event"
574
- },
575
- {
576
- "anonymous": false,
577
- "inputs": [
578
- {
579
- "indexed": true,
580
- "internalType": "address",
581
- "name": "sender",
582
- "type": "address"
583
- },
584
- {
585
- "indexed": true,
586
- "internalType": "address",
587
- "name": "to",
588
- "type": "address"
589
- },
590
- {
591
- "indexed": false,
592
- "internalType": "uint24",
593
- "name": "id",
594
- "type": "uint24"
595
- },
596
- {
597
- "indexed": false,
598
- "internalType": "bytes32",
599
- "name": "amountsIn",
600
- "type": "bytes32"
601
- },
602
- {
603
- "indexed": false,
604
- "internalType": "bytes32",
605
- "name": "amountsOut",
606
- "type": "bytes32"
607
- },
608
- {
609
- "indexed": false,
610
- "internalType": "uint24",
611
- "name": "volatilityAccumulator",
612
- "type": "uint24"
613
- },
614
- {
615
- "indexed": false,
616
- "internalType": "bytes32",
617
- "name": "totalFees",
618
- "type": "bytes32"
619
- },
620
- {
621
- "indexed": false,
622
- "internalType": "bytes32",
623
- "name": "protocolFees",
624
- "type": "bytes32"
625
- }
626
- ],
627
- "name": "Swap",
628
- "type": "event"
629
- },
630
- {
631
- "anonymous": false,
632
- "inputs": [
633
- {
634
- "indexed": true,
635
- "internalType": "address",
636
- "name": "sender",
637
- "type": "address"
638
- },
639
- {
640
- "indexed": true,
641
- "internalType": "address",
642
- "name": "from",
643
- "type": "address"
644
- },
645
- {
646
- "indexed": true,
647
- "internalType": "address",
648
- "name": "to",
649
- "type": "address"
650
- },
651
- {
652
- "indexed": false,
653
- "internalType": "uint256[]",
654
- "name": "ids",
655
- "type": "uint256[]"
656
- },
657
- {
658
- "indexed": false,
659
- "internalType": "uint256[]",
660
- "name": "amounts",
661
- "type": "uint256[]"
662
- }
663
- ],
664
- "name": "TransferBatch",
665
- "type": "event"
666
- },
667
- {
668
- "anonymous": false,
669
- "inputs": [
670
- {
671
- "indexed": true,
672
- "internalType": "address",
673
- "name": "sender",
674
- "type": "address"
675
- },
676
- {
677
- "indexed": true,
678
- "internalType": "address",
679
- "name": "to",
680
- "type": "address"
681
- },
682
- {
683
- "indexed": false,
684
- "internalType": "uint256[]",
685
- "name": "ids",
686
- "type": "uint256[]"
687
- },
688
- {
689
- "indexed": false,
690
- "internalType": "bytes32[]",
691
- "name": "amounts",
692
- "type": "bytes32[]"
693
- }
694
- ],
695
- "name": "WithdrawnFromBins",
696
- "type": "event"
697
- },
698
- {
699
- "inputs": [
700
- {
701
- "internalType": "address",
702
- "name": "spender",
703
- "type": "address"
704
- },
705
- {
706
- "internalType": "bool",
707
- "name": "approved",
708
- "type": "bool"
709
- }
710
- ],
711
- "name": "approveForAll",
712
- "outputs": [],
713
- "stateMutability": "nonpayable",
714
- "type": "function"
715
- },
716
- {
717
- "inputs": [
718
- {
719
- "internalType": "address",
720
- "name": "account",
721
- "type": "address"
722
- },
723
- {
724
- "internalType": "uint256",
725
- "name": "id",
726
- "type": "uint256"
727
- }
728
- ],
729
- "name": "balanceOf",
730
- "outputs": [
731
- {
732
- "internalType": "uint256",
733
- "name": "",
734
- "type": "uint256"
735
- }
736
- ],
737
- "stateMutability": "view",
738
- "type": "function"
739
- },
740
- {
741
- "inputs": [
742
- {
743
- "internalType": "address[]",
744
- "name": "accounts",
745
- "type": "address[]"
746
- },
747
- {
748
- "internalType": "uint256[]",
749
- "name": "ids",
750
- "type": "uint256[]"
751
- }
752
- ],
753
- "name": "balanceOfBatch",
754
- "outputs": [
755
- {
756
- "internalType": "uint256[]",
757
- "name": "batchBalances",
758
- "type": "uint256[]"
759
- }
760
- ],
761
- "stateMutability": "view",
762
- "type": "function"
763
- },
764
- {
765
- "inputs": [
766
- {
767
- "internalType": "address",
768
- "name": "from",
769
- "type": "address"
770
- },
771
- {
772
- "internalType": "address",
773
- "name": "to",
774
- "type": "address"
775
- },
776
- {
777
- "internalType": "uint256[]",
778
- "name": "ids",
779
- "type": "uint256[]"
780
- },
781
- {
782
- "internalType": "uint256[]",
783
- "name": "amounts",
784
- "type": "uint256[]"
785
- }
786
- ],
787
- "name": "batchTransferFrom",
788
- "outputs": [],
789
- "stateMutability": "nonpayable",
790
- "type": "function"
791
- },
792
- {
793
- "inputs": [
794
- {
795
- "internalType": "address",
796
- "name": "from",
797
- "type": "address"
798
- },
799
- {
800
- "internalType": "address",
801
- "name": "to",
802
- "type": "address"
803
- },
804
- {
805
- "internalType": "uint256[]",
806
- "name": "ids",
807
- "type": "uint256[]"
808
- },
809
- {
810
- "internalType": "uint256[]",
811
- "name": "amountsToBurn",
812
- "type": "uint256[]"
813
- }
814
- ],
815
- "name": "burn",
816
- "outputs": [
817
- {
818
- "internalType": "bytes32[]",
819
- "name": "amounts",
820
- "type": "bytes32[]"
821
- }
822
- ],
823
- "stateMutability": "nonpayable",
824
- "type": "function"
825
- },
826
- {
827
- "inputs": [],
828
- "name": "collectProtocolFees",
829
- "outputs": [
830
- {
831
- "internalType": "bytes32",
832
- "name": "collectedProtocolFees",
833
- "type": "bytes32"
834
- }
835
- ],
836
- "stateMutability": "nonpayable",
837
- "type": "function"
838
- },
839
- {
840
- "inputs": [
841
- {
842
- "internalType": "contract ILBFlashLoanCallback",
843
- "name": "receiver",
844
- "type": "address"
845
- },
846
- {
847
- "internalType": "bytes32",
848
- "name": "amounts",
849
- "type": "bytes32"
850
- },
851
- {
852
- "internalType": "bytes",
853
- "name": "data",
854
- "type": "bytes"
855
- }
856
- ],
857
- "name": "flashLoan",
858
- "outputs": [],
859
- "stateMutability": "nonpayable",
860
- "type": "function"
861
- },
862
- {
863
- "inputs": [],
864
- "name": "forceDecay",
865
- "outputs": [],
866
- "stateMutability": "nonpayable",
867
- "type": "function"
868
- },
869
- {
870
- "inputs": [],
871
- "name": "getActiveId",
872
- "outputs": [
873
- {
874
- "internalType": "uint24",
875
- "name": "activeId",
876
- "type": "uint24"
877
- }
878
- ],
879
- "stateMutability": "view",
880
- "type": "function"
881
- },
882
- {
883
- "inputs": [
884
- {
885
- "internalType": "uint24",
886
- "name": "id",
887
- "type": "uint24"
888
- }
889
- ],
890
- "name": "getBin",
891
- "outputs": [
892
- {
893
- "internalType": "uint128",
894
- "name": "binReserveX",
895
- "type": "uint128"
896
- },
897
- {
898
- "internalType": "uint128",
899
- "name": "binReserveY",
900
- "type": "uint128"
901
- }
902
- ],
903
- "stateMutability": "view",
904
- "type": "function"
905
- },
906
- {
907
- "inputs": [],
908
- "name": "getBinStep",
909
- "outputs": [
910
- {
911
- "internalType": "uint16",
912
- "name": "",
913
- "type": "uint16"
914
- }
915
- ],
916
- "stateMutability": "pure",
917
- "type": "function"
918
- },
919
- {
920
- "inputs": [],
921
- "name": "getFactory",
922
- "outputs": [
923
- {
924
- "internalType": "contract ILBFactory",
925
- "name": "factory",
926
- "type": "address"
927
- }
928
- ],
929
- "stateMutability": "view",
930
- "type": "function"
931
- },
932
- {
933
- "inputs": [
934
- {
935
- "internalType": "uint256",
936
- "name": "price",
937
- "type": "uint256"
938
- }
939
- ],
940
- "name": "getIdFromPrice",
941
- "outputs": [
942
- {
943
- "internalType": "uint24",
944
- "name": "id",
945
- "type": "uint24"
946
- }
947
- ],
948
- "stateMutability": "pure",
949
- "type": "function"
950
- },
951
- {
952
- "inputs": [
953
- {
954
- "internalType": "bool",
955
- "name": "swapForY",
956
- "type": "bool"
957
- },
958
- {
959
- "internalType": "uint24",
960
- "name": "id",
961
- "type": "uint24"
962
- }
963
- ],
964
- "name": "getNextNonEmptyBin",
965
- "outputs": [
966
- {
967
- "internalType": "uint24",
968
- "name": "nextId",
969
- "type": "uint24"
970
- }
971
- ],
972
- "stateMutability": "view",
973
- "type": "function"
974
- },
975
- {
976
- "inputs": [],
977
- "name": "getOracleParameters",
978
- "outputs": [
979
- {
980
- "internalType": "uint8",
981
- "name": "sampleLifetime",
982
- "type": "uint8"
983
- },
984
- {
985
- "internalType": "uint16",
986
- "name": "size",
987
- "type": "uint16"
988
- },
989
- {
990
- "internalType": "uint16",
991
- "name": "activeSize",
992
- "type": "uint16"
993
- },
994
- {
995
- "internalType": "uint40",
996
- "name": "lastUpdated",
997
- "type": "uint40"
998
- },
999
- {
1000
- "internalType": "uint40",
1001
- "name": "firstTimestamp",
1002
- "type": "uint40"
1003
- }
1004
- ],
1005
- "stateMutability": "view",
1006
- "type": "function"
1007
- },
1008
- {
1009
- "inputs": [
1010
- {
1011
- "internalType": "uint40",
1012
- "name": "lookupTimestamp",
1013
- "type": "uint40"
1014
- }
1015
- ],
1016
- "name": "getOracleSampleAt",
1017
- "outputs": [
1018
- {
1019
- "internalType": "uint64",
1020
- "name": "cumulativeId",
1021
- "type": "uint64"
1022
- },
1023
- {
1024
- "internalType": "uint64",
1025
- "name": "cumulativeVolatility",
1026
- "type": "uint64"
1027
- },
1028
- {
1029
- "internalType": "uint64",
1030
- "name": "cumulativeBinCrossed",
1031
- "type": "uint64"
1032
- }
1033
- ],
1034
- "stateMutability": "view",
1035
- "type": "function"
1036
- },
1037
- {
1038
- "inputs": [
1039
- {
1040
- "internalType": "uint24",
1041
- "name": "id",
1042
- "type": "uint24"
1043
- }
1044
- ],
1045
- "name": "getPriceFromId",
1046
- "outputs": [
1047
- {
1048
- "internalType": "uint256",
1049
- "name": "price",
1050
- "type": "uint256"
1051
- }
1052
- ],
1053
- "stateMutability": "pure",
1054
- "type": "function"
1055
- },
1056
- {
1057
- "inputs": [],
1058
- "name": "getProtocolFees",
1059
- "outputs": [
1060
- {
1061
- "internalType": "uint128",
1062
- "name": "protocolFeeX",
1063
- "type": "uint128"
1064
- },
1065
- {
1066
- "internalType": "uint128",
1067
- "name": "protocolFeeY",
1068
- "type": "uint128"
1069
- }
1070
- ],
1071
- "stateMutability": "view",
1072
- "type": "function"
1073
- },
1074
- {
1075
- "inputs": [],
1076
- "name": "getReserves",
1077
- "outputs": [
1078
- {
1079
- "internalType": "uint128",
1080
- "name": "reserveX",
1081
- "type": "uint128"
1082
- },
1083
- {
1084
- "internalType": "uint128",
1085
- "name": "reserveY",
1086
- "type": "uint128"
1087
- }
1088
- ],
1089
- "stateMutability": "view",
1090
- "type": "function"
1091
- },
1092
- {
1093
- "inputs": [],
1094
- "name": "getStaticFeeParameters",
1095
- "outputs": [
1096
- {
1097
- "internalType": "uint16",
1098
- "name": "baseFactor",
1099
- "type": "uint16"
1100
- },
1101
- {
1102
- "internalType": "uint16",
1103
- "name": "filterPeriod",
1104
- "type": "uint16"
1105
- },
1106
- {
1107
- "internalType": "uint16",
1108
- "name": "decayPeriod",
1109
- "type": "uint16"
1110
- },
1111
- {
1112
- "internalType": "uint16",
1113
- "name": "reductionFactor",
1114
- "type": "uint16"
1115
- },
1116
- {
1117
- "internalType": "uint24",
1118
- "name": "variableFeeControl",
1119
- "type": "uint24"
1120
- },
1121
- {
1122
- "internalType": "uint16",
1123
- "name": "protocolShare",
1124
- "type": "uint16"
1125
- },
1126
- {
1127
- "internalType": "uint24",
1128
- "name": "maxVolatilityAccumulator",
1129
- "type": "uint24"
1130
- }
1131
- ],
1132
- "stateMutability": "view",
1133
- "type": "function"
1134
- },
1135
- {
1136
- "inputs": [
1137
- {
1138
- "internalType": "uint128",
1139
- "name": "amountOut",
1140
- "type": "uint128"
1141
- },
1142
- {
1143
- "internalType": "bool",
1144
- "name": "swapForY",
1145
- "type": "bool"
1146
- }
1147
- ],
1148
- "name": "getSwapIn",
1149
- "outputs": [
1150
- {
1151
- "internalType": "uint128",
1152
- "name": "amountIn",
1153
- "type": "uint128"
1154
- },
1155
- {
1156
- "internalType": "uint128",
1157
- "name": "amountOutLeft",
1158
- "type": "uint128"
1159
- },
1160
- {
1161
- "internalType": "uint128",
1162
- "name": "fee",
1163
- "type": "uint128"
1164
- }
1165
- ],
1166
- "stateMutability": "view",
1167
- "type": "function"
1168
- },
1169
- {
1170
- "inputs": [
1171
- {
1172
- "internalType": "uint128",
1173
- "name": "amountIn",
1174
- "type": "uint128"
1175
- },
1176
- {
1177
- "internalType": "bool",
1178
- "name": "swapForY",
1179
- "type": "bool"
1180
- }
1181
- ],
1182
- "name": "getSwapOut",
1183
- "outputs": [
1184
- {
1185
- "internalType": "uint128",
1186
- "name": "amountInLeft",
1187
- "type": "uint128"
1188
- },
1189
- {
1190
- "internalType": "uint128",
1191
- "name": "amountOut",
1192
- "type": "uint128"
1193
- },
1194
- {
1195
- "internalType": "uint128",
1196
- "name": "fee",
1197
- "type": "uint128"
1198
- }
1199
- ],
1200
- "stateMutability": "view",
1201
- "type": "function"
1202
- },
1203
- {
1204
- "inputs": [],
1205
- "name": "getTokenX",
1206
- "outputs": [
1207
- {
1208
- "internalType": "contract IERC20",
1209
- "name": "tokenX",
1210
- "type": "address"
1211
- }
1212
- ],
1213
- "stateMutability": "pure",
1214
- "type": "function"
1215
- },
1216
- {
1217
- "inputs": [],
1218
- "name": "getTokenY",
1219
- "outputs": [
1220
- {
1221
- "internalType": "contract IERC20",
1222
- "name": "tokenY",
1223
- "type": "address"
1224
- }
1225
- ],
1226
- "stateMutability": "pure",
1227
- "type": "function"
1228
- },
1229
- {
1230
- "inputs": [],
1231
- "name": "getVariableFeeParameters",
1232
- "outputs": [
1233
- {
1234
- "internalType": "uint24",
1235
- "name": "volatilityAccumulator",
1236
- "type": "uint24"
1237
- },
1238
- {
1239
- "internalType": "uint24",
1240
- "name": "volatilityReference",
1241
- "type": "uint24"
1242
- },
1243
- {
1244
- "internalType": "uint24",
1245
- "name": "idReference",
1246
- "type": "uint24"
1247
- },
1248
- {
1249
- "internalType": "uint40",
1250
- "name": "timeOfLastUpdate",
1251
- "type": "uint40"
1252
- }
1253
- ],
1254
- "stateMutability": "view",
1255
- "type": "function"
1256
- },
1257
- {
1258
- "inputs": [
1259
- {
1260
- "internalType": "uint16",
1261
- "name": "newLength",
1262
- "type": "uint16"
1263
- }
1264
- ],
1265
- "name": "increaseOracleLength",
1266
- "outputs": [],
1267
- "stateMutability": "nonpayable",
1268
- "type": "function"
1269
- },
1270
- {
1271
- "inputs": [
1272
- {
1273
- "internalType": "uint16",
1274
- "name": "baseFactor",
1275
- "type": "uint16"
1276
- },
1277
- {
1278
- "internalType": "uint16",
1279
- "name": "filterPeriod",
1280
- "type": "uint16"
1281
- },
1282
- {
1283
- "internalType": "uint16",
1284
- "name": "decayPeriod",
1285
- "type": "uint16"
1286
- },
1287
- {
1288
- "internalType": "uint16",
1289
- "name": "reductionFactor",
1290
- "type": "uint16"
1291
- },
1292
- {
1293
- "internalType": "uint24",
1294
- "name": "variableFeeControl",
1295
- "type": "uint24"
1296
- },
1297
- {
1298
- "internalType": "uint16",
1299
- "name": "protocolShare",
1300
- "type": "uint16"
1301
- },
1302
- {
1303
- "internalType": "uint24",
1304
- "name": "maxVolatilityAccumulator",
1305
- "type": "uint24"
1306
- },
1307
- {
1308
- "internalType": "uint24",
1309
- "name": "activeId",
1310
- "type": "uint24"
1311
- }
1312
- ],
1313
- "name": "initialize",
1314
- "outputs": [],
1315
- "stateMutability": "nonpayable",
1316
- "type": "function"
1317
- },
1318
- {
1319
- "inputs": [
1320
- {
1321
- "internalType": "address",
1322
- "name": "owner",
1323
- "type": "address"
1324
- },
1325
- {
1326
- "internalType": "address",
1327
- "name": "spender",
1328
- "type": "address"
1329
- }
1330
- ],
1331
- "name": "isApprovedForAll",
1332
- "outputs": [
1333
- {
1334
- "internalType": "bool",
1335
- "name": "",
1336
- "type": "bool"
1337
- }
1338
- ],
1339
- "stateMutability": "view",
1340
- "type": "function"
1341
- },
1342
- {
1343
- "inputs": [
1344
- {
1345
- "internalType": "address",
1346
- "name": "to",
1347
- "type": "address"
1348
- },
1349
- {
1350
- "internalType": "bytes32[]",
1351
- "name": "liquidityConfigs",
1352
- "type": "bytes32[]"
1353
- },
1354
- {
1355
- "internalType": "address",
1356
- "name": "refundTo",
1357
- "type": "address"
1358
- }
1359
- ],
1360
- "name": "mint",
1361
- "outputs": [
1362
- {
1363
- "internalType": "bytes32",
1364
- "name": "amountsReceived",
1365
- "type": "bytes32"
1366
- },
1367
- {
1368
- "internalType": "bytes32",
1369
- "name": "amountsLeft",
1370
- "type": "bytes32"
1371
- },
1372
- {
1373
- "internalType": "uint256[]",
1374
- "name": "liquidityMinted",
1375
- "type": "uint256[]"
1376
- }
1377
- ],
1378
- "stateMutability": "nonpayable",
1379
- "type": "function"
1380
- },
1381
- {
1382
- "inputs": [],
1383
- "name": "name",
1384
- "outputs": [
1385
- {
1386
- "internalType": "string",
1387
- "name": "",
1388
- "type": "string"
1389
- }
1390
- ],
1391
- "stateMutability": "view",
1392
- "type": "function"
1393
- },
1394
- {
1395
- "inputs": [
1396
- {
1397
- "internalType": "uint16",
1398
- "name": "baseFactor",
1399
- "type": "uint16"
1400
- },
1401
- {
1402
- "internalType": "uint16",
1403
- "name": "filterPeriod",
1404
- "type": "uint16"
1405
- },
1406
- {
1407
- "internalType": "uint16",
1408
- "name": "decayPeriod",
1409
- "type": "uint16"
1410
- },
1411
- {
1412
- "internalType": "uint16",
1413
- "name": "reductionFactor",
1414
- "type": "uint16"
1415
- },
1416
- {
1417
- "internalType": "uint24",
1418
- "name": "variableFeeControl",
1419
- "type": "uint24"
1420
- },
1421
- {
1422
- "internalType": "uint16",
1423
- "name": "protocolShare",
1424
- "type": "uint16"
1425
- },
1426
- {
1427
- "internalType": "uint24",
1428
- "name": "maxVolatilityAccumulator",
1429
- "type": "uint24"
1430
- }
1431
- ],
1432
- "name": "setStaticFeeParameters",
1433
- "outputs": [],
1434
- "stateMutability": "nonpayable",
1435
- "type": "function"
1436
- },
1437
- {
1438
- "inputs": [
1439
- {
1440
- "internalType": "bool",
1441
- "name": "swapForY",
1442
- "type": "bool"
1443
- },
1444
- {
1445
- "internalType": "address",
1446
- "name": "to",
1447
- "type": "address"
1448
- }
1449
- ],
1450
- "name": "swap",
1451
- "outputs": [
1452
- {
1453
- "internalType": "bytes32",
1454
- "name": "amountsOut",
1455
- "type": "bytes32"
1456
- }
1457
- ],
1458
- "stateMutability": "nonpayable",
1459
- "type": "function"
1460
- },
1461
- {
1462
- "inputs": [],
1463
- "name": "symbol",
1464
- "outputs": [
1465
- {
1466
- "internalType": "string",
1467
- "name": "",
1468
- "type": "string"
1469
- }
1470
- ],
1471
- "stateMutability": "view",
1472
- "type": "function"
1473
- },
1474
- {
1475
- "inputs": [
1476
- {
1477
- "internalType": "uint256",
1478
- "name": "id",
1479
- "type": "uint256"
1480
- }
1481
- ],
1482
- "name": "totalSupply",
1483
- "outputs": [
1484
- {
1485
- "internalType": "uint256",
1486
- "name": "",
1487
- "type": "uint256"
1488
- }
1489
- ],
1490
- "stateMutability": "view",
1491
- "type": "function"
1492
- }
1493
- ]