@gitmyabi/eusd 1.0.1 → 1.0.2

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.
@@ -1,66 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BoringVault_json = exports.BoringVault_jsonAbi = void 0;
3
+ exports.EUSD_json = exports.EUSD_jsonAbi = void 0;
4
4
  const viem_1 = require("viem");
5
5
  /**
6
- * BoringVault_json ABI
6
+ * EUSD_json ABI
7
7
  *
8
8
  * This ABI is typed using viem's type system for full type safety.
9
9
  */
10
- exports.BoringVault_jsonAbi = [
10
+ exports.EUSD_jsonAbi = [
11
11
  {
12
12
  "inputs": [
13
13
  {
14
14
  "internalType": "address",
15
- "name": "_owner",
15
+ "name": "_config",
16
16
  "type": "address"
17
- },
18
- {
19
- "internalType": "string",
20
- "name": "_name",
21
- "type": "string"
22
- },
23
- {
24
- "internalType": "string",
25
- "name": "_symbol",
26
- "type": "string"
27
- },
28
- {
29
- "internalType": "uint8",
30
- "name": "_decimals",
31
- "type": "uint8"
32
17
  }
33
18
  ],
34
19
  "stateMutability": "nonpayable",
35
20
  "type": "constructor"
36
21
  },
37
- {
38
- "inputs": [
39
- {
40
- "internalType": "address",
41
- "name": "target",
42
- "type": "address"
43
- }
44
- ],
45
- "name": "AddressEmptyCode",
46
- "type": "error"
47
- },
48
- {
49
- "inputs": [
50
- {
51
- "internalType": "address",
52
- "name": "account",
53
- "type": "address"
54
- }
55
- ],
56
- "name": "AddressInsufficientBalance",
57
- "type": "error"
58
- },
59
- {
60
- "inputs": [],
61
- "name": "FailedInnerCall",
62
- "type": "error"
63
- },
64
22
  {
65
23
  "anonymous": false,
66
24
  "inputs": [
@@ -79,7 +37,7 @@ exports.BoringVault_jsonAbi = [
79
37
  {
80
38
  "indexed": false,
81
39
  "internalType": "uint256",
82
- "name": "amount",
40
+ "name": "value",
83
41
  "type": "uint256"
84
42
  }
85
43
  ],
@@ -92,54 +50,29 @@ exports.BoringVault_jsonAbi = [
92
50
  {
93
51
  "indexed": true,
94
52
  "internalType": "address",
95
- "name": "user",
96
- "type": "address"
97
- },
98
- {
99
- "indexed": true,
100
- "internalType": "contract Authority",
101
- "name": "newAuthority",
102
- "type": "address"
103
- }
104
- ],
105
- "name": "AuthorityUpdated",
106
- "type": "event"
107
- },
108
- {
109
- "anonymous": false,
110
- "inputs": [
111
- {
112
- "indexed": true,
113
- "internalType": "address",
114
- "name": "from",
115
- "type": "address"
116
- },
117
- {
118
- "indexed": true,
119
- "internalType": "address",
120
- "name": "asset",
53
+ "name": "account",
121
54
  "type": "address"
122
55
  },
123
56
  {
124
57
  "indexed": false,
125
58
  "internalType": "uint256",
126
- "name": "amount",
59
+ "name": "preRebaseTokenAmount",
127
60
  "type": "uint256"
128
61
  },
129
62
  {
130
- "indexed": true,
131
- "internalType": "address",
132
- "name": "to",
133
- "type": "address"
63
+ "indexed": false,
64
+ "internalType": "uint256",
65
+ "name": "postRebaseTokenAmount",
66
+ "type": "uint256"
134
67
  },
135
68
  {
136
69
  "indexed": false,
137
70
  "internalType": "uint256",
138
- "name": "shares",
71
+ "name": "sharesAmount",
139
72
  "type": "uint256"
140
73
  }
141
74
  ],
142
- "name": "Enter",
75
+ "name": "SharesBurnt",
143
76
  "type": "event"
144
77
  },
145
78
  {
@@ -148,54 +81,23 @@ exports.BoringVault_jsonAbi = [
148
81
  {
149
82
  "indexed": true,
150
83
  "internalType": "address",
151
- "name": "to",
152
- "type": "address"
153
- },
154
- {
155
- "indexed": true,
156
- "internalType": "address",
157
- "name": "asset",
84
+ "name": "from",
158
85
  "type": "address"
159
86
  },
160
- {
161
- "indexed": false,
162
- "internalType": "uint256",
163
- "name": "amount",
164
- "type": "uint256"
165
- },
166
87
  {
167
88
  "indexed": true,
168
89
  "internalType": "address",
169
- "name": "from",
90
+ "name": "to",
170
91
  "type": "address"
171
92
  },
172
93
  {
173
94
  "indexed": false,
174
95
  "internalType": "uint256",
175
- "name": "shares",
96
+ "name": "value",
176
97
  "type": "uint256"
177
98
  }
178
99
  ],
179
- "name": "Exit",
180
- "type": "event"
181
- },
182
- {
183
- "anonymous": false,
184
- "inputs": [
185
- {
186
- "indexed": true,
187
- "internalType": "address",
188
- "name": "user",
189
- "type": "address"
190
- },
191
- {
192
- "indexed": true,
193
- "internalType": "address",
194
- "name": "newOwner",
195
- "type": "address"
196
- }
197
- ],
198
- "name": "OwnershipTransferred",
100
+ "name": "Transfer",
199
101
  "type": "event"
200
102
  },
201
103
  {
@@ -216,36 +118,23 @@ exports.BoringVault_jsonAbi = [
216
118
  {
217
119
  "indexed": false,
218
120
  "internalType": "uint256",
219
- "name": "amount",
121
+ "name": "sharesValue",
220
122
  "type": "uint256"
221
123
  }
222
124
  ],
223
- "name": "Transfer",
125
+ "name": "TransferShares",
224
126
  "type": "event"
225
127
  },
226
- {
227
- "inputs": [],
228
- "name": "DOMAIN_SEPARATOR",
229
- "outputs": [
230
- {
231
- "internalType": "bytes32",
232
- "name": "",
233
- "type": "bytes32"
234
- }
235
- ],
236
- "stateMutability": "view",
237
- "type": "function"
238
- },
239
128
  {
240
129
  "inputs": [
241
130
  {
242
131
  "internalType": "address",
243
- "name": "",
132
+ "name": "_owner",
244
133
  "type": "address"
245
134
  },
246
135
  {
247
136
  "internalType": "address",
248
- "name": "",
137
+ "name": "_spender",
249
138
  "type": "address"
250
139
  }
251
140
  ],
@@ -264,12 +153,12 @@ exports.BoringVault_jsonAbi = [
264
153
  "inputs": [
265
154
  {
266
155
  "internalType": "address",
267
- "name": "spender",
156
+ "name": "_spender",
268
157
  "type": "address"
269
158
  },
270
159
  {
271
160
  "internalType": "uint256",
272
- "name": "amount",
161
+ "name": "_amount",
273
162
  "type": "uint256"
274
163
  }
275
164
  ],
@@ -284,24 +173,11 @@ exports.BoringVault_jsonAbi = [
284
173
  "stateMutability": "nonpayable",
285
174
  "type": "function"
286
175
  },
287
- {
288
- "inputs": [],
289
- "name": "authority",
290
- "outputs": [
291
- {
292
- "internalType": "contract Authority",
293
- "name": "",
294
- "type": "address"
295
- }
296
- ],
297
- "stateMutability": "view",
298
- "type": "function"
299
- },
300
176
  {
301
177
  "inputs": [
302
178
  {
303
179
  "internalType": "address",
304
- "name": "",
180
+ "name": "_account",
305
181
  "type": "address"
306
182
  }
307
183
  ],
@@ -316,49 +192,27 @@ exports.BoringVault_jsonAbi = [
316
192
  "stateMutability": "view",
317
193
  "type": "function"
318
194
  },
319
- {
320
- "inputs": [],
321
- "name": "decimals",
322
- "outputs": [
323
- {
324
- "internalType": "uint8",
325
- "name": "",
326
- "type": "uint8"
327
- }
328
- ],
329
- "stateMutability": "view",
330
- "type": "function"
331
- },
332
195
  {
333
196
  "inputs": [
334
197
  {
335
198
  "internalType": "address",
336
- "name": "from",
337
- "type": "address"
338
- },
339
- {
340
- "internalType": "contract ERC20",
341
- "name": "asset",
199
+ "name": "_account",
342
200
  "type": "address"
343
201
  },
344
202
  {
345
203
  "internalType": "uint256",
346
- "name": "assetAmount",
204
+ "name": "_burnAmount",
347
205
  "type": "uint256"
348
- },
349
- {
350
- "internalType": "address",
351
- "name": "to",
352
- "type": "address"
353
- },
206
+ }
207
+ ],
208
+ "name": "burn",
209
+ "outputs": [
354
210
  {
355
211
  "internalType": "uint256",
356
- "name": "shareAmount",
212
+ "name": "newTotalShares",
357
213
  "type": "uint256"
358
214
  }
359
215
  ],
360
- "name": "enter",
361
- "outputs": [],
362
216
  "stateMutability": "nonpayable",
363
217
  "type": "function"
364
218
  },
@@ -366,41 +220,32 @@ exports.BoringVault_jsonAbi = [
366
220
  "inputs": [
367
221
  {
368
222
  "internalType": "address",
369
- "name": "to",
370
- "type": "address"
371
- },
372
- {
373
- "internalType": "contract ERC20",
374
- "name": "asset",
223
+ "name": "_account",
375
224
  "type": "address"
376
225
  },
377
226
  {
378
227
  "internalType": "uint256",
379
- "name": "assetAmount",
228
+ "name": "_sharesAmount",
380
229
  "type": "uint256"
381
- },
382
- {
383
- "internalType": "address",
384
- "name": "from",
385
- "type": "address"
386
- },
230
+ }
231
+ ],
232
+ "name": "burnShares",
233
+ "outputs": [
387
234
  {
388
235
  "internalType": "uint256",
389
- "name": "shareAmount",
236
+ "name": "newTotalShares",
390
237
  "type": "uint256"
391
238
  }
392
239
  ],
393
- "name": "exit",
394
- "outputs": [],
395
240
  "stateMutability": "nonpayable",
396
241
  "type": "function"
397
242
  },
398
243
  {
399
244
  "inputs": [],
400
- "name": "hook",
245
+ "name": "configurator",
401
246
  "outputs": [
402
247
  {
403
- "internalType": "contract BeforeTransferHook",
248
+ "internalType": "contract Iconfigurator",
404
249
  "name": "",
405
250
  "type": "address"
406
251
  }
@@ -409,85 +254,51 @@ exports.BoringVault_jsonAbi = [
409
254
  "type": "function"
410
255
  },
411
256
  {
412
- "inputs": [
413
- {
414
- "internalType": "address[]",
415
- "name": "targets",
416
- "type": "address[]"
417
- },
418
- {
419
- "internalType": "bytes[]",
420
- "name": "data",
421
- "type": "bytes[]"
422
- },
423
- {
424
- "internalType": "uint256[]",
425
- "name": "values",
426
- "type": "uint256[]"
427
- }
428
- ],
429
- "name": "manage",
257
+ "inputs": [],
258
+ "name": "decimals",
430
259
  "outputs": [
431
260
  {
432
- "internalType": "bytes[]",
433
- "name": "results",
434
- "type": "bytes[]"
261
+ "internalType": "uint8",
262
+ "name": "",
263
+ "type": "uint8"
435
264
  }
436
265
  ],
437
- "stateMutability": "nonpayable",
266
+ "stateMutability": "pure",
438
267
  "type": "function"
439
268
  },
440
269
  {
441
270
  "inputs": [
442
271
  {
443
272
  "internalType": "address",
444
- "name": "target",
273
+ "name": "spender",
445
274
  "type": "address"
446
275
  },
447
- {
448
- "internalType": "bytes",
449
- "name": "data",
450
- "type": "bytes"
451
- },
452
276
  {
453
277
  "internalType": "uint256",
454
- "name": "value",
278
+ "name": "subtractedValue",
455
279
  "type": "uint256"
456
280
  }
457
281
  ],
458
- "name": "manage",
459
- "outputs": [
460
- {
461
- "internalType": "bytes",
462
- "name": "result",
463
- "type": "bytes"
464
- }
465
- ],
466
- "stateMutability": "nonpayable",
467
- "type": "function"
468
- },
469
- {
470
- "inputs": [],
471
- "name": "name",
282
+ "name": "decreaseAllowance",
472
283
  "outputs": [
473
284
  {
474
- "internalType": "string",
285
+ "internalType": "bool",
475
286
  "name": "",
476
- "type": "string"
287
+ "type": "bool"
477
288
  }
478
289
  ],
479
- "stateMutability": "view",
290
+ "stateMutability": "nonpayable",
480
291
  "type": "function"
481
292
  },
482
293
  {
483
294
  "inputs": [
484
295
  {
485
- "internalType": "address",
486
- "name": "",
487
- "type": "address"
296
+ "internalType": "uint256",
297
+ "name": "_sharesAmount",
298
+ "type": "uint256"
488
299
  }
489
300
  ],
490
- "name": "nonces",
301
+ "name": "getMintedEUSDByShares",
491
302
  "outputs": [
492
303
  {
493
304
  "internalType": "uint256",
@@ -501,211 +312,110 @@ exports.BoringVault_jsonAbi = [
501
312
  {
502
313
  "inputs": [
503
314
  {
504
- "internalType": "address",
505
- "name": "",
506
- "type": "address"
507
- },
508
- {
509
- "internalType": "address",
510
- "name": "",
511
- "type": "address"
512
- },
513
- {
514
- "internalType": "uint256[]",
515
- "name": "",
516
- "type": "uint256[]"
517
- },
518
- {
519
- "internalType": "uint256[]",
520
- "name": "",
521
- "type": "uint256[]"
522
- },
523
- {
524
- "internalType": "bytes",
525
- "name": "",
526
- "type": "bytes"
315
+ "internalType": "uint256",
316
+ "name": "_EUSDAmount",
317
+ "type": "uint256"
527
318
  }
528
319
  ],
529
- "name": "onERC1155BatchReceived",
320
+ "name": "getSharesByMintedEUSD",
530
321
  "outputs": [
531
322
  {
532
- "internalType": "bytes4",
323
+ "internalType": "uint256",
533
324
  "name": "",
534
- "type": "bytes4"
325
+ "type": "uint256"
535
326
  }
536
327
  ],
537
- "stateMutability": "nonpayable",
328
+ "stateMutability": "view",
538
329
  "type": "function"
539
330
  },
540
331
  {
541
- "inputs": [
542
- {
543
- "internalType": "address",
544
- "name": "",
545
- "type": "address"
546
- },
547
- {
548
- "internalType": "address",
549
- "name": "",
550
- "type": "address"
551
- },
552
- {
553
- "internalType": "uint256",
554
- "name": "",
555
- "type": "uint256"
556
- },
332
+ "inputs": [],
333
+ "name": "getTotalShares",
334
+ "outputs": [
557
335
  {
558
336
  "internalType": "uint256",
559
337
  "name": "",
560
338
  "type": "uint256"
561
- },
562
- {
563
- "internalType": "bytes",
564
- "name": "",
565
- "type": "bytes"
566
- }
567
- ],
568
- "name": "onERC1155Received",
569
- "outputs": [
570
- {
571
- "internalType": "bytes4",
572
- "name": "",
573
- "type": "bytes4"
574
339
  }
575
340
  ],
576
- "stateMutability": "nonpayable",
341
+ "stateMutability": "view",
577
342
  "type": "function"
578
343
  },
579
344
  {
580
345
  "inputs": [
581
346
  {
582
347
  "internalType": "address",
583
- "name": "",
584
- "type": "address"
585
- },
586
- {
587
- "internalType": "address",
588
- "name": "",
348
+ "name": "_spender",
589
349
  "type": "address"
590
350
  },
591
351
  {
592
352
  "internalType": "uint256",
593
- "name": "",
353
+ "name": "_addedValue",
594
354
  "type": "uint256"
595
- },
596
- {
597
- "internalType": "bytes",
598
- "name": "",
599
- "type": "bytes"
600
355
  }
601
356
  ],
602
- "name": "onERC721Received",
357
+ "name": "increaseAllowance",
603
358
  "outputs": [
604
359
  {
605
- "internalType": "bytes4",
360
+ "internalType": "bool",
606
361
  "name": "",
607
- "type": "bytes4"
362
+ "type": "bool"
608
363
  }
609
364
  ],
610
365
  "stateMutability": "nonpayable",
611
366
  "type": "function"
612
367
  },
613
- {
614
- "inputs": [],
615
- "name": "owner",
616
- "outputs": [
617
- {
618
- "internalType": "address",
619
- "name": "",
620
- "type": "address"
621
- }
622
- ],
623
- "stateMutability": "view",
624
- "type": "function"
625
- },
626
368
  {
627
369
  "inputs": [
628
370
  {
629
371
  "internalType": "address",
630
- "name": "owner",
631
- "type": "address"
632
- },
633
- {
634
- "internalType": "address",
635
- "name": "spender",
372
+ "name": "_recipient",
636
373
  "type": "address"
637
374
  },
638
375
  {
639
376
  "internalType": "uint256",
640
- "name": "value",
377
+ "name": "_mintAmount",
641
378
  "type": "uint256"
642
- },
379
+ }
380
+ ],
381
+ "name": "mint",
382
+ "outputs": [
643
383
  {
644
384
  "internalType": "uint256",
645
- "name": "deadline",
385
+ "name": "newTotalShares",
646
386
  "type": "uint256"
647
- },
648
- {
649
- "internalType": "uint8",
650
- "name": "v",
651
- "type": "uint8"
652
- },
653
- {
654
- "internalType": "bytes32",
655
- "name": "r",
656
- "type": "bytes32"
657
- },
658
- {
659
- "internalType": "bytes32",
660
- "name": "s",
661
- "type": "bytes32"
662
387
  }
663
388
  ],
664
- "name": "permit",
665
- "outputs": [],
666
389
  "stateMutability": "nonpayable",
667
390
  "type": "function"
668
391
  },
669
392
  {
670
- "inputs": [
393
+ "inputs": [],
394
+ "name": "name",
395
+ "outputs": [
671
396
  {
672
- "internalType": "contract Authority",
673
- "name": "newAuthority",
674
- "type": "address"
397
+ "internalType": "string",
398
+ "name": "",
399
+ "type": "string"
675
400
  }
676
401
  ],
677
- "name": "setAuthority",
678
- "outputs": [],
679
- "stateMutability": "nonpayable",
402
+ "stateMutability": "pure",
680
403
  "type": "function"
681
404
  },
682
405
  {
683
406
  "inputs": [
684
407
  {
685
408
  "internalType": "address",
686
- "name": "_hook",
409
+ "name": "_account",
687
410
  "type": "address"
688
411
  }
689
412
  ],
690
- "name": "setBeforeTransferHook",
691
- "outputs": [],
692
- "stateMutability": "nonpayable",
693
- "type": "function"
694
- },
695
- {
696
- "inputs": [
697
- {
698
- "internalType": "bytes4",
699
- "name": "interfaceId",
700
- "type": "bytes4"
701
- }
702
- ],
703
- "name": "supportsInterface",
413
+ "name": "sharesOf",
704
414
  "outputs": [
705
415
  {
706
- "internalType": "bool",
416
+ "internalType": "uint256",
707
417
  "name": "",
708
- "type": "bool"
418
+ "type": "uint256"
709
419
  }
710
420
  ],
711
421
  "stateMutability": "view",
@@ -721,7 +431,7 @@ exports.BoringVault_jsonAbi = [
721
431
  "type": "string"
722
432
  }
723
433
  ],
724
- "stateMutability": "view",
434
+ "stateMutability": "pure",
725
435
  "type": "function"
726
436
  },
727
437
  {
@@ -741,12 +451,12 @@ exports.BoringVault_jsonAbi = [
741
451
  "inputs": [
742
452
  {
743
453
  "internalType": "address",
744
- "name": "to",
454
+ "name": "_recipient",
745
455
  "type": "address"
746
456
  },
747
457
  {
748
458
  "internalType": "uint256",
749
- "name": "amount",
459
+ "name": "_amount",
750
460
  "type": "uint256"
751
461
  }
752
462
  ],
@@ -794,22 +504,29 @@ exports.BoringVault_jsonAbi = [
794
504
  "inputs": [
795
505
  {
796
506
  "internalType": "address",
797
- "name": "newOwner",
507
+ "name": "_recipient",
798
508
  "type": "address"
509
+ },
510
+ {
511
+ "internalType": "uint256",
512
+ "name": "_sharesAmount",
513
+ "type": "uint256"
514
+ }
515
+ ],
516
+ "name": "transferShares",
517
+ "outputs": [
518
+ {
519
+ "internalType": "uint256",
520
+ "name": "",
521
+ "type": "uint256"
799
522
  }
800
523
  ],
801
- "name": "transferOwnership",
802
- "outputs": [],
803
524
  "stateMutability": "nonpayable",
804
525
  "type": "function"
805
- },
806
- {
807
- "stateMutability": "payable",
808
- "type": "receive"
809
526
  }
810
527
  ];
811
528
  /**
812
- * BoringVault_json Contract Class
529
+ * EUSD_json Contract Class
813
530
  *
814
531
  * Provides a class-based API similar to TypeChain for interacting with the contract.
815
532
  *
@@ -817,12 +534,12 @@ exports.BoringVault_jsonAbi = [
817
534
  * ```typescript
818
535
  * import { createPublicClient, createWalletClient, http } from 'viem';
819
536
  * import { mainnet } from 'viem/chains';
820
- * import { BoringVault_json } from 'BoringVault_json';
537
+ * import { EUSD_json } from 'EUSD_json';
821
538
  *
822
539
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
823
540
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
824
541
  *
825
- * const contract = new BoringVault_json('0x...', { publicClient, walletClient });
542
+ * const contract = new EUSD_json('0x...', { publicClient, walletClient });
826
543
  *
827
544
  * // Read functions
828
545
  * const result = await contract.balanceOf('0x...');
@@ -840,13 +557,13 @@ exports.BoringVault_jsonAbi = [
840
557
  * });
841
558
  * ```
842
559
  */
843
- class BoringVault_json {
560
+ class EUSD_json {
844
561
  constructor(address, clients) {
845
562
  this.contractAddress = address;
846
563
  this.publicClient = clients.publicClient;
847
564
  this.contract = (0, viem_1.getContract)({
848
565
  address,
849
- abi: exports.BoringVault_jsonAbi,
566
+ abi: exports.EUSD_jsonAbi,
850
567
  client: {
851
568
  public: clients.publicClient,
852
569
  wallet: clients.walletClient,
@@ -865,79 +582,72 @@ class BoringVault_json {
865
582
  getContract() {
866
583
  return this.contract;
867
584
  }
868
- /**
869
- * DOMAIN_SEPARATOR
870
- * view
871
- */
872
- async DOMAIN_SEPARATOR() {
873
- return this.contract.read.DOMAIN_SEPARATOR();
874
- }
875
585
  /**
876
586
  * allowance
877
587
  * view
878
588
  */
879
- async allowance(arg0, arg1) {
880
- return this.contract.read.allowance([arg0, arg1]);
589
+ async allowance(_owner, _spender) {
590
+ return this.contract.read.allowance([_owner, _spender]);
881
591
  }
882
592
  /**
883
- * authority
593
+ * balanceOf
884
594
  * view
885
595
  */
886
- async authority() {
887
- return this.contract.read.authority();
596
+ async balanceOf(_account) {
597
+ return this.contract.read.balanceOf([_account]);
888
598
  }
889
599
  /**
890
- * balanceOf
600
+ * configurator
891
601
  * view
892
602
  */
893
- async balanceOf(arg0) {
894
- return this.contract.read.balanceOf([arg0]);
603
+ async configurator() {
604
+ return this.contract.read.configurator();
895
605
  }
896
606
  /**
897
607
  * decimals
898
- * view
608
+ * pure
899
609
  */
900
610
  async decimals() {
901
611
  return this.contract.read.decimals();
902
612
  }
903
613
  /**
904
- * hook
614
+ * getMintedEUSDByShares
905
615
  * view
906
616
  */
907
- async hook() {
908
- return this.contract.read.hook();
617
+ async getMintedEUSDByShares(_sharesAmount) {
618
+ return this.contract.read.getMintedEUSDByShares([_sharesAmount]);
909
619
  }
910
620
  /**
911
- * name
621
+ * getSharesByMintedEUSD
912
622
  * view
913
623
  */
914
- async name() {
915
- return this.contract.read.name();
624
+ async getSharesByMintedEUSD(_EUSDAmount) {
625
+ return this.contract.read.getSharesByMintedEUSD([_EUSDAmount]);
916
626
  }
917
627
  /**
918
- * nonces
628
+ * getTotalShares
919
629
  * view
920
630
  */
921
- async nonces(arg0) {
922
- return this.contract.read.nonces([arg0]);
631
+ async getTotalShares() {
632
+ return this.contract.read.getTotalShares();
923
633
  }
924
634
  /**
925
- * owner
926
- * view
635
+ * name
636
+ * pure
927
637
  */
928
- async owner() {
929
- return this.contract.read.owner();
638
+ async name() {
639
+ return this.contract.read.name();
930
640
  }
931
641
  /**
932
- * supportsInterface
642
+ * sharesOf
933
643
  * view
934
644
  */
935
- async supportsInterface(interfaceId) {
936
- return this.contract.read.supportsInterface([interfaceId]);
645
+ async sharesOf(_account) {
646
+ return this.contract.read.sharesOf([_account]);
937
647
  }
938
648
  /**
939
649
  * symbol
940
- * view
650
+ * pure
941
651
  */
942
652
  async symbol() {
943
653
  return this.contract.read.symbol();
@@ -954,116 +664,77 @@ class BoringVault_json {
954
664
  * nonpayable
955
665
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
956
666
  */
957
- async approve(spender, amount, options) {
958
- if (!this.contract.write) {
959
- throw new Error('Wallet client is required for write operations');
960
- }
961
- return this.contract.write.approve([spender, amount], options);
962
- }
963
- /**
964
- * enter
965
- * nonpayable
966
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
967
- */
968
- async enter(from, asset, assetAmount, to, shareAmount, options) {
667
+ async approve(_spender, _amount, options) {
969
668
  if (!this.contract.write) {
970
669
  throw new Error('Wallet client is required for write operations');
971
670
  }
972
- return this.contract.write.enter([from, asset, assetAmount, to, shareAmount], options);
671
+ return this.contract.write.approve([_spender, _amount], options);
973
672
  }
974
673
  /**
975
- * exit
674
+ * burn
976
675
  * nonpayable
977
676
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
978
677
  */
979
- async exit(to, asset, assetAmount, from, shareAmount, options) {
980
- if (!this.contract.write) {
981
- throw new Error('Wallet client is required for write operations');
982
- }
983
- return this.contract.write.exit([to, asset, assetAmount, from, shareAmount], options);
984
- }
985
- async manage(...args) {
678
+ async burn(_account, _burnAmount, options) {
986
679
  if (!this.contract.write) {
987
680
  throw new Error('Wallet client is required for write operations');
988
681
  }
989
- return this.contract.write.manage(args);
682
+ return this.contract.write.burn([_account, _burnAmount], options);
990
683
  }
991
684
  /**
992
- * onERC1155BatchReceived
685
+ * burnShares
993
686
  * nonpayable
994
687
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
995
688
  */
996
- async onERC1155BatchReceived(arg0, arg1, arg2, arg3, arg4, options) {
689
+ async burnShares(_account, _sharesAmount, options) {
997
690
  if (!this.contract.write) {
998
691
  throw new Error('Wallet client is required for write operations');
999
692
  }
1000
- return this.contract.write.onERC1155BatchReceived([arg0, arg1, arg2, arg3, arg4], options);
693
+ return this.contract.write.burnShares([_account, _sharesAmount], options);
1001
694
  }
1002
695
  /**
1003
- * onERC1155Received
696
+ * decreaseAllowance
1004
697
  * nonpayable
1005
698
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1006
699
  */
1007
- async onERC1155Received(arg0, arg1, arg2, arg3, arg4, options) {
700
+ async decreaseAllowance(spender, subtractedValue, options) {
1008
701
  if (!this.contract.write) {
1009
702
  throw new Error('Wallet client is required for write operations');
1010
703
  }
1011
- return this.contract.write.onERC1155Received([arg0, arg1, arg2, arg3, arg4], options);
704
+ return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
1012
705
  }
1013
706
  /**
1014
- * onERC721Received
707
+ * increaseAllowance
1015
708
  * nonpayable
1016
709
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1017
710
  */
1018
- async onERC721Received(arg0, arg1, arg2, arg3, options) {
711
+ async increaseAllowance(_spender, _addedValue, options) {
1019
712
  if (!this.contract.write) {
1020
713
  throw new Error('Wallet client is required for write operations');
1021
714
  }
1022
- return this.contract.write.onERC721Received([arg0, arg1, arg2, arg3], options);
715
+ return this.contract.write.increaseAllowance([_spender, _addedValue], options);
1023
716
  }
1024
717
  /**
1025
- * permit
718
+ * mint
1026
719
  * nonpayable
1027
720
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1028
721
  */
1029
- async permit(owner, spender, value, deadline, v, r, s, options) {
722
+ async mint(_recipient, _mintAmount, options) {
1030
723
  if (!this.contract.write) {
1031
724
  throw new Error('Wallet client is required for write operations');
1032
725
  }
1033
- return this.contract.write.permit([owner, spender, value, deadline, v, r, s], options);
1034
- }
1035
- /**
1036
- * setAuthority
1037
- * nonpayable
1038
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1039
- */
1040
- async setAuthority(newAuthority, options) {
1041
- if (!this.contract.write) {
1042
- throw new Error('Wallet client is required for write operations');
1043
- }
1044
- return this.contract.write.setAuthority([newAuthority], options);
1045
- }
1046
- /**
1047
- * setBeforeTransferHook
1048
- * nonpayable
1049
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1050
- */
1051
- async setBeforeTransferHook(_hook, options) {
1052
- if (!this.contract.write) {
1053
- throw new Error('Wallet client is required for write operations');
1054
- }
1055
- return this.contract.write.setBeforeTransferHook([_hook], options);
726
+ return this.contract.write.mint([_recipient, _mintAmount], options);
1056
727
  }
1057
728
  /**
1058
729
  * transfer
1059
730
  * nonpayable
1060
731
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1061
732
  */
1062
- async transfer(to, amount, options) {
733
+ async transfer(_recipient, _amount, options) {
1063
734
  if (!this.contract.write) {
1064
735
  throw new Error('Wallet client is required for write operations');
1065
736
  }
1066
- return this.contract.write.transfer([to, amount], options);
737
+ return this.contract.write.transfer([_recipient, _amount], options);
1067
738
  }
1068
739
  /**
1069
740
  * transferFrom
@@ -1077,15 +748,15 @@ class BoringVault_json {
1077
748
  return this.contract.write.transferFrom([from, to, amount], options);
1078
749
  }
1079
750
  /**
1080
- * transferOwnership
751
+ * transferShares
1081
752
  * nonpayable
1082
753
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1083
754
  */
1084
- async transferOwnership(newOwner, options) {
755
+ async transferShares(_recipient, _sharesAmount, options) {
1085
756
  if (!this.contract.write) {
1086
757
  throw new Error('Wallet client is required for write operations');
1087
758
  }
1088
- return this.contract.write.transferOwnership([newOwner], options);
759
+ return this.contract.write.transferShares([_recipient, _sharesAmount], options);
1089
760
  }
1090
761
  /**
1091
762
  * Simulate contract write operations (dry-run without sending transaction)
@@ -1106,89 +777,56 @@ class BoringVault_json {
1106
777
  * Returns gas estimate and result without sending transaction
1107
778
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1108
779
  */
1109
- async approve(spender, amount, options) {
1110
- return contract.simulate.approve([spender, amount], options);
1111
- },
1112
- /**
1113
- * Simulate enter
1114
- * Returns gas estimate and result without sending transaction
1115
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1116
- */
1117
- async enter(from, asset, assetAmount, to, shareAmount, options) {
1118
- return contract.simulate.enter([from, asset, assetAmount, to, shareAmount], options);
1119
- },
1120
- /**
1121
- * Simulate exit
1122
- * Returns gas estimate and result without sending transaction
1123
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1124
- */
1125
- async exit(to, asset, assetAmount, from, shareAmount, options) {
1126
- return contract.simulate.exit([to, asset, assetAmount, from, shareAmount], options);
780
+ async approve(_spender, _amount, options) {
781
+ return contract.simulate.approve([_spender, _amount], options);
1127
782
  },
1128
783
  /**
1129
- * Simulate manage
784
+ * Simulate burn
1130
785
  * Returns gas estimate and result without sending transaction
1131
- * Supports multiple overloads: (address[], bytes[], uint256[]), (address, bytes, uint256)
1132
786
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1133
787
  */
1134
- async manage(...args) {
1135
- return contract.simulate.manage(args);
788
+ async burn(_account, _burnAmount, options) {
789
+ return contract.simulate.burn([_account, _burnAmount], options);
1136
790
  },
1137
791
  /**
1138
- * Simulate onERC1155BatchReceived
792
+ * Simulate burnShares
1139
793
  * Returns gas estimate and result without sending transaction
1140
794
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1141
795
  */
1142
- async onERC1155BatchReceived(arg0, arg1, arg2, arg3, arg4, options) {
1143
- return contract.simulate.onERC1155BatchReceived([arg0, arg1, arg2, arg3, arg4], options);
796
+ async burnShares(_account, _sharesAmount, options) {
797
+ return contract.simulate.burnShares([_account, _sharesAmount], options);
1144
798
  },
1145
799
  /**
1146
- * Simulate onERC1155Received
800
+ * Simulate decreaseAllowance
1147
801
  * Returns gas estimate and result without sending transaction
1148
802
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1149
803
  */
1150
- async onERC1155Received(arg0, arg1, arg2, arg3, arg4, options) {
1151
- return contract.simulate.onERC1155Received([arg0, arg1, arg2, arg3, arg4], options);
804
+ async decreaseAllowance(spender, subtractedValue, options) {
805
+ return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
1152
806
  },
1153
807
  /**
1154
- * Simulate onERC721Received
808
+ * Simulate increaseAllowance
1155
809
  * Returns gas estimate and result without sending transaction
1156
810
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1157
811
  */
1158
- async onERC721Received(arg0, arg1, arg2, arg3, options) {
1159
- return contract.simulate.onERC721Received([arg0, arg1, arg2, arg3], options);
812
+ async increaseAllowance(_spender, _addedValue, options) {
813
+ return contract.simulate.increaseAllowance([_spender, _addedValue], options);
1160
814
  },
1161
815
  /**
1162
- * Simulate permit
816
+ * Simulate mint
1163
817
  * Returns gas estimate and result without sending transaction
1164
818
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1165
819
  */
1166
- async permit(owner, spender, value, deadline, v, r, s, options) {
1167
- return contract.simulate.permit([owner, spender, value, deadline, v, r, s], options);
1168
- },
1169
- /**
1170
- * Simulate setAuthority
1171
- * Returns gas estimate and result without sending transaction
1172
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1173
- */
1174
- async setAuthority(newAuthority, options) {
1175
- return contract.simulate.setAuthority([newAuthority], options);
1176
- },
1177
- /**
1178
- * Simulate setBeforeTransferHook
1179
- * Returns gas estimate and result without sending transaction
1180
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1181
- */
1182
- async setBeforeTransferHook(_hook, options) {
1183
- return contract.simulate.setBeforeTransferHook([_hook], options);
820
+ async mint(_recipient, _mintAmount, options) {
821
+ return contract.simulate.mint([_recipient, _mintAmount], options);
1184
822
  },
1185
823
  /**
1186
824
  * Simulate transfer
1187
825
  * Returns gas estimate and result without sending transaction
1188
826
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1189
827
  */
1190
- async transfer(to, amount, options) {
1191
- return contract.simulate.transfer([to, amount], options);
828
+ async transfer(_recipient, _amount, options) {
829
+ return contract.simulate.transfer([_recipient, _amount], options);
1192
830
  },
1193
831
  /**
1194
832
  * Simulate transferFrom
@@ -1199,12 +837,12 @@ class BoringVault_json {
1199
837
  return contract.simulate.transferFrom([from, to, amount], options);
1200
838
  },
1201
839
  /**
1202
- * Simulate transferOwnership
840
+ * Simulate transferShares
1203
841
  * Returns gas estimate and result without sending transaction
1204
842
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1205
843
  */
1206
- async transferOwnership(newOwner, options) {
1207
- return contract.simulate.transferOwnership([newOwner], options);
844
+ async transferShares(_recipient, _sharesAmount, options) {
845
+ return contract.simulate.transferShares([_recipient, _sharesAmount], options);
1208
846
  }
1209
847
  };
1210
848
  }
@@ -1231,7 +869,7 @@ class BoringVault_json {
1231
869
  Approval: (callback, filter) => {
1232
870
  return this.publicClient.watchContractEvent({
1233
871
  address: this.contractAddress,
1234
- abi: exports.BoringVault_jsonAbi,
872
+ abi: exports.EUSD_jsonAbi,
1235
873
  eventName: 'Approval',
1236
874
  args: filter,
1237
875
  onLogs: (logs) => {
@@ -1242,35 +880,16 @@ class BoringVault_json {
1242
880
  });
1243
881
  },
1244
882
  /**
1245
- * Watch AuthorityUpdated events
1246
- * @param callback Function to call when event is emitted
1247
- * @param filter Optional filter for indexed parameters
1248
- * @returns Unwatch function to stop listening
1249
- */
1250
- AuthorityUpdated: (callback, filter) => {
1251
- return this.publicClient.watchContractEvent({
1252
- address: this.contractAddress,
1253
- abi: exports.BoringVault_jsonAbi,
1254
- eventName: 'AuthorityUpdated',
1255
- args: filter,
1256
- onLogs: (logs) => {
1257
- logs.forEach((log) => {
1258
- callback(log.args);
1259
- });
1260
- },
1261
- });
1262
- },
1263
- /**
1264
- * Watch Enter events
883
+ * Watch SharesBurnt events
1265
884
  * @param callback Function to call when event is emitted
1266
885
  * @param filter Optional filter for indexed parameters
1267
886
  * @returns Unwatch function to stop listening
1268
887
  */
1269
- Enter: (callback, filter) => {
888
+ SharesBurnt: (callback, filter) => {
1270
889
  return this.publicClient.watchContractEvent({
1271
890
  address: this.contractAddress,
1272
- abi: exports.BoringVault_jsonAbi,
1273
- eventName: 'Enter',
891
+ abi: exports.EUSD_jsonAbi,
892
+ eventName: 'SharesBurnt',
1274
893
  args: filter,
1275
894
  onLogs: (logs) => {
1276
895
  logs.forEach((log) => {
@@ -1280,35 +899,16 @@ class BoringVault_json {
1280
899
  });
1281
900
  },
1282
901
  /**
1283
- * Watch Exit events
1284
- * @param callback Function to call when event is emitted
1285
- * @param filter Optional filter for indexed parameters
1286
- * @returns Unwatch function to stop listening
1287
- */
1288
- Exit: (callback, filter) => {
1289
- return this.publicClient.watchContractEvent({
1290
- address: this.contractAddress,
1291
- abi: exports.BoringVault_jsonAbi,
1292
- eventName: 'Exit',
1293
- args: filter,
1294
- onLogs: (logs) => {
1295
- logs.forEach((log) => {
1296
- callback(log.args);
1297
- });
1298
- },
1299
- });
1300
- },
1301
- /**
1302
- * Watch OwnershipTransferred events
902
+ * Watch Transfer events
1303
903
  * @param callback Function to call when event is emitted
1304
904
  * @param filter Optional filter for indexed parameters
1305
905
  * @returns Unwatch function to stop listening
1306
906
  */
1307
- OwnershipTransferred: (callback, filter) => {
907
+ Transfer: (callback, filter) => {
1308
908
  return this.publicClient.watchContractEvent({
1309
909
  address: this.contractAddress,
1310
- abi: exports.BoringVault_jsonAbi,
1311
- eventName: 'OwnershipTransferred',
910
+ abi: exports.EUSD_jsonAbi,
911
+ eventName: 'Transfer',
1312
912
  args: filter,
1313
913
  onLogs: (logs) => {
1314
914
  logs.forEach((log) => {
@@ -1318,16 +918,16 @@ class BoringVault_json {
1318
918
  });
1319
919
  },
1320
920
  /**
1321
- * Watch Transfer events
921
+ * Watch TransferShares events
1322
922
  * @param callback Function to call when event is emitted
1323
923
  * @param filter Optional filter for indexed parameters
1324
924
  * @returns Unwatch function to stop listening
1325
925
  */
1326
- Transfer: (callback, filter) => {
926
+ TransferShares: (callback, filter) => {
1327
927
  return this.publicClient.watchContractEvent({
1328
928
  address: this.contractAddress,
1329
- abi: exports.BoringVault_jsonAbi,
1330
- eventName: 'Transfer',
929
+ abi: exports.EUSD_jsonAbi,
930
+ eventName: 'TransferShares',
1331
931
  args: filter,
1332
932
  onLogs: (logs) => {
1333
933
  logs.forEach((log) => {
@@ -1339,4 +939,4 @@ class BoringVault_json {
1339
939
  };
1340
940
  }
1341
941
  }
1342
- exports.BoringVault_json = BoringVault_json;
942
+ exports.EUSD_json = EUSD_json;