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