@gitmyabi/chnstaking 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 +108 -0
- package/contracts/CHNStaking_json.d.ts +1275 -0
- package/contracts/CHNStaking_json.js +1358 -0
- package/contracts/CHNStaking_json.ts +1679 -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 +43 -0
|
@@ -0,0 +1,1275 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* CHNStaking_json ABI
|
|
4
|
+
*
|
|
5
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
6
|
+
*/
|
|
7
|
+
export declare const CHNStaking_jsonAbi: readonly [{
|
|
8
|
+
readonly anonymous: false;
|
|
9
|
+
readonly inputs: readonly [{
|
|
10
|
+
readonly indexed: true;
|
|
11
|
+
readonly internalType: "address";
|
|
12
|
+
readonly name: "stakToken";
|
|
13
|
+
readonly type: "address";
|
|
14
|
+
}, {
|
|
15
|
+
readonly indexed: true;
|
|
16
|
+
readonly internalType: "uint256";
|
|
17
|
+
readonly name: "allocPoint";
|
|
18
|
+
readonly type: "uint256";
|
|
19
|
+
}];
|
|
20
|
+
readonly name: "Add";
|
|
21
|
+
readonly type: "event";
|
|
22
|
+
}, {
|
|
23
|
+
readonly anonymous: false;
|
|
24
|
+
readonly inputs: readonly [{
|
|
25
|
+
readonly indexed: true;
|
|
26
|
+
readonly internalType: "address";
|
|
27
|
+
readonly name: "userAddress";
|
|
28
|
+
readonly type: "address";
|
|
29
|
+
}, {
|
|
30
|
+
readonly indexed: true;
|
|
31
|
+
readonly internalType: "uint256";
|
|
32
|
+
readonly name: "pid";
|
|
33
|
+
readonly type: "uint256";
|
|
34
|
+
}];
|
|
35
|
+
readonly name: "ClaimRewardFromVault";
|
|
36
|
+
readonly type: "event";
|
|
37
|
+
}, {
|
|
38
|
+
readonly anonymous: false;
|
|
39
|
+
readonly inputs: readonly [{
|
|
40
|
+
readonly indexed: true;
|
|
41
|
+
readonly internalType: "address";
|
|
42
|
+
readonly name: "delegate";
|
|
43
|
+
readonly type: "address";
|
|
44
|
+
}, {
|
|
45
|
+
readonly indexed: false;
|
|
46
|
+
readonly internalType: "uint256";
|
|
47
|
+
readonly name: "previousBalance";
|
|
48
|
+
readonly type: "uint256";
|
|
49
|
+
}, {
|
|
50
|
+
readonly indexed: false;
|
|
51
|
+
readonly internalType: "uint256";
|
|
52
|
+
readonly name: "newBalance";
|
|
53
|
+
readonly type: "uint256";
|
|
54
|
+
}];
|
|
55
|
+
readonly name: "DelegateVotesChanged";
|
|
56
|
+
readonly type: "event";
|
|
57
|
+
}, {
|
|
58
|
+
readonly anonymous: false;
|
|
59
|
+
readonly inputs: readonly [{
|
|
60
|
+
readonly indexed: true;
|
|
61
|
+
readonly internalType: "address";
|
|
62
|
+
readonly name: "user";
|
|
63
|
+
readonly type: "address";
|
|
64
|
+
}, {
|
|
65
|
+
readonly indexed: true;
|
|
66
|
+
readonly internalType: "uint256";
|
|
67
|
+
readonly name: "pid";
|
|
68
|
+
readonly type: "uint256";
|
|
69
|
+
}, {
|
|
70
|
+
readonly indexed: false;
|
|
71
|
+
readonly internalType: "uint256";
|
|
72
|
+
readonly name: "amount";
|
|
73
|
+
readonly type: "uint256";
|
|
74
|
+
}];
|
|
75
|
+
readonly name: "EmergencyWithdraw";
|
|
76
|
+
readonly type: "event";
|
|
77
|
+
}, {
|
|
78
|
+
readonly anonymous: false;
|
|
79
|
+
readonly inputs: readonly [{
|
|
80
|
+
readonly indexed: true;
|
|
81
|
+
readonly internalType: "address";
|
|
82
|
+
readonly name: "previousOwner";
|
|
83
|
+
readonly type: "address";
|
|
84
|
+
}, {
|
|
85
|
+
readonly indexed: true;
|
|
86
|
+
readonly internalType: "address";
|
|
87
|
+
readonly name: "newOwner";
|
|
88
|
+
readonly type: "address";
|
|
89
|
+
}];
|
|
90
|
+
readonly name: "OwnershipTransferred";
|
|
91
|
+
readonly type: "event";
|
|
92
|
+
}, {
|
|
93
|
+
readonly anonymous: false;
|
|
94
|
+
readonly inputs: readonly [{
|
|
95
|
+
readonly indexed: true;
|
|
96
|
+
readonly internalType: "uint256";
|
|
97
|
+
readonly name: "pid";
|
|
98
|
+
readonly type: "uint256";
|
|
99
|
+
}, {
|
|
100
|
+
readonly indexed: true;
|
|
101
|
+
readonly internalType: "uint256";
|
|
102
|
+
readonly name: "allocPoint";
|
|
103
|
+
readonly type: "uint256";
|
|
104
|
+
}];
|
|
105
|
+
readonly name: "Set";
|
|
106
|
+
readonly type: "event";
|
|
107
|
+
}, {
|
|
108
|
+
readonly anonymous: false;
|
|
109
|
+
readonly inputs: readonly [{
|
|
110
|
+
readonly indexed: true;
|
|
111
|
+
readonly internalType: "address";
|
|
112
|
+
readonly name: "user";
|
|
113
|
+
readonly type: "address";
|
|
114
|
+
}, {
|
|
115
|
+
readonly indexed: true;
|
|
116
|
+
readonly internalType: "uint256";
|
|
117
|
+
readonly name: "pid";
|
|
118
|
+
readonly type: "uint256";
|
|
119
|
+
}, {
|
|
120
|
+
readonly indexed: false;
|
|
121
|
+
readonly internalType: "uint256";
|
|
122
|
+
readonly name: "amount";
|
|
123
|
+
readonly type: "uint256";
|
|
124
|
+
}];
|
|
125
|
+
readonly name: "Stake";
|
|
126
|
+
readonly type: "event";
|
|
127
|
+
}, {
|
|
128
|
+
readonly anonymous: false;
|
|
129
|
+
readonly inputs: readonly [{
|
|
130
|
+
readonly indexed: true;
|
|
131
|
+
readonly internalType: "address";
|
|
132
|
+
readonly name: "user";
|
|
133
|
+
readonly type: "address";
|
|
134
|
+
}, {
|
|
135
|
+
readonly indexed: true;
|
|
136
|
+
readonly internalType: "uint256";
|
|
137
|
+
readonly name: "pid";
|
|
138
|
+
readonly type: "uint256";
|
|
139
|
+
}, {
|
|
140
|
+
readonly indexed: false;
|
|
141
|
+
readonly internalType: "uint256";
|
|
142
|
+
readonly name: "amount";
|
|
143
|
+
readonly type: "uint256";
|
|
144
|
+
}, {
|
|
145
|
+
readonly indexed: false;
|
|
146
|
+
readonly internalType: "uint256";
|
|
147
|
+
readonly name: "reward";
|
|
148
|
+
readonly type: "uint256";
|
|
149
|
+
}];
|
|
150
|
+
readonly name: "Withdraw";
|
|
151
|
+
readonly type: "event";
|
|
152
|
+
}, {
|
|
153
|
+
readonly inputs: readonly [];
|
|
154
|
+
readonly name: "BONUS_MULTIPLIER";
|
|
155
|
+
readonly outputs: readonly [{
|
|
156
|
+
readonly internalType: "uint256";
|
|
157
|
+
readonly name: "";
|
|
158
|
+
readonly type: "uint256";
|
|
159
|
+
}];
|
|
160
|
+
readonly stateMutability: "view";
|
|
161
|
+
readonly type: "function";
|
|
162
|
+
}, {
|
|
163
|
+
readonly inputs: readonly [{
|
|
164
|
+
readonly internalType: "uint256";
|
|
165
|
+
readonly name: "_allocPoint";
|
|
166
|
+
readonly type: "uint256";
|
|
167
|
+
}, {
|
|
168
|
+
readonly internalType: "contract IERC20";
|
|
169
|
+
readonly name: "_stakeToken";
|
|
170
|
+
readonly type: "address";
|
|
171
|
+
}];
|
|
172
|
+
readonly name: "add";
|
|
173
|
+
readonly outputs: readonly [];
|
|
174
|
+
readonly stateMutability: "nonpayable";
|
|
175
|
+
readonly type: "function";
|
|
176
|
+
}, {
|
|
177
|
+
readonly inputs: readonly [];
|
|
178
|
+
readonly name: "bonusEndBlock";
|
|
179
|
+
readonly outputs: readonly [{
|
|
180
|
+
readonly internalType: "uint256";
|
|
181
|
+
readonly name: "";
|
|
182
|
+
readonly type: "uint256";
|
|
183
|
+
}];
|
|
184
|
+
readonly stateMutability: "view";
|
|
185
|
+
readonly type: "function";
|
|
186
|
+
}, {
|
|
187
|
+
readonly inputs: readonly [{
|
|
188
|
+
readonly internalType: "uint256";
|
|
189
|
+
readonly name: "";
|
|
190
|
+
readonly type: "uint256";
|
|
191
|
+
}, {
|
|
192
|
+
readonly internalType: "address";
|
|
193
|
+
readonly name: "";
|
|
194
|
+
readonly type: "address";
|
|
195
|
+
}, {
|
|
196
|
+
readonly internalType: "uint32";
|
|
197
|
+
readonly name: "";
|
|
198
|
+
readonly type: "uint32";
|
|
199
|
+
}];
|
|
200
|
+
readonly name: "checkpoints";
|
|
201
|
+
readonly outputs: readonly [{
|
|
202
|
+
readonly internalType: "uint32";
|
|
203
|
+
readonly name: "fromBlock";
|
|
204
|
+
readonly type: "uint32";
|
|
205
|
+
}, {
|
|
206
|
+
readonly internalType: "uint256";
|
|
207
|
+
readonly name: "votes";
|
|
208
|
+
readonly type: "uint256";
|
|
209
|
+
}];
|
|
210
|
+
readonly stateMutability: "view";
|
|
211
|
+
readonly type: "function";
|
|
212
|
+
}, {
|
|
213
|
+
readonly inputs: readonly [{
|
|
214
|
+
readonly internalType: "address";
|
|
215
|
+
readonly name: "userAddress";
|
|
216
|
+
readonly type: "address";
|
|
217
|
+
}, {
|
|
218
|
+
readonly internalType: "uint256";
|
|
219
|
+
readonly name: "pid";
|
|
220
|
+
readonly type: "uint256";
|
|
221
|
+
}];
|
|
222
|
+
readonly name: "claimRewardFromVault";
|
|
223
|
+
readonly outputs: readonly [{
|
|
224
|
+
readonly internalType: "uint256";
|
|
225
|
+
readonly name: "";
|
|
226
|
+
readonly type: "uint256";
|
|
227
|
+
}];
|
|
228
|
+
readonly stateMutability: "nonpayable";
|
|
229
|
+
readonly type: "function";
|
|
230
|
+
}, {
|
|
231
|
+
readonly inputs: readonly [{
|
|
232
|
+
readonly internalType: "uint256";
|
|
233
|
+
readonly name: "_pid";
|
|
234
|
+
readonly type: "uint256";
|
|
235
|
+
}];
|
|
236
|
+
readonly name: "emergencyWithdraw";
|
|
237
|
+
readonly outputs: readonly [];
|
|
238
|
+
readonly stateMutability: "nonpayable";
|
|
239
|
+
readonly type: "function";
|
|
240
|
+
}, {
|
|
241
|
+
readonly inputs: readonly [{
|
|
242
|
+
readonly internalType: "uint256";
|
|
243
|
+
readonly name: "_from";
|
|
244
|
+
readonly type: "uint256";
|
|
245
|
+
}, {
|
|
246
|
+
readonly internalType: "uint256";
|
|
247
|
+
readonly name: "_to";
|
|
248
|
+
readonly type: "uint256";
|
|
249
|
+
}];
|
|
250
|
+
readonly name: "getMultiplier";
|
|
251
|
+
readonly outputs: readonly [{
|
|
252
|
+
readonly internalType: "uint256";
|
|
253
|
+
readonly name: "";
|
|
254
|
+
readonly type: "uint256";
|
|
255
|
+
}];
|
|
256
|
+
readonly stateMutability: "view";
|
|
257
|
+
readonly type: "function";
|
|
258
|
+
}, {
|
|
259
|
+
readonly inputs: readonly [{
|
|
260
|
+
readonly internalType: "uint256";
|
|
261
|
+
readonly name: "_pid";
|
|
262
|
+
readonly type: "uint256";
|
|
263
|
+
}, {
|
|
264
|
+
readonly internalType: "address";
|
|
265
|
+
readonly name: "account";
|
|
266
|
+
readonly type: "address";
|
|
267
|
+
}, {
|
|
268
|
+
readonly internalType: "uint256";
|
|
269
|
+
readonly name: "blockNumber";
|
|
270
|
+
readonly type: "uint256";
|
|
271
|
+
}];
|
|
272
|
+
readonly name: "getPriorVotes";
|
|
273
|
+
readonly outputs: readonly [{
|
|
274
|
+
readonly internalType: "uint256";
|
|
275
|
+
readonly name: "";
|
|
276
|
+
readonly type: "uint256";
|
|
277
|
+
}];
|
|
278
|
+
readonly stateMutability: "view";
|
|
279
|
+
readonly type: "function";
|
|
280
|
+
}, {
|
|
281
|
+
readonly inputs: readonly [{
|
|
282
|
+
readonly internalType: "uint256";
|
|
283
|
+
readonly name: "pid";
|
|
284
|
+
readonly type: "uint256";
|
|
285
|
+
}, {
|
|
286
|
+
readonly internalType: "address";
|
|
287
|
+
readonly name: "user";
|
|
288
|
+
readonly type: "address";
|
|
289
|
+
}];
|
|
290
|
+
readonly name: "getStakingAmount";
|
|
291
|
+
readonly outputs: readonly [{
|
|
292
|
+
readonly internalType: "uint256";
|
|
293
|
+
readonly name: "";
|
|
294
|
+
readonly type: "uint256";
|
|
295
|
+
}];
|
|
296
|
+
readonly stateMutability: "view";
|
|
297
|
+
readonly type: "function";
|
|
298
|
+
}, {
|
|
299
|
+
readonly inputs: readonly [{
|
|
300
|
+
readonly internalType: "contract IERC20";
|
|
301
|
+
readonly name: "_rewardToken";
|
|
302
|
+
readonly type: "address";
|
|
303
|
+
}, {
|
|
304
|
+
readonly internalType: "uint256";
|
|
305
|
+
readonly name: "_rewardPerBlock";
|
|
306
|
+
readonly type: "uint256";
|
|
307
|
+
}, {
|
|
308
|
+
readonly internalType: "uint256";
|
|
309
|
+
readonly name: "_startBlock";
|
|
310
|
+
readonly type: "uint256";
|
|
311
|
+
}, {
|
|
312
|
+
readonly internalType: "uint256";
|
|
313
|
+
readonly name: "_bonusEndBlock";
|
|
314
|
+
readonly type: "uint256";
|
|
315
|
+
}, {
|
|
316
|
+
readonly internalType: "uint256";
|
|
317
|
+
readonly name: "_multiplier";
|
|
318
|
+
readonly type: "uint256";
|
|
319
|
+
}, {
|
|
320
|
+
readonly internalType: "address";
|
|
321
|
+
readonly name: "_rewardVault";
|
|
322
|
+
readonly type: "address";
|
|
323
|
+
}];
|
|
324
|
+
readonly name: "initialize";
|
|
325
|
+
readonly outputs: readonly [];
|
|
326
|
+
readonly stateMutability: "nonpayable";
|
|
327
|
+
readonly type: "function";
|
|
328
|
+
}, {
|
|
329
|
+
readonly inputs: readonly [];
|
|
330
|
+
readonly name: "massUpdatePools";
|
|
331
|
+
readonly outputs: readonly [];
|
|
332
|
+
readonly stateMutability: "nonpayable";
|
|
333
|
+
readonly type: "function";
|
|
334
|
+
}, {
|
|
335
|
+
readonly inputs: readonly [{
|
|
336
|
+
readonly internalType: "uint256";
|
|
337
|
+
readonly name: "";
|
|
338
|
+
readonly type: "uint256";
|
|
339
|
+
}, {
|
|
340
|
+
readonly internalType: "address";
|
|
341
|
+
readonly name: "";
|
|
342
|
+
readonly type: "address";
|
|
343
|
+
}];
|
|
344
|
+
readonly name: "numCheckpoints";
|
|
345
|
+
readonly outputs: readonly [{
|
|
346
|
+
readonly internalType: "uint32";
|
|
347
|
+
readonly name: "";
|
|
348
|
+
readonly type: "uint32";
|
|
349
|
+
}];
|
|
350
|
+
readonly stateMutability: "view";
|
|
351
|
+
readonly type: "function";
|
|
352
|
+
}, {
|
|
353
|
+
readonly inputs: readonly [];
|
|
354
|
+
readonly name: "owner";
|
|
355
|
+
readonly outputs: readonly [{
|
|
356
|
+
readonly internalType: "address";
|
|
357
|
+
readonly name: "";
|
|
358
|
+
readonly type: "address";
|
|
359
|
+
}];
|
|
360
|
+
readonly stateMutability: "view";
|
|
361
|
+
readonly type: "function";
|
|
362
|
+
}, {
|
|
363
|
+
readonly inputs: readonly [{
|
|
364
|
+
readonly internalType: "uint256";
|
|
365
|
+
readonly name: "_pid";
|
|
366
|
+
readonly type: "uint256";
|
|
367
|
+
}, {
|
|
368
|
+
readonly internalType: "address";
|
|
369
|
+
readonly name: "_user";
|
|
370
|
+
readonly type: "address";
|
|
371
|
+
}];
|
|
372
|
+
readonly name: "pendingReward";
|
|
373
|
+
readonly outputs: readonly [{
|
|
374
|
+
readonly internalType: "uint256";
|
|
375
|
+
readonly name: "";
|
|
376
|
+
readonly type: "uint256";
|
|
377
|
+
}];
|
|
378
|
+
readonly stateMutability: "view";
|
|
379
|
+
readonly type: "function";
|
|
380
|
+
}, {
|
|
381
|
+
readonly inputs: readonly [{
|
|
382
|
+
readonly internalType: "uint256";
|
|
383
|
+
readonly name: "";
|
|
384
|
+
readonly type: "uint256";
|
|
385
|
+
}];
|
|
386
|
+
readonly name: "poolInfo";
|
|
387
|
+
readonly outputs: readonly [{
|
|
388
|
+
readonly internalType: "contract IERC20";
|
|
389
|
+
readonly name: "stakeToken";
|
|
390
|
+
readonly type: "address";
|
|
391
|
+
}, {
|
|
392
|
+
readonly internalType: "uint256";
|
|
393
|
+
readonly name: "allocPoint";
|
|
394
|
+
readonly type: "uint256";
|
|
395
|
+
}, {
|
|
396
|
+
readonly internalType: "uint256";
|
|
397
|
+
readonly name: "lastRewardBlock";
|
|
398
|
+
readonly type: "uint256";
|
|
399
|
+
}, {
|
|
400
|
+
readonly internalType: "uint256";
|
|
401
|
+
readonly name: "accCHNPerShare";
|
|
402
|
+
readonly type: "uint256";
|
|
403
|
+
}, {
|
|
404
|
+
readonly internalType: "uint256";
|
|
405
|
+
readonly name: "totalAmountStake";
|
|
406
|
+
readonly type: "uint256";
|
|
407
|
+
}];
|
|
408
|
+
readonly stateMutability: "view";
|
|
409
|
+
readonly type: "function";
|
|
410
|
+
}, {
|
|
411
|
+
readonly inputs: readonly [];
|
|
412
|
+
readonly name: "poolLength";
|
|
413
|
+
readonly outputs: readonly [{
|
|
414
|
+
readonly internalType: "uint256";
|
|
415
|
+
readonly name: "";
|
|
416
|
+
readonly type: "uint256";
|
|
417
|
+
}];
|
|
418
|
+
readonly stateMutability: "view";
|
|
419
|
+
readonly type: "function";
|
|
420
|
+
}, {
|
|
421
|
+
readonly inputs: readonly [{
|
|
422
|
+
readonly internalType: "address";
|
|
423
|
+
readonly name: "";
|
|
424
|
+
readonly type: "address";
|
|
425
|
+
}];
|
|
426
|
+
readonly name: "poolTokens";
|
|
427
|
+
readonly outputs: readonly [{
|
|
428
|
+
readonly internalType: "bool";
|
|
429
|
+
readonly name: "";
|
|
430
|
+
readonly type: "bool";
|
|
431
|
+
}];
|
|
432
|
+
readonly stateMutability: "view";
|
|
433
|
+
readonly type: "function";
|
|
434
|
+
}, {
|
|
435
|
+
readonly inputs: readonly [];
|
|
436
|
+
readonly name: "renounceOwnership";
|
|
437
|
+
readonly outputs: readonly [];
|
|
438
|
+
readonly stateMutability: "nonpayable";
|
|
439
|
+
readonly type: "function";
|
|
440
|
+
}, {
|
|
441
|
+
readonly inputs: readonly [];
|
|
442
|
+
readonly name: "rewardPerBlock";
|
|
443
|
+
readonly outputs: readonly [{
|
|
444
|
+
readonly internalType: "uint256";
|
|
445
|
+
readonly name: "";
|
|
446
|
+
readonly type: "uint256";
|
|
447
|
+
}];
|
|
448
|
+
readonly stateMutability: "view";
|
|
449
|
+
readonly type: "function";
|
|
450
|
+
}, {
|
|
451
|
+
readonly inputs: readonly [];
|
|
452
|
+
readonly name: "rewardToken";
|
|
453
|
+
readonly outputs: readonly [{
|
|
454
|
+
readonly internalType: "contract IERC20";
|
|
455
|
+
readonly name: "";
|
|
456
|
+
readonly type: "address";
|
|
457
|
+
}];
|
|
458
|
+
readonly stateMutability: "view";
|
|
459
|
+
readonly type: "function";
|
|
460
|
+
}, {
|
|
461
|
+
readonly inputs: readonly [];
|
|
462
|
+
readonly name: "rewardVault";
|
|
463
|
+
readonly outputs: readonly [{
|
|
464
|
+
readonly internalType: "address";
|
|
465
|
+
readonly name: "";
|
|
466
|
+
readonly type: "address";
|
|
467
|
+
}];
|
|
468
|
+
readonly stateMutability: "view";
|
|
469
|
+
readonly type: "function";
|
|
470
|
+
}, {
|
|
471
|
+
readonly inputs: readonly [{
|
|
472
|
+
readonly internalType: "uint256";
|
|
473
|
+
readonly name: "_pid";
|
|
474
|
+
readonly type: "uint256";
|
|
475
|
+
}, {
|
|
476
|
+
readonly internalType: "uint256";
|
|
477
|
+
readonly name: "_allocPoint";
|
|
478
|
+
readonly type: "uint256";
|
|
479
|
+
}];
|
|
480
|
+
readonly name: "set";
|
|
481
|
+
readonly outputs: readonly [];
|
|
482
|
+
readonly stateMutability: "nonpayable";
|
|
483
|
+
readonly type: "function";
|
|
484
|
+
}, {
|
|
485
|
+
readonly inputs: readonly [{
|
|
486
|
+
readonly internalType: "uint256";
|
|
487
|
+
readonly name: "speed";
|
|
488
|
+
readonly type: "uint256";
|
|
489
|
+
}];
|
|
490
|
+
readonly name: "setRewardPerblock";
|
|
491
|
+
readonly outputs: readonly [];
|
|
492
|
+
readonly stateMutability: "nonpayable";
|
|
493
|
+
readonly type: "function";
|
|
494
|
+
}, {
|
|
495
|
+
readonly inputs: readonly [{
|
|
496
|
+
readonly internalType: "uint256";
|
|
497
|
+
readonly name: "_pid";
|
|
498
|
+
readonly type: "uint256";
|
|
499
|
+
}, {
|
|
500
|
+
readonly internalType: "uint256";
|
|
501
|
+
readonly name: "_amount";
|
|
502
|
+
readonly type: "uint256";
|
|
503
|
+
}];
|
|
504
|
+
readonly name: "stake";
|
|
505
|
+
readonly outputs: readonly [];
|
|
506
|
+
readonly stateMutability: "nonpayable";
|
|
507
|
+
readonly type: "function";
|
|
508
|
+
}, {
|
|
509
|
+
readonly inputs: readonly [];
|
|
510
|
+
readonly name: "startBlock";
|
|
511
|
+
readonly outputs: readonly [{
|
|
512
|
+
readonly internalType: "uint256";
|
|
513
|
+
readonly name: "";
|
|
514
|
+
readonly type: "uint256";
|
|
515
|
+
}];
|
|
516
|
+
readonly stateMutability: "view";
|
|
517
|
+
readonly type: "function";
|
|
518
|
+
}, {
|
|
519
|
+
readonly inputs: readonly [];
|
|
520
|
+
readonly name: "totalAllocPoint";
|
|
521
|
+
readonly outputs: readonly [{
|
|
522
|
+
readonly internalType: "uint256";
|
|
523
|
+
readonly name: "";
|
|
524
|
+
readonly type: "uint256";
|
|
525
|
+
}];
|
|
526
|
+
readonly stateMutability: "view";
|
|
527
|
+
readonly type: "function";
|
|
528
|
+
}, {
|
|
529
|
+
readonly inputs: readonly [{
|
|
530
|
+
readonly internalType: "address";
|
|
531
|
+
readonly name: "newOwner";
|
|
532
|
+
readonly type: "address";
|
|
533
|
+
}];
|
|
534
|
+
readonly name: "transferOwnership";
|
|
535
|
+
readonly outputs: readonly [];
|
|
536
|
+
readonly stateMutability: "nonpayable";
|
|
537
|
+
readonly type: "function";
|
|
538
|
+
}, {
|
|
539
|
+
readonly inputs: readonly [{
|
|
540
|
+
readonly internalType: "uint256";
|
|
541
|
+
readonly name: "_pid";
|
|
542
|
+
readonly type: "uint256";
|
|
543
|
+
}];
|
|
544
|
+
readonly name: "updatePool";
|
|
545
|
+
readonly outputs: readonly [];
|
|
546
|
+
readonly stateMutability: "nonpayable";
|
|
547
|
+
readonly type: "function";
|
|
548
|
+
}, {
|
|
549
|
+
readonly inputs: readonly [{
|
|
550
|
+
readonly internalType: "uint256";
|
|
551
|
+
readonly name: "";
|
|
552
|
+
readonly type: "uint256";
|
|
553
|
+
}, {
|
|
554
|
+
readonly internalType: "address";
|
|
555
|
+
readonly name: "";
|
|
556
|
+
readonly type: "address";
|
|
557
|
+
}];
|
|
558
|
+
readonly name: "userInfo";
|
|
559
|
+
readonly outputs: readonly [{
|
|
560
|
+
readonly internalType: "uint256";
|
|
561
|
+
readonly name: "amount";
|
|
562
|
+
readonly type: "uint256";
|
|
563
|
+
}, {
|
|
564
|
+
readonly internalType: "uint256";
|
|
565
|
+
readonly name: "rewardDebt";
|
|
566
|
+
readonly type: "uint256";
|
|
567
|
+
}, {
|
|
568
|
+
readonly internalType: "uint256";
|
|
569
|
+
readonly name: "pendingTokenReward";
|
|
570
|
+
readonly type: "uint256";
|
|
571
|
+
}];
|
|
572
|
+
readonly stateMutability: "view";
|
|
573
|
+
readonly type: "function";
|
|
574
|
+
}, {
|
|
575
|
+
readonly inputs: readonly [{
|
|
576
|
+
readonly internalType: "uint256";
|
|
577
|
+
readonly name: "_pid";
|
|
578
|
+
readonly type: "uint256";
|
|
579
|
+
}, {
|
|
580
|
+
readonly internalType: "uint256";
|
|
581
|
+
readonly name: "_amount";
|
|
582
|
+
readonly type: "uint256";
|
|
583
|
+
}];
|
|
584
|
+
readonly name: "withdraw";
|
|
585
|
+
readonly outputs: readonly [];
|
|
586
|
+
readonly stateMutability: "nonpayable";
|
|
587
|
+
readonly type: "function";
|
|
588
|
+
}];
|
|
589
|
+
/**
|
|
590
|
+
* Type-safe ABI for CHNStaking_json
|
|
591
|
+
*/
|
|
592
|
+
export type CHNStaking_jsonAbi = typeof CHNStaking_jsonAbi;
|
|
593
|
+
/**
|
|
594
|
+
* Contract instance type for CHNStaking_json
|
|
595
|
+
*/
|
|
596
|
+
export type CHNStaking_jsonContract = any;
|
|
597
|
+
/**
|
|
598
|
+
* CHNStaking_json Contract Class
|
|
599
|
+
*
|
|
600
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
601
|
+
*
|
|
602
|
+
* @example
|
|
603
|
+
* ```typescript
|
|
604
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
605
|
+
* import { mainnet } from 'viem/chains';
|
|
606
|
+
* import { CHNStaking_json } from 'CHNStaking_json';
|
|
607
|
+
*
|
|
608
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
609
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
610
|
+
*
|
|
611
|
+
* const contract = new CHNStaking_json('0x...', { publicClient, walletClient });
|
|
612
|
+
*
|
|
613
|
+
* // Read functions
|
|
614
|
+
* const result = await contract.balanceOf('0x...');
|
|
615
|
+
*
|
|
616
|
+
* // Write functions
|
|
617
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
618
|
+
*
|
|
619
|
+
* // Simulate transactions (dry-run)
|
|
620
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
621
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
622
|
+
*
|
|
623
|
+
* // Watch events
|
|
624
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
625
|
+
* console.log('Transfer event:', event);
|
|
626
|
+
* });
|
|
627
|
+
* ```
|
|
628
|
+
*/
|
|
629
|
+
export declare class CHNStaking_json {
|
|
630
|
+
private contract;
|
|
631
|
+
private contractAddress;
|
|
632
|
+
private publicClient;
|
|
633
|
+
constructor(address: Address, clients: {
|
|
634
|
+
publicClient: PublicClient;
|
|
635
|
+
walletClient?: WalletClient;
|
|
636
|
+
});
|
|
637
|
+
/**
|
|
638
|
+
* Get the contract address
|
|
639
|
+
*/
|
|
640
|
+
get address(): Address;
|
|
641
|
+
/**
|
|
642
|
+
* Get the underlying viem contract instance
|
|
643
|
+
*/
|
|
644
|
+
getContract(): CHNStaking_jsonContract;
|
|
645
|
+
/**
|
|
646
|
+
* BONUS_MULTIPLIER
|
|
647
|
+
* view
|
|
648
|
+
*/
|
|
649
|
+
BONUS_MULTIPLIER(): Promise<bigint>;
|
|
650
|
+
/**
|
|
651
|
+
* bonusEndBlock
|
|
652
|
+
* view
|
|
653
|
+
*/
|
|
654
|
+
bonusEndBlock(): Promise<bigint>;
|
|
655
|
+
/**
|
|
656
|
+
* checkpoints
|
|
657
|
+
* view
|
|
658
|
+
*/
|
|
659
|
+
checkpoints(arg0: bigint, arg1: `0x${string}`, arg2: bigint): Promise<[bigint, bigint]>;
|
|
660
|
+
/**
|
|
661
|
+
* getMultiplier
|
|
662
|
+
* view
|
|
663
|
+
*/
|
|
664
|
+
getMultiplier(_from: bigint, _to: bigint): Promise<bigint>;
|
|
665
|
+
/**
|
|
666
|
+
* getPriorVotes
|
|
667
|
+
* view
|
|
668
|
+
*/
|
|
669
|
+
getPriorVotes(_pid: bigint, account: `0x${string}`, blockNumber: bigint): Promise<bigint>;
|
|
670
|
+
/**
|
|
671
|
+
* getStakingAmount
|
|
672
|
+
* view
|
|
673
|
+
*/
|
|
674
|
+
getStakingAmount(pid: bigint, user: `0x${string}`): Promise<bigint>;
|
|
675
|
+
/**
|
|
676
|
+
* numCheckpoints
|
|
677
|
+
* view
|
|
678
|
+
*/
|
|
679
|
+
numCheckpoints(arg0: bigint, arg1: `0x${string}`): Promise<bigint>;
|
|
680
|
+
/**
|
|
681
|
+
* owner
|
|
682
|
+
* view
|
|
683
|
+
*/
|
|
684
|
+
owner(): Promise<`0x${string}`>;
|
|
685
|
+
/**
|
|
686
|
+
* pendingReward
|
|
687
|
+
* view
|
|
688
|
+
*/
|
|
689
|
+
pendingReward(_pid: bigint, _user: `0x${string}`): Promise<bigint>;
|
|
690
|
+
/**
|
|
691
|
+
* poolInfo
|
|
692
|
+
* view
|
|
693
|
+
*/
|
|
694
|
+
poolInfo(arg0: bigint): Promise<[`0x${string}`, bigint, bigint, bigint, bigint]>;
|
|
695
|
+
/**
|
|
696
|
+
* poolLength
|
|
697
|
+
* view
|
|
698
|
+
*/
|
|
699
|
+
poolLength(): Promise<bigint>;
|
|
700
|
+
/**
|
|
701
|
+
* poolTokens
|
|
702
|
+
* view
|
|
703
|
+
*/
|
|
704
|
+
poolTokens(arg0: `0x${string}`): Promise<boolean>;
|
|
705
|
+
/**
|
|
706
|
+
* rewardPerBlock
|
|
707
|
+
* view
|
|
708
|
+
*/
|
|
709
|
+
rewardPerBlock(): Promise<bigint>;
|
|
710
|
+
/**
|
|
711
|
+
* rewardToken
|
|
712
|
+
* view
|
|
713
|
+
*/
|
|
714
|
+
rewardToken(): Promise<`0x${string}`>;
|
|
715
|
+
/**
|
|
716
|
+
* rewardVault
|
|
717
|
+
* view
|
|
718
|
+
*/
|
|
719
|
+
rewardVault(): Promise<`0x${string}`>;
|
|
720
|
+
/**
|
|
721
|
+
* startBlock
|
|
722
|
+
* view
|
|
723
|
+
*/
|
|
724
|
+
startBlock(): Promise<bigint>;
|
|
725
|
+
/**
|
|
726
|
+
* totalAllocPoint
|
|
727
|
+
* view
|
|
728
|
+
*/
|
|
729
|
+
totalAllocPoint(): Promise<bigint>;
|
|
730
|
+
/**
|
|
731
|
+
* userInfo
|
|
732
|
+
* view
|
|
733
|
+
*/
|
|
734
|
+
userInfo(arg0: bigint, arg1: `0x${string}`): Promise<[bigint, bigint, bigint]>;
|
|
735
|
+
/**
|
|
736
|
+
* add
|
|
737
|
+
* nonpayable
|
|
738
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
739
|
+
*/
|
|
740
|
+
add(_allocPoint: bigint, _stakeToken: `0x${string}`, options?: {
|
|
741
|
+
accessList?: import('viem').AccessList;
|
|
742
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
743
|
+
chain?: import('viem').Chain | null;
|
|
744
|
+
dataSuffix?: `0x${string}`;
|
|
745
|
+
gas?: bigint;
|
|
746
|
+
gasPrice?: bigint;
|
|
747
|
+
maxFeePerGas?: bigint;
|
|
748
|
+
maxPriorityFeePerGas?: bigint;
|
|
749
|
+
nonce?: number;
|
|
750
|
+
value?: bigint;
|
|
751
|
+
}): Promise<`0x${string}`>;
|
|
752
|
+
/**
|
|
753
|
+
* claimRewardFromVault
|
|
754
|
+
* nonpayable
|
|
755
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
756
|
+
*/
|
|
757
|
+
claimRewardFromVault(userAddress: `0x${string}`, pid: bigint, options?: {
|
|
758
|
+
accessList?: import('viem').AccessList;
|
|
759
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
760
|
+
chain?: import('viem').Chain | null;
|
|
761
|
+
dataSuffix?: `0x${string}`;
|
|
762
|
+
gas?: bigint;
|
|
763
|
+
gasPrice?: bigint;
|
|
764
|
+
maxFeePerGas?: bigint;
|
|
765
|
+
maxPriorityFeePerGas?: bigint;
|
|
766
|
+
nonce?: number;
|
|
767
|
+
value?: bigint;
|
|
768
|
+
}): Promise<`0x${string}`>;
|
|
769
|
+
/**
|
|
770
|
+
* emergencyWithdraw
|
|
771
|
+
* nonpayable
|
|
772
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
773
|
+
*/
|
|
774
|
+
emergencyWithdraw(_pid: bigint, options?: {
|
|
775
|
+
accessList?: import('viem').AccessList;
|
|
776
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
777
|
+
chain?: import('viem').Chain | null;
|
|
778
|
+
dataSuffix?: `0x${string}`;
|
|
779
|
+
gas?: bigint;
|
|
780
|
+
gasPrice?: bigint;
|
|
781
|
+
maxFeePerGas?: bigint;
|
|
782
|
+
maxPriorityFeePerGas?: bigint;
|
|
783
|
+
nonce?: number;
|
|
784
|
+
value?: bigint;
|
|
785
|
+
}): Promise<`0x${string}`>;
|
|
786
|
+
/**
|
|
787
|
+
* initialize
|
|
788
|
+
* nonpayable
|
|
789
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
790
|
+
*/
|
|
791
|
+
initialize(_rewardToken: `0x${string}`, _rewardPerBlock: bigint, _startBlock: bigint, _bonusEndBlock: bigint, _multiplier: bigint, _rewardVault: `0x${string}`, options?: {
|
|
792
|
+
accessList?: import('viem').AccessList;
|
|
793
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
794
|
+
chain?: import('viem').Chain | null;
|
|
795
|
+
dataSuffix?: `0x${string}`;
|
|
796
|
+
gas?: bigint;
|
|
797
|
+
gasPrice?: bigint;
|
|
798
|
+
maxFeePerGas?: bigint;
|
|
799
|
+
maxPriorityFeePerGas?: bigint;
|
|
800
|
+
nonce?: number;
|
|
801
|
+
value?: bigint;
|
|
802
|
+
}): Promise<`0x${string}`>;
|
|
803
|
+
/**
|
|
804
|
+
* massUpdatePools
|
|
805
|
+
* nonpayable
|
|
806
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
807
|
+
*/
|
|
808
|
+
massUpdatePools(options?: {
|
|
809
|
+
accessList?: import('viem').AccessList;
|
|
810
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
811
|
+
chain?: import('viem').Chain | null;
|
|
812
|
+
dataSuffix?: `0x${string}`;
|
|
813
|
+
gas?: bigint;
|
|
814
|
+
gasPrice?: bigint;
|
|
815
|
+
maxFeePerGas?: bigint;
|
|
816
|
+
maxPriorityFeePerGas?: bigint;
|
|
817
|
+
nonce?: number;
|
|
818
|
+
value?: bigint;
|
|
819
|
+
}): Promise<`0x${string}`>;
|
|
820
|
+
/**
|
|
821
|
+
* renounceOwnership
|
|
822
|
+
* nonpayable
|
|
823
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
824
|
+
*/
|
|
825
|
+
renounceOwnership(options?: {
|
|
826
|
+
accessList?: import('viem').AccessList;
|
|
827
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
828
|
+
chain?: import('viem').Chain | null;
|
|
829
|
+
dataSuffix?: `0x${string}`;
|
|
830
|
+
gas?: bigint;
|
|
831
|
+
gasPrice?: bigint;
|
|
832
|
+
maxFeePerGas?: bigint;
|
|
833
|
+
maxPriorityFeePerGas?: bigint;
|
|
834
|
+
nonce?: number;
|
|
835
|
+
value?: bigint;
|
|
836
|
+
}): Promise<`0x${string}`>;
|
|
837
|
+
/**
|
|
838
|
+
* set
|
|
839
|
+
* nonpayable
|
|
840
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
841
|
+
*/
|
|
842
|
+
set(_pid: bigint, _allocPoint: bigint, options?: {
|
|
843
|
+
accessList?: import('viem').AccessList;
|
|
844
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
845
|
+
chain?: import('viem').Chain | null;
|
|
846
|
+
dataSuffix?: `0x${string}`;
|
|
847
|
+
gas?: bigint;
|
|
848
|
+
gasPrice?: bigint;
|
|
849
|
+
maxFeePerGas?: bigint;
|
|
850
|
+
maxPriorityFeePerGas?: bigint;
|
|
851
|
+
nonce?: number;
|
|
852
|
+
value?: bigint;
|
|
853
|
+
}): Promise<`0x${string}`>;
|
|
854
|
+
/**
|
|
855
|
+
* setRewardPerblock
|
|
856
|
+
* nonpayable
|
|
857
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
858
|
+
*/
|
|
859
|
+
setRewardPerblock(speed: bigint, options?: {
|
|
860
|
+
accessList?: import('viem').AccessList;
|
|
861
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
862
|
+
chain?: import('viem').Chain | null;
|
|
863
|
+
dataSuffix?: `0x${string}`;
|
|
864
|
+
gas?: bigint;
|
|
865
|
+
gasPrice?: bigint;
|
|
866
|
+
maxFeePerGas?: bigint;
|
|
867
|
+
maxPriorityFeePerGas?: bigint;
|
|
868
|
+
nonce?: number;
|
|
869
|
+
value?: bigint;
|
|
870
|
+
}): Promise<`0x${string}`>;
|
|
871
|
+
/**
|
|
872
|
+
* stake
|
|
873
|
+
* nonpayable
|
|
874
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
875
|
+
*/
|
|
876
|
+
stake(_pid: bigint, _amount: bigint, options?: {
|
|
877
|
+
accessList?: import('viem').AccessList;
|
|
878
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
879
|
+
chain?: import('viem').Chain | null;
|
|
880
|
+
dataSuffix?: `0x${string}`;
|
|
881
|
+
gas?: bigint;
|
|
882
|
+
gasPrice?: bigint;
|
|
883
|
+
maxFeePerGas?: bigint;
|
|
884
|
+
maxPriorityFeePerGas?: bigint;
|
|
885
|
+
nonce?: number;
|
|
886
|
+
value?: bigint;
|
|
887
|
+
}): Promise<`0x${string}`>;
|
|
888
|
+
/**
|
|
889
|
+
* transferOwnership
|
|
890
|
+
* nonpayable
|
|
891
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
892
|
+
*/
|
|
893
|
+
transferOwnership(newOwner: `0x${string}`, options?: {
|
|
894
|
+
accessList?: import('viem').AccessList;
|
|
895
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
896
|
+
chain?: import('viem').Chain | null;
|
|
897
|
+
dataSuffix?: `0x${string}`;
|
|
898
|
+
gas?: bigint;
|
|
899
|
+
gasPrice?: bigint;
|
|
900
|
+
maxFeePerGas?: bigint;
|
|
901
|
+
maxPriorityFeePerGas?: bigint;
|
|
902
|
+
nonce?: number;
|
|
903
|
+
value?: bigint;
|
|
904
|
+
}): Promise<`0x${string}`>;
|
|
905
|
+
/**
|
|
906
|
+
* updatePool
|
|
907
|
+
* nonpayable
|
|
908
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
909
|
+
*/
|
|
910
|
+
updatePool(_pid: bigint, options?: {
|
|
911
|
+
accessList?: import('viem').AccessList;
|
|
912
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
913
|
+
chain?: import('viem').Chain | null;
|
|
914
|
+
dataSuffix?: `0x${string}`;
|
|
915
|
+
gas?: bigint;
|
|
916
|
+
gasPrice?: bigint;
|
|
917
|
+
maxFeePerGas?: bigint;
|
|
918
|
+
maxPriorityFeePerGas?: bigint;
|
|
919
|
+
nonce?: number;
|
|
920
|
+
value?: bigint;
|
|
921
|
+
}): Promise<`0x${string}`>;
|
|
922
|
+
/**
|
|
923
|
+
* withdraw
|
|
924
|
+
* nonpayable
|
|
925
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
926
|
+
*/
|
|
927
|
+
withdraw(_pid: bigint, _amount: bigint, options?: {
|
|
928
|
+
accessList?: import('viem').AccessList;
|
|
929
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
930
|
+
chain?: import('viem').Chain | null;
|
|
931
|
+
dataSuffix?: `0x${string}`;
|
|
932
|
+
gas?: bigint;
|
|
933
|
+
gasPrice?: bigint;
|
|
934
|
+
maxFeePerGas?: bigint;
|
|
935
|
+
maxPriorityFeePerGas?: bigint;
|
|
936
|
+
nonce?: number;
|
|
937
|
+
value?: bigint;
|
|
938
|
+
}): Promise<`0x${string}`>;
|
|
939
|
+
/**
|
|
940
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
941
|
+
*
|
|
942
|
+
* @example
|
|
943
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
944
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
945
|
+
* console.log('Would succeed:', result.result);
|
|
946
|
+
*/
|
|
947
|
+
get simulate(): {
|
|
948
|
+
/**
|
|
949
|
+
* Simulate add
|
|
950
|
+
* Returns gas estimate and result without sending transaction
|
|
951
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
952
|
+
*/
|
|
953
|
+
add(_allocPoint: bigint, _stakeToken: `0x${string}`, options?: {
|
|
954
|
+
accessList?: import("viem").AccessList;
|
|
955
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
956
|
+
chain?: import("viem").Chain | null;
|
|
957
|
+
dataSuffix?: `0x${string}`;
|
|
958
|
+
gas?: bigint;
|
|
959
|
+
gasPrice?: bigint;
|
|
960
|
+
maxFeePerGas?: bigint;
|
|
961
|
+
maxPriorityFeePerGas?: bigint;
|
|
962
|
+
nonce?: number;
|
|
963
|
+
value?: bigint;
|
|
964
|
+
}): Promise<void>;
|
|
965
|
+
/**
|
|
966
|
+
* Simulate claimRewardFromVault
|
|
967
|
+
* Returns gas estimate and result without sending transaction
|
|
968
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
969
|
+
*/
|
|
970
|
+
claimRewardFromVault(userAddress: `0x${string}`, pid: bigint, options?: {
|
|
971
|
+
accessList?: import("viem").AccessList;
|
|
972
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
973
|
+
chain?: import("viem").Chain | null;
|
|
974
|
+
dataSuffix?: `0x${string}`;
|
|
975
|
+
gas?: bigint;
|
|
976
|
+
gasPrice?: bigint;
|
|
977
|
+
maxFeePerGas?: bigint;
|
|
978
|
+
maxPriorityFeePerGas?: bigint;
|
|
979
|
+
nonce?: number;
|
|
980
|
+
value?: bigint;
|
|
981
|
+
}): Promise<bigint>;
|
|
982
|
+
/**
|
|
983
|
+
* Simulate emergencyWithdraw
|
|
984
|
+
* Returns gas estimate and result without sending transaction
|
|
985
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
986
|
+
*/
|
|
987
|
+
emergencyWithdraw(_pid: bigint, options?: {
|
|
988
|
+
accessList?: import("viem").AccessList;
|
|
989
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
990
|
+
chain?: import("viem").Chain | null;
|
|
991
|
+
dataSuffix?: `0x${string}`;
|
|
992
|
+
gas?: bigint;
|
|
993
|
+
gasPrice?: bigint;
|
|
994
|
+
maxFeePerGas?: bigint;
|
|
995
|
+
maxPriorityFeePerGas?: bigint;
|
|
996
|
+
nonce?: number;
|
|
997
|
+
value?: bigint;
|
|
998
|
+
}): Promise<void>;
|
|
999
|
+
/**
|
|
1000
|
+
* Simulate initialize
|
|
1001
|
+
* Returns gas estimate and result without sending transaction
|
|
1002
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1003
|
+
*/
|
|
1004
|
+
initialize(_rewardToken: `0x${string}`, _rewardPerBlock: bigint, _startBlock: bigint, _bonusEndBlock: bigint, _multiplier: bigint, _rewardVault: `0x${string}`, options?: {
|
|
1005
|
+
accessList?: import("viem").AccessList;
|
|
1006
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1007
|
+
chain?: import("viem").Chain | null;
|
|
1008
|
+
dataSuffix?: `0x${string}`;
|
|
1009
|
+
gas?: bigint;
|
|
1010
|
+
gasPrice?: bigint;
|
|
1011
|
+
maxFeePerGas?: bigint;
|
|
1012
|
+
maxPriorityFeePerGas?: bigint;
|
|
1013
|
+
nonce?: number;
|
|
1014
|
+
value?: bigint;
|
|
1015
|
+
}): Promise<void>;
|
|
1016
|
+
/**
|
|
1017
|
+
* Simulate massUpdatePools
|
|
1018
|
+
* Returns gas estimate and result without sending transaction
|
|
1019
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1020
|
+
*/
|
|
1021
|
+
massUpdatePools(options?: {
|
|
1022
|
+
accessList?: import("viem").AccessList;
|
|
1023
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1024
|
+
chain?: import("viem").Chain | null;
|
|
1025
|
+
dataSuffix?: `0x${string}`;
|
|
1026
|
+
gas?: bigint;
|
|
1027
|
+
gasPrice?: bigint;
|
|
1028
|
+
maxFeePerGas?: bigint;
|
|
1029
|
+
maxPriorityFeePerGas?: bigint;
|
|
1030
|
+
nonce?: number;
|
|
1031
|
+
value?: bigint;
|
|
1032
|
+
}): Promise<void>;
|
|
1033
|
+
/**
|
|
1034
|
+
* Simulate renounceOwnership
|
|
1035
|
+
* Returns gas estimate and result without sending transaction
|
|
1036
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1037
|
+
*/
|
|
1038
|
+
renounceOwnership(options?: {
|
|
1039
|
+
accessList?: import("viem").AccessList;
|
|
1040
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1041
|
+
chain?: import("viem").Chain | null;
|
|
1042
|
+
dataSuffix?: `0x${string}`;
|
|
1043
|
+
gas?: bigint;
|
|
1044
|
+
gasPrice?: bigint;
|
|
1045
|
+
maxFeePerGas?: bigint;
|
|
1046
|
+
maxPriorityFeePerGas?: bigint;
|
|
1047
|
+
nonce?: number;
|
|
1048
|
+
value?: bigint;
|
|
1049
|
+
}): Promise<void>;
|
|
1050
|
+
/**
|
|
1051
|
+
* Simulate set
|
|
1052
|
+
* Returns gas estimate and result without sending transaction
|
|
1053
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1054
|
+
*/
|
|
1055
|
+
set(_pid: bigint, _allocPoint: bigint, options?: {
|
|
1056
|
+
accessList?: import("viem").AccessList;
|
|
1057
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1058
|
+
chain?: import("viem").Chain | null;
|
|
1059
|
+
dataSuffix?: `0x${string}`;
|
|
1060
|
+
gas?: bigint;
|
|
1061
|
+
gasPrice?: bigint;
|
|
1062
|
+
maxFeePerGas?: bigint;
|
|
1063
|
+
maxPriorityFeePerGas?: bigint;
|
|
1064
|
+
nonce?: number;
|
|
1065
|
+
value?: bigint;
|
|
1066
|
+
}): Promise<void>;
|
|
1067
|
+
/**
|
|
1068
|
+
* Simulate setRewardPerblock
|
|
1069
|
+
* Returns gas estimate and result without sending transaction
|
|
1070
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1071
|
+
*/
|
|
1072
|
+
setRewardPerblock(speed: bigint, options?: {
|
|
1073
|
+
accessList?: import("viem").AccessList;
|
|
1074
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1075
|
+
chain?: import("viem").Chain | null;
|
|
1076
|
+
dataSuffix?: `0x${string}`;
|
|
1077
|
+
gas?: bigint;
|
|
1078
|
+
gasPrice?: bigint;
|
|
1079
|
+
maxFeePerGas?: bigint;
|
|
1080
|
+
maxPriorityFeePerGas?: bigint;
|
|
1081
|
+
nonce?: number;
|
|
1082
|
+
value?: bigint;
|
|
1083
|
+
}): Promise<void>;
|
|
1084
|
+
/**
|
|
1085
|
+
* Simulate stake
|
|
1086
|
+
* Returns gas estimate and result without sending transaction
|
|
1087
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1088
|
+
*/
|
|
1089
|
+
stake(_pid: bigint, _amount: bigint, options?: {
|
|
1090
|
+
accessList?: import("viem").AccessList;
|
|
1091
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1092
|
+
chain?: import("viem").Chain | null;
|
|
1093
|
+
dataSuffix?: `0x${string}`;
|
|
1094
|
+
gas?: bigint;
|
|
1095
|
+
gasPrice?: bigint;
|
|
1096
|
+
maxFeePerGas?: bigint;
|
|
1097
|
+
maxPriorityFeePerGas?: bigint;
|
|
1098
|
+
nonce?: number;
|
|
1099
|
+
value?: bigint;
|
|
1100
|
+
}): Promise<void>;
|
|
1101
|
+
/**
|
|
1102
|
+
* Simulate transferOwnership
|
|
1103
|
+
* Returns gas estimate and result without sending transaction
|
|
1104
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1105
|
+
*/
|
|
1106
|
+
transferOwnership(newOwner: `0x${string}`, options?: {
|
|
1107
|
+
accessList?: import("viem").AccessList;
|
|
1108
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1109
|
+
chain?: import("viem").Chain | null;
|
|
1110
|
+
dataSuffix?: `0x${string}`;
|
|
1111
|
+
gas?: bigint;
|
|
1112
|
+
gasPrice?: bigint;
|
|
1113
|
+
maxFeePerGas?: bigint;
|
|
1114
|
+
maxPriorityFeePerGas?: bigint;
|
|
1115
|
+
nonce?: number;
|
|
1116
|
+
value?: bigint;
|
|
1117
|
+
}): Promise<void>;
|
|
1118
|
+
/**
|
|
1119
|
+
* Simulate updatePool
|
|
1120
|
+
* Returns gas estimate and result without sending transaction
|
|
1121
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1122
|
+
*/
|
|
1123
|
+
updatePool(_pid: bigint, options?: {
|
|
1124
|
+
accessList?: import("viem").AccessList;
|
|
1125
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1126
|
+
chain?: import("viem").Chain | null;
|
|
1127
|
+
dataSuffix?: `0x${string}`;
|
|
1128
|
+
gas?: bigint;
|
|
1129
|
+
gasPrice?: bigint;
|
|
1130
|
+
maxFeePerGas?: bigint;
|
|
1131
|
+
maxPriorityFeePerGas?: bigint;
|
|
1132
|
+
nonce?: number;
|
|
1133
|
+
value?: bigint;
|
|
1134
|
+
}): Promise<void>;
|
|
1135
|
+
/**
|
|
1136
|
+
* Simulate withdraw
|
|
1137
|
+
* Returns gas estimate and result without sending transaction
|
|
1138
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1139
|
+
*/
|
|
1140
|
+
withdraw(_pid: bigint, _amount: bigint, options?: {
|
|
1141
|
+
accessList?: import("viem").AccessList;
|
|
1142
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1143
|
+
chain?: import("viem").Chain | null;
|
|
1144
|
+
dataSuffix?: `0x${string}`;
|
|
1145
|
+
gas?: bigint;
|
|
1146
|
+
gasPrice?: bigint;
|
|
1147
|
+
maxFeePerGas?: bigint;
|
|
1148
|
+
maxPriorityFeePerGas?: bigint;
|
|
1149
|
+
nonce?: number;
|
|
1150
|
+
value?: bigint;
|
|
1151
|
+
}): Promise<void>;
|
|
1152
|
+
};
|
|
1153
|
+
/**
|
|
1154
|
+
* Watch contract events
|
|
1155
|
+
*
|
|
1156
|
+
* @example
|
|
1157
|
+
* // Watch all Transfer events
|
|
1158
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1159
|
+
* console.log('Transfer:', event);
|
|
1160
|
+
* });
|
|
1161
|
+
*
|
|
1162
|
+
* // Stop watching
|
|
1163
|
+
* unwatch();
|
|
1164
|
+
*/
|
|
1165
|
+
get watch(): {
|
|
1166
|
+
/**
|
|
1167
|
+
* Watch Add events
|
|
1168
|
+
* @param callback Function to call when event is emitted
|
|
1169
|
+
* @param filter Optional filter for indexed parameters
|
|
1170
|
+
* @returns Unwatch function to stop listening
|
|
1171
|
+
*/
|
|
1172
|
+
Add: (callback: (event: {
|
|
1173
|
+
stakToken: `0x${string}`;
|
|
1174
|
+
allocPoint: bigint;
|
|
1175
|
+
}) => void, filter?: {
|
|
1176
|
+
stakToken: `0x${string}`;
|
|
1177
|
+
allocPoint: bigint;
|
|
1178
|
+
}) => () => void;
|
|
1179
|
+
/**
|
|
1180
|
+
* Watch ClaimRewardFromVault events
|
|
1181
|
+
* @param callback Function to call when event is emitted
|
|
1182
|
+
* @param filter Optional filter for indexed parameters
|
|
1183
|
+
* @returns Unwatch function to stop listening
|
|
1184
|
+
*/
|
|
1185
|
+
ClaimRewardFromVault: (callback: (event: {
|
|
1186
|
+
userAddress: `0x${string}`;
|
|
1187
|
+
pid: bigint;
|
|
1188
|
+
}) => void, filter?: {
|
|
1189
|
+
userAddress: `0x${string}`;
|
|
1190
|
+
pid: bigint;
|
|
1191
|
+
}) => () => void;
|
|
1192
|
+
/**
|
|
1193
|
+
* Watch DelegateVotesChanged events
|
|
1194
|
+
* @param callback Function to call when event is emitted
|
|
1195
|
+
* @param filter Optional filter for indexed parameters
|
|
1196
|
+
* @returns Unwatch function to stop listening
|
|
1197
|
+
*/
|
|
1198
|
+
DelegateVotesChanged: (callback: (event: {
|
|
1199
|
+
delegate: `0x${string}`;
|
|
1200
|
+
previousBalance: bigint;
|
|
1201
|
+
newBalance: bigint;
|
|
1202
|
+
}) => void, filter?: {
|
|
1203
|
+
delegate: `0x${string}`;
|
|
1204
|
+
}) => () => void;
|
|
1205
|
+
/**
|
|
1206
|
+
* Watch EmergencyWithdraw events
|
|
1207
|
+
* @param callback Function to call when event is emitted
|
|
1208
|
+
* @param filter Optional filter for indexed parameters
|
|
1209
|
+
* @returns Unwatch function to stop listening
|
|
1210
|
+
*/
|
|
1211
|
+
EmergencyWithdraw: (callback: (event: {
|
|
1212
|
+
user: `0x${string}`;
|
|
1213
|
+
pid: bigint;
|
|
1214
|
+
amount: bigint;
|
|
1215
|
+
}) => void, filter?: {
|
|
1216
|
+
user: `0x${string}`;
|
|
1217
|
+
pid: bigint;
|
|
1218
|
+
}) => () => void;
|
|
1219
|
+
/**
|
|
1220
|
+
* Watch OwnershipTransferred events
|
|
1221
|
+
* @param callback Function to call when event is emitted
|
|
1222
|
+
* @param filter Optional filter for indexed parameters
|
|
1223
|
+
* @returns Unwatch function to stop listening
|
|
1224
|
+
*/
|
|
1225
|
+
OwnershipTransferred: (callback: (event: {
|
|
1226
|
+
previousOwner: `0x${string}`;
|
|
1227
|
+
newOwner: `0x${string}`;
|
|
1228
|
+
}) => void, filter?: {
|
|
1229
|
+
previousOwner: `0x${string}`;
|
|
1230
|
+
newOwner: `0x${string}`;
|
|
1231
|
+
}) => () => void;
|
|
1232
|
+
/**
|
|
1233
|
+
* Watch Set events
|
|
1234
|
+
* @param callback Function to call when event is emitted
|
|
1235
|
+
* @param filter Optional filter for indexed parameters
|
|
1236
|
+
* @returns Unwatch function to stop listening
|
|
1237
|
+
*/
|
|
1238
|
+
Set: (callback: (event: {
|
|
1239
|
+
pid: bigint;
|
|
1240
|
+
allocPoint: bigint;
|
|
1241
|
+
}) => void, filter?: {
|
|
1242
|
+
pid: bigint;
|
|
1243
|
+
allocPoint: bigint;
|
|
1244
|
+
}) => () => void;
|
|
1245
|
+
/**
|
|
1246
|
+
* Watch Stake events
|
|
1247
|
+
* @param callback Function to call when event is emitted
|
|
1248
|
+
* @param filter Optional filter for indexed parameters
|
|
1249
|
+
* @returns Unwatch function to stop listening
|
|
1250
|
+
*/
|
|
1251
|
+
Stake: (callback: (event: {
|
|
1252
|
+
user: `0x${string}`;
|
|
1253
|
+
pid: bigint;
|
|
1254
|
+
amount: bigint;
|
|
1255
|
+
}) => void, filter?: {
|
|
1256
|
+
user: `0x${string}`;
|
|
1257
|
+
pid: bigint;
|
|
1258
|
+
}) => () => void;
|
|
1259
|
+
/**
|
|
1260
|
+
* Watch Withdraw events
|
|
1261
|
+
* @param callback Function to call when event is emitted
|
|
1262
|
+
* @param filter Optional filter for indexed parameters
|
|
1263
|
+
* @returns Unwatch function to stop listening
|
|
1264
|
+
*/
|
|
1265
|
+
Withdraw: (callback: (event: {
|
|
1266
|
+
user: `0x${string}`;
|
|
1267
|
+
pid: bigint;
|
|
1268
|
+
amount: bigint;
|
|
1269
|
+
reward: bigint;
|
|
1270
|
+
}) => void, filter?: {
|
|
1271
|
+
user: `0x${string}`;
|
|
1272
|
+
pid: bigint;
|
|
1273
|
+
}) => () => void;
|
|
1274
|
+
};
|
|
1275
|
+
}
|