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