@logswap/sdk 0.5.35

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 (53) hide show
  1. package/README.md +130 -0
  2. package/dist/actions.d.ts +136 -0
  3. package/dist/actions.js +140 -0
  4. package/dist/admin.d.ts +11 -0
  5. package/dist/admin.js +29 -0
  6. package/dist/claims.d.ts +53 -0
  7. package/dist/claims.js +98 -0
  8. package/dist/client.d.ts +68 -0
  9. package/dist/client.js +68 -0
  10. package/dist/fpool.d.ts +416 -0
  11. package/dist/fpool.js +653 -0
  12. package/dist/generated.d.ts +6522 -0
  13. package/dist/generated.js +3755 -0
  14. package/dist/ids.d.ts +42 -0
  15. package/dist/ids.js +72 -0
  16. package/dist/index.d.ts +23 -0
  17. package/dist/index.js +23 -0
  18. package/dist/indexer.d.ts +91 -0
  19. package/dist/indexer.js +197 -0
  20. package/dist/keys.d.ts +40 -0
  21. package/dist/keys.js +50 -0
  22. package/dist/liquidity.d.ts +223 -0
  23. package/dist/liquidity.js +305 -0
  24. package/dist/onboard.d.ts +56 -0
  25. package/dist/onboard.js +188 -0
  26. package/dist/pools.d.ts +182 -0
  27. package/dist/pools.js +322 -0
  28. package/dist/positions.d.ts +164 -0
  29. package/dist/positions.js +197 -0
  30. package/dist/swap.d.ts +68 -0
  31. package/dist/swap.js +91 -0
  32. package/dist/tokencache.d.ts +76 -0
  33. package/dist/tokencache.js +150 -0
  34. package/dist/write.d.ts +86 -0
  35. package/dist/write.js +106 -0
  36. package/package.json +48 -0
  37. package/src/actions.ts +207 -0
  38. package/src/admin.ts +33 -0
  39. package/src/claims.ts +132 -0
  40. package/src/client.ts +104 -0
  41. package/src/fpool.ts +935 -0
  42. package/src/generated.ts +3762 -0
  43. package/src/ids.ts +78 -0
  44. package/src/index.ts +23 -0
  45. package/src/indexer.ts +252 -0
  46. package/src/keys.ts +73 -0
  47. package/src/liquidity.ts +430 -0
  48. package/src/onboard.ts +228 -0
  49. package/src/pools.ts +396 -0
  50. package/src/positions.ts +276 -0
  51. package/src/swap.ts +140 -0
  52. package/src/tokencache.ts +169 -0
  53. package/src/write.ts +134 -0
@@ -0,0 +1,3762 @@
1
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2
+ // CPoolManager
3
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4
+
5
+ export const cPoolManagerAbi = [
6
+ {
7
+ type: 'constructor',
8
+ inputs: [
9
+ { name: '_feeCollector', internalType: 'address', type: 'address' },
10
+ ],
11
+ stateMutability: 'nonpayable',
12
+ },
13
+ {
14
+ type: 'function',
15
+ inputs: [],
16
+ name: 'PROTOCOL_FEE_CUT',
17
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
18
+ stateMutability: 'view',
19
+ },
20
+ {
21
+ type: 'function',
22
+ inputs: [],
23
+ name: 'acceptCollector',
24
+ outputs: [],
25
+ stateMutability: 'nonpayable',
26
+ },
27
+ {
28
+ type: 'function',
29
+ inputs: [
30
+ { name: 'owner', internalType: 'address', type: 'address' },
31
+ { name: 'spender', internalType: 'address', type: 'address' },
32
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
33
+ ],
34
+ name: 'allowance',
35
+ outputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
36
+ stateMutability: 'view',
37
+ },
38
+ {
39
+ type: 'function',
40
+ inputs: [
41
+ { name: 'spender', internalType: 'address', type: 'address' },
42
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
43
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
44
+ ],
45
+ name: 'approve',
46
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
47
+ stateMutability: 'payable',
48
+ },
49
+ {
50
+ type: 'function',
51
+ inputs: [
52
+ { name: 'owner', internalType: 'address', type: 'address' },
53
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
54
+ ],
55
+ name: 'balanceOf',
56
+ outputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
57
+ stateMutability: 'view',
58
+ },
59
+ {
60
+ type: 'function',
61
+ inputs: [
62
+ {
63
+ name: 'key',
64
+ internalType: 'struct PoolKey',
65
+ type: 'tuple',
66
+ components: [
67
+ { name: 'base', internalType: 'address', type: 'address' },
68
+ { name: 'quote', internalType: 'address', type: 'address' },
69
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
70
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
71
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
72
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
73
+ ],
74
+ },
75
+ { name: 'owner', internalType: 'address', type: 'address' },
76
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
77
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
78
+ { name: 'to', internalType: 'address', type: 'address' },
79
+ ],
80
+ name: 'burnById',
81
+ outputs: [
82
+ { name: 'dBase', internalType: 'uint256', type: 'uint256' },
83
+ { name: 'dQuote', internalType: 'uint256', type: 'uint256' },
84
+ ],
85
+ stateMutability: 'nonpayable',
86
+ },
87
+ {
88
+ type: 'function',
89
+ inputs: [
90
+ { name: 'token', internalType: 'address', type: 'address' },
91
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
92
+ ],
93
+ name: 'burnClaims',
94
+ outputs: [],
95
+ stateMutability: 'nonpayable',
96
+ },
97
+ {
98
+ type: 'function',
99
+ inputs: [
100
+ {
101
+ name: 'key',
102
+ internalType: 'struct PoolKey',
103
+ type: 'tuple',
104
+ components: [
105
+ { name: 'base', internalType: 'address', type: 'address' },
106
+ { name: 'quote', internalType: 'address', type: 'address' },
107
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
108
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
109
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
110
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
111
+ ],
112
+ },
113
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
114
+ { name: 'to', internalType: 'address', type: 'address' },
115
+ ],
116
+ name: 'claimById',
117
+ outputs: [{ name: 'fees', internalType: 'uint256', type: 'uint256' }],
118
+ stateMutability: 'nonpayable',
119
+ },
120
+ {
121
+ type: 'function',
122
+ inputs: [{ name: 'token', internalType: 'address', type: 'address' }],
123
+ name: 'claimIdOf',
124
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
125
+ stateMutability: 'pure',
126
+ },
127
+ {
128
+ type: 'function',
129
+ inputs: [
130
+ {
131
+ name: 'key',
132
+ internalType: 'struct PoolKey',
133
+ type: 'tuple',
134
+ components: [
135
+ { name: 'base', internalType: 'address', type: 'address' },
136
+ { name: 'quote', internalType: 'address', type: 'address' },
137
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
138
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
139
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
140
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
141
+ ],
142
+ },
143
+ { name: 'owner', internalType: 'address', type: 'address' },
144
+ { name: 'idList', internalType: 'uint256[]', type: 'uint256[]' },
145
+ { name: 'to', internalType: 'address', type: 'address' },
146
+ ],
147
+ name: 'claimManyFor',
148
+ outputs: [{ name: 'total', internalType: 'uint256', type: 'uint256' }],
149
+ stateMutability: 'nonpayable',
150
+ },
151
+ {
152
+ type: 'function',
153
+ inputs: [{ name: '', internalType: 'address', type: 'address' }],
154
+ name: 'claimsOutstanding',
155
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
156
+ stateMutability: 'view',
157
+ },
158
+ {
159
+ type: 'function',
160
+ inputs: [
161
+ {
162
+ name: 'key',
163
+ internalType: 'struct PoolKey',
164
+ type: 'tuple',
165
+ components: [
166
+ { name: 'base', internalType: 'address', type: 'address' },
167
+ { name: 'quote', internalType: 'address', type: 'address' },
168
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
169
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
170
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
171
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
172
+ ],
173
+ },
174
+ { name: 'to', internalType: 'address', type: 'address' },
175
+ ],
176
+ name: 'collectProtocolFees',
177
+ outputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
178
+ stateMutability: 'nonpayable',
179
+ },
180
+ {
181
+ type: 'function',
182
+ inputs: [{ name: 'id', internalType: 'uint256', type: 'uint256' }],
183
+ name: 'decimals',
184
+ outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
185
+ stateMutability: 'view',
186
+ },
187
+ {
188
+ type: 'function',
189
+ inputs: [
190
+ { name: 'token', internalType: 'address', type: 'address' },
191
+ { name: 'target', internalType: 'address', type: 'address' },
192
+ ],
193
+ name: 'deltaOf',
194
+ outputs: [{ name: '', internalType: 'int256', type: 'int256' }],
195
+ stateMutability: 'view',
196
+ },
197
+ {
198
+ type: 'function',
199
+ inputs: [
200
+ { name: '', internalType: 'uint256', type: 'uint256' },
201
+ { name: '', internalType: 'address', type: 'address' },
202
+ ],
203
+ name: 'feeAcct',
204
+ outputs: [
205
+ { name: 'owed', internalType: 'uint128', type: 'uint128' },
206
+ { name: 'debt', internalType: 'uint128', type: 'uint128' },
207
+ ],
208
+ stateMutability: 'view',
209
+ },
210
+ {
211
+ type: 'function',
212
+ inputs: [],
213
+ name: 'feeCollector',
214
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
215
+ stateMutability: 'view',
216
+ },
217
+ {
218
+ type: 'function',
219
+ inputs: [{ name: 'pid', internalType: 'bytes32', type: 'bytes32' }],
220
+ name: 'getPool',
221
+ outputs: [
222
+ {
223
+ name: 'v',
224
+ internalType: 'struct CPoolManager.PoolView',
225
+ type: 'tuple',
226
+ components: [
227
+ { name: 'initialized', internalType: 'bool', type: 'bool' },
228
+ { name: 'backstopSeeded', internalType: 'bool', type: 'bool' },
229
+ { name: 'x', internalType: 'int256', type: 'int256' },
230
+ { name: 'lActive', internalType: 'uint256', type: 'uint256' },
231
+ { name: 'reserveBase', internalType: 'uint256', type: 'uint256' },
232
+ { name: 'reserveQuote', internalType: 'uint256', type: 'uint256' },
233
+ { name: 'F', internalType: 'uint256', type: 'uint256' },
234
+ { name: 'bigSigma', internalType: 'uint256', type: 'uint256' },
235
+ { name: 'sigma2Ema', internalType: 'uint256', type: 'uint256' },
236
+ { name: 'currentK', internalType: 'int256', type: 'int256' },
237
+ { name: 'protocolOwed', internalType: 'uint256', type: 'uint256' },
238
+ { name: 'minBackstopL', internalType: 'uint256', type: 'uint256' },
239
+ { name: 'backstopFloor', internalType: 'int256', type: 'int256' },
240
+ ],
241
+ },
242
+ ],
243
+ stateMutability: 'view',
244
+ },
245
+ {
246
+ type: 'function',
247
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
248
+ name: 'idInfo',
249
+ outputs: [
250
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
251
+ { name: 'packed', internalType: 'uint64', type: 'uint64' },
252
+ ],
253
+ stateMutability: 'view',
254
+ },
255
+ {
256
+ type: 'function',
257
+ inputs: [
258
+ {
259
+ name: 'key',
260
+ internalType: 'struct PoolKey',
261
+ type: 'tuple',
262
+ components: [
263
+ { name: 'base', internalType: 'address', type: 'address' },
264
+ { name: 'quote', internalType: 'address', type: 'address' },
265
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
266
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
267
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
268
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
269
+ ],
270
+ },
271
+ { name: 'floor', internalType: 'int256', type: 'int256' },
272
+ ],
273
+ name: 'idOf',
274
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
275
+ stateMutability: 'pure',
276
+ },
277
+ {
278
+ type: 'function',
279
+ inputs: [
280
+ {
281
+ name: 'key',
282
+ internalType: 'struct PoolKey',
283
+ type: 'tuple',
284
+ components: [
285
+ { name: 'base', internalType: 'address', type: 'address' },
286
+ { name: 'quote', internalType: 'address', type: 'address' },
287
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
288
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
289
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
290
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
291
+ ],
292
+ },
293
+ { name: 'floor', internalType: 'int256', type: 'int256' },
294
+ { name: 'cap', internalType: 'int256', type: 'int256' },
295
+ ],
296
+ name: 'idOf',
297
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
298
+ stateMutability: 'pure',
299
+ },
300
+ {
301
+ type: 'function',
302
+ inputs: [
303
+ {
304
+ name: 'key',
305
+ internalType: 'struct PoolKey',
306
+ type: 'tuple',
307
+ components: [
308
+ { name: 'base', internalType: 'address', type: 'address' },
309
+ { name: 'quote', internalType: 'address', type: 'address' },
310
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
311
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
312
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
313
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
314
+ ],
315
+ },
316
+ { name: 'x0', internalType: 'int256', type: 'int256' },
317
+ ],
318
+ name: 'initialize',
319
+ outputs: [{ name: 'pid', internalType: 'bytes32', type: 'bytes32' }],
320
+ stateMutability: 'nonpayable',
321
+ },
322
+ {
323
+ type: 'function',
324
+ inputs: [
325
+ { name: 'owner', internalType: 'address', type: 'address' },
326
+ { name: 'spender', internalType: 'address', type: 'address' },
327
+ ],
328
+ name: 'isOperator',
329
+ outputs: [{ name: 'status', internalType: 'bool', type: 'bool' }],
330
+ stateMutability: 'view',
331
+ },
332
+ {
333
+ type: 'function',
334
+ inputs: [],
335
+ name: 'isUnlocked',
336
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
337
+ stateMutability: 'view',
338
+ },
339
+ {
340
+ type: 'function',
341
+ inputs: [
342
+ {
343
+ name: 'key',
344
+ internalType: 'struct PoolKey',
345
+ type: 'tuple',
346
+ components: [
347
+ { name: 'base', internalType: 'address', type: 'address' },
348
+ { name: 'quote', internalType: 'address', type: 'address' },
349
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
350
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
351
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
352
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
353
+ ],
354
+ },
355
+ { name: 'floor', internalType: 'int256', type: 'int256' },
356
+ { name: 'cap', internalType: 'int256', type: 'int256' },
357
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
358
+ { name: 'to', internalType: 'address', type: 'address' },
359
+ ],
360
+ name: 'mint',
361
+ outputs: [{ name: 'shares', internalType: 'uint256', type: 'uint256' }],
362
+ stateMutability: 'nonpayable',
363
+ },
364
+ {
365
+ type: 'function',
366
+ inputs: [
367
+ { name: 'token', internalType: 'address', type: 'address' },
368
+ { name: 'to', internalType: 'address', type: 'address' },
369
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
370
+ ],
371
+ name: 'mintClaims',
372
+ outputs: [],
373
+ stateMutability: 'nonpayable',
374
+ },
375
+ {
376
+ type: 'function',
377
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
378
+ name: 'name',
379
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
380
+ stateMutability: 'pure',
381
+ },
382
+ {
383
+ type: 'function',
384
+ inputs: [],
385
+ name: 'nonzeroDeltaCount',
386
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
387
+ stateMutability: 'view',
388
+ },
389
+ {
390
+ type: 'function',
391
+ inputs: [],
392
+ name: 'pendingCollector',
393
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
394
+ stateMutability: 'view',
395
+ },
396
+ {
397
+ type: 'function',
398
+ inputs: [
399
+ {
400
+ name: 'key',
401
+ internalType: 'struct PoolKey',
402
+ type: 'tuple',
403
+ components: [
404
+ { name: 'base', internalType: 'address', type: 'address' },
405
+ { name: 'quote', internalType: 'address', type: 'address' },
406
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
407
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
408
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
409
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
410
+ ],
411
+ },
412
+ ],
413
+ name: 'phiEff',
414
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
415
+ stateMutability: 'view',
416
+ },
417
+ {
418
+ type: 'function',
419
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
420
+ name: 'positions',
421
+ outputs: [
422
+ { name: 'L', internalType: 'uint128', type: 'uint128' },
423
+ { name: 'shares', internalType: 'uint128', type: 'uint128' },
424
+ { name: 'aps', internalType: 'uint128', type: 'uint128' },
425
+ { name: 'insideLast', internalType: 'int128', type: 'int128' },
426
+ ],
427
+ stateMutability: 'view',
428
+ },
429
+ {
430
+ type: 'function',
431
+ inputs: [{ name: 'next', internalType: 'address', type: 'address' }],
432
+ name: 'proposeCollector',
433
+ outputs: [],
434
+ stateMutability: 'nonpayable',
435
+ },
436
+ {
437
+ type: 'function',
438
+ inputs: [
439
+ {
440
+ name: 'key',
441
+ internalType: 'struct PoolKey',
442
+ type: 'tuple',
443
+ components: [
444
+ { name: 'base', internalType: 'address', type: 'address' },
445
+ { name: 'quote', internalType: 'address', type: 'address' },
446
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
447
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
448
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
449
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
450
+ ],
451
+ },
452
+ { name: 'exactIn', internalType: 'bool', type: 'bool' },
453
+ { name: 'baseSide', internalType: 'bool', type: 'bool' },
454
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
455
+ ],
456
+ name: 'quoteSwap',
457
+ outputs: [],
458
+ stateMutability: 'nonpayable',
459
+ },
460
+ {
461
+ type: 'function',
462
+ inputs: [
463
+ { name: 'operator', internalType: 'address', type: 'address' },
464
+ { name: 'approved', internalType: 'bool', type: 'bool' },
465
+ ],
466
+ name: 'setOperator',
467
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
468
+ stateMutability: 'payable',
469
+ },
470
+ {
471
+ type: 'function',
472
+ inputs: [{ name: 'cut', internalType: 'uint256', type: 'uint256' }],
473
+ name: 'setProtocolFeeCut',
474
+ outputs: [],
475
+ stateMutability: 'nonpayable',
476
+ },
477
+ {
478
+ type: 'function',
479
+ inputs: [],
480
+ name: 'settle',
481
+ outputs: [{ name: 'paid', internalType: 'uint256', type: 'uint256' }],
482
+ stateMutability: 'nonpayable',
483
+ },
484
+ {
485
+ type: 'function',
486
+ inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }],
487
+ name: 'supportsInterface',
488
+ outputs: [{ name: 'result', internalType: 'bool', type: 'bool' }],
489
+ stateMutability: 'view',
490
+ },
491
+ {
492
+ type: 'function',
493
+ inputs: [
494
+ {
495
+ name: 'key',
496
+ internalType: 'struct PoolKey',
497
+ type: 'tuple',
498
+ components: [
499
+ { name: 'base', internalType: 'address', type: 'address' },
500
+ { name: 'quote', internalType: 'address', type: 'address' },
501
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
502
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
503
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
504
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
505
+ ],
506
+ },
507
+ { name: 'baseSide', internalType: 'bool', type: 'bool' },
508
+ { name: 'amountSpecified', internalType: 'int256', type: 'int256' },
509
+ { name: 'limit', internalType: 'uint256', type: 'uint256' },
510
+ ],
511
+ name: 'swap',
512
+ outputs: [
513
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
514
+ { name: 'amountOut', internalType: 'uint256', type: 'uint256' },
515
+ ],
516
+ stateMutability: 'nonpayable',
517
+ },
518
+ {
519
+ type: 'function',
520
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
521
+ name: 'symbol',
522
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
523
+ stateMutability: 'pure',
524
+ },
525
+ {
526
+ type: 'function',
527
+ inputs: [{ name: 'token', internalType: 'address', type: 'address' }],
528
+ name: 'sync',
529
+ outputs: [],
530
+ stateMutability: 'nonpayable',
531
+ },
532
+ {
533
+ type: 'function',
534
+ inputs: [
535
+ { name: 'token', internalType: 'address', type: 'address' },
536
+ { name: 'to', internalType: 'address', type: 'address' },
537
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
538
+ ],
539
+ name: 'take',
540
+ outputs: [],
541
+ stateMutability: 'nonpayable',
542
+ },
543
+ {
544
+ type: 'function',
545
+ inputs: [
546
+ { name: 'pid', internalType: 'bytes32', type: 'bytes32' },
547
+ { name: 'wordPos', internalType: 'int256', type: 'int256' },
548
+ ],
549
+ name: 'tickBitmapWord',
550
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
551
+ stateMutability: 'view',
552
+ },
553
+ {
554
+ type: 'function',
555
+ inputs: [
556
+ { name: 'pid', internalType: 'bytes32', type: 'bytes32' },
557
+ { name: 'k', internalType: 'int256', type: 'int256' },
558
+ ],
559
+ name: 'ticks',
560
+ outputs: [
561
+ { name: 'dL', internalType: 'int128', type: 'int128' },
562
+ { name: 'fOutside', internalType: 'uint96', type: 'uint96' },
563
+ { name: 'refs', internalType: 'uint32', type: 'uint32' },
564
+ ],
565
+ stateMutability: 'view',
566
+ },
567
+ {
568
+ type: 'function',
569
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
570
+ name: 'tokenURI',
571
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
572
+ stateMutability: 'pure',
573
+ },
574
+ {
575
+ type: 'function',
576
+ inputs: [
577
+ { name: 'to', internalType: 'address', type: 'address' },
578
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
579
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
580
+ ],
581
+ name: 'transfer',
582
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
583
+ stateMutability: 'payable',
584
+ },
585
+ {
586
+ type: 'function',
587
+ inputs: [
588
+ { name: 'from', internalType: 'address', type: 'address' },
589
+ { name: 'to', internalType: 'address', type: 'address' },
590
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
591
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
592
+ ],
593
+ name: 'transferFrom',
594
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
595
+ stateMutability: 'payable',
596
+ },
597
+ {
598
+ type: 'function',
599
+ inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
600
+ name: 'unlock',
601
+ outputs: [{ name: 'result', internalType: 'bytes', type: 'bytes' }],
602
+ stateMutability: 'nonpayable',
603
+ },
604
+ {
605
+ type: 'function',
606
+ inputs: [
607
+ {
608
+ name: 'key',
609
+ internalType: 'struct PoolKey',
610
+ type: 'tuple',
611
+ components: [
612
+ { name: 'base', internalType: 'address', type: 'address' },
613
+ { name: 'quote', internalType: 'address', type: 'address' },
614
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
615
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
616
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
617
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
618
+ ],
619
+ },
620
+ { name: 'owner', internalType: 'address', type: 'address' },
621
+ { name: 'fromId', internalType: 'uint256', type: 'uint256' },
622
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
623
+ { name: 'toFloor', internalType: 'int256', type: 'int256' },
624
+ { name: 'toCap', internalType: 'int256', type: 'int256' },
625
+ { name: 'newL', internalType: 'uint256', type: 'uint256' },
626
+ { name: 'to', internalType: 'address', type: 'address' },
627
+ ],
628
+ name: 'update',
629
+ outputs: [
630
+ { name: 'dBase', internalType: 'int256', type: 'int256' },
631
+ { name: 'dQuote', internalType: 'int256', type: 'int256' },
632
+ { name: 'newShares', internalType: 'uint256', type: 'uint256' },
633
+ ],
634
+ stateMutability: 'nonpayable',
635
+ },
636
+ {
637
+ type: 'function',
638
+ inputs: [],
639
+ name: 'version',
640
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
641
+ stateMutability: 'pure',
642
+ },
643
+ {
644
+ type: 'event',
645
+ anonymous: false,
646
+ inputs: [
647
+ {
648
+ name: 'owner',
649
+ internalType: 'address',
650
+ type: 'address',
651
+ indexed: true,
652
+ },
653
+ {
654
+ name: 'spender',
655
+ internalType: 'address',
656
+ type: 'address',
657
+ indexed: true,
658
+ },
659
+ { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
660
+ {
661
+ name: 'amount',
662
+ internalType: 'uint256',
663
+ type: 'uint256',
664
+ indexed: false,
665
+ },
666
+ ],
667
+ name: 'Approval',
668
+ },
669
+ {
670
+ type: 'event',
671
+ anonymous: false,
672
+ inputs: [
673
+ {
674
+ name: 'poolId',
675
+ internalType: 'bytes32',
676
+ type: 'bytes32',
677
+ indexed: true,
678
+ },
679
+ { name: 'floor', internalType: 'int256', type: 'int256', indexed: true },
680
+ {
681
+ name: 'shares',
682
+ internalType: 'uint256',
683
+ type: 'uint256',
684
+ indexed: false,
685
+ },
686
+ ],
687
+ name: 'BackstopSeeded',
688
+ },
689
+ {
690
+ type: 'event',
691
+ anonymous: false,
692
+ inputs: [
693
+ { name: 'from', internalType: 'address', type: 'address', indexed: true },
694
+ { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
695
+ {
696
+ name: 'shares',
697
+ internalType: 'uint256',
698
+ type: 'uint256',
699
+ indexed: false,
700
+ },
701
+ {
702
+ name: 'dBase',
703
+ internalType: 'uint256',
704
+ type: 'uint256',
705
+ indexed: false,
706
+ },
707
+ {
708
+ name: 'dQuote',
709
+ internalType: 'uint256',
710
+ type: 'uint256',
711
+ indexed: false,
712
+ },
713
+ ],
714
+ name: 'Burn',
715
+ },
716
+ {
717
+ type: 'event',
718
+ anonymous: false,
719
+ inputs: [
720
+ {
721
+ name: 'holder',
722
+ internalType: 'address',
723
+ type: 'address',
724
+ indexed: true,
725
+ },
726
+ { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
727
+ {
728
+ name: 'fees',
729
+ internalType: 'uint256',
730
+ type: 'uint256',
731
+ indexed: false,
732
+ },
733
+ ],
734
+ name: 'Claim',
735
+ },
736
+ {
737
+ type: 'event',
738
+ anonymous: false,
739
+ inputs: [
740
+ {
741
+ name: 'previous',
742
+ internalType: 'address',
743
+ type: 'address',
744
+ indexed: true,
745
+ },
746
+ {
747
+ name: 'current',
748
+ internalType: 'address',
749
+ type: 'address',
750
+ indexed: true,
751
+ },
752
+ ],
753
+ name: 'CollectorAccepted',
754
+ },
755
+ {
756
+ type: 'event',
757
+ anonymous: false,
758
+ inputs: [
759
+ {
760
+ name: 'current',
761
+ internalType: 'address',
762
+ type: 'address',
763
+ indexed: true,
764
+ },
765
+ {
766
+ name: 'proposed',
767
+ internalType: 'address',
768
+ type: 'address',
769
+ indexed: true,
770
+ },
771
+ ],
772
+ name: 'CollectorProposed',
773
+ },
774
+ {
775
+ type: 'event',
776
+ anonymous: false,
777
+ inputs: [
778
+ { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
779
+ {
780
+ name: 'poolId',
781
+ internalType: 'bytes32',
782
+ type: 'bytes32',
783
+ indexed: true,
784
+ },
785
+ { name: 'floor', internalType: 'int256', type: 'int256', indexed: false },
786
+ { name: 'cap', internalType: 'int256', type: 'int256', indexed: false },
787
+ { name: 'capped', internalType: 'bool', type: 'bool', indexed: false },
788
+ ],
789
+ name: 'IdRegistered',
790
+ },
791
+ {
792
+ type: 'event',
793
+ anonymous: false,
794
+ inputs: [
795
+ {
796
+ name: 'poolId',
797
+ internalType: 'bytes32',
798
+ type: 'bytes32',
799
+ indexed: true,
800
+ },
801
+ { name: 'base', internalType: 'address', type: 'address', indexed: true },
802
+ {
803
+ name: 'quote',
804
+ internalType: 'address',
805
+ type: 'address',
806
+ indexed: true,
807
+ },
808
+ {
809
+ name: 'tickSpacing',
810
+ internalType: 'int256',
811
+ type: 'int256',
812
+ indexed: false,
813
+ },
814
+ {
815
+ name: 'phiMin',
816
+ internalType: 'uint256',
817
+ type: 'uint256',
818
+ indexed: false,
819
+ },
820
+ {
821
+ name: 'kappa',
822
+ internalType: 'uint256',
823
+ type: 'uint256',
824
+ indexed: false,
825
+ },
826
+ {
827
+ name: 'alpha',
828
+ internalType: 'uint256',
829
+ type: 'uint256',
830
+ indexed: false,
831
+ },
832
+ { name: 'x0', internalType: 'int256', type: 'int256', indexed: false },
833
+ ],
834
+ name: 'Initialize',
835
+ },
836
+ {
837
+ type: 'event',
838
+ anonymous: false,
839
+ inputs: [
840
+ { name: 'to', internalType: 'address', type: 'address', indexed: true },
841
+ { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
842
+ {
843
+ name: 'shares',
844
+ internalType: 'uint256',
845
+ type: 'uint256',
846
+ indexed: false,
847
+ },
848
+ {
849
+ name: 'dBase',
850
+ internalType: 'uint256',
851
+ type: 'uint256',
852
+ indexed: false,
853
+ },
854
+ {
855
+ name: 'dQuote',
856
+ internalType: 'uint256',
857
+ type: 'uint256',
858
+ indexed: false,
859
+ },
860
+ ],
861
+ name: 'Mint',
862
+ },
863
+ {
864
+ type: 'event',
865
+ anonymous: false,
866
+ inputs: [
867
+ {
868
+ name: 'owner',
869
+ internalType: 'address',
870
+ type: 'address',
871
+ indexed: true,
872
+ },
873
+ {
874
+ name: 'operator',
875
+ internalType: 'address',
876
+ type: 'address',
877
+ indexed: true,
878
+ },
879
+ { name: 'approved', internalType: 'bool', type: 'bool', indexed: false },
880
+ ],
881
+ name: 'OperatorSet',
882
+ },
883
+ {
884
+ type: 'event',
885
+ anonymous: false,
886
+ inputs: [
887
+ { name: 'cut', internalType: 'uint256', type: 'uint256', indexed: false },
888
+ ],
889
+ name: 'ProtocolFeeCutSet',
890
+ },
891
+ {
892
+ type: 'event',
893
+ anonymous: false,
894
+ inputs: [
895
+ {
896
+ name: 'poolId',
897
+ internalType: 'bytes32',
898
+ type: 'bytes32',
899
+ indexed: true,
900
+ },
901
+ { name: 'to', internalType: 'address', type: 'address', indexed: true },
902
+ {
903
+ name: 'amount',
904
+ internalType: 'uint256',
905
+ type: 'uint256',
906
+ indexed: false,
907
+ },
908
+ ],
909
+ name: 'ProtocolFeesCollected',
910
+ },
911
+ {
912
+ type: 'event',
913
+ anonymous: false,
914
+ inputs: [
915
+ {
916
+ name: 'poolId',
917
+ internalType: 'bytes32',
918
+ type: 'bytes32',
919
+ indexed: true,
920
+ },
921
+ {
922
+ name: 'sender',
923
+ internalType: 'address',
924
+ type: 'address',
925
+ indexed: true,
926
+ },
927
+ { name: 'baseIn', internalType: 'bool', type: 'bool', indexed: false },
928
+ {
929
+ name: 'amountIn',
930
+ internalType: 'uint256',
931
+ type: 'uint256',
932
+ indexed: false,
933
+ },
934
+ {
935
+ name: 'amountOut',
936
+ internalType: 'uint256',
937
+ type: 'uint256',
938
+ indexed: false,
939
+ },
940
+ { name: 'newX', internalType: 'int256', type: 'int256', indexed: false },
941
+ { name: 'phi', internalType: 'uint256', type: 'uint256', indexed: false },
942
+ { name: 'F', internalType: 'uint256', type: 'uint256', indexed: false },
943
+ {
944
+ name: 'bigSigma',
945
+ internalType: 'uint256',
946
+ type: 'uint256',
947
+ indexed: false,
948
+ },
949
+ ],
950
+ name: 'Swap',
951
+ },
952
+ {
953
+ type: 'event',
954
+ anonymous: false,
955
+ inputs: [
956
+ {
957
+ name: 'poolId',
958
+ internalType: 'bytes32',
959
+ type: 'bytes32',
960
+ indexed: true,
961
+ },
962
+ { name: 'tick', internalType: 'int256', type: 'int256', indexed: true },
963
+ { name: 'up', internalType: 'bool', type: 'bool', indexed: false },
964
+ {
965
+ name: 'newLActive',
966
+ internalType: 'uint256',
967
+ type: 'uint256',
968
+ indexed: false,
969
+ },
970
+ ],
971
+ name: 'TickCross',
972
+ },
973
+ {
974
+ type: 'event',
975
+ anonymous: false,
976
+ inputs: [
977
+ { name: 'by', internalType: 'address', type: 'address', indexed: false },
978
+ { name: 'from', internalType: 'address', type: 'address', indexed: true },
979
+ { name: 'to', internalType: 'address', type: 'address', indexed: true },
980
+ { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
981
+ {
982
+ name: 'amount',
983
+ internalType: 'uint256',
984
+ type: 'uint256',
985
+ indexed: false,
986
+ },
987
+ ],
988
+ name: 'Transfer',
989
+ },
990
+ {
991
+ type: 'event',
992
+ anonymous: false,
993
+ inputs: [
994
+ {
995
+ name: 'holder',
996
+ internalType: 'address',
997
+ type: 'address',
998
+ indexed: true,
999
+ },
1000
+ {
1001
+ name: 'fromId',
1002
+ internalType: 'uint256',
1003
+ type: 'uint256',
1004
+ indexed: true,
1005
+ },
1006
+ { name: 'toId', internalType: 'uint256', type: 'uint256', indexed: true },
1007
+ {
1008
+ name: 'oldL',
1009
+ internalType: 'uint256',
1010
+ type: 'uint256',
1011
+ indexed: false,
1012
+ },
1013
+ {
1014
+ name: 'newL',
1015
+ internalType: 'uint256',
1016
+ type: 'uint256',
1017
+ indexed: false,
1018
+ },
1019
+ { name: 'dBase', internalType: 'int256', type: 'int256', indexed: false },
1020
+ {
1021
+ name: 'dQuote',
1022
+ internalType: 'int256',
1023
+ type: 'int256',
1024
+ indexed: false,
1025
+ },
1026
+ ],
1027
+ name: 'Update',
1028
+ },
1029
+ { type: 'error', inputs: [], name: 'AlreadyUnlocked' },
1030
+ { type: 'error', inputs: [], name: 'BackstopMustBeUncapped' },
1031
+ { type: 'error', inputs: [], name: 'BackstopTooSmall' },
1032
+ { type: 'error', inputs: [], name: 'BadCap' },
1033
+ { type: 'error', inputs: [], name: 'BadParam' },
1034
+ { type: 'error', inputs: [], name: 'BalanceOverflow' },
1035
+ { type: 'error', inputs: [], name: 'BelowFloor' },
1036
+ { type: 'error', inputs: [], name: 'CappedOut' },
1037
+ { type: 'error', inputs: [], name: 'DrainedToFloor' },
1038
+ { type: 'error', inputs: [], name: 'DrainsBase' },
1039
+ { type: 'error', inputs: [], name: 'IdenticalTokens' },
1040
+ { type: 'error', inputs: [], name: 'InsufficientBalance' },
1041
+ { type: 'error', inputs: [], name: 'InsufficientPermission' },
1042
+ { type: 'error', inputs: [], name: 'InsufficientQuote' },
1043
+ { type: 'error', inputs: [], name: 'InvalidShares' },
1044
+ { type: 'error', inputs: [], name: 'InvalidToken' },
1045
+ { type: 'error', inputs: [], name: 'NoLiquidity' },
1046
+ { type: 'error', inputs: [], name: 'NotAuthorized' },
1047
+ { type: 'error', inputs: [], name: 'NotCollector' },
1048
+ { type: 'error', inputs: [], name: 'OffGrid' },
1049
+ { type: 'error', inputs: [], name: 'PoolAlreadyInitialized' },
1050
+ { type: 'error', inputs: [], name: 'PoolLocked' },
1051
+ { type: 'error', inputs: [], name: 'PoolNotInitialized' },
1052
+ { type: 'error', inputs: [], name: 'PriceOutOfRange' },
1053
+ {
1054
+ type: 'error',
1055
+ inputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
1056
+ name: 'QuoteResult',
1057
+ },
1058
+ { type: 'error', inputs: [], name: 'ReserveNotRepresentable' },
1059
+ { type: 'error', inputs: [], name: 'Slippage' },
1060
+ { type: 'error', inputs: [], name: 'SpacingZero' },
1061
+ { type: 'error', inputs: [], name: 'SyncAlreadyOpen' },
1062
+ { type: 'error', inputs: [], name: 'TokensNotSettled' },
1063
+ { type: 'error', inputs: [], name: 'TransferShortfall' },
1064
+ { type: 'error', inputs: [], name: 'WrongPool' },
1065
+ { type: 'error', inputs: [], name: 'ZeroAmount' },
1066
+ { type: 'error', inputs: [], name: 'ZeroExposure' },
1067
+ { type: 'error', inputs: [], name: 'ZeroShares' },
1068
+ ] as const
1069
+
1070
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1071
+ // FPoolManager
1072
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1073
+
1074
+ export const fPoolManagerAbi = [
1075
+ {
1076
+ type: 'constructor',
1077
+ inputs: [
1078
+ { name: '_feeCollector', internalType: 'address', type: 'address' },
1079
+ ],
1080
+ stateMutability: 'nonpayable',
1081
+ },
1082
+ {
1083
+ type: 'function',
1084
+ inputs: [],
1085
+ name: 'FEE_MIN',
1086
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1087
+ stateMutability: 'view',
1088
+ },
1089
+ {
1090
+ type: 'function',
1091
+ inputs: [],
1092
+ name: 'HARVEST_FEE',
1093
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1094
+ stateMutability: 'view',
1095
+ },
1096
+ {
1097
+ type: 'function',
1098
+ inputs: [],
1099
+ name: 'MINT_FEE',
1100
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1101
+ stateMutability: 'view',
1102
+ },
1103
+ {
1104
+ type: 'function',
1105
+ inputs: [],
1106
+ name: 'MINT_FEE_PROTOCOL_CUT',
1107
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1108
+ stateMutability: 'view',
1109
+ },
1110
+ {
1111
+ type: 'function',
1112
+ inputs: [],
1113
+ name: 'NO_X',
1114
+ outputs: [{ name: '', internalType: 'int256', type: 'int256' }],
1115
+ stateMutability: 'view',
1116
+ },
1117
+ {
1118
+ type: 'function',
1119
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1120
+ name: 'acceptAuthority',
1121
+ outputs: [],
1122
+ stateMutability: 'nonpayable',
1123
+ },
1124
+ {
1125
+ type: 'function',
1126
+ inputs: [],
1127
+ name: 'acceptCollector',
1128
+ outputs: [],
1129
+ stateMutability: 'nonpayable',
1130
+ },
1131
+ {
1132
+ type: 'function',
1133
+ inputs: [
1134
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1135
+ { name: 'base', internalType: 'address', type: 'address' },
1136
+ { name: 'Lj', internalType: 'uint256', type: 'uint256' },
1137
+ { name: 'x', internalType: 'int256', type: 'int256' },
1138
+ ],
1139
+ name: 'admitLeg',
1140
+ outputs: [
1141
+ { name: 'dReserve', internalType: 'int256', type: 'int256' },
1142
+ { name: 'dShares', internalType: 'int256', type: 'int256' },
1143
+ ],
1144
+ stateMutability: 'nonpayable',
1145
+ },
1146
+ {
1147
+ type: 'function',
1148
+ inputs: [
1149
+ { name: 'owner', internalType: 'address', type: 'address' },
1150
+ { name: 'spender', internalType: 'address', type: 'address' },
1151
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
1152
+ ],
1153
+ name: 'allowance',
1154
+ outputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
1155
+ stateMutability: 'view',
1156
+ },
1157
+ {
1158
+ type: 'function',
1159
+ inputs: [
1160
+ { name: '', internalType: 'bytes32', type: 'bytes32' },
1161
+ { name: '', internalType: 'address', type: 'address' },
1162
+ ],
1163
+ name: 'allowed',
1164
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
1165
+ stateMutability: 'view',
1166
+ },
1167
+ {
1168
+ type: 'function',
1169
+ inputs: [
1170
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1171
+ { name: 'who', internalType: 'address', type: 'address' },
1172
+ ],
1173
+ name: 'appointOperator',
1174
+ outputs: [],
1175
+ stateMutability: 'nonpayable',
1176
+ },
1177
+ {
1178
+ type: 'function',
1179
+ inputs: [
1180
+ { name: 'spender', internalType: 'address', type: 'address' },
1181
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
1182
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1183
+ ],
1184
+ name: 'approve',
1185
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
1186
+ stateMutability: 'payable',
1187
+ },
1188
+ {
1189
+ type: 'function',
1190
+ inputs: [
1191
+ { name: 'owner', internalType: 'address', type: 'address' },
1192
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
1193
+ ],
1194
+ name: 'balanceOf',
1195
+ outputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
1196
+ stateMutability: 'view',
1197
+ },
1198
+ {
1199
+ type: 'function',
1200
+ inputs: [
1201
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1202
+ { name: 'owner', internalType: 'address', type: 'address' },
1203
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
1204
+ { name: 'minQuoteOut', internalType: 'uint256', type: 'uint256' },
1205
+ ],
1206
+ name: 'burn',
1207
+ outputs: [{ name: 'dL', internalType: 'uint256', type: 'uint256' }],
1208
+ stateMutability: 'nonpayable',
1209
+ },
1210
+ {
1211
+ type: 'function',
1212
+ inputs: [
1213
+ { name: 'token', internalType: 'address', type: 'address' },
1214
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1215
+ ],
1216
+ name: 'burnClaims',
1217
+ outputs: [],
1218
+ stateMutability: 'nonpayable',
1219
+ },
1220
+ {
1221
+ type: 'function',
1222
+ inputs: [{ name: 'token', internalType: 'address', type: 'address' }],
1223
+ name: 'claimIdOf',
1224
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1225
+ stateMutability: 'pure',
1226
+ },
1227
+ {
1228
+ type: 'function',
1229
+ inputs: [{ name: '', internalType: 'address', type: 'address' }],
1230
+ name: 'claimsOutstanding',
1231
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1232
+ stateMutability: 'view',
1233
+ },
1234
+ {
1235
+ type: 'function',
1236
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1237
+ name: 'compositeX',
1238
+ outputs: [{ name: 'X', internalType: 'int256', type: 'int256' }],
1239
+ stateMutability: 'view',
1240
+ },
1241
+ {
1242
+ type: 'function',
1243
+ inputs: [{ name: 'id', internalType: 'uint256', type: 'uint256' }],
1244
+ name: 'decimals',
1245
+ outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
1246
+ stateMutability: 'view',
1247
+ },
1248
+ {
1249
+ type: 'function',
1250
+ inputs: [
1251
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1252
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1253
+ ],
1254
+ name: 'deepen',
1255
+ outputs: [],
1256
+ stateMutability: 'nonpayable',
1257
+ },
1258
+ {
1259
+ type: 'function',
1260
+ inputs: [
1261
+ { name: 'token', internalType: 'address', type: 'address' },
1262
+ { name: 'target', internalType: 'address', type: 'address' },
1263
+ ],
1264
+ name: 'deltaOf',
1265
+ outputs: [{ name: '', internalType: 'int256', type: 'int256' }],
1266
+ stateMutability: 'view',
1267
+ },
1268
+ {
1269
+ type: 'function',
1270
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1271
+ name: 'dissolve',
1272
+ outputs: [],
1273
+ stateMutability: 'nonpayable',
1274
+ },
1275
+ {
1276
+ type: 'function',
1277
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1278
+ name: 'edgePerL',
1279
+ outputs: [{ name: '', internalType: 'int256', type: 'int256' }],
1280
+ stateMutability: 'view',
1281
+ },
1282
+ {
1283
+ type: 'function',
1284
+ inputs: [],
1285
+ name: 'feeCollector',
1286
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
1287
+ stateMutability: 'view',
1288
+ },
1289
+ {
1290
+ type: 'function',
1291
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1292
+ name: 'feePerL',
1293
+ outputs: [{ name: '', internalType: 'int256', type: 'int256' }],
1294
+ stateMutability: 'view',
1295
+ },
1296
+ {
1297
+ type: 'function',
1298
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1299
+ name: 'getPool',
1300
+ outputs: [
1301
+ {
1302
+ name: '',
1303
+ internalType: 'struct FPoolManager.Pool',
1304
+ type: 'tuple',
1305
+ components: [
1306
+ { name: 'quote', internalType: 'address', type: 'address' },
1307
+ { name: 'phi', internalType: 'uint96', type: 'uint96' },
1308
+ { name: 'authority', internalType: 'address', type: 'address' },
1309
+ { name: 'feesOnly', internalType: 'bool', type: 'bool' },
1310
+ { name: 'seeded', internalType: 'bool', type: 'bool' },
1311
+ { name: 'dissolved', internalType: 'bool', type: 'bool' },
1312
+ { name: 'n', internalType: 'uint8', type: 'uint8' },
1313
+ { name: 'restructureBlock', internalType: 'uint32', type: 'uint32' },
1314
+ { name: 'gateMint', internalType: 'bool', type: 'bool' },
1315
+ { name: 'gateSwap', internalType: 'bool', type: 'bool' },
1316
+ { name: 'Q', internalType: 'uint128', type: 'uint128' },
1317
+ { name: 'bigSigma', internalType: 'uint128', type: 'uint128' },
1318
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
1319
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
1320
+ { name: 'theta0', internalType: 'int256', type: 'int256' },
1321
+ { name: 'leverTheta', internalType: 'int256', type: 'int256' },
1322
+ {
1323
+ name: 'pendingAuthority',
1324
+ internalType: 'address',
1325
+ type: 'address',
1326
+ },
1327
+ { name: 'operator', internalType: 'address', type: 'address' },
1328
+ { name: 'minBuffer', internalType: 'uint96', type: 'uint96' },
1329
+ { name: 'incomeTaken', internalType: 'uint256', type: 'uint256' },
1330
+ { name: 'name', internalType: 'bytes32', type: 'bytes32' },
1331
+ ],
1332
+ },
1333
+ ],
1334
+ stateMutability: 'view',
1335
+ },
1336
+ {
1337
+ type: 'function',
1338
+ inputs: [
1339
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1340
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1341
+ { name: 'to', internalType: 'address', type: 'address' },
1342
+ ],
1343
+ name: 'harvest',
1344
+ outputs: [],
1345
+ stateMutability: 'nonpayable',
1346
+ },
1347
+ {
1348
+ type: 'function',
1349
+ inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
1350
+ name: 'harvestFeeExempt',
1351
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
1352
+ stateMutability: 'view',
1353
+ },
1354
+ {
1355
+ type: 'function',
1356
+ inputs: [
1357
+ {
1358
+ name: 'key',
1359
+ internalType: 'struct FPoolKey',
1360
+ type: 'tuple',
1361
+ components: [
1362
+ { name: 'quote', internalType: 'address', type: 'address' },
1363
+ { name: 'bases', internalType: 'address[]', type: 'address[]' },
1364
+ { name: 'weights', internalType: 'uint256[]', type: 'uint256[]' },
1365
+ { name: 'phi', internalType: 'uint256', type: 'uint256' },
1366
+ { name: 'feesOnly', internalType: 'bool', type: 'bool' },
1367
+ { name: 'authority', internalType: 'address', type: 'address' },
1368
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
1369
+ ],
1370
+ },
1371
+ ],
1372
+ name: 'idOf',
1373
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
1374
+ stateMutability: 'pure',
1375
+ },
1376
+ {
1377
+ type: 'function',
1378
+ inputs: [
1379
+ {
1380
+ name: 'key',
1381
+ internalType: 'struct FPoolKey',
1382
+ type: 'tuple',
1383
+ components: [
1384
+ { name: 'quote', internalType: 'address', type: 'address' },
1385
+ { name: 'bases', internalType: 'address[]', type: 'address[]' },
1386
+ { name: 'weights', internalType: 'uint256[]', type: 'uint256[]' },
1387
+ { name: 'phi', internalType: 'uint256', type: 'uint256' },
1388
+ { name: 'feesOnly', internalType: 'bool', type: 'bool' },
1389
+ { name: 'authority', internalType: 'address', type: 'address' },
1390
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
1391
+ ],
1392
+ },
1393
+ ],
1394
+ name: 'initialize',
1395
+ outputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1396
+ stateMutability: 'nonpayable',
1397
+ },
1398
+ {
1399
+ type: 'function',
1400
+ inputs: [
1401
+ { name: 'owner', internalType: 'address', type: 'address' },
1402
+ { name: 'spender', internalType: 'address', type: 'address' },
1403
+ ],
1404
+ name: 'isOperator',
1405
+ outputs: [{ name: 'status', internalType: 'bool', type: 'bool' }],
1406
+ stateMutability: 'view',
1407
+ },
1408
+ {
1409
+ type: 'function',
1410
+ inputs: [],
1411
+ name: 'isUnlocked',
1412
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
1413
+ stateMutability: 'view',
1414
+ },
1415
+ {
1416
+ type: 'function',
1417
+ inputs: [
1418
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1419
+ { name: 'j', internalType: 'uint256', type: 'uint256' },
1420
+ ],
1421
+ name: 'legOf',
1422
+ outputs: [
1423
+ { name: 'base', internalType: 'address', type: 'address' },
1424
+ { name: 'weight', internalType: 'uint256', type: 'uint256' },
1425
+ { name: 'x', internalType: 'int256', type: 'int256' },
1426
+ { name: 'reserve', internalType: 'uint256', type: 'uint256' },
1427
+ ],
1428
+ stateMutability: 'view',
1429
+ },
1430
+ {
1431
+ type: 'function',
1432
+ inputs: [
1433
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1434
+ { name: 'to', internalType: 'address', type: 'address' },
1435
+ { name: 'dL', internalType: 'uint256', type: 'uint256' },
1436
+ { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
1437
+ ],
1438
+ name: 'mint',
1439
+ outputs: [{ name: 'shares', internalType: 'uint256', type: 'uint256' }],
1440
+ stateMutability: 'nonpayable',
1441
+ },
1442
+ {
1443
+ type: 'function',
1444
+ inputs: [
1445
+ { name: 'token', internalType: 'address', type: 'address' },
1446
+ { name: 'to', internalType: 'address', type: 'address' },
1447
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1448
+ ],
1449
+ name: 'mintClaims',
1450
+ outputs: [],
1451
+ stateMutability: 'nonpayable',
1452
+ },
1453
+ {
1454
+ type: 'function',
1455
+ inputs: [{ name: 'calls', internalType: 'bytes[]', type: 'bytes[]' }],
1456
+ name: 'multicall',
1457
+ outputs: [{ name: 'results', internalType: 'bytes[]', type: 'bytes[]' }],
1458
+ stateMutability: 'nonpayable',
1459
+ },
1460
+ {
1461
+ type: 'function',
1462
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1463
+ name: 'n',
1464
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1465
+ stateMutability: 'view',
1466
+ },
1467
+ {
1468
+ type: 'function',
1469
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1470
+ name: 'name',
1471
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
1472
+ stateMutability: 'pure',
1473
+ },
1474
+ {
1475
+ type: 'function',
1476
+ inputs: [],
1477
+ name: 'nonzeroDeltaCount',
1478
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1479
+ stateMutability: 'view',
1480
+ },
1481
+ {
1482
+ type: 'function',
1483
+ inputs: [],
1484
+ name: 'pendingCollector',
1485
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
1486
+ stateMutability: 'view',
1487
+ },
1488
+ {
1489
+ type: 'function',
1490
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1491
+ name: 'phiB4B',
1492
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1493
+ stateMutability: 'view',
1494
+ },
1495
+ {
1496
+ type: 'function',
1497
+ inputs: [
1498
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1499
+ { name: 'next', internalType: 'address', type: 'address' },
1500
+ ],
1501
+ name: 'proposeAuthority',
1502
+ outputs: [],
1503
+ stateMutability: 'nonpayable',
1504
+ },
1505
+ {
1506
+ type: 'function',
1507
+ inputs: [{ name: 'next', internalType: 'address', type: 'address' }],
1508
+ name: 'proposeCollector',
1509
+ outputs: [],
1510
+ stateMutability: 'nonpayable',
1511
+ },
1512
+ {
1513
+ type: 'function',
1514
+ inputs: [
1515
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1516
+ {
1517
+ name: 'kind',
1518
+ internalType: 'enum FPoolManager.QuoteKind',
1519
+ type: 'uint8',
1520
+ },
1521
+ { name: 'j', internalType: 'uint256', type: 'uint256' },
1522
+ { name: 'k', internalType: 'uint256', type: 'uint256' },
1523
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
1524
+ { name: 'taker', internalType: 'address', type: 'address' },
1525
+ ],
1526
+ name: 'quoteSwap',
1527
+ outputs: [],
1528
+ stateMutability: 'nonpayable',
1529
+ },
1530
+ {
1531
+ type: 'function',
1532
+ inputs: [
1533
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1534
+ { name: 'minBuffer', internalType: 'uint256', type: 'uint256' },
1535
+ ],
1536
+ name: 'raiseMinBuffer',
1537
+ outputs: [],
1538
+ stateMutability: 'nonpayable',
1539
+ },
1540
+ {
1541
+ type: 'function',
1542
+ inputs: [
1543
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1544
+ { name: 'j', internalType: 'uint256', type: 'uint256' },
1545
+ ],
1546
+ name: 'reserveOf',
1547
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1548
+ stateMutability: 'view',
1549
+ },
1550
+ {
1551
+ type: 'function',
1552
+ inputs: [
1553
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1554
+ { name: 'L0', internalType: 'uint256', type: 'uint256' },
1555
+ { name: 'x0', internalType: 'int256[]', type: 'int256[]' },
1556
+ { name: 'Q0', internalType: 'uint256', type: 'uint256' },
1557
+ ],
1558
+ name: 'seed',
1559
+ outputs: [{ name: 'shares', internalType: 'uint256', type: 'uint256' }],
1560
+ stateMutability: 'nonpayable',
1561
+ },
1562
+ {
1563
+ type: 'function',
1564
+ inputs: [
1565
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1566
+ { name: 'who', internalType: 'address[]', type: 'address[]' },
1567
+ { name: 'yes', internalType: 'bool', type: 'bool' },
1568
+ ],
1569
+ name: 'setAllowed',
1570
+ outputs: [],
1571
+ stateMutability: 'nonpayable',
1572
+ },
1573
+ {
1574
+ type: 'function',
1575
+ inputs: [
1576
+ { name: 'mintFeeProtocolCut', internalType: 'uint256', type: 'uint256' },
1577
+ { name: 'harvestFee', internalType: 'uint256', type: 'uint256' },
1578
+ ],
1579
+ name: 'setFeeParams',
1580
+ outputs: [],
1581
+ stateMutability: 'nonpayable',
1582
+ },
1583
+ {
1584
+ type: 'function',
1585
+ inputs: [
1586
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1587
+ { name: 'gateMint', internalType: 'bool', type: 'bool' },
1588
+ { name: 'gateSwap', internalType: 'bool', type: 'bool' },
1589
+ ],
1590
+ name: 'setGates',
1591
+ outputs: [],
1592
+ stateMutability: 'nonpayable',
1593
+ },
1594
+ {
1595
+ type: 'function',
1596
+ inputs: [
1597
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1598
+ { name: 'exempt', internalType: 'bool', type: 'bool' },
1599
+ ],
1600
+ name: 'setHarvestFeeExempt',
1601
+ outputs: [],
1602
+ stateMutability: 'nonpayable',
1603
+ },
1604
+ {
1605
+ type: 'function',
1606
+ inputs: [
1607
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1608
+ { name: 'j', internalType: 'uint256', type: 'uint256' },
1609
+ { name: 'newLj', internalType: 'uint256', type: 'uint256' },
1610
+ { name: 'xIfNew', internalType: 'int256', type: 'int256' },
1611
+ ],
1612
+ name: 'setLegL',
1613
+ outputs: [
1614
+ { name: 'dReserve', internalType: 'int256', type: 'int256' },
1615
+ { name: 'dShares', internalType: 'int256', type: 'int256' },
1616
+ ],
1617
+ stateMutability: 'nonpayable',
1618
+ },
1619
+ {
1620
+ type: 'function',
1621
+ inputs: [
1622
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1623
+ { name: 'name_', internalType: 'bytes32', type: 'bytes32' },
1624
+ ],
1625
+ name: 'setName',
1626
+ outputs: [],
1627
+ stateMutability: 'nonpayable',
1628
+ },
1629
+ {
1630
+ type: 'function',
1631
+ inputs: [
1632
+ { name: 'operator', internalType: 'address', type: 'address' },
1633
+ { name: 'approved', internalType: 'bool', type: 'bool' },
1634
+ ],
1635
+ name: 'setOperator',
1636
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
1637
+ stateMutability: 'payable',
1638
+ },
1639
+ {
1640
+ type: 'function',
1641
+ inputs: [
1642
+ { name: 'who', internalType: 'address', type: 'address' },
1643
+ { name: 'name_', internalType: 'bytes32', type: 'bytes32' },
1644
+ ],
1645
+ name: 'setSponsorName',
1646
+ outputs: [],
1647
+ stateMutability: 'nonpayable',
1648
+ },
1649
+ {
1650
+ type: 'function',
1651
+ inputs: [],
1652
+ name: 'settle',
1653
+ outputs: [{ name: 'paid', internalType: 'uint256', type: 'uint256' }],
1654
+ stateMutability: 'nonpayable',
1655
+ },
1656
+ {
1657
+ type: 'function',
1658
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1659
+ name: 'shareIdOf',
1660
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1661
+ stateMutability: 'pure',
1662
+ },
1663
+ {
1664
+ type: 'function',
1665
+ inputs: [{ name: '', internalType: 'address', type: 'address' }],
1666
+ name: 'sponsorName',
1667
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
1668
+ stateMutability: 'view',
1669
+ },
1670
+ {
1671
+ type: 'function',
1672
+ inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }],
1673
+ name: 'supportsInterface',
1674
+ outputs: [{ name: 'result', internalType: 'bool', type: 'bool' }],
1675
+ stateMutability: 'view',
1676
+ },
1677
+ {
1678
+ type: 'function',
1679
+ inputs: [
1680
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1681
+ { name: 'j', internalType: 'uint256', type: 'uint256' },
1682
+ { name: 'k', internalType: 'uint256', type: 'uint256' },
1683
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
1684
+ { name: 'minOut', internalType: 'uint256', type: 'uint256' },
1685
+ { name: 'taker', internalType: 'address', type: 'address' },
1686
+ ],
1687
+ name: 'swapBaseForBase',
1688
+ outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
1689
+ stateMutability: 'nonpayable',
1690
+ },
1691
+ {
1692
+ type: 'function',
1693
+ inputs: [
1694
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1695
+ { name: 'j', internalType: 'uint256', type: 'uint256' },
1696
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
1697
+ { name: 'minOut', internalType: 'uint256', type: 'uint256' },
1698
+ { name: 'taker', internalType: 'address', type: 'address' },
1699
+ ],
1700
+ name: 'swapBaseIn',
1701
+ outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
1702
+ stateMutability: 'nonpayable',
1703
+ },
1704
+ {
1705
+ type: 'function',
1706
+ inputs: [
1707
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1708
+ { name: 'j', internalType: 'uint256', type: 'uint256' },
1709
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
1710
+ { name: 'minOut', internalType: 'uint256', type: 'uint256' },
1711
+ { name: 'taker', internalType: 'address', type: 'address' },
1712
+ ],
1713
+ name: 'swapQuoteIn',
1714
+ outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
1715
+ stateMutability: 'nonpayable',
1716
+ },
1717
+ {
1718
+ type: 'function',
1719
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1720
+ name: 'symbol',
1721
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
1722
+ stateMutability: 'pure',
1723
+ },
1724
+ {
1725
+ type: 'function',
1726
+ inputs: [{ name: 'token', internalType: 'address', type: 'address' }],
1727
+ name: 'sync',
1728
+ outputs: [],
1729
+ stateMutability: 'nonpayable',
1730
+ },
1731
+ {
1732
+ type: 'function',
1733
+ inputs: [
1734
+ { name: 'token', internalType: 'address', type: 'address' },
1735
+ { name: 'to', internalType: 'address', type: 'address' },
1736
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1737
+ ],
1738
+ name: 'take',
1739
+ outputs: [],
1740
+ stateMutability: 'nonpayable',
1741
+ },
1742
+ {
1743
+ type: 'function',
1744
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1745
+ name: 'theta',
1746
+ outputs: [{ name: '', internalType: 'int256', type: 'int256' }],
1747
+ stateMutability: 'view',
1748
+ },
1749
+ {
1750
+ type: 'function',
1751
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1752
+ name: 'tokenURI',
1753
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
1754
+ stateMutability: 'pure',
1755
+ },
1756
+ {
1757
+ type: 'function',
1758
+ inputs: [
1759
+ { name: 'to', internalType: 'address', type: 'address' },
1760
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
1761
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1762
+ ],
1763
+ name: 'transfer',
1764
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
1765
+ stateMutability: 'payable',
1766
+ },
1767
+ {
1768
+ type: 'function',
1769
+ inputs: [
1770
+ { name: 'from', internalType: 'address', type: 'address' },
1771
+ { name: 'to', internalType: 'address', type: 'address' },
1772
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
1773
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1774
+ ],
1775
+ name: 'transferFrom',
1776
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
1777
+ stateMutability: 'payable',
1778
+ },
1779
+ {
1780
+ type: 'function',
1781
+ inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
1782
+ name: 'unlock',
1783
+ outputs: [{ name: 'result', internalType: 'bytes', type: 'bytes' }],
1784
+ stateMutability: 'nonpayable',
1785
+ },
1786
+ {
1787
+ type: 'function',
1788
+ inputs: [],
1789
+ name: 'version',
1790
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1791
+ stateMutability: 'pure',
1792
+ },
1793
+ {
1794
+ type: 'event',
1795
+ anonymous: false,
1796
+ inputs: [
1797
+ {
1798
+ name: 'poolId',
1799
+ internalType: 'bytes32',
1800
+ type: 'bytes32',
1801
+ indexed: true,
1802
+ },
1803
+ { name: 'who', internalType: 'address', type: 'address', indexed: true },
1804
+ { name: 'allowed', internalType: 'bool', type: 'bool', indexed: false },
1805
+ ],
1806
+ name: 'Allowed',
1807
+ },
1808
+ {
1809
+ type: 'event',
1810
+ anonymous: false,
1811
+ inputs: [
1812
+ {
1813
+ name: 'owner',
1814
+ internalType: 'address',
1815
+ type: 'address',
1816
+ indexed: true,
1817
+ },
1818
+ {
1819
+ name: 'spender',
1820
+ internalType: 'address',
1821
+ type: 'address',
1822
+ indexed: true,
1823
+ },
1824
+ { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
1825
+ {
1826
+ name: 'amount',
1827
+ internalType: 'uint256',
1828
+ type: 'uint256',
1829
+ indexed: false,
1830
+ },
1831
+ ],
1832
+ name: 'Approval',
1833
+ },
1834
+ {
1835
+ type: 'event',
1836
+ anonymous: false,
1837
+ inputs: [
1838
+ {
1839
+ name: 'poolId',
1840
+ internalType: 'bytes32',
1841
+ type: 'bytes32',
1842
+ indexed: true,
1843
+ },
1844
+ {
1845
+ name: 'current',
1846
+ internalType: 'address',
1847
+ type: 'address',
1848
+ indexed: true,
1849
+ },
1850
+ {
1851
+ name: 'proposed',
1852
+ internalType: 'address',
1853
+ type: 'address',
1854
+ indexed: true,
1855
+ },
1856
+ ],
1857
+ name: 'AuthorityProposed',
1858
+ },
1859
+ {
1860
+ type: 'event',
1861
+ anonymous: false,
1862
+ inputs: [
1863
+ {
1864
+ name: 'poolId',
1865
+ internalType: 'bytes32',
1866
+ type: 'bytes32',
1867
+ indexed: true,
1868
+ },
1869
+ { name: 'prev', internalType: 'address', type: 'address', indexed: true },
1870
+ { name: 'next', internalType: 'address', type: 'address', indexed: true },
1871
+ ],
1872
+ name: 'AuthoritySet',
1873
+ },
1874
+ {
1875
+ type: 'event',
1876
+ anonymous: false,
1877
+ inputs: [
1878
+ {
1879
+ name: 'poolId',
1880
+ internalType: 'bytes32',
1881
+ type: 'bytes32',
1882
+ indexed: true,
1883
+ },
1884
+ {
1885
+ name: 'sender',
1886
+ internalType: 'address',
1887
+ type: 'address',
1888
+ indexed: true,
1889
+ },
1890
+ { name: 'dL', internalType: 'uint256', type: 'uint256', indexed: false },
1891
+ {
1892
+ name: 'shares',
1893
+ internalType: 'uint256',
1894
+ type: 'uint256',
1895
+ indexed: false,
1896
+ },
1897
+ {
1898
+ name: 'dQuote',
1899
+ internalType: 'uint256',
1900
+ type: 'uint256',
1901
+ indexed: false,
1902
+ },
1903
+ ],
1904
+ name: 'Burn',
1905
+ },
1906
+ {
1907
+ type: 'event',
1908
+ anonymous: false,
1909
+ inputs: [
1910
+ {
1911
+ name: 'previous',
1912
+ internalType: 'address',
1913
+ type: 'address',
1914
+ indexed: true,
1915
+ },
1916
+ {
1917
+ name: 'current',
1918
+ internalType: 'address',
1919
+ type: 'address',
1920
+ indexed: true,
1921
+ },
1922
+ ],
1923
+ name: 'CollectorAccepted',
1924
+ },
1925
+ {
1926
+ type: 'event',
1927
+ anonymous: false,
1928
+ inputs: [
1929
+ {
1930
+ name: 'current',
1931
+ internalType: 'address',
1932
+ type: 'address',
1933
+ indexed: true,
1934
+ },
1935
+ {
1936
+ name: 'proposed',
1937
+ internalType: 'address',
1938
+ type: 'address',
1939
+ indexed: true,
1940
+ },
1941
+ ],
1942
+ name: 'CollectorProposed',
1943
+ },
1944
+ {
1945
+ type: 'event',
1946
+ anonymous: false,
1947
+ inputs: [
1948
+ {
1949
+ name: 'poolId',
1950
+ internalType: 'bytes32',
1951
+ type: 'bytes32',
1952
+ indexed: true,
1953
+ },
1954
+ { name: 'from', internalType: 'address', type: 'address', indexed: true },
1955
+ {
1956
+ name: 'amount',
1957
+ internalType: 'uint256',
1958
+ type: 'uint256',
1959
+ indexed: false,
1960
+ },
1961
+ ],
1962
+ name: 'Deepen',
1963
+ },
1964
+ {
1965
+ type: 'event',
1966
+ anonymous: false,
1967
+ inputs: [
1968
+ {
1969
+ name: 'poolId',
1970
+ internalType: 'bytes32',
1971
+ type: 'bytes32',
1972
+ indexed: true,
1973
+ },
1974
+ ],
1975
+ name: 'Dissolve',
1976
+ },
1977
+ {
1978
+ type: 'event',
1979
+ anonymous: false,
1980
+ inputs: [
1981
+ {
1982
+ name: 'mintFeeProtocolCut',
1983
+ internalType: 'uint256',
1984
+ type: 'uint256',
1985
+ indexed: false,
1986
+ },
1987
+ {
1988
+ name: 'harvestFee',
1989
+ internalType: 'uint256',
1990
+ type: 'uint256',
1991
+ indexed: false,
1992
+ },
1993
+ ],
1994
+ name: 'FeeParamsSet',
1995
+ },
1996
+ {
1997
+ type: 'event',
1998
+ anonymous: false,
1999
+ inputs: [
2000
+ {
2001
+ name: 'poolId',
2002
+ internalType: 'bytes32',
2003
+ type: 'bytes32',
2004
+ indexed: true,
2005
+ },
2006
+ { name: 'gateMint', internalType: 'bool', type: 'bool', indexed: false },
2007
+ { name: 'gateSwap', internalType: 'bool', type: 'bool', indexed: false },
2008
+ ],
2009
+ name: 'GatesSet',
2010
+ },
2011
+ {
2012
+ type: 'event',
2013
+ anonymous: false,
2014
+ inputs: [
2015
+ {
2016
+ name: 'poolId',
2017
+ internalType: 'bytes32',
2018
+ type: 'bytes32',
2019
+ indexed: true,
2020
+ },
2021
+ { name: 'to', internalType: 'address', type: 'address', indexed: true },
2022
+ {
2023
+ name: 'amount',
2024
+ internalType: 'uint256',
2025
+ type: 'uint256',
2026
+ indexed: false,
2027
+ },
2028
+ ],
2029
+ name: 'Harvest',
2030
+ },
2031
+ {
2032
+ type: 'event',
2033
+ anonymous: false,
2034
+ inputs: [
2035
+ {
2036
+ name: 'poolId',
2037
+ internalType: 'bytes32',
2038
+ type: 'bytes32',
2039
+ indexed: true,
2040
+ },
2041
+ { name: 'exempt', internalType: 'bool', type: 'bool', indexed: false },
2042
+ ],
2043
+ name: 'HarvestFeeExemptSet',
2044
+ },
2045
+ {
2046
+ type: 'event',
2047
+ anonymous: false,
2048
+ inputs: [
2049
+ {
2050
+ name: 'poolId',
2051
+ internalType: 'bytes32',
2052
+ type: 'bytes32',
2053
+ indexed: true,
2054
+ },
2055
+ {
2056
+ name: 'quote',
2057
+ internalType: 'address',
2058
+ type: 'address',
2059
+ indexed: true,
2060
+ },
2061
+ {
2062
+ name: 'authority',
2063
+ internalType: 'address',
2064
+ type: 'address',
2065
+ indexed: true,
2066
+ },
2067
+ {
2068
+ name: 'bases',
2069
+ internalType: 'address[]',
2070
+ type: 'address[]',
2071
+ indexed: false,
2072
+ },
2073
+ {
2074
+ name: 'weights',
2075
+ internalType: 'uint256[]',
2076
+ type: 'uint256[]',
2077
+ indexed: false,
2078
+ },
2079
+ { name: 'phi', internalType: 'uint256', type: 'uint256', indexed: false },
2080
+ { name: 'feesOnly', internalType: 'bool', type: 'bool', indexed: false },
2081
+ ],
2082
+ name: 'Initialize',
2083
+ },
2084
+ {
2085
+ type: 'event',
2086
+ anonymous: false,
2087
+ inputs: [
2088
+ {
2089
+ name: 'poolId',
2090
+ internalType: 'bytes32',
2091
+ type: 'bytes32',
2092
+ indexed: true,
2093
+ },
2094
+ { name: 'j', internalType: 'uint256', type: 'uint256', indexed: true },
2095
+ {
2096
+ name: 'base',
2097
+ internalType: 'address',
2098
+ type: 'address',
2099
+ indexed: false,
2100
+ },
2101
+ {
2102
+ name: 'newLj',
2103
+ internalType: 'uint256',
2104
+ type: 'uint256',
2105
+ indexed: false,
2106
+ },
2107
+ { name: 'x', internalType: 'int256', type: 'int256', indexed: false },
2108
+ { name: 'L', internalType: 'uint256', type: 'uint256', indexed: false },
2109
+ {
2110
+ name: 'theta0',
2111
+ internalType: 'int256',
2112
+ type: 'int256',
2113
+ indexed: false,
2114
+ },
2115
+ {
2116
+ name: 'dReserve',
2117
+ internalType: 'int256',
2118
+ type: 'int256',
2119
+ indexed: false,
2120
+ },
2121
+ {
2122
+ name: 'dShares',
2123
+ internalType: 'int256',
2124
+ type: 'int256',
2125
+ indexed: false,
2126
+ },
2127
+ ],
2128
+ name: 'LegSet',
2129
+ },
2130
+ {
2131
+ type: 'event',
2132
+ anonymous: false,
2133
+ inputs: [
2134
+ {
2135
+ name: 'poolId',
2136
+ internalType: 'bytes32',
2137
+ type: 'bytes32',
2138
+ indexed: true,
2139
+ },
2140
+ {
2141
+ name: 'minBuffer',
2142
+ internalType: 'uint256',
2143
+ type: 'uint256',
2144
+ indexed: false,
2145
+ },
2146
+ ],
2147
+ name: 'MinBufferRaised',
2148
+ },
2149
+ {
2150
+ type: 'event',
2151
+ anonymous: false,
2152
+ inputs: [
2153
+ {
2154
+ name: 'poolId',
2155
+ internalType: 'bytes32',
2156
+ type: 'bytes32',
2157
+ indexed: true,
2158
+ },
2159
+ {
2160
+ name: 'sender',
2161
+ internalType: 'address',
2162
+ type: 'address',
2163
+ indexed: true,
2164
+ },
2165
+ { name: 'dL', internalType: 'uint256', type: 'uint256', indexed: false },
2166
+ {
2167
+ name: 'shares',
2168
+ internalType: 'uint256',
2169
+ type: 'uint256',
2170
+ indexed: false,
2171
+ },
2172
+ {
2173
+ name: 'dQuote',
2174
+ internalType: 'uint256',
2175
+ type: 'uint256',
2176
+ indexed: false,
2177
+ },
2178
+ ],
2179
+ name: 'Mint',
2180
+ },
2181
+ {
2182
+ type: 'event',
2183
+ anonymous: false,
2184
+ inputs: [
2185
+ {
2186
+ name: 'poolId',
2187
+ internalType: 'bytes32',
2188
+ type: 'bytes32',
2189
+ indexed: true,
2190
+ },
2191
+ {
2192
+ name: 'name',
2193
+ internalType: 'bytes32',
2194
+ type: 'bytes32',
2195
+ indexed: false,
2196
+ },
2197
+ ],
2198
+ name: 'NameSet',
2199
+ },
2200
+ {
2201
+ type: 'event',
2202
+ anonymous: false,
2203
+ inputs: [
2204
+ {
2205
+ name: 'owner',
2206
+ internalType: 'address',
2207
+ type: 'address',
2208
+ indexed: true,
2209
+ },
2210
+ {
2211
+ name: 'operator',
2212
+ internalType: 'address',
2213
+ type: 'address',
2214
+ indexed: true,
2215
+ },
2216
+ { name: 'approved', internalType: 'bool', type: 'bool', indexed: false },
2217
+ ],
2218
+ name: 'OperatorSet',
2219
+ },
2220
+ {
2221
+ type: 'event',
2222
+ anonymous: false,
2223
+ inputs: [
2224
+ {
2225
+ name: 'poolId',
2226
+ internalType: 'bytes32',
2227
+ type: 'bytes32',
2228
+ indexed: true,
2229
+ },
2230
+ { name: 'prev', internalType: 'address', type: 'address', indexed: true },
2231
+ { name: 'next', internalType: 'address', type: 'address', indexed: true },
2232
+ ],
2233
+ name: 'OperatorSet',
2234
+ },
2235
+ {
2236
+ type: 'event',
2237
+ anonymous: false,
2238
+ inputs: [
2239
+ {
2240
+ name: 'poolId',
2241
+ internalType: 'bytes32',
2242
+ type: 'bytes32',
2243
+ indexed: true,
2244
+ },
2245
+ { name: 'inShares', internalType: 'bool', type: 'bool', indexed: false },
2246
+ {
2247
+ name: 'amount',
2248
+ internalType: 'uint256',
2249
+ type: 'uint256',
2250
+ indexed: false,
2251
+ },
2252
+ ],
2253
+ name: 'ProtocolFee',
2254
+ },
2255
+ {
2256
+ type: 'event',
2257
+ anonymous: false,
2258
+ inputs: [
2259
+ {
2260
+ name: 'poolId',
2261
+ internalType: 'bytes32',
2262
+ type: 'bytes32',
2263
+ indexed: true,
2264
+ },
2265
+ { name: 'L0', internalType: 'uint256', type: 'uint256', indexed: false },
2266
+ { name: 'Q0', internalType: 'uint256', type: 'uint256', indexed: false },
2267
+ {
2268
+ name: 'theta0',
2269
+ internalType: 'int256',
2270
+ type: 'int256',
2271
+ indexed: false,
2272
+ },
2273
+ {
2274
+ name: 'x0',
2275
+ internalType: 'int256[]',
2276
+ type: 'int256[]',
2277
+ indexed: false,
2278
+ },
2279
+ ],
2280
+ name: 'Seeded',
2281
+ },
2282
+ {
2283
+ type: 'event',
2284
+ anonymous: false,
2285
+ inputs: [
2286
+ { name: 'who', internalType: 'address', type: 'address', indexed: true },
2287
+ {
2288
+ name: 'name',
2289
+ internalType: 'bytes32',
2290
+ type: 'bytes32',
2291
+ indexed: false,
2292
+ },
2293
+ ],
2294
+ name: 'SponsorNamed',
2295
+ },
2296
+ {
2297
+ type: 'event',
2298
+ anonymous: false,
2299
+ inputs: [
2300
+ {
2301
+ name: 'poolId',
2302
+ internalType: 'bytes32',
2303
+ type: 'bytes32',
2304
+ indexed: true,
2305
+ },
2306
+ {
2307
+ name: 'sender',
2308
+ internalType: 'address',
2309
+ type: 'address',
2310
+ indexed: true,
2311
+ },
2312
+ {
2313
+ name: 'tokenIn',
2314
+ internalType: 'address',
2315
+ type: 'address',
2316
+ indexed: false,
2317
+ },
2318
+ {
2319
+ name: 'tokenOut',
2320
+ internalType: 'address',
2321
+ type: 'address',
2322
+ indexed: false,
2323
+ },
2324
+ {
2325
+ name: 'amountIn',
2326
+ internalType: 'uint256',
2327
+ type: 'uint256',
2328
+ indexed: false,
2329
+ },
2330
+ {
2331
+ name: 'amountOut',
2332
+ internalType: 'uint256',
2333
+ type: 'uint256',
2334
+ indexed: false,
2335
+ },
2336
+ {
2337
+ name: 'newXIn',
2338
+ internalType: 'int256',
2339
+ type: 'int256',
2340
+ indexed: false,
2341
+ },
2342
+ {
2343
+ name: 'newXOut',
2344
+ internalType: 'int256',
2345
+ type: 'int256',
2346
+ indexed: false,
2347
+ },
2348
+ ],
2349
+ name: 'Swap',
2350
+ },
2351
+ {
2352
+ type: 'event',
2353
+ anonymous: false,
2354
+ inputs: [
2355
+ { name: 'by', internalType: 'address', type: 'address', indexed: false },
2356
+ { name: 'from', internalType: 'address', type: 'address', indexed: true },
2357
+ { name: 'to', internalType: 'address', type: 'address', indexed: true },
2358
+ { name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
2359
+ {
2360
+ name: 'amount',
2361
+ internalType: 'uint256',
2362
+ type: 'uint256',
2363
+ indexed: false,
2364
+ },
2365
+ ],
2366
+ name: 'Transfer',
2367
+ },
2368
+ { type: 'error', inputs: [], name: 'AlreadySeeded' },
2369
+ { type: 'error', inputs: [], name: 'AlreadyUnlocked' },
2370
+ { type: 'error', inputs: [], name: 'BadLeg' },
2371
+ { type: 'error', inputs: [], name: 'BadParam' },
2372
+ { type: 'error', inputs: [], name: 'BalanceOverflow' },
2373
+ { type: 'error', inputs: [], name: 'Dissolved_' },
2374
+ { type: 'error', inputs: [], name: 'FeesOnly' },
2375
+ { type: 'error', inputs: [], name: 'InsufficientBalance' },
2376
+ { type: 'error', inputs: [], name: 'InsufficientPermission' },
2377
+ { type: 'error', inputs: [], name: 'InsufficientQuote' },
2378
+ { type: 'error', inputs: [], name: 'InvalidToken' },
2379
+ { type: 'error', inputs: [], name: 'LegHeld' },
2380
+ { type: 'error', inputs: [], name: 'LegLive' },
2381
+ { type: 'error', inputs: [], name: 'MinBuffer' },
2382
+ {
2383
+ type: 'error',
2384
+ inputs: [{ name: 'index', internalType: 'uint256', type: 'uint256' }],
2385
+ name: 'MulticallFailed',
2386
+ },
2387
+ { type: 'error', inputs: [], name: 'NonstandardToken' },
2388
+ { type: 'error', inputs: [], name: 'NotAllowed' },
2389
+ { type: 'error', inputs: [], name: 'NotAuthority' },
2390
+ { type: 'error', inputs: [], name: 'NotAuthorized' },
2391
+ { type: 'error', inputs: [], name: 'NotCollector' },
2392
+ { type: 'error', inputs: [], name: 'NotDissolvable' },
2393
+ { type: 'error', inputs: [], name: 'NotOperator' },
2394
+ { type: 'error', inputs: [], name: 'NotSeeded' },
2395
+ { type: 'error', inputs: [], name: 'NotSoleLP' },
2396
+ { type: 'error', inputs: [], name: 'PoolAlreadyInitialized' },
2397
+ { type: 'error', inputs: [], name: 'PoolLocked' },
2398
+ { type: 'error', inputs: [], name: 'PoolNotInitialized' },
2399
+ { type: 'error', inputs: [], name: 'PriceOutOfRange' },
2400
+ {
2401
+ type: 'error',
2402
+ inputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
2403
+ name: 'QuoteResult',
2404
+ },
2405
+ { type: 'error', inputs: [], name: 'ReserveNotRepresentable' },
2406
+ { type: 'error', inputs: [], name: 'Restructured' },
2407
+ { type: 'error', inputs: [], name: 'SameAsset' },
2408
+ { type: 'error', inputs: [], name: 'Slippage' },
2409
+ { type: 'error', inputs: [], name: 'SyncAlreadyOpen' },
2410
+ { type: 'error', inputs: [], name: 'TokensNotSettled' },
2411
+ { type: 'error', inputs: [], name: 'TooManyLegs' },
2412
+ { type: 'error', inputs: [], name: 'TransferShortfall' },
2413
+ { type: 'error', inputs: [], name: 'ZeroAmount' },
2414
+ ] as const
2415
+
2416
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2417
+ // LogswapLens
2418
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2419
+
2420
+ export const logswapLensAbi = [
2421
+ {
2422
+ type: 'constructor',
2423
+ inputs: [
2424
+ { name: '_mgr', internalType: 'contract CPoolManager', type: 'address' },
2425
+ { name: '_fmgr', internalType: 'contract FPoolManager', type: 'address' },
2426
+ ],
2427
+ stateMutability: 'nonpayable',
2428
+ },
2429
+ {
2430
+ type: 'function',
2431
+ inputs: [],
2432
+ name: 'cParams',
2433
+ outputs: [
2434
+ { name: 'defaultAlpha', internalType: 'uint256', type: 'uint256' },
2435
+ { name: 'feeMax', internalType: 'uint256', type: 'uint256' },
2436
+ { name: 'feeMin', internalType: 'uint256', type: 'uint256' },
2437
+ { name: 'defaultFeeMin', internalType: 'uint256', type: 'uint256' },
2438
+ { name: 'maxKappa', internalType: 'uint256', type: 'uint256' },
2439
+ { name: 'mintFee', internalType: 'uint256', type: 'uint256' },
2440
+ { name: 'minTickSpacing', internalType: 'int256', type: 'int256' },
2441
+ { name: 'noCap', internalType: 'int256', type: 'int256' },
2442
+ { name: 'cVersion', internalType: 'uint256', type: 'uint256' },
2443
+ ],
2444
+ stateMutability: 'pure',
2445
+ },
2446
+ {
2447
+ type: 'function',
2448
+ inputs: [
2449
+ {
2450
+ name: 'key',
2451
+ internalType: 'struct PoolKey',
2452
+ type: 'tuple',
2453
+ components: [
2454
+ { name: 'base', internalType: 'address', type: 'address' },
2455
+ { name: 'quote', internalType: 'address', type: 'address' },
2456
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2457
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2458
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2459
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2460
+ ],
2461
+ },
2462
+ ],
2463
+ name: 'dormantBase',
2464
+ outputs: [{ name: 'total', internalType: 'int256', type: 'int256' }],
2465
+ stateMutability: 'view',
2466
+ },
2467
+ {
2468
+ type: 'function',
2469
+ inputs: [
2470
+ {
2471
+ name: 'key',
2472
+ internalType: 'struct PoolKey',
2473
+ type: 'tuple',
2474
+ components: [
2475
+ { name: 'base', internalType: 'address', type: 'address' },
2476
+ { name: 'quote', internalType: 'address', type: 'address' },
2477
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2478
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2479
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2480
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2481
+ ],
2482
+ },
2483
+ ],
2484
+ name: 'expectedReserveBase',
2485
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
2486
+ stateMutability: 'view',
2487
+ },
2488
+ {
2489
+ type: 'function',
2490
+ inputs: [
2491
+ { name: 'poolIds', internalType: 'bytes32[]', type: 'bytes32[]' },
2492
+ { name: 'owner', internalType: 'address', type: 'address' },
2493
+ ],
2494
+ name: 'fNavOf',
2495
+ outputs: [
2496
+ {
2497
+ name: 'out',
2498
+ internalType: 'struct LogswapLens.FHolding[]',
2499
+ type: 'tuple[]',
2500
+ components: [
2501
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
2502
+ { name: 'quote', internalType: 'address', type: 'address' },
2503
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
2504
+ { name: 'value', internalType: 'uint256', type: 'uint256' },
2505
+ ],
2506
+ },
2507
+ ],
2508
+ stateMutability: 'view',
2509
+ },
2510
+ {
2511
+ type: 'function',
2512
+ inputs: [
2513
+ {
2514
+ name: 'key',
2515
+ internalType: 'struct PoolKey',
2516
+ type: 'tuple',
2517
+ components: [
2518
+ { name: 'base', internalType: 'address', type: 'address' },
2519
+ { name: 'quote', internalType: 'address', type: 'address' },
2520
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2521
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2522
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2523
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2524
+ ],
2525
+ },
2526
+ { name: 'floor', internalType: 'int256', type: 'int256' },
2527
+ { name: 'who', internalType: 'address', type: 'address' },
2528
+ ],
2529
+ name: 'feesOf',
2530
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
2531
+ stateMutability: 'view',
2532
+ },
2533
+ {
2534
+ type: 'function',
2535
+ inputs: [
2536
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
2537
+ { name: 'who', internalType: 'address', type: 'address' },
2538
+ ],
2539
+ name: 'feesOfById',
2540
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
2541
+ stateMutability: 'view',
2542
+ },
2543
+ {
2544
+ type: 'function',
2545
+ inputs: [],
2546
+ name: 'fmgr',
2547
+ outputs: [
2548
+ { name: '', internalType: 'contract FPoolManager', type: 'address' },
2549
+ ],
2550
+ stateMutability: 'view',
2551
+ },
2552
+ {
2553
+ type: 'function',
2554
+ inputs: [{ name: 'pids', internalType: 'bytes32[]', type: 'bytes32[]' }],
2555
+ name: 'getFPools',
2556
+ outputs: [
2557
+ {
2558
+ name: 'out',
2559
+ internalType: 'struct FPoolManager.Pool[]',
2560
+ type: 'tuple[]',
2561
+ components: [
2562
+ { name: 'quote', internalType: 'address', type: 'address' },
2563
+ { name: 'phi', internalType: 'uint96', type: 'uint96' },
2564
+ { name: 'authority', internalType: 'address', type: 'address' },
2565
+ { name: 'feesOnly', internalType: 'bool', type: 'bool' },
2566
+ { name: 'seeded', internalType: 'bool', type: 'bool' },
2567
+ { name: 'dissolved', internalType: 'bool', type: 'bool' },
2568
+ { name: 'n', internalType: 'uint8', type: 'uint8' },
2569
+ { name: 'restructureBlock', internalType: 'uint32', type: 'uint32' },
2570
+ { name: 'gateMint', internalType: 'bool', type: 'bool' },
2571
+ { name: 'gateSwap', internalType: 'bool', type: 'bool' },
2572
+ { name: 'Q', internalType: 'uint128', type: 'uint128' },
2573
+ { name: 'bigSigma', internalType: 'uint128', type: 'uint128' },
2574
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
2575
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
2576
+ { name: 'theta0', internalType: 'int256', type: 'int256' },
2577
+ { name: 'leverTheta', internalType: 'int256', type: 'int256' },
2578
+ {
2579
+ name: 'pendingAuthority',
2580
+ internalType: 'address',
2581
+ type: 'address',
2582
+ },
2583
+ { name: 'operator', internalType: 'address', type: 'address' },
2584
+ { name: 'minBuffer', internalType: 'uint96', type: 'uint96' },
2585
+ { name: 'incomeTaken', internalType: 'uint256', type: 'uint256' },
2586
+ { name: 'name', internalType: 'bytes32', type: 'bytes32' },
2587
+ ],
2588
+ },
2589
+ ],
2590
+ stateMutability: 'view',
2591
+ },
2592
+ {
2593
+ type: 'function',
2594
+ inputs: [{ name: 'pids', internalType: 'bytes32[]', type: 'bytes32[]' }],
2595
+ name: 'getPools',
2596
+ outputs: [
2597
+ {
2598
+ name: 'out',
2599
+ internalType: 'struct CPoolManager.PoolView[]',
2600
+ type: 'tuple[]',
2601
+ components: [
2602
+ { name: 'initialized', internalType: 'bool', type: 'bool' },
2603
+ { name: 'backstopSeeded', internalType: 'bool', type: 'bool' },
2604
+ { name: 'x', internalType: 'int256', type: 'int256' },
2605
+ { name: 'lActive', internalType: 'uint256', type: 'uint256' },
2606
+ { name: 'reserveBase', internalType: 'uint256', type: 'uint256' },
2607
+ { name: 'reserveQuote', internalType: 'uint256', type: 'uint256' },
2608
+ { name: 'F', internalType: 'uint256', type: 'uint256' },
2609
+ { name: 'bigSigma', internalType: 'uint256', type: 'uint256' },
2610
+ { name: 'sigma2Ema', internalType: 'uint256', type: 'uint256' },
2611
+ { name: 'currentK', internalType: 'int256', type: 'int256' },
2612
+ { name: 'protocolOwed', internalType: 'uint256', type: 'uint256' },
2613
+ { name: 'minBackstopL', internalType: 'uint256', type: 'uint256' },
2614
+ { name: 'backstopFloor', internalType: 'int256', type: 'int256' },
2615
+ ],
2616
+ },
2617
+ ],
2618
+ stateMutability: 'view',
2619
+ },
2620
+ {
2621
+ type: 'function',
2622
+ inputs: [
2623
+ {
2624
+ name: 'key',
2625
+ internalType: 'struct PoolKey',
2626
+ type: 'tuple',
2627
+ components: [
2628
+ { name: 'base', internalType: 'address', type: 'address' },
2629
+ { name: 'quote', internalType: 'address', type: 'address' },
2630
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2631
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2632
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2633
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2634
+ ],
2635
+ },
2636
+ { name: 'owner', internalType: 'address', type: 'address' },
2637
+ { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
2638
+ ],
2639
+ name: 'heldByIds',
2640
+ outputs: [
2641
+ {
2642
+ name: 'out',
2643
+ internalType: 'struct LogswapLens.Holding[]',
2644
+ type: 'tuple[]',
2645
+ components: [
2646
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
2647
+ { name: 'floor', internalType: 'int256', type: 'int256' },
2648
+ { name: 'cap', internalType: 'int256', type: 'int256' },
2649
+ { name: 'capped', internalType: 'bool', type: 'bool' },
2650
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
2651
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
2652
+ { name: 'fees', internalType: 'uint256', type: 'uint256' },
2653
+ ],
2654
+ },
2655
+ ],
2656
+ stateMutability: 'view',
2657
+ },
2658
+ {
2659
+ type: 'function',
2660
+ inputs: [
2661
+ {
2662
+ name: 'key',
2663
+ internalType: 'struct PoolKey',
2664
+ type: 'tuple',
2665
+ components: [
2666
+ { name: 'base', internalType: 'address', type: 'address' },
2667
+ { name: 'quote', internalType: 'address', type: 'address' },
2668
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2669
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2670
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2671
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2672
+ ],
2673
+ },
2674
+ { name: 'floor', internalType: 'int256', type: 'int256' },
2675
+ ],
2676
+ name: 'isValidFloor',
2677
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
2678
+ stateMutability: 'pure',
2679
+ },
2680
+ {
2681
+ type: 'function',
2682
+ inputs: [
2683
+ {
2684
+ name: 'key',
2685
+ internalType: 'struct PoolKey',
2686
+ type: 'tuple',
2687
+ components: [
2688
+ { name: 'base', internalType: 'address', type: 'address' },
2689
+ { name: 'quote', internalType: 'address', type: 'address' },
2690
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2691
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2692
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2693
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2694
+ ],
2695
+ },
2696
+ ],
2697
+ name: 'lActiveExpected',
2698
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
2699
+ stateMutability: 'view',
2700
+ },
2701
+ {
2702
+ type: 'function',
2703
+ inputs: [
2704
+ {
2705
+ name: 'key',
2706
+ internalType: 'struct PoolKey',
2707
+ type: 'tuple',
2708
+ components: [
2709
+ { name: 'base', internalType: 'address', type: 'address' },
2710
+ { name: 'quote', internalType: 'address', type: 'address' },
2711
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2712
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2713
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2714
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2715
+ ],
2716
+ },
2717
+ ],
2718
+ name: 'ladderWellFormed',
2719
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
2720
+ stateMutability: 'view',
2721
+ },
2722
+ {
2723
+ type: 'function',
2724
+ inputs: [
2725
+ {
2726
+ name: 'key',
2727
+ internalType: 'struct PoolKey',
2728
+ type: 'tuple',
2729
+ components: [
2730
+ { name: 'base', internalType: 'address', type: 'address' },
2731
+ { name: 'quote', internalType: 'address', type: 'address' },
2732
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2733
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2734
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2735
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2736
+ ],
2737
+ },
2738
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
2739
+ { name: 'holder', internalType: 'address', type: 'address' },
2740
+ ],
2741
+ name: 'legsOf',
2742
+ outputs: [
2743
+ { name: 'base', internalType: 'uint256', type: 'uint256' },
2744
+ { name: 'quote', internalType: 'uint256', type: 'uint256' },
2745
+ { name: 'fees', internalType: 'uint256', type: 'uint256' },
2746
+ { name: 'value', internalType: 'uint256', type: 'uint256' },
2747
+ ],
2748
+ stateMutability: 'view',
2749
+ },
2750
+ {
2751
+ type: 'function',
2752
+ inputs: [
2753
+ {
2754
+ name: 'key',
2755
+ internalType: 'struct PoolKey',
2756
+ type: 'tuple',
2757
+ components: [
2758
+ { name: 'base', internalType: 'address', type: 'address' },
2759
+ { name: 'quote', internalType: 'address', type: 'address' },
2760
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2761
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2762
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2763
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2764
+ ],
2765
+ },
2766
+ ],
2767
+ name: 'liveTicks',
2768
+ outputs: [{ name: 'ticks', internalType: 'int256[]', type: 'int256[]' }],
2769
+ stateMutability: 'view',
2770
+ },
2771
+ {
2772
+ type: 'function',
2773
+ inputs: [],
2774
+ name: 'mgr',
2775
+ outputs: [
2776
+ { name: '', internalType: 'contract CPoolManager', type: 'address' },
2777
+ ],
2778
+ stateMutability: 'view',
2779
+ },
2780
+ {
2781
+ type: 'function',
2782
+ inputs: [
2783
+ {
2784
+ name: 'key',
2785
+ internalType: 'struct PoolKey',
2786
+ type: 'tuple',
2787
+ components: [
2788
+ { name: 'base', internalType: 'address', type: 'address' },
2789
+ { name: 'quote', internalType: 'address', type: 'address' },
2790
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2791
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2792
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2793
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2794
+ ],
2795
+ },
2796
+ { name: 'owner', internalType: 'address', type: 'address' },
2797
+ { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
2798
+ ],
2799
+ name: 'navOf',
2800
+ outputs: [
2801
+ { name: 'value', internalType: 'uint256', type: 'uint256' },
2802
+ { name: 'base', internalType: 'uint256', type: 'uint256' },
2803
+ { name: 'quote', internalType: 'uint256', type: 'uint256' },
2804
+ { name: 'fees', internalType: 'uint256', type: 'uint256' },
2805
+ {
2806
+ name: 'positions',
2807
+ internalType: 'struct LogswapLens.PositionValue[]',
2808
+ type: 'tuple[]',
2809
+ components: [
2810
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
2811
+ { name: 'base', internalType: 'uint256', type: 'uint256' },
2812
+ { name: 'quote', internalType: 'uint256', type: 'uint256' },
2813
+ { name: 'fees', internalType: 'uint256', type: 'uint256' },
2814
+ { name: 'value', internalType: 'uint256', type: 'uint256' },
2815
+ ],
2816
+ },
2817
+ ],
2818
+ stateMutability: 'view',
2819
+ },
2820
+ {
2821
+ type: 'function',
2822
+ inputs: [
2823
+ {
2824
+ name: 'key',
2825
+ internalType: 'struct PoolKey',
2826
+ type: 'tuple',
2827
+ components: [
2828
+ { name: 'base', internalType: 'address', type: 'address' },
2829
+ { name: 'quote', internalType: 'address', type: 'address' },
2830
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2831
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2832
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2833
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2834
+ ],
2835
+ },
2836
+ ],
2837
+ name: 'pointerConsistent',
2838
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
2839
+ stateMutability: 'view',
2840
+ },
2841
+ {
2842
+ type: 'function',
2843
+ inputs: [
2844
+ {
2845
+ name: 'key',
2846
+ internalType: 'struct PoolKey',
2847
+ type: 'tuple',
2848
+ components: [
2849
+ { name: 'base', internalType: 'address', type: 'address' },
2850
+ { name: 'quote', internalType: 'address', type: 'address' },
2851
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2852
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2853
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2854
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2855
+ ],
2856
+ },
2857
+ { name: 'owner', internalType: 'address', type: 'address' },
2858
+ ],
2859
+ name: 'positionsOf',
2860
+ outputs: [
2861
+ {
2862
+ name: 'held',
2863
+ internalType: 'struct LogswapLens.HeldPosition[]',
2864
+ type: 'tuple[]',
2865
+ components: [
2866
+ { name: 'id', internalType: 'uint256', type: 'uint256' },
2867
+ { name: 'floor', internalType: 'int256', type: 'int256' },
2868
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
2869
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
2870
+ { name: 'fees', internalType: 'uint256', type: 'uint256' },
2871
+ ],
2872
+ },
2873
+ ],
2874
+ stateMutability: 'view',
2875
+ },
2876
+ {
2877
+ type: 'function',
2878
+ inputs: [
2879
+ {
2880
+ name: 'key',
2881
+ internalType: 'struct PoolKey',
2882
+ type: 'tuple',
2883
+ components: [
2884
+ { name: 'base', internalType: 'address', type: 'address' },
2885
+ { name: 'quote', internalType: 'address', type: 'address' },
2886
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2887
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2888
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2889
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2890
+ ],
2891
+ },
2892
+ { name: 'targetFloor', internalType: 'int256', type: 'int256' },
2893
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
2894
+ ],
2895
+ name: 'previewBlend',
2896
+ outputs: [
2897
+ { name: 'loFloor', internalType: 'int256', type: 'int256' },
2898
+ { name: 'hiFloor', internalType: 'int256', type: 'int256' },
2899
+ { name: 'loL', internalType: 'uint256', type: 'uint256' },
2900
+ { name: 'hiL', internalType: 'uint256', type: 'uint256' },
2901
+ ],
2902
+ stateMutability: 'pure',
2903
+ },
2904
+ {
2905
+ type: 'function',
2906
+ inputs: [
2907
+ {
2908
+ name: 'key',
2909
+ internalType: 'struct PoolKey',
2910
+ type: 'tuple',
2911
+ components: [
2912
+ { name: 'base', internalType: 'address', type: 'address' },
2913
+ { name: 'quote', internalType: 'address', type: 'address' },
2914
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2915
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2916
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2917
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2918
+ ],
2919
+ },
2920
+ { name: 'baseIn', internalType: 'bool', type: 'bool' },
2921
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
2922
+ ],
2923
+ name: 'previewSwapExactIn',
2924
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
2925
+ stateMutability: 'nonpayable',
2926
+ },
2927
+ {
2928
+ type: 'function',
2929
+ inputs: [
2930
+ {
2931
+ name: 'key',
2932
+ internalType: 'struct PoolKey',
2933
+ type: 'tuple',
2934
+ components: [
2935
+ { name: 'base', internalType: 'address', type: 'address' },
2936
+ { name: 'quote', internalType: 'address', type: 'address' },
2937
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2938
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2939
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2940
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2941
+ ],
2942
+ },
2943
+ { name: 'baseIn', internalType: 'bool', type: 'bool' },
2944
+ { name: 'amounts', internalType: 'uint256[]', type: 'uint256[]' },
2945
+ ],
2946
+ name: 'previewSwapExactInBatch',
2947
+ outputs: [{ name: 'outs', internalType: 'uint256[]', type: 'uint256[]' }],
2948
+ stateMutability: 'nonpayable',
2949
+ },
2950
+ {
2951
+ type: 'function',
2952
+ inputs: [
2953
+ {
2954
+ name: 'key',
2955
+ internalType: 'struct PoolKey',
2956
+ type: 'tuple',
2957
+ components: [
2958
+ { name: 'base', internalType: 'address', type: 'address' },
2959
+ { name: 'quote', internalType: 'address', type: 'address' },
2960
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2961
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2962
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2963
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2964
+ ],
2965
+ },
2966
+ { name: 'baseOut', internalType: 'bool', type: 'bool' },
2967
+ { name: 'amountOut', internalType: 'uint256', type: 'uint256' },
2968
+ ],
2969
+ name: 'previewSwapExactOut',
2970
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
2971
+ stateMutability: 'nonpayable',
2972
+ },
2973
+ {
2974
+ type: 'function',
2975
+ inputs: [
2976
+ {
2977
+ name: 'key',
2978
+ internalType: 'struct PoolKey',
2979
+ type: 'tuple',
2980
+ components: [
2981
+ { name: 'base', internalType: 'address', type: 'address' },
2982
+ { name: 'quote', internalType: 'address', type: 'address' },
2983
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
2984
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
2985
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
2986
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
2987
+ ],
2988
+ },
2989
+ { name: 'fromId', internalType: 'uint256', type: 'uint256' },
2990
+ { name: 'holder', internalType: 'address', type: 'address' },
2991
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
2992
+ { name: 'toFloor', internalType: 'int256', type: 'int256' },
2993
+ { name: 'toCap', internalType: 'int256', type: 'int256' },
2994
+ { name: 'newL', internalType: 'uint256', type: 'uint256' },
2995
+ ],
2996
+ name: 'previewUpdate',
2997
+ outputs: [
2998
+ { name: 'dBase', internalType: 'int256', type: 'int256' },
2999
+ { name: 'dQuote', internalType: 'int256', type: 'int256' },
3000
+ { name: 'fees', internalType: 'uint256', type: 'uint256' },
3001
+ ],
3002
+ stateMutability: 'view',
3003
+ },
3004
+ {
3005
+ type: 'function',
3006
+ inputs: [
3007
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3008
+ { name: 'dL', internalType: 'uint256', type: 'uint256' },
3009
+ ],
3010
+ name: 'previewZapIn',
3011
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3012
+ stateMutability: 'view',
3013
+ },
3014
+ {
3015
+ type: 'function',
3016
+ inputs: [
3017
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3018
+ { name: 'j', internalType: 'uint256', type: 'uint256' },
3019
+ { name: 'baseOut', internalType: 'uint256', type: 'uint256' },
3020
+ ],
3021
+ name: 'quoteForBaseOut',
3022
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3023
+ stateMutability: 'view',
3024
+ },
3025
+ {
3026
+ type: 'function',
3027
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
3028
+ name: 'shareValue',
3029
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3030
+ stateMutability: 'view',
3031
+ },
3032
+ {
3033
+ type: 'function',
3034
+ inputs: [
3035
+ {
3036
+ name: 'key',
3037
+ internalType: 'struct PoolKey',
3038
+ type: 'tuple',
3039
+ components: [
3040
+ { name: 'base', internalType: 'address', type: 'address' },
3041
+ { name: 'quote', internalType: 'address', type: 'address' },
3042
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3043
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3044
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3045
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3046
+ ],
3047
+ },
3048
+ ],
3049
+ name: 'ticksLength',
3050
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3051
+ stateMutability: 'view',
3052
+ },
3053
+ {
3054
+ type: 'function',
3055
+ inputs: [{ name: 'id', internalType: 'uint256', type: 'uint256' }],
3056
+ name: 'unpack',
3057
+ outputs: [
3058
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3059
+ { name: 'kFloor', internalType: 'int256', type: 'int256' },
3060
+ { name: 'kCap', internalType: 'int256', type: 'int256' },
3061
+ { name: 'capped', internalType: 'bool', type: 'bool' },
3062
+ ],
3063
+ stateMutability: 'view',
3064
+ },
3065
+ { type: 'error', inputs: [], name: 'BelowFloor' },
3066
+ { type: 'error', inputs: [], name: 'DrainsBase' },
3067
+ { type: 'error', inputs: [], name: 'UnexpectedQuoteSuccess' },
3068
+ { type: 'error', inputs: [], name: 'UnknownId' },
3069
+ ] as const
3070
+
3071
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3072
+ // LogswapRouter
3073
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3074
+
3075
+ export const logswapRouterAbi = [
3076
+ {
3077
+ type: 'constructor',
3078
+ inputs: [
3079
+ { name: '_mgr', internalType: 'contract CPoolManager', type: 'address' },
3080
+ { name: '_fmgr', internalType: 'contract FPoolManager', type: 'address' },
3081
+ { name: '_permit2', internalType: 'address', type: 'address' },
3082
+ ],
3083
+ stateMutability: 'nonpayable',
3084
+ },
3085
+ {
3086
+ type: 'function',
3087
+ inputs: [],
3088
+ name: 'NO_CAP',
3089
+ outputs: [{ name: '', internalType: 'int256', type: 'int256' }],
3090
+ stateMutability: 'view',
3091
+ },
3092
+ {
3093
+ type: 'function',
3094
+ inputs: [
3095
+ { name: 'owner', internalType: 'address', type: 'address' },
3096
+ {
3097
+ name: 'permitSingle',
3098
+ internalType: 'struct IPermit2.PermitSingle',
3099
+ type: 'tuple',
3100
+ components: [
3101
+ {
3102
+ name: 'details',
3103
+ internalType: 'struct IPermit2.PermitDetails',
3104
+ type: 'tuple',
3105
+ components: [
3106
+ { name: 'token', internalType: 'address', type: 'address' },
3107
+ { name: 'amount', internalType: 'uint160', type: 'uint160' },
3108
+ { name: 'expiration', internalType: 'uint48', type: 'uint48' },
3109
+ { name: 'nonce', internalType: 'uint48', type: 'uint48' },
3110
+ ],
3111
+ },
3112
+ { name: 'spender', internalType: 'address', type: 'address' },
3113
+ { name: 'sigDeadline', internalType: 'uint256', type: 'uint256' },
3114
+ ],
3115
+ },
3116
+ { name: 'signature', internalType: 'bytes', type: 'bytes' },
3117
+ ],
3118
+ name: 'applyPermit2',
3119
+ outputs: [],
3120
+ stateMutability: 'nonpayable',
3121
+ },
3122
+ {
3123
+ type: 'function',
3124
+ inputs: [
3125
+ {
3126
+ name: 'key',
3127
+ internalType: 'struct PoolKey',
3128
+ type: 'tuple',
3129
+ components: [
3130
+ { name: 'base', internalType: 'address', type: 'address' },
3131
+ { name: 'quote', internalType: 'address', type: 'address' },
3132
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3133
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3134
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3135
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3136
+ ],
3137
+ },
3138
+ { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3139
+ { name: 'shares', internalType: 'uint256[]', type: 'uint256[]' },
3140
+ { name: 'minBaseOut', internalType: 'uint256', type: 'uint256' },
3141
+ { name: 'minQuoteOut', internalType: 'uint256', type: 'uint256' },
3142
+ { name: 'recipient', internalType: 'address', type: 'address' },
3143
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3144
+ ],
3145
+ name: 'burn',
3146
+ outputs: [
3147
+ { name: 'baseOut', internalType: 'uint256', type: 'uint256' },
3148
+ { name: 'quoteOut', internalType: 'uint256', type: 'uint256' },
3149
+ ],
3150
+ stateMutability: 'nonpayable',
3151
+ },
3152
+ {
3153
+ type: 'function',
3154
+ inputs: [
3155
+ {
3156
+ name: 'key',
3157
+ internalType: 'struct PoolKey',
3158
+ type: 'tuple',
3159
+ components: [
3160
+ { name: 'base', internalType: 'address', type: 'address' },
3161
+ { name: 'quote', internalType: 'address', type: 'address' },
3162
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3163
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3164
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3165
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3166
+ ],
3167
+ },
3168
+ { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3169
+ { name: 'recipient', internalType: 'address', type: 'address' },
3170
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3171
+ ],
3172
+ name: 'claim',
3173
+ outputs: [{ name: 'total', internalType: 'uint256', type: 'uint256' }],
3174
+ stateMutability: 'nonpayable',
3175
+ },
3176
+ {
3177
+ type: 'function',
3178
+ inputs: [
3179
+ {
3180
+ name: 'key',
3181
+ internalType: 'struct PoolKey',
3182
+ type: 'tuple',
3183
+ components: [
3184
+ { name: 'base', internalType: 'address', type: 'address' },
3185
+ { name: 'quote', internalType: 'address', type: 'address' },
3186
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3187
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3188
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3189
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3190
+ ],
3191
+ },
3192
+ { name: 'x0', internalType: 'int256', type: 'int256' },
3193
+ { name: 'targetFloor', internalType: 'int256', type: 'int256' },
3194
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
3195
+ { name: 'maxBaseIn', internalType: 'uint256', type: 'uint256' },
3196
+ { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
3197
+ { name: 'recipient', internalType: 'address', type: 'address' },
3198
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3199
+ ],
3200
+ name: 'createMarket',
3201
+ outputs: [
3202
+ { name: 'pid', internalType: 'bytes32', type: 'bytes32' },
3203
+ { name: 'baseIn', internalType: 'uint256', type: 'uint256' },
3204
+ { name: 'quoteIn', internalType: 'uint256', type: 'uint256' },
3205
+ ],
3206
+ stateMutability: 'nonpayable',
3207
+ },
3208
+ {
3209
+ type: 'function',
3210
+ inputs: [
3211
+ {
3212
+ name: 'a',
3213
+ internalType: 'struct BurnAct',
3214
+ type: 'tuple',
3215
+ components: [
3216
+ {
3217
+ name: 'key',
3218
+ internalType: 'struct PoolKey',
3219
+ type: 'tuple',
3220
+ components: [
3221
+ { name: 'base', internalType: 'address', type: 'address' },
3222
+ { name: 'quote', internalType: 'address', type: 'address' },
3223
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3224
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3225
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3226
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3227
+ ],
3228
+ },
3229
+ { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3230
+ { name: 'shares', internalType: 'uint256[]', type: 'uint256[]' },
3231
+ ],
3232
+ },
3233
+ ],
3234
+ name: 'encodeBurn',
3235
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3236
+ stateMutability: 'pure',
3237
+ },
3238
+ {
3239
+ type: 'function',
3240
+ inputs: [
3241
+ {
3242
+ name: 'a',
3243
+ internalType: 'struct ClaimAct',
3244
+ type: 'tuple',
3245
+ components: [
3246
+ {
3247
+ name: 'key',
3248
+ internalType: 'struct PoolKey',
3249
+ type: 'tuple',
3250
+ components: [
3251
+ { name: 'base', internalType: 'address', type: 'address' },
3252
+ { name: 'quote', internalType: 'address', type: 'address' },
3253
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3254
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3255
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3256
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3257
+ ],
3258
+ },
3259
+ { name: 'ids', internalType: 'uint256[]', type: 'uint256[]' },
3260
+ ],
3261
+ },
3262
+ ],
3263
+ name: 'encodeClaim',
3264
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3265
+ stateMutability: 'pure',
3266
+ },
3267
+ {
3268
+ type: 'function',
3269
+ inputs: [
3270
+ {
3271
+ name: 'a',
3272
+ internalType: 'struct MintAct',
3273
+ type: 'tuple',
3274
+ components: [
3275
+ {
3276
+ name: 'key',
3277
+ internalType: 'struct PoolKey',
3278
+ type: 'tuple',
3279
+ components: [
3280
+ { name: 'base', internalType: 'address', type: 'address' },
3281
+ { name: 'quote', internalType: 'address', type: 'address' },
3282
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3283
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3284
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3285
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3286
+ ],
3287
+ },
3288
+ { name: 'targetFloor', internalType: 'int256', type: 'int256' },
3289
+ { name: 'cap', internalType: 'int256', type: 'int256' },
3290
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
3291
+ ],
3292
+ },
3293
+ ],
3294
+ name: 'encodeMint',
3295
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3296
+ stateMutability: 'pure',
3297
+ },
3298
+ {
3299
+ type: 'function',
3300
+ inputs: [
3301
+ {
3302
+ name: 'a',
3303
+ internalType: 'struct PathAct',
3304
+ type: 'tuple',
3305
+ components: [
3306
+ {
3307
+ name: 'hops',
3308
+ internalType: 'struct Hop[]',
3309
+ type: 'tuple[]',
3310
+ components: [
3311
+ {
3312
+ name: 'key',
3313
+ internalType: 'struct PoolKey',
3314
+ type: 'tuple',
3315
+ components: [
3316
+ { name: 'base', internalType: 'address', type: 'address' },
3317
+ { name: 'quote', internalType: 'address', type: 'address' },
3318
+ {
3319
+ name: 'tickSpacing',
3320
+ internalType: 'int256',
3321
+ type: 'int256',
3322
+ },
3323
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3324
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3325
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3326
+ ],
3327
+ },
3328
+ { name: 'baseIn', internalType: 'bool', type: 'bool' },
3329
+ ],
3330
+ },
3331
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
3332
+ { name: 'minOut', internalType: 'uint256', type: 'uint256' },
3333
+ ],
3334
+ },
3335
+ ],
3336
+ name: 'encodePath',
3337
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3338
+ stateMutability: 'pure',
3339
+ },
3340
+ {
3341
+ type: 'function',
3342
+ inputs: [
3343
+ {
3344
+ name: 'a',
3345
+ internalType: 'struct SwapAct',
3346
+ type: 'tuple',
3347
+ components: [
3348
+ {
3349
+ name: 'key',
3350
+ internalType: 'struct PoolKey',
3351
+ type: 'tuple',
3352
+ components: [
3353
+ { name: 'base', internalType: 'address', type: 'address' },
3354
+ { name: 'quote', internalType: 'address', type: 'address' },
3355
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3356
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3357
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3358
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3359
+ ],
3360
+ },
3361
+ { name: 'baseSide', internalType: 'bool', type: 'bool' },
3362
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
3363
+ { name: 'limit', internalType: 'uint256', type: 'uint256' },
3364
+ ],
3365
+ },
3366
+ ],
3367
+ name: 'encodeSwap',
3368
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3369
+ stateMutability: 'pure',
3370
+ },
3371
+ {
3372
+ type: 'function',
3373
+ inputs: [
3374
+ {
3375
+ name: 'a',
3376
+ internalType: 'struct UpdateAct',
3377
+ type: 'tuple',
3378
+ components: [
3379
+ {
3380
+ name: 'key',
3381
+ internalType: 'struct PoolKey',
3382
+ type: 'tuple',
3383
+ components: [
3384
+ { name: 'base', internalType: 'address', type: 'address' },
3385
+ { name: 'quote', internalType: 'address', type: 'address' },
3386
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3387
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3388
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3389
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3390
+ ],
3391
+ },
3392
+ { name: 'fromId', internalType: 'uint256', type: 'uint256' },
3393
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
3394
+ { name: 'toFloor', internalType: 'int256', type: 'int256' },
3395
+ { name: 'toCap', internalType: 'int256', type: 'int256' },
3396
+ { name: 'newL', internalType: 'uint256', type: 'uint256' },
3397
+ ],
3398
+ },
3399
+ ],
3400
+ name: 'encodeUpdate',
3401
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3402
+ stateMutability: 'pure',
3403
+ },
3404
+ {
3405
+ type: 'function',
3406
+ inputs: [
3407
+ {
3408
+ name: 'actions',
3409
+ internalType: 'struct Action[]',
3410
+ type: 'tuple[]',
3411
+ components: [
3412
+ { name: 'op', internalType: 'enum OpType', type: 'uint8' },
3413
+ { name: 'data', internalType: 'bytes', type: 'bytes' },
3414
+ ],
3415
+ },
3416
+ {
3417
+ name: 'settle',
3418
+ internalType: 'struct Settle',
3419
+ type: 'tuple',
3420
+ components: [
3421
+ { name: 'tokens', internalType: 'address[]', type: 'address[]' },
3422
+ { name: 'maxIn', internalType: 'uint256[]', type: 'uint256[]' },
3423
+ { name: 'minOut', internalType: 'uint256[]', type: 'uint256[]' },
3424
+ { name: 'recipient', internalType: 'address', type: 'address' },
3425
+ ],
3426
+ },
3427
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3428
+ ],
3429
+ name: 'execute',
3430
+ outputs: [
3431
+ { name: 'results', internalType: 'bytes[]', type: 'bytes[]' },
3432
+ { name: 'flows', internalType: 'int256[]', type: 'int256[]' },
3433
+ ],
3434
+ stateMutability: 'nonpayable',
3435
+ },
3436
+ {
3437
+ type: 'function',
3438
+ inputs: [],
3439
+ name: 'facetF',
3440
+ outputs: [
3441
+ { name: '', internalType: 'contract LogswapRouterF', type: 'address' },
3442
+ ],
3443
+ stateMutability: 'view',
3444
+ },
3445
+ {
3446
+ type: 'function',
3447
+ inputs: [],
3448
+ name: 'fmgr',
3449
+ outputs: [
3450
+ { name: '', internalType: 'contract FPoolManager', type: 'address' },
3451
+ ],
3452
+ stateMutability: 'view',
3453
+ },
3454
+ {
3455
+ type: 'function',
3456
+ inputs: [],
3457
+ name: 'mgr',
3458
+ outputs: [
3459
+ { name: '', internalType: 'contract CPoolManager', type: 'address' },
3460
+ ],
3461
+ stateMutability: 'view',
3462
+ },
3463
+ {
3464
+ type: 'function',
3465
+ inputs: [
3466
+ {
3467
+ name: 'key',
3468
+ internalType: 'struct PoolKey',
3469
+ type: 'tuple',
3470
+ components: [
3471
+ { name: 'base', internalType: 'address', type: 'address' },
3472
+ { name: 'quote', internalType: 'address', type: 'address' },
3473
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3474
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3475
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3476
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3477
+ ],
3478
+ },
3479
+ { name: 'targetFloor', internalType: 'int256', type: 'int256' },
3480
+ { name: 'cap', internalType: 'int256', type: 'int256' },
3481
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
3482
+ { name: 'maxBaseIn', internalType: 'uint256', type: 'uint256' },
3483
+ { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
3484
+ { name: 'recipient', internalType: 'address', type: 'address' },
3485
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3486
+ ],
3487
+ name: 'mintBlended',
3488
+ outputs: [
3489
+ { name: 'baseIn', internalType: 'uint256', type: 'uint256' },
3490
+ { name: 'quoteIn', internalType: 'uint256', type: 'uint256' },
3491
+ ],
3492
+ stateMutability: 'nonpayable',
3493
+ },
3494
+ {
3495
+ type: 'function',
3496
+ inputs: [
3497
+ {
3498
+ name: 'key',
3499
+ internalType: 'struct PoolKey',
3500
+ type: 'tuple',
3501
+ components: [
3502
+ { name: 'base', internalType: 'address', type: 'address' },
3503
+ { name: 'quote', internalType: 'address', type: 'address' },
3504
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3505
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3506
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3507
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3508
+ ],
3509
+ },
3510
+ { name: 'fromId', internalType: 'uint256', type: 'uint256' },
3511
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
3512
+ { name: 'toFloor', internalType: 'int256', type: 'int256' },
3513
+ { name: 'toCap', internalType: 'int256', type: 'int256' },
3514
+ { name: 'maxBaseIn', internalType: 'uint256', type: 'uint256' },
3515
+ { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
3516
+ { name: 'recipient', internalType: 'address', type: 'address' },
3517
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3518
+ ],
3519
+ name: 'move',
3520
+ outputs: [
3521
+ { name: 'dBase', internalType: 'int256', type: 'int256' },
3522
+ { name: 'dQuote', internalType: 'int256', type: 'int256' },
3523
+ { name: 'newShares', internalType: 'uint256', type: 'uint256' },
3524
+ ],
3525
+ stateMutability: 'nonpayable',
3526
+ },
3527
+ {
3528
+ type: 'function',
3529
+ inputs: [{ name: 'data', internalType: 'bytes[]', type: 'bytes[]' }],
3530
+ name: 'multicall',
3531
+ outputs: [{ name: 'results', internalType: 'bytes[]', type: 'bytes[]' }],
3532
+ stateMutability: 'nonpayable',
3533
+ },
3534
+ {
3535
+ type: 'function',
3536
+ inputs: [],
3537
+ name: 'permit2',
3538
+ outputs: [{ name: '', internalType: 'contract IPermit2', type: 'address' }],
3539
+ stateMutability: 'view',
3540
+ },
3541
+ {
3542
+ type: 'function',
3543
+ inputs: [
3544
+ { name: '', internalType: 'bytes32', type: 'bytes32' },
3545
+ { name: '', internalType: 'enum FPoolManager.QuoteKind', type: 'uint8' },
3546
+ { name: '', internalType: 'uint256', type: 'uint256' },
3547
+ { name: '', internalType: 'uint256', type: 'uint256' },
3548
+ { name: '', internalType: 'uint256', type: 'uint256' },
3549
+ { name: '', internalType: 'uint256', type: 'uint256' },
3550
+ { name: '', internalType: 'address', type: 'address' },
3551
+ { name: '', internalType: 'uint256', type: 'uint256' },
3552
+ ],
3553
+ name: 'swapExactIn',
3554
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3555
+ stateMutability: 'nonpayable',
3556
+ },
3557
+ {
3558
+ type: 'function',
3559
+ inputs: [
3560
+ {
3561
+ name: 'key',
3562
+ internalType: 'struct PoolKey',
3563
+ type: 'tuple',
3564
+ components: [
3565
+ { name: 'base', internalType: 'address', type: 'address' },
3566
+ { name: 'quote', internalType: 'address', type: 'address' },
3567
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3568
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3569
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3570
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3571
+ ],
3572
+ },
3573
+ { name: 'baseIn', internalType: 'bool', type: 'bool' },
3574
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
3575
+ { name: 'minOut', internalType: 'uint256', type: 'uint256' },
3576
+ { name: 'recipient', internalType: 'address', type: 'address' },
3577
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3578
+ ],
3579
+ name: 'swapExactIn',
3580
+ outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
3581
+ stateMutability: 'nonpayable',
3582
+ },
3583
+ {
3584
+ type: 'function',
3585
+ inputs: [
3586
+ {
3587
+ name: 'hops',
3588
+ internalType: 'struct Hop[]',
3589
+ type: 'tuple[]',
3590
+ components: [
3591
+ {
3592
+ name: 'key',
3593
+ internalType: 'struct PoolKey',
3594
+ type: 'tuple',
3595
+ components: [
3596
+ { name: 'base', internalType: 'address', type: 'address' },
3597
+ { name: 'quote', internalType: 'address', type: 'address' },
3598
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3599
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3600
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3601
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3602
+ ],
3603
+ },
3604
+ { name: 'baseIn', internalType: 'bool', type: 'bool' },
3605
+ ],
3606
+ },
3607
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
3608
+ { name: 'minOut', internalType: 'uint256', type: 'uint256' },
3609
+ { name: 'recipient', internalType: 'address', type: 'address' },
3610
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3611
+ ],
3612
+ name: 'swapExactInPath',
3613
+ outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
3614
+ stateMutability: 'nonpayable',
3615
+ },
3616
+ {
3617
+ type: 'function',
3618
+ inputs: [
3619
+ {
3620
+ name: 'key',
3621
+ internalType: 'struct PoolKey',
3622
+ type: 'tuple',
3623
+ components: [
3624
+ { name: 'base', internalType: 'address', type: 'address' },
3625
+ { name: 'quote', internalType: 'address', type: 'address' },
3626
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3627
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3628
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3629
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3630
+ ],
3631
+ },
3632
+ { name: 'baseOut', internalType: 'bool', type: 'bool' },
3633
+ { name: 'amountOut', internalType: 'uint256', type: 'uint256' },
3634
+ { name: 'maxIn', internalType: 'uint256', type: 'uint256' },
3635
+ { name: 'recipient', internalType: 'address', type: 'address' },
3636
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3637
+ ],
3638
+ name: 'swapExactOut',
3639
+ outputs: [{ name: 'amountIn', internalType: 'uint256', type: 'uint256' }],
3640
+ stateMutability: 'nonpayable',
3641
+ },
3642
+ {
3643
+ type: 'function',
3644
+ inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
3645
+ name: 'unlockCallback',
3646
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
3647
+ stateMutability: 'nonpayable',
3648
+ },
3649
+ {
3650
+ type: 'function',
3651
+ inputs: [
3652
+ {
3653
+ name: 'key',
3654
+ internalType: 'struct PoolKey',
3655
+ type: 'tuple',
3656
+ components: [
3657
+ { name: 'base', internalType: 'address', type: 'address' },
3658
+ { name: 'quote', internalType: 'address', type: 'address' },
3659
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3660
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3661
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3662
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3663
+ ],
3664
+ },
3665
+ { name: 'fromId', internalType: 'uint256', type: 'uint256' },
3666
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
3667
+ { name: 'toFloor', internalType: 'int256', type: 'int256' },
3668
+ { name: 'toCap', internalType: 'int256', type: 'int256' },
3669
+ { name: 'newL', internalType: 'uint256', type: 'uint256' },
3670
+ { name: 'maxBaseIn', internalType: 'uint256', type: 'uint256' },
3671
+ { name: 'maxQuoteIn', internalType: 'uint256', type: 'uint256' },
3672
+ { name: 'recipient', internalType: 'address', type: 'address' },
3673
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3674
+ ],
3675
+ name: 'update',
3676
+ outputs: [
3677
+ { name: 'dBase', internalType: 'int256', type: 'int256' },
3678
+ { name: 'dQuote', internalType: 'int256', type: 'int256' },
3679
+ { name: 'newShares', internalType: 'uint256', type: 'uint256' },
3680
+ ],
3681
+ stateMutability: 'nonpayable',
3682
+ },
3683
+ {
3684
+ type: 'function',
3685
+ inputs: [
3686
+ {
3687
+ name: 'key',
3688
+ internalType: 'struct PoolKey',
3689
+ type: 'tuple',
3690
+ components: [
3691
+ { name: 'base', internalType: 'address', type: 'address' },
3692
+ { name: 'quote', internalType: 'address', type: 'address' },
3693
+ { name: 'tickSpacing', internalType: 'int256', type: 'int256' },
3694
+ { name: 'phiMin', internalType: 'uint256', type: 'uint256' },
3695
+ { name: 'kappa', internalType: 'uint256', type: 'uint256' },
3696
+ { name: 'alpha', internalType: 'uint256', type: 'uint256' },
3697
+ ],
3698
+ },
3699
+ { name: 'fundWithBase', internalType: 'bool', type: 'bool' },
3700
+ { name: 'amountIn', internalType: 'uint256', type: 'uint256' },
3701
+ { name: 'targetFloor', internalType: 'int256', type: 'int256' },
3702
+ { name: 'cap', internalType: 'int256', type: 'int256' },
3703
+ { name: 'L', internalType: 'uint256', type: 'uint256' },
3704
+ { name: 'maxIn', internalType: 'uint256', type: 'uint256' },
3705
+ { name: 'recipient', internalType: 'address', type: 'address' },
3706
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
3707
+ ],
3708
+ name: 'zapIn',
3709
+ outputs: [
3710
+ { name: 'baseIn', internalType: 'uint256', type: 'uint256' },
3711
+ { name: 'quoteIn', internalType: 'uint256', type: 'uint256' },
3712
+ ],
3713
+ stateMutability: 'nonpayable',
3714
+ },
3715
+ {
3716
+ type: 'function',
3717
+ inputs: [
3718
+ { name: '', internalType: 'bytes32', type: 'bytes32' },
3719
+ { name: '', internalType: 'uint256', type: 'uint256' },
3720
+ { name: '', internalType: 'uint256', type: 'uint256' },
3721
+ { name: '', internalType: 'uint256', type: 'uint256' },
3722
+ { name: '', internalType: 'address', type: 'address' },
3723
+ { name: '', internalType: 'uint256', type: 'uint256' },
3724
+ ],
3725
+ name: 'zapIn',
3726
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3727
+ stateMutability: 'nonpayable',
3728
+ },
3729
+ {
3730
+ type: 'function',
3731
+ inputs: [
3732
+ { name: '', internalType: 'bytes32', type: 'bytes32' },
3733
+ { name: '', internalType: 'uint256', type: 'uint256' },
3734
+ { name: '', internalType: 'address', type: 'address' },
3735
+ { name: '', internalType: 'uint256', type: 'uint256' },
3736
+ { name: '', internalType: 'address', type: 'address' },
3737
+ { name: '', internalType: 'uint256', type: 'uint256' },
3738
+ ],
3739
+ name: 'zapOut',
3740
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3741
+ stateMutability: 'nonpayable',
3742
+ },
3743
+ {
3744
+ type: 'event',
3745
+ anonymous: false,
3746
+ inputs: [
3747
+ { name: 'user', internalType: 'address', type: 'address', indexed: true },
3748
+ ],
3749
+ name: 'RouterCall',
3750
+ },
3751
+ { type: 'error', inputs: [], name: 'BadFloor' },
3752
+ { type: 'error', inputs: [], name: 'BadRecipient' },
3753
+ { type: 'error', inputs: [], name: 'BadToken' },
3754
+ { type: 'error', inputs: [], name: 'DeadlineExceeded' },
3755
+ { type: 'error', inputs: [], name: 'EmptyPath' },
3756
+ { type: 'error', inputs: [], name: 'LengthMismatch' },
3757
+ { type: 'error', inputs: [], name: 'NotManager' },
3758
+ { type: 'error', inputs: [], name: 'SlippageIn' },
3759
+ { type: 'error', inputs: [], name: 'SlippageOut' },
3760
+ { type: 'error', inputs: [], name: 'UnsupportedOp' },
3761
+ { type: 'error', inputs: [], name: 'ZeroAmount' },
3762
+ ] as const