@gitmyabi/crvplain3andsusd 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,824 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * Vyper_contract ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const Vyper_contractAbi = [
10
+ {
11
+ "name": "Transfer",
12
+ "inputs": [
13
+ {
14
+ "type": "address",
15
+ "name": "_from",
16
+ "indexed": true
17
+ },
18
+ {
19
+ "type": "address",
20
+ "name": "_to",
21
+ "indexed": true
22
+ },
23
+ {
24
+ "type": "uint256",
25
+ "name": "_value",
26
+ "indexed": false
27
+ }
28
+ ],
29
+ "anonymous": false,
30
+ "type": "event"
31
+ },
32
+ {
33
+ "name": "Approval",
34
+ "inputs": [
35
+ {
36
+ "type": "address",
37
+ "name": "_owner",
38
+ "indexed": true
39
+ },
40
+ {
41
+ "type": "address",
42
+ "name": "_spender",
43
+ "indexed": true
44
+ },
45
+ {
46
+ "type": "uint256",
47
+ "name": "_value",
48
+ "indexed": false
49
+ }
50
+ ],
51
+ "anonymous": false,
52
+ "type": "event"
53
+ },
54
+ {
55
+ "inputs": [
56
+ {
57
+ "type": "string",
58
+ "name": "_name"
59
+ },
60
+ {
61
+ "type": "string",
62
+ "name": "_symbol"
63
+ },
64
+ {
65
+ "type": "uint256",
66
+ "name": "_decimals"
67
+ },
68
+ {
69
+ "type": "uint256",
70
+ "name": "_supply"
71
+ }
72
+ ],
73
+ "payable": false,
74
+ "type": "constructor",
75
+ "stateMutability": "nonpayable"
76
+ },
77
+ {
78
+ "name": "set_minter",
79
+ "outputs": [],
80
+ "inputs": [
81
+ {
82
+ "type": "address",
83
+ "name": "_minter"
84
+ }
85
+ ],
86
+ "constant": false,
87
+ "payable": false,
88
+ "type": "function",
89
+ "gas": 36247,
90
+ "stateMutability": "nonpayable"
91
+ },
92
+ {
93
+ "name": "totalSupply",
94
+ "outputs": [
95
+ {
96
+ "type": "uint256",
97
+ "name": "out"
98
+ }
99
+ ],
100
+ "inputs": [],
101
+ "constant": true,
102
+ "payable": false,
103
+ "type": "function",
104
+ "gas": 1181,
105
+ "stateMutability": "view"
106
+ },
107
+ {
108
+ "name": "allowance",
109
+ "outputs": [
110
+ {
111
+ "type": "uint256",
112
+ "name": "out"
113
+ }
114
+ ],
115
+ "inputs": [
116
+ {
117
+ "type": "address",
118
+ "name": "_owner"
119
+ },
120
+ {
121
+ "type": "address",
122
+ "name": "_spender"
123
+ }
124
+ ],
125
+ "constant": true,
126
+ "payable": false,
127
+ "type": "function",
128
+ "gas": 1519,
129
+ "stateMutability": "view"
130
+ },
131
+ {
132
+ "name": "transfer",
133
+ "outputs": [
134
+ {
135
+ "type": "bool",
136
+ "name": "out"
137
+ }
138
+ ],
139
+ "inputs": [
140
+ {
141
+ "type": "address",
142
+ "name": "_to"
143
+ },
144
+ {
145
+ "type": "uint256",
146
+ "name": "_value"
147
+ }
148
+ ],
149
+ "constant": false,
150
+ "payable": false,
151
+ "type": "function",
152
+ "gas": 74802,
153
+ "stateMutability": "nonpayable"
154
+ },
155
+ {
156
+ "name": "transferFrom",
157
+ "outputs": [
158
+ {
159
+ "type": "bool",
160
+ "name": "out"
161
+ }
162
+ ],
163
+ "inputs": [
164
+ {
165
+ "type": "address",
166
+ "name": "_from"
167
+ },
168
+ {
169
+ "type": "address",
170
+ "name": "_to"
171
+ },
172
+ {
173
+ "type": "uint256",
174
+ "name": "_value"
175
+ }
176
+ ],
177
+ "constant": false,
178
+ "payable": false,
179
+ "type": "function",
180
+ "gas": 111953,
181
+ "stateMutability": "nonpayable"
182
+ },
183
+ {
184
+ "name": "approve",
185
+ "outputs": [
186
+ {
187
+ "type": "bool",
188
+ "name": "out"
189
+ }
190
+ ],
191
+ "inputs": [
192
+ {
193
+ "type": "address",
194
+ "name": "_spender"
195
+ },
196
+ {
197
+ "type": "uint256",
198
+ "name": "_value"
199
+ }
200
+ ],
201
+ "constant": false,
202
+ "payable": false,
203
+ "type": "function",
204
+ "gas": 39012,
205
+ "stateMutability": "nonpayable"
206
+ },
207
+ {
208
+ "name": "mint",
209
+ "outputs": [],
210
+ "inputs": [
211
+ {
212
+ "type": "address",
213
+ "name": "_to"
214
+ },
215
+ {
216
+ "type": "uint256",
217
+ "name": "_value"
218
+ }
219
+ ],
220
+ "constant": false,
221
+ "payable": false,
222
+ "type": "function",
223
+ "gas": 75733,
224
+ "stateMutability": "nonpayable"
225
+ },
226
+ {
227
+ "name": "burn",
228
+ "outputs": [],
229
+ "inputs": [
230
+ {
231
+ "type": "uint256",
232
+ "name": "_value"
233
+ }
234
+ ],
235
+ "constant": false,
236
+ "payable": false,
237
+ "type": "function",
238
+ "gas": 76623,
239
+ "stateMutability": "nonpayable"
240
+ },
241
+ {
242
+ "name": "burnFrom",
243
+ "outputs": [],
244
+ "inputs": [
245
+ {
246
+ "type": "address",
247
+ "name": "_to"
248
+ },
249
+ {
250
+ "type": "uint256",
251
+ "name": "_value"
252
+ }
253
+ ],
254
+ "constant": false,
255
+ "payable": false,
256
+ "type": "function",
257
+ "gas": 76696,
258
+ "stateMutability": "nonpayable"
259
+ },
260
+ {
261
+ "name": "name",
262
+ "outputs": [
263
+ {
264
+ "type": "string",
265
+ "name": "out"
266
+ }
267
+ ],
268
+ "inputs": [],
269
+ "constant": true,
270
+ "payable": false,
271
+ "type": "function",
272
+ "gas": 7853,
273
+ "stateMutability": "view"
274
+ },
275
+ {
276
+ "name": "symbol",
277
+ "outputs": [
278
+ {
279
+ "type": "string",
280
+ "name": "out"
281
+ }
282
+ ],
283
+ "inputs": [],
284
+ "constant": true,
285
+ "payable": false,
286
+ "type": "function",
287
+ "gas": 6906,
288
+ "stateMutability": "view"
289
+ },
290
+ {
291
+ "name": "decimals",
292
+ "outputs": [
293
+ {
294
+ "type": "uint256",
295
+ "name": "out"
296
+ }
297
+ ],
298
+ "inputs": [],
299
+ "constant": true,
300
+ "payable": false,
301
+ "type": "function",
302
+ "gas": 1511,
303
+ "stateMutability": "view"
304
+ },
305
+ {
306
+ "name": "balanceOf",
307
+ "outputs": [
308
+ {
309
+ "type": "uint256",
310
+ "name": "out"
311
+ }
312
+ ],
313
+ "inputs": [
314
+ {
315
+ "type": "address",
316
+ "name": "arg0"
317
+ }
318
+ ],
319
+ "constant": true,
320
+ "payable": false,
321
+ "type": "function",
322
+ "gas": 1695,
323
+ "stateMutability": "view"
324
+ }
325
+ ] as const satisfies Abi;
326
+
327
+ /**
328
+ * Type-safe ABI for Vyper_contract
329
+ */
330
+ export type Vyper_contractAbi = typeof Vyper_contractAbi;
331
+
332
+ /**
333
+ * Contract instance type for Vyper_contract
334
+ */
335
+ // Use any for contract type to avoid complex viem type issues
336
+ // The runtime behavior is type-safe through viem's ABI typing
337
+ export type Vyper_contractContract = any;
338
+
339
+ /**
340
+ * Vyper_contract Contract Class
341
+ *
342
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
343
+ *
344
+ * @example
345
+ * ```typescript
346
+ * import { createPublicClient, createWalletClient, http } from 'viem';
347
+ * import { mainnet } from 'viem/chains';
348
+ * import { Vyper_contract } from 'Vyper_contract';
349
+ *
350
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
351
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
352
+ *
353
+ * const contract = new Vyper_contract('0x...', { publicClient, walletClient });
354
+ *
355
+ * // Read functions
356
+ * const result = await contract.balanceOf('0x...');
357
+ *
358
+ * // Write functions
359
+ * const hash = await contract.transfer('0x...', 1000n);
360
+ *
361
+ * // Simulate transactions (dry-run)
362
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
363
+ * console.log('Gas estimate:', simulation.request.gas);
364
+ *
365
+ * // Watch events
366
+ * const unwatch = contract.watch.Transfer((event) => {
367
+ * console.log('Transfer event:', event);
368
+ * });
369
+ * ```
370
+ */
371
+ export class Vyper_contract {
372
+ private contract: Vyper_contractContract;
373
+ private contractAddress: Address;
374
+ private publicClient: PublicClient;
375
+
376
+ constructor(
377
+ address: Address,
378
+ clients: {
379
+ publicClient: PublicClient;
380
+ walletClient?: WalletClient;
381
+ }
382
+ ) {
383
+ this.contractAddress = address;
384
+ this.publicClient = clients.publicClient;
385
+ this.contract = getContract({
386
+ address,
387
+ abi: Vyper_contractAbi,
388
+ client: {
389
+ public: clients.publicClient,
390
+ wallet: clients.walletClient,
391
+ },
392
+ });
393
+ }
394
+
395
+ /**
396
+ * Get the contract address
397
+ */
398
+ get address(): Address {
399
+ return this.contractAddress;
400
+ }
401
+
402
+ /**
403
+ * Get the underlying viem contract instance.
404
+ */
405
+ getContract(): Vyper_contractContract {
406
+ return this.contract;
407
+ }
408
+
409
+ /**
410
+ * totalSupply
411
+ * view
412
+ */
413
+ async totalSupply(): Promise<bigint> {
414
+ return this.contract.read.totalSupply() as Promise<bigint>;
415
+ }
416
+
417
+ /**
418
+ * allowance
419
+ * view
420
+ */
421
+ async allowance(_owner: `0x${string}`, _spender: `0x${string}`): Promise<bigint> {
422
+ return this.contract.read.allowance([_owner, _spender] as const) as Promise<bigint>;
423
+ }
424
+
425
+ /**
426
+ * name
427
+ * view
428
+ */
429
+ async name(): Promise<string> {
430
+ return this.contract.read.name() as Promise<string>;
431
+ }
432
+
433
+ /**
434
+ * symbol
435
+ * view
436
+ */
437
+ async symbol(): Promise<string> {
438
+ return this.contract.read.symbol() as Promise<string>;
439
+ }
440
+
441
+ /**
442
+ * decimals
443
+ * view
444
+ */
445
+ async decimals(): Promise<bigint> {
446
+ return this.contract.read.decimals() as Promise<bigint>;
447
+ }
448
+
449
+ /**
450
+ * balanceOf
451
+ * view
452
+ */
453
+ async balanceOf(arg0: `0x${string}`): Promise<bigint> {
454
+ return this.contract.read.balanceOf([arg0] as const) as Promise<bigint>;
455
+ }
456
+
457
+ /**
458
+ * set_minter
459
+ * nonpayable
460
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
461
+ */
462
+ async set_minter(_minter: `0x${string}`, options?: {
463
+ accessList?: import('viem').AccessList;
464
+ authorizationList?: import('viem').AuthorizationList;
465
+ chain?: import('viem').Chain | null;
466
+ dataSuffix?: `0x${string}`;
467
+ gas?: bigint;
468
+ gasPrice?: bigint;
469
+ maxFeePerGas?: bigint;
470
+ maxPriorityFeePerGas?: bigint;
471
+ nonce?: number;
472
+ value?: bigint;
473
+ }): Promise<`0x${string}`> {
474
+ if (!this.contract.write) {
475
+ throw new Error('Wallet client is required for write operations');
476
+ }
477
+ return this.contract.write.set_minter([_minter] as const, options) as Promise<`0x${string}`>;
478
+ }
479
+
480
+ /**
481
+ * transfer
482
+ * nonpayable
483
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
484
+ */
485
+ async transfer(_to: `0x${string}`, _value: bigint, options?: {
486
+ accessList?: import('viem').AccessList;
487
+ authorizationList?: import('viem').AuthorizationList;
488
+ chain?: import('viem').Chain | null;
489
+ dataSuffix?: `0x${string}`;
490
+ gas?: bigint;
491
+ gasPrice?: bigint;
492
+ maxFeePerGas?: bigint;
493
+ maxPriorityFeePerGas?: bigint;
494
+ nonce?: number;
495
+ value?: bigint;
496
+ }): Promise<`0x${string}`> {
497
+ if (!this.contract.write) {
498
+ throw new Error('Wallet client is required for write operations');
499
+ }
500
+ return this.contract.write.transfer([_to, _value] as const, options) as Promise<`0x${string}`>;
501
+ }
502
+
503
+ /**
504
+ * transferFrom
505
+ * nonpayable
506
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
507
+ */
508
+ async transferFrom(_from: `0x${string}`, _to: `0x${string}`, _value: bigint, options?: {
509
+ accessList?: import('viem').AccessList;
510
+ authorizationList?: import('viem').AuthorizationList;
511
+ chain?: import('viem').Chain | null;
512
+ dataSuffix?: `0x${string}`;
513
+ gas?: bigint;
514
+ gasPrice?: bigint;
515
+ maxFeePerGas?: bigint;
516
+ maxPriorityFeePerGas?: bigint;
517
+ nonce?: number;
518
+ value?: bigint;
519
+ }): Promise<`0x${string}`> {
520
+ if (!this.contract.write) {
521
+ throw new Error('Wallet client is required for write operations');
522
+ }
523
+ return this.contract.write.transferFrom([_from, _to, _value] as const, options) as Promise<`0x${string}`>;
524
+ }
525
+
526
+ /**
527
+ * approve
528
+ * nonpayable
529
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
530
+ */
531
+ async approve(_spender: `0x${string}`, _value: bigint, options?: {
532
+ accessList?: import('viem').AccessList;
533
+ authorizationList?: import('viem').AuthorizationList;
534
+ chain?: import('viem').Chain | null;
535
+ dataSuffix?: `0x${string}`;
536
+ gas?: bigint;
537
+ gasPrice?: bigint;
538
+ maxFeePerGas?: bigint;
539
+ maxPriorityFeePerGas?: bigint;
540
+ nonce?: number;
541
+ value?: bigint;
542
+ }): Promise<`0x${string}`> {
543
+ if (!this.contract.write) {
544
+ throw new Error('Wallet client is required for write operations');
545
+ }
546
+ return this.contract.write.approve([_spender, _value] as const, options) as Promise<`0x${string}`>;
547
+ }
548
+
549
+ /**
550
+ * mint
551
+ * nonpayable
552
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
553
+ */
554
+ async mint(_to: `0x${string}`, _value: bigint, options?: {
555
+ accessList?: import('viem').AccessList;
556
+ authorizationList?: import('viem').AuthorizationList;
557
+ chain?: import('viem').Chain | null;
558
+ dataSuffix?: `0x${string}`;
559
+ gas?: bigint;
560
+ gasPrice?: bigint;
561
+ maxFeePerGas?: bigint;
562
+ maxPriorityFeePerGas?: bigint;
563
+ nonce?: number;
564
+ value?: bigint;
565
+ }): Promise<`0x${string}`> {
566
+ if (!this.contract.write) {
567
+ throw new Error('Wallet client is required for write operations');
568
+ }
569
+ return this.contract.write.mint([_to, _value] as const, options) as Promise<`0x${string}`>;
570
+ }
571
+
572
+ /**
573
+ * burn
574
+ * nonpayable
575
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
576
+ */
577
+ async burn(_value: bigint, options?: {
578
+ accessList?: import('viem').AccessList;
579
+ authorizationList?: import('viem').AuthorizationList;
580
+ chain?: import('viem').Chain | null;
581
+ dataSuffix?: `0x${string}`;
582
+ gas?: bigint;
583
+ gasPrice?: bigint;
584
+ maxFeePerGas?: bigint;
585
+ maxPriorityFeePerGas?: bigint;
586
+ nonce?: number;
587
+ value?: bigint;
588
+ }): Promise<`0x${string}`> {
589
+ if (!this.contract.write) {
590
+ throw new Error('Wallet client is required for write operations');
591
+ }
592
+ return this.contract.write.burn([_value] as const, options) as Promise<`0x${string}`>;
593
+ }
594
+
595
+ /**
596
+ * burnFrom
597
+ * nonpayable
598
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
599
+ */
600
+ async burnFrom(_to: `0x${string}`, _value: bigint, options?: {
601
+ accessList?: import('viem').AccessList;
602
+ authorizationList?: import('viem').AuthorizationList;
603
+ chain?: import('viem').Chain | null;
604
+ dataSuffix?: `0x${string}`;
605
+ gas?: bigint;
606
+ gasPrice?: bigint;
607
+ maxFeePerGas?: bigint;
608
+ maxPriorityFeePerGas?: bigint;
609
+ nonce?: number;
610
+ value?: bigint;
611
+ }): Promise<`0x${string}`> {
612
+ if (!this.contract.write) {
613
+ throw new Error('Wallet client is required for write operations');
614
+ }
615
+ return this.contract.write.burnFrom([_to, _value] as const, options) as Promise<`0x${string}`>;
616
+ }
617
+
618
+
619
+
620
+ /**
621
+ * Simulate contract write operations (dry-run without sending transaction)
622
+ *
623
+ * @example
624
+ * const result = await contract.simulate.transfer('0x...', 1000n);
625
+ * console.log('Gas estimate:', result.request.gas);
626
+ * console.log('Would succeed:', result.result);
627
+ */
628
+ get simulate() {
629
+ const contract = this.contract;
630
+ if (!contract.simulate) {
631
+ throw new Error('Public client is required for simulation');
632
+ }
633
+ return {
634
+ /**
635
+ * Simulate set_minter
636
+ * Returns gas estimate and result without sending transaction
637
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
638
+ */
639
+ async set_minter(_minter: `0x${string}`, options?: {
640
+ accessList?: import('viem').AccessList;
641
+ authorizationList?: import('viem').AuthorizationList;
642
+ chain?: import('viem').Chain | null;
643
+ dataSuffix?: `0x${string}`;
644
+ gas?: bigint;
645
+ gasPrice?: bigint;
646
+ maxFeePerGas?: bigint;
647
+ maxPriorityFeePerGas?: bigint;
648
+ nonce?: number;
649
+ value?: bigint;
650
+ }): Promise<void> {
651
+ return contract.simulate.set_minter([_minter] as const, options) as Promise<void>;
652
+ },
653
+ /**
654
+ * Simulate transfer
655
+ * Returns gas estimate and result without sending transaction
656
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
657
+ */
658
+ async transfer(_to: `0x${string}`, _value: bigint, 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<boolean> {
670
+ return contract.simulate.transfer([_to, _value] as const, options) as Promise<boolean>;
671
+ },
672
+ /**
673
+ * Simulate transferFrom
674
+ * Returns gas estimate and result without sending transaction
675
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
676
+ */
677
+ async transferFrom(_from: `0x${string}`, _to: `0x${string}`, _value: bigint, options?: {
678
+ accessList?: import('viem').AccessList;
679
+ authorizationList?: import('viem').AuthorizationList;
680
+ chain?: import('viem').Chain | null;
681
+ dataSuffix?: `0x${string}`;
682
+ gas?: bigint;
683
+ gasPrice?: bigint;
684
+ maxFeePerGas?: bigint;
685
+ maxPriorityFeePerGas?: bigint;
686
+ nonce?: number;
687
+ value?: bigint;
688
+ }): Promise<boolean> {
689
+ return contract.simulate.transferFrom([_from, _to, _value] as const, options) as Promise<boolean>;
690
+ },
691
+ /**
692
+ * Simulate approve
693
+ * Returns gas estimate and result without sending transaction
694
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
695
+ */
696
+ async approve(_spender: `0x${string}`, _value: 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<boolean> {
708
+ return contract.simulate.approve([_spender, _value] as const, options) as Promise<boolean>;
709
+ },
710
+ /**
711
+ * Simulate mint
712
+ * Returns gas estimate and result without sending transaction
713
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
714
+ */
715
+ async mint(_to: `0x${string}`, _value: bigint, options?: {
716
+ accessList?: import('viem').AccessList;
717
+ authorizationList?: import('viem').AuthorizationList;
718
+ chain?: import('viem').Chain | null;
719
+ dataSuffix?: `0x${string}`;
720
+ gas?: bigint;
721
+ gasPrice?: bigint;
722
+ maxFeePerGas?: bigint;
723
+ maxPriorityFeePerGas?: bigint;
724
+ nonce?: number;
725
+ value?: bigint;
726
+ }): Promise<void> {
727
+ return contract.simulate.mint([_to, _value] as const, options) as Promise<void>;
728
+ },
729
+ /**
730
+ * Simulate burn
731
+ * Returns gas estimate and result without sending transaction
732
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
733
+ */
734
+ async burn(_value: bigint, options?: {
735
+ accessList?: import('viem').AccessList;
736
+ authorizationList?: import('viem').AuthorizationList;
737
+ chain?: import('viem').Chain | null;
738
+ dataSuffix?: `0x${string}`;
739
+ gas?: bigint;
740
+ gasPrice?: bigint;
741
+ maxFeePerGas?: bigint;
742
+ maxPriorityFeePerGas?: bigint;
743
+ nonce?: number;
744
+ value?: bigint;
745
+ }): Promise<void> {
746
+ return contract.simulate.burn([_value] as const, options) as Promise<void>;
747
+ },
748
+ /**
749
+ * Simulate burnFrom
750
+ * Returns gas estimate and result without sending transaction
751
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
752
+ */
753
+ async burnFrom(_to: `0x${string}`, _value: bigint, options?: {
754
+ accessList?: import('viem').AccessList;
755
+ authorizationList?: import('viem').AuthorizationList;
756
+ chain?: import('viem').Chain | null;
757
+ dataSuffix?: `0x${string}`;
758
+ gas?: bigint;
759
+ gasPrice?: bigint;
760
+ maxFeePerGas?: bigint;
761
+ maxPriorityFeePerGas?: bigint;
762
+ nonce?: number;
763
+ value?: bigint;
764
+ }): Promise<void> {
765
+ return contract.simulate.burnFrom([_to, _value] as const, options) as Promise<void>;
766
+ }
767
+ };
768
+ }
769
+
770
+ /**
771
+ * Watch contract events
772
+ *
773
+ * @example
774
+ * // Watch all Transfer events
775
+ * const unwatch = contract.watch.Transfer((event) => {
776
+ * console.log('Transfer:', event);
777
+ * });
778
+ *
779
+ * // Stop watching
780
+ * unwatch();
781
+ */
782
+ get watch() {
783
+ return {
784
+ /**
785
+ * Watch Transfer events
786
+ * @param callback Function to call when event is emitted
787
+ * @param filter Optional filter for indexed parameters
788
+ * @returns Unwatch function to stop listening
789
+ */
790
+ Transfer: (callback: (event: { _from: `0x${string}`; _to: `0x${string}`; _value: bigint }) => void, filter?: { _from?: `0x${string}` | `0x${string}`[] | null; _to?: `0x${string}` | `0x${string}`[] | null }) => {
791
+ return this.publicClient.watchContractEvent({
792
+ address: this.contractAddress,
793
+ abi: Vyper_contractAbi,
794
+ eventName: 'Transfer',
795
+ args: filter as any,
796
+ onLogs: (logs: any[]) => {
797
+ logs.forEach((log: any) => {
798
+ callback(log.args as any);
799
+ });
800
+ },
801
+ }) as () => void;
802
+ },
803
+ /**
804
+ * Watch Approval events
805
+ * @param callback Function to call when event is emitted
806
+ * @param filter Optional filter for indexed parameters
807
+ * @returns Unwatch function to stop listening
808
+ */
809
+ Approval: (callback: (event: { _owner: `0x${string}`; _spender: `0x${string}`; _value: bigint }) => void, filter?: { _owner?: `0x${string}` | `0x${string}`[] | null; _spender?: `0x${string}` | `0x${string}`[] | null }) => {
810
+ return this.publicClient.watchContractEvent({
811
+ address: this.contractAddress,
812
+ abi: Vyper_contractAbi,
813
+ eventName: 'Approval',
814
+ args: filter as any,
815
+ onLogs: (logs: any[]) => {
816
+ logs.forEach((log: any) => {
817
+ callback(log.args as any);
818
+ });
819
+ },
820
+ }) as () => void;
821
+ }
822
+ };
823
+ }
824
+ }