@gitmyabi/dusd 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.
@@ -2,26 +2,16 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
2
2
  import { getContract } from 'viem';
3
3
 
4
4
  /**
5
- * MachineShare_json ABI
5
+ * DigitalUSD ABI
6
6
  *
7
7
  * This ABI is typed using viem's type system for full type safety.
8
8
  */
9
- export const MachineShare_jsonAbi = [
9
+ export const DigitalUSDAbi = [
10
10
  {
11
11
  "inputs": [
12
- {
13
- "internalType": "string",
14
- "name": "_name",
15
- "type": "string"
16
- },
17
- {
18
- "internalType": "string",
19
- "name": "_symbol",
20
- "type": "string"
21
- },
22
12
  {
23
13
  "internalType": "address",
24
- "name": "_initialMinter",
14
+ "name": "initialOwner",
25
15
  "type": "address"
26
16
  }
27
17
  ],
@@ -29,112 +19,58 @@ export const MachineShare_jsonAbi = [
29
19
  "type": "constructor"
30
20
  },
31
21
  {
32
- "inputs": [
33
- {
34
- "internalType": "address",
35
- "name": "spender",
36
- "type": "address"
37
- },
38
- {
39
- "internalType": "uint256",
40
- "name": "allowance",
41
- "type": "uint256"
42
- },
43
- {
44
- "internalType": "uint256",
45
- "name": "needed",
46
- "type": "uint256"
47
- }
48
- ],
49
- "name": "ERC20InsufficientAllowance",
22
+ "inputs": [],
23
+ "name": "AccountIsFrozen",
50
24
  "type": "error"
51
25
  },
52
26
  {
53
- "inputs": [
54
- {
55
- "internalType": "address",
56
- "name": "sender",
57
- "type": "address"
58
- },
59
- {
60
- "internalType": "uint256",
61
- "name": "balance",
62
- "type": "uint256"
63
- },
64
- {
65
- "internalType": "uint256",
66
- "name": "needed",
67
- "type": "uint256"
68
- }
69
- ],
70
- "name": "ERC20InsufficientBalance",
27
+ "inputs": [],
28
+ "name": "CapExceeded",
71
29
  "type": "error"
72
30
  },
73
31
  {
74
- "inputs": [
75
- {
76
- "internalType": "address",
77
- "name": "approver",
78
- "type": "address"
79
- }
80
- ],
81
- "name": "ERC20InvalidApprover",
32
+ "inputs": [],
33
+ "name": "ContractPaused",
82
34
  "type": "error"
83
35
  },
84
36
  {
85
- "inputs": [
86
- {
87
- "internalType": "address",
88
- "name": "receiver",
89
- "type": "address"
90
- }
91
- ],
92
- "name": "ERC20InvalidReceiver",
37
+ "inputs": [],
38
+ "name": "InsufficientAllowance",
93
39
  "type": "error"
94
40
  },
95
41
  {
96
- "inputs": [
97
- {
98
- "internalType": "address",
99
- "name": "sender",
100
- "type": "address"
101
- }
102
- ],
103
- "name": "ERC20InvalidSender",
42
+ "inputs": [],
43
+ "name": "InsufficientBalance",
104
44
  "type": "error"
105
45
  },
106
46
  {
107
- "inputs": [
108
- {
109
- "internalType": "address",
110
- "name": "spender",
111
- "type": "address"
112
- }
113
- ],
114
- "name": "ERC20InvalidSpender",
47
+ "inputs": [],
48
+ "name": "Unauthorized",
115
49
  "type": "error"
116
50
  },
117
51
  {
118
- "inputs": [
119
- {
120
- "internalType": "address",
121
- "name": "owner",
122
- "type": "address"
123
- }
124
- ],
125
- "name": "OwnableInvalidOwner",
52
+ "inputs": [],
53
+ "name": "ZeroAddress",
126
54
  "type": "error"
127
55
  },
128
56
  {
57
+ "anonymous": false,
129
58
  "inputs": [
130
59
  {
60
+ "indexed": true,
131
61
  "internalType": "address",
132
62
  "name": "account",
133
63
  "type": "address"
64
+ },
65
+ {
66
+ "indexed": false,
67
+ "internalType": "bool",
68
+ "name": "frozen",
69
+ "type": "bool"
134
70
  }
135
71
  ],
136
- "name": "OwnableUnauthorizedAccount",
137
- "type": "error"
72
+ "name": "AccountFrozen",
73
+ "type": "event"
138
74
  },
139
75
  {
140
76
  "anonymous": false,
@@ -161,6 +97,25 @@ export const MachineShare_jsonAbi = [
161
97
  "name": "Approval",
162
98
  "type": "event"
163
99
  },
100
+ {
101
+ "anonymous": false,
102
+ "inputs": [
103
+ {
104
+ "indexed": true,
105
+ "internalType": "address",
106
+ "name": "account",
107
+ "type": "address"
108
+ },
109
+ {
110
+ "indexed": false,
111
+ "internalType": "bool",
112
+ "name": "authorized",
113
+ "type": "bool"
114
+ }
115
+ ],
116
+ "name": "MinterUpdated",
117
+ "type": "event"
118
+ },
164
119
  {
165
120
  "anonymous": false,
166
121
  "inputs": [
@@ -173,7 +128,7 @@ export const MachineShare_jsonAbi = [
173
128
  {
174
129
  "indexed": true,
175
130
  "internalType": "address",
176
- "name": "newOwner",
131
+ "name": "pendingOwner",
177
132
  "type": "address"
178
133
  }
179
134
  ],
@@ -199,6 +154,19 @@ export const MachineShare_jsonAbi = [
199
154
  "name": "OwnershipTransferred",
200
155
  "type": "event"
201
156
  },
157
+ {
158
+ "anonymous": false,
159
+ "inputs": [
160
+ {
161
+ "indexed": true,
162
+ "internalType": "address",
163
+ "name": "account",
164
+ "type": "address"
165
+ }
166
+ ],
167
+ "name": "Paused",
168
+ "type": "event"
169
+ },
202
170
  {
203
171
  "anonymous": false,
204
172
  "inputs": [
@@ -224,6 +192,32 @@ export const MachineShare_jsonAbi = [
224
192
  "name": "Transfer",
225
193
  "type": "event"
226
194
  },
195
+ {
196
+ "anonymous": false,
197
+ "inputs": [
198
+ {
199
+ "indexed": true,
200
+ "internalType": "address",
201
+ "name": "account",
202
+ "type": "address"
203
+ }
204
+ ],
205
+ "name": "Unpaused",
206
+ "type": "event"
207
+ },
208
+ {
209
+ "inputs": [],
210
+ "name": "MAX_SUPPLY",
211
+ "outputs": [
212
+ {
213
+ "internalType": "uint256",
214
+ "name": "",
215
+ "type": "uint256"
216
+ }
217
+ ],
218
+ "stateMutability": "view",
219
+ "type": "function"
220
+ },
227
221
  {
228
222
  "inputs": [],
229
223
  "name": "acceptOwnership",
@@ -235,12 +229,12 @@ export const MachineShare_jsonAbi = [
235
229
  "inputs": [
236
230
  {
237
231
  "internalType": "address",
238
- "name": "owner",
232
+ "name": "",
239
233
  "type": "address"
240
234
  },
241
235
  {
242
236
  "internalType": "address",
243
- "name": "spender",
237
+ "name": "",
244
238
  "type": "address"
245
239
  }
246
240
  ],
@@ -283,7 +277,7 @@ export const MachineShare_jsonAbi = [
283
277
  "inputs": [
284
278
  {
285
279
  "internalType": "address",
286
- "name": "account",
280
+ "name": "",
287
281
  "type": "address"
288
282
  }
289
283
  ],
@@ -298,6 +292,25 @@ export const MachineShare_jsonAbi = [
298
292
  "stateMutability": "view",
299
293
  "type": "function"
300
294
  },
295
+ {
296
+ "inputs": [
297
+ {
298
+ "internalType": "uint256",
299
+ "name": "value",
300
+ "type": "uint256"
301
+ }
302
+ ],
303
+ "name": "burn",
304
+ "outputs": [
305
+ {
306
+ "internalType": "bool",
307
+ "name": "",
308
+ "type": "bool"
309
+ }
310
+ ],
311
+ "stateMutability": "nonpayable",
312
+ "type": "function"
313
+ },
301
314
  {
302
315
  "inputs": [
303
316
  {
@@ -307,12 +320,18 @@ export const MachineShare_jsonAbi = [
307
320
  },
308
321
  {
309
322
  "internalType": "uint256",
310
- "name": "amount",
323
+ "name": "value",
311
324
  "type": "uint256"
312
325
  }
313
326
  ],
314
- "name": "burn",
315
- "outputs": [],
327
+ "name": "burnFrom",
328
+ "outputs": [
329
+ {
330
+ "internalType": "bool",
331
+ "name": "",
332
+ "type": "bool"
333
+ }
334
+ ],
316
335
  "stateMutability": "nonpayable",
317
336
  "type": "function"
318
337
  },
@@ -326,7 +345,26 @@ export const MachineShare_jsonAbi = [
326
345
  "type": "uint8"
327
346
  }
328
347
  ],
329
- "stateMutability": "pure",
348
+ "stateMutability": "view",
349
+ "type": "function"
350
+ },
351
+ {
352
+ "inputs": [
353
+ {
354
+ "internalType": "address",
355
+ "name": "",
356
+ "type": "address"
357
+ }
358
+ ],
359
+ "name": "frozen",
360
+ "outputs": [
361
+ {
362
+ "internalType": "bool",
363
+ "name": "",
364
+ "type": "bool"
365
+ }
366
+ ],
367
+ "stateMutability": "view",
330
368
  "type": "function"
331
369
  },
332
370
  {
@@ -338,25 +376,37 @@ export const MachineShare_jsonAbi = [
338
376
  },
339
377
  {
340
378
  "internalType": "uint256",
341
- "name": "amount",
379
+ "name": "value",
342
380
  "type": "uint256"
343
381
  }
344
382
  ],
345
383
  "name": "mint",
346
- "outputs": [],
384
+ "outputs": [
385
+ {
386
+ "internalType": "bool",
387
+ "name": "",
388
+ "type": "bool"
389
+ }
390
+ ],
347
391
  "stateMutability": "nonpayable",
348
392
  "type": "function"
349
393
  },
350
394
  {
351
- "inputs": [],
352
- "name": "minter",
353
- "outputs": [
395
+ "inputs": [
354
396
  {
355
397
  "internalType": "address",
356
398
  "name": "",
357
399
  "type": "address"
358
400
  }
359
401
  ],
402
+ "name": "minters",
403
+ "outputs": [
404
+ {
405
+ "internalType": "bool",
406
+ "name": "",
407
+ "type": "bool"
408
+ }
409
+ ],
360
410
  "stateMutability": "view",
361
411
  "type": "function"
362
412
  },
@@ -386,6 +436,26 @@ export const MachineShare_jsonAbi = [
386
436
  "stateMutability": "view",
387
437
  "type": "function"
388
438
  },
439
+ {
440
+ "inputs": [],
441
+ "name": "pause",
442
+ "outputs": [],
443
+ "stateMutability": "nonpayable",
444
+ "type": "function"
445
+ },
446
+ {
447
+ "inputs": [],
448
+ "name": "paused",
449
+ "outputs": [
450
+ {
451
+ "internalType": "bool",
452
+ "name": "",
453
+ "type": "bool"
454
+ }
455
+ ],
456
+ "stateMutability": "view",
457
+ "type": "function"
458
+ },
389
459
  {
390
460
  "inputs": [],
391
461
  "name": "pendingOwner",
@@ -400,8 +470,37 @@ export const MachineShare_jsonAbi = [
400
470
  "type": "function"
401
471
  },
402
472
  {
403
- "inputs": [],
404
- "name": "renounceOwnership",
473
+ "inputs": [
474
+ {
475
+ "internalType": "address",
476
+ "name": "account",
477
+ "type": "address"
478
+ },
479
+ {
480
+ "internalType": "bool",
481
+ "name": "state",
482
+ "type": "bool"
483
+ }
484
+ ],
485
+ "name": "setFrozen",
486
+ "outputs": [],
487
+ "stateMutability": "nonpayable",
488
+ "type": "function"
489
+ },
490
+ {
491
+ "inputs": [
492
+ {
493
+ "internalType": "address",
494
+ "name": "account",
495
+ "type": "address"
496
+ },
497
+ {
498
+ "internalType": "bool",
499
+ "name": "authorized",
500
+ "type": "bool"
501
+ }
502
+ ],
503
+ "name": "setMinter",
405
504
  "outputs": [],
406
505
  "stateMutability": "nonpayable",
407
506
  "type": "function"
@@ -489,7 +588,7 @@ export const MachineShare_jsonAbi = [
489
588
  "inputs": [
490
589
  {
491
590
  "internalType": "address",
492
- "name": "newOwner",
591
+ "name": "nextOwner",
493
592
  "type": "address"
494
593
  }
495
594
  ],
@@ -497,23 +596,30 @@ export const MachineShare_jsonAbi = [
497
596
  "outputs": [],
498
597
  "stateMutability": "nonpayable",
499
598
  "type": "function"
599
+ },
600
+ {
601
+ "inputs": [],
602
+ "name": "unpause",
603
+ "outputs": [],
604
+ "stateMutability": "nonpayable",
605
+ "type": "function"
500
606
  }
501
607
  ] as const satisfies Abi;
502
608
 
503
609
  /**
504
- * Type-safe ABI for MachineShare_json
610
+ * Type-safe ABI for DigitalUSD
505
611
  */
506
- export type MachineShare_jsonAbi = typeof MachineShare_jsonAbi;
612
+ export type DigitalUSDAbi = typeof DigitalUSDAbi;
507
613
 
508
614
  /**
509
- * Contract instance type for MachineShare_json
615
+ * Contract instance type for DigitalUSD
510
616
  */
511
617
  // Use any for contract type to avoid complex viem type issues
512
618
  // The runtime behavior is type-safe through viem's ABI typing
513
- export type MachineShare_jsonContract = any;
619
+ export type DigitalUSDContract = any;
514
620
 
515
621
  /**
516
- * MachineShare_json Contract Class
622
+ * DigitalUSD Contract Class
517
623
  *
518
624
  * Provides a class-based API similar to TypeChain for interacting with the contract.
519
625
  *
@@ -521,12 +627,12 @@ export type MachineShare_jsonContract = any;
521
627
  * ```typescript
522
628
  * import { createPublicClient, createWalletClient, http } from 'viem';
523
629
  * import { mainnet } from 'viem/chains';
524
- * import { MachineShare_json } from 'MachineShare_json';
630
+ * import { DigitalUSD } from 'DigitalUSD';
525
631
  *
526
632
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
527
633
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
528
634
  *
529
- * const contract = new MachineShare_json('0x...', { publicClient, walletClient });
635
+ * const contract = new DigitalUSD('0x...', { publicClient, walletClient });
530
636
  *
531
637
  * // Read functions
532
638
  * const result = await contract.balanceOf('0x...');
@@ -544,8 +650,8 @@ export type MachineShare_jsonContract = any;
544
650
  * });
545
651
  * ```
546
652
  */
547
- export class MachineShare_json {
548
- private contract: MachineShare_jsonContract;
653
+ export class DigitalUSD {
654
+ private contract: DigitalUSDContract;
549
655
  private contractAddress: Address;
550
656
  private publicClient: PublicClient;
551
657
 
@@ -560,7 +666,7 @@ export class MachineShare_json {
560
666
  this.publicClient = clients.publicClient;
561
667
  this.contract = getContract({
562
668
  address,
563
- abi: MachineShare_jsonAbi,
669
+ abi: DigitalUSDAbi,
564
670
  client: {
565
671
  public: clients.publicClient,
566
672
  wallet: clients.walletClient,
@@ -576,42 +682,58 @@ export class MachineShare_json {
576
682
  }
577
683
 
578
684
  /**
579
- * Get the underlying viem contract instance
685
+ * Get the underlying viem contract instance.
580
686
  */
581
- getContract(): MachineShare_jsonContract {
687
+ getContract(): DigitalUSDContract {
582
688
  return this.contract;
583
689
  }
584
690
 
691
+ /**
692
+ * MAX_SUPPLY
693
+ * view
694
+ */
695
+ async MAX_SUPPLY(): Promise<bigint> {
696
+ return this.contract.read.MAX_SUPPLY() as Promise<bigint>;
697
+ }
698
+
585
699
  /**
586
700
  * allowance
587
701
  * view
588
702
  */
589
- async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
590
- return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
703
+ async allowance(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint> {
704
+ return this.contract.read.allowance([arg0, arg1] as const) as Promise<bigint>;
591
705
  }
592
706
 
593
707
  /**
594
708
  * balanceOf
595
709
  * view
596
710
  */
597
- async balanceOf(account: `0x${string}`): Promise<bigint> {
598
- return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
711
+ async balanceOf(arg0: `0x${string}`): Promise<bigint> {
712
+ return this.contract.read.balanceOf([arg0] as const) as Promise<bigint>;
599
713
  }
600
714
 
601
715
  /**
602
716
  * decimals
603
- * pure
717
+ * view
604
718
  */
605
719
  async decimals(): Promise<bigint> {
606
720
  return this.contract.read.decimals() as Promise<bigint>;
607
721
  }
608
722
 
609
723
  /**
610
- * minter
724
+ * frozen
611
725
  * view
612
726
  */
613
- async minter(): Promise<`0x${string}`> {
614
- return this.contract.read.minter() as Promise<`0x${string}`>;
727
+ async frozen(arg0: `0x${string}`): Promise<boolean> {
728
+ return this.contract.read.frozen([arg0] as const) as Promise<boolean>;
729
+ }
730
+
731
+ /**
732
+ * minters
733
+ * view
734
+ */
735
+ async minters(arg0: `0x${string}`): Promise<boolean> {
736
+ return this.contract.read.minters([arg0] as const) as Promise<boolean>;
615
737
  }
616
738
 
617
739
  /**
@@ -630,6 +752,14 @@ export class MachineShare_json {
630
752
  return this.contract.read.owner() as Promise<`0x${string}`>;
631
753
  }
632
754
 
755
+ /**
756
+ * paused
757
+ * view
758
+ */
759
+ async paused(): Promise<boolean> {
760
+ return this.contract.read.paused() as Promise<boolean>;
761
+ }
762
+
633
763
  /**
634
764
  * pendingOwner
635
765
  * view
@@ -705,7 +835,30 @@ export class MachineShare_json {
705
835
  * nonpayable
706
836
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
707
837
  */
708
- async burn(from: `0x${string}`, amount: bigint, options?: {
838
+ async burn(value: bigint, options?: {
839
+ accessList?: import('viem').AccessList;
840
+ authorizationList?: import('viem').AuthorizationList;
841
+ chain?: import('viem').Chain | null;
842
+ dataSuffix?: `0x${string}`;
843
+ gas?: bigint;
844
+ gasPrice?: bigint;
845
+ maxFeePerGas?: bigint;
846
+ maxPriorityFeePerGas?: bigint;
847
+ nonce?: number;
848
+ value?: bigint;
849
+ }): Promise<`0x${string}`> {
850
+ if (!this.contract.write) {
851
+ throw new Error('Wallet client is required for write operations');
852
+ }
853
+ return this.contract.write.burn([value] as const, options) as Promise<`0x${string}`>;
854
+ }
855
+
856
+ /**
857
+ * burnFrom
858
+ * nonpayable
859
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
860
+ */
861
+ async burnFrom(from: `0x${string}`, value: bigint, options?: {
709
862
  accessList?: import('viem').AccessList;
710
863
  authorizationList?: import('viem').AuthorizationList;
711
864
  chain?: import('viem').Chain | null;
@@ -720,7 +873,7 @@ export class MachineShare_json {
720
873
  if (!this.contract.write) {
721
874
  throw new Error('Wallet client is required for write operations');
722
875
  }
723
- return this.contract.write.burn([from, amount] as const, options) as Promise<`0x${string}`>;
876
+ return this.contract.write.burnFrom([from, value] as const, options) as Promise<`0x${string}`>;
724
877
  }
725
878
 
726
879
  /**
@@ -728,7 +881,7 @@ export class MachineShare_json {
728
881
  * nonpayable
729
882
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
730
883
  */
731
- async mint(to: `0x${string}`, amount: bigint, options?: {
884
+ async mint(to: `0x${string}`, value: bigint, options?: {
732
885
  accessList?: import('viem').AccessList;
733
886
  authorizationList?: import('viem').AuthorizationList;
734
887
  chain?: import('viem').Chain | null;
@@ -743,15 +896,15 @@ export class MachineShare_json {
743
896
  if (!this.contract.write) {
744
897
  throw new Error('Wallet client is required for write operations');
745
898
  }
746
- return this.contract.write.mint([to, amount] as const, options) as Promise<`0x${string}`>;
899
+ return this.contract.write.mint([to, value] as const, options) as Promise<`0x${string}`>;
747
900
  }
748
901
 
749
902
  /**
750
- * renounceOwnership
903
+ * pause
751
904
  * nonpayable
752
905
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
753
906
  */
754
- async renounceOwnership(options?: {
907
+ async pause(options?: {
755
908
  accessList?: import('viem').AccessList;
756
909
  authorizationList?: import('viem').AuthorizationList;
757
910
  chain?: import('viem').Chain | null;
@@ -766,7 +919,53 @@ export class MachineShare_json {
766
919
  if (!this.contract.write) {
767
920
  throw new Error('Wallet client is required for write operations');
768
921
  }
769
- return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
922
+ return this.contract.write.pause(options) as Promise<`0x${string}`>;
923
+ }
924
+
925
+ /**
926
+ * setFrozen
927
+ * nonpayable
928
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
929
+ */
930
+ async setFrozen(account: `0x${string}`, state: boolean, options?: {
931
+ accessList?: import('viem').AccessList;
932
+ authorizationList?: import('viem').AuthorizationList;
933
+ chain?: import('viem').Chain | null;
934
+ dataSuffix?: `0x${string}`;
935
+ gas?: bigint;
936
+ gasPrice?: bigint;
937
+ maxFeePerGas?: bigint;
938
+ maxPriorityFeePerGas?: bigint;
939
+ nonce?: number;
940
+ value?: bigint;
941
+ }): Promise<`0x${string}`> {
942
+ if (!this.contract.write) {
943
+ throw new Error('Wallet client is required for write operations');
944
+ }
945
+ return this.contract.write.setFrozen([account, state] as const, options) as Promise<`0x${string}`>;
946
+ }
947
+
948
+ /**
949
+ * setMinter
950
+ * nonpayable
951
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
952
+ */
953
+ async setMinter(account: `0x${string}`, authorized: boolean, options?: {
954
+ accessList?: import('viem').AccessList;
955
+ authorizationList?: import('viem').AuthorizationList;
956
+ chain?: import('viem').Chain | null;
957
+ dataSuffix?: `0x${string}`;
958
+ gas?: bigint;
959
+ gasPrice?: bigint;
960
+ maxFeePerGas?: bigint;
961
+ maxPriorityFeePerGas?: bigint;
962
+ nonce?: number;
963
+ value?: bigint;
964
+ }): Promise<`0x${string}`> {
965
+ if (!this.contract.write) {
966
+ throw new Error('Wallet client is required for write operations');
967
+ }
968
+ return this.contract.write.setMinter([account, authorized] as const, options) as Promise<`0x${string}`>;
770
969
  }
771
970
 
772
971
  /**
@@ -820,7 +1019,30 @@ export class MachineShare_json {
820
1019
  * nonpayable
821
1020
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
822
1021
  */
823
- async transferOwnership(newOwner: `0x${string}`, options?: {
1022
+ async transferOwnership(nextOwner: `0x${string}`, options?: {
1023
+ accessList?: import('viem').AccessList;
1024
+ authorizationList?: import('viem').AuthorizationList;
1025
+ chain?: import('viem').Chain | null;
1026
+ dataSuffix?: `0x${string}`;
1027
+ gas?: bigint;
1028
+ gasPrice?: bigint;
1029
+ maxFeePerGas?: bigint;
1030
+ maxPriorityFeePerGas?: bigint;
1031
+ nonce?: number;
1032
+ value?: bigint;
1033
+ }): Promise<`0x${string}`> {
1034
+ if (!this.contract.write) {
1035
+ throw new Error('Wallet client is required for write operations');
1036
+ }
1037
+ return this.contract.write.transferOwnership([nextOwner] as const, options) as Promise<`0x${string}`>;
1038
+ }
1039
+
1040
+ /**
1041
+ * unpause
1042
+ * nonpayable
1043
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1044
+ */
1045
+ async unpause(options?: {
824
1046
  accessList?: import('viem').AccessList;
825
1047
  authorizationList?: import('viem').AuthorizationList;
826
1048
  chain?: import('viem').Chain | null;
@@ -835,7 +1057,7 @@ export class MachineShare_json {
835
1057
  if (!this.contract.write) {
836
1058
  throw new Error('Wallet client is required for write operations');
837
1059
  }
838
- return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
1060
+ return this.contract.write.unpause(options) as Promise<`0x${string}`>;
839
1061
  }
840
1062
 
841
1063
 
@@ -897,7 +1119,7 @@ export class MachineShare_json {
897
1119
  * Returns gas estimate and result without sending transaction
898
1120
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
899
1121
  */
900
- async burn(from: `0x${string}`, amount: bigint, options?: {
1122
+ async burn(value: bigint, options?: {
901
1123
  accessList?: import('viem').AccessList;
902
1124
  authorizationList?: import('viem').AuthorizationList;
903
1125
  chain?: import('viem').Chain | null;
@@ -908,15 +1130,72 @@ export class MachineShare_json {
908
1130
  maxPriorityFeePerGas?: bigint;
909
1131
  nonce?: number;
910
1132
  value?: bigint;
911
- }): Promise<void> {
912
- return contract.simulate.burn([from, amount] as const, options) as Promise<void>;
1133
+ }): Promise<boolean> {
1134
+ return contract.simulate.burn([value] as const, options) as Promise<boolean>;
1135
+ },
1136
+ /**
1137
+ * Simulate burnFrom
1138
+ * Returns gas estimate and result without sending transaction
1139
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1140
+ */
1141
+ async burnFrom(from: `0x${string}`, value: bigint, options?: {
1142
+ accessList?: import('viem').AccessList;
1143
+ authorizationList?: import('viem').AuthorizationList;
1144
+ chain?: import('viem').Chain | null;
1145
+ dataSuffix?: `0x${string}`;
1146
+ gas?: bigint;
1147
+ gasPrice?: bigint;
1148
+ maxFeePerGas?: bigint;
1149
+ maxPriorityFeePerGas?: bigint;
1150
+ nonce?: number;
1151
+ value?: bigint;
1152
+ }): Promise<boolean> {
1153
+ return contract.simulate.burnFrom([from, value] as const, options) as Promise<boolean>;
913
1154
  },
914
1155
  /**
915
1156
  * Simulate mint
916
1157
  * Returns gas estimate and result without sending transaction
917
1158
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
918
1159
  */
919
- async mint(to: `0x${string}`, amount: bigint, options?: {
1160
+ async mint(to: `0x${string}`, value: bigint, options?: {
1161
+ accessList?: import('viem').AccessList;
1162
+ authorizationList?: import('viem').AuthorizationList;
1163
+ chain?: import('viem').Chain | null;
1164
+ dataSuffix?: `0x${string}`;
1165
+ gas?: bigint;
1166
+ gasPrice?: bigint;
1167
+ maxFeePerGas?: bigint;
1168
+ maxPriorityFeePerGas?: bigint;
1169
+ nonce?: number;
1170
+ value?: bigint;
1171
+ }): Promise<boolean> {
1172
+ return contract.simulate.mint([to, value] as const, options) as Promise<boolean>;
1173
+ },
1174
+ /**
1175
+ * Simulate pause
1176
+ * Returns gas estimate and result without sending transaction
1177
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1178
+ */
1179
+ async pause(options?: {
1180
+ accessList?: import('viem').AccessList;
1181
+ authorizationList?: import('viem').AuthorizationList;
1182
+ chain?: import('viem').Chain | null;
1183
+ dataSuffix?: `0x${string}`;
1184
+ gas?: bigint;
1185
+ gasPrice?: bigint;
1186
+ maxFeePerGas?: bigint;
1187
+ maxPriorityFeePerGas?: bigint;
1188
+ nonce?: number;
1189
+ value?: bigint;
1190
+ }): Promise<void> {
1191
+ return contract.simulate.pause(options) as Promise<void>;
1192
+ },
1193
+ /**
1194
+ * Simulate setFrozen
1195
+ * Returns gas estimate and result without sending transaction
1196
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1197
+ */
1198
+ async setFrozen(account: `0x${string}`, state: boolean, options?: {
920
1199
  accessList?: import('viem').AccessList;
921
1200
  authorizationList?: import('viem').AuthorizationList;
922
1201
  chain?: import('viem').Chain | null;
@@ -928,14 +1207,14 @@ export class MachineShare_json {
928
1207
  nonce?: number;
929
1208
  value?: bigint;
930
1209
  }): Promise<void> {
931
- return contract.simulate.mint([to, amount] as const, options) as Promise<void>;
1210
+ return contract.simulate.setFrozen([account, state] as const, options) as Promise<void>;
932
1211
  },
933
1212
  /**
934
- * Simulate renounceOwnership
1213
+ * Simulate setMinter
935
1214
  * Returns gas estimate and result without sending transaction
936
1215
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
937
1216
  */
938
- async renounceOwnership(options?: {
1217
+ async setMinter(account: `0x${string}`, authorized: boolean, options?: {
939
1218
  accessList?: import('viem').AccessList;
940
1219
  authorizationList?: import('viem').AuthorizationList;
941
1220
  chain?: import('viem').Chain | null;
@@ -947,7 +1226,7 @@ export class MachineShare_json {
947
1226
  nonce?: number;
948
1227
  value?: bigint;
949
1228
  }): Promise<void> {
950
- return contract.simulate.renounceOwnership(options) as Promise<void>;
1229
+ return contract.simulate.setMinter([account, authorized] as const, options) as Promise<void>;
951
1230
  },
952
1231
  /**
953
1232
  * Simulate transfer
@@ -992,7 +1271,26 @@ export class MachineShare_json {
992
1271
  * Returns gas estimate and result without sending transaction
993
1272
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
994
1273
  */
995
- async transferOwnership(newOwner: `0x${string}`, options?: {
1274
+ async transferOwnership(nextOwner: `0x${string}`, options?: {
1275
+ accessList?: import('viem').AccessList;
1276
+ authorizationList?: import('viem').AuthorizationList;
1277
+ chain?: import('viem').Chain | null;
1278
+ dataSuffix?: `0x${string}`;
1279
+ gas?: bigint;
1280
+ gasPrice?: bigint;
1281
+ maxFeePerGas?: bigint;
1282
+ maxPriorityFeePerGas?: bigint;
1283
+ nonce?: number;
1284
+ value?: bigint;
1285
+ }): Promise<void> {
1286
+ return contract.simulate.transferOwnership([nextOwner] as const, options) as Promise<void>;
1287
+ },
1288
+ /**
1289
+ * Simulate unpause
1290
+ * Returns gas estimate and result without sending transaction
1291
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1292
+ */
1293
+ async unpause(options?: {
996
1294
  accessList?: import('viem').AccessList;
997
1295
  authorizationList?: import('viem').AuthorizationList;
998
1296
  chain?: import('viem').Chain | null;
@@ -1004,7 +1302,7 @@ export class MachineShare_json {
1004
1302
  nonce?: number;
1005
1303
  value?: bigint;
1006
1304
  }): Promise<void> {
1007
- return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
1305
+ return contract.simulate.unpause(options) as Promise<void>;
1008
1306
  }
1009
1307
  };
1010
1308
  }
@@ -1023,18 +1321,56 @@ export class MachineShare_json {
1023
1321
  */
1024
1322
  get watch() {
1025
1323
  return {
1324
+ /**
1325
+ * Watch AccountFrozen events
1326
+ * @param callback Function to call when event is emitted
1327
+ * @param filter Optional filter for indexed parameters
1328
+ * @returns Unwatch function to stop listening
1329
+ */
1330
+ AccountFrozen: (callback: (event: { account: `0x${string}`; frozen: boolean }) => void, filter?: { account?: `0x${string}` | `0x${string}`[] | null }) => {
1331
+ return this.publicClient.watchContractEvent({
1332
+ address: this.contractAddress,
1333
+ abi: DigitalUSDAbi,
1334
+ eventName: 'AccountFrozen',
1335
+ args: filter as any,
1336
+ onLogs: (logs: any[]) => {
1337
+ logs.forEach((log: any) => {
1338
+ callback(log.args as any);
1339
+ });
1340
+ },
1341
+ }) as () => void;
1342
+ },
1026
1343
  /**
1027
1344
  * Watch Approval events
1028
1345
  * @param callback Function to call when event is emitted
1029
1346
  * @param filter Optional filter for indexed parameters
1030
1347
  * @returns Unwatch function to stop listening
1031
1348
  */
1032
- Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
1349
+ 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 }) => {
1033
1350
  return this.publicClient.watchContractEvent({
1034
1351
  address: this.contractAddress,
1035
- abi: MachineShare_jsonAbi,
1352
+ abi: DigitalUSDAbi,
1036
1353
  eventName: 'Approval',
1037
- args: filter,
1354
+ args: filter as any,
1355
+ onLogs: (logs: any[]) => {
1356
+ logs.forEach((log: any) => {
1357
+ callback(log.args as any);
1358
+ });
1359
+ },
1360
+ }) as () => void;
1361
+ },
1362
+ /**
1363
+ * Watch MinterUpdated events
1364
+ * @param callback Function to call when event is emitted
1365
+ * @param filter Optional filter for indexed parameters
1366
+ * @returns Unwatch function to stop listening
1367
+ */
1368
+ MinterUpdated: (callback: (event: { account: `0x${string}`; authorized: boolean }) => void, filter?: { account?: `0x${string}` | `0x${string}`[] | null }) => {
1369
+ return this.publicClient.watchContractEvent({
1370
+ address: this.contractAddress,
1371
+ abi: DigitalUSDAbi,
1372
+ eventName: 'MinterUpdated',
1373
+ args: filter as any,
1038
1374
  onLogs: (logs: any[]) => {
1039
1375
  logs.forEach((log: any) => {
1040
1376
  callback(log.args as any);
@@ -1048,12 +1384,12 @@ export class MachineShare_json {
1048
1384
  * @param filter Optional filter for indexed parameters
1049
1385
  * @returns Unwatch function to stop listening
1050
1386
  */
1051
- OwnershipTransferStarted: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
1387
+ OwnershipTransferStarted: (callback: (event: { previousOwner: `0x${string}`; pendingOwner: `0x${string}` }) => void, filter?: { previousOwner?: `0x${string}` | `0x${string}`[] | null; pendingOwner?: `0x${string}` | `0x${string}`[] | null }) => {
1052
1388
  return this.publicClient.watchContractEvent({
1053
1389
  address: this.contractAddress,
1054
- abi: MachineShare_jsonAbi,
1390
+ abi: DigitalUSDAbi,
1055
1391
  eventName: 'OwnershipTransferStarted',
1056
- args: filter,
1392
+ args: filter as any,
1057
1393
  onLogs: (logs: any[]) => {
1058
1394
  logs.forEach((log: any) => {
1059
1395
  callback(log.args as any);
@@ -1067,12 +1403,31 @@ export class MachineShare_json {
1067
1403
  * @param filter Optional filter for indexed parameters
1068
1404
  * @returns Unwatch function to stop listening
1069
1405
  */
1070
- OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
1406
+ OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner?: `0x${string}` | `0x${string}`[] | null; newOwner?: `0x${string}` | `0x${string}`[] | null }) => {
1071
1407
  return this.publicClient.watchContractEvent({
1072
1408
  address: this.contractAddress,
1073
- abi: MachineShare_jsonAbi,
1409
+ abi: DigitalUSDAbi,
1074
1410
  eventName: 'OwnershipTransferred',
1075
- args: filter,
1411
+ args: filter as any,
1412
+ onLogs: (logs: any[]) => {
1413
+ logs.forEach((log: any) => {
1414
+ callback(log.args as any);
1415
+ });
1416
+ },
1417
+ }) as () => void;
1418
+ },
1419
+ /**
1420
+ * Watch Paused events
1421
+ * @param callback Function to call when event is emitted
1422
+ * @param filter Optional filter for indexed parameters
1423
+ * @returns Unwatch function to stop listening
1424
+ */
1425
+ Paused: (callback: (event: { account: `0x${string}` }) => void, filter?: { account?: `0x${string}` | `0x${string}`[] | null }) => {
1426
+ return this.publicClient.watchContractEvent({
1427
+ address: this.contractAddress,
1428
+ abi: DigitalUSDAbi,
1429
+ eventName: 'Paused',
1430
+ args: filter as any,
1076
1431
  onLogs: (logs: any[]) => {
1077
1432
  logs.forEach((log: any) => {
1078
1433
  callback(log.args as any);
@@ -1086,12 +1441,31 @@ export class MachineShare_json {
1086
1441
  * @param filter Optional filter for indexed parameters
1087
1442
  * @returns Unwatch function to stop listening
1088
1443
  */
1089
- Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
1444
+ 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 }) => {
1090
1445
  return this.publicClient.watchContractEvent({
1091
1446
  address: this.contractAddress,
1092
- abi: MachineShare_jsonAbi,
1447
+ abi: DigitalUSDAbi,
1093
1448
  eventName: 'Transfer',
1094
- args: filter,
1449
+ args: filter as any,
1450
+ onLogs: (logs: any[]) => {
1451
+ logs.forEach((log: any) => {
1452
+ callback(log.args as any);
1453
+ });
1454
+ },
1455
+ }) as () => void;
1456
+ },
1457
+ /**
1458
+ * Watch Unpaused events
1459
+ * @param callback Function to call when event is emitted
1460
+ * @param filter Optional filter for indexed parameters
1461
+ * @returns Unwatch function to stop listening
1462
+ */
1463
+ Unpaused: (callback: (event: { account: `0x${string}` }) => void, filter?: { account?: `0x${string}` | `0x${string}`[] | null }) => {
1464
+ return this.publicClient.watchContractEvent({
1465
+ address: this.contractAddress,
1466
+ abi: DigitalUSDAbi,
1467
+ eventName: 'Unpaused',
1468
+ args: filter as any,
1095
1469
  onLogs: (logs: any[]) => {
1096
1470
  logs.forEach((log: any) => {
1097
1471
  callback(log.args as any);