@gitmyabi/boldusdc-gauge 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -2
- package/contracts/LiquidityGaugeV6.d.ts +1759 -0
- package/contracts/LiquidityGaugeV6.js +1869 -0
- package/contracts/LiquidityGaugeV6.ts +2377 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +40 -3
|
@@ -0,0 +1,2377 @@
|
|
|
1
|
+
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
|
+
import { getContract } from 'viem';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* LiquidityGaugeV6 ABI
|
|
6
|
+
*
|
|
7
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
8
|
+
*/
|
|
9
|
+
export const LiquidityGaugeV6Abi = [
|
|
10
|
+
{
|
|
11
|
+
"name": "Deposit",
|
|
12
|
+
"inputs": [
|
|
13
|
+
{
|
|
14
|
+
"name": "provider",
|
|
15
|
+
"type": "address",
|
|
16
|
+
"indexed": true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "value",
|
|
20
|
+
"type": "uint256",
|
|
21
|
+
"indexed": false
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"anonymous": false,
|
|
25
|
+
"type": "event"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "Withdraw",
|
|
29
|
+
"inputs": [
|
|
30
|
+
{
|
|
31
|
+
"name": "provider",
|
|
32
|
+
"type": "address",
|
|
33
|
+
"indexed": true
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "value",
|
|
37
|
+
"type": "uint256",
|
|
38
|
+
"indexed": false
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"anonymous": false,
|
|
42
|
+
"type": "event"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "UpdateLiquidityLimit",
|
|
46
|
+
"inputs": [
|
|
47
|
+
{
|
|
48
|
+
"name": "user",
|
|
49
|
+
"type": "address",
|
|
50
|
+
"indexed": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "original_balance",
|
|
54
|
+
"type": "uint256",
|
|
55
|
+
"indexed": false
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "original_supply",
|
|
59
|
+
"type": "uint256",
|
|
60
|
+
"indexed": false
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "working_balance",
|
|
64
|
+
"type": "uint256",
|
|
65
|
+
"indexed": false
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "working_supply",
|
|
69
|
+
"type": "uint256",
|
|
70
|
+
"indexed": false
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"anonymous": false,
|
|
74
|
+
"type": "event"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "CommitOwnership",
|
|
78
|
+
"inputs": [
|
|
79
|
+
{
|
|
80
|
+
"name": "admin",
|
|
81
|
+
"type": "address",
|
|
82
|
+
"indexed": false
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"anonymous": false,
|
|
86
|
+
"type": "event"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "ApplyOwnership",
|
|
90
|
+
"inputs": [
|
|
91
|
+
{
|
|
92
|
+
"name": "admin",
|
|
93
|
+
"type": "address",
|
|
94
|
+
"indexed": false
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"anonymous": false,
|
|
98
|
+
"type": "event"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "SetGaugeManager",
|
|
102
|
+
"inputs": [
|
|
103
|
+
{
|
|
104
|
+
"name": "_gauge_manager",
|
|
105
|
+
"type": "address",
|
|
106
|
+
"indexed": false
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"anonymous": false,
|
|
110
|
+
"type": "event"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "Transfer",
|
|
114
|
+
"inputs": [
|
|
115
|
+
{
|
|
116
|
+
"name": "_from",
|
|
117
|
+
"type": "address",
|
|
118
|
+
"indexed": true
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "_to",
|
|
122
|
+
"type": "address",
|
|
123
|
+
"indexed": true
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "_value",
|
|
127
|
+
"type": "uint256",
|
|
128
|
+
"indexed": false
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"anonymous": false,
|
|
132
|
+
"type": "event"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "Approval",
|
|
136
|
+
"inputs": [
|
|
137
|
+
{
|
|
138
|
+
"name": "_owner",
|
|
139
|
+
"type": "address",
|
|
140
|
+
"indexed": true
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "_spender",
|
|
144
|
+
"type": "address",
|
|
145
|
+
"indexed": true
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "_value",
|
|
149
|
+
"type": "uint256",
|
|
150
|
+
"indexed": false
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"anonymous": false,
|
|
154
|
+
"type": "event"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"stateMutability": "nonpayable",
|
|
158
|
+
"type": "constructor",
|
|
159
|
+
"inputs": [
|
|
160
|
+
{
|
|
161
|
+
"name": "_lp_token",
|
|
162
|
+
"type": "address"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"stateMutability": "nonpayable",
|
|
168
|
+
"type": "function",
|
|
169
|
+
"name": "deposit",
|
|
170
|
+
"inputs": [
|
|
171
|
+
{
|
|
172
|
+
"name": "_value",
|
|
173
|
+
"type": "uint256"
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"outputs": []
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"stateMutability": "nonpayable",
|
|
180
|
+
"type": "function",
|
|
181
|
+
"name": "deposit",
|
|
182
|
+
"inputs": [
|
|
183
|
+
{
|
|
184
|
+
"name": "_value",
|
|
185
|
+
"type": "uint256"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "_addr",
|
|
189
|
+
"type": "address"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"outputs": []
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"stateMutability": "nonpayable",
|
|
196
|
+
"type": "function",
|
|
197
|
+
"name": "deposit",
|
|
198
|
+
"inputs": [
|
|
199
|
+
{
|
|
200
|
+
"name": "_value",
|
|
201
|
+
"type": "uint256"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "_addr",
|
|
205
|
+
"type": "address"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "_claim_rewards",
|
|
209
|
+
"type": "bool"
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"outputs": []
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"stateMutability": "nonpayable",
|
|
216
|
+
"type": "function",
|
|
217
|
+
"name": "withdraw",
|
|
218
|
+
"inputs": [
|
|
219
|
+
{
|
|
220
|
+
"name": "_value",
|
|
221
|
+
"type": "uint256"
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"outputs": []
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"stateMutability": "nonpayable",
|
|
228
|
+
"type": "function",
|
|
229
|
+
"name": "withdraw",
|
|
230
|
+
"inputs": [
|
|
231
|
+
{
|
|
232
|
+
"name": "_value",
|
|
233
|
+
"type": "uint256"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"name": "_claim_rewards",
|
|
237
|
+
"type": "bool"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"outputs": []
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"stateMutability": "nonpayable",
|
|
244
|
+
"type": "function",
|
|
245
|
+
"name": "claim_rewards",
|
|
246
|
+
"inputs": [],
|
|
247
|
+
"outputs": []
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"stateMutability": "nonpayable",
|
|
251
|
+
"type": "function",
|
|
252
|
+
"name": "claim_rewards",
|
|
253
|
+
"inputs": [
|
|
254
|
+
{
|
|
255
|
+
"name": "_addr",
|
|
256
|
+
"type": "address"
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
"outputs": []
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"stateMutability": "nonpayable",
|
|
263
|
+
"type": "function",
|
|
264
|
+
"name": "claim_rewards",
|
|
265
|
+
"inputs": [
|
|
266
|
+
{
|
|
267
|
+
"name": "_addr",
|
|
268
|
+
"type": "address"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "_receiver",
|
|
272
|
+
"type": "address"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"outputs": []
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"stateMutability": "nonpayable",
|
|
279
|
+
"type": "function",
|
|
280
|
+
"name": "transferFrom",
|
|
281
|
+
"inputs": [
|
|
282
|
+
{
|
|
283
|
+
"name": "_from",
|
|
284
|
+
"type": "address"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "_to",
|
|
288
|
+
"type": "address"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"name": "_value",
|
|
292
|
+
"type": "uint256"
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"outputs": [
|
|
296
|
+
{
|
|
297
|
+
"name": "",
|
|
298
|
+
"type": "bool"
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"stateMutability": "nonpayable",
|
|
304
|
+
"type": "function",
|
|
305
|
+
"name": "transfer",
|
|
306
|
+
"inputs": [
|
|
307
|
+
{
|
|
308
|
+
"name": "_to",
|
|
309
|
+
"type": "address"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"name": "_value",
|
|
313
|
+
"type": "uint256"
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
"outputs": [
|
|
317
|
+
{
|
|
318
|
+
"name": "",
|
|
319
|
+
"type": "bool"
|
|
320
|
+
}
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"stateMutability": "nonpayable",
|
|
325
|
+
"type": "function",
|
|
326
|
+
"name": "approve",
|
|
327
|
+
"inputs": [
|
|
328
|
+
{
|
|
329
|
+
"name": "_spender",
|
|
330
|
+
"type": "address"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "_value",
|
|
334
|
+
"type": "uint256"
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
"outputs": [
|
|
338
|
+
{
|
|
339
|
+
"name": "",
|
|
340
|
+
"type": "bool"
|
|
341
|
+
}
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"stateMutability": "nonpayable",
|
|
346
|
+
"type": "function",
|
|
347
|
+
"name": "permit",
|
|
348
|
+
"inputs": [
|
|
349
|
+
{
|
|
350
|
+
"name": "_owner",
|
|
351
|
+
"type": "address"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "_spender",
|
|
355
|
+
"type": "address"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"name": "_value",
|
|
359
|
+
"type": "uint256"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"name": "_deadline",
|
|
363
|
+
"type": "uint256"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"name": "_v",
|
|
367
|
+
"type": "uint8"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"name": "_r",
|
|
371
|
+
"type": "bytes32"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"name": "_s",
|
|
375
|
+
"type": "bytes32"
|
|
376
|
+
}
|
|
377
|
+
],
|
|
378
|
+
"outputs": [
|
|
379
|
+
{
|
|
380
|
+
"name": "",
|
|
381
|
+
"type": "bool"
|
|
382
|
+
}
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"stateMutability": "nonpayable",
|
|
387
|
+
"type": "function",
|
|
388
|
+
"name": "increaseAllowance",
|
|
389
|
+
"inputs": [
|
|
390
|
+
{
|
|
391
|
+
"name": "_spender",
|
|
392
|
+
"type": "address"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"name": "_added_value",
|
|
396
|
+
"type": "uint256"
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
"outputs": [
|
|
400
|
+
{
|
|
401
|
+
"name": "",
|
|
402
|
+
"type": "bool"
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"stateMutability": "nonpayable",
|
|
408
|
+
"type": "function",
|
|
409
|
+
"name": "decreaseAllowance",
|
|
410
|
+
"inputs": [
|
|
411
|
+
{
|
|
412
|
+
"name": "_spender",
|
|
413
|
+
"type": "address"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"name": "_subtracted_value",
|
|
417
|
+
"type": "uint256"
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
"outputs": [
|
|
421
|
+
{
|
|
422
|
+
"name": "",
|
|
423
|
+
"type": "bool"
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"stateMutability": "nonpayable",
|
|
429
|
+
"type": "function",
|
|
430
|
+
"name": "user_checkpoint",
|
|
431
|
+
"inputs": [
|
|
432
|
+
{
|
|
433
|
+
"name": "addr",
|
|
434
|
+
"type": "address"
|
|
435
|
+
}
|
|
436
|
+
],
|
|
437
|
+
"outputs": [
|
|
438
|
+
{
|
|
439
|
+
"name": "",
|
|
440
|
+
"type": "bool"
|
|
441
|
+
}
|
|
442
|
+
]
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"stateMutability": "nonpayable",
|
|
446
|
+
"type": "function",
|
|
447
|
+
"name": "set_rewards_receiver",
|
|
448
|
+
"inputs": [
|
|
449
|
+
{
|
|
450
|
+
"name": "_receiver",
|
|
451
|
+
"type": "address"
|
|
452
|
+
}
|
|
453
|
+
],
|
|
454
|
+
"outputs": []
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"stateMutability": "nonpayable",
|
|
458
|
+
"type": "function",
|
|
459
|
+
"name": "kick",
|
|
460
|
+
"inputs": [
|
|
461
|
+
{
|
|
462
|
+
"name": "addr",
|
|
463
|
+
"type": "address"
|
|
464
|
+
}
|
|
465
|
+
],
|
|
466
|
+
"outputs": []
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"stateMutability": "nonpayable",
|
|
470
|
+
"type": "function",
|
|
471
|
+
"name": "set_gauge_manager",
|
|
472
|
+
"inputs": [
|
|
473
|
+
{
|
|
474
|
+
"name": "_gauge_manager",
|
|
475
|
+
"type": "address"
|
|
476
|
+
}
|
|
477
|
+
],
|
|
478
|
+
"outputs": []
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"stateMutability": "nonpayable",
|
|
482
|
+
"type": "function",
|
|
483
|
+
"name": "deposit_reward_token",
|
|
484
|
+
"inputs": [
|
|
485
|
+
{
|
|
486
|
+
"name": "_reward_token",
|
|
487
|
+
"type": "address"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "_amount",
|
|
491
|
+
"type": "uint256"
|
|
492
|
+
}
|
|
493
|
+
],
|
|
494
|
+
"outputs": []
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"stateMutability": "nonpayable",
|
|
498
|
+
"type": "function",
|
|
499
|
+
"name": "deposit_reward_token",
|
|
500
|
+
"inputs": [
|
|
501
|
+
{
|
|
502
|
+
"name": "_reward_token",
|
|
503
|
+
"type": "address"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"name": "_amount",
|
|
507
|
+
"type": "uint256"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "_epoch",
|
|
511
|
+
"type": "uint256"
|
|
512
|
+
}
|
|
513
|
+
],
|
|
514
|
+
"outputs": []
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"stateMutability": "nonpayable",
|
|
518
|
+
"type": "function",
|
|
519
|
+
"name": "add_reward",
|
|
520
|
+
"inputs": [
|
|
521
|
+
{
|
|
522
|
+
"name": "_reward_token",
|
|
523
|
+
"type": "address"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "_distributor",
|
|
527
|
+
"type": "address"
|
|
528
|
+
}
|
|
529
|
+
],
|
|
530
|
+
"outputs": []
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"stateMutability": "nonpayable",
|
|
534
|
+
"type": "function",
|
|
535
|
+
"name": "set_reward_distributor",
|
|
536
|
+
"inputs": [
|
|
537
|
+
{
|
|
538
|
+
"name": "_reward_token",
|
|
539
|
+
"type": "address"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"name": "_distributor",
|
|
543
|
+
"type": "address"
|
|
544
|
+
}
|
|
545
|
+
],
|
|
546
|
+
"outputs": []
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"stateMutability": "nonpayable",
|
|
550
|
+
"type": "function",
|
|
551
|
+
"name": "set_killed",
|
|
552
|
+
"inputs": [
|
|
553
|
+
{
|
|
554
|
+
"name": "_is_killed",
|
|
555
|
+
"type": "bool"
|
|
556
|
+
}
|
|
557
|
+
],
|
|
558
|
+
"outputs": []
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"stateMutability": "view",
|
|
562
|
+
"type": "function",
|
|
563
|
+
"name": "claimed_reward",
|
|
564
|
+
"inputs": [
|
|
565
|
+
{
|
|
566
|
+
"name": "_addr",
|
|
567
|
+
"type": "address"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"name": "_token",
|
|
571
|
+
"type": "address"
|
|
572
|
+
}
|
|
573
|
+
],
|
|
574
|
+
"outputs": [
|
|
575
|
+
{
|
|
576
|
+
"name": "",
|
|
577
|
+
"type": "uint256"
|
|
578
|
+
}
|
|
579
|
+
]
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"stateMutability": "view",
|
|
583
|
+
"type": "function",
|
|
584
|
+
"name": "claimable_reward",
|
|
585
|
+
"inputs": [
|
|
586
|
+
{
|
|
587
|
+
"name": "_user",
|
|
588
|
+
"type": "address"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"name": "_reward_token",
|
|
592
|
+
"type": "address"
|
|
593
|
+
}
|
|
594
|
+
],
|
|
595
|
+
"outputs": [
|
|
596
|
+
{
|
|
597
|
+
"name": "",
|
|
598
|
+
"type": "uint256"
|
|
599
|
+
}
|
|
600
|
+
]
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"stateMutability": "nonpayable",
|
|
604
|
+
"type": "function",
|
|
605
|
+
"name": "claimable_tokens",
|
|
606
|
+
"inputs": [
|
|
607
|
+
{
|
|
608
|
+
"name": "addr",
|
|
609
|
+
"type": "address"
|
|
610
|
+
}
|
|
611
|
+
],
|
|
612
|
+
"outputs": [
|
|
613
|
+
{
|
|
614
|
+
"name": "",
|
|
615
|
+
"type": "uint256"
|
|
616
|
+
}
|
|
617
|
+
]
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"stateMutability": "view",
|
|
621
|
+
"type": "function",
|
|
622
|
+
"name": "integrate_checkpoint",
|
|
623
|
+
"inputs": [],
|
|
624
|
+
"outputs": [
|
|
625
|
+
{
|
|
626
|
+
"name": "",
|
|
627
|
+
"type": "uint256"
|
|
628
|
+
}
|
|
629
|
+
]
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"stateMutability": "view",
|
|
633
|
+
"type": "function",
|
|
634
|
+
"name": "future_epoch_time",
|
|
635
|
+
"inputs": [],
|
|
636
|
+
"outputs": [
|
|
637
|
+
{
|
|
638
|
+
"name": "",
|
|
639
|
+
"type": "uint256"
|
|
640
|
+
}
|
|
641
|
+
]
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"stateMutability": "view",
|
|
645
|
+
"type": "function",
|
|
646
|
+
"name": "inflation_rate",
|
|
647
|
+
"inputs": [],
|
|
648
|
+
"outputs": [
|
|
649
|
+
{
|
|
650
|
+
"name": "",
|
|
651
|
+
"type": "uint256"
|
|
652
|
+
}
|
|
653
|
+
]
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"stateMutability": "view",
|
|
657
|
+
"type": "function",
|
|
658
|
+
"name": "decimals",
|
|
659
|
+
"inputs": [],
|
|
660
|
+
"outputs": [
|
|
661
|
+
{
|
|
662
|
+
"name": "",
|
|
663
|
+
"type": "uint256"
|
|
664
|
+
}
|
|
665
|
+
]
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"stateMutability": "view",
|
|
669
|
+
"type": "function",
|
|
670
|
+
"name": "version",
|
|
671
|
+
"inputs": [],
|
|
672
|
+
"outputs": [
|
|
673
|
+
{
|
|
674
|
+
"name": "",
|
|
675
|
+
"type": "string"
|
|
676
|
+
}
|
|
677
|
+
]
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
"stateMutability": "view",
|
|
681
|
+
"type": "function",
|
|
682
|
+
"name": "DOMAIN_SEPARATOR",
|
|
683
|
+
"inputs": [],
|
|
684
|
+
"outputs": [
|
|
685
|
+
{
|
|
686
|
+
"name": "",
|
|
687
|
+
"type": "bytes32"
|
|
688
|
+
}
|
|
689
|
+
]
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"stateMutability": "view",
|
|
693
|
+
"type": "function",
|
|
694
|
+
"name": "salt",
|
|
695
|
+
"inputs": [],
|
|
696
|
+
"outputs": [
|
|
697
|
+
{
|
|
698
|
+
"name": "",
|
|
699
|
+
"type": "bytes32"
|
|
700
|
+
}
|
|
701
|
+
]
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
"stateMutability": "view",
|
|
705
|
+
"type": "function",
|
|
706
|
+
"name": "balanceOf",
|
|
707
|
+
"inputs": [
|
|
708
|
+
{
|
|
709
|
+
"name": "arg0",
|
|
710
|
+
"type": "address"
|
|
711
|
+
}
|
|
712
|
+
],
|
|
713
|
+
"outputs": [
|
|
714
|
+
{
|
|
715
|
+
"name": "",
|
|
716
|
+
"type": "uint256"
|
|
717
|
+
}
|
|
718
|
+
]
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"stateMutability": "view",
|
|
722
|
+
"type": "function",
|
|
723
|
+
"name": "totalSupply",
|
|
724
|
+
"inputs": [],
|
|
725
|
+
"outputs": [
|
|
726
|
+
{
|
|
727
|
+
"name": "",
|
|
728
|
+
"type": "uint256"
|
|
729
|
+
}
|
|
730
|
+
]
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"stateMutability": "view",
|
|
734
|
+
"type": "function",
|
|
735
|
+
"name": "allowance",
|
|
736
|
+
"inputs": [
|
|
737
|
+
{
|
|
738
|
+
"name": "arg0",
|
|
739
|
+
"type": "address"
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"name": "arg1",
|
|
743
|
+
"type": "address"
|
|
744
|
+
}
|
|
745
|
+
],
|
|
746
|
+
"outputs": [
|
|
747
|
+
{
|
|
748
|
+
"name": "",
|
|
749
|
+
"type": "uint256"
|
|
750
|
+
}
|
|
751
|
+
]
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"stateMutability": "view",
|
|
755
|
+
"type": "function",
|
|
756
|
+
"name": "name",
|
|
757
|
+
"inputs": [],
|
|
758
|
+
"outputs": [
|
|
759
|
+
{
|
|
760
|
+
"name": "",
|
|
761
|
+
"type": "string"
|
|
762
|
+
}
|
|
763
|
+
]
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"stateMutability": "view",
|
|
767
|
+
"type": "function",
|
|
768
|
+
"name": "symbol",
|
|
769
|
+
"inputs": [],
|
|
770
|
+
"outputs": [
|
|
771
|
+
{
|
|
772
|
+
"name": "",
|
|
773
|
+
"type": "string"
|
|
774
|
+
}
|
|
775
|
+
]
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"stateMutability": "view",
|
|
779
|
+
"type": "function",
|
|
780
|
+
"name": "nonces",
|
|
781
|
+
"inputs": [
|
|
782
|
+
{
|
|
783
|
+
"name": "arg0",
|
|
784
|
+
"type": "address"
|
|
785
|
+
}
|
|
786
|
+
],
|
|
787
|
+
"outputs": [
|
|
788
|
+
{
|
|
789
|
+
"name": "",
|
|
790
|
+
"type": "uint256"
|
|
791
|
+
}
|
|
792
|
+
]
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"stateMutability": "view",
|
|
796
|
+
"type": "function",
|
|
797
|
+
"name": "factory",
|
|
798
|
+
"inputs": [],
|
|
799
|
+
"outputs": [
|
|
800
|
+
{
|
|
801
|
+
"name": "",
|
|
802
|
+
"type": "address"
|
|
803
|
+
}
|
|
804
|
+
]
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"stateMutability": "view",
|
|
808
|
+
"type": "function",
|
|
809
|
+
"name": "manager",
|
|
810
|
+
"inputs": [],
|
|
811
|
+
"outputs": [
|
|
812
|
+
{
|
|
813
|
+
"name": "",
|
|
814
|
+
"type": "address"
|
|
815
|
+
}
|
|
816
|
+
]
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"stateMutability": "view",
|
|
820
|
+
"type": "function",
|
|
821
|
+
"name": "lp_token",
|
|
822
|
+
"inputs": [],
|
|
823
|
+
"outputs": [
|
|
824
|
+
{
|
|
825
|
+
"name": "",
|
|
826
|
+
"type": "address"
|
|
827
|
+
}
|
|
828
|
+
]
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"stateMutability": "view",
|
|
832
|
+
"type": "function",
|
|
833
|
+
"name": "is_killed",
|
|
834
|
+
"inputs": [],
|
|
835
|
+
"outputs": [
|
|
836
|
+
{
|
|
837
|
+
"name": "",
|
|
838
|
+
"type": "bool"
|
|
839
|
+
}
|
|
840
|
+
]
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"stateMutability": "view",
|
|
844
|
+
"type": "function",
|
|
845
|
+
"name": "reward_count",
|
|
846
|
+
"inputs": [],
|
|
847
|
+
"outputs": [
|
|
848
|
+
{
|
|
849
|
+
"name": "",
|
|
850
|
+
"type": "uint256"
|
|
851
|
+
}
|
|
852
|
+
]
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"stateMutability": "view",
|
|
856
|
+
"type": "function",
|
|
857
|
+
"name": "reward_data",
|
|
858
|
+
"inputs": [
|
|
859
|
+
{
|
|
860
|
+
"name": "arg0",
|
|
861
|
+
"type": "address"
|
|
862
|
+
}
|
|
863
|
+
],
|
|
864
|
+
"outputs": [
|
|
865
|
+
{
|
|
866
|
+
"name": "",
|
|
867
|
+
"type": "tuple",
|
|
868
|
+
"components": [
|
|
869
|
+
{
|
|
870
|
+
"name": "token",
|
|
871
|
+
"type": "address"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"name": "distributor",
|
|
875
|
+
"type": "address"
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"name": "period_finish",
|
|
879
|
+
"type": "uint256"
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
"name": "rate",
|
|
883
|
+
"type": "uint256"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "last_update",
|
|
887
|
+
"type": "uint256"
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
"name": "integral",
|
|
891
|
+
"type": "uint256"
|
|
892
|
+
}
|
|
893
|
+
]
|
|
894
|
+
}
|
|
895
|
+
]
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"stateMutability": "view",
|
|
899
|
+
"type": "function",
|
|
900
|
+
"name": "rewards_receiver",
|
|
901
|
+
"inputs": [
|
|
902
|
+
{
|
|
903
|
+
"name": "arg0",
|
|
904
|
+
"type": "address"
|
|
905
|
+
}
|
|
906
|
+
],
|
|
907
|
+
"outputs": [
|
|
908
|
+
{
|
|
909
|
+
"name": "",
|
|
910
|
+
"type": "address"
|
|
911
|
+
}
|
|
912
|
+
]
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"stateMutability": "view",
|
|
916
|
+
"type": "function",
|
|
917
|
+
"name": "reward_integral_for",
|
|
918
|
+
"inputs": [
|
|
919
|
+
{
|
|
920
|
+
"name": "arg0",
|
|
921
|
+
"type": "address"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"name": "arg1",
|
|
925
|
+
"type": "address"
|
|
926
|
+
}
|
|
927
|
+
],
|
|
928
|
+
"outputs": [
|
|
929
|
+
{
|
|
930
|
+
"name": "",
|
|
931
|
+
"type": "uint256"
|
|
932
|
+
}
|
|
933
|
+
]
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"stateMutability": "view",
|
|
937
|
+
"type": "function",
|
|
938
|
+
"name": "working_balances",
|
|
939
|
+
"inputs": [
|
|
940
|
+
{
|
|
941
|
+
"name": "arg0",
|
|
942
|
+
"type": "address"
|
|
943
|
+
}
|
|
944
|
+
],
|
|
945
|
+
"outputs": [
|
|
946
|
+
{
|
|
947
|
+
"name": "",
|
|
948
|
+
"type": "uint256"
|
|
949
|
+
}
|
|
950
|
+
]
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
"stateMutability": "view",
|
|
954
|
+
"type": "function",
|
|
955
|
+
"name": "working_supply",
|
|
956
|
+
"inputs": [],
|
|
957
|
+
"outputs": [
|
|
958
|
+
{
|
|
959
|
+
"name": "",
|
|
960
|
+
"type": "uint256"
|
|
961
|
+
}
|
|
962
|
+
]
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"stateMutability": "view",
|
|
966
|
+
"type": "function",
|
|
967
|
+
"name": "integrate_inv_supply_of",
|
|
968
|
+
"inputs": [
|
|
969
|
+
{
|
|
970
|
+
"name": "arg0",
|
|
971
|
+
"type": "address"
|
|
972
|
+
}
|
|
973
|
+
],
|
|
974
|
+
"outputs": [
|
|
975
|
+
{
|
|
976
|
+
"name": "",
|
|
977
|
+
"type": "uint256"
|
|
978
|
+
}
|
|
979
|
+
]
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"stateMutability": "view",
|
|
983
|
+
"type": "function",
|
|
984
|
+
"name": "integrate_checkpoint_of",
|
|
985
|
+
"inputs": [
|
|
986
|
+
{
|
|
987
|
+
"name": "arg0",
|
|
988
|
+
"type": "address"
|
|
989
|
+
}
|
|
990
|
+
],
|
|
991
|
+
"outputs": [
|
|
992
|
+
{
|
|
993
|
+
"name": "",
|
|
994
|
+
"type": "uint256"
|
|
995
|
+
}
|
|
996
|
+
]
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
"stateMutability": "view",
|
|
1000
|
+
"type": "function",
|
|
1001
|
+
"name": "integrate_fraction",
|
|
1002
|
+
"inputs": [
|
|
1003
|
+
{
|
|
1004
|
+
"name": "arg0",
|
|
1005
|
+
"type": "address"
|
|
1006
|
+
}
|
|
1007
|
+
],
|
|
1008
|
+
"outputs": [
|
|
1009
|
+
{
|
|
1010
|
+
"name": "",
|
|
1011
|
+
"type": "uint256"
|
|
1012
|
+
}
|
|
1013
|
+
]
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
"stateMutability": "view",
|
|
1017
|
+
"type": "function",
|
|
1018
|
+
"name": "period",
|
|
1019
|
+
"inputs": [],
|
|
1020
|
+
"outputs": [
|
|
1021
|
+
{
|
|
1022
|
+
"name": "",
|
|
1023
|
+
"type": "int128"
|
|
1024
|
+
}
|
|
1025
|
+
]
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
"stateMutability": "view",
|
|
1029
|
+
"type": "function",
|
|
1030
|
+
"name": "reward_tokens",
|
|
1031
|
+
"inputs": [
|
|
1032
|
+
{
|
|
1033
|
+
"name": "arg0",
|
|
1034
|
+
"type": "uint256"
|
|
1035
|
+
}
|
|
1036
|
+
],
|
|
1037
|
+
"outputs": [
|
|
1038
|
+
{
|
|
1039
|
+
"name": "",
|
|
1040
|
+
"type": "address"
|
|
1041
|
+
}
|
|
1042
|
+
]
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"stateMutability": "view",
|
|
1046
|
+
"type": "function",
|
|
1047
|
+
"name": "period_timestamp",
|
|
1048
|
+
"inputs": [
|
|
1049
|
+
{
|
|
1050
|
+
"name": "arg0",
|
|
1051
|
+
"type": "uint256"
|
|
1052
|
+
}
|
|
1053
|
+
],
|
|
1054
|
+
"outputs": [
|
|
1055
|
+
{
|
|
1056
|
+
"name": "",
|
|
1057
|
+
"type": "uint256"
|
|
1058
|
+
}
|
|
1059
|
+
]
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"stateMutability": "view",
|
|
1063
|
+
"type": "function",
|
|
1064
|
+
"name": "integrate_inv_supply",
|
|
1065
|
+
"inputs": [
|
|
1066
|
+
{
|
|
1067
|
+
"name": "arg0",
|
|
1068
|
+
"type": "uint256"
|
|
1069
|
+
}
|
|
1070
|
+
],
|
|
1071
|
+
"outputs": [
|
|
1072
|
+
{
|
|
1073
|
+
"name": "",
|
|
1074
|
+
"type": "uint256"
|
|
1075
|
+
}
|
|
1076
|
+
]
|
|
1077
|
+
}
|
|
1078
|
+
] as const satisfies Abi;
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* Type-safe ABI for LiquidityGaugeV6
|
|
1082
|
+
*/
|
|
1083
|
+
export type LiquidityGaugeV6Abi = typeof LiquidityGaugeV6Abi;
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Contract instance type for LiquidityGaugeV6
|
|
1087
|
+
*/
|
|
1088
|
+
// Use any for contract type to avoid complex viem type issues
|
|
1089
|
+
// The runtime behavior is type-safe through viem's ABI typing
|
|
1090
|
+
export type LiquidityGaugeV6Contract = any;
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* LiquidityGaugeV6 Contract Class
|
|
1094
|
+
*
|
|
1095
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1096
|
+
*
|
|
1097
|
+
* @example
|
|
1098
|
+
* ```typescript
|
|
1099
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1100
|
+
* import { mainnet } from 'viem/chains';
|
|
1101
|
+
* import { LiquidityGaugeV6 } from 'LiquidityGaugeV6';
|
|
1102
|
+
*
|
|
1103
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1104
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1105
|
+
*
|
|
1106
|
+
* const contract = new LiquidityGaugeV6('0x...', { publicClient, walletClient });
|
|
1107
|
+
*
|
|
1108
|
+
* // Read functions
|
|
1109
|
+
* const result = await contract.balanceOf('0x...');
|
|
1110
|
+
*
|
|
1111
|
+
* // Write functions
|
|
1112
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
1113
|
+
*
|
|
1114
|
+
* // Simulate transactions (dry-run)
|
|
1115
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
1116
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
1117
|
+
*
|
|
1118
|
+
* // Watch events
|
|
1119
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1120
|
+
* console.log('Transfer event:', event);
|
|
1121
|
+
* });
|
|
1122
|
+
* ```
|
|
1123
|
+
*/
|
|
1124
|
+
export class LiquidityGaugeV6 {
|
|
1125
|
+
private contract: LiquidityGaugeV6Contract;
|
|
1126
|
+
private contractAddress: Address;
|
|
1127
|
+
private publicClient: PublicClient;
|
|
1128
|
+
|
|
1129
|
+
constructor(
|
|
1130
|
+
address: Address,
|
|
1131
|
+
clients: {
|
|
1132
|
+
publicClient: PublicClient;
|
|
1133
|
+
walletClient?: WalletClient;
|
|
1134
|
+
}
|
|
1135
|
+
) {
|
|
1136
|
+
this.contractAddress = address;
|
|
1137
|
+
this.publicClient = clients.publicClient;
|
|
1138
|
+
this.contract = getContract({
|
|
1139
|
+
address,
|
|
1140
|
+
abi: LiquidityGaugeV6Abi,
|
|
1141
|
+
client: {
|
|
1142
|
+
public: clients.publicClient,
|
|
1143
|
+
wallet: clients.walletClient,
|
|
1144
|
+
},
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* Get the contract address
|
|
1150
|
+
*/
|
|
1151
|
+
get address(): Address {
|
|
1152
|
+
return this.contractAddress;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* Get the underlying viem contract instance.
|
|
1157
|
+
*/
|
|
1158
|
+
getContract(): LiquidityGaugeV6Contract {
|
|
1159
|
+
return this.contract;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* claimed_reward
|
|
1164
|
+
* view
|
|
1165
|
+
*/
|
|
1166
|
+
async claimed_reward(_addr: `0x${string}`, _token: `0x${string}`): Promise<bigint> {
|
|
1167
|
+
return this.contract.read.claimed_reward([_addr, _token] as const) as Promise<bigint>;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* claimable_reward
|
|
1172
|
+
* view
|
|
1173
|
+
*/
|
|
1174
|
+
async claimable_reward(_user: `0x${string}`, _reward_token: `0x${string}`): Promise<bigint> {
|
|
1175
|
+
return this.contract.read.claimable_reward([_user, _reward_token] as const) as Promise<bigint>;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* integrate_checkpoint
|
|
1180
|
+
* view
|
|
1181
|
+
*/
|
|
1182
|
+
async integrate_checkpoint(): Promise<bigint> {
|
|
1183
|
+
return this.contract.read.integrate_checkpoint() as Promise<bigint>;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* future_epoch_time
|
|
1188
|
+
* view
|
|
1189
|
+
*/
|
|
1190
|
+
async future_epoch_time(): Promise<bigint> {
|
|
1191
|
+
return this.contract.read.future_epoch_time() as Promise<bigint>;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* inflation_rate
|
|
1196
|
+
* view
|
|
1197
|
+
*/
|
|
1198
|
+
async inflation_rate(): Promise<bigint> {
|
|
1199
|
+
return this.contract.read.inflation_rate() as Promise<bigint>;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* decimals
|
|
1204
|
+
* view
|
|
1205
|
+
*/
|
|
1206
|
+
async decimals(): Promise<bigint> {
|
|
1207
|
+
return this.contract.read.decimals() as Promise<bigint>;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* version
|
|
1212
|
+
* view
|
|
1213
|
+
*/
|
|
1214
|
+
async version(): Promise<string> {
|
|
1215
|
+
return this.contract.read.version() as Promise<string>;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* DOMAIN_SEPARATOR
|
|
1220
|
+
* view
|
|
1221
|
+
*/
|
|
1222
|
+
async DOMAIN_SEPARATOR(): Promise<`0x${string}`> {
|
|
1223
|
+
return this.contract.read.DOMAIN_SEPARATOR() as Promise<`0x${string}`>;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* salt
|
|
1228
|
+
* view
|
|
1229
|
+
*/
|
|
1230
|
+
async salt(): Promise<`0x${string}`> {
|
|
1231
|
+
return this.contract.read.salt() as Promise<`0x${string}`>;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* balanceOf
|
|
1236
|
+
* view
|
|
1237
|
+
*/
|
|
1238
|
+
async balanceOf(arg0: `0x${string}`): Promise<bigint> {
|
|
1239
|
+
return this.contract.read.balanceOf([arg0] as const) as Promise<bigint>;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* totalSupply
|
|
1244
|
+
* view
|
|
1245
|
+
*/
|
|
1246
|
+
async totalSupply(): Promise<bigint> {
|
|
1247
|
+
return this.contract.read.totalSupply() as Promise<bigint>;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* allowance
|
|
1252
|
+
* view
|
|
1253
|
+
*/
|
|
1254
|
+
async allowance(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint> {
|
|
1255
|
+
return this.contract.read.allowance([arg0, arg1] as const) as Promise<bigint>;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* name
|
|
1260
|
+
* view
|
|
1261
|
+
*/
|
|
1262
|
+
async name(): Promise<string> {
|
|
1263
|
+
return this.contract.read.name() as Promise<string>;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* symbol
|
|
1268
|
+
* view
|
|
1269
|
+
*/
|
|
1270
|
+
async symbol(): Promise<string> {
|
|
1271
|
+
return this.contract.read.symbol() as Promise<string>;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* nonces
|
|
1276
|
+
* view
|
|
1277
|
+
*/
|
|
1278
|
+
async nonces(arg0: `0x${string}`): Promise<bigint> {
|
|
1279
|
+
return this.contract.read.nonces([arg0] as const) as Promise<bigint>;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* factory
|
|
1284
|
+
* view
|
|
1285
|
+
*/
|
|
1286
|
+
async factory(): Promise<`0x${string}`> {
|
|
1287
|
+
return this.contract.read.factory() as Promise<`0x${string}`>;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* manager
|
|
1292
|
+
* view
|
|
1293
|
+
*/
|
|
1294
|
+
async manager(): Promise<`0x${string}`> {
|
|
1295
|
+
return this.contract.read.manager() as Promise<`0x${string}`>;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* lp_token
|
|
1300
|
+
* view
|
|
1301
|
+
*/
|
|
1302
|
+
async lp_token(): Promise<`0x${string}`> {
|
|
1303
|
+
return this.contract.read.lp_token() as Promise<`0x${string}`>;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
/**
|
|
1307
|
+
* is_killed
|
|
1308
|
+
* view
|
|
1309
|
+
*/
|
|
1310
|
+
async is_killed(): Promise<boolean> {
|
|
1311
|
+
return this.contract.read.is_killed() as Promise<boolean>;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
* reward_count
|
|
1316
|
+
* view
|
|
1317
|
+
*/
|
|
1318
|
+
async reward_count(): Promise<bigint> {
|
|
1319
|
+
return this.contract.read.reward_count() as Promise<bigint>;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
* reward_data
|
|
1324
|
+
* view
|
|
1325
|
+
*/
|
|
1326
|
+
async reward_data(arg0: `0x${string}`): Promise<{ token: `0x${string}`; distributor: `0x${string}`; period_finish: bigint; rate: bigint; last_update: bigint; integral: bigint }> {
|
|
1327
|
+
return this.contract.read.reward_data([arg0] as const) as Promise<{ token: `0x${string}`; distributor: `0x${string}`; period_finish: bigint; rate: bigint; last_update: bigint; integral: bigint }>;
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* rewards_receiver
|
|
1332
|
+
* view
|
|
1333
|
+
*/
|
|
1334
|
+
async rewards_receiver(arg0: `0x${string}`): Promise<`0x${string}`> {
|
|
1335
|
+
return this.contract.read.rewards_receiver([arg0] as const) as Promise<`0x${string}`>;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* reward_integral_for
|
|
1340
|
+
* view
|
|
1341
|
+
*/
|
|
1342
|
+
async reward_integral_for(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint> {
|
|
1343
|
+
return this.contract.read.reward_integral_for([arg0, arg1] as const) as Promise<bigint>;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* working_balances
|
|
1348
|
+
* view
|
|
1349
|
+
*/
|
|
1350
|
+
async working_balances(arg0: `0x${string}`): Promise<bigint> {
|
|
1351
|
+
return this.contract.read.working_balances([arg0] as const) as Promise<bigint>;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* working_supply
|
|
1356
|
+
* view
|
|
1357
|
+
*/
|
|
1358
|
+
async working_supply(): Promise<bigint> {
|
|
1359
|
+
return this.contract.read.working_supply() as Promise<bigint>;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* integrate_inv_supply_of
|
|
1364
|
+
* view
|
|
1365
|
+
*/
|
|
1366
|
+
async integrate_inv_supply_of(arg0: `0x${string}`): Promise<bigint> {
|
|
1367
|
+
return this.contract.read.integrate_inv_supply_of([arg0] as const) as Promise<bigint>;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* integrate_checkpoint_of
|
|
1372
|
+
* view
|
|
1373
|
+
*/
|
|
1374
|
+
async integrate_checkpoint_of(arg0: `0x${string}`): Promise<bigint> {
|
|
1375
|
+
return this.contract.read.integrate_checkpoint_of([arg0] as const) as Promise<bigint>;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* integrate_fraction
|
|
1380
|
+
* view
|
|
1381
|
+
*/
|
|
1382
|
+
async integrate_fraction(arg0: `0x${string}`): Promise<bigint> {
|
|
1383
|
+
return this.contract.read.integrate_fraction([arg0] as const) as Promise<bigint>;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
* period
|
|
1388
|
+
* view
|
|
1389
|
+
*/
|
|
1390
|
+
async period(): Promise<bigint> {
|
|
1391
|
+
return this.contract.read.period() as Promise<bigint>;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* reward_tokens
|
|
1396
|
+
* view
|
|
1397
|
+
*/
|
|
1398
|
+
async reward_tokens(arg0: bigint): Promise<`0x${string}`> {
|
|
1399
|
+
return this.contract.read.reward_tokens([arg0] as const) as Promise<`0x${string}`>;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
/**
|
|
1403
|
+
* period_timestamp
|
|
1404
|
+
* view
|
|
1405
|
+
*/
|
|
1406
|
+
async period_timestamp(arg0: bigint): Promise<bigint> {
|
|
1407
|
+
return this.contract.read.period_timestamp([arg0] as const) as Promise<bigint>;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* integrate_inv_supply
|
|
1412
|
+
* view
|
|
1413
|
+
*/
|
|
1414
|
+
async integrate_inv_supply(arg0: bigint): Promise<bigint> {
|
|
1415
|
+
return this.contract.read.integrate_inv_supply([arg0] as const) as Promise<bigint>;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
async deposit(_value: bigint, options?: {
|
|
1419
|
+
accessList?: import('viem').AccessList;
|
|
1420
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1421
|
+
chain?: import('viem').Chain | null;
|
|
1422
|
+
dataSuffix?: `0x${string}`;
|
|
1423
|
+
gas?: bigint;
|
|
1424
|
+
gasPrice?: bigint;
|
|
1425
|
+
maxFeePerGas?: bigint;
|
|
1426
|
+
maxPriorityFeePerGas?: bigint;
|
|
1427
|
+
nonce?: number;
|
|
1428
|
+
value?: bigint;
|
|
1429
|
+
}): Promise<`0x${string}`>;
|
|
1430
|
+
async deposit(_value: bigint, _addr: `0x${string}`, options?: {
|
|
1431
|
+
accessList?: import('viem').AccessList;
|
|
1432
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1433
|
+
chain?: import('viem').Chain | null;
|
|
1434
|
+
dataSuffix?: `0x${string}`;
|
|
1435
|
+
gas?: bigint;
|
|
1436
|
+
gasPrice?: bigint;
|
|
1437
|
+
maxFeePerGas?: bigint;
|
|
1438
|
+
maxPriorityFeePerGas?: bigint;
|
|
1439
|
+
nonce?: number;
|
|
1440
|
+
value?: bigint;
|
|
1441
|
+
}): Promise<`0x${string}`>;
|
|
1442
|
+
async deposit(_value: bigint, _addr: `0x${string}`, _claim_rewards: boolean, options?: {
|
|
1443
|
+
accessList?: import('viem').AccessList;
|
|
1444
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1445
|
+
chain?: import('viem').Chain | null;
|
|
1446
|
+
dataSuffix?: `0x${string}`;
|
|
1447
|
+
gas?: bigint;
|
|
1448
|
+
gasPrice?: bigint;
|
|
1449
|
+
maxFeePerGas?: bigint;
|
|
1450
|
+
maxPriorityFeePerGas?: bigint;
|
|
1451
|
+
nonce?: number;
|
|
1452
|
+
value?: bigint;
|
|
1453
|
+
}): Promise<`0x${string}`>;
|
|
1454
|
+
async deposit(...args: any[]): Promise<`0x${string}`> {
|
|
1455
|
+
if (!this.contract.write) {
|
|
1456
|
+
throw new Error('Wallet client is required for write operations');
|
|
1457
|
+
}
|
|
1458
|
+
return this.contract.write.deposit(args as any) as Promise<`0x${string}`>;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
async withdraw(_value: bigint, options?: {
|
|
1462
|
+
accessList?: import('viem').AccessList;
|
|
1463
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1464
|
+
chain?: import('viem').Chain | null;
|
|
1465
|
+
dataSuffix?: `0x${string}`;
|
|
1466
|
+
gas?: bigint;
|
|
1467
|
+
gasPrice?: bigint;
|
|
1468
|
+
maxFeePerGas?: bigint;
|
|
1469
|
+
maxPriorityFeePerGas?: bigint;
|
|
1470
|
+
nonce?: number;
|
|
1471
|
+
value?: bigint;
|
|
1472
|
+
}): Promise<`0x${string}`>;
|
|
1473
|
+
async withdraw(_value: bigint, _claim_rewards: boolean, options?: {
|
|
1474
|
+
accessList?: import('viem').AccessList;
|
|
1475
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1476
|
+
chain?: import('viem').Chain | null;
|
|
1477
|
+
dataSuffix?: `0x${string}`;
|
|
1478
|
+
gas?: bigint;
|
|
1479
|
+
gasPrice?: bigint;
|
|
1480
|
+
maxFeePerGas?: bigint;
|
|
1481
|
+
maxPriorityFeePerGas?: bigint;
|
|
1482
|
+
nonce?: number;
|
|
1483
|
+
value?: bigint;
|
|
1484
|
+
}): Promise<`0x${string}`>;
|
|
1485
|
+
async withdraw(...args: any[]): Promise<`0x${string}`> {
|
|
1486
|
+
if (!this.contract.write) {
|
|
1487
|
+
throw new Error('Wallet client is required for write operations');
|
|
1488
|
+
}
|
|
1489
|
+
return this.contract.write.withdraw(args as any) as Promise<`0x${string}`>;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
async claim_rewards(options?: {
|
|
1493
|
+
accessList?: import('viem').AccessList;
|
|
1494
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1495
|
+
chain?: import('viem').Chain | null;
|
|
1496
|
+
dataSuffix?: `0x${string}`;
|
|
1497
|
+
gas?: bigint;
|
|
1498
|
+
gasPrice?: bigint;
|
|
1499
|
+
maxFeePerGas?: bigint;
|
|
1500
|
+
maxPriorityFeePerGas?: bigint;
|
|
1501
|
+
nonce?: number;
|
|
1502
|
+
value?: bigint;
|
|
1503
|
+
}): Promise<`0x${string}`>;
|
|
1504
|
+
async claim_rewards(_addr: `0x${string}`, options?: {
|
|
1505
|
+
accessList?: import('viem').AccessList;
|
|
1506
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1507
|
+
chain?: import('viem').Chain | null;
|
|
1508
|
+
dataSuffix?: `0x${string}`;
|
|
1509
|
+
gas?: bigint;
|
|
1510
|
+
gasPrice?: bigint;
|
|
1511
|
+
maxFeePerGas?: bigint;
|
|
1512
|
+
maxPriorityFeePerGas?: bigint;
|
|
1513
|
+
nonce?: number;
|
|
1514
|
+
value?: bigint;
|
|
1515
|
+
}): Promise<`0x${string}`>;
|
|
1516
|
+
async claim_rewards(_addr: `0x${string}`, _receiver: `0x${string}`, options?: {
|
|
1517
|
+
accessList?: import('viem').AccessList;
|
|
1518
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1519
|
+
chain?: import('viem').Chain | null;
|
|
1520
|
+
dataSuffix?: `0x${string}`;
|
|
1521
|
+
gas?: bigint;
|
|
1522
|
+
gasPrice?: bigint;
|
|
1523
|
+
maxFeePerGas?: bigint;
|
|
1524
|
+
maxPriorityFeePerGas?: bigint;
|
|
1525
|
+
nonce?: number;
|
|
1526
|
+
value?: bigint;
|
|
1527
|
+
}): Promise<`0x${string}`>;
|
|
1528
|
+
async claim_rewards(...args: any[]): Promise<`0x${string}`> {
|
|
1529
|
+
if (!this.contract.write) {
|
|
1530
|
+
throw new Error('Wallet client is required for write operations');
|
|
1531
|
+
}
|
|
1532
|
+
return this.contract.write.claim_rewards(args as any) as Promise<`0x${string}`>;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* transferFrom
|
|
1537
|
+
* nonpayable
|
|
1538
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1539
|
+
*/
|
|
1540
|
+
async transferFrom(_from: `0x${string}`, _to: `0x${string}`, _value: bigint, options?: {
|
|
1541
|
+
accessList?: import('viem').AccessList;
|
|
1542
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1543
|
+
chain?: import('viem').Chain | null;
|
|
1544
|
+
dataSuffix?: `0x${string}`;
|
|
1545
|
+
gas?: bigint;
|
|
1546
|
+
gasPrice?: bigint;
|
|
1547
|
+
maxFeePerGas?: bigint;
|
|
1548
|
+
maxPriorityFeePerGas?: bigint;
|
|
1549
|
+
nonce?: number;
|
|
1550
|
+
value?: bigint;
|
|
1551
|
+
}): Promise<`0x${string}`> {
|
|
1552
|
+
if (!this.contract.write) {
|
|
1553
|
+
throw new Error('Wallet client is required for write operations');
|
|
1554
|
+
}
|
|
1555
|
+
return this.contract.write.transferFrom([_from, _to, _value] as const, options) as Promise<`0x${string}`>;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
/**
|
|
1559
|
+
* transfer
|
|
1560
|
+
* nonpayable
|
|
1561
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1562
|
+
*/
|
|
1563
|
+
async transfer(_to: `0x${string}`, _value: bigint, options?: {
|
|
1564
|
+
accessList?: import('viem').AccessList;
|
|
1565
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1566
|
+
chain?: import('viem').Chain | null;
|
|
1567
|
+
dataSuffix?: `0x${string}`;
|
|
1568
|
+
gas?: bigint;
|
|
1569
|
+
gasPrice?: bigint;
|
|
1570
|
+
maxFeePerGas?: bigint;
|
|
1571
|
+
maxPriorityFeePerGas?: bigint;
|
|
1572
|
+
nonce?: number;
|
|
1573
|
+
value?: bigint;
|
|
1574
|
+
}): Promise<`0x${string}`> {
|
|
1575
|
+
if (!this.contract.write) {
|
|
1576
|
+
throw new Error('Wallet client is required for write operations');
|
|
1577
|
+
}
|
|
1578
|
+
return this.contract.write.transfer([_to, _value] as const, options) as Promise<`0x${string}`>;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
/**
|
|
1582
|
+
* approve
|
|
1583
|
+
* nonpayable
|
|
1584
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1585
|
+
*/
|
|
1586
|
+
async approve(_spender: `0x${string}`, _value: bigint, options?: {
|
|
1587
|
+
accessList?: import('viem').AccessList;
|
|
1588
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1589
|
+
chain?: import('viem').Chain | null;
|
|
1590
|
+
dataSuffix?: `0x${string}`;
|
|
1591
|
+
gas?: bigint;
|
|
1592
|
+
gasPrice?: bigint;
|
|
1593
|
+
maxFeePerGas?: bigint;
|
|
1594
|
+
maxPriorityFeePerGas?: bigint;
|
|
1595
|
+
nonce?: number;
|
|
1596
|
+
value?: bigint;
|
|
1597
|
+
}): Promise<`0x${string}`> {
|
|
1598
|
+
if (!this.contract.write) {
|
|
1599
|
+
throw new Error('Wallet client is required for write operations');
|
|
1600
|
+
}
|
|
1601
|
+
return this.contract.write.approve([_spender, _value] as const, options) as Promise<`0x${string}`>;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
/**
|
|
1605
|
+
* permit
|
|
1606
|
+
* nonpayable
|
|
1607
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1608
|
+
*/
|
|
1609
|
+
async permit(_owner: `0x${string}`, _spender: `0x${string}`, _value: bigint, _deadline: bigint, _v: bigint, _r: `0x${string}`, _s: `0x${string}`, options?: {
|
|
1610
|
+
accessList?: import('viem').AccessList;
|
|
1611
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1612
|
+
chain?: import('viem').Chain | null;
|
|
1613
|
+
dataSuffix?: `0x${string}`;
|
|
1614
|
+
gas?: bigint;
|
|
1615
|
+
gasPrice?: bigint;
|
|
1616
|
+
maxFeePerGas?: bigint;
|
|
1617
|
+
maxPriorityFeePerGas?: bigint;
|
|
1618
|
+
nonce?: number;
|
|
1619
|
+
value?: bigint;
|
|
1620
|
+
}): Promise<`0x${string}`> {
|
|
1621
|
+
if (!this.contract.write) {
|
|
1622
|
+
throw new Error('Wallet client is required for write operations');
|
|
1623
|
+
}
|
|
1624
|
+
return this.contract.write.permit([_owner, _spender, _value, _deadline, _v, _r, _s] as const, options) as Promise<`0x${string}`>;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* increaseAllowance
|
|
1629
|
+
* nonpayable
|
|
1630
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1631
|
+
*/
|
|
1632
|
+
async increaseAllowance(_spender: `0x${string}`, _added_value: bigint, options?: {
|
|
1633
|
+
accessList?: import('viem').AccessList;
|
|
1634
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1635
|
+
chain?: import('viem').Chain | null;
|
|
1636
|
+
dataSuffix?: `0x${string}`;
|
|
1637
|
+
gas?: bigint;
|
|
1638
|
+
gasPrice?: bigint;
|
|
1639
|
+
maxFeePerGas?: bigint;
|
|
1640
|
+
maxPriorityFeePerGas?: bigint;
|
|
1641
|
+
nonce?: number;
|
|
1642
|
+
value?: bigint;
|
|
1643
|
+
}): Promise<`0x${string}`> {
|
|
1644
|
+
if (!this.contract.write) {
|
|
1645
|
+
throw new Error('Wallet client is required for write operations');
|
|
1646
|
+
}
|
|
1647
|
+
return this.contract.write.increaseAllowance([_spender, _added_value] as const, options) as Promise<`0x${string}`>;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
/**
|
|
1651
|
+
* decreaseAllowance
|
|
1652
|
+
* nonpayable
|
|
1653
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1654
|
+
*/
|
|
1655
|
+
async decreaseAllowance(_spender: `0x${string}`, _subtracted_value: bigint, options?: {
|
|
1656
|
+
accessList?: import('viem').AccessList;
|
|
1657
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1658
|
+
chain?: import('viem').Chain | null;
|
|
1659
|
+
dataSuffix?: `0x${string}`;
|
|
1660
|
+
gas?: bigint;
|
|
1661
|
+
gasPrice?: bigint;
|
|
1662
|
+
maxFeePerGas?: bigint;
|
|
1663
|
+
maxPriorityFeePerGas?: bigint;
|
|
1664
|
+
nonce?: number;
|
|
1665
|
+
value?: bigint;
|
|
1666
|
+
}): Promise<`0x${string}`> {
|
|
1667
|
+
if (!this.contract.write) {
|
|
1668
|
+
throw new Error('Wallet client is required for write operations');
|
|
1669
|
+
}
|
|
1670
|
+
return this.contract.write.decreaseAllowance([_spender, _subtracted_value] as const, options) as Promise<`0x${string}`>;
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
/**
|
|
1674
|
+
* user_checkpoint
|
|
1675
|
+
* nonpayable
|
|
1676
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1677
|
+
*/
|
|
1678
|
+
async user_checkpoint(addr: `0x${string}`, options?: {
|
|
1679
|
+
accessList?: import('viem').AccessList;
|
|
1680
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1681
|
+
chain?: import('viem').Chain | null;
|
|
1682
|
+
dataSuffix?: `0x${string}`;
|
|
1683
|
+
gas?: bigint;
|
|
1684
|
+
gasPrice?: bigint;
|
|
1685
|
+
maxFeePerGas?: bigint;
|
|
1686
|
+
maxPriorityFeePerGas?: bigint;
|
|
1687
|
+
nonce?: number;
|
|
1688
|
+
value?: bigint;
|
|
1689
|
+
}): Promise<`0x${string}`> {
|
|
1690
|
+
if (!this.contract.write) {
|
|
1691
|
+
throw new Error('Wallet client is required for write operations');
|
|
1692
|
+
}
|
|
1693
|
+
return this.contract.write.user_checkpoint([addr] as const, options) as Promise<`0x${string}`>;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* set_rewards_receiver
|
|
1698
|
+
* nonpayable
|
|
1699
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1700
|
+
*/
|
|
1701
|
+
async set_rewards_receiver(_receiver: `0x${string}`, options?: {
|
|
1702
|
+
accessList?: import('viem').AccessList;
|
|
1703
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1704
|
+
chain?: import('viem').Chain | null;
|
|
1705
|
+
dataSuffix?: `0x${string}`;
|
|
1706
|
+
gas?: bigint;
|
|
1707
|
+
gasPrice?: bigint;
|
|
1708
|
+
maxFeePerGas?: bigint;
|
|
1709
|
+
maxPriorityFeePerGas?: bigint;
|
|
1710
|
+
nonce?: number;
|
|
1711
|
+
value?: bigint;
|
|
1712
|
+
}): Promise<`0x${string}`> {
|
|
1713
|
+
if (!this.contract.write) {
|
|
1714
|
+
throw new Error('Wallet client is required for write operations');
|
|
1715
|
+
}
|
|
1716
|
+
return this.contract.write.set_rewards_receiver([_receiver] as const, options) as Promise<`0x${string}`>;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
/**
|
|
1720
|
+
* kick
|
|
1721
|
+
* nonpayable
|
|
1722
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1723
|
+
*/
|
|
1724
|
+
async kick(addr: `0x${string}`, options?: {
|
|
1725
|
+
accessList?: import('viem').AccessList;
|
|
1726
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1727
|
+
chain?: import('viem').Chain | null;
|
|
1728
|
+
dataSuffix?: `0x${string}`;
|
|
1729
|
+
gas?: bigint;
|
|
1730
|
+
gasPrice?: bigint;
|
|
1731
|
+
maxFeePerGas?: bigint;
|
|
1732
|
+
maxPriorityFeePerGas?: bigint;
|
|
1733
|
+
nonce?: number;
|
|
1734
|
+
value?: bigint;
|
|
1735
|
+
}): Promise<`0x${string}`> {
|
|
1736
|
+
if (!this.contract.write) {
|
|
1737
|
+
throw new Error('Wallet client is required for write operations');
|
|
1738
|
+
}
|
|
1739
|
+
return this.contract.write.kick([addr] as const, options) as Promise<`0x${string}`>;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* set_gauge_manager
|
|
1744
|
+
* nonpayable
|
|
1745
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1746
|
+
*/
|
|
1747
|
+
async set_gauge_manager(_gauge_manager: `0x${string}`, options?: {
|
|
1748
|
+
accessList?: import('viem').AccessList;
|
|
1749
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1750
|
+
chain?: import('viem').Chain | null;
|
|
1751
|
+
dataSuffix?: `0x${string}`;
|
|
1752
|
+
gas?: bigint;
|
|
1753
|
+
gasPrice?: bigint;
|
|
1754
|
+
maxFeePerGas?: bigint;
|
|
1755
|
+
maxPriorityFeePerGas?: bigint;
|
|
1756
|
+
nonce?: number;
|
|
1757
|
+
value?: bigint;
|
|
1758
|
+
}): Promise<`0x${string}`> {
|
|
1759
|
+
if (!this.contract.write) {
|
|
1760
|
+
throw new Error('Wallet client is required for write operations');
|
|
1761
|
+
}
|
|
1762
|
+
return this.contract.write.set_gauge_manager([_gauge_manager] as const, options) as Promise<`0x${string}`>;
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
async deposit_reward_token(_reward_token: `0x${string}`, _amount: bigint, options?: {
|
|
1766
|
+
accessList?: import('viem').AccessList;
|
|
1767
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1768
|
+
chain?: import('viem').Chain | null;
|
|
1769
|
+
dataSuffix?: `0x${string}`;
|
|
1770
|
+
gas?: bigint;
|
|
1771
|
+
gasPrice?: bigint;
|
|
1772
|
+
maxFeePerGas?: bigint;
|
|
1773
|
+
maxPriorityFeePerGas?: bigint;
|
|
1774
|
+
nonce?: number;
|
|
1775
|
+
value?: bigint;
|
|
1776
|
+
}): Promise<`0x${string}`>;
|
|
1777
|
+
async deposit_reward_token(_reward_token: `0x${string}`, _amount: bigint, _epoch: bigint, options?: {
|
|
1778
|
+
accessList?: import('viem').AccessList;
|
|
1779
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1780
|
+
chain?: import('viem').Chain | null;
|
|
1781
|
+
dataSuffix?: `0x${string}`;
|
|
1782
|
+
gas?: bigint;
|
|
1783
|
+
gasPrice?: bigint;
|
|
1784
|
+
maxFeePerGas?: bigint;
|
|
1785
|
+
maxPriorityFeePerGas?: bigint;
|
|
1786
|
+
nonce?: number;
|
|
1787
|
+
value?: bigint;
|
|
1788
|
+
}): Promise<`0x${string}`>;
|
|
1789
|
+
async deposit_reward_token(...args: any[]): Promise<`0x${string}`> {
|
|
1790
|
+
if (!this.contract.write) {
|
|
1791
|
+
throw new Error('Wallet client is required for write operations');
|
|
1792
|
+
}
|
|
1793
|
+
return this.contract.write.deposit_reward_token(args as any) as Promise<`0x${string}`>;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
/**
|
|
1797
|
+
* add_reward
|
|
1798
|
+
* nonpayable
|
|
1799
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1800
|
+
*/
|
|
1801
|
+
async add_reward(_reward_token: `0x${string}`, _distributor: `0x${string}`, options?: {
|
|
1802
|
+
accessList?: import('viem').AccessList;
|
|
1803
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1804
|
+
chain?: import('viem').Chain | null;
|
|
1805
|
+
dataSuffix?: `0x${string}`;
|
|
1806
|
+
gas?: bigint;
|
|
1807
|
+
gasPrice?: bigint;
|
|
1808
|
+
maxFeePerGas?: bigint;
|
|
1809
|
+
maxPriorityFeePerGas?: bigint;
|
|
1810
|
+
nonce?: number;
|
|
1811
|
+
value?: bigint;
|
|
1812
|
+
}): Promise<`0x${string}`> {
|
|
1813
|
+
if (!this.contract.write) {
|
|
1814
|
+
throw new Error('Wallet client is required for write operations');
|
|
1815
|
+
}
|
|
1816
|
+
return this.contract.write.add_reward([_reward_token, _distributor] as const, options) as Promise<`0x${string}`>;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
/**
|
|
1820
|
+
* set_reward_distributor
|
|
1821
|
+
* nonpayable
|
|
1822
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1823
|
+
*/
|
|
1824
|
+
async set_reward_distributor(_reward_token: `0x${string}`, _distributor: `0x${string}`, options?: {
|
|
1825
|
+
accessList?: import('viem').AccessList;
|
|
1826
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1827
|
+
chain?: import('viem').Chain | null;
|
|
1828
|
+
dataSuffix?: `0x${string}`;
|
|
1829
|
+
gas?: bigint;
|
|
1830
|
+
gasPrice?: bigint;
|
|
1831
|
+
maxFeePerGas?: bigint;
|
|
1832
|
+
maxPriorityFeePerGas?: bigint;
|
|
1833
|
+
nonce?: number;
|
|
1834
|
+
value?: bigint;
|
|
1835
|
+
}): Promise<`0x${string}`> {
|
|
1836
|
+
if (!this.contract.write) {
|
|
1837
|
+
throw new Error('Wallet client is required for write operations');
|
|
1838
|
+
}
|
|
1839
|
+
return this.contract.write.set_reward_distributor([_reward_token, _distributor] as const, options) as Promise<`0x${string}`>;
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* set_killed
|
|
1844
|
+
* nonpayable
|
|
1845
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1846
|
+
*/
|
|
1847
|
+
async set_killed(_is_killed: boolean, options?: {
|
|
1848
|
+
accessList?: import('viem').AccessList;
|
|
1849
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1850
|
+
chain?: import('viem').Chain | null;
|
|
1851
|
+
dataSuffix?: `0x${string}`;
|
|
1852
|
+
gas?: bigint;
|
|
1853
|
+
gasPrice?: bigint;
|
|
1854
|
+
maxFeePerGas?: bigint;
|
|
1855
|
+
maxPriorityFeePerGas?: bigint;
|
|
1856
|
+
nonce?: number;
|
|
1857
|
+
value?: bigint;
|
|
1858
|
+
}): Promise<`0x${string}`> {
|
|
1859
|
+
if (!this.contract.write) {
|
|
1860
|
+
throw new Error('Wallet client is required for write operations');
|
|
1861
|
+
}
|
|
1862
|
+
return this.contract.write.set_killed([_is_killed] as const, options) as Promise<`0x${string}`>;
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
/**
|
|
1866
|
+
* claimable_tokens
|
|
1867
|
+
* nonpayable
|
|
1868
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1869
|
+
*/
|
|
1870
|
+
async claimable_tokens(addr: `0x${string}`, options?: {
|
|
1871
|
+
accessList?: import('viem').AccessList;
|
|
1872
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1873
|
+
chain?: import('viem').Chain | null;
|
|
1874
|
+
dataSuffix?: `0x${string}`;
|
|
1875
|
+
gas?: bigint;
|
|
1876
|
+
gasPrice?: bigint;
|
|
1877
|
+
maxFeePerGas?: bigint;
|
|
1878
|
+
maxPriorityFeePerGas?: bigint;
|
|
1879
|
+
nonce?: number;
|
|
1880
|
+
value?: bigint;
|
|
1881
|
+
}): Promise<`0x${string}`> {
|
|
1882
|
+
if (!this.contract.write) {
|
|
1883
|
+
throw new Error('Wallet client is required for write operations');
|
|
1884
|
+
}
|
|
1885
|
+
return this.contract.write.claimable_tokens([addr] as const, options) as Promise<`0x${string}`>;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
|
|
1889
|
+
|
|
1890
|
+
/**
|
|
1891
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
1892
|
+
*
|
|
1893
|
+
* @example
|
|
1894
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1895
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
1896
|
+
* console.log('Would succeed:', result.result);
|
|
1897
|
+
*/
|
|
1898
|
+
get simulate() {
|
|
1899
|
+
const contract = this.contract;
|
|
1900
|
+
if (!contract.simulate) {
|
|
1901
|
+
throw new Error('Public client is required for simulation');
|
|
1902
|
+
}
|
|
1903
|
+
return {
|
|
1904
|
+
/**
|
|
1905
|
+
* Simulate deposit
|
|
1906
|
+
* Returns gas estimate and result without sending transaction
|
|
1907
|
+
* Supports multiple overloads: (uint256), (uint256, address), (uint256, address, bool)
|
|
1908
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1909
|
+
*/
|
|
1910
|
+
async deposit(...args: any[]): Promise<any> {
|
|
1911
|
+
return contract.simulate.deposit(args as any) as Promise<any>;
|
|
1912
|
+
},
|
|
1913
|
+
/**
|
|
1914
|
+
* Simulate withdraw
|
|
1915
|
+
* Returns gas estimate and result without sending transaction
|
|
1916
|
+
* Supports multiple overloads: (uint256), (uint256, bool)
|
|
1917
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1918
|
+
*/
|
|
1919
|
+
async withdraw(...args: any[]): Promise<any> {
|
|
1920
|
+
return contract.simulate.withdraw(args as any) as Promise<any>;
|
|
1921
|
+
},
|
|
1922
|
+
/**
|
|
1923
|
+
* Simulate claim_rewards
|
|
1924
|
+
* Returns gas estimate and result without sending transaction
|
|
1925
|
+
* Supports multiple overloads: (none), (address), (address, address)
|
|
1926
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1927
|
+
*/
|
|
1928
|
+
async claim_rewards(...args: any[]): Promise<any> {
|
|
1929
|
+
return contract.simulate.claim_rewards(args as any) as Promise<any>;
|
|
1930
|
+
},
|
|
1931
|
+
/**
|
|
1932
|
+
* Simulate transferFrom
|
|
1933
|
+
* Returns gas estimate and result without sending transaction
|
|
1934
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1935
|
+
*/
|
|
1936
|
+
async transferFrom(_from: `0x${string}`, _to: `0x${string}`, _value: bigint, options?: {
|
|
1937
|
+
accessList?: import('viem').AccessList;
|
|
1938
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1939
|
+
chain?: import('viem').Chain | null;
|
|
1940
|
+
dataSuffix?: `0x${string}`;
|
|
1941
|
+
gas?: bigint;
|
|
1942
|
+
gasPrice?: bigint;
|
|
1943
|
+
maxFeePerGas?: bigint;
|
|
1944
|
+
maxPriorityFeePerGas?: bigint;
|
|
1945
|
+
nonce?: number;
|
|
1946
|
+
value?: bigint;
|
|
1947
|
+
}): Promise<boolean> {
|
|
1948
|
+
return contract.simulate.transferFrom([_from, _to, _value] as const, options) as Promise<boolean>;
|
|
1949
|
+
},
|
|
1950
|
+
/**
|
|
1951
|
+
* Simulate transfer
|
|
1952
|
+
* Returns gas estimate and result without sending transaction
|
|
1953
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1954
|
+
*/
|
|
1955
|
+
async transfer(_to: `0x${string}`, _value: bigint, options?: {
|
|
1956
|
+
accessList?: import('viem').AccessList;
|
|
1957
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1958
|
+
chain?: import('viem').Chain | null;
|
|
1959
|
+
dataSuffix?: `0x${string}`;
|
|
1960
|
+
gas?: bigint;
|
|
1961
|
+
gasPrice?: bigint;
|
|
1962
|
+
maxFeePerGas?: bigint;
|
|
1963
|
+
maxPriorityFeePerGas?: bigint;
|
|
1964
|
+
nonce?: number;
|
|
1965
|
+
value?: bigint;
|
|
1966
|
+
}): Promise<boolean> {
|
|
1967
|
+
return contract.simulate.transfer([_to, _value] as const, options) as Promise<boolean>;
|
|
1968
|
+
},
|
|
1969
|
+
/**
|
|
1970
|
+
* Simulate approve
|
|
1971
|
+
* Returns gas estimate and result without sending transaction
|
|
1972
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1973
|
+
*/
|
|
1974
|
+
async approve(_spender: `0x${string}`, _value: bigint, options?: {
|
|
1975
|
+
accessList?: import('viem').AccessList;
|
|
1976
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1977
|
+
chain?: import('viem').Chain | null;
|
|
1978
|
+
dataSuffix?: `0x${string}`;
|
|
1979
|
+
gas?: bigint;
|
|
1980
|
+
gasPrice?: bigint;
|
|
1981
|
+
maxFeePerGas?: bigint;
|
|
1982
|
+
maxPriorityFeePerGas?: bigint;
|
|
1983
|
+
nonce?: number;
|
|
1984
|
+
value?: bigint;
|
|
1985
|
+
}): Promise<boolean> {
|
|
1986
|
+
return contract.simulate.approve([_spender, _value] as const, options) as Promise<boolean>;
|
|
1987
|
+
},
|
|
1988
|
+
/**
|
|
1989
|
+
* Simulate permit
|
|
1990
|
+
* Returns gas estimate and result without sending transaction
|
|
1991
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1992
|
+
*/
|
|
1993
|
+
async permit(_owner: `0x${string}`, _spender: `0x${string}`, _value: bigint, _deadline: bigint, _v: bigint, _r: `0x${string}`, _s: `0x${string}`, options?: {
|
|
1994
|
+
accessList?: import('viem').AccessList;
|
|
1995
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1996
|
+
chain?: import('viem').Chain | null;
|
|
1997
|
+
dataSuffix?: `0x${string}`;
|
|
1998
|
+
gas?: bigint;
|
|
1999
|
+
gasPrice?: bigint;
|
|
2000
|
+
maxFeePerGas?: bigint;
|
|
2001
|
+
maxPriorityFeePerGas?: bigint;
|
|
2002
|
+
nonce?: number;
|
|
2003
|
+
value?: bigint;
|
|
2004
|
+
}): Promise<boolean> {
|
|
2005
|
+
return contract.simulate.permit([_owner, _spender, _value, _deadline, _v, _r, _s] as const, options) as Promise<boolean>;
|
|
2006
|
+
},
|
|
2007
|
+
/**
|
|
2008
|
+
* Simulate increaseAllowance
|
|
2009
|
+
* Returns gas estimate and result without sending transaction
|
|
2010
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2011
|
+
*/
|
|
2012
|
+
async increaseAllowance(_spender: `0x${string}`, _added_value: bigint, options?: {
|
|
2013
|
+
accessList?: import('viem').AccessList;
|
|
2014
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2015
|
+
chain?: import('viem').Chain | null;
|
|
2016
|
+
dataSuffix?: `0x${string}`;
|
|
2017
|
+
gas?: bigint;
|
|
2018
|
+
gasPrice?: bigint;
|
|
2019
|
+
maxFeePerGas?: bigint;
|
|
2020
|
+
maxPriorityFeePerGas?: bigint;
|
|
2021
|
+
nonce?: number;
|
|
2022
|
+
value?: bigint;
|
|
2023
|
+
}): Promise<boolean> {
|
|
2024
|
+
return contract.simulate.increaseAllowance([_spender, _added_value] as const, options) as Promise<boolean>;
|
|
2025
|
+
},
|
|
2026
|
+
/**
|
|
2027
|
+
* Simulate decreaseAllowance
|
|
2028
|
+
* Returns gas estimate and result without sending transaction
|
|
2029
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2030
|
+
*/
|
|
2031
|
+
async decreaseAllowance(_spender: `0x${string}`, _subtracted_value: bigint, options?: {
|
|
2032
|
+
accessList?: import('viem').AccessList;
|
|
2033
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2034
|
+
chain?: import('viem').Chain | null;
|
|
2035
|
+
dataSuffix?: `0x${string}`;
|
|
2036
|
+
gas?: bigint;
|
|
2037
|
+
gasPrice?: bigint;
|
|
2038
|
+
maxFeePerGas?: bigint;
|
|
2039
|
+
maxPriorityFeePerGas?: bigint;
|
|
2040
|
+
nonce?: number;
|
|
2041
|
+
value?: bigint;
|
|
2042
|
+
}): Promise<boolean> {
|
|
2043
|
+
return contract.simulate.decreaseAllowance([_spender, _subtracted_value] as const, options) as Promise<boolean>;
|
|
2044
|
+
},
|
|
2045
|
+
/**
|
|
2046
|
+
* Simulate user_checkpoint
|
|
2047
|
+
* Returns gas estimate and result without sending transaction
|
|
2048
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2049
|
+
*/
|
|
2050
|
+
async user_checkpoint(addr: `0x${string}`, options?: {
|
|
2051
|
+
accessList?: import('viem').AccessList;
|
|
2052
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2053
|
+
chain?: import('viem').Chain | null;
|
|
2054
|
+
dataSuffix?: `0x${string}`;
|
|
2055
|
+
gas?: bigint;
|
|
2056
|
+
gasPrice?: bigint;
|
|
2057
|
+
maxFeePerGas?: bigint;
|
|
2058
|
+
maxPriorityFeePerGas?: bigint;
|
|
2059
|
+
nonce?: number;
|
|
2060
|
+
value?: bigint;
|
|
2061
|
+
}): Promise<boolean> {
|
|
2062
|
+
return contract.simulate.user_checkpoint([addr] as const, options) as Promise<boolean>;
|
|
2063
|
+
},
|
|
2064
|
+
/**
|
|
2065
|
+
* Simulate set_rewards_receiver
|
|
2066
|
+
* Returns gas estimate and result without sending transaction
|
|
2067
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2068
|
+
*/
|
|
2069
|
+
async set_rewards_receiver(_receiver: `0x${string}`, options?: {
|
|
2070
|
+
accessList?: import('viem').AccessList;
|
|
2071
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2072
|
+
chain?: import('viem').Chain | null;
|
|
2073
|
+
dataSuffix?: `0x${string}`;
|
|
2074
|
+
gas?: bigint;
|
|
2075
|
+
gasPrice?: bigint;
|
|
2076
|
+
maxFeePerGas?: bigint;
|
|
2077
|
+
maxPriorityFeePerGas?: bigint;
|
|
2078
|
+
nonce?: number;
|
|
2079
|
+
value?: bigint;
|
|
2080
|
+
}): Promise<void> {
|
|
2081
|
+
return contract.simulate.set_rewards_receiver([_receiver] as const, options) as Promise<void>;
|
|
2082
|
+
},
|
|
2083
|
+
/**
|
|
2084
|
+
* Simulate kick
|
|
2085
|
+
* Returns gas estimate and result without sending transaction
|
|
2086
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2087
|
+
*/
|
|
2088
|
+
async kick(addr: `0x${string}`, options?: {
|
|
2089
|
+
accessList?: import('viem').AccessList;
|
|
2090
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2091
|
+
chain?: import('viem').Chain | null;
|
|
2092
|
+
dataSuffix?: `0x${string}`;
|
|
2093
|
+
gas?: bigint;
|
|
2094
|
+
gasPrice?: bigint;
|
|
2095
|
+
maxFeePerGas?: bigint;
|
|
2096
|
+
maxPriorityFeePerGas?: bigint;
|
|
2097
|
+
nonce?: number;
|
|
2098
|
+
value?: bigint;
|
|
2099
|
+
}): Promise<void> {
|
|
2100
|
+
return contract.simulate.kick([addr] as const, options) as Promise<void>;
|
|
2101
|
+
},
|
|
2102
|
+
/**
|
|
2103
|
+
* Simulate set_gauge_manager
|
|
2104
|
+
* Returns gas estimate and result without sending transaction
|
|
2105
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2106
|
+
*/
|
|
2107
|
+
async set_gauge_manager(_gauge_manager: `0x${string}`, options?: {
|
|
2108
|
+
accessList?: import('viem').AccessList;
|
|
2109
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2110
|
+
chain?: import('viem').Chain | null;
|
|
2111
|
+
dataSuffix?: `0x${string}`;
|
|
2112
|
+
gas?: bigint;
|
|
2113
|
+
gasPrice?: bigint;
|
|
2114
|
+
maxFeePerGas?: bigint;
|
|
2115
|
+
maxPriorityFeePerGas?: bigint;
|
|
2116
|
+
nonce?: number;
|
|
2117
|
+
value?: bigint;
|
|
2118
|
+
}): Promise<void> {
|
|
2119
|
+
return contract.simulate.set_gauge_manager([_gauge_manager] as const, options) as Promise<void>;
|
|
2120
|
+
},
|
|
2121
|
+
/**
|
|
2122
|
+
* Simulate deposit_reward_token
|
|
2123
|
+
* Returns gas estimate and result without sending transaction
|
|
2124
|
+
* Supports multiple overloads: (address, uint256), (address, uint256, uint256)
|
|
2125
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2126
|
+
*/
|
|
2127
|
+
async deposit_reward_token(...args: any[]): Promise<any> {
|
|
2128
|
+
return contract.simulate.deposit_reward_token(args as any) as Promise<any>;
|
|
2129
|
+
},
|
|
2130
|
+
/**
|
|
2131
|
+
* Simulate add_reward
|
|
2132
|
+
* Returns gas estimate and result without sending transaction
|
|
2133
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2134
|
+
*/
|
|
2135
|
+
async add_reward(_reward_token: `0x${string}`, _distributor: `0x${string}`, options?: {
|
|
2136
|
+
accessList?: import('viem').AccessList;
|
|
2137
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2138
|
+
chain?: import('viem').Chain | null;
|
|
2139
|
+
dataSuffix?: `0x${string}`;
|
|
2140
|
+
gas?: bigint;
|
|
2141
|
+
gasPrice?: bigint;
|
|
2142
|
+
maxFeePerGas?: bigint;
|
|
2143
|
+
maxPriorityFeePerGas?: bigint;
|
|
2144
|
+
nonce?: number;
|
|
2145
|
+
value?: bigint;
|
|
2146
|
+
}): Promise<void> {
|
|
2147
|
+
return contract.simulate.add_reward([_reward_token, _distributor] as const, options) as Promise<void>;
|
|
2148
|
+
},
|
|
2149
|
+
/**
|
|
2150
|
+
* Simulate set_reward_distributor
|
|
2151
|
+
* Returns gas estimate and result without sending transaction
|
|
2152
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2153
|
+
*/
|
|
2154
|
+
async set_reward_distributor(_reward_token: `0x${string}`, _distributor: `0x${string}`, options?: {
|
|
2155
|
+
accessList?: import('viem').AccessList;
|
|
2156
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2157
|
+
chain?: import('viem').Chain | null;
|
|
2158
|
+
dataSuffix?: `0x${string}`;
|
|
2159
|
+
gas?: bigint;
|
|
2160
|
+
gasPrice?: bigint;
|
|
2161
|
+
maxFeePerGas?: bigint;
|
|
2162
|
+
maxPriorityFeePerGas?: bigint;
|
|
2163
|
+
nonce?: number;
|
|
2164
|
+
value?: bigint;
|
|
2165
|
+
}): Promise<void> {
|
|
2166
|
+
return contract.simulate.set_reward_distributor([_reward_token, _distributor] as const, options) as Promise<void>;
|
|
2167
|
+
},
|
|
2168
|
+
/**
|
|
2169
|
+
* Simulate set_killed
|
|
2170
|
+
* Returns gas estimate and result without sending transaction
|
|
2171
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2172
|
+
*/
|
|
2173
|
+
async set_killed(_is_killed: boolean, options?: {
|
|
2174
|
+
accessList?: import('viem').AccessList;
|
|
2175
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2176
|
+
chain?: import('viem').Chain | null;
|
|
2177
|
+
dataSuffix?: `0x${string}`;
|
|
2178
|
+
gas?: bigint;
|
|
2179
|
+
gasPrice?: bigint;
|
|
2180
|
+
maxFeePerGas?: bigint;
|
|
2181
|
+
maxPriorityFeePerGas?: bigint;
|
|
2182
|
+
nonce?: number;
|
|
2183
|
+
value?: bigint;
|
|
2184
|
+
}): Promise<void> {
|
|
2185
|
+
return contract.simulate.set_killed([_is_killed] as const, options) as Promise<void>;
|
|
2186
|
+
},
|
|
2187
|
+
/**
|
|
2188
|
+
* Simulate claimable_tokens
|
|
2189
|
+
* Returns gas estimate and result without sending transaction
|
|
2190
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2191
|
+
*/
|
|
2192
|
+
async claimable_tokens(addr: `0x${string}`, options?: {
|
|
2193
|
+
accessList?: import('viem').AccessList;
|
|
2194
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2195
|
+
chain?: import('viem').Chain | null;
|
|
2196
|
+
dataSuffix?: `0x${string}`;
|
|
2197
|
+
gas?: bigint;
|
|
2198
|
+
gasPrice?: bigint;
|
|
2199
|
+
maxFeePerGas?: bigint;
|
|
2200
|
+
maxPriorityFeePerGas?: bigint;
|
|
2201
|
+
nonce?: number;
|
|
2202
|
+
value?: bigint;
|
|
2203
|
+
}): Promise<bigint> {
|
|
2204
|
+
return contract.simulate.claimable_tokens([addr] as const, options) as Promise<bigint>;
|
|
2205
|
+
}
|
|
2206
|
+
};
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
/**
|
|
2210
|
+
* Watch contract events
|
|
2211
|
+
*
|
|
2212
|
+
* @example
|
|
2213
|
+
* // Watch all Transfer events
|
|
2214
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
2215
|
+
* console.log('Transfer:', event);
|
|
2216
|
+
* });
|
|
2217
|
+
*
|
|
2218
|
+
* // Stop watching
|
|
2219
|
+
* unwatch();
|
|
2220
|
+
*/
|
|
2221
|
+
get watch() {
|
|
2222
|
+
return {
|
|
2223
|
+
/**
|
|
2224
|
+
* Watch Deposit events
|
|
2225
|
+
* @param callback Function to call when event is emitted
|
|
2226
|
+
* @param filter Optional filter for indexed parameters
|
|
2227
|
+
* @returns Unwatch function to stop listening
|
|
2228
|
+
*/
|
|
2229
|
+
Deposit: (callback: (event: { provider: `0x${string}`; value: bigint }) => void, filter?: { provider?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2230
|
+
return this.publicClient.watchContractEvent({
|
|
2231
|
+
address: this.contractAddress,
|
|
2232
|
+
abi: LiquidityGaugeV6Abi,
|
|
2233
|
+
eventName: 'Deposit',
|
|
2234
|
+
args: filter as any,
|
|
2235
|
+
onLogs: (logs: any[]) => {
|
|
2236
|
+
logs.forEach((log: any) => {
|
|
2237
|
+
callback(log.args as any);
|
|
2238
|
+
});
|
|
2239
|
+
},
|
|
2240
|
+
}) as () => void;
|
|
2241
|
+
},
|
|
2242
|
+
/**
|
|
2243
|
+
* Watch Withdraw events
|
|
2244
|
+
* @param callback Function to call when event is emitted
|
|
2245
|
+
* @param filter Optional filter for indexed parameters
|
|
2246
|
+
* @returns Unwatch function to stop listening
|
|
2247
|
+
*/
|
|
2248
|
+
Withdraw: (callback: (event: { provider: `0x${string}`; value: bigint }) => void, filter?: { provider?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2249
|
+
return this.publicClient.watchContractEvent({
|
|
2250
|
+
address: this.contractAddress,
|
|
2251
|
+
abi: LiquidityGaugeV6Abi,
|
|
2252
|
+
eventName: 'Withdraw',
|
|
2253
|
+
args: filter as any,
|
|
2254
|
+
onLogs: (logs: any[]) => {
|
|
2255
|
+
logs.forEach((log: any) => {
|
|
2256
|
+
callback(log.args as any);
|
|
2257
|
+
});
|
|
2258
|
+
},
|
|
2259
|
+
}) as () => void;
|
|
2260
|
+
},
|
|
2261
|
+
/**
|
|
2262
|
+
* Watch UpdateLiquidityLimit events
|
|
2263
|
+
* @param callback Function to call when event is emitted
|
|
2264
|
+
* @param filter Optional filter for indexed parameters
|
|
2265
|
+
* @returns Unwatch function to stop listening
|
|
2266
|
+
*/
|
|
2267
|
+
UpdateLiquidityLimit: (callback: (event: { user: `0x${string}`; original_balance: bigint; original_supply: bigint; working_balance: bigint; working_supply: bigint }) => void, filter?: { user?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2268
|
+
return this.publicClient.watchContractEvent({
|
|
2269
|
+
address: this.contractAddress,
|
|
2270
|
+
abi: LiquidityGaugeV6Abi,
|
|
2271
|
+
eventName: 'UpdateLiquidityLimit',
|
|
2272
|
+
args: filter as any,
|
|
2273
|
+
onLogs: (logs: any[]) => {
|
|
2274
|
+
logs.forEach((log: any) => {
|
|
2275
|
+
callback(log.args as any);
|
|
2276
|
+
});
|
|
2277
|
+
},
|
|
2278
|
+
}) as () => void;
|
|
2279
|
+
},
|
|
2280
|
+
/**
|
|
2281
|
+
* Watch CommitOwnership events
|
|
2282
|
+
* @param callback Function to call when event is emitted
|
|
2283
|
+
* @param filter Optional filter for indexed parameters
|
|
2284
|
+
* @returns Unwatch function to stop listening
|
|
2285
|
+
*/
|
|
2286
|
+
CommitOwnership: (callback: (event: { admin: `0x${string}` }) => void) => {
|
|
2287
|
+
return this.publicClient.watchContractEvent({
|
|
2288
|
+
address: this.contractAddress,
|
|
2289
|
+
abi: LiquidityGaugeV6Abi,
|
|
2290
|
+
eventName: 'CommitOwnership',
|
|
2291
|
+
|
|
2292
|
+
onLogs: (logs: any[]) => {
|
|
2293
|
+
logs.forEach((log: any) => {
|
|
2294
|
+
callback(log.args as any);
|
|
2295
|
+
});
|
|
2296
|
+
},
|
|
2297
|
+
}) as () => void;
|
|
2298
|
+
},
|
|
2299
|
+
/**
|
|
2300
|
+
* Watch ApplyOwnership events
|
|
2301
|
+
* @param callback Function to call when event is emitted
|
|
2302
|
+
* @param filter Optional filter for indexed parameters
|
|
2303
|
+
* @returns Unwatch function to stop listening
|
|
2304
|
+
*/
|
|
2305
|
+
ApplyOwnership: (callback: (event: { admin: `0x${string}` }) => void) => {
|
|
2306
|
+
return this.publicClient.watchContractEvent({
|
|
2307
|
+
address: this.contractAddress,
|
|
2308
|
+
abi: LiquidityGaugeV6Abi,
|
|
2309
|
+
eventName: 'ApplyOwnership',
|
|
2310
|
+
|
|
2311
|
+
onLogs: (logs: any[]) => {
|
|
2312
|
+
logs.forEach((log: any) => {
|
|
2313
|
+
callback(log.args as any);
|
|
2314
|
+
});
|
|
2315
|
+
},
|
|
2316
|
+
}) as () => void;
|
|
2317
|
+
},
|
|
2318
|
+
/**
|
|
2319
|
+
* Watch SetGaugeManager events
|
|
2320
|
+
* @param callback Function to call when event is emitted
|
|
2321
|
+
* @param filter Optional filter for indexed parameters
|
|
2322
|
+
* @returns Unwatch function to stop listening
|
|
2323
|
+
*/
|
|
2324
|
+
SetGaugeManager: (callback: (event: { _gauge_manager: `0x${string}` }) => void) => {
|
|
2325
|
+
return this.publicClient.watchContractEvent({
|
|
2326
|
+
address: this.contractAddress,
|
|
2327
|
+
abi: LiquidityGaugeV6Abi,
|
|
2328
|
+
eventName: 'SetGaugeManager',
|
|
2329
|
+
|
|
2330
|
+
onLogs: (logs: any[]) => {
|
|
2331
|
+
logs.forEach((log: any) => {
|
|
2332
|
+
callback(log.args as any);
|
|
2333
|
+
});
|
|
2334
|
+
},
|
|
2335
|
+
}) as () => void;
|
|
2336
|
+
},
|
|
2337
|
+
/**
|
|
2338
|
+
* Watch Transfer events
|
|
2339
|
+
* @param callback Function to call when event is emitted
|
|
2340
|
+
* @param filter Optional filter for indexed parameters
|
|
2341
|
+
* @returns Unwatch function to stop listening
|
|
2342
|
+
*/
|
|
2343
|
+
Transfer: (callback: (event: { _from: `0x${string}`; _to: `0x${string}`; _value: bigint }) => void, filter?: { _from?: `0x${string}` | `0x${string}`[] | null; _to?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2344
|
+
return this.publicClient.watchContractEvent({
|
|
2345
|
+
address: this.contractAddress,
|
|
2346
|
+
abi: LiquidityGaugeV6Abi,
|
|
2347
|
+
eventName: 'Transfer',
|
|
2348
|
+
args: filter as any,
|
|
2349
|
+
onLogs: (logs: any[]) => {
|
|
2350
|
+
logs.forEach((log: any) => {
|
|
2351
|
+
callback(log.args as any);
|
|
2352
|
+
});
|
|
2353
|
+
},
|
|
2354
|
+
}) as () => void;
|
|
2355
|
+
},
|
|
2356
|
+
/**
|
|
2357
|
+
* Watch Approval events
|
|
2358
|
+
* @param callback Function to call when event is emitted
|
|
2359
|
+
* @param filter Optional filter for indexed parameters
|
|
2360
|
+
* @returns Unwatch function to stop listening
|
|
2361
|
+
*/
|
|
2362
|
+
Approval: (callback: (event: { _owner: `0x${string}`; _spender: `0x${string}`; _value: bigint }) => void, filter?: { _owner?: `0x${string}` | `0x${string}`[] | null; _spender?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2363
|
+
return this.publicClient.watchContractEvent({
|
|
2364
|
+
address: this.contractAddress,
|
|
2365
|
+
abi: LiquidityGaugeV6Abi,
|
|
2366
|
+
eventName: 'Approval',
|
|
2367
|
+
args: filter as any,
|
|
2368
|
+
onLogs: (logs: any[]) => {
|
|
2369
|
+
logs.forEach((log: any) => {
|
|
2370
|
+
callback(log.args as any);
|
|
2371
|
+
});
|
|
2372
|
+
},
|
|
2373
|
+
}) as () => void;
|
|
2374
|
+
}
|
|
2375
|
+
};
|
|
2376
|
+
}
|
|
2377
|
+
}
|