@gitmyabi/coinu 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.
@@ -0,0 +1,1011 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * Bitcoinu ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const BitcoinuAbi: readonly [{
8
+ readonly inputs: readonly [{
9
+ readonly internalType: "uint256";
10
+ readonly name: "_votingEnabledTime";
11
+ readonly type: "uint256";
12
+ }, {
13
+ readonly internalType: "address";
14
+ readonly name: "initialRecipient";
15
+ readonly type: "address";
16
+ }];
17
+ readonly stateMutability: "nonpayable";
18
+ readonly type: "constructor";
19
+ }, {
20
+ readonly anonymous: false;
21
+ readonly inputs: readonly [{
22
+ readonly indexed: true;
23
+ readonly internalType: "address";
24
+ readonly name: "owner";
25
+ readonly type: "address";
26
+ }, {
27
+ readonly indexed: true;
28
+ readonly internalType: "address";
29
+ readonly name: "spender";
30
+ readonly type: "address";
31
+ }, {
32
+ readonly indexed: false;
33
+ readonly internalType: "uint256";
34
+ readonly name: "value";
35
+ readonly type: "uint256";
36
+ }];
37
+ readonly name: "Approval";
38
+ readonly type: "event";
39
+ }, {
40
+ readonly anonymous: false;
41
+ readonly inputs: readonly [{
42
+ readonly indexed: false;
43
+ readonly internalType: "string";
44
+ readonly name: "newName";
45
+ readonly type: "string";
46
+ }, {
47
+ readonly indexed: false;
48
+ readonly internalType: "string";
49
+ readonly name: "newSymbol";
50
+ readonly type: "string";
51
+ }];
52
+ readonly name: "NameChanged";
53
+ readonly type: "event";
54
+ }, {
55
+ readonly anonymous: false;
56
+ readonly inputs: readonly [{
57
+ readonly indexed: true;
58
+ readonly internalType: "address";
59
+ readonly name: "from";
60
+ readonly type: "address";
61
+ }, {
62
+ readonly indexed: true;
63
+ readonly internalType: "address";
64
+ readonly name: "to";
65
+ readonly type: "address";
66
+ }, {
67
+ readonly indexed: false;
68
+ readonly internalType: "uint256";
69
+ readonly name: "value";
70
+ readonly type: "uint256";
71
+ }];
72
+ readonly name: "Transfer";
73
+ readonly type: "event";
74
+ }, {
75
+ readonly anonymous: false;
76
+ readonly inputs: readonly [{
77
+ readonly indexed: true;
78
+ readonly internalType: "uint256";
79
+ readonly name: "round";
80
+ readonly type: "uint256";
81
+ }, {
82
+ readonly indexed: true;
83
+ readonly internalType: "address";
84
+ readonly name: "voter";
85
+ readonly type: "address";
86
+ }, {
87
+ readonly indexed: false;
88
+ readonly internalType: "uint256";
89
+ readonly name: "amount";
90
+ readonly type: "uint256";
91
+ }, {
92
+ readonly indexed: false;
93
+ readonly internalType: "bool";
94
+ readonly name: "voteFor";
95
+ readonly type: "bool";
96
+ }];
97
+ readonly name: "VoteCast";
98
+ readonly type: "event";
99
+ }, {
100
+ readonly anonymous: false;
101
+ readonly inputs: readonly [{
102
+ readonly indexed: true;
103
+ readonly internalType: "uint256";
104
+ readonly name: "round";
105
+ readonly type: "uint256";
106
+ }, {
107
+ readonly indexed: true;
108
+ readonly internalType: "address";
109
+ readonly name: "voter";
110
+ readonly type: "address";
111
+ }, {
112
+ readonly indexed: false;
113
+ readonly internalType: "uint256";
114
+ readonly name: "amount";
115
+ readonly type: "uint256";
116
+ }];
117
+ readonly name: "VoteTokensUnlocked";
118
+ readonly type: "event";
119
+ }, {
120
+ readonly anonymous: false;
121
+ readonly inputs: readonly [{
122
+ readonly indexed: true;
123
+ readonly internalType: "uint256";
124
+ readonly name: "round";
125
+ readonly type: "uint256";
126
+ }, {
127
+ readonly indexed: false;
128
+ readonly internalType: "enum Bitcoinu.VotingStatus";
129
+ readonly name: "status";
130
+ readonly type: "uint8";
131
+ }, {
132
+ readonly indexed: false;
133
+ readonly internalType: "uint256";
134
+ readonly name: "totalVotes";
135
+ readonly type: "uint256";
136
+ }, {
137
+ readonly indexed: false;
138
+ readonly internalType: "uint256";
139
+ readonly name: "votesFor";
140
+ readonly type: "uint256";
141
+ }, {
142
+ readonly indexed: false;
143
+ readonly internalType: "uint256";
144
+ readonly name: "votesAgainst";
145
+ readonly type: "uint256";
146
+ }];
147
+ readonly name: "VotingEnded";
148
+ readonly type: "event";
149
+ }, {
150
+ readonly anonymous: false;
151
+ readonly inputs: readonly [{
152
+ readonly indexed: true;
153
+ readonly internalType: "uint256";
154
+ readonly name: "round";
155
+ readonly type: "uint256";
156
+ }, {
157
+ readonly indexed: false;
158
+ readonly internalType: "uint256";
159
+ readonly name: "startTime";
160
+ readonly type: "uint256";
161
+ }, {
162
+ readonly indexed: false;
163
+ readonly internalType: "uint256";
164
+ readonly name: "endTime";
165
+ readonly type: "uint256";
166
+ }];
167
+ readonly name: "VotingStarted";
168
+ readonly type: "event";
169
+ }, {
170
+ readonly inputs: readonly [];
171
+ readonly name: "MIN_VOTES_FOR_REQUIRED";
172
+ readonly outputs: readonly [{
173
+ readonly internalType: "uint256";
174
+ readonly name: "";
175
+ readonly type: "uint256";
176
+ }];
177
+ readonly stateMutability: "view";
178
+ readonly type: "function";
179
+ }, {
180
+ readonly inputs: readonly [];
181
+ readonly name: "VOTING_DURATION";
182
+ readonly outputs: readonly [{
183
+ readonly internalType: "uint256";
184
+ readonly name: "";
185
+ readonly type: "uint256";
186
+ }];
187
+ readonly stateMutability: "view";
188
+ readonly type: "function";
189
+ }, {
190
+ readonly inputs: readonly [];
191
+ readonly name: "WAITING_PERIOD";
192
+ readonly outputs: readonly [{
193
+ readonly internalType: "uint256";
194
+ readonly name: "";
195
+ readonly type: "uint256";
196
+ }];
197
+ readonly stateMutability: "view";
198
+ readonly type: "function";
199
+ }, {
200
+ readonly inputs: readonly [{
201
+ readonly internalType: "address";
202
+ readonly name: "owner";
203
+ readonly type: "address";
204
+ }, {
205
+ readonly internalType: "address";
206
+ readonly name: "spender";
207
+ readonly type: "address";
208
+ }];
209
+ readonly name: "allowance";
210
+ readonly outputs: readonly [{
211
+ readonly internalType: "uint256";
212
+ readonly name: "";
213
+ readonly type: "uint256";
214
+ }];
215
+ readonly stateMutability: "view";
216
+ readonly type: "function";
217
+ }, {
218
+ readonly inputs: readonly [{
219
+ readonly internalType: "address";
220
+ readonly name: "spender";
221
+ readonly type: "address";
222
+ }, {
223
+ readonly internalType: "uint256";
224
+ readonly name: "amount";
225
+ readonly type: "uint256";
226
+ }];
227
+ readonly name: "approve";
228
+ readonly outputs: readonly [{
229
+ readonly internalType: "bool";
230
+ readonly name: "";
231
+ readonly type: "bool";
232
+ }];
233
+ readonly stateMutability: "nonpayable";
234
+ readonly type: "function";
235
+ }, {
236
+ readonly inputs: readonly [{
237
+ readonly internalType: "address";
238
+ readonly name: "account";
239
+ readonly type: "address";
240
+ }];
241
+ readonly name: "balanceOf";
242
+ readonly outputs: readonly [{
243
+ readonly internalType: "uint256";
244
+ readonly name: "";
245
+ readonly type: "uint256";
246
+ }];
247
+ readonly stateMutability: "view";
248
+ readonly type: "function";
249
+ }, {
250
+ readonly inputs: readonly [];
251
+ readonly name: "canStartVoting";
252
+ readonly outputs: readonly [{
253
+ readonly internalType: "bool";
254
+ readonly name: "";
255
+ readonly type: "bool";
256
+ }];
257
+ readonly stateMutability: "view";
258
+ readonly type: "function";
259
+ }, {
260
+ readonly inputs: readonly [];
261
+ readonly name: "currentRound";
262
+ readonly outputs: readonly [{
263
+ readonly internalType: "uint256";
264
+ readonly name: "";
265
+ readonly type: "uint256";
266
+ }];
267
+ readonly stateMutability: "view";
268
+ readonly type: "function";
269
+ }, {
270
+ readonly inputs: readonly [];
271
+ readonly name: "decimals";
272
+ readonly outputs: readonly [{
273
+ readonly internalType: "uint8";
274
+ readonly name: "";
275
+ readonly type: "uint8";
276
+ }];
277
+ readonly stateMutability: "pure";
278
+ readonly type: "function";
279
+ }, {
280
+ readonly inputs: readonly [];
281
+ readonly name: "finalizeVoting";
282
+ readonly outputs: readonly [];
283
+ readonly stateMutability: "nonpayable";
284
+ readonly type: "function";
285
+ }, {
286
+ readonly inputs: readonly [];
287
+ readonly name: "getCurrentVotingInfo";
288
+ readonly outputs: readonly [{
289
+ readonly internalType: "uint256";
290
+ readonly name: "round";
291
+ readonly type: "uint256";
292
+ }, {
293
+ readonly internalType: "uint256";
294
+ readonly name: "startTime";
295
+ readonly type: "uint256";
296
+ }, {
297
+ readonly internalType: "uint256";
298
+ readonly name: "endTime";
299
+ readonly type: "uint256";
300
+ }, {
301
+ readonly internalType: "uint256";
302
+ readonly name: "totalVotes";
303
+ readonly type: "uint256";
304
+ }, {
305
+ readonly internalType: "uint256";
306
+ readonly name: "votesFor";
307
+ readonly type: "uint256";
308
+ }, {
309
+ readonly internalType: "uint256";
310
+ readonly name: "votesAgainst";
311
+ readonly type: "uint256";
312
+ }, {
313
+ readonly internalType: "enum Bitcoinu.VotingStatus";
314
+ readonly name: "status";
315
+ readonly type: "uint8";
316
+ }];
317
+ readonly stateMutability: "view";
318
+ readonly type: "function";
319
+ }, {
320
+ readonly inputs: readonly [];
321
+ readonly name: "getNextVotingStartTime";
322
+ readonly outputs: readonly [{
323
+ readonly internalType: "uint256";
324
+ readonly name: "";
325
+ readonly type: "uint256";
326
+ }];
327
+ readonly stateMutability: "view";
328
+ readonly type: "function";
329
+ }, {
330
+ readonly inputs: readonly [{
331
+ readonly internalType: "uint256";
332
+ readonly name: "roundNumber";
333
+ readonly type: "uint256";
334
+ }, {
335
+ readonly internalType: "address";
336
+ readonly name: "voter";
337
+ readonly type: "address";
338
+ }];
339
+ readonly name: "getVoterLockedAmount";
340
+ readonly outputs: readonly [{
341
+ readonly internalType: "uint256";
342
+ readonly name: "";
343
+ readonly type: "uint256";
344
+ }];
345
+ readonly stateMutability: "view";
346
+ readonly type: "function";
347
+ }, {
348
+ readonly inputs: readonly [{
349
+ readonly internalType: "uint256";
350
+ readonly name: "roundNumber";
351
+ readonly type: "uint256";
352
+ }];
353
+ readonly name: "getVoterLockedAmount";
354
+ readonly outputs: readonly [{
355
+ readonly internalType: "uint256";
356
+ readonly name: "";
357
+ readonly type: "uint256";
358
+ }];
359
+ readonly stateMutability: "view";
360
+ readonly type: "function";
361
+ }, {
362
+ readonly inputs: readonly [];
363
+ readonly name: "name";
364
+ readonly outputs: readonly [{
365
+ readonly internalType: "string";
366
+ readonly name: "";
367
+ readonly type: "string";
368
+ }];
369
+ readonly stateMutability: "view";
370
+ readonly type: "function";
371
+ }, {
372
+ readonly inputs: readonly [];
373
+ readonly name: "nameChanged";
374
+ readonly outputs: readonly [{
375
+ readonly internalType: "bool";
376
+ readonly name: "";
377
+ readonly type: "bool";
378
+ }];
379
+ readonly stateMutability: "view";
380
+ readonly type: "function";
381
+ }, {
382
+ readonly inputs: readonly [];
383
+ readonly name: "startVoting";
384
+ readonly outputs: readonly [];
385
+ readonly stateMutability: "nonpayable";
386
+ readonly type: "function";
387
+ }, {
388
+ readonly inputs: readonly [];
389
+ readonly name: "symbol";
390
+ readonly outputs: readonly [{
391
+ readonly internalType: "string";
392
+ readonly name: "";
393
+ readonly type: "string";
394
+ }];
395
+ readonly stateMutability: "view";
396
+ readonly type: "function";
397
+ }, {
398
+ readonly inputs: readonly [];
399
+ readonly name: "totalSupply";
400
+ readonly outputs: readonly [{
401
+ readonly internalType: "uint256";
402
+ readonly name: "";
403
+ readonly type: "uint256";
404
+ }];
405
+ readonly stateMutability: "pure";
406
+ readonly type: "function";
407
+ }, {
408
+ readonly inputs: readonly [{
409
+ readonly internalType: "address";
410
+ readonly name: "to";
411
+ readonly type: "address";
412
+ }, {
413
+ readonly internalType: "uint256";
414
+ readonly name: "amount";
415
+ readonly type: "uint256";
416
+ }];
417
+ readonly name: "transfer";
418
+ readonly outputs: readonly [{
419
+ readonly internalType: "bool";
420
+ readonly name: "";
421
+ readonly type: "bool";
422
+ }];
423
+ readonly stateMutability: "nonpayable";
424
+ readonly type: "function";
425
+ }, {
426
+ readonly inputs: readonly [{
427
+ readonly internalType: "address";
428
+ readonly name: "from";
429
+ readonly type: "address";
430
+ }, {
431
+ readonly internalType: "address";
432
+ readonly name: "to";
433
+ readonly type: "address";
434
+ }, {
435
+ readonly internalType: "uint256";
436
+ readonly name: "amount";
437
+ readonly type: "uint256";
438
+ }];
439
+ readonly name: "transferFrom";
440
+ readonly outputs: readonly [{
441
+ readonly internalType: "bool";
442
+ readonly name: "";
443
+ readonly type: "bool";
444
+ }];
445
+ readonly stateMutability: "nonpayable";
446
+ readonly type: "function";
447
+ }, {
448
+ readonly inputs: readonly [{
449
+ readonly internalType: "uint256";
450
+ readonly name: "roundNumber";
451
+ readonly type: "uint256";
452
+ }];
453
+ readonly name: "unlockVoteTokens";
454
+ readonly outputs: readonly [];
455
+ readonly stateMutability: "nonpayable";
456
+ readonly type: "function";
457
+ }, {
458
+ readonly inputs: readonly [{
459
+ readonly internalType: "uint256";
460
+ readonly name: "amount";
461
+ readonly type: "uint256";
462
+ }, {
463
+ readonly internalType: "bool";
464
+ readonly name: "voteFor";
465
+ readonly type: "bool";
466
+ }];
467
+ readonly name: "vote";
468
+ readonly outputs: readonly [];
469
+ readonly stateMutability: "nonpayable";
470
+ readonly type: "function";
471
+ }, {
472
+ readonly inputs: readonly [];
473
+ readonly name: "votingEnabledTime";
474
+ readonly outputs: readonly [{
475
+ readonly internalType: "uint256";
476
+ readonly name: "";
477
+ readonly type: "uint256";
478
+ }];
479
+ readonly stateMutability: "view";
480
+ readonly type: "function";
481
+ }, {
482
+ readonly inputs: readonly [{
483
+ readonly internalType: "uint256";
484
+ readonly name: "";
485
+ readonly type: "uint256";
486
+ }];
487
+ readonly name: "votingRounds";
488
+ readonly outputs: readonly [{
489
+ readonly internalType: "uint256";
490
+ readonly name: "startTime";
491
+ readonly type: "uint256";
492
+ }, {
493
+ readonly internalType: "uint256";
494
+ readonly name: "endTime";
495
+ readonly type: "uint256";
496
+ }, {
497
+ readonly internalType: "uint256";
498
+ readonly name: "totalVotes";
499
+ readonly type: "uint256";
500
+ }, {
501
+ readonly internalType: "uint256";
502
+ readonly name: "votesFor";
503
+ readonly type: "uint256";
504
+ }, {
505
+ readonly internalType: "uint256";
506
+ readonly name: "votesAgainst";
507
+ readonly type: "uint256";
508
+ }, {
509
+ readonly internalType: "enum Bitcoinu.VotingStatus";
510
+ readonly name: "status";
511
+ readonly type: "uint8";
512
+ }];
513
+ readonly stateMutability: "view";
514
+ readonly type: "function";
515
+ }];
516
+ /**
517
+ * Type-safe ABI for Bitcoinu
518
+ */
519
+ export type BitcoinuAbi = typeof BitcoinuAbi;
520
+ /**
521
+ * Contract instance type for Bitcoinu
522
+ */
523
+ export type BitcoinuContract = any;
524
+ /**
525
+ * Bitcoinu Contract Class
526
+ *
527
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
528
+ *
529
+ * @example
530
+ * ```typescript
531
+ * import { createPublicClient, createWalletClient, http } from 'viem';
532
+ * import { mainnet } from 'viem/chains';
533
+ * import { Bitcoinu } from 'Bitcoinu';
534
+ *
535
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
536
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
537
+ *
538
+ * const contract = new Bitcoinu('0x...', { publicClient, walletClient });
539
+ *
540
+ * // Read functions
541
+ * const result = await contract.balanceOf('0x...');
542
+ *
543
+ * // Write functions
544
+ * const hash = await contract.transfer('0x...', 1000n);
545
+ *
546
+ * // Simulate transactions (dry-run)
547
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
548
+ * console.log('Gas estimate:', simulation.request.gas);
549
+ *
550
+ * // Watch events
551
+ * const unwatch = contract.watch.Transfer((event) => {
552
+ * console.log('Transfer event:', event);
553
+ * });
554
+ * ```
555
+ */
556
+ export declare class Bitcoinu {
557
+ private contract;
558
+ private contractAddress;
559
+ private publicClient;
560
+ constructor(address: Address, clients: {
561
+ publicClient: PublicClient;
562
+ walletClient?: WalletClient;
563
+ });
564
+ /**
565
+ * Get the contract address
566
+ */
567
+ get address(): Address;
568
+ /**
569
+ * Get the underlying viem contract instance.
570
+ */
571
+ getContract(): BitcoinuContract;
572
+ /**
573
+ * MIN_VOTES_FOR_REQUIRED
574
+ * view
575
+ */
576
+ MIN_VOTES_FOR_REQUIRED(): Promise<bigint>;
577
+ /**
578
+ * VOTING_DURATION
579
+ * view
580
+ */
581
+ VOTING_DURATION(): Promise<bigint>;
582
+ /**
583
+ * WAITING_PERIOD
584
+ * view
585
+ */
586
+ WAITING_PERIOD(): Promise<bigint>;
587
+ /**
588
+ * allowance
589
+ * view
590
+ */
591
+ allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint>;
592
+ /**
593
+ * balanceOf
594
+ * view
595
+ */
596
+ balanceOf(account: `0x${string}`): Promise<bigint>;
597
+ /**
598
+ * canStartVoting
599
+ * view
600
+ */
601
+ canStartVoting(): Promise<boolean>;
602
+ /**
603
+ * currentRound
604
+ * view
605
+ */
606
+ currentRound(): Promise<bigint>;
607
+ /**
608
+ * decimals
609
+ * pure
610
+ */
611
+ decimals(): Promise<bigint>;
612
+ /**
613
+ * getCurrentVotingInfo
614
+ * view
615
+ */
616
+ getCurrentVotingInfo(): Promise<[bigint, bigint, bigint, bigint, bigint, bigint, bigint]>;
617
+ /**
618
+ * getNextVotingStartTime
619
+ * view
620
+ */
621
+ getNextVotingStartTime(): Promise<bigint>;
622
+ getVoterLockedAmount(roundNumber: bigint, voter: `0x${string}`): Promise<bigint>;
623
+ getVoterLockedAmount(roundNumber: bigint): Promise<bigint>;
624
+ /**
625
+ * name
626
+ * view
627
+ */
628
+ name(): Promise<string>;
629
+ /**
630
+ * nameChanged
631
+ * view
632
+ */
633
+ nameChanged(): Promise<boolean>;
634
+ /**
635
+ * symbol
636
+ * view
637
+ */
638
+ symbol(): Promise<string>;
639
+ /**
640
+ * totalSupply
641
+ * pure
642
+ */
643
+ totalSupply(): Promise<bigint>;
644
+ /**
645
+ * votingEnabledTime
646
+ * view
647
+ */
648
+ votingEnabledTime(): Promise<bigint>;
649
+ /**
650
+ * votingRounds
651
+ * view
652
+ */
653
+ votingRounds(arg0: bigint): Promise<[bigint, bigint, bigint, bigint, bigint, bigint]>;
654
+ /**
655
+ * approve
656
+ * nonpayable
657
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
658
+ */
659
+ approve(spender: `0x${string}`, amount: bigint, options?: {
660
+ accessList?: import('viem').AccessList;
661
+ authorizationList?: import('viem').AuthorizationList;
662
+ chain?: import('viem').Chain | null;
663
+ dataSuffix?: `0x${string}`;
664
+ gas?: bigint;
665
+ gasPrice?: bigint;
666
+ maxFeePerGas?: bigint;
667
+ maxPriorityFeePerGas?: bigint;
668
+ nonce?: number;
669
+ value?: bigint;
670
+ }): Promise<`0x${string}`>;
671
+ /**
672
+ * finalizeVoting
673
+ * nonpayable
674
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
675
+ */
676
+ finalizeVoting(options?: {
677
+ accessList?: import('viem').AccessList;
678
+ authorizationList?: import('viem').AuthorizationList;
679
+ chain?: import('viem').Chain | null;
680
+ dataSuffix?: `0x${string}`;
681
+ gas?: bigint;
682
+ gasPrice?: bigint;
683
+ maxFeePerGas?: bigint;
684
+ maxPriorityFeePerGas?: bigint;
685
+ nonce?: number;
686
+ value?: bigint;
687
+ }): Promise<`0x${string}`>;
688
+ /**
689
+ * startVoting
690
+ * nonpayable
691
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
692
+ */
693
+ startVoting(options?: {
694
+ accessList?: import('viem').AccessList;
695
+ authorizationList?: import('viem').AuthorizationList;
696
+ chain?: import('viem').Chain | null;
697
+ dataSuffix?: `0x${string}`;
698
+ gas?: bigint;
699
+ gasPrice?: bigint;
700
+ maxFeePerGas?: bigint;
701
+ maxPriorityFeePerGas?: bigint;
702
+ nonce?: number;
703
+ value?: bigint;
704
+ }): Promise<`0x${string}`>;
705
+ /**
706
+ * transfer
707
+ * nonpayable
708
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
709
+ */
710
+ transfer(to: `0x${string}`, amount: bigint, options?: {
711
+ accessList?: import('viem').AccessList;
712
+ authorizationList?: import('viem').AuthorizationList;
713
+ chain?: import('viem').Chain | null;
714
+ dataSuffix?: `0x${string}`;
715
+ gas?: bigint;
716
+ gasPrice?: bigint;
717
+ maxFeePerGas?: bigint;
718
+ maxPriorityFeePerGas?: bigint;
719
+ nonce?: number;
720
+ value?: bigint;
721
+ }): Promise<`0x${string}`>;
722
+ /**
723
+ * transferFrom
724
+ * nonpayable
725
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
726
+ */
727
+ transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
728
+ accessList?: import('viem').AccessList;
729
+ authorizationList?: import('viem').AuthorizationList;
730
+ chain?: import('viem').Chain | null;
731
+ dataSuffix?: `0x${string}`;
732
+ gas?: bigint;
733
+ gasPrice?: bigint;
734
+ maxFeePerGas?: bigint;
735
+ maxPriorityFeePerGas?: bigint;
736
+ nonce?: number;
737
+ value?: bigint;
738
+ }): Promise<`0x${string}`>;
739
+ /**
740
+ * unlockVoteTokens
741
+ * nonpayable
742
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
743
+ */
744
+ unlockVoteTokens(roundNumber: bigint, options?: {
745
+ accessList?: import('viem').AccessList;
746
+ authorizationList?: import('viem').AuthorizationList;
747
+ chain?: import('viem').Chain | null;
748
+ dataSuffix?: `0x${string}`;
749
+ gas?: bigint;
750
+ gasPrice?: bigint;
751
+ maxFeePerGas?: bigint;
752
+ maxPriorityFeePerGas?: bigint;
753
+ nonce?: number;
754
+ value?: bigint;
755
+ }): Promise<`0x${string}`>;
756
+ /**
757
+ * vote
758
+ * nonpayable
759
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
760
+ */
761
+ vote(amount: bigint, voteFor: boolean, options?: {
762
+ accessList?: import('viem').AccessList;
763
+ authorizationList?: import('viem').AuthorizationList;
764
+ chain?: import('viem').Chain | null;
765
+ dataSuffix?: `0x${string}`;
766
+ gas?: bigint;
767
+ gasPrice?: bigint;
768
+ maxFeePerGas?: bigint;
769
+ maxPriorityFeePerGas?: bigint;
770
+ nonce?: number;
771
+ value?: bigint;
772
+ }): Promise<`0x${string}`>;
773
+ /**
774
+ * Simulate contract write operations (dry-run without sending transaction)
775
+ *
776
+ * @example
777
+ * const result = await contract.simulate.transfer('0x...', 1000n);
778
+ * console.log('Gas estimate:', result.request.gas);
779
+ * console.log('Would succeed:', result.result);
780
+ */
781
+ get simulate(): {
782
+ /**
783
+ * Simulate approve
784
+ * Returns gas estimate and result without sending transaction
785
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
786
+ */
787
+ approve(spender: `0x${string}`, amount: bigint, options?: {
788
+ accessList?: import("viem").AccessList;
789
+ authorizationList?: import("viem").AuthorizationList;
790
+ chain?: import("viem").Chain | null;
791
+ dataSuffix?: `0x${string}`;
792
+ gas?: bigint;
793
+ gasPrice?: bigint;
794
+ maxFeePerGas?: bigint;
795
+ maxPriorityFeePerGas?: bigint;
796
+ nonce?: number;
797
+ value?: bigint;
798
+ }): Promise<boolean>;
799
+ /**
800
+ * Simulate finalizeVoting
801
+ * Returns gas estimate and result without sending transaction
802
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
803
+ */
804
+ finalizeVoting(options?: {
805
+ accessList?: import("viem").AccessList;
806
+ authorizationList?: import("viem").AuthorizationList;
807
+ chain?: import("viem").Chain | null;
808
+ dataSuffix?: `0x${string}`;
809
+ gas?: bigint;
810
+ gasPrice?: bigint;
811
+ maxFeePerGas?: bigint;
812
+ maxPriorityFeePerGas?: bigint;
813
+ nonce?: number;
814
+ value?: bigint;
815
+ }): Promise<void>;
816
+ /**
817
+ * Simulate startVoting
818
+ * Returns gas estimate and result without sending transaction
819
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
820
+ */
821
+ startVoting(options?: {
822
+ accessList?: import("viem").AccessList;
823
+ authorizationList?: import("viem").AuthorizationList;
824
+ chain?: import("viem").Chain | null;
825
+ dataSuffix?: `0x${string}`;
826
+ gas?: bigint;
827
+ gasPrice?: bigint;
828
+ maxFeePerGas?: bigint;
829
+ maxPriorityFeePerGas?: bigint;
830
+ nonce?: number;
831
+ value?: bigint;
832
+ }): Promise<void>;
833
+ /**
834
+ * Simulate transfer
835
+ * Returns gas estimate and result without sending transaction
836
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
837
+ */
838
+ transfer(to: `0x${string}`, amount: bigint, options?: {
839
+ accessList?: import("viem").AccessList;
840
+ authorizationList?: import("viem").AuthorizationList;
841
+ chain?: import("viem").Chain | null;
842
+ dataSuffix?: `0x${string}`;
843
+ gas?: bigint;
844
+ gasPrice?: bigint;
845
+ maxFeePerGas?: bigint;
846
+ maxPriorityFeePerGas?: bigint;
847
+ nonce?: number;
848
+ value?: bigint;
849
+ }): Promise<boolean>;
850
+ /**
851
+ * Simulate transferFrom
852
+ * Returns gas estimate and result without sending transaction
853
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
854
+ */
855
+ transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
856
+ accessList?: import("viem").AccessList;
857
+ authorizationList?: import("viem").AuthorizationList;
858
+ chain?: import("viem").Chain | null;
859
+ dataSuffix?: `0x${string}`;
860
+ gas?: bigint;
861
+ gasPrice?: bigint;
862
+ maxFeePerGas?: bigint;
863
+ maxPriorityFeePerGas?: bigint;
864
+ nonce?: number;
865
+ value?: bigint;
866
+ }): Promise<boolean>;
867
+ /**
868
+ * Simulate unlockVoteTokens
869
+ * Returns gas estimate and result without sending transaction
870
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
871
+ */
872
+ unlockVoteTokens(roundNumber: bigint, options?: {
873
+ accessList?: import("viem").AccessList;
874
+ authorizationList?: import("viem").AuthorizationList;
875
+ chain?: import("viem").Chain | null;
876
+ dataSuffix?: `0x${string}`;
877
+ gas?: bigint;
878
+ gasPrice?: bigint;
879
+ maxFeePerGas?: bigint;
880
+ maxPriorityFeePerGas?: bigint;
881
+ nonce?: number;
882
+ value?: bigint;
883
+ }): Promise<void>;
884
+ /**
885
+ * Simulate vote
886
+ * Returns gas estimate and result without sending transaction
887
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
888
+ */
889
+ vote(amount: bigint, voteFor: boolean, options?: {
890
+ accessList?: import("viem").AccessList;
891
+ authorizationList?: import("viem").AuthorizationList;
892
+ chain?: import("viem").Chain | null;
893
+ dataSuffix?: `0x${string}`;
894
+ gas?: bigint;
895
+ gasPrice?: bigint;
896
+ maxFeePerGas?: bigint;
897
+ maxPriorityFeePerGas?: bigint;
898
+ nonce?: number;
899
+ value?: bigint;
900
+ }): Promise<void>;
901
+ };
902
+ /**
903
+ * Watch contract events
904
+ *
905
+ * @example
906
+ * // Watch all Transfer events
907
+ * const unwatch = contract.watch.Transfer((event) => {
908
+ * console.log('Transfer:', event);
909
+ * });
910
+ *
911
+ * // Stop watching
912
+ * unwatch();
913
+ */
914
+ get watch(): {
915
+ /**
916
+ * Watch Approval events
917
+ * @param callback Function to call when event is emitted
918
+ * @param filter Optional filter for indexed parameters
919
+ * @returns Unwatch function to stop listening
920
+ */
921
+ Approval: (callback: (event: {
922
+ owner: `0x${string}`;
923
+ spender: `0x${string}`;
924
+ value: bigint;
925
+ }) => void, filter?: {
926
+ owner?: `0x${string}` | `0x${string}`[] | null;
927
+ spender?: `0x${string}` | `0x${string}`[] | null;
928
+ }) => () => void;
929
+ /**
930
+ * Watch NameChanged events
931
+ * @param callback Function to call when event is emitted
932
+ * @param filter Optional filter for indexed parameters
933
+ * @returns Unwatch function to stop listening
934
+ */
935
+ NameChanged: (callback: (event: {
936
+ newName: string;
937
+ newSymbol: string;
938
+ }) => void) => () => void;
939
+ /**
940
+ * Watch Transfer events
941
+ * @param callback Function to call when event is emitted
942
+ * @param filter Optional filter for indexed parameters
943
+ * @returns Unwatch function to stop listening
944
+ */
945
+ Transfer: (callback: (event: {
946
+ from: `0x${string}`;
947
+ to: `0x${string}`;
948
+ value: bigint;
949
+ }) => void, filter?: {
950
+ from?: `0x${string}` | `0x${string}`[] | null;
951
+ to?: `0x${string}` | `0x${string}`[] | null;
952
+ }) => () => void;
953
+ /**
954
+ * Watch VoteCast events
955
+ * @param callback Function to call when event is emitted
956
+ * @param filter Optional filter for indexed parameters
957
+ * @returns Unwatch function to stop listening
958
+ */
959
+ VoteCast: (callback: (event: {
960
+ round: bigint;
961
+ voter: `0x${string}`;
962
+ amount: bigint;
963
+ voteFor: boolean;
964
+ }) => void, filter?: {
965
+ round?: bigint | bigint[] | null;
966
+ voter?: `0x${string}` | `0x${string}`[] | null;
967
+ }) => () => void;
968
+ /**
969
+ * Watch VoteTokensUnlocked events
970
+ * @param callback Function to call when event is emitted
971
+ * @param filter Optional filter for indexed parameters
972
+ * @returns Unwatch function to stop listening
973
+ */
974
+ VoteTokensUnlocked: (callback: (event: {
975
+ round: bigint;
976
+ voter: `0x${string}`;
977
+ amount: bigint;
978
+ }) => void, filter?: {
979
+ round?: bigint | bigint[] | null;
980
+ voter?: `0x${string}` | `0x${string}`[] | null;
981
+ }) => () => void;
982
+ /**
983
+ * Watch VotingEnded events
984
+ * @param callback Function to call when event is emitted
985
+ * @param filter Optional filter for indexed parameters
986
+ * @returns Unwatch function to stop listening
987
+ */
988
+ VotingEnded: (callback: (event: {
989
+ round: bigint;
990
+ status: bigint;
991
+ totalVotes: bigint;
992
+ votesFor: bigint;
993
+ votesAgainst: bigint;
994
+ }) => void, filter?: {
995
+ round?: bigint | bigint[] | null;
996
+ }) => () => void;
997
+ /**
998
+ * Watch VotingStarted events
999
+ * @param callback Function to call when event is emitted
1000
+ * @param filter Optional filter for indexed parameters
1001
+ * @returns Unwatch function to stop listening
1002
+ */
1003
+ VotingStarted: (callback: (event: {
1004
+ round: bigint;
1005
+ startTime: bigint;
1006
+ endTime: bigint;
1007
+ }) => void, filter?: {
1008
+ round?: bigint | bigint[] | null;
1009
+ }) => () => void;
1010
+ };
1011
+ }