@gitmyabi/vault 1.0.5 → 1.0.8

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.
@@ -11,40 +11,205 @@ exports.Vault_jsonAbi = [
11
11
  {
12
12
  "inputs": [
13
13
  {
14
- "internalType": "bytes32",
15
- "name": "seal_",
16
- "type": "bytes32"
14
+ "internalType": "contract IERC721",
15
+ "name": "_nftContract",
16
+ "type": "address"
17
+ },
18
+ {
19
+ "internalType": "uint256",
20
+ "name": "_emergencyPenalty",
21
+ "type": "uint256"
22
+ },
23
+ {
24
+ "internalType": "address",
25
+ "name": "_emergencyPenaltyReceiver",
26
+ "type": "address"
27
+ },
28
+ {
29
+ "internalType": "uint256",
30
+ "name": "_successFee",
31
+ "type": "uint256"
32
+ },
33
+ {
34
+ "internalType": "address",
35
+ "name": "_successFeeReceiver",
36
+ "type": "address"
17
37
  }
18
38
  ],
19
39
  "stateMutability": "nonpayable",
20
40
  "type": "constructor"
21
41
  },
42
+ {
43
+ "inputs": [
44
+ {
45
+ "internalType": "address",
46
+ "name": "owner",
47
+ "type": "address"
48
+ }
49
+ ],
50
+ "name": "OwnableInvalidOwner",
51
+ "type": "error"
52
+ },
53
+ {
54
+ "inputs": [
55
+ {
56
+ "internalType": "address",
57
+ "name": "account",
58
+ "type": "address"
59
+ }
60
+ ],
61
+ "name": "OwnableUnauthorizedAccount",
62
+ "type": "error"
63
+ },
64
+ {
65
+ "inputs": [],
66
+ "name": "ReentrancyGuardReentrantCall",
67
+ "type": "error"
68
+ },
69
+ {
70
+ "inputs": [
71
+ {
72
+ "internalType": "address",
73
+ "name": "token",
74
+ "type": "address"
75
+ }
76
+ ],
77
+ "name": "SafeERC20FailedOperation",
78
+ "type": "error"
79
+ },
80
+ {
81
+ "anonymous": false,
82
+ "inputs": [
83
+ {
84
+ "indexed": false,
85
+ "internalType": "uint256",
86
+ "name": "uid",
87
+ "type": "uint256"
88
+ },
89
+ {
90
+ "indexed": false,
91
+ "internalType": "uint256",
92
+ "name": "startTimestamp",
93
+ "type": "uint256"
94
+ },
95
+ {
96
+ "indexed": false,
97
+ "internalType": "uint256",
98
+ "name": "endTimestamp",
99
+ "type": "uint256"
100
+ },
101
+ {
102
+ "indexed": false,
103
+ "internalType": "address[]",
104
+ "name": "tokens",
105
+ "type": "address[]"
106
+ },
107
+ {
108
+ "indexed": false,
109
+ "internalType": "uint256[]",
110
+ "name": "amounts",
111
+ "type": "uint256[]"
112
+ },
113
+ {
114
+ "indexed": false,
115
+ "internalType": "uint256[]",
116
+ "name": "prices",
117
+ "type": "uint256[]"
118
+ },
119
+ {
120
+ "indexed": false,
121
+ "internalType": "address",
122
+ "name": "receiver",
123
+ "type": "address"
124
+ }
125
+ ],
126
+ "name": "NewDeposit",
127
+ "type": "event"
128
+ },
22
129
  {
23
130
  "anonymous": false,
24
131
  "inputs": [
25
132
  {
26
133
  "indexed": true,
27
134
  "internalType": "address",
28
- "name": "to",
135
+ "name": "previousOwner",
29
136
  "type": "address"
30
137
  },
138
+ {
139
+ "indexed": true,
140
+ "internalType": "address",
141
+ "name": "newOwner",
142
+ "type": "address"
143
+ }
144
+ ],
145
+ "name": "OwnershipTransferred",
146
+ "type": "event"
147
+ },
148
+ {
149
+ "anonymous": false,
150
+ "inputs": [
31
151
  {
32
152
  "indexed": false,
33
153
  "internalType": "uint256",
34
- "name": "amount",
154
+ "name": "emergencyPenalty",
35
155
  "type": "uint256"
36
156
  }
37
157
  ],
38
- "name": "Found",
158
+ "name": "SetEmergencyPenalty",
39
159
  "type": "event"
40
160
  },
41
161
  {
42
162
  "anonymous": false,
43
163
  "inputs": [
44
164
  {
45
- "indexed": true,
165
+ "indexed": false,
166
+ "internalType": "address",
167
+ "name": "emergencyPenaltyReceiver",
168
+ "type": "address"
169
+ }
170
+ ],
171
+ "name": "SetEmergencyPenaltyReceiver",
172
+ "type": "event"
173
+ },
174
+ {
175
+ "anonymous": false,
176
+ "inputs": [
177
+ {
178
+ "indexed": false,
179
+ "internalType": "uint256",
180
+ "name": "successFee",
181
+ "type": "uint256"
182
+ }
183
+ ],
184
+ "name": "SetSuccessFee",
185
+ "type": "event"
186
+ },
187
+ {
188
+ "anonymous": false,
189
+ "inputs": [
190
+ {
191
+ "indexed": false,
192
+ "internalType": "address",
193
+ "name": "successFeeReceiver",
194
+ "type": "address"
195
+ }
196
+ ],
197
+ "name": "SetSuccessFeeReceiver",
198
+ "type": "event"
199
+ },
200
+ {
201
+ "anonymous": false,
202
+ "inputs": [
203
+ {
204
+ "indexed": false,
205
+ "internalType": "uint256",
206
+ "name": "uid",
207
+ "type": "uint256"
208
+ },
209
+ {
210
+ "indexed": false,
46
211
  "internalType": "address",
47
- "name": "from",
212
+ "name": "token",
48
213
  "type": "address"
49
214
  },
50
215
  {
@@ -54,25 +219,74 @@ exports.Vault_jsonAbi = [
54
219
  "type": "uint256"
55
220
  }
56
221
  ],
57
- "name": "Funded",
222
+ "name": "SuccessFeeCharged",
58
223
  "type": "event"
59
224
  },
60
225
  {
61
- "inputs": [],
62
- "name": "SEAL",
63
- "outputs": [
226
+ "anonymous": false,
227
+ "inputs": [
228
+ {
229
+ "indexed": false,
230
+ "internalType": "address",
231
+ "name": "token",
232
+ "type": "address"
233
+ },
234
+ {
235
+ "indexed": false,
236
+ "internalType": "address",
237
+ "name": "stateView",
238
+ "type": "address"
239
+ },
64
240
  {
241
+ "indexed": false,
65
242
  "internalType": "bytes32",
66
- "name": "",
243
+ "name": "poolId",
67
244
  "type": "bytes32"
245
+ },
246
+ {
247
+ "indexed": false,
248
+ "internalType": "bool",
249
+ "name": "isToken0",
250
+ "type": "bool"
251
+ },
252
+ {
253
+ "indexed": false,
254
+ "internalType": "bool",
255
+ "name": "status",
256
+ "type": "bool"
68
257
  }
69
258
  ],
70
- "stateMutability": "view",
71
- "type": "function"
259
+ "name": "TokenUpdated",
260
+ "type": "event"
261
+ },
262
+ {
263
+ "anonymous": false,
264
+ "inputs": [
265
+ {
266
+ "indexed": true,
267
+ "internalType": "address",
268
+ "name": "user",
269
+ "type": "address"
270
+ },
271
+ {
272
+ "indexed": false,
273
+ "internalType": "uint256",
274
+ "name": "uid",
275
+ "type": "uint256"
276
+ },
277
+ {
278
+ "indexed": false,
279
+ "internalType": "bool",
280
+ "name": "isEmergency",
281
+ "type": "bool"
282
+ }
283
+ ],
284
+ "name": "Withdraw",
285
+ "type": "event"
72
286
  },
73
287
  {
74
288
  "inputs": [],
75
- "name": "balance",
289
+ "name": "FEES_DECIMALS",
76
290
  "outputs": [
77
291
  {
78
292
  "internalType": "uint256",
@@ -85,12 +299,12 @@ exports.Vault_jsonAbi = [
85
299
  },
86
300
  {
87
301
  "inputs": [],
88
- "name": "found",
302
+ "name": "MAX_TERM",
89
303
  "outputs": [
90
304
  {
91
- "internalType": "bool",
305
+ "internalType": "uint256",
92
306
  "name": "",
93
- "type": "bool"
307
+ "type": "uint256"
94
308
  }
95
309
  ],
96
310
  "stateMutability": "view",
@@ -98,25 +312,51 @@ exports.Vault_jsonAbi = [
98
312
  },
99
313
  {
100
314
  "inputs": [],
101
- "name": "rules",
315
+ "name": "MAX_TOKENS_IN_DEPOSIT",
102
316
  "outputs": [
103
317
  {
104
- "internalType": "string",
318
+ "internalType": "uint256",
105
319
  "name": "",
106
- "type": "string"
320
+ "type": "uint256"
107
321
  }
108
322
  ],
109
- "stateMutability": "pure",
323
+ "stateMutability": "view",
110
324
  "type": "function"
111
325
  },
112
326
  {
113
- "inputs": [],
114
- "name": "state",
115
- "outputs": [
327
+ "inputs": [
116
328
  {
117
- "internalType": "string",
329
+ "internalType": "address",
118
330
  "name": "",
119
- "type": "string"
331
+ "type": "address"
332
+ }
333
+ ],
334
+ "name": "allowedTokens",
335
+ "outputs": [
336
+ {
337
+ "internalType": "address",
338
+ "name": "token",
339
+ "type": "address"
340
+ },
341
+ {
342
+ "internalType": "address",
343
+ "name": "stateView",
344
+ "type": "address"
345
+ },
346
+ {
347
+ "internalType": "bytes32",
348
+ "name": "poolId",
349
+ "type": "bytes32"
350
+ },
351
+ {
352
+ "internalType": "bool",
353
+ "name": "isToken0",
354
+ "type": "bool"
355
+ },
356
+ {
357
+ "internalType": "bool",
358
+ "name": "status",
359
+ "type": "bool"
120
360
  }
121
361
  ],
122
362
  "stateMutability": "view",
@@ -125,51 +365,377 @@ exports.Vault_jsonAbi = [
125
365
  {
126
366
  "inputs": [
127
367
  {
128
- "internalType": "bytes",
129
- "name": "secret",
130
- "type": "bytes"
131
- },
368
+ "internalType": "uint256",
369
+ "name": "_newEmergencyPenalty",
370
+ "type": "uint256"
371
+ }
372
+ ],
373
+ "name": "changeEmergencyPenalty",
374
+ "outputs": [],
375
+ "stateMutability": "nonpayable",
376
+ "type": "function"
377
+ },
378
+ {
379
+ "inputs": [
132
380
  {
133
- "internalType": "address payable",
134
- "name": "to",
381
+ "internalType": "address",
382
+ "name": "_newEmergencyPenaltyReveiver",
135
383
  "type": "address"
136
384
  }
137
385
  ],
138
- "name": "unlock",
386
+ "name": "changeEmergencyPenaltyReceiver",
139
387
  "outputs": [],
140
388
  "stateMutability": "nonpayable",
141
389
  "type": "function"
142
390
  },
143
391
  {
144
- "stateMutability": "payable",
145
- "type": "receive"
146
- }
147
- ];
148
- /**
149
- * Vault_json Contract Class
150
- *
151
- * Provides a class-based API similar to TypeChain for interacting with the contract.
152
- *
153
- * @example
154
- * ```typescript
155
- * import { createPublicClient, createWalletClient, http } from 'viem';
156
- * import { mainnet } from 'viem/chains';
157
- * import { Vault_json } from 'Vault_json';
158
- *
159
- * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
160
- * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
161
- *
162
- * const contract = new Vault_json('0x...', { publicClient, walletClient });
163
- *
164
- * // Read functions
165
- * const result = await contract.balanceOf('0x...');
166
- *
167
- * // Write functions
168
- * const hash = await contract.transfer('0x...', 1000n);
169
- *
170
- * // Simulate transactions (dry-run)
171
- * const simulation = await contract.simulate.transfer('0x...', 1000n);
172
- * console.log('Gas estimate:', simulation.request.gas);
392
+ "inputs": [
393
+ {
394
+ "internalType": "uint256",
395
+ "name": "_newSuccessFee",
396
+ "type": "uint256"
397
+ }
398
+ ],
399
+ "name": "changeSuccessFee",
400
+ "outputs": [],
401
+ "stateMutability": "nonpayable",
402
+ "type": "function"
403
+ },
404
+ {
405
+ "inputs": [
406
+ {
407
+ "internalType": "address",
408
+ "name": "_successFeeReceiver",
409
+ "type": "address"
410
+ }
411
+ ],
412
+ "name": "changeSuccessFeeReceiver",
413
+ "outputs": [],
414
+ "stateMutability": "nonpayable",
415
+ "type": "function"
416
+ },
417
+ {
418
+ "inputs": [
419
+ {
420
+ "internalType": "address[]",
421
+ "name": "_tokens",
422
+ "type": "address[]"
423
+ },
424
+ {
425
+ "internalType": "uint256[]",
426
+ "name": "_amounts",
427
+ "type": "uint256[]"
428
+ },
429
+ {
430
+ "internalType": "uint256",
431
+ "name": "_term",
432
+ "type": "uint256"
433
+ },
434
+ {
435
+ "internalType": "address",
436
+ "name": "receiver",
437
+ "type": "address"
438
+ }
439
+ ],
440
+ "name": "createDeposit",
441
+ "outputs": [
442
+ {
443
+ "internalType": "uint256",
444
+ "name": "",
445
+ "type": "uint256"
446
+ }
447
+ ],
448
+ "stateMutability": "nonpayable",
449
+ "type": "function"
450
+ },
451
+ {
452
+ "inputs": [
453
+ {
454
+ "internalType": "uint256",
455
+ "name": "",
456
+ "type": "uint256"
457
+ }
458
+ ],
459
+ "name": "deposits",
460
+ "outputs": [
461
+ {
462
+ "internalType": "uint256",
463
+ "name": "startTimestamp",
464
+ "type": "uint256"
465
+ },
466
+ {
467
+ "internalType": "uint256",
468
+ "name": "endTimestamp",
469
+ "type": "uint256"
470
+ },
471
+ {
472
+ "internalType": "bool",
473
+ "name": "active",
474
+ "type": "bool"
475
+ }
476
+ ],
477
+ "stateMutability": "view",
478
+ "type": "function"
479
+ },
480
+ {
481
+ "inputs": [],
482
+ "name": "emergencyPenalty",
483
+ "outputs": [
484
+ {
485
+ "internalType": "uint256",
486
+ "name": "",
487
+ "type": "uint256"
488
+ }
489
+ ],
490
+ "stateMutability": "view",
491
+ "type": "function"
492
+ },
493
+ {
494
+ "inputs": [],
495
+ "name": "emergencyPenaltyReceiver",
496
+ "outputs": [
497
+ {
498
+ "internalType": "address",
499
+ "name": "",
500
+ "type": "address"
501
+ }
502
+ ],
503
+ "stateMutability": "view",
504
+ "type": "function"
505
+ },
506
+ {
507
+ "inputs": [
508
+ {
509
+ "internalType": "uint256",
510
+ "name": "_uid",
511
+ "type": "uint256"
512
+ }
513
+ ],
514
+ "name": "emergencyWithdraw",
515
+ "outputs": [],
516
+ "stateMutability": "nonpayable",
517
+ "type": "function"
518
+ },
519
+ {
520
+ "inputs": [
521
+ {
522
+ "internalType": "uint256",
523
+ "name": "_uid",
524
+ "type": "uint256"
525
+ }
526
+ ],
527
+ "name": "getDepositProfit",
528
+ "outputs": [
529
+ {
530
+ "internalType": "uint256",
531
+ "name": "",
532
+ "type": "uint256"
533
+ }
534
+ ],
535
+ "stateMutability": "view",
536
+ "type": "function"
537
+ },
538
+ {
539
+ "inputs": [],
540
+ "name": "nftContract",
541
+ "outputs": [
542
+ {
543
+ "internalType": "contract IERC721",
544
+ "name": "",
545
+ "type": "address"
546
+ }
547
+ ],
548
+ "stateMutability": "view",
549
+ "type": "function"
550
+ },
551
+ {
552
+ "inputs": [],
553
+ "name": "owner",
554
+ "outputs": [
555
+ {
556
+ "internalType": "address",
557
+ "name": "",
558
+ "type": "address"
559
+ }
560
+ ],
561
+ "stateMutability": "view",
562
+ "type": "function"
563
+ },
564
+ {
565
+ "inputs": [],
566
+ "name": "renounceOwnership",
567
+ "outputs": [],
568
+ "stateMutability": "nonpayable",
569
+ "type": "function"
570
+ },
571
+ {
572
+ "inputs": [
573
+ {
574
+ "internalType": "address",
575
+ "name": "_token",
576
+ "type": "address"
577
+ },
578
+ {
579
+ "internalType": "address",
580
+ "name": "_stateView",
581
+ "type": "address"
582
+ },
583
+ {
584
+ "internalType": "bytes32",
585
+ "name": "_poolId",
586
+ "type": "bytes32"
587
+ },
588
+ {
589
+ "internalType": "bool",
590
+ "name": "_isToken0",
591
+ "type": "bool"
592
+ },
593
+ {
594
+ "internalType": "bool",
595
+ "name": "_status",
596
+ "type": "bool"
597
+ }
598
+ ],
599
+ "name": "setAllowedToken",
600
+ "outputs": [],
601
+ "stateMutability": "nonpayable",
602
+ "type": "function"
603
+ },
604
+ {
605
+ "inputs": [],
606
+ "name": "successFee",
607
+ "outputs": [
608
+ {
609
+ "internalType": "uint256",
610
+ "name": "",
611
+ "type": "uint256"
612
+ }
613
+ ],
614
+ "stateMutability": "view",
615
+ "type": "function"
616
+ },
617
+ {
618
+ "inputs": [],
619
+ "name": "successFeeReceiver",
620
+ "outputs": [
621
+ {
622
+ "internalType": "address",
623
+ "name": "",
624
+ "type": "address"
625
+ }
626
+ ],
627
+ "stateMutability": "view",
628
+ "type": "function"
629
+ },
630
+ {
631
+ "inputs": [
632
+ {
633
+ "internalType": "address",
634
+ "name": "newOwner",
635
+ "type": "address"
636
+ }
637
+ ],
638
+ "name": "transferOwnership",
639
+ "outputs": [],
640
+ "stateMutability": "nonpayable",
641
+ "type": "function"
642
+ },
643
+ {
644
+ "inputs": [
645
+ {
646
+ "internalType": "uint256",
647
+ "name": "_uid",
648
+ "type": "uint256"
649
+ }
650
+ ],
651
+ "name": "viewAmountListById",
652
+ "outputs": [
653
+ {
654
+ "internalType": "uint256[]",
655
+ "name": "",
656
+ "type": "uint256[]"
657
+ }
658
+ ],
659
+ "stateMutability": "view",
660
+ "type": "function"
661
+ },
662
+ {
663
+ "inputs": [
664
+ {
665
+ "internalType": "uint256",
666
+ "name": "_uid",
667
+ "type": "uint256"
668
+ }
669
+ ],
670
+ "name": "viewStartPriceX96ListById",
671
+ "outputs": [
672
+ {
673
+ "internalType": "uint256[]",
674
+ "name": "",
675
+ "type": "uint256[]"
676
+ }
677
+ ],
678
+ "stateMutability": "view",
679
+ "type": "function"
680
+ },
681
+ {
682
+ "inputs": [
683
+ {
684
+ "internalType": "uint256",
685
+ "name": "_uid",
686
+ "type": "uint256"
687
+ }
688
+ ],
689
+ "name": "viewTokenListById",
690
+ "outputs": [
691
+ {
692
+ "internalType": "address[]",
693
+ "name": "",
694
+ "type": "address[]"
695
+ }
696
+ ],
697
+ "stateMutability": "view",
698
+ "type": "function"
699
+ },
700
+ {
701
+ "inputs": [
702
+ {
703
+ "internalType": "uint256",
704
+ "name": "_uid",
705
+ "type": "uint256"
706
+ }
707
+ ],
708
+ "name": "withdraw",
709
+ "outputs": [],
710
+ "stateMutability": "nonpayable",
711
+ "type": "function"
712
+ }
713
+ ];
714
+ /**
715
+ * Vault_json Contract Class
716
+ *
717
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
718
+ *
719
+ * @example
720
+ * ```typescript
721
+ * import { createPublicClient, createWalletClient, http } from 'viem';
722
+ * import { mainnet } from 'viem/chains';
723
+ * import { Vault_json } from 'Vault_json';
724
+ *
725
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
726
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
727
+ *
728
+ * const contract = new Vault_json('0x...', { publicClient, walletClient });
729
+ *
730
+ * // Read functions
731
+ * const result = await contract.balanceOf('0x...');
732
+ *
733
+ * // Write functions
734
+ * const hash = await contract.transfer('0x...', 1000n);
735
+ *
736
+ * // Simulate transactions (dry-run)
737
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
738
+ * console.log('Gas estimate:', simulation.request.gas);
173
739
  *
174
740
  * // Watch events
175
741
  * const unwatch = contract.watch.Transfer((event) => {
@@ -191,62 +757,231 @@ class Vault_json {
191
757
  });
192
758
  }
193
759
  /**
194
- * Get the contract address
760
+ * Get the contract address
761
+ */
762
+ get address() {
763
+ return this.contractAddress;
764
+ }
765
+ /**
766
+ * Get the underlying viem contract instance
767
+ */
768
+ getContract() {
769
+ return this.contract;
770
+ }
771
+ /**
772
+ * FEES_DECIMALS
773
+ * view
774
+ */
775
+ async FEES_DECIMALS() {
776
+ return this.contract.read.FEES_DECIMALS();
777
+ }
778
+ /**
779
+ * MAX_TERM
780
+ * view
781
+ */
782
+ async MAX_TERM() {
783
+ return this.contract.read.MAX_TERM();
784
+ }
785
+ /**
786
+ * MAX_TOKENS_IN_DEPOSIT
787
+ * view
195
788
  */
196
- get address() {
197
- return this.contractAddress;
789
+ async MAX_TOKENS_IN_DEPOSIT() {
790
+ return this.contract.read.MAX_TOKENS_IN_DEPOSIT();
198
791
  }
199
792
  /**
200
- * Get the underlying viem contract instance
793
+ * allowedTokens
794
+ * view
201
795
  */
202
- getContract() {
203
- return this.contract;
796
+ async allowedTokens(arg0) {
797
+ return this.contract.read.allowedTokens([arg0]);
798
+ }
799
+ /**
800
+ * deposits
801
+ * view
802
+ */
803
+ async deposits(arg0) {
804
+ return this.contract.read.deposits([arg0]);
805
+ }
806
+ /**
807
+ * emergencyPenalty
808
+ * view
809
+ */
810
+ async emergencyPenalty() {
811
+ return this.contract.read.emergencyPenalty();
812
+ }
813
+ /**
814
+ * emergencyPenaltyReceiver
815
+ * view
816
+ */
817
+ async emergencyPenaltyReceiver() {
818
+ return this.contract.read.emergencyPenaltyReceiver();
819
+ }
820
+ /**
821
+ * getDepositProfit
822
+ * view
823
+ */
824
+ async getDepositProfit(_uid) {
825
+ return this.contract.read.getDepositProfit([_uid]);
826
+ }
827
+ /**
828
+ * nftContract
829
+ * view
830
+ */
831
+ async nftContract() {
832
+ return this.contract.read.nftContract();
833
+ }
834
+ /**
835
+ * owner
836
+ * view
837
+ */
838
+ async owner() {
839
+ return this.contract.read.owner();
204
840
  }
205
841
  /**
206
- * SEAL
842
+ * successFee
207
843
  * view
208
844
  */
209
- async SEAL() {
210
- return this.contract.read.SEAL();
845
+ async successFee() {
846
+ return this.contract.read.successFee();
211
847
  }
212
848
  /**
213
- * balance
849
+ * successFeeReceiver
214
850
  * view
215
851
  */
216
- async balance() {
217
- return this.contract.read.balance();
852
+ async successFeeReceiver() {
853
+ return this.contract.read.successFeeReceiver();
218
854
  }
219
855
  /**
220
- * found
856
+ * viewAmountListById
221
857
  * view
222
858
  */
223
- async found() {
224
- return this.contract.read.found();
859
+ async viewAmountListById(_uid) {
860
+ return this.contract.read.viewAmountListById([_uid]);
225
861
  }
226
862
  /**
227
- * rules
228
- * pure
863
+ * viewStartPriceX96ListById
864
+ * view
229
865
  */
230
- async rules() {
231
- return this.contract.read.rules();
866
+ async viewStartPriceX96ListById(_uid) {
867
+ return this.contract.read.viewStartPriceX96ListById([_uid]);
232
868
  }
233
869
  /**
234
- * state
870
+ * viewTokenListById
235
871
  * view
236
872
  */
237
- async state() {
238
- return this.contract.read.state();
873
+ async viewTokenListById(_uid) {
874
+ return this.contract.read.viewTokenListById([_uid]);
875
+ }
876
+ /**
877
+ * changeEmergencyPenalty
878
+ * nonpayable
879
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
880
+ */
881
+ async changeEmergencyPenalty(_newEmergencyPenalty, options) {
882
+ if (!this.contract.write) {
883
+ throw new Error('Wallet client is required for write operations');
884
+ }
885
+ return this.contract.write.changeEmergencyPenalty([_newEmergencyPenalty], options);
886
+ }
887
+ /**
888
+ * changeEmergencyPenaltyReceiver
889
+ * nonpayable
890
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
891
+ */
892
+ async changeEmergencyPenaltyReceiver(_newEmergencyPenaltyReveiver, options) {
893
+ if (!this.contract.write) {
894
+ throw new Error('Wallet client is required for write operations');
895
+ }
896
+ return this.contract.write.changeEmergencyPenaltyReceiver([_newEmergencyPenaltyReveiver], options);
897
+ }
898
+ /**
899
+ * changeSuccessFee
900
+ * nonpayable
901
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
902
+ */
903
+ async changeSuccessFee(_newSuccessFee, options) {
904
+ if (!this.contract.write) {
905
+ throw new Error('Wallet client is required for write operations');
906
+ }
907
+ return this.contract.write.changeSuccessFee([_newSuccessFee], options);
908
+ }
909
+ /**
910
+ * changeSuccessFeeReceiver
911
+ * nonpayable
912
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
913
+ */
914
+ async changeSuccessFeeReceiver(_successFeeReceiver, options) {
915
+ if (!this.contract.write) {
916
+ throw new Error('Wallet client is required for write operations');
917
+ }
918
+ return this.contract.write.changeSuccessFeeReceiver([_successFeeReceiver], options);
919
+ }
920
+ /**
921
+ * createDeposit
922
+ * nonpayable
923
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
924
+ */
925
+ async createDeposit(_tokens, _amounts, _term, receiver, options) {
926
+ if (!this.contract.write) {
927
+ throw new Error('Wallet client is required for write operations');
928
+ }
929
+ return this.contract.write.createDeposit([_tokens, _amounts, _term, receiver], options);
930
+ }
931
+ /**
932
+ * emergencyWithdraw
933
+ * nonpayable
934
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
935
+ */
936
+ async emergencyWithdraw(_uid, options) {
937
+ if (!this.contract.write) {
938
+ throw new Error('Wallet client is required for write operations');
939
+ }
940
+ return this.contract.write.emergencyWithdraw([_uid], options);
941
+ }
942
+ /**
943
+ * renounceOwnership
944
+ * nonpayable
945
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
946
+ */
947
+ async renounceOwnership(options) {
948
+ if (!this.contract.write) {
949
+ throw new Error('Wallet client is required for write operations');
950
+ }
951
+ return this.contract.write.renounceOwnership(options);
952
+ }
953
+ /**
954
+ * setAllowedToken
955
+ * nonpayable
956
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
957
+ */
958
+ async setAllowedToken(_token, _stateView, _poolId, _isToken0, _status, options) {
959
+ if (!this.contract.write) {
960
+ throw new Error('Wallet client is required for write operations');
961
+ }
962
+ return this.contract.write.setAllowedToken([_token, _stateView, _poolId, _isToken0, _status], options);
963
+ }
964
+ /**
965
+ * transferOwnership
966
+ * nonpayable
967
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
968
+ */
969
+ async transferOwnership(newOwner, options) {
970
+ if (!this.contract.write) {
971
+ throw new Error('Wallet client is required for write operations');
972
+ }
973
+ return this.contract.write.transferOwnership([newOwner], options);
239
974
  }
240
975
  /**
241
- * unlock
976
+ * withdraw
242
977
  * nonpayable
243
978
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
244
979
  */
245
- async unlock(secret, to, options) {
980
+ async withdraw(_uid, options) {
246
981
  if (!this.contract.write) {
247
982
  throw new Error('Wallet client is required for write operations');
248
983
  }
249
- return this.contract.write.unlock([secret, to], options);
984
+ return this.contract.write.withdraw([_uid], options);
250
985
  }
251
986
  /**
252
987
  * Simulate contract write operations (dry-run without sending transaction)
@@ -263,12 +998,84 @@ class Vault_json {
263
998
  }
264
999
  return {
265
1000
  /**
266
- * Simulate unlock
1001
+ * Simulate changeEmergencyPenalty
1002
+ * Returns gas estimate and result without sending transaction
1003
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1004
+ */
1005
+ async changeEmergencyPenalty(_newEmergencyPenalty, options) {
1006
+ return contract.simulate.changeEmergencyPenalty([_newEmergencyPenalty], options);
1007
+ },
1008
+ /**
1009
+ * Simulate changeEmergencyPenaltyReceiver
1010
+ * Returns gas estimate and result without sending transaction
1011
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1012
+ */
1013
+ async changeEmergencyPenaltyReceiver(_newEmergencyPenaltyReveiver, options) {
1014
+ return contract.simulate.changeEmergencyPenaltyReceiver([_newEmergencyPenaltyReveiver], options);
1015
+ },
1016
+ /**
1017
+ * Simulate changeSuccessFee
1018
+ * Returns gas estimate and result without sending transaction
1019
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1020
+ */
1021
+ async changeSuccessFee(_newSuccessFee, options) {
1022
+ return contract.simulate.changeSuccessFee([_newSuccessFee], options);
1023
+ },
1024
+ /**
1025
+ * Simulate changeSuccessFeeReceiver
1026
+ * Returns gas estimate and result without sending transaction
1027
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1028
+ */
1029
+ async changeSuccessFeeReceiver(_successFeeReceiver, options) {
1030
+ return contract.simulate.changeSuccessFeeReceiver([_successFeeReceiver], options);
1031
+ },
1032
+ /**
1033
+ * Simulate createDeposit
1034
+ * Returns gas estimate and result without sending transaction
1035
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1036
+ */
1037
+ async createDeposit(_tokens, _amounts, _term, receiver, options) {
1038
+ return contract.simulate.createDeposit([_tokens, _amounts, _term, receiver], options);
1039
+ },
1040
+ /**
1041
+ * Simulate emergencyWithdraw
1042
+ * Returns gas estimate and result without sending transaction
1043
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1044
+ */
1045
+ async emergencyWithdraw(_uid, options) {
1046
+ return contract.simulate.emergencyWithdraw([_uid], options);
1047
+ },
1048
+ /**
1049
+ * Simulate renounceOwnership
1050
+ * Returns gas estimate and result without sending transaction
1051
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1052
+ */
1053
+ async renounceOwnership(options) {
1054
+ return contract.simulate.renounceOwnership(options);
1055
+ },
1056
+ /**
1057
+ * Simulate setAllowedToken
1058
+ * Returns gas estimate and result without sending transaction
1059
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1060
+ */
1061
+ async setAllowedToken(_token, _stateView, _poolId, _isToken0, _status, options) {
1062
+ return contract.simulate.setAllowedToken([_token, _stateView, _poolId, _isToken0, _status], options);
1063
+ },
1064
+ /**
1065
+ * Simulate transferOwnership
1066
+ * Returns gas estimate and result without sending transaction
1067
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1068
+ */
1069
+ async transferOwnership(newOwner, options) {
1070
+ return contract.simulate.transferOwnership([newOwner], options);
1071
+ },
1072
+ /**
1073
+ * Simulate withdraw
267
1074
  * Returns gas estimate and result without sending transaction
268
1075
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
269
1076
  */
270
- async unlock(secret, to, options) {
271
- return contract.simulate.unlock([secret, to], options);
1077
+ async withdraw(_uid, options) {
1078
+ return contract.simulate.withdraw([_uid], options);
272
1079
  }
273
1080
  };
274
1081
  }
@@ -287,16 +1094,34 @@ class Vault_json {
287
1094
  get watch() {
288
1095
  return {
289
1096
  /**
290
- * Watch Found events
1097
+ * Watch NewDeposit events
1098
+ * @param callback Function to call when event is emitted
1099
+ * @param filter Optional filter for indexed parameters
1100
+ * @returns Unwatch function to stop listening
1101
+ */
1102
+ NewDeposit: (callback) => {
1103
+ return this.publicClient.watchContractEvent({
1104
+ address: this.contractAddress,
1105
+ abi: exports.Vault_jsonAbi,
1106
+ eventName: 'NewDeposit',
1107
+ onLogs: (logs) => {
1108
+ logs.forEach((log) => {
1109
+ callback(log.args);
1110
+ });
1111
+ },
1112
+ });
1113
+ },
1114
+ /**
1115
+ * Watch OwnershipTransferred events
291
1116
  * @param callback Function to call when event is emitted
292
1117
  * @param filter Optional filter for indexed parameters
293
1118
  * @returns Unwatch function to stop listening
294
1119
  */
295
- Found: (callback, filter) => {
1120
+ OwnershipTransferred: (callback, filter) => {
296
1121
  return this.publicClient.watchContractEvent({
297
1122
  address: this.contractAddress,
298
1123
  abi: exports.Vault_jsonAbi,
299
- eventName: 'Found',
1124
+ eventName: 'OwnershipTransferred',
300
1125
  args: filter,
301
1126
  onLogs: (logs) => {
302
1127
  logs.forEach((log) => {
@@ -306,16 +1131,124 @@ class Vault_json {
306
1131
  });
307
1132
  },
308
1133
  /**
309
- * Watch Funded events
1134
+ * Watch SetEmergencyPenalty events
1135
+ * @param callback Function to call when event is emitted
1136
+ * @param filter Optional filter for indexed parameters
1137
+ * @returns Unwatch function to stop listening
1138
+ */
1139
+ SetEmergencyPenalty: (callback) => {
1140
+ return this.publicClient.watchContractEvent({
1141
+ address: this.contractAddress,
1142
+ abi: exports.Vault_jsonAbi,
1143
+ eventName: 'SetEmergencyPenalty',
1144
+ onLogs: (logs) => {
1145
+ logs.forEach((log) => {
1146
+ callback(log.args);
1147
+ });
1148
+ },
1149
+ });
1150
+ },
1151
+ /**
1152
+ * Watch SetEmergencyPenaltyReceiver events
1153
+ * @param callback Function to call when event is emitted
1154
+ * @param filter Optional filter for indexed parameters
1155
+ * @returns Unwatch function to stop listening
1156
+ */
1157
+ SetEmergencyPenaltyReceiver: (callback) => {
1158
+ return this.publicClient.watchContractEvent({
1159
+ address: this.contractAddress,
1160
+ abi: exports.Vault_jsonAbi,
1161
+ eventName: 'SetEmergencyPenaltyReceiver',
1162
+ onLogs: (logs) => {
1163
+ logs.forEach((log) => {
1164
+ callback(log.args);
1165
+ });
1166
+ },
1167
+ });
1168
+ },
1169
+ /**
1170
+ * Watch SetSuccessFee events
1171
+ * @param callback Function to call when event is emitted
1172
+ * @param filter Optional filter for indexed parameters
1173
+ * @returns Unwatch function to stop listening
1174
+ */
1175
+ SetSuccessFee: (callback) => {
1176
+ return this.publicClient.watchContractEvent({
1177
+ address: this.contractAddress,
1178
+ abi: exports.Vault_jsonAbi,
1179
+ eventName: 'SetSuccessFee',
1180
+ onLogs: (logs) => {
1181
+ logs.forEach((log) => {
1182
+ callback(log.args);
1183
+ });
1184
+ },
1185
+ });
1186
+ },
1187
+ /**
1188
+ * Watch SetSuccessFeeReceiver events
1189
+ * @param callback Function to call when event is emitted
1190
+ * @param filter Optional filter for indexed parameters
1191
+ * @returns Unwatch function to stop listening
1192
+ */
1193
+ SetSuccessFeeReceiver: (callback) => {
1194
+ return this.publicClient.watchContractEvent({
1195
+ address: this.contractAddress,
1196
+ abi: exports.Vault_jsonAbi,
1197
+ eventName: 'SetSuccessFeeReceiver',
1198
+ onLogs: (logs) => {
1199
+ logs.forEach((log) => {
1200
+ callback(log.args);
1201
+ });
1202
+ },
1203
+ });
1204
+ },
1205
+ /**
1206
+ * Watch SuccessFeeCharged events
1207
+ * @param callback Function to call when event is emitted
1208
+ * @param filter Optional filter for indexed parameters
1209
+ * @returns Unwatch function to stop listening
1210
+ */
1211
+ SuccessFeeCharged: (callback) => {
1212
+ return this.publicClient.watchContractEvent({
1213
+ address: this.contractAddress,
1214
+ abi: exports.Vault_jsonAbi,
1215
+ eventName: 'SuccessFeeCharged',
1216
+ onLogs: (logs) => {
1217
+ logs.forEach((log) => {
1218
+ callback(log.args);
1219
+ });
1220
+ },
1221
+ });
1222
+ },
1223
+ /**
1224
+ * Watch TokenUpdated events
1225
+ * @param callback Function to call when event is emitted
1226
+ * @param filter Optional filter for indexed parameters
1227
+ * @returns Unwatch function to stop listening
1228
+ */
1229
+ TokenUpdated: (callback) => {
1230
+ return this.publicClient.watchContractEvent({
1231
+ address: this.contractAddress,
1232
+ abi: exports.Vault_jsonAbi,
1233
+ eventName: 'TokenUpdated',
1234
+ onLogs: (logs) => {
1235
+ logs.forEach((log) => {
1236
+ callback(log.args);
1237
+ });
1238
+ },
1239
+ });
1240
+ },
1241
+ /**
1242
+ * Watch Withdraw events
310
1243
  * @param callback Function to call when event is emitted
311
1244
  * @param filter Optional filter for indexed parameters
312
1245
  * @returns Unwatch function to stop listening
313
1246
  */
314
- Funded: (callback, filter) => {
1247
+ Withdraw: (callback, filter) => {
315
1248
  return this.publicClient.watchContractEvent({
316
1249
  address: this.contractAddress,
317
1250
  abi: exports.Vault_jsonAbi,
318
- eventName: 'Funded',
1251
+ eventName: 'Withdraw',
319
1252
  args: filter,
320
1253
  onLogs: (logs) => {
321
1254
  logs.forEach((log) => {