@gitmyabi/normiesroyaltysplitter 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1040 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * NormiesRoyaltySplitter_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const NormiesRoyaltySplitter_jsonAbi = [
10
+ {
11
+ "inputs": [
12
+ {
13
+ "internalType": "contract IWETH",
14
+ "name": "_weth",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "internalType": "address",
19
+ "name": "_pool",
20
+ "type": "address"
21
+ },
22
+ {
23
+ "internalType": "address",
24
+ "name": "_team",
25
+ "type": "address"
26
+ }
27
+ ],
28
+ "stateMutability": "nonpayable",
29
+ "type": "constructor"
30
+ },
31
+ {
32
+ "inputs": [],
33
+ "name": "AlreadyInitialized",
34
+ "type": "error"
35
+ },
36
+ {
37
+ "inputs": [],
38
+ "name": "InvalidBps",
39
+ "type": "error"
40
+ },
41
+ {
42
+ "inputs": [],
43
+ "name": "NewOwnerIsZeroAddress",
44
+ "type": "error"
45
+ },
46
+ {
47
+ "inputs": [],
48
+ "name": "NoHandoverRequest",
49
+ "type": "error"
50
+ },
51
+ {
52
+ "inputs": [],
53
+ "name": "Unauthorized",
54
+ "type": "error"
55
+ },
56
+ {
57
+ "inputs": [],
58
+ "name": "UseRelease",
59
+ "type": "error"
60
+ },
61
+ {
62
+ "inputs": [],
63
+ "name": "ZeroAddress",
64
+ "type": "error"
65
+ },
66
+ {
67
+ "anonymous": false,
68
+ "inputs": [
69
+ {
70
+ "indexed": true,
71
+ "internalType": "address",
72
+ "name": "pendingOwner",
73
+ "type": "address"
74
+ }
75
+ ],
76
+ "name": "OwnershipHandoverCanceled",
77
+ "type": "event"
78
+ },
79
+ {
80
+ "anonymous": false,
81
+ "inputs": [
82
+ {
83
+ "indexed": true,
84
+ "internalType": "address",
85
+ "name": "pendingOwner",
86
+ "type": "address"
87
+ }
88
+ ],
89
+ "name": "OwnershipHandoverRequested",
90
+ "type": "event"
91
+ },
92
+ {
93
+ "anonymous": false,
94
+ "inputs": [
95
+ {
96
+ "indexed": true,
97
+ "internalType": "address",
98
+ "name": "oldOwner",
99
+ "type": "address"
100
+ },
101
+ {
102
+ "indexed": true,
103
+ "internalType": "address",
104
+ "name": "newOwner",
105
+ "type": "address"
106
+ }
107
+ ],
108
+ "name": "OwnershipTransferred",
109
+ "type": "event"
110
+ },
111
+ {
112
+ "anonymous": false,
113
+ "inputs": [
114
+ {
115
+ "indexed": false,
116
+ "internalType": "uint16",
117
+ "name": "poolBps",
118
+ "type": "uint16"
119
+ }
120
+ ],
121
+ "name": "PoolBpsSet",
122
+ "type": "event"
123
+ },
124
+ {
125
+ "anonymous": false,
126
+ "inputs": [
127
+ {
128
+ "indexed": false,
129
+ "internalType": "uint256",
130
+ "name": "toPool",
131
+ "type": "uint256"
132
+ },
133
+ {
134
+ "indexed": false,
135
+ "internalType": "uint256",
136
+ "name": "toTeam",
137
+ "type": "uint256"
138
+ }
139
+ ],
140
+ "name": "Released",
141
+ "type": "event"
142
+ },
143
+ {
144
+ "anonymous": false,
145
+ "inputs": [
146
+ {
147
+ "indexed": true,
148
+ "internalType": "address",
149
+ "name": "team",
150
+ "type": "address"
151
+ }
152
+ ],
153
+ "name": "TeamSet",
154
+ "type": "event"
155
+ },
156
+ {
157
+ "anonymous": false,
158
+ "inputs": [
159
+ {
160
+ "indexed": true,
161
+ "internalType": "address",
162
+ "name": "token",
163
+ "type": "address"
164
+ },
165
+ {
166
+ "indexed": false,
167
+ "internalType": "uint256",
168
+ "name": "poolShare",
169
+ "type": "uint256"
170
+ },
171
+ {
172
+ "indexed": false,
173
+ "internalType": "uint256",
174
+ "name": "teamShare",
175
+ "type": "uint256"
176
+ }
177
+ ],
178
+ "name": "TokenReleased",
179
+ "type": "event"
180
+ },
181
+ {
182
+ "inputs": [],
183
+ "name": "cancelOwnershipHandover",
184
+ "outputs": [],
185
+ "stateMutability": "payable",
186
+ "type": "function"
187
+ },
188
+ {
189
+ "inputs": [
190
+ {
191
+ "internalType": "address",
192
+ "name": "pendingOwner",
193
+ "type": "address"
194
+ }
195
+ ],
196
+ "name": "completeOwnershipHandover",
197
+ "outputs": [],
198
+ "stateMutability": "payable",
199
+ "type": "function"
200
+ },
201
+ {
202
+ "inputs": [],
203
+ "name": "owner",
204
+ "outputs": [
205
+ {
206
+ "internalType": "address",
207
+ "name": "result",
208
+ "type": "address"
209
+ }
210
+ ],
211
+ "stateMutability": "view",
212
+ "type": "function"
213
+ },
214
+ {
215
+ "inputs": [
216
+ {
217
+ "internalType": "address",
218
+ "name": "pendingOwner",
219
+ "type": "address"
220
+ }
221
+ ],
222
+ "name": "ownershipHandoverExpiresAt",
223
+ "outputs": [
224
+ {
225
+ "internalType": "uint256",
226
+ "name": "result",
227
+ "type": "uint256"
228
+ }
229
+ ],
230
+ "stateMutability": "view",
231
+ "type": "function"
232
+ },
233
+ {
234
+ "inputs": [],
235
+ "name": "pool",
236
+ "outputs": [
237
+ {
238
+ "internalType": "address",
239
+ "name": "",
240
+ "type": "address"
241
+ }
242
+ ],
243
+ "stateMutability": "view",
244
+ "type": "function"
245
+ },
246
+ {
247
+ "inputs": [],
248
+ "name": "poolBps",
249
+ "outputs": [
250
+ {
251
+ "internalType": "uint16",
252
+ "name": "",
253
+ "type": "uint16"
254
+ }
255
+ ],
256
+ "stateMutability": "view",
257
+ "type": "function"
258
+ },
259
+ {
260
+ "inputs": [],
261
+ "name": "release",
262
+ "outputs": [],
263
+ "stateMutability": "nonpayable",
264
+ "type": "function"
265
+ },
266
+ {
267
+ "inputs": [
268
+ {
269
+ "internalType": "address",
270
+ "name": "token",
271
+ "type": "address"
272
+ }
273
+ ],
274
+ "name": "releaseToken",
275
+ "outputs": [],
276
+ "stateMutability": "nonpayable",
277
+ "type": "function"
278
+ },
279
+ {
280
+ "inputs": [],
281
+ "name": "renounceOwnership",
282
+ "outputs": [],
283
+ "stateMutability": "payable",
284
+ "type": "function"
285
+ },
286
+ {
287
+ "inputs": [],
288
+ "name": "requestOwnershipHandover",
289
+ "outputs": [],
290
+ "stateMutability": "payable",
291
+ "type": "function"
292
+ },
293
+ {
294
+ "inputs": [
295
+ {
296
+ "internalType": "uint16",
297
+ "name": "_poolBps",
298
+ "type": "uint16"
299
+ }
300
+ ],
301
+ "name": "setPoolBps",
302
+ "outputs": [],
303
+ "stateMutability": "nonpayable",
304
+ "type": "function"
305
+ },
306
+ {
307
+ "inputs": [
308
+ {
309
+ "internalType": "address",
310
+ "name": "_team",
311
+ "type": "address"
312
+ }
313
+ ],
314
+ "name": "setTeam",
315
+ "outputs": [],
316
+ "stateMutability": "nonpayable",
317
+ "type": "function"
318
+ },
319
+ {
320
+ "inputs": [],
321
+ "name": "team",
322
+ "outputs": [
323
+ {
324
+ "internalType": "address",
325
+ "name": "",
326
+ "type": "address"
327
+ }
328
+ ],
329
+ "stateMutability": "view",
330
+ "type": "function"
331
+ },
332
+ {
333
+ "inputs": [
334
+ {
335
+ "internalType": "address",
336
+ "name": "newOwner",
337
+ "type": "address"
338
+ }
339
+ ],
340
+ "name": "transferOwnership",
341
+ "outputs": [],
342
+ "stateMutability": "payable",
343
+ "type": "function"
344
+ },
345
+ {
346
+ "inputs": [],
347
+ "name": "weth",
348
+ "outputs": [
349
+ {
350
+ "internalType": "contract IWETH",
351
+ "name": "",
352
+ "type": "address"
353
+ }
354
+ ],
355
+ "stateMutability": "view",
356
+ "type": "function"
357
+ },
358
+ {
359
+ "stateMutability": "payable",
360
+ "type": "receive"
361
+ }
362
+ ] as const satisfies Abi;
363
+
364
+ /**
365
+ * Type-safe ABI for NormiesRoyaltySplitter_json
366
+ */
367
+ export type NormiesRoyaltySplitter_jsonAbi = typeof NormiesRoyaltySplitter_jsonAbi;
368
+
369
+ /**
370
+ * Contract instance type for NormiesRoyaltySplitter_json
371
+ */
372
+ // Use any for contract type to avoid complex viem type issues
373
+ // The runtime behavior is type-safe through viem's ABI typing
374
+ export type NormiesRoyaltySplitter_jsonContract = any;
375
+
376
+ /**
377
+ * NormiesRoyaltySplitter_json Contract Class
378
+ *
379
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
380
+ *
381
+ * @example
382
+ * ```typescript
383
+ * import { createPublicClient, createWalletClient, http } from 'viem';
384
+ * import { mainnet } from 'viem/chains';
385
+ * import { NormiesRoyaltySplitter_json } from 'NormiesRoyaltySplitter_json';
386
+ *
387
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
388
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
389
+ *
390
+ * const contract = new NormiesRoyaltySplitter_json('0x...', { publicClient, walletClient });
391
+ *
392
+ * // Read functions
393
+ * const result = await contract.balanceOf('0x...');
394
+ *
395
+ * // Write functions
396
+ * const hash = await contract.transfer('0x...', 1000n);
397
+ *
398
+ * // Simulate transactions (dry-run)
399
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
400
+ * console.log('Gas estimate:', simulation.request.gas);
401
+ *
402
+ * // Watch events
403
+ * const unwatch = contract.watch.Transfer((event) => {
404
+ * console.log('Transfer event:', event);
405
+ * });
406
+ * ```
407
+ */
408
+ export class NormiesRoyaltySplitter_json {
409
+ private contract: NormiesRoyaltySplitter_jsonContract;
410
+ private contractAddress: Address;
411
+ private publicClient: PublicClient;
412
+
413
+ constructor(
414
+ address: Address,
415
+ clients: {
416
+ publicClient: PublicClient;
417
+ walletClient?: WalletClient;
418
+ }
419
+ ) {
420
+ this.contractAddress = address;
421
+ this.publicClient = clients.publicClient;
422
+ this.contract = getContract({
423
+ address,
424
+ abi: NormiesRoyaltySplitter_jsonAbi,
425
+ client: {
426
+ public: clients.publicClient,
427
+ wallet: clients.walletClient,
428
+ },
429
+ });
430
+ }
431
+
432
+ /**
433
+ * Get the contract address
434
+ */
435
+ get address(): Address {
436
+ return this.contractAddress;
437
+ }
438
+
439
+ /**
440
+ * Get the underlying viem contract instance
441
+ */
442
+ getContract(): NormiesRoyaltySplitter_jsonContract {
443
+ return this.contract;
444
+ }
445
+
446
+ /**
447
+ * owner
448
+ * view
449
+ */
450
+ async owner(): Promise<`0x${string}`> {
451
+ return this.contract.read.owner() as Promise<`0x${string}`>;
452
+ }
453
+
454
+ /**
455
+ * ownershipHandoverExpiresAt
456
+ * view
457
+ */
458
+ async ownershipHandoverExpiresAt(pendingOwner: `0x${string}`): Promise<bigint> {
459
+ return this.contract.read.ownershipHandoverExpiresAt([pendingOwner] as const) as Promise<bigint>;
460
+ }
461
+
462
+ /**
463
+ * pool
464
+ * view
465
+ */
466
+ async pool(): Promise<`0x${string}`> {
467
+ return this.contract.read.pool() as Promise<`0x${string}`>;
468
+ }
469
+
470
+ /**
471
+ * poolBps
472
+ * view
473
+ */
474
+ async poolBps(): Promise<bigint> {
475
+ return this.contract.read.poolBps() as Promise<bigint>;
476
+ }
477
+
478
+ /**
479
+ * team
480
+ * view
481
+ */
482
+ async team(): Promise<`0x${string}`> {
483
+ return this.contract.read.team() as Promise<`0x${string}`>;
484
+ }
485
+
486
+ /**
487
+ * weth
488
+ * view
489
+ */
490
+ async weth(): Promise<`0x${string}`> {
491
+ return this.contract.read.weth() as Promise<`0x${string}`>;
492
+ }
493
+
494
+ /**
495
+ * cancelOwnershipHandover
496
+ * payable
497
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
498
+ */
499
+ async cancelOwnershipHandover(options?: {
500
+ accessList?: import('viem').AccessList;
501
+ authorizationList?: import('viem').AuthorizationList;
502
+ chain?: import('viem').Chain | null;
503
+ dataSuffix?: `0x${string}`;
504
+ gas?: bigint;
505
+ gasPrice?: bigint;
506
+ maxFeePerGas?: bigint;
507
+ maxPriorityFeePerGas?: bigint;
508
+ nonce?: number;
509
+ value?: bigint;
510
+ }): Promise<`0x${string}`> {
511
+ if (!this.contract.write) {
512
+ throw new Error('Wallet client is required for write operations');
513
+ }
514
+ return this.contract.write.cancelOwnershipHandover(options) as Promise<`0x${string}`>;
515
+ }
516
+
517
+ /**
518
+ * completeOwnershipHandover
519
+ * payable
520
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
521
+ */
522
+ async completeOwnershipHandover(pendingOwner: `0x${string}`, options?: {
523
+ accessList?: import('viem').AccessList;
524
+ authorizationList?: import('viem').AuthorizationList;
525
+ chain?: import('viem').Chain | null;
526
+ dataSuffix?: `0x${string}`;
527
+ gas?: bigint;
528
+ gasPrice?: bigint;
529
+ maxFeePerGas?: bigint;
530
+ maxPriorityFeePerGas?: bigint;
531
+ nonce?: number;
532
+ value?: bigint;
533
+ }): Promise<`0x${string}`> {
534
+ if (!this.contract.write) {
535
+ throw new Error('Wallet client is required for write operations');
536
+ }
537
+ return this.contract.write.completeOwnershipHandover([pendingOwner] as const, options) as Promise<`0x${string}`>;
538
+ }
539
+
540
+ /**
541
+ * release
542
+ * nonpayable
543
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
544
+ */
545
+ async release(options?: {
546
+ accessList?: import('viem').AccessList;
547
+ authorizationList?: import('viem').AuthorizationList;
548
+ chain?: import('viem').Chain | null;
549
+ dataSuffix?: `0x${string}`;
550
+ gas?: bigint;
551
+ gasPrice?: bigint;
552
+ maxFeePerGas?: bigint;
553
+ maxPriorityFeePerGas?: bigint;
554
+ nonce?: number;
555
+ value?: bigint;
556
+ }): Promise<`0x${string}`> {
557
+ if (!this.contract.write) {
558
+ throw new Error('Wallet client is required for write operations');
559
+ }
560
+ return this.contract.write.release(options) as Promise<`0x${string}`>;
561
+ }
562
+
563
+ /**
564
+ * releaseToken
565
+ * nonpayable
566
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
567
+ */
568
+ async releaseToken(token: `0x${string}`, options?: {
569
+ accessList?: import('viem').AccessList;
570
+ authorizationList?: import('viem').AuthorizationList;
571
+ chain?: import('viem').Chain | null;
572
+ dataSuffix?: `0x${string}`;
573
+ gas?: bigint;
574
+ gasPrice?: bigint;
575
+ maxFeePerGas?: bigint;
576
+ maxPriorityFeePerGas?: bigint;
577
+ nonce?: number;
578
+ value?: bigint;
579
+ }): Promise<`0x${string}`> {
580
+ if (!this.contract.write) {
581
+ throw new Error('Wallet client is required for write operations');
582
+ }
583
+ return this.contract.write.releaseToken([token] as const, options) as Promise<`0x${string}`>;
584
+ }
585
+
586
+ /**
587
+ * renounceOwnership
588
+ * payable
589
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
590
+ */
591
+ async renounceOwnership(options?: {
592
+ accessList?: import('viem').AccessList;
593
+ authorizationList?: import('viem').AuthorizationList;
594
+ chain?: import('viem').Chain | null;
595
+ dataSuffix?: `0x${string}`;
596
+ gas?: bigint;
597
+ gasPrice?: bigint;
598
+ maxFeePerGas?: bigint;
599
+ maxPriorityFeePerGas?: bigint;
600
+ nonce?: number;
601
+ value?: bigint;
602
+ }): Promise<`0x${string}`> {
603
+ if (!this.contract.write) {
604
+ throw new Error('Wallet client is required for write operations');
605
+ }
606
+ return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
607
+ }
608
+
609
+ /**
610
+ * requestOwnershipHandover
611
+ * payable
612
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
613
+ */
614
+ async requestOwnershipHandover(options?: {
615
+ accessList?: import('viem').AccessList;
616
+ authorizationList?: import('viem').AuthorizationList;
617
+ chain?: import('viem').Chain | null;
618
+ dataSuffix?: `0x${string}`;
619
+ gas?: bigint;
620
+ gasPrice?: bigint;
621
+ maxFeePerGas?: bigint;
622
+ maxPriorityFeePerGas?: bigint;
623
+ nonce?: number;
624
+ value?: bigint;
625
+ }): Promise<`0x${string}`> {
626
+ if (!this.contract.write) {
627
+ throw new Error('Wallet client is required for write operations');
628
+ }
629
+ return this.contract.write.requestOwnershipHandover(options) as Promise<`0x${string}`>;
630
+ }
631
+
632
+ /**
633
+ * setPoolBps
634
+ * nonpayable
635
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
636
+ */
637
+ async setPoolBps(_poolBps: bigint, options?: {
638
+ accessList?: import('viem').AccessList;
639
+ authorizationList?: import('viem').AuthorizationList;
640
+ chain?: import('viem').Chain | null;
641
+ dataSuffix?: `0x${string}`;
642
+ gas?: bigint;
643
+ gasPrice?: bigint;
644
+ maxFeePerGas?: bigint;
645
+ maxPriorityFeePerGas?: bigint;
646
+ nonce?: number;
647
+ value?: bigint;
648
+ }): Promise<`0x${string}`> {
649
+ if (!this.contract.write) {
650
+ throw new Error('Wallet client is required for write operations');
651
+ }
652
+ return this.contract.write.setPoolBps([_poolBps] as const, options) as Promise<`0x${string}`>;
653
+ }
654
+
655
+ /**
656
+ * setTeam
657
+ * nonpayable
658
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
659
+ */
660
+ async setTeam(_team: `0x${string}`, options?: {
661
+ accessList?: import('viem').AccessList;
662
+ authorizationList?: import('viem').AuthorizationList;
663
+ chain?: import('viem').Chain | null;
664
+ dataSuffix?: `0x${string}`;
665
+ gas?: bigint;
666
+ gasPrice?: bigint;
667
+ maxFeePerGas?: bigint;
668
+ maxPriorityFeePerGas?: bigint;
669
+ nonce?: number;
670
+ value?: bigint;
671
+ }): Promise<`0x${string}`> {
672
+ if (!this.contract.write) {
673
+ throw new Error('Wallet client is required for write operations');
674
+ }
675
+ return this.contract.write.setTeam([_team] as const, options) as Promise<`0x${string}`>;
676
+ }
677
+
678
+ /**
679
+ * transferOwnership
680
+ * payable
681
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
682
+ */
683
+ async transferOwnership(newOwner: `0x${string}`, options?: {
684
+ accessList?: import('viem').AccessList;
685
+ authorizationList?: import('viem').AuthorizationList;
686
+ chain?: import('viem').Chain | null;
687
+ dataSuffix?: `0x${string}`;
688
+ gas?: bigint;
689
+ gasPrice?: bigint;
690
+ maxFeePerGas?: bigint;
691
+ maxPriorityFeePerGas?: bigint;
692
+ nonce?: number;
693
+ value?: bigint;
694
+ }): Promise<`0x${string}`> {
695
+ if (!this.contract.write) {
696
+ throw new Error('Wallet client is required for write operations');
697
+ }
698
+ return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
699
+ }
700
+
701
+
702
+
703
+ /**
704
+ * Simulate contract write operations (dry-run without sending transaction)
705
+ *
706
+ * @example
707
+ * const result = await contract.simulate.transfer('0x...', 1000n);
708
+ * console.log('Gas estimate:', result.request.gas);
709
+ * console.log('Would succeed:', result.result);
710
+ */
711
+ get simulate() {
712
+ const contract = this.contract;
713
+ if (!contract.simulate) {
714
+ throw new Error('Public client is required for simulation');
715
+ }
716
+ return {
717
+ /**
718
+ * Simulate cancelOwnershipHandover
719
+ * Returns gas estimate and result without sending transaction
720
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
721
+ */
722
+ async cancelOwnershipHandover(options?: {
723
+ accessList?: import('viem').AccessList;
724
+ authorizationList?: import('viem').AuthorizationList;
725
+ chain?: import('viem').Chain | null;
726
+ dataSuffix?: `0x${string}`;
727
+ gas?: bigint;
728
+ gasPrice?: bigint;
729
+ maxFeePerGas?: bigint;
730
+ maxPriorityFeePerGas?: bigint;
731
+ nonce?: number;
732
+ value?: bigint;
733
+ }): Promise<void> {
734
+ return contract.simulate.cancelOwnershipHandover(options) as Promise<void>;
735
+ },
736
+ /**
737
+ * Simulate completeOwnershipHandover
738
+ * Returns gas estimate and result without sending transaction
739
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
740
+ */
741
+ async completeOwnershipHandover(pendingOwner: `0x${string}`, options?: {
742
+ accessList?: import('viem').AccessList;
743
+ authorizationList?: import('viem').AuthorizationList;
744
+ chain?: import('viem').Chain | null;
745
+ dataSuffix?: `0x${string}`;
746
+ gas?: bigint;
747
+ gasPrice?: bigint;
748
+ maxFeePerGas?: bigint;
749
+ maxPriorityFeePerGas?: bigint;
750
+ nonce?: number;
751
+ value?: bigint;
752
+ }): Promise<void> {
753
+ return contract.simulate.completeOwnershipHandover([pendingOwner] as const, options) as Promise<void>;
754
+ },
755
+ /**
756
+ * Simulate release
757
+ * Returns gas estimate and result without sending transaction
758
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
759
+ */
760
+ async release(options?: {
761
+ accessList?: import('viem').AccessList;
762
+ authorizationList?: import('viem').AuthorizationList;
763
+ chain?: import('viem').Chain | null;
764
+ dataSuffix?: `0x${string}`;
765
+ gas?: bigint;
766
+ gasPrice?: bigint;
767
+ maxFeePerGas?: bigint;
768
+ maxPriorityFeePerGas?: bigint;
769
+ nonce?: number;
770
+ value?: bigint;
771
+ }): Promise<void> {
772
+ return contract.simulate.release(options) as Promise<void>;
773
+ },
774
+ /**
775
+ * Simulate releaseToken
776
+ * Returns gas estimate and result without sending transaction
777
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
778
+ */
779
+ async releaseToken(token: `0x${string}`, options?: {
780
+ accessList?: import('viem').AccessList;
781
+ authorizationList?: import('viem').AuthorizationList;
782
+ chain?: import('viem').Chain | null;
783
+ dataSuffix?: `0x${string}`;
784
+ gas?: bigint;
785
+ gasPrice?: bigint;
786
+ maxFeePerGas?: bigint;
787
+ maxPriorityFeePerGas?: bigint;
788
+ nonce?: number;
789
+ value?: bigint;
790
+ }): Promise<void> {
791
+ return contract.simulate.releaseToken([token] as const, options) as Promise<void>;
792
+ },
793
+ /**
794
+ * Simulate renounceOwnership
795
+ * Returns gas estimate and result without sending transaction
796
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
797
+ */
798
+ async renounceOwnership(options?: {
799
+ accessList?: import('viem').AccessList;
800
+ authorizationList?: import('viem').AuthorizationList;
801
+ chain?: import('viem').Chain | null;
802
+ dataSuffix?: `0x${string}`;
803
+ gas?: bigint;
804
+ gasPrice?: bigint;
805
+ maxFeePerGas?: bigint;
806
+ maxPriorityFeePerGas?: bigint;
807
+ nonce?: number;
808
+ value?: bigint;
809
+ }): Promise<void> {
810
+ return contract.simulate.renounceOwnership(options) as Promise<void>;
811
+ },
812
+ /**
813
+ * Simulate requestOwnershipHandover
814
+ * Returns gas estimate and result without sending transaction
815
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
816
+ */
817
+ async requestOwnershipHandover(options?: {
818
+ accessList?: import('viem').AccessList;
819
+ authorizationList?: import('viem').AuthorizationList;
820
+ chain?: import('viem').Chain | null;
821
+ dataSuffix?: `0x${string}`;
822
+ gas?: bigint;
823
+ gasPrice?: bigint;
824
+ maxFeePerGas?: bigint;
825
+ maxPriorityFeePerGas?: bigint;
826
+ nonce?: number;
827
+ value?: bigint;
828
+ }): Promise<void> {
829
+ return contract.simulate.requestOwnershipHandover(options) as Promise<void>;
830
+ },
831
+ /**
832
+ * Simulate setPoolBps
833
+ * Returns gas estimate and result without sending transaction
834
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
835
+ */
836
+ async setPoolBps(_poolBps: bigint, options?: {
837
+ accessList?: import('viem').AccessList;
838
+ authorizationList?: import('viem').AuthorizationList;
839
+ chain?: import('viem').Chain | null;
840
+ dataSuffix?: `0x${string}`;
841
+ gas?: bigint;
842
+ gasPrice?: bigint;
843
+ maxFeePerGas?: bigint;
844
+ maxPriorityFeePerGas?: bigint;
845
+ nonce?: number;
846
+ value?: bigint;
847
+ }): Promise<void> {
848
+ return contract.simulate.setPoolBps([_poolBps] as const, options) as Promise<void>;
849
+ },
850
+ /**
851
+ * Simulate setTeam
852
+ * Returns gas estimate and result without sending transaction
853
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
854
+ */
855
+ async setTeam(_team: `0x${string}`, options?: {
856
+ accessList?: import('viem').AccessList;
857
+ authorizationList?: import('viem').AuthorizationList;
858
+ chain?: import('viem').Chain | null;
859
+ dataSuffix?: `0x${string}`;
860
+ gas?: bigint;
861
+ gasPrice?: bigint;
862
+ maxFeePerGas?: bigint;
863
+ maxPriorityFeePerGas?: bigint;
864
+ nonce?: number;
865
+ value?: bigint;
866
+ }): Promise<void> {
867
+ return contract.simulate.setTeam([_team] as const, options) as Promise<void>;
868
+ },
869
+ /**
870
+ * Simulate transferOwnership
871
+ * Returns gas estimate and result without sending transaction
872
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
873
+ */
874
+ async transferOwnership(newOwner: `0x${string}`, options?: {
875
+ accessList?: import('viem').AccessList;
876
+ authorizationList?: import('viem').AuthorizationList;
877
+ chain?: import('viem').Chain | null;
878
+ dataSuffix?: `0x${string}`;
879
+ gas?: bigint;
880
+ gasPrice?: bigint;
881
+ maxFeePerGas?: bigint;
882
+ maxPriorityFeePerGas?: bigint;
883
+ nonce?: number;
884
+ value?: bigint;
885
+ }): Promise<void> {
886
+ return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
887
+ }
888
+ };
889
+ }
890
+
891
+ /**
892
+ * Watch contract events
893
+ *
894
+ * @example
895
+ * // Watch all Transfer events
896
+ * const unwatch = contract.watch.Transfer((event) => {
897
+ * console.log('Transfer:', event);
898
+ * });
899
+ *
900
+ * // Stop watching
901
+ * unwatch();
902
+ */
903
+ get watch() {
904
+ return {
905
+ /**
906
+ * Watch OwnershipHandoverCanceled events
907
+ * @param callback Function to call when event is emitted
908
+ * @param filter Optional filter for indexed parameters
909
+ * @returns Unwatch function to stop listening
910
+ */
911
+ OwnershipHandoverCanceled: (callback: (event: { pendingOwner: `0x${string}` }) => void, filter?: { pendingOwner: `0x${string}` }) => {
912
+ return this.publicClient.watchContractEvent({
913
+ address: this.contractAddress,
914
+ abi: NormiesRoyaltySplitter_jsonAbi,
915
+ eventName: 'OwnershipHandoverCanceled',
916
+ args: filter,
917
+ onLogs: (logs: any[]) => {
918
+ logs.forEach((log: any) => {
919
+ callback(log.args as any);
920
+ });
921
+ },
922
+ }) as () => void;
923
+ },
924
+ /**
925
+ * Watch OwnershipHandoverRequested events
926
+ * @param callback Function to call when event is emitted
927
+ * @param filter Optional filter for indexed parameters
928
+ * @returns Unwatch function to stop listening
929
+ */
930
+ OwnershipHandoverRequested: (callback: (event: { pendingOwner: `0x${string}` }) => void, filter?: { pendingOwner: `0x${string}` }) => {
931
+ return this.publicClient.watchContractEvent({
932
+ address: this.contractAddress,
933
+ abi: NormiesRoyaltySplitter_jsonAbi,
934
+ eventName: 'OwnershipHandoverRequested',
935
+ args: filter,
936
+ onLogs: (logs: any[]) => {
937
+ logs.forEach((log: any) => {
938
+ callback(log.args as any);
939
+ });
940
+ },
941
+ }) as () => void;
942
+ },
943
+ /**
944
+ * Watch OwnershipTransferred events
945
+ * @param callback Function to call when event is emitted
946
+ * @param filter Optional filter for indexed parameters
947
+ * @returns Unwatch function to stop listening
948
+ */
949
+ OwnershipTransferred: (callback: (event: { oldOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { oldOwner: `0x${string}`; newOwner: `0x${string}` }) => {
950
+ return this.publicClient.watchContractEvent({
951
+ address: this.contractAddress,
952
+ abi: NormiesRoyaltySplitter_jsonAbi,
953
+ eventName: 'OwnershipTransferred',
954
+ args: filter,
955
+ onLogs: (logs: any[]) => {
956
+ logs.forEach((log: any) => {
957
+ callback(log.args as any);
958
+ });
959
+ },
960
+ }) as () => void;
961
+ },
962
+ /**
963
+ * Watch PoolBpsSet events
964
+ * @param callback Function to call when event is emitted
965
+ * @param filter Optional filter for indexed parameters
966
+ * @returns Unwatch function to stop listening
967
+ */
968
+ PoolBpsSet: (callback: (event: { poolBps: bigint }) => void) => {
969
+ return this.publicClient.watchContractEvent({
970
+ address: this.contractAddress,
971
+ abi: NormiesRoyaltySplitter_jsonAbi,
972
+ eventName: 'PoolBpsSet',
973
+
974
+ onLogs: (logs: any[]) => {
975
+ logs.forEach((log: any) => {
976
+ callback(log.args as any);
977
+ });
978
+ },
979
+ }) as () => void;
980
+ },
981
+ /**
982
+ * Watch Released events
983
+ * @param callback Function to call when event is emitted
984
+ * @param filter Optional filter for indexed parameters
985
+ * @returns Unwatch function to stop listening
986
+ */
987
+ Released: (callback: (event: { toPool: bigint; toTeam: bigint }) => void) => {
988
+ return this.publicClient.watchContractEvent({
989
+ address: this.contractAddress,
990
+ abi: NormiesRoyaltySplitter_jsonAbi,
991
+ eventName: 'Released',
992
+
993
+ onLogs: (logs: any[]) => {
994
+ logs.forEach((log: any) => {
995
+ callback(log.args as any);
996
+ });
997
+ },
998
+ }) as () => void;
999
+ },
1000
+ /**
1001
+ * Watch TeamSet events
1002
+ * @param callback Function to call when event is emitted
1003
+ * @param filter Optional filter for indexed parameters
1004
+ * @returns Unwatch function to stop listening
1005
+ */
1006
+ TeamSet: (callback: (event: { team: `0x${string}` }) => void, filter?: { team: `0x${string}` }) => {
1007
+ return this.publicClient.watchContractEvent({
1008
+ address: this.contractAddress,
1009
+ abi: NormiesRoyaltySplitter_jsonAbi,
1010
+ eventName: 'TeamSet',
1011
+ args: filter,
1012
+ onLogs: (logs: any[]) => {
1013
+ logs.forEach((log: any) => {
1014
+ callback(log.args as any);
1015
+ });
1016
+ },
1017
+ }) as () => void;
1018
+ },
1019
+ /**
1020
+ * Watch TokenReleased events
1021
+ * @param callback Function to call when event is emitted
1022
+ * @param filter Optional filter for indexed parameters
1023
+ * @returns Unwatch function to stop listening
1024
+ */
1025
+ TokenReleased: (callback: (event: { token: `0x${string}`; poolShare: bigint; teamShare: bigint }) => void, filter?: { token: `0x${string}` }) => {
1026
+ return this.publicClient.watchContractEvent({
1027
+ address: this.contractAddress,
1028
+ abi: NormiesRoyaltySplitter_jsonAbi,
1029
+ eventName: 'TokenReleased',
1030
+ args: filter,
1031
+ onLogs: (logs: any[]) => {
1032
+ logs.forEach((log: any) => {
1033
+ callback(log.args as any);
1034
+ });
1035
+ },
1036
+ }) as () => void;
1037
+ }
1038
+ };
1039
+ }
1040
+ }