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