@gitmyabi/sx 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,1124 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * SXNetwork_json ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const SXNetwork_jsonAbi: readonly [{
8
+ readonly inputs: readonly [];
9
+ readonly stateMutability: "nonpayable";
10
+ readonly type: "constructor";
11
+ }, {
12
+ readonly anonymous: false;
13
+ readonly inputs: readonly [{
14
+ readonly indexed: true;
15
+ readonly internalType: "address";
16
+ readonly name: "owner";
17
+ readonly type: "address";
18
+ }, {
19
+ readonly indexed: true;
20
+ readonly internalType: "address";
21
+ readonly name: "spender";
22
+ readonly type: "address";
23
+ }, {
24
+ readonly indexed: false;
25
+ readonly internalType: "uint256";
26
+ readonly name: "value";
27
+ readonly type: "uint256";
28
+ }];
29
+ readonly name: "Approval";
30
+ readonly type: "event";
31
+ }, {
32
+ readonly anonymous: false;
33
+ readonly inputs: readonly [{
34
+ readonly indexed: true;
35
+ readonly internalType: "bytes32";
36
+ readonly name: "role";
37
+ readonly type: "bytes32";
38
+ }, {
39
+ readonly indexed: true;
40
+ readonly internalType: "bytes32";
41
+ readonly name: "previousAdminRole";
42
+ readonly type: "bytes32";
43
+ }, {
44
+ readonly indexed: true;
45
+ readonly internalType: "bytes32";
46
+ readonly name: "newAdminRole";
47
+ readonly type: "bytes32";
48
+ }];
49
+ readonly name: "RoleAdminChanged";
50
+ readonly type: "event";
51
+ }, {
52
+ readonly anonymous: false;
53
+ readonly inputs: readonly [{
54
+ readonly indexed: true;
55
+ readonly internalType: "bytes32";
56
+ readonly name: "role";
57
+ readonly type: "bytes32";
58
+ }, {
59
+ readonly indexed: true;
60
+ readonly internalType: "address";
61
+ readonly name: "account";
62
+ readonly type: "address";
63
+ }, {
64
+ readonly indexed: true;
65
+ readonly internalType: "address";
66
+ readonly name: "sender";
67
+ readonly type: "address";
68
+ }];
69
+ readonly name: "RoleGranted";
70
+ readonly type: "event";
71
+ }, {
72
+ readonly anonymous: false;
73
+ readonly inputs: readonly [{
74
+ readonly indexed: true;
75
+ readonly internalType: "bytes32";
76
+ readonly name: "role";
77
+ readonly type: "bytes32";
78
+ }, {
79
+ readonly indexed: true;
80
+ readonly internalType: "address";
81
+ readonly name: "account";
82
+ readonly type: "address";
83
+ }, {
84
+ readonly indexed: true;
85
+ readonly internalType: "address";
86
+ readonly name: "sender";
87
+ readonly type: "address";
88
+ }];
89
+ readonly name: "RoleRevoked";
90
+ readonly type: "event";
91
+ }, {
92
+ readonly anonymous: false;
93
+ readonly inputs: readonly [{
94
+ readonly indexed: true;
95
+ readonly internalType: "address";
96
+ readonly name: "from";
97
+ readonly type: "address";
98
+ }, {
99
+ readonly indexed: true;
100
+ readonly internalType: "address";
101
+ readonly name: "to";
102
+ readonly type: "address";
103
+ }, {
104
+ readonly indexed: false;
105
+ readonly internalType: "uint256";
106
+ readonly name: "value";
107
+ readonly type: "uint256";
108
+ }];
109
+ readonly name: "Transfer";
110
+ readonly type: "event";
111
+ }, {
112
+ readonly inputs: readonly [];
113
+ readonly name: "DEFAULT_ADMIN_ROLE";
114
+ readonly outputs: readonly [{
115
+ readonly internalType: "bytes32";
116
+ readonly name: "";
117
+ readonly type: "bytes32";
118
+ }];
119
+ readonly stateMutability: "view";
120
+ readonly type: "function";
121
+ }, {
122
+ readonly inputs: readonly [];
123
+ readonly name: "MINTER_ROLE";
124
+ readonly outputs: readonly [{
125
+ readonly internalType: "bytes32";
126
+ readonly name: "";
127
+ readonly type: "bytes32";
128
+ }];
129
+ readonly stateMutability: "view";
130
+ readonly type: "function";
131
+ }, {
132
+ readonly inputs: readonly [{
133
+ readonly internalType: "address";
134
+ readonly name: "owner";
135
+ readonly type: "address";
136
+ }, {
137
+ readonly internalType: "address";
138
+ readonly name: "spender";
139
+ readonly type: "address";
140
+ }];
141
+ readonly name: "allowance";
142
+ readonly outputs: readonly [{
143
+ readonly internalType: "uint256";
144
+ readonly name: "";
145
+ readonly type: "uint256";
146
+ }];
147
+ readonly stateMutability: "view";
148
+ readonly type: "function";
149
+ }, {
150
+ readonly inputs: readonly [{
151
+ readonly internalType: "address";
152
+ readonly name: "spender";
153
+ readonly type: "address";
154
+ }, {
155
+ readonly internalType: "uint256";
156
+ readonly name: "amount";
157
+ readonly type: "uint256";
158
+ }];
159
+ readonly name: "approve";
160
+ readonly outputs: readonly [{
161
+ readonly internalType: "bool";
162
+ readonly name: "";
163
+ readonly type: "bool";
164
+ }];
165
+ readonly stateMutability: "nonpayable";
166
+ readonly type: "function";
167
+ }, {
168
+ readonly inputs: readonly [{
169
+ readonly internalType: "address";
170
+ readonly name: "account";
171
+ readonly type: "address";
172
+ }];
173
+ readonly name: "balanceOf";
174
+ readonly outputs: readonly [{
175
+ readonly internalType: "uint256";
176
+ readonly name: "";
177
+ readonly type: "uint256";
178
+ }];
179
+ readonly stateMutability: "view";
180
+ readonly type: "function";
181
+ }, {
182
+ readonly inputs: readonly [{
183
+ readonly internalType: "uint256";
184
+ readonly name: "amount";
185
+ readonly type: "uint256";
186
+ }];
187
+ readonly name: "burn";
188
+ readonly outputs: readonly [];
189
+ readonly stateMutability: "nonpayable";
190
+ readonly type: "function";
191
+ }, {
192
+ readonly inputs: readonly [{
193
+ readonly internalType: "address";
194
+ readonly name: "account";
195
+ readonly type: "address";
196
+ }, {
197
+ readonly internalType: "uint256";
198
+ readonly name: "amount";
199
+ readonly type: "uint256";
200
+ }];
201
+ readonly name: "burnFrom";
202
+ readonly outputs: readonly [];
203
+ readonly stateMutability: "nonpayable";
204
+ readonly type: "function";
205
+ }, {
206
+ readonly inputs: readonly [];
207
+ readonly name: "decimals";
208
+ readonly outputs: readonly [{
209
+ readonly internalType: "uint8";
210
+ readonly name: "";
211
+ readonly type: "uint8";
212
+ }];
213
+ readonly stateMutability: "view";
214
+ readonly type: "function";
215
+ }, {
216
+ readonly inputs: readonly [{
217
+ readonly internalType: "address";
218
+ readonly name: "spender";
219
+ readonly type: "address";
220
+ }, {
221
+ readonly internalType: "uint256";
222
+ readonly name: "subtractedValue";
223
+ readonly type: "uint256";
224
+ }];
225
+ readonly name: "decreaseAllowance";
226
+ readonly outputs: readonly [{
227
+ readonly internalType: "bool";
228
+ readonly name: "";
229
+ readonly type: "bool";
230
+ }];
231
+ readonly stateMutability: "nonpayable";
232
+ readonly type: "function";
233
+ }, {
234
+ readonly inputs: readonly [{
235
+ readonly internalType: "bytes32";
236
+ readonly name: "role";
237
+ readonly type: "bytes32";
238
+ }];
239
+ readonly name: "getRoleAdmin";
240
+ readonly outputs: readonly [{
241
+ readonly internalType: "bytes32";
242
+ readonly name: "";
243
+ readonly type: "bytes32";
244
+ }];
245
+ readonly stateMutability: "view";
246
+ readonly type: "function";
247
+ }, {
248
+ readonly inputs: readonly [{
249
+ readonly internalType: "address";
250
+ readonly name: "account";
251
+ readonly type: "address";
252
+ }];
253
+ readonly name: "grantMinterRole";
254
+ readonly outputs: readonly [];
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 internalType: "address";
264
+ readonly name: "account";
265
+ readonly type: "address";
266
+ }];
267
+ readonly name: "grantRole";
268
+ readonly outputs: readonly [];
269
+ readonly stateMutability: "nonpayable";
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: "hasRole";
282
+ readonly outputs: readonly [{
283
+ readonly internalType: "bool";
284
+ readonly name: "";
285
+ readonly type: "bool";
286
+ }];
287
+ readonly stateMutability: "view";
288
+ readonly type: "function";
289
+ }, {
290
+ readonly inputs: readonly [{
291
+ readonly internalType: "address";
292
+ readonly name: "spender";
293
+ readonly type: "address";
294
+ }, {
295
+ readonly internalType: "uint256";
296
+ readonly name: "addedValue";
297
+ readonly type: "uint256";
298
+ }];
299
+ readonly name: "increaseAllowance";
300
+ readonly outputs: readonly [{
301
+ readonly internalType: "bool";
302
+ readonly name: "";
303
+ readonly type: "bool";
304
+ }];
305
+ readonly stateMutability: "nonpayable";
306
+ readonly type: "function";
307
+ }, {
308
+ readonly inputs: readonly [{
309
+ readonly internalType: "address";
310
+ readonly name: "to";
311
+ readonly type: "address";
312
+ }, {
313
+ readonly internalType: "uint256";
314
+ readonly name: "amount";
315
+ readonly type: "uint256";
316
+ }];
317
+ readonly name: "mint";
318
+ readonly outputs: readonly [];
319
+ readonly stateMutability: "nonpayable";
320
+ readonly type: "function";
321
+ }, {
322
+ readonly inputs: readonly [];
323
+ readonly name: "name";
324
+ readonly outputs: readonly [{
325
+ readonly internalType: "string";
326
+ readonly name: "";
327
+ readonly type: "string";
328
+ }];
329
+ readonly stateMutability: "view";
330
+ readonly type: "function";
331
+ }, {
332
+ readonly inputs: readonly [{
333
+ readonly internalType: "bytes32";
334
+ readonly name: "role";
335
+ readonly type: "bytes32";
336
+ }, {
337
+ readonly internalType: "address";
338
+ readonly name: "account";
339
+ readonly type: "address";
340
+ }];
341
+ readonly name: "renounceRole";
342
+ readonly outputs: readonly [];
343
+ readonly stateMutability: "nonpayable";
344
+ readonly type: "function";
345
+ }, {
346
+ readonly inputs: readonly [{
347
+ readonly internalType: "address";
348
+ readonly name: "account";
349
+ readonly type: "address";
350
+ }];
351
+ readonly name: "revokeMinterRole";
352
+ readonly outputs: readonly [];
353
+ readonly stateMutability: "nonpayable";
354
+ readonly type: "function";
355
+ }, {
356
+ readonly inputs: readonly [{
357
+ readonly internalType: "bytes32";
358
+ readonly name: "role";
359
+ readonly type: "bytes32";
360
+ }, {
361
+ readonly internalType: "address";
362
+ readonly name: "account";
363
+ readonly type: "address";
364
+ }];
365
+ readonly name: "revokeRole";
366
+ readonly outputs: readonly [];
367
+ readonly stateMutability: "nonpayable";
368
+ readonly type: "function";
369
+ }, {
370
+ readonly inputs: readonly [{
371
+ readonly internalType: "bytes4";
372
+ readonly name: "interfaceId";
373
+ readonly type: "bytes4";
374
+ }];
375
+ readonly name: "supportsInterface";
376
+ readonly outputs: readonly [{
377
+ readonly internalType: "bool";
378
+ readonly name: "";
379
+ readonly type: "bool";
380
+ }];
381
+ readonly stateMutability: "view";
382
+ readonly type: "function";
383
+ }, {
384
+ readonly inputs: readonly [];
385
+ readonly name: "symbol";
386
+ readonly outputs: readonly [{
387
+ readonly internalType: "string";
388
+ readonly name: "";
389
+ readonly type: "string";
390
+ }];
391
+ readonly stateMutability: "view";
392
+ readonly type: "function";
393
+ }, {
394
+ readonly inputs: readonly [];
395
+ readonly name: "tokenName";
396
+ readonly outputs: readonly [{
397
+ readonly internalType: "string";
398
+ readonly name: "";
399
+ readonly type: "string";
400
+ }];
401
+ readonly stateMutability: "view";
402
+ readonly type: "function";
403
+ }, {
404
+ readonly inputs: readonly [];
405
+ readonly name: "tokenSymbol";
406
+ readonly outputs: readonly [{
407
+ readonly internalType: "string";
408
+ readonly name: "";
409
+ readonly type: "string";
410
+ }];
411
+ readonly stateMutability: "view";
412
+ readonly type: "function";
413
+ }, {
414
+ readonly inputs: readonly [];
415
+ readonly name: "totalSupply";
416
+ readonly outputs: readonly [{
417
+ readonly internalType: "uint256";
418
+ readonly name: "";
419
+ readonly type: "uint256";
420
+ }];
421
+ readonly stateMutability: "view";
422
+ readonly type: "function";
423
+ }, {
424
+ readonly inputs: readonly [{
425
+ readonly internalType: "address";
426
+ readonly name: "to";
427
+ readonly type: "address";
428
+ }, {
429
+ readonly internalType: "uint256";
430
+ readonly name: "amount";
431
+ readonly type: "uint256";
432
+ }];
433
+ readonly name: "transfer";
434
+ readonly outputs: readonly [{
435
+ readonly internalType: "bool";
436
+ readonly name: "";
437
+ readonly type: "bool";
438
+ }];
439
+ readonly stateMutability: "nonpayable";
440
+ readonly type: "function";
441
+ }, {
442
+ readonly inputs: readonly [{
443
+ readonly internalType: "address";
444
+ readonly name: "from";
445
+ readonly type: "address";
446
+ }, {
447
+ readonly internalType: "address";
448
+ readonly name: "to";
449
+ readonly type: "address";
450
+ }, {
451
+ readonly internalType: "uint256";
452
+ readonly name: "amount";
453
+ readonly type: "uint256";
454
+ }];
455
+ readonly name: "transferFrom";
456
+ readonly outputs: readonly [{
457
+ readonly internalType: "bool";
458
+ readonly name: "";
459
+ readonly type: "bool";
460
+ }];
461
+ readonly stateMutability: "nonpayable";
462
+ readonly type: "function";
463
+ }];
464
+ /**
465
+ * Type-safe ABI for SXNetwork_json
466
+ */
467
+ export type SXNetwork_jsonAbi = typeof SXNetwork_jsonAbi;
468
+ /**
469
+ * Contract instance type for SXNetwork_json
470
+ */
471
+ export type SXNetwork_jsonContract = any;
472
+ /**
473
+ * SXNetwork_json Contract Class
474
+ *
475
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
476
+ *
477
+ * @example
478
+ * ```typescript
479
+ * import { createPublicClient, createWalletClient, http } from 'viem';
480
+ * import { mainnet } from 'viem/chains';
481
+ * import { SXNetwork_json } from 'SXNetwork_json';
482
+ *
483
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
484
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
485
+ *
486
+ * const contract = new SXNetwork_json('0x...', { publicClient, walletClient });
487
+ *
488
+ * // Read functions
489
+ * const result = await contract.balanceOf('0x...');
490
+ *
491
+ * // Write functions
492
+ * const hash = await contract.transfer('0x...', 1000n);
493
+ *
494
+ * // Simulate transactions (dry-run)
495
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
496
+ * console.log('Gas estimate:', simulation.request.gas);
497
+ *
498
+ * // Watch events
499
+ * const unwatch = contract.watch.Transfer((event) => {
500
+ * console.log('Transfer event:', event);
501
+ * });
502
+ * ```
503
+ */
504
+ export declare class SXNetwork_json {
505
+ private contract;
506
+ private contractAddress;
507
+ private publicClient;
508
+ constructor(address: Address, clients: {
509
+ publicClient: PublicClient;
510
+ walletClient?: WalletClient;
511
+ });
512
+ /**
513
+ * Get the contract address
514
+ */
515
+ get address(): Address;
516
+ /**
517
+ * Get the underlying viem contract instance
518
+ */
519
+ getContract(): SXNetwork_jsonContract;
520
+ /**
521
+ * DEFAULT_ADMIN_ROLE
522
+ * view
523
+ */
524
+ DEFAULT_ADMIN_ROLE(): Promise<`0x${string}`>;
525
+ /**
526
+ * MINTER_ROLE
527
+ * view
528
+ */
529
+ MINTER_ROLE(): Promise<`0x${string}`>;
530
+ /**
531
+ * allowance
532
+ * view
533
+ */
534
+ allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint>;
535
+ /**
536
+ * balanceOf
537
+ * view
538
+ */
539
+ balanceOf(account: `0x${string}`): Promise<bigint>;
540
+ /**
541
+ * decimals
542
+ * view
543
+ */
544
+ decimals(): Promise<bigint>;
545
+ /**
546
+ * getRoleAdmin
547
+ * view
548
+ */
549
+ getRoleAdmin(role: `0x${string}`): Promise<`0x${string}`>;
550
+ /**
551
+ * hasRole
552
+ * view
553
+ */
554
+ hasRole(role: `0x${string}`, account: `0x${string}`): Promise<boolean>;
555
+ /**
556
+ * name
557
+ * view
558
+ */
559
+ name(): Promise<string>;
560
+ /**
561
+ * supportsInterface
562
+ * view
563
+ */
564
+ supportsInterface(interfaceId: `0x${string}`): Promise<boolean>;
565
+ /**
566
+ * symbol
567
+ * view
568
+ */
569
+ symbol(): Promise<string>;
570
+ /**
571
+ * tokenName
572
+ * view
573
+ */
574
+ tokenName(): Promise<string>;
575
+ /**
576
+ * tokenSymbol
577
+ * view
578
+ */
579
+ tokenSymbol(): Promise<string>;
580
+ /**
581
+ * totalSupply
582
+ * view
583
+ */
584
+ totalSupply(): Promise<bigint>;
585
+ /**
586
+ * approve
587
+ * nonpayable
588
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
589
+ */
590
+ approve(spender: `0x${string}`, amount: bigint, options?: {
591
+ accessList?: import('viem').AccessList;
592
+ authorizationList?: import('viem').AuthorizationList;
593
+ chain?: import('viem').Chain | null;
594
+ dataSuffix?: `0x${string}`;
595
+ gas?: bigint;
596
+ gasPrice?: bigint;
597
+ maxFeePerGas?: bigint;
598
+ maxPriorityFeePerGas?: bigint;
599
+ nonce?: number;
600
+ value?: bigint;
601
+ }): Promise<`0x${string}`>;
602
+ /**
603
+ * burn
604
+ * nonpayable
605
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
606
+ */
607
+ burn(amount: bigint, options?: {
608
+ accessList?: import('viem').AccessList;
609
+ authorizationList?: import('viem').AuthorizationList;
610
+ chain?: import('viem').Chain | null;
611
+ dataSuffix?: `0x${string}`;
612
+ gas?: bigint;
613
+ gasPrice?: bigint;
614
+ maxFeePerGas?: bigint;
615
+ maxPriorityFeePerGas?: bigint;
616
+ nonce?: number;
617
+ value?: bigint;
618
+ }): Promise<`0x${string}`>;
619
+ /**
620
+ * burnFrom
621
+ * nonpayable
622
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
623
+ */
624
+ burnFrom(account: `0x${string}`, amount: bigint, options?: {
625
+ accessList?: import('viem').AccessList;
626
+ authorizationList?: import('viem').AuthorizationList;
627
+ chain?: import('viem').Chain | null;
628
+ dataSuffix?: `0x${string}`;
629
+ gas?: bigint;
630
+ gasPrice?: bigint;
631
+ maxFeePerGas?: bigint;
632
+ maxPriorityFeePerGas?: bigint;
633
+ nonce?: number;
634
+ value?: bigint;
635
+ }): Promise<`0x${string}`>;
636
+ /**
637
+ * decreaseAllowance
638
+ * nonpayable
639
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
640
+ */
641
+ decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
642
+ accessList?: import('viem').AccessList;
643
+ authorizationList?: import('viem').AuthorizationList;
644
+ chain?: import('viem').Chain | null;
645
+ dataSuffix?: `0x${string}`;
646
+ gas?: bigint;
647
+ gasPrice?: bigint;
648
+ maxFeePerGas?: bigint;
649
+ maxPriorityFeePerGas?: bigint;
650
+ nonce?: number;
651
+ value?: bigint;
652
+ }): Promise<`0x${string}`>;
653
+ /**
654
+ * grantMinterRole
655
+ * nonpayable
656
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
657
+ */
658
+ grantMinterRole(account: `0x${string}`, options?: {
659
+ accessList?: import('viem').AccessList;
660
+ authorizationList?: import('viem').AuthorizationList;
661
+ chain?: import('viem').Chain | null;
662
+ dataSuffix?: `0x${string}`;
663
+ gas?: bigint;
664
+ gasPrice?: bigint;
665
+ maxFeePerGas?: bigint;
666
+ maxPriorityFeePerGas?: bigint;
667
+ nonce?: number;
668
+ value?: bigint;
669
+ }): Promise<`0x${string}`>;
670
+ /**
671
+ * grantRole
672
+ * nonpayable
673
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
674
+ */
675
+ grantRole(role: `0x${string}`, account: `0x${string}`, options?: {
676
+ accessList?: import('viem').AccessList;
677
+ authorizationList?: import('viem').AuthorizationList;
678
+ chain?: import('viem').Chain | null;
679
+ dataSuffix?: `0x${string}`;
680
+ gas?: bigint;
681
+ gasPrice?: bigint;
682
+ maxFeePerGas?: bigint;
683
+ maxPriorityFeePerGas?: bigint;
684
+ nonce?: number;
685
+ value?: bigint;
686
+ }): Promise<`0x${string}`>;
687
+ /**
688
+ * increaseAllowance
689
+ * nonpayable
690
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
691
+ */
692
+ increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
693
+ accessList?: import('viem').AccessList;
694
+ authorizationList?: import('viem').AuthorizationList;
695
+ chain?: import('viem').Chain | null;
696
+ dataSuffix?: `0x${string}`;
697
+ gas?: bigint;
698
+ gasPrice?: bigint;
699
+ maxFeePerGas?: bigint;
700
+ maxPriorityFeePerGas?: bigint;
701
+ nonce?: number;
702
+ value?: bigint;
703
+ }): Promise<`0x${string}`>;
704
+ /**
705
+ * mint
706
+ * nonpayable
707
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
708
+ */
709
+ mint(to: `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
+ * renounceRole
723
+ * nonpayable
724
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
725
+ */
726
+ renounceRole(role: `0x${string}`, account: `0x${string}`, 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
+ * revokeMinterRole
740
+ * nonpayable
741
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
742
+ */
743
+ revokeMinterRole(account: `0x${string}`, 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
+ * revokeRole
757
+ * nonpayable
758
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
759
+ */
760
+ revokeRole(role: `0x${string}`, account: `0x${string}`, 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
+ * transfer
774
+ * nonpayable
775
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
776
+ */
777
+ transfer(to: `0x${string}`, amount: bigint, 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
+ * transferFrom
791
+ * nonpayable
792
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
793
+ */
794
+ transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, 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
+ * Simulate contract write operations (dry-run without sending transaction)
808
+ *
809
+ * @example
810
+ * const result = await contract.simulate.transfer('0x...', 1000n);
811
+ * console.log('Gas estimate:', result.request.gas);
812
+ * console.log('Would succeed:', result.result);
813
+ */
814
+ get simulate(): {
815
+ /**
816
+ * Simulate approve
817
+ * Returns gas estimate and result without sending transaction
818
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
819
+ */
820
+ approve(spender: `0x${string}`, amount: bigint, options?: {
821
+ accessList?: import("viem").AccessList;
822
+ authorizationList?: import("viem").AuthorizationList;
823
+ chain?: import("viem").Chain | null;
824
+ dataSuffix?: `0x${string}`;
825
+ gas?: bigint;
826
+ gasPrice?: bigint;
827
+ maxFeePerGas?: bigint;
828
+ maxPriorityFeePerGas?: bigint;
829
+ nonce?: number;
830
+ value?: bigint;
831
+ }): Promise<boolean>;
832
+ /**
833
+ * Simulate burn
834
+ * Returns gas estimate and result without sending transaction
835
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
836
+ */
837
+ burn(amount: bigint, options?: {
838
+ accessList?: import("viem").AccessList;
839
+ authorizationList?: import("viem").AuthorizationList;
840
+ chain?: import("viem").Chain | null;
841
+ dataSuffix?: `0x${string}`;
842
+ gas?: bigint;
843
+ gasPrice?: bigint;
844
+ maxFeePerGas?: bigint;
845
+ maxPriorityFeePerGas?: bigint;
846
+ nonce?: number;
847
+ value?: bigint;
848
+ }): Promise<void>;
849
+ /**
850
+ * Simulate burnFrom
851
+ * Returns gas estimate and result without sending transaction
852
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
853
+ */
854
+ burnFrom(account: `0x${string}`, amount: bigint, options?: {
855
+ accessList?: import("viem").AccessList;
856
+ authorizationList?: import("viem").AuthorizationList;
857
+ chain?: import("viem").Chain | null;
858
+ dataSuffix?: `0x${string}`;
859
+ gas?: bigint;
860
+ gasPrice?: bigint;
861
+ maxFeePerGas?: bigint;
862
+ maxPriorityFeePerGas?: bigint;
863
+ nonce?: number;
864
+ value?: bigint;
865
+ }): Promise<void>;
866
+ /**
867
+ * Simulate decreaseAllowance
868
+ * Returns gas estimate and result without sending transaction
869
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
870
+ */
871
+ decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
872
+ accessList?: import("viem").AccessList;
873
+ authorizationList?: import("viem").AuthorizationList;
874
+ chain?: import("viem").Chain | null;
875
+ dataSuffix?: `0x${string}`;
876
+ gas?: bigint;
877
+ gasPrice?: bigint;
878
+ maxFeePerGas?: bigint;
879
+ maxPriorityFeePerGas?: bigint;
880
+ nonce?: number;
881
+ value?: bigint;
882
+ }): Promise<boolean>;
883
+ /**
884
+ * Simulate grantMinterRole
885
+ * Returns gas estimate and result without sending transaction
886
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
887
+ */
888
+ grantMinterRole(account: `0x${string}`, 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<void>;
900
+ /**
901
+ * Simulate grantRole
902
+ * Returns gas estimate and result without sending transaction
903
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
904
+ */
905
+ grantRole(role: `0x${string}`, account: `0x${string}`, 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 increaseAllowance
919
+ * Returns gas estimate and result without sending transaction
920
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
921
+ */
922
+ increaseAllowance(spender: `0x${string}`, addedValue: 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<boolean>;
934
+ /**
935
+ * Simulate mint
936
+ * Returns gas estimate and result without sending transaction
937
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
938
+ */
939
+ mint(to: `0x${string}`, amount: 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<void>;
951
+ /**
952
+ * Simulate renounceRole
953
+ * Returns gas estimate and result without sending transaction
954
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
955
+ */
956
+ renounceRole(role: `0x${string}`, account: `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 revokeMinterRole
970
+ * Returns gas estimate and result without sending transaction
971
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
972
+ */
973
+ revokeMinterRole(account: `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 revokeRole
987
+ * Returns gas estimate and result without sending transaction
988
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
989
+ */
990
+ revokeRole(role: `0x${string}`, account: `0x${string}`, 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<void>;
1002
+ /**
1003
+ * Simulate transfer
1004
+ * Returns gas estimate and result without sending transaction
1005
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1006
+ */
1007
+ transfer(to: `0x${string}`, amount: bigint, 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<boolean>;
1019
+ /**
1020
+ * Simulate transferFrom
1021
+ * Returns gas estimate and result without sending transaction
1022
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1023
+ */
1024
+ transferFrom(from: `0x${string}`, 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
+ /**
1038
+ * Watch contract events
1039
+ *
1040
+ * @example
1041
+ * // Watch all Transfer events
1042
+ * const unwatch = contract.watch.Transfer((event) => {
1043
+ * console.log('Transfer:', event);
1044
+ * });
1045
+ *
1046
+ * // Stop watching
1047
+ * unwatch();
1048
+ */
1049
+ get watch(): {
1050
+ /**
1051
+ * Watch Approval events
1052
+ * @param callback Function to call when event is emitted
1053
+ * @param filter Optional filter for indexed parameters
1054
+ * @returns Unwatch function to stop listening
1055
+ */
1056
+ Approval: (callback: (event: {
1057
+ owner: `0x${string}`;
1058
+ spender: `0x${string}`;
1059
+ value: bigint;
1060
+ }) => void, filter?: {
1061
+ owner: `0x${string}`;
1062
+ spender: `0x${string}`;
1063
+ }) => () => void;
1064
+ /**
1065
+ * Watch RoleAdminChanged events
1066
+ * @param callback Function to call when event is emitted
1067
+ * @param filter Optional filter for indexed parameters
1068
+ * @returns Unwatch function to stop listening
1069
+ */
1070
+ RoleAdminChanged: (callback: (event: {
1071
+ role: `0x${string}`;
1072
+ previousAdminRole: `0x${string}`;
1073
+ newAdminRole: `0x${string}`;
1074
+ }) => void, filter?: {
1075
+ role: `0x${string}`;
1076
+ previousAdminRole: `0x${string}`;
1077
+ newAdminRole: `0x${string}`;
1078
+ }) => () => void;
1079
+ /**
1080
+ * Watch RoleGranted events
1081
+ * @param callback Function to call when event is emitted
1082
+ * @param filter Optional filter for indexed parameters
1083
+ * @returns Unwatch function to stop listening
1084
+ */
1085
+ RoleGranted: (callback: (event: {
1086
+ role: `0x${string}`;
1087
+ account: `0x${string}`;
1088
+ sender: `0x${string}`;
1089
+ }) => void, filter?: {
1090
+ role: `0x${string}`;
1091
+ account: `0x${string}`;
1092
+ sender: `0x${string}`;
1093
+ }) => () => void;
1094
+ /**
1095
+ * Watch RoleRevoked events
1096
+ * @param callback Function to call when event is emitted
1097
+ * @param filter Optional filter for indexed parameters
1098
+ * @returns Unwatch function to stop listening
1099
+ */
1100
+ RoleRevoked: (callback: (event: {
1101
+ role: `0x${string}`;
1102
+ account: `0x${string}`;
1103
+ sender: `0x${string}`;
1104
+ }) => void, filter?: {
1105
+ role: `0x${string}`;
1106
+ account: `0x${string}`;
1107
+ sender: `0x${string}`;
1108
+ }) => () => void;
1109
+ /**
1110
+ * Watch Transfer 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
+ Transfer: (callback: (event: {
1116
+ from: `0x${string}`;
1117
+ to: `0x${string}`;
1118
+ value: bigint;
1119
+ }) => void, filter?: {
1120
+ from: `0x${string}`;
1121
+ to: `0x${string}`;
1122
+ }) => () => void;
1123
+ };
1124
+ }