@gitmyabi/universalprofileinit 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,1477 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * UniversalProfileInit_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const UniversalProfileInit_jsonAbi = [
10
+ {
11
+ "inputs": [],
12
+ "stateMutability": "nonpayable",
13
+ "type": "constructor"
14
+ },
15
+ {
16
+ "inputs": [],
17
+ "name": "ERC725X_ContractDeploymentFailed",
18
+ "type": "error"
19
+ },
20
+ {
21
+ "inputs": [],
22
+ "name": "ERC725X_CreateOperationsRequireEmptyRecipientAddress",
23
+ "type": "error"
24
+ },
25
+ {
26
+ "inputs": [],
27
+ "name": "ERC725X_ExecuteParametersEmptyArray",
28
+ "type": "error"
29
+ },
30
+ {
31
+ "inputs": [],
32
+ "name": "ERC725X_ExecuteParametersLengthMismatch",
33
+ "type": "error"
34
+ },
35
+ {
36
+ "inputs": [
37
+ {
38
+ "internalType": "uint256",
39
+ "name": "balance",
40
+ "type": "uint256"
41
+ },
42
+ {
43
+ "internalType": "uint256",
44
+ "name": "value",
45
+ "type": "uint256"
46
+ }
47
+ ],
48
+ "name": "ERC725X_InsufficientBalance",
49
+ "type": "error"
50
+ },
51
+ {
52
+ "inputs": [],
53
+ "name": "ERC725X_MsgValueDisallowedInDelegateCall",
54
+ "type": "error"
55
+ },
56
+ {
57
+ "inputs": [],
58
+ "name": "ERC725X_MsgValueDisallowedInStaticCall",
59
+ "type": "error"
60
+ },
61
+ {
62
+ "inputs": [],
63
+ "name": "ERC725X_NoContractBytecodeProvided",
64
+ "type": "error"
65
+ },
66
+ {
67
+ "inputs": [
68
+ {
69
+ "internalType": "uint256",
70
+ "name": "operationTypeProvided",
71
+ "type": "uint256"
72
+ }
73
+ ],
74
+ "name": "ERC725X_UnknownOperationType",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "inputs": [],
79
+ "name": "ERC725Y_DataKeysValuesEmptyArray",
80
+ "type": "error"
81
+ },
82
+ {
83
+ "inputs": [],
84
+ "name": "ERC725Y_DataKeysValuesLengthMismatch",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "inputs": [
89
+ {
90
+ "internalType": "address",
91
+ "name": "caller",
92
+ "type": "address"
93
+ }
94
+ ],
95
+ "name": "LSP14CallerNotPendingOwner",
96
+ "type": "error"
97
+ },
98
+ {
99
+ "inputs": [],
100
+ "name": "LSP14CannotTransferOwnershipToSelf",
101
+ "type": "error"
102
+ },
103
+ {
104
+ "inputs": [],
105
+ "name": "LSP14MustAcceptOwnershipInSeparateTransaction",
106
+ "type": "error"
107
+ },
108
+ {
109
+ "inputs": [
110
+ {
111
+ "internalType": "uint256",
112
+ "name": "renounceOwnershipStart",
113
+ "type": "uint256"
114
+ },
115
+ {
116
+ "internalType": "uint256",
117
+ "name": "renounceOwnershipEnd",
118
+ "type": "uint256"
119
+ }
120
+ ],
121
+ "name": "LSP14NotInRenounceOwnershipInterval",
122
+ "type": "error"
123
+ },
124
+ {
125
+ "inputs": [
126
+ {
127
+ "internalType": "bool",
128
+ "name": "postCall",
129
+ "type": "bool"
130
+ },
131
+ {
132
+ "internalType": "bytes4",
133
+ "name": "returnedStatus",
134
+ "type": "bytes4"
135
+ }
136
+ ],
137
+ "name": "LSP20CallVerificationFailed",
138
+ "type": "error"
139
+ },
140
+ {
141
+ "inputs": [
142
+ {
143
+ "internalType": "bool",
144
+ "name": "postCall",
145
+ "type": "bool"
146
+ }
147
+ ],
148
+ "name": "LSP20CallingVerifierFailed",
149
+ "type": "error"
150
+ },
151
+ {
152
+ "inputs": [
153
+ {
154
+ "internalType": "address",
155
+ "name": "logicVerifier",
156
+ "type": "address"
157
+ }
158
+ ],
159
+ "name": "LSP20EOACannotVerifyCall",
160
+ "type": "error"
161
+ },
162
+ {
163
+ "inputs": [
164
+ {
165
+ "internalType": "bytes4",
166
+ "name": "functionSelector",
167
+ "type": "bytes4"
168
+ }
169
+ ],
170
+ "name": "NoExtensionFoundForFunctionSelector",
171
+ "type": "error"
172
+ },
173
+ {
174
+ "anonymous": false,
175
+ "inputs": [
176
+ {
177
+ "indexed": true,
178
+ "internalType": "uint256",
179
+ "name": "operationType",
180
+ "type": "uint256"
181
+ },
182
+ {
183
+ "indexed": true,
184
+ "internalType": "address",
185
+ "name": "contractAddress",
186
+ "type": "address"
187
+ },
188
+ {
189
+ "indexed": false,
190
+ "internalType": "uint256",
191
+ "name": "value",
192
+ "type": "uint256"
193
+ },
194
+ {
195
+ "indexed": true,
196
+ "internalType": "bytes32",
197
+ "name": "salt",
198
+ "type": "bytes32"
199
+ }
200
+ ],
201
+ "name": "ContractCreated",
202
+ "type": "event"
203
+ },
204
+ {
205
+ "anonymous": false,
206
+ "inputs": [
207
+ {
208
+ "indexed": true,
209
+ "internalType": "bytes32",
210
+ "name": "dataKey",
211
+ "type": "bytes32"
212
+ },
213
+ {
214
+ "indexed": false,
215
+ "internalType": "bytes",
216
+ "name": "dataValue",
217
+ "type": "bytes"
218
+ }
219
+ ],
220
+ "name": "DataChanged",
221
+ "type": "event"
222
+ },
223
+ {
224
+ "anonymous": false,
225
+ "inputs": [
226
+ {
227
+ "indexed": true,
228
+ "internalType": "uint256",
229
+ "name": "operationType",
230
+ "type": "uint256"
231
+ },
232
+ {
233
+ "indexed": true,
234
+ "internalType": "address",
235
+ "name": "target",
236
+ "type": "address"
237
+ },
238
+ {
239
+ "indexed": false,
240
+ "internalType": "uint256",
241
+ "name": "value",
242
+ "type": "uint256"
243
+ },
244
+ {
245
+ "indexed": true,
246
+ "internalType": "bytes4",
247
+ "name": "selector",
248
+ "type": "bytes4"
249
+ }
250
+ ],
251
+ "name": "Executed",
252
+ "type": "event"
253
+ },
254
+ {
255
+ "anonymous": false,
256
+ "inputs": [
257
+ {
258
+ "indexed": false,
259
+ "internalType": "uint8",
260
+ "name": "version",
261
+ "type": "uint8"
262
+ }
263
+ ],
264
+ "name": "Initialized",
265
+ "type": "event"
266
+ },
267
+ {
268
+ "anonymous": false,
269
+ "inputs": [],
270
+ "name": "OwnershipRenounced",
271
+ "type": "event"
272
+ },
273
+ {
274
+ "anonymous": false,
275
+ "inputs": [
276
+ {
277
+ "indexed": true,
278
+ "internalType": "address",
279
+ "name": "previousOwner",
280
+ "type": "address"
281
+ },
282
+ {
283
+ "indexed": true,
284
+ "internalType": "address",
285
+ "name": "newOwner",
286
+ "type": "address"
287
+ }
288
+ ],
289
+ "name": "OwnershipTransferStarted",
290
+ "type": "event"
291
+ },
292
+ {
293
+ "anonymous": false,
294
+ "inputs": [
295
+ {
296
+ "indexed": true,
297
+ "internalType": "address",
298
+ "name": "previousOwner",
299
+ "type": "address"
300
+ },
301
+ {
302
+ "indexed": true,
303
+ "internalType": "address",
304
+ "name": "newOwner",
305
+ "type": "address"
306
+ }
307
+ ],
308
+ "name": "OwnershipTransferred",
309
+ "type": "event"
310
+ },
311
+ {
312
+ "anonymous": false,
313
+ "inputs": [],
314
+ "name": "RenounceOwnershipStarted",
315
+ "type": "event"
316
+ },
317
+ {
318
+ "anonymous": false,
319
+ "inputs": [
320
+ {
321
+ "indexed": true,
322
+ "internalType": "address",
323
+ "name": "from",
324
+ "type": "address"
325
+ },
326
+ {
327
+ "indexed": true,
328
+ "internalType": "uint256",
329
+ "name": "value",
330
+ "type": "uint256"
331
+ },
332
+ {
333
+ "indexed": true,
334
+ "internalType": "bytes32",
335
+ "name": "typeId",
336
+ "type": "bytes32"
337
+ },
338
+ {
339
+ "indexed": false,
340
+ "internalType": "bytes",
341
+ "name": "receivedData",
342
+ "type": "bytes"
343
+ },
344
+ {
345
+ "indexed": false,
346
+ "internalType": "bytes",
347
+ "name": "returnedValue",
348
+ "type": "bytes"
349
+ }
350
+ ],
351
+ "name": "UniversalReceiver",
352
+ "type": "event"
353
+ },
354
+ {
355
+ "stateMutability": "payable",
356
+ "type": "fallback"
357
+ },
358
+ {
359
+ "inputs": [],
360
+ "name": "RENOUNCE_OWNERSHIP_CONFIRMATION_DELAY",
361
+ "outputs": [
362
+ {
363
+ "internalType": "uint256",
364
+ "name": "",
365
+ "type": "uint256"
366
+ }
367
+ ],
368
+ "stateMutability": "view",
369
+ "type": "function"
370
+ },
371
+ {
372
+ "inputs": [],
373
+ "name": "RENOUNCE_OWNERSHIP_CONFIRMATION_PERIOD",
374
+ "outputs": [
375
+ {
376
+ "internalType": "uint256",
377
+ "name": "",
378
+ "type": "uint256"
379
+ }
380
+ ],
381
+ "stateMutability": "view",
382
+ "type": "function"
383
+ },
384
+ {
385
+ "inputs": [],
386
+ "name": "VERSION",
387
+ "outputs": [
388
+ {
389
+ "internalType": "string",
390
+ "name": "",
391
+ "type": "string"
392
+ }
393
+ ],
394
+ "stateMutability": "view",
395
+ "type": "function"
396
+ },
397
+ {
398
+ "inputs": [],
399
+ "name": "acceptOwnership",
400
+ "outputs": [],
401
+ "stateMutability": "nonpayable",
402
+ "type": "function"
403
+ },
404
+ {
405
+ "inputs": [
406
+ {
407
+ "internalType": "bytes[]",
408
+ "name": "data",
409
+ "type": "bytes[]"
410
+ }
411
+ ],
412
+ "name": "batchCalls",
413
+ "outputs": [
414
+ {
415
+ "internalType": "bytes[]",
416
+ "name": "results",
417
+ "type": "bytes[]"
418
+ }
419
+ ],
420
+ "stateMutability": "nonpayable",
421
+ "type": "function"
422
+ },
423
+ {
424
+ "inputs": [
425
+ {
426
+ "internalType": "uint256",
427
+ "name": "operationType",
428
+ "type": "uint256"
429
+ },
430
+ {
431
+ "internalType": "address",
432
+ "name": "target",
433
+ "type": "address"
434
+ },
435
+ {
436
+ "internalType": "uint256",
437
+ "name": "value",
438
+ "type": "uint256"
439
+ },
440
+ {
441
+ "internalType": "bytes",
442
+ "name": "data",
443
+ "type": "bytes"
444
+ }
445
+ ],
446
+ "name": "execute",
447
+ "outputs": [
448
+ {
449
+ "internalType": "bytes",
450
+ "name": "",
451
+ "type": "bytes"
452
+ }
453
+ ],
454
+ "stateMutability": "payable",
455
+ "type": "function"
456
+ },
457
+ {
458
+ "inputs": [
459
+ {
460
+ "internalType": "uint256[]",
461
+ "name": "operationsType",
462
+ "type": "uint256[]"
463
+ },
464
+ {
465
+ "internalType": "address[]",
466
+ "name": "targets",
467
+ "type": "address[]"
468
+ },
469
+ {
470
+ "internalType": "uint256[]",
471
+ "name": "values",
472
+ "type": "uint256[]"
473
+ },
474
+ {
475
+ "internalType": "bytes[]",
476
+ "name": "datas",
477
+ "type": "bytes[]"
478
+ }
479
+ ],
480
+ "name": "executeBatch",
481
+ "outputs": [
482
+ {
483
+ "internalType": "bytes[]",
484
+ "name": "",
485
+ "type": "bytes[]"
486
+ }
487
+ ],
488
+ "stateMutability": "payable",
489
+ "type": "function"
490
+ },
491
+ {
492
+ "inputs": [
493
+ {
494
+ "internalType": "bytes32",
495
+ "name": "dataKey",
496
+ "type": "bytes32"
497
+ }
498
+ ],
499
+ "name": "getData",
500
+ "outputs": [
501
+ {
502
+ "internalType": "bytes",
503
+ "name": "dataValue",
504
+ "type": "bytes"
505
+ }
506
+ ],
507
+ "stateMutability": "view",
508
+ "type": "function"
509
+ },
510
+ {
511
+ "inputs": [
512
+ {
513
+ "internalType": "bytes32[]",
514
+ "name": "dataKeys",
515
+ "type": "bytes32[]"
516
+ }
517
+ ],
518
+ "name": "getDataBatch",
519
+ "outputs": [
520
+ {
521
+ "internalType": "bytes[]",
522
+ "name": "dataValues",
523
+ "type": "bytes[]"
524
+ }
525
+ ],
526
+ "stateMutability": "view",
527
+ "type": "function"
528
+ },
529
+ {
530
+ "inputs": [
531
+ {
532
+ "internalType": "address",
533
+ "name": "initialOwner",
534
+ "type": "address"
535
+ }
536
+ ],
537
+ "name": "initialize",
538
+ "outputs": [],
539
+ "stateMutability": "payable",
540
+ "type": "function"
541
+ },
542
+ {
543
+ "inputs": [
544
+ {
545
+ "internalType": "bytes32",
546
+ "name": "dataHash",
547
+ "type": "bytes32"
548
+ },
549
+ {
550
+ "internalType": "bytes",
551
+ "name": "signature",
552
+ "type": "bytes"
553
+ }
554
+ ],
555
+ "name": "isValidSignature",
556
+ "outputs": [
557
+ {
558
+ "internalType": "bytes4",
559
+ "name": "returnedStatus",
560
+ "type": "bytes4"
561
+ }
562
+ ],
563
+ "stateMutability": "view",
564
+ "type": "function"
565
+ },
566
+ {
567
+ "inputs": [],
568
+ "name": "owner",
569
+ "outputs": [
570
+ {
571
+ "internalType": "address",
572
+ "name": "",
573
+ "type": "address"
574
+ }
575
+ ],
576
+ "stateMutability": "view",
577
+ "type": "function"
578
+ },
579
+ {
580
+ "inputs": [],
581
+ "name": "pendingOwner",
582
+ "outputs": [
583
+ {
584
+ "internalType": "address",
585
+ "name": "",
586
+ "type": "address"
587
+ }
588
+ ],
589
+ "stateMutability": "view",
590
+ "type": "function"
591
+ },
592
+ {
593
+ "inputs": [],
594
+ "name": "renounceOwnership",
595
+ "outputs": [],
596
+ "stateMutability": "nonpayable",
597
+ "type": "function"
598
+ },
599
+ {
600
+ "inputs": [
601
+ {
602
+ "internalType": "bytes32",
603
+ "name": "dataKey",
604
+ "type": "bytes32"
605
+ },
606
+ {
607
+ "internalType": "bytes",
608
+ "name": "dataValue",
609
+ "type": "bytes"
610
+ }
611
+ ],
612
+ "name": "setData",
613
+ "outputs": [],
614
+ "stateMutability": "payable",
615
+ "type": "function"
616
+ },
617
+ {
618
+ "inputs": [
619
+ {
620
+ "internalType": "bytes32[]",
621
+ "name": "dataKeys",
622
+ "type": "bytes32[]"
623
+ },
624
+ {
625
+ "internalType": "bytes[]",
626
+ "name": "dataValues",
627
+ "type": "bytes[]"
628
+ }
629
+ ],
630
+ "name": "setDataBatch",
631
+ "outputs": [],
632
+ "stateMutability": "payable",
633
+ "type": "function"
634
+ },
635
+ {
636
+ "inputs": [
637
+ {
638
+ "internalType": "bytes4",
639
+ "name": "interfaceId",
640
+ "type": "bytes4"
641
+ }
642
+ ],
643
+ "name": "supportsInterface",
644
+ "outputs": [
645
+ {
646
+ "internalType": "bool",
647
+ "name": "",
648
+ "type": "bool"
649
+ }
650
+ ],
651
+ "stateMutability": "view",
652
+ "type": "function"
653
+ },
654
+ {
655
+ "inputs": [
656
+ {
657
+ "internalType": "address",
658
+ "name": "pendingNewOwner",
659
+ "type": "address"
660
+ }
661
+ ],
662
+ "name": "transferOwnership",
663
+ "outputs": [],
664
+ "stateMutability": "nonpayable",
665
+ "type": "function"
666
+ },
667
+ {
668
+ "inputs": [
669
+ {
670
+ "internalType": "bytes32",
671
+ "name": "typeId",
672
+ "type": "bytes32"
673
+ },
674
+ {
675
+ "internalType": "bytes",
676
+ "name": "receivedData",
677
+ "type": "bytes"
678
+ }
679
+ ],
680
+ "name": "universalReceiver",
681
+ "outputs": [
682
+ {
683
+ "internalType": "bytes",
684
+ "name": "returnedValues",
685
+ "type": "bytes"
686
+ }
687
+ ],
688
+ "stateMutability": "payable",
689
+ "type": "function"
690
+ },
691
+ {
692
+ "stateMutability": "payable",
693
+ "type": "receive"
694
+ }
695
+ ] as const satisfies Abi;
696
+
697
+ /**
698
+ * Type-safe ABI for UniversalProfileInit_json
699
+ */
700
+ export type UniversalProfileInit_jsonAbi = typeof UniversalProfileInit_jsonAbi;
701
+
702
+ /**
703
+ * Contract instance type for UniversalProfileInit_json
704
+ */
705
+ // Use any for contract type to avoid complex viem type issues
706
+ // The runtime behavior is type-safe through viem's ABI typing
707
+ export type UniversalProfileInit_jsonContract = any;
708
+
709
+ /**
710
+ * UniversalProfileInit_json Contract Class
711
+ *
712
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
713
+ *
714
+ * @example
715
+ * ```typescript
716
+ * import { createPublicClient, createWalletClient, http } from 'viem';
717
+ * import { mainnet } from 'viem/chains';
718
+ * import { UniversalProfileInit_json } from 'UniversalProfileInit_json';
719
+ *
720
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
721
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
722
+ *
723
+ * const contract = new UniversalProfileInit_json('0x...', { publicClient, walletClient });
724
+ *
725
+ * // Read functions
726
+ * const result = await contract.balanceOf('0x...');
727
+ *
728
+ * // Write functions
729
+ * const hash = await contract.transfer('0x...', 1000n);
730
+ *
731
+ * // Simulate transactions (dry-run)
732
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
733
+ * console.log('Gas estimate:', simulation.request.gas);
734
+ *
735
+ * // Watch events
736
+ * const unwatch = contract.watch.Transfer((event) => {
737
+ * console.log('Transfer event:', event);
738
+ * });
739
+ * ```
740
+ */
741
+ export class UniversalProfileInit_json {
742
+ private contract: UniversalProfileInit_jsonContract;
743
+ private contractAddress: Address;
744
+ private publicClient: PublicClient;
745
+
746
+ constructor(
747
+ address: Address,
748
+ clients: {
749
+ publicClient: PublicClient;
750
+ walletClient?: WalletClient;
751
+ }
752
+ ) {
753
+ this.contractAddress = address;
754
+ this.publicClient = clients.publicClient;
755
+ this.contract = getContract({
756
+ address,
757
+ abi: UniversalProfileInit_jsonAbi,
758
+ client: {
759
+ public: clients.publicClient,
760
+ wallet: clients.walletClient,
761
+ },
762
+ });
763
+ }
764
+
765
+ /**
766
+ * Get the contract address
767
+ */
768
+ get address(): Address {
769
+ return this.contractAddress;
770
+ }
771
+
772
+ /**
773
+ * Get the underlying viem contract instance
774
+ */
775
+ getContract(): UniversalProfileInit_jsonContract {
776
+ return this.contract;
777
+ }
778
+
779
+ /**
780
+ * RENOUNCE_OWNERSHIP_CONFIRMATION_DELAY
781
+ * view
782
+ */
783
+ async RENOUNCE_OWNERSHIP_CONFIRMATION_DELAY(): Promise<bigint> {
784
+ return this.contract.read.RENOUNCE_OWNERSHIP_CONFIRMATION_DELAY() as Promise<bigint>;
785
+ }
786
+
787
+ /**
788
+ * RENOUNCE_OWNERSHIP_CONFIRMATION_PERIOD
789
+ * view
790
+ */
791
+ async RENOUNCE_OWNERSHIP_CONFIRMATION_PERIOD(): Promise<bigint> {
792
+ return this.contract.read.RENOUNCE_OWNERSHIP_CONFIRMATION_PERIOD() as Promise<bigint>;
793
+ }
794
+
795
+ /**
796
+ * VERSION
797
+ * view
798
+ */
799
+ async VERSION(): Promise<string> {
800
+ return this.contract.read.VERSION() as Promise<string>;
801
+ }
802
+
803
+ /**
804
+ * getData
805
+ * view
806
+ */
807
+ async getData(dataKey: `0x${string}`): Promise<`0x${string}`> {
808
+ return this.contract.read.getData([dataKey] as const) as Promise<`0x${string}`>;
809
+ }
810
+
811
+ /**
812
+ * getDataBatch
813
+ * view
814
+ */
815
+ async getDataBatch(dataKeys: `0x${string}`[]): Promise<`0x${string}`[]> {
816
+ return this.contract.read.getDataBatch([dataKeys] as const) as Promise<`0x${string}`[]>;
817
+ }
818
+
819
+ /**
820
+ * isValidSignature
821
+ * view
822
+ */
823
+ async isValidSignature(dataHash: `0x${string}`, signature: `0x${string}`): Promise<`0x${string}`> {
824
+ return this.contract.read.isValidSignature([dataHash, signature] as const) as Promise<`0x${string}`>;
825
+ }
826
+
827
+ /**
828
+ * owner
829
+ * view
830
+ */
831
+ async owner(): Promise<`0x${string}`> {
832
+ return this.contract.read.owner() as Promise<`0x${string}`>;
833
+ }
834
+
835
+ /**
836
+ * pendingOwner
837
+ * view
838
+ */
839
+ async pendingOwner(): Promise<`0x${string}`> {
840
+ return this.contract.read.pendingOwner() as Promise<`0x${string}`>;
841
+ }
842
+
843
+ /**
844
+ * supportsInterface
845
+ * view
846
+ */
847
+ async supportsInterface(interfaceId: `0x${string}`): Promise<boolean> {
848
+ return this.contract.read.supportsInterface([interfaceId] as const) as Promise<boolean>;
849
+ }
850
+
851
+ /**
852
+ * acceptOwnership
853
+ * nonpayable
854
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
855
+ */
856
+ async acceptOwnership(options?: {
857
+ accessList?: import('viem').AccessList;
858
+ authorizationList?: import('viem').AuthorizationList;
859
+ chain?: import('viem').Chain | null;
860
+ dataSuffix?: `0x${string}`;
861
+ gas?: bigint;
862
+ gasPrice?: bigint;
863
+ maxFeePerGas?: bigint;
864
+ maxPriorityFeePerGas?: bigint;
865
+ nonce?: number;
866
+ value?: bigint;
867
+ }): Promise<`0x${string}`> {
868
+ if (!this.contract.write) {
869
+ throw new Error('Wallet client is required for write operations');
870
+ }
871
+ return this.contract.write.acceptOwnership(options) as Promise<`0x${string}`>;
872
+ }
873
+
874
+ /**
875
+ * batchCalls
876
+ * nonpayable
877
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
878
+ */
879
+ async batchCalls(data: `0x${string}`[], options?: {
880
+ accessList?: import('viem').AccessList;
881
+ authorizationList?: import('viem').AuthorizationList;
882
+ chain?: import('viem').Chain | null;
883
+ dataSuffix?: `0x${string}`;
884
+ gas?: bigint;
885
+ gasPrice?: bigint;
886
+ maxFeePerGas?: bigint;
887
+ maxPriorityFeePerGas?: bigint;
888
+ nonce?: number;
889
+ value?: bigint;
890
+ }): Promise<`0x${string}`> {
891
+ if (!this.contract.write) {
892
+ throw new Error('Wallet client is required for write operations');
893
+ }
894
+ return this.contract.write.batchCalls([data] as const, options) as Promise<`0x${string}`>;
895
+ }
896
+
897
+ /**
898
+ * execute
899
+ * payable
900
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
901
+ */
902
+ async execute(operationType: bigint, target: `0x${string}`, value: bigint, data: `0x${string}`, options?: {
903
+ accessList?: import('viem').AccessList;
904
+ authorizationList?: import('viem').AuthorizationList;
905
+ chain?: import('viem').Chain | null;
906
+ dataSuffix?: `0x${string}`;
907
+ gas?: bigint;
908
+ gasPrice?: bigint;
909
+ maxFeePerGas?: bigint;
910
+ maxPriorityFeePerGas?: bigint;
911
+ nonce?: number;
912
+ value?: bigint;
913
+ }): Promise<`0x${string}`> {
914
+ if (!this.contract.write) {
915
+ throw new Error('Wallet client is required for write operations');
916
+ }
917
+ return this.contract.write.execute([operationType, target, value, data] as const, options) as Promise<`0x${string}`>;
918
+ }
919
+
920
+ /**
921
+ * executeBatch
922
+ * payable
923
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
924
+ */
925
+ async executeBatch(operationsType: bigint[], targets: `0x${string}`[], values: bigint[], datas: `0x${string}`[], options?: {
926
+ accessList?: import('viem').AccessList;
927
+ authorizationList?: import('viem').AuthorizationList;
928
+ chain?: import('viem').Chain | null;
929
+ dataSuffix?: `0x${string}`;
930
+ gas?: bigint;
931
+ gasPrice?: bigint;
932
+ maxFeePerGas?: bigint;
933
+ maxPriorityFeePerGas?: bigint;
934
+ nonce?: number;
935
+ value?: bigint;
936
+ }): Promise<`0x${string}`> {
937
+ if (!this.contract.write) {
938
+ throw new Error('Wallet client is required for write operations');
939
+ }
940
+ return this.contract.write.executeBatch([operationsType, targets, values, datas] as const, options) as Promise<`0x${string}`>;
941
+ }
942
+
943
+ /**
944
+ * initialize
945
+ * payable
946
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
947
+ */
948
+ async initialize(initialOwner: `0x${string}`, options?: {
949
+ accessList?: import('viem').AccessList;
950
+ authorizationList?: import('viem').AuthorizationList;
951
+ chain?: import('viem').Chain | null;
952
+ dataSuffix?: `0x${string}`;
953
+ gas?: bigint;
954
+ gasPrice?: bigint;
955
+ maxFeePerGas?: bigint;
956
+ maxPriorityFeePerGas?: bigint;
957
+ nonce?: number;
958
+ value?: bigint;
959
+ }): Promise<`0x${string}`> {
960
+ if (!this.contract.write) {
961
+ throw new Error('Wallet client is required for write operations');
962
+ }
963
+ return this.contract.write.initialize([initialOwner] as const, options) as Promise<`0x${string}`>;
964
+ }
965
+
966
+ /**
967
+ * renounceOwnership
968
+ * nonpayable
969
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
970
+ */
971
+ async renounceOwnership(options?: {
972
+ accessList?: import('viem').AccessList;
973
+ authorizationList?: import('viem').AuthorizationList;
974
+ chain?: import('viem').Chain | null;
975
+ dataSuffix?: `0x${string}`;
976
+ gas?: bigint;
977
+ gasPrice?: bigint;
978
+ maxFeePerGas?: bigint;
979
+ maxPriorityFeePerGas?: bigint;
980
+ nonce?: number;
981
+ value?: bigint;
982
+ }): Promise<`0x${string}`> {
983
+ if (!this.contract.write) {
984
+ throw new Error('Wallet client is required for write operations');
985
+ }
986
+ return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
987
+ }
988
+
989
+ /**
990
+ * setData
991
+ * payable
992
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
993
+ */
994
+ async setData(dataKey: `0x${string}`, dataValue: `0x${string}`, options?: {
995
+ accessList?: import('viem').AccessList;
996
+ authorizationList?: import('viem').AuthorizationList;
997
+ chain?: import('viem').Chain | null;
998
+ dataSuffix?: `0x${string}`;
999
+ gas?: bigint;
1000
+ gasPrice?: bigint;
1001
+ maxFeePerGas?: bigint;
1002
+ maxPriorityFeePerGas?: bigint;
1003
+ nonce?: number;
1004
+ value?: bigint;
1005
+ }): Promise<`0x${string}`> {
1006
+ if (!this.contract.write) {
1007
+ throw new Error('Wallet client is required for write operations');
1008
+ }
1009
+ return this.contract.write.setData([dataKey, dataValue] as const, options) as Promise<`0x${string}`>;
1010
+ }
1011
+
1012
+ /**
1013
+ * setDataBatch
1014
+ * payable
1015
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1016
+ */
1017
+ async setDataBatch(dataKeys: `0x${string}`[], dataValues: `0x${string}`[], options?: {
1018
+ accessList?: import('viem').AccessList;
1019
+ authorizationList?: import('viem').AuthorizationList;
1020
+ chain?: import('viem').Chain | null;
1021
+ dataSuffix?: `0x${string}`;
1022
+ gas?: bigint;
1023
+ gasPrice?: bigint;
1024
+ maxFeePerGas?: bigint;
1025
+ maxPriorityFeePerGas?: bigint;
1026
+ nonce?: number;
1027
+ value?: bigint;
1028
+ }): Promise<`0x${string}`> {
1029
+ if (!this.contract.write) {
1030
+ throw new Error('Wallet client is required for write operations');
1031
+ }
1032
+ return this.contract.write.setDataBatch([dataKeys, dataValues] as const, options) as Promise<`0x${string}`>;
1033
+ }
1034
+
1035
+ /**
1036
+ * transferOwnership
1037
+ * nonpayable
1038
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1039
+ */
1040
+ async transferOwnership(pendingNewOwner: `0x${string}`, options?: {
1041
+ accessList?: import('viem').AccessList;
1042
+ authorizationList?: import('viem').AuthorizationList;
1043
+ chain?: import('viem').Chain | null;
1044
+ dataSuffix?: `0x${string}`;
1045
+ gas?: bigint;
1046
+ gasPrice?: bigint;
1047
+ maxFeePerGas?: bigint;
1048
+ maxPriorityFeePerGas?: bigint;
1049
+ nonce?: number;
1050
+ value?: bigint;
1051
+ }): Promise<`0x${string}`> {
1052
+ if (!this.contract.write) {
1053
+ throw new Error('Wallet client is required for write operations');
1054
+ }
1055
+ return this.contract.write.transferOwnership([pendingNewOwner] as const, options) as Promise<`0x${string}`>;
1056
+ }
1057
+
1058
+ /**
1059
+ * universalReceiver
1060
+ * payable
1061
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1062
+ */
1063
+ async universalReceiver(typeId: `0x${string}`, receivedData: `0x${string}`, options?: {
1064
+ accessList?: import('viem').AccessList;
1065
+ authorizationList?: import('viem').AuthorizationList;
1066
+ chain?: import('viem').Chain | null;
1067
+ dataSuffix?: `0x${string}`;
1068
+ gas?: bigint;
1069
+ gasPrice?: bigint;
1070
+ maxFeePerGas?: bigint;
1071
+ maxPriorityFeePerGas?: bigint;
1072
+ nonce?: number;
1073
+ value?: bigint;
1074
+ }): Promise<`0x${string}`> {
1075
+ if (!this.contract.write) {
1076
+ throw new Error('Wallet client is required for write operations');
1077
+ }
1078
+ return this.contract.write.universalReceiver([typeId, receivedData] as const, options) as Promise<`0x${string}`>;
1079
+ }
1080
+
1081
+
1082
+
1083
+ /**
1084
+ * Simulate contract write operations (dry-run without sending transaction)
1085
+ *
1086
+ * @example
1087
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1088
+ * console.log('Gas estimate:', result.request.gas);
1089
+ * console.log('Would succeed:', result.result);
1090
+ */
1091
+ get simulate() {
1092
+ const contract = this.contract;
1093
+ if (!contract.simulate) {
1094
+ throw new Error('Public client is required for simulation');
1095
+ }
1096
+ return {
1097
+ /**
1098
+ * Simulate acceptOwnership
1099
+ * Returns gas estimate and result without sending transaction
1100
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1101
+ */
1102
+ async acceptOwnership(options?: {
1103
+ accessList?: import('viem').AccessList;
1104
+ authorizationList?: import('viem').AuthorizationList;
1105
+ chain?: import('viem').Chain | null;
1106
+ dataSuffix?: `0x${string}`;
1107
+ gas?: bigint;
1108
+ gasPrice?: bigint;
1109
+ maxFeePerGas?: bigint;
1110
+ maxPriorityFeePerGas?: bigint;
1111
+ nonce?: number;
1112
+ value?: bigint;
1113
+ }): Promise<void> {
1114
+ return contract.simulate.acceptOwnership(options) as Promise<void>;
1115
+ },
1116
+ /**
1117
+ * Simulate batchCalls
1118
+ * Returns gas estimate and result without sending transaction
1119
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1120
+ */
1121
+ async batchCalls(data: `0x${string}`[], options?: {
1122
+ accessList?: import('viem').AccessList;
1123
+ authorizationList?: import('viem').AuthorizationList;
1124
+ chain?: import('viem').Chain | null;
1125
+ dataSuffix?: `0x${string}`;
1126
+ gas?: bigint;
1127
+ gasPrice?: bigint;
1128
+ maxFeePerGas?: bigint;
1129
+ maxPriorityFeePerGas?: bigint;
1130
+ nonce?: number;
1131
+ value?: bigint;
1132
+ }): Promise<`0x${string}`[]> {
1133
+ return contract.simulate.batchCalls([data] as const, options) as Promise<`0x${string}`[]>;
1134
+ },
1135
+ /**
1136
+ * Simulate execute
1137
+ * Returns gas estimate and result without sending transaction
1138
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1139
+ */
1140
+ async execute(operationType: bigint, target: `0x${string}`, value: bigint, data: `0x${string}`, options?: {
1141
+ accessList?: import('viem').AccessList;
1142
+ authorizationList?: import('viem').AuthorizationList;
1143
+ chain?: import('viem').Chain | null;
1144
+ dataSuffix?: `0x${string}`;
1145
+ gas?: bigint;
1146
+ gasPrice?: bigint;
1147
+ maxFeePerGas?: bigint;
1148
+ maxPriorityFeePerGas?: bigint;
1149
+ nonce?: number;
1150
+ value?: bigint;
1151
+ }): Promise<`0x${string}`> {
1152
+ return contract.simulate.execute([operationType, target, value, data] as const, options) as Promise<`0x${string}`>;
1153
+ },
1154
+ /**
1155
+ * Simulate executeBatch
1156
+ * Returns gas estimate and result without sending transaction
1157
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1158
+ */
1159
+ async executeBatch(operationsType: bigint[], targets: `0x${string}`[], values: bigint[], datas: `0x${string}`[], options?: {
1160
+ accessList?: import('viem').AccessList;
1161
+ authorizationList?: import('viem').AuthorizationList;
1162
+ chain?: import('viem').Chain | null;
1163
+ dataSuffix?: `0x${string}`;
1164
+ gas?: bigint;
1165
+ gasPrice?: bigint;
1166
+ maxFeePerGas?: bigint;
1167
+ maxPriorityFeePerGas?: bigint;
1168
+ nonce?: number;
1169
+ value?: bigint;
1170
+ }): Promise<`0x${string}`[]> {
1171
+ return contract.simulate.executeBatch([operationsType, targets, values, datas] as const, options) as Promise<`0x${string}`[]>;
1172
+ },
1173
+ /**
1174
+ * Simulate initialize
1175
+ * Returns gas estimate and result without sending transaction
1176
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1177
+ */
1178
+ async initialize(initialOwner: `0x${string}`, options?: {
1179
+ accessList?: import('viem').AccessList;
1180
+ authorizationList?: import('viem').AuthorizationList;
1181
+ chain?: import('viem').Chain | null;
1182
+ dataSuffix?: `0x${string}`;
1183
+ gas?: bigint;
1184
+ gasPrice?: bigint;
1185
+ maxFeePerGas?: bigint;
1186
+ maxPriorityFeePerGas?: bigint;
1187
+ nonce?: number;
1188
+ value?: bigint;
1189
+ }): Promise<void> {
1190
+ return contract.simulate.initialize([initialOwner] as const, options) as Promise<void>;
1191
+ },
1192
+ /**
1193
+ * Simulate renounceOwnership
1194
+ * Returns gas estimate and result without sending transaction
1195
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1196
+ */
1197
+ async renounceOwnership(options?: {
1198
+ accessList?: import('viem').AccessList;
1199
+ authorizationList?: import('viem').AuthorizationList;
1200
+ chain?: import('viem').Chain | null;
1201
+ dataSuffix?: `0x${string}`;
1202
+ gas?: bigint;
1203
+ gasPrice?: bigint;
1204
+ maxFeePerGas?: bigint;
1205
+ maxPriorityFeePerGas?: bigint;
1206
+ nonce?: number;
1207
+ value?: bigint;
1208
+ }): Promise<void> {
1209
+ return contract.simulate.renounceOwnership(options) as Promise<void>;
1210
+ },
1211
+ /**
1212
+ * Simulate setData
1213
+ * Returns gas estimate and result without sending transaction
1214
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1215
+ */
1216
+ async setData(dataKey: `0x${string}`, dataValue: `0x${string}`, options?: {
1217
+ accessList?: import('viem').AccessList;
1218
+ authorizationList?: import('viem').AuthorizationList;
1219
+ chain?: import('viem').Chain | null;
1220
+ dataSuffix?: `0x${string}`;
1221
+ gas?: bigint;
1222
+ gasPrice?: bigint;
1223
+ maxFeePerGas?: bigint;
1224
+ maxPriorityFeePerGas?: bigint;
1225
+ nonce?: number;
1226
+ value?: bigint;
1227
+ }): Promise<void> {
1228
+ return contract.simulate.setData([dataKey, dataValue] as const, options) as Promise<void>;
1229
+ },
1230
+ /**
1231
+ * Simulate setDataBatch
1232
+ * Returns gas estimate and result without sending transaction
1233
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1234
+ */
1235
+ async setDataBatch(dataKeys: `0x${string}`[], dataValues: `0x${string}`[], options?: {
1236
+ accessList?: import('viem').AccessList;
1237
+ authorizationList?: import('viem').AuthorizationList;
1238
+ chain?: import('viem').Chain | null;
1239
+ dataSuffix?: `0x${string}`;
1240
+ gas?: bigint;
1241
+ gasPrice?: bigint;
1242
+ maxFeePerGas?: bigint;
1243
+ maxPriorityFeePerGas?: bigint;
1244
+ nonce?: number;
1245
+ value?: bigint;
1246
+ }): Promise<void> {
1247
+ return contract.simulate.setDataBatch([dataKeys, dataValues] as const, options) as Promise<void>;
1248
+ },
1249
+ /**
1250
+ * Simulate transferOwnership
1251
+ * Returns gas estimate and result without sending transaction
1252
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1253
+ */
1254
+ async transferOwnership(pendingNewOwner: `0x${string}`, options?: {
1255
+ accessList?: import('viem').AccessList;
1256
+ authorizationList?: import('viem').AuthorizationList;
1257
+ chain?: import('viem').Chain | null;
1258
+ dataSuffix?: `0x${string}`;
1259
+ gas?: bigint;
1260
+ gasPrice?: bigint;
1261
+ maxFeePerGas?: bigint;
1262
+ maxPriorityFeePerGas?: bigint;
1263
+ nonce?: number;
1264
+ value?: bigint;
1265
+ }): Promise<void> {
1266
+ return contract.simulate.transferOwnership([pendingNewOwner] as const, options) as Promise<void>;
1267
+ },
1268
+ /**
1269
+ * Simulate universalReceiver
1270
+ * Returns gas estimate and result without sending transaction
1271
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1272
+ */
1273
+ async universalReceiver(typeId: `0x${string}`, receivedData: `0x${string}`, options?: {
1274
+ accessList?: import('viem').AccessList;
1275
+ authorizationList?: import('viem').AuthorizationList;
1276
+ chain?: import('viem').Chain | null;
1277
+ dataSuffix?: `0x${string}`;
1278
+ gas?: bigint;
1279
+ gasPrice?: bigint;
1280
+ maxFeePerGas?: bigint;
1281
+ maxPriorityFeePerGas?: bigint;
1282
+ nonce?: number;
1283
+ value?: bigint;
1284
+ }): Promise<`0x${string}`> {
1285
+ return contract.simulate.universalReceiver([typeId, receivedData] as const, options) as Promise<`0x${string}`>;
1286
+ }
1287
+ };
1288
+ }
1289
+
1290
+ /**
1291
+ * Watch contract events
1292
+ *
1293
+ * @example
1294
+ * // Watch all Transfer events
1295
+ * const unwatch = contract.watch.Transfer((event) => {
1296
+ * console.log('Transfer:', event);
1297
+ * });
1298
+ *
1299
+ * // Stop watching
1300
+ * unwatch();
1301
+ */
1302
+ get watch() {
1303
+ return {
1304
+ /**
1305
+ * Watch ContractCreated events
1306
+ * @param callback Function to call when event is emitted
1307
+ * @param filter Optional filter for indexed parameters
1308
+ * @returns Unwatch function to stop listening
1309
+ */
1310
+ ContractCreated: (callback: (event: { operationType: bigint; contractAddress: `0x${string}`; salt: `0x${string}`; value: bigint }) => void, filter?: { operationType: bigint; contractAddress: `0x${string}`; salt: `0x${string}` }) => {
1311
+ return this.publicClient.watchContractEvent({
1312
+ address: this.contractAddress,
1313
+ abi: UniversalProfileInit_jsonAbi,
1314
+ eventName: 'ContractCreated',
1315
+ args: filter,
1316
+ onLogs: (logs: any[]) => {
1317
+ logs.forEach((log: any) => {
1318
+ callback(log.args as any);
1319
+ });
1320
+ },
1321
+ }) as () => void;
1322
+ },
1323
+ /**
1324
+ * Watch DataChanged events
1325
+ * @param callback Function to call when event is emitted
1326
+ * @param filter Optional filter for indexed parameters
1327
+ * @returns Unwatch function to stop listening
1328
+ */
1329
+ DataChanged: (callback: (event: { dataKey: `0x${string}`; dataValue: `0x${string}` }) => void, filter?: { dataKey: `0x${string}` }) => {
1330
+ return this.publicClient.watchContractEvent({
1331
+ address: this.contractAddress,
1332
+ abi: UniversalProfileInit_jsonAbi,
1333
+ eventName: 'DataChanged',
1334
+ args: filter,
1335
+ onLogs: (logs: any[]) => {
1336
+ logs.forEach((log: any) => {
1337
+ callback(log.args as any);
1338
+ });
1339
+ },
1340
+ }) as () => void;
1341
+ },
1342
+ /**
1343
+ * Watch Executed events
1344
+ * @param callback Function to call when event is emitted
1345
+ * @param filter Optional filter for indexed parameters
1346
+ * @returns Unwatch function to stop listening
1347
+ */
1348
+ Executed: (callback: (event: { operationType: bigint; target: `0x${string}`; selector: `0x${string}`; value: bigint }) => void, filter?: { operationType: bigint; target: `0x${string}`; selector: `0x${string}` }) => {
1349
+ return this.publicClient.watchContractEvent({
1350
+ address: this.contractAddress,
1351
+ abi: UniversalProfileInit_jsonAbi,
1352
+ eventName: 'Executed',
1353
+ args: filter,
1354
+ onLogs: (logs: any[]) => {
1355
+ logs.forEach((log: any) => {
1356
+ callback(log.args as any);
1357
+ });
1358
+ },
1359
+ }) as () => void;
1360
+ },
1361
+ /**
1362
+ * Watch Initialized events
1363
+ * @param callback Function to call when event is emitted
1364
+ * @param filter Optional filter for indexed parameters
1365
+ * @returns Unwatch function to stop listening
1366
+ */
1367
+ Initialized: (callback: (event: { version: bigint }) => void) => {
1368
+ return this.publicClient.watchContractEvent({
1369
+ address: this.contractAddress,
1370
+ abi: UniversalProfileInit_jsonAbi,
1371
+ eventName: 'Initialized',
1372
+
1373
+ onLogs: (logs: any[]) => {
1374
+ logs.forEach((log: any) => {
1375
+ callback(log.args as any);
1376
+ });
1377
+ },
1378
+ }) as () => void;
1379
+ },
1380
+ /**
1381
+ * Watch OwnershipRenounced events
1382
+ * @param callback Function to call when event is emitted
1383
+ * @param filter Optional filter for indexed parameters
1384
+ * @returns Unwatch function to stop listening
1385
+ */
1386
+ OwnershipRenounced: (callback: (event: { }) => void) => {
1387
+ return this.publicClient.watchContractEvent({
1388
+ address: this.contractAddress,
1389
+ abi: UniversalProfileInit_jsonAbi,
1390
+ eventName: 'OwnershipRenounced',
1391
+
1392
+ onLogs: (logs: any[]) => {
1393
+ logs.forEach((log: any) => {
1394
+ callback(log.args as any);
1395
+ });
1396
+ },
1397
+ }) as () => void;
1398
+ },
1399
+ /**
1400
+ * Watch OwnershipTransferStarted events
1401
+ * @param callback Function to call when event is emitted
1402
+ * @param filter Optional filter for indexed parameters
1403
+ * @returns Unwatch function to stop listening
1404
+ */
1405
+ OwnershipTransferStarted: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
1406
+ return this.publicClient.watchContractEvent({
1407
+ address: this.contractAddress,
1408
+ abi: UniversalProfileInit_jsonAbi,
1409
+ eventName: 'OwnershipTransferStarted',
1410
+ args: filter,
1411
+ onLogs: (logs: any[]) => {
1412
+ logs.forEach((log: any) => {
1413
+ callback(log.args as any);
1414
+ });
1415
+ },
1416
+ }) as () => void;
1417
+ },
1418
+ /**
1419
+ * Watch OwnershipTransferred events
1420
+ * @param callback Function to call when event is emitted
1421
+ * @param filter Optional filter for indexed parameters
1422
+ * @returns Unwatch function to stop listening
1423
+ */
1424
+ OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
1425
+ return this.publicClient.watchContractEvent({
1426
+ address: this.contractAddress,
1427
+ abi: UniversalProfileInit_jsonAbi,
1428
+ eventName: 'OwnershipTransferred',
1429
+ args: filter,
1430
+ onLogs: (logs: any[]) => {
1431
+ logs.forEach((log: any) => {
1432
+ callback(log.args as any);
1433
+ });
1434
+ },
1435
+ }) as () => void;
1436
+ },
1437
+ /**
1438
+ * Watch RenounceOwnershipStarted events
1439
+ * @param callback Function to call when event is emitted
1440
+ * @param filter Optional filter for indexed parameters
1441
+ * @returns Unwatch function to stop listening
1442
+ */
1443
+ RenounceOwnershipStarted: (callback: (event: { }) => void) => {
1444
+ return this.publicClient.watchContractEvent({
1445
+ address: this.contractAddress,
1446
+ abi: UniversalProfileInit_jsonAbi,
1447
+ eventName: 'RenounceOwnershipStarted',
1448
+
1449
+ onLogs: (logs: any[]) => {
1450
+ logs.forEach((log: any) => {
1451
+ callback(log.args as any);
1452
+ });
1453
+ },
1454
+ }) as () => void;
1455
+ },
1456
+ /**
1457
+ * Watch UniversalReceiver events
1458
+ * @param callback Function to call when event is emitted
1459
+ * @param filter Optional filter for indexed parameters
1460
+ * @returns Unwatch function to stop listening
1461
+ */
1462
+ UniversalReceiver: (callback: (event: { from: `0x${string}`; value: bigint; typeId: `0x${string}`; receivedData: `0x${string}`; returnedValue: `0x${string}` }) => void, filter?: { from: `0x${string}`; value: bigint; typeId: `0x${string}` }) => {
1463
+ return this.publicClient.watchContractEvent({
1464
+ address: this.contractAddress,
1465
+ abi: UniversalProfileInit_jsonAbi,
1466
+ eventName: 'UniversalReceiver',
1467
+ args: filter,
1468
+ onLogs: (logs: any[]) => {
1469
+ logs.forEach((log: any) => {
1470
+ callback(log.args as any);
1471
+ });
1472
+ },
1473
+ }) as () => void;
1474
+ }
1475
+ };
1476
+ }
1477
+ }