@gitmyabi-stg/borg 0.0.1

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