@logswap/sdk 0.5.102 → 0.5.104

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