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