@oikos/core-addresses 0.1.0 → 0.1.1

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.
package/dist/cli.cjs CHANGED
@@ -20,10 +20,2604 @@ var deployment_default = {
20
20
  var meta_default = {
21
21
  tag: "v0.1",
22
22
  source: "https://raw.githubusercontent.com/oikos-cash/core/v0.1/deploy_helper/out/deployment.json",
23
- fetchedAt: "2026-05-16T19:38:51.457Z",
23
+ fetchedAt: "2026-05-16T21:02:29.760Z",
24
24
  sha256: "5e593341d02a2e9f935d0b234401090c6e858a654fed307ad3ccef83d6fedbb7"
25
25
  };
26
26
 
27
+ // data/abi-meta.json
28
+ var abi_meta_default = {
29
+ ref: "e9956d58340ec0c44221e5d3f3bc8590149966c0",
30
+ fetchedAt: "2026-05-16T21:02:30.220Z",
31
+ contracts: {
32
+ ExchangeHelper: {
33
+ available: true,
34
+ source: "https://raw.githubusercontent.com/oikos-cash/core/e9956d58340ec0c44221e5d3f3bc8590149966c0/out/ExchangeHelper.sol/ExchangeHelper.json",
35
+ artifact: "out/ExchangeHelper.sol/ExchangeHelper.json",
36
+ items: 24,
37
+ sha256: "c915b35c94b01e91c9c602cb02cb76a8621b2183d1e5714734402b2a1e7530ac"
38
+ },
39
+ ModelHelper: {
40
+ available: true,
41
+ source: "https://raw.githubusercontent.com/oikos-cash/core/e9956d58340ec0c44221e5d3f3bc8590149966c0/out/Helper.sol/ModelHelper.json",
42
+ artifact: "out/Helper.sol/ModelHelper.json",
43
+ items: 11,
44
+ sha256: "e8b67252d5566788bf0703a24863514735b8a42dc58531a2dade167f9e9fc41b"
45
+ },
46
+ AdaptiveSupply: {
47
+ available: true,
48
+ source: "https://raw.githubusercontent.com/oikos-cash/core/e9956d58340ec0c44221e5d3f3bc8590149966c0/out/AdaptiveSupply.sol/AdaptiveSupply.json",
49
+ artifact: "out/AdaptiveSupply.sol/AdaptiveSupply.json",
50
+ items: 8,
51
+ sha256: "513c87827c05f8b2c4b2b614e2f6f32e22dc59fd1b7976ee0444702a7a85c4e7"
52
+ },
53
+ RewardsCalculator: {
54
+ available: true,
55
+ source: "https://raw.githubusercontent.com/oikos-cash/core/e9956d58340ec0c44221e5d3f3bc8590149966c0/out/RewardsCalculator.sol/RewardsCalculator.json",
56
+ artifact: "out/RewardsCalculator.sol/RewardsCalculator.json",
57
+ items: 2,
58
+ sha256: "0f338e396e86d032446664fdea2171b0fc55eaece74a9a435feeaf961102d279"
59
+ },
60
+ Resolver: {
61
+ available: true,
62
+ source: "https://raw.githubusercontent.com/oikos-cash/core/e9956d58340ec0c44221e5d3f3bc8590149966c0/out/Resolver.sol/Resolver.json",
63
+ artifact: "out/Resolver.sol/Resolver.json",
64
+ items: 22,
65
+ sha256: "e84b2b86a044b3bce58cceaadc5bd06a39d4d60ff484867893e3991d6900124a"
66
+ },
67
+ Factory: {
68
+ available: true,
69
+ source: "https://raw.githubusercontent.com/oikos-cash/core/e9956d58340ec0c44221e5d3f3bc8590149966c0/out/OikosFactory.sol/OikosFactory.json",
70
+ artifact: "out/OikosFactory.sol/OikosFactory.json",
71
+ items: 39,
72
+ sha256: "7a731b05c79c3063a40797b4665577984850400470ba8edc0dbddae1f5e5b7bd"
73
+ },
74
+ Vault: {
75
+ available: false,
76
+ reason: "Diamond proxy; facet artifacts are not checked in at this pinned commit."
77
+ },
78
+ Pool: {
79
+ available: false,
80
+ reason: "External Uniswap V3 pool; ABI lives upstream in @uniswap/v3-core."
81
+ },
82
+ Proxy: {
83
+ available: false,
84
+ reason: "External OpenZeppelin ERC1967Proxy wrapping OKS; ABI lives upstream in @openzeppelin/contracts."
85
+ }
86
+ }
87
+ };
88
+
89
+ // data/abi/AdaptiveSupply.json
90
+ var AdaptiveSupply_default = [
91
+ {
92
+ type: "function",
93
+ name: "computeMintAmount",
94
+ inputs: [
95
+ {
96
+ name: "deltaSupply",
97
+ type: "uint256",
98
+ internalType: "uint256"
99
+ },
100
+ {
101
+ name: "timeElapsed",
102
+ type: "uint256",
103
+ internalType: "uint256"
104
+ },
105
+ {
106
+ name: "spotPrice",
107
+ type: "uint256",
108
+ internalType: "uint256"
109
+ },
110
+ {
111
+ name: "imv",
112
+ type: "uint256",
113
+ internalType: "uint256"
114
+ }
115
+ ],
116
+ outputs: [
117
+ {
118
+ name: "mintAmount",
119
+ type: "uint256",
120
+ internalType: "uint256"
121
+ },
122
+ {
123
+ name: "sigmoid",
124
+ type: "uint256",
125
+ internalType: "uint256"
126
+ }
127
+ ],
128
+ stateMutability: "view"
129
+ },
130
+ {
131
+ type: "error",
132
+ name: "DeltaSupplyZero",
133
+ inputs: []
134
+ },
135
+ {
136
+ type: "error",
137
+ name: "IMVZero",
138
+ inputs: []
139
+ },
140
+ {
141
+ type: "error",
142
+ name: "InvalidDenominator",
143
+ inputs: []
144
+ },
145
+ {
146
+ type: "error",
147
+ name: "InvalidSqrtTimeElapsed",
148
+ inputs: []
149
+ },
150
+ {
151
+ type: "error",
152
+ name: "InvalidTokenDecimals",
153
+ inputs: []
154
+ },
155
+ {
156
+ type: "error",
157
+ name: "SpotPriceLowerThanIMV",
158
+ inputs: []
159
+ },
160
+ {
161
+ type: "error",
162
+ name: "TimeElapsedZero",
163
+ inputs: []
164
+ }
165
+ ];
166
+
167
+ // data/abi/ExchangeHelper.json
168
+ var ExchangeHelper_default = [
169
+ {
170
+ type: "constructor",
171
+ inputs: [
172
+ {
173
+ name: "nomaFactoryAddress",
174
+ type: "address",
175
+ internalType: "address"
176
+ },
177
+ {
178
+ name: "wrappedMonAddress",
179
+ type: "address",
180
+ internalType: "address"
181
+ }
182
+ ],
183
+ stateMutability: "nonpayable"
184
+ },
185
+ {
186
+ type: "receive",
187
+ stateMutability: "payable"
188
+ },
189
+ {
190
+ type: "function",
191
+ name: "WBNB",
192
+ inputs: [],
193
+ outputs: [
194
+ {
195
+ name: "",
196
+ type: "address",
197
+ internalType: "address"
198
+ }
199
+ ],
200
+ stateMutability: "view"
201
+ },
202
+ {
203
+ type: "function",
204
+ name: "buyTokens",
205
+ inputs: [
206
+ {
207
+ name: "vaultAddress",
208
+ type: "address",
209
+ internalType: "address"
210
+ },
211
+ {
212
+ name: "pool",
213
+ type: "address",
214
+ internalType: "address"
215
+ },
216
+ {
217
+ name: "price",
218
+ type: "uint256",
219
+ internalType: "uint256"
220
+ },
221
+ {
222
+ name: "minAmount",
223
+ type: "uint256",
224
+ internalType: "uint256"
225
+ },
226
+ {
227
+ name: "receiver",
228
+ type: "address",
229
+ internalType: "address"
230
+ },
231
+ {
232
+ name: "isLimitOrder",
233
+ type: "bool",
234
+ internalType: "bool"
235
+ },
236
+ {
237
+ name: "slippageTolerance",
238
+ type: "uint256",
239
+ internalType: "uint256"
240
+ },
241
+ {
242
+ name: "referralCode",
243
+ type: "bytes8",
244
+ internalType: "bytes8"
245
+ }
246
+ ],
247
+ outputs: [],
248
+ stateMutability: "payable"
249
+ },
250
+ {
251
+ type: "function",
252
+ name: "buyTokensWETH",
253
+ inputs: [
254
+ {
255
+ name: "vaultAddress",
256
+ type: "address",
257
+ internalType: "address"
258
+ },
259
+ {
260
+ name: "pool",
261
+ type: "address",
262
+ internalType: "address"
263
+ },
264
+ {
265
+ name: "price",
266
+ type: "uint256",
267
+ internalType: "uint256"
268
+ },
269
+ {
270
+ name: "amount",
271
+ type: "uint256",
272
+ internalType: "uint256"
273
+ },
274
+ {
275
+ name: "minAmount",
276
+ type: "uint256",
277
+ internalType: "uint256"
278
+ },
279
+ {
280
+ name: "receiver",
281
+ type: "address",
282
+ internalType: "address"
283
+ },
284
+ {
285
+ name: "isLimitOrder",
286
+ type: "bool",
287
+ internalType: "bool"
288
+ },
289
+ {
290
+ name: "slippageTolerance",
291
+ type: "uint256",
292
+ internalType: "uint256"
293
+ },
294
+ {
295
+ name: "referralCode",
296
+ type: "bytes8",
297
+ internalType: "bytes8"
298
+ }
299
+ ],
300
+ outputs: [],
301
+ stateMutability: "nonpayable"
302
+ },
303
+ {
304
+ type: "function",
305
+ name: "nomaFactory",
306
+ inputs: [],
307
+ outputs: [
308
+ {
309
+ name: "",
310
+ type: "address",
311
+ internalType: "address"
312
+ }
313
+ ],
314
+ stateMutability: "view"
315
+ },
316
+ {
317
+ type: "function",
318
+ name: "pancakeV3SwapCallback",
319
+ inputs: [
320
+ {
321
+ name: "amount0Delta",
322
+ type: "int256",
323
+ internalType: "int256"
324
+ },
325
+ {
326
+ name: "amount1Delta",
327
+ type: "int256",
328
+ internalType: "int256"
329
+ },
330
+ {
331
+ name: "data",
332
+ type: "bytes",
333
+ internalType: "bytes"
334
+ }
335
+ ],
336
+ outputs: [],
337
+ stateMutability: "nonpayable"
338
+ },
339
+ {
340
+ type: "function",
341
+ name: "sellTokens",
342
+ inputs: [
343
+ {
344
+ name: "vaultAddress",
345
+ type: "address",
346
+ internalType: "address"
347
+ },
348
+ {
349
+ name: "pool",
350
+ type: "address",
351
+ internalType: "address"
352
+ },
353
+ {
354
+ name: "price",
355
+ type: "uint256",
356
+ internalType: "uint256"
357
+ },
358
+ {
359
+ name: "amount",
360
+ type: "uint256",
361
+ internalType: "uint256"
362
+ },
363
+ {
364
+ name: "minAmount",
365
+ type: "uint256",
366
+ internalType: "uint256"
367
+ },
368
+ {
369
+ name: "receiver",
370
+ type: "address",
371
+ internalType: "address"
372
+ },
373
+ {
374
+ name: "isLimitOrder",
375
+ type: "bool",
376
+ internalType: "bool"
377
+ },
378
+ {
379
+ name: "slippageTolerance",
380
+ type: "uint256",
381
+ internalType: "uint256"
382
+ },
383
+ {
384
+ name: "referralCode",
385
+ type: "bytes8",
386
+ internalType: "bytes8"
387
+ }
388
+ ],
389
+ outputs: [],
390
+ stateMutability: "nonpayable"
391
+ },
392
+ {
393
+ type: "function",
394
+ name: "sellTokensETH",
395
+ inputs: [
396
+ {
397
+ name: "vaultAddress",
398
+ type: "address",
399
+ internalType: "address"
400
+ },
401
+ {
402
+ name: "pool",
403
+ type: "address",
404
+ internalType: "address"
405
+ },
406
+ {
407
+ name: "price",
408
+ type: "uint256",
409
+ internalType: "uint256"
410
+ },
411
+ {
412
+ name: "amount",
413
+ type: "uint256",
414
+ internalType: "uint256"
415
+ },
416
+ {
417
+ name: "minAmount",
418
+ type: "uint256",
419
+ internalType: "uint256"
420
+ },
421
+ {
422
+ name: "receiver",
423
+ type: "address",
424
+ internalType: "address"
425
+ },
426
+ {
427
+ name: "isLimitOrder",
428
+ type: "bool",
429
+ internalType: "bool"
430
+ },
431
+ {
432
+ name: "slippageTolerance",
433
+ type: "uint256",
434
+ internalType: "uint256"
435
+ },
436
+ {
437
+ name: "referralCode",
438
+ type: "bytes8",
439
+ internalType: "bytes8"
440
+ }
441
+ ],
442
+ outputs: [],
443
+ stateMutability: "nonpayable"
444
+ },
445
+ {
446
+ type: "function",
447
+ name: "tokenInfo",
448
+ inputs: [],
449
+ outputs: [
450
+ {
451
+ name: "token0",
452
+ type: "address",
453
+ internalType: "address"
454
+ },
455
+ {
456
+ name: "token1",
457
+ type: "address",
458
+ internalType: "address"
459
+ }
460
+ ],
461
+ stateMutability: "view"
462
+ },
463
+ {
464
+ type: "function",
465
+ name: "uniswapV3SwapCallback",
466
+ inputs: [
467
+ {
468
+ name: "amount0Delta",
469
+ type: "int256",
470
+ internalType: "int256"
471
+ },
472
+ {
473
+ name: "amount1Delta",
474
+ type: "int256",
475
+ internalType: "int256"
476
+ },
477
+ {
478
+ name: "data",
479
+ type: "bytes",
480
+ internalType: "bytes"
481
+ }
482
+ ],
483
+ outputs: [],
484
+ stateMutability: "nonpayable"
485
+ },
486
+ {
487
+ type: "event",
488
+ name: "BoughtTokensETH",
489
+ inputs: [
490
+ {
491
+ name: "who",
492
+ type: "address",
493
+ indexed: false,
494
+ internalType: "address"
495
+ },
496
+ {
497
+ name: "amount",
498
+ type: "uint256",
499
+ indexed: false,
500
+ internalType: "uint256"
501
+ }
502
+ ],
503
+ anonymous: false
504
+ },
505
+ {
506
+ type: "event",
507
+ name: "BoughtTokensWETH",
508
+ inputs: [
509
+ {
510
+ name: "who",
511
+ type: "address",
512
+ indexed: false,
513
+ internalType: "address"
514
+ },
515
+ {
516
+ name: "amount",
517
+ type: "uint256",
518
+ indexed: false,
519
+ internalType: "uint256"
520
+ }
521
+ ],
522
+ anonymous: false
523
+ },
524
+ {
525
+ type: "event",
526
+ name: "SoldTokensETH",
527
+ inputs: [
528
+ {
529
+ name: "who",
530
+ type: "address",
531
+ indexed: false,
532
+ internalType: "address"
533
+ },
534
+ {
535
+ name: "amount",
536
+ type: "uint256",
537
+ indexed: false,
538
+ internalType: "uint256"
539
+ }
540
+ ],
541
+ anonymous: false
542
+ },
543
+ {
544
+ type: "event",
545
+ name: "SoldTokensWETH",
546
+ inputs: [
547
+ {
548
+ name: "who",
549
+ type: "address",
550
+ indexed: false,
551
+ internalType: "address"
552
+ },
553
+ {
554
+ name: "amount",
555
+ type: "uint256",
556
+ indexed: false,
557
+ internalType: "uint256"
558
+ }
559
+ ],
560
+ anonymous: false
561
+ },
562
+ {
563
+ type: "error",
564
+ name: "InvalidAmount",
565
+ inputs: []
566
+ },
567
+ {
568
+ type: "error",
569
+ name: "InvalidDecimals",
570
+ inputs: []
571
+ },
572
+ {
573
+ type: "error",
574
+ name: "InvalidSwap",
575
+ inputs: []
576
+ },
577
+ {
578
+ type: "error",
579
+ name: "NoETHSent",
580
+ inputs: []
581
+ },
582
+ {
583
+ type: "error",
584
+ name: "NoToken0Received",
585
+ inputs: []
586
+ },
587
+ {
588
+ type: "error",
589
+ name: "NoTokensExchanged",
590
+ inputs: []
591
+ },
592
+ {
593
+ type: "error",
594
+ name: "ReentrantCall",
595
+ inputs: []
596
+ },
597
+ {
598
+ type: "error",
599
+ name: "SafeERC20FailedOperation",
600
+ inputs: [
601
+ {
602
+ name: "token",
603
+ type: "address",
604
+ internalType: "address"
605
+ }
606
+ ]
607
+ },
608
+ {
609
+ type: "error",
610
+ name: "SlippageExceeded",
611
+ inputs: []
612
+ }
613
+ ];
614
+
615
+ // data/abi/Factory.json
616
+ var Factory_default = [
617
+ {
618
+ type: "constructor",
619
+ inputs: [
620
+ {
621
+ name: "_uniswapV3Factory",
622
+ type: "address",
623
+ internalType: "address"
624
+ },
625
+ {
626
+ name: "_pancakeSwapV3Factory",
627
+ type: "address",
628
+ internalType: "address"
629
+ },
630
+ {
631
+ name: "_resolver",
632
+ type: "address",
633
+ internalType: "address"
634
+ },
635
+ {
636
+ name: "_deployerFactory",
637
+ type: "address",
638
+ internalType: "address"
639
+ },
640
+ {
641
+ name: "_extFactory",
642
+ type: "address",
643
+ internalType: "address"
644
+ },
645
+ {
646
+ name: "_presaleFactory",
647
+ type: "address",
648
+ internalType: "address"
649
+ }
650
+ ],
651
+ stateMutability: "nonpayable"
652
+ },
653
+ {
654
+ type: "function",
655
+ name: "adaptiveSupply",
656
+ inputs: [],
657
+ outputs: [
658
+ {
659
+ name: "",
660
+ type: "address",
661
+ internalType: "address"
662
+ }
663
+ ],
664
+ stateMutability: "view"
665
+ },
666
+ {
667
+ type: "function",
668
+ name: "burnFor",
669
+ inputs: [
670
+ {
671
+ name: "from",
672
+ type: "address",
673
+ internalType: "address"
674
+ },
675
+ {
676
+ name: "amount",
677
+ type: "uint256",
678
+ internalType: "uint256"
679
+ }
680
+ ],
681
+ outputs: [],
682
+ stateMutability: "nonpayable"
683
+ },
684
+ {
685
+ type: "function",
686
+ name: "configureVault",
687
+ inputs: [
688
+ {
689
+ name: "vaultAddress",
690
+ type: "address",
691
+ internalType: "address"
692
+ },
693
+ {
694
+ name: "step",
695
+ type: "uint8",
696
+ internalType: "uint8"
697
+ }
698
+ ],
699
+ outputs: [
700
+ {
701
+ name: "data",
702
+ type: "tuple",
703
+ internalType: "struct DeploymentData",
704
+ components: [
705
+ {
706
+ name: "presaleParams",
707
+ type: "tuple",
708
+ internalType: "struct PresaleUserParams",
709
+ components: [
710
+ {
711
+ name: "softCap",
712
+ type: "uint256",
713
+ internalType: "uint256"
714
+ },
715
+ {
716
+ name: "deadline",
717
+ type: "uint256",
718
+ internalType: "uint256"
719
+ }
720
+ ]
721
+ },
722
+ {
723
+ name: "vaultDeployParams",
724
+ type: "tuple",
725
+ internalType: "struct VaultDeployParams",
726
+ components: [
727
+ {
728
+ name: "name",
729
+ type: "string",
730
+ internalType: "string"
731
+ },
732
+ {
733
+ name: "symbol",
734
+ type: "string",
735
+ internalType: "string"
736
+ },
737
+ {
738
+ name: "decimals",
739
+ type: "uint8",
740
+ internalType: "uint8"
741
+ },
742
+ {
743
+ name: "initialSupply",
744
+ type: "uint256",
745
+ internalType: "uint256"
746
+ },
747
+ {
748
+ name: "maxTotalSupply",
749
+ type: "uint256",
750
+ internalType: "uint256"
751
+ },
752
+ {
753
+ name: "IDOPrice",
754
+ type: "uint256",
755
+ internalType: "uint256"
756
+ },
757
+ {
758
+ name: "floorPrice",
759
+ type: "uint256",
760
+ internalType: "uint256"
761
+ },
762
+ {
763
+ name: "token1",
764
+ type: "address",
765
+ internalType: "address"
766
+ },
767
+ {
768
+ name: "feeTier",
769
+ type: "uint24",
770
+ internalType: "uint24"
771
+ },
772
+ {
773
+ name: "presale",
774
+ type: "uint8",
775
+ internalType: "uint8"
776
+ },
777
+ {
778
+ name: "isFreshDeploy",
779
+ type: "bool",
780
+ internalType: "bool"
781
+ },
782
+ {
783
+ name: "useUniswap",
784
+ type: "bool",
785
+ internalType: "bool"
786
+ }
787
+ ]
788
+ },
789
+ {
790
+ name: "pool",
791
+ type: "address",
792
+ internalType: "contract IUniswapV3Pool"
793
+ },
794
+ {
795
+ name: "proxy",
796
+ type: "address",
797
+ internalType: "contract ERC1967Proxy"
798
+ },
799
+ {
800
+ name: "tickSpacing",
801
+ type: "int24",
802
+ internalType: "int24"
803
+ },
804
+ {
805
+ name: "vaultAddress",
806
+ type: "address",
807
+ internalType: "address"
808
+ },
809
+ {
810
+ name: "vaultUpgrade",
811
+ type: "address",
812
+ internalType: "address"
813
+ },
814
+ {
815
+ name: "sOKS",
816
+ type: "address",
817
+ internalType: "address"
818
+ },
819
+ {
820
+ name: "stakingContract",
821
+ type: "address",
822
+ internalType: "address"
823
+ },
824
+ {
825
+ name: "presaleContract",
826
+ type: "address",
827
+ internalType: "address"
828
+ },
829
+ {
830
+ name: "tokenRepo",
831
+ type: "address",
832
+ internalType: "address"
833
+ },
834
+ {
835
+ name: "vToken",
836
+ type: "address",
837
+ internalType: "address"
838
+ },
839
+ {
840
+ name: "existingVault",
841
+ type: "address",
842
+ internalType: "address"
843
+ }
844
+ ]
845
+ }
846
+ ],
847
+ stateMutability: "nonpayable"
848
+ },
849
+ {
850
+ type: "function",
851
+ name: "deferredDeploy",
852
+ inputs: [
853
+ {
854
+ name: "_deployerContract",
855
+ type: "address",
856
+ internalType: "address"
857
+ },
858
+ {
859
+ name: "_tokenRepo",
860
+ type: "address",
861
+ internalType: "address"
862
+ }
863
+ ],
864
+ outputs: [],
865
+ stateMutability: "nonpayable"
866
+ },
867
+ {
868
+ type: "function",
869
+ name: "deployVault",
870
+ inputs: [
871
+ {
872
+ name: "presaleParams",
873
+ type: "tuple",
874
+ internalType: "struct PresaleUserParams",
875
+ components: [
876
+ {
877
+ name: "softCap",
878
+ type: "uint256",
879
+ internalType: "uint256"
880
+ },
881
+ {
882
+ name: "deadline",
883
+ type: "uint256",
884
+ internalType: "uint256"
885
+ }
886
+ ]
887
+ },
888
+ {
889
+ name: "vaultDeployParams",
890
+ type: "tuple",
891
+ internalType: "struct VaultDeployParams",
892
+ components: [
893
+ {
894
+ name: "name",
895
+ type: "string",
896
+ internalType: "string"
897
+ },
898
+ {
899
+ name: "symbol",
900
+ type: "string",
901
+ internalType: "string"
902
+ },
903
+ {
904
+ name: "decimals",
905
+ type: "uint8",
906
+ internalType: "uint8"
907
+ },
908
+ {
909
+ name: "initialSupply",
910
+ type: "uint256",
911
+ internalType: "uint256"
912
+ },
913
+ {
914
+ name: "maxTotalSupply",
915
+ type: "uint256",
916
+ internalType: "uint256"
917
+ },
918
+ {
919
+ name: "IDOPrice",
920
+ type: "uint256",
921
+ internalType: "uint256"
922
+ },
923
+ {
924
+ name: "floorPrice",
925
+ type: "uint256",
926
+ internalType: "uint256"
927
+ },
928
+ {
929
+ name: "token1",
930
+ type: "address",
931
+ internalType: "address"
932
+ },
933
+ {
934
+ name: "feeTier",
935
+ type: "uint24",
936
+ internalType: "uint24"
937
+ },
938
+ {
939
+ name: "presale",
940
+ type: "uint8",
941
+ internalType: "uint8"
942
+ },
943
+ {
944
+ name: "isFreshDeploy",
945
+ type: "bool",
946
+ internalType: "bool"
947
+ },
948
+ {
949
+ name: "useUniswap",
950
+ type: "bool",
951
+ internalType: "bool"
952
+ }
953
+ ]
954
+ },
955
+ {
956
+ name: "existingDeployData",
957
+ type: "tuple",
958
+ internalType: "struct ExistingDeployData",
959
+ components: [
960
+ {
961
+ name: "token0",
962
+ type: "address",
963
+ internalType: "address"
964
+ },
965
+ {
966
+ name: "pool",
967
+ type: "address",
968
+ internalType: "address"
969
+ },
970
+ {
971
+ name: "vaultAddress",
972
+ type: "address",
973
+ internalType: "address"
974
+ }
975
+ ]
976
+ }
977
+ ],
978
+ outputs: [
979
+ {
980
+ name: "",
981
+ type: "address",
982
+ internalType: "address"
983
+ },
984
+ {
985
+ name: "",
986
+ type: "address",
987
+ internalType: "address"
988
+ },
989
+ {
990
+ name: "",
991
+ type: "address",
992
+ internalType: "address"
993
+ }
994
+ ],
995
+ stateMutability: "payable"
996
+ },
997
+ {
998
+ type: "function",
999
+ name: "getDeployers",
1000
+ inputs: [],
1001
+ outputs: [
1002
+ {
1003
+ name: "",
1004
+ type: "address[]",
1005
+ internalType: "address[]"
1006
+ }
1007
+ ],
1008
+ stateMutability: "view"
1009
+ },
1010
+ {
1011
+ type: "function",
1012
+ name: "getPresaleProtocolParams",
1013
+ inputs: [],
1014
+ outputs: [
1015
+ {
1016
+ name: "",
1017
+ type: "tuple",
1018
+ internalType: "struct PresaleProtocolParams",
1019
+ components: [
1020
+ {
1021
+ name: "maxSoftCap",
1022
+ type: "uint256",
1023
+ internalType: "uint256"
1024
+ },
1025
+ {
1026
+ name: "minContributionRatioBps",
1027
+ type: "uint16",
1028
+ internalType: "uint16"
1029
+ },
1030
+ {
1031
+ name: "maxContributionRatioBps",
1032
+ type: "uint16",
1033
+ internalType: "uint16"
1034
+ },
1035
+ {
1036
+ name: "presalePercentage",
1037
+ type: "uint256",
1038
+ internalType: "uint256"
1039
+ },
1040
+ {
1041
+ name: "minDuration",
1042
+ type: "uint256",
1043
+ internalType: "uint256"
1044
+ },
1045
+ {
1046
+ name: "maxDuration",
1047
+ type: "uint256",
1048
+ internalType: "uint256"
1049
+ },
1050
+ {
1051
+ name: "referralPercentage",
1052
+ type: "uint256",
1053
+ internalType: "uint256"
1054
+ },
1055
+ {
1056
+ name: "teamFee",
1057
+ type: "uint256",
1058
+ internalType: "uint256"
1059
+ }
1060
+ ]
1061
+ }
1062
+ ],
1063
+ stateMutability: "view"
1064
+ },
1065
+ {
1066
+ type: "function",
1067
+ name: "getProtocolParameters",
1068
+ inputs: [],
1069
+ outputs: [
1070
+ {
1071
+ name: "",
1072
+ type: "tuple",
1073
+ internalType: "struct ProtocolParameters",
1074
+ components: [
1075
+ {
1076
+ name: "floorPercentage",
1077
+ type: "uint8",
1078
+ internalType: "uint8"
1079
+ },
1080
+ {
1081
+ name: "anchorPercentage",
1082
+ type: "uint8",
1083
+ internalType: "uint8"
1084
+ },
1085
+ {
1086
+ name: "idoPriceMultiplier",
1087
+ type: "uint8",
1088
+ internalType: "uint8"
1089
+ },
1090
+ {
1091
+ name: "floorBips",
1092
+ type: "uint16[2]",
1093
+ internalType: "uint16[2]"
1094
+ },
1095
+ {
1096
+ name: "shiftRatio",
1097
+ type: "uint256",
1098
+ internalType: "uint256"
1099
+ },
1100
+ {
1101
+ name: "slideRatio",
1102
+ type: "uint256",
1103
+ internalType: "uint256"
1104
+ },
1105
+ {
1106
+ name: "discoveryBips",
1107
+ type: "int24",
1108
+ internalType: "int24"
1109
+ },
1110
+ {
1111
+ name: "shiftAnchorUpperBips",
1112
+ type: "int24",
1113
+ internalType: "int24"
1114
+ },
1115
+ {
1116
+ name: "slideAnchorUpperBips",
1117
+ type: "int24",
1118
+ internalType: "int24"
1119
+ },
1120
+ {
1121
+ name: "lowBalanceThresholdFactor",
1122
+ type: "uint256",
1123
+ internalType: "uint256"
1124
+ },
1125
+ {
1126
+ name: "highBalanceThresholdFactor",
1127
+ type: "uint256",
1128
+ internalType: "uint256"
1129
+ },
1130
+ {
1131
+ name: "inflationFee",
1132
+ type: "uint256",
1133
+ internalType: "uint256"
1134
+ },
1135
+ {
1136
+ name: "loanFee",
1137
+ type: "uint256",
1138
+ internalType: "uint256"
1139
+ },
1140
+ {
1141
+ name: "maxLoanUtilization",
1142
+ type: "uint256",
1143
+ internalType: "uint256"
1144
+ },
1145
+ {
1146
+ name: "deployFee",
1147
+ type: "uint256",
1148
+ internalType: "uint256"
1149
+ },
1150
+ {
1151
+ name: "presalePremium",
1152
+ type: "uint256",
1153
+ internalType: "uint256"
1154
+ },
1155
+ {
1156
+ name: "selfRepayLtvTreshold",
1157
+ type: "uint256",
1158
+ internalType: "uint256"
1159
+ },
1160
+ {
1161
+ name: "halfStep",
1162
+ type: "uint256",
1163
+ internalType: "uint256"
1164
+ },
1165
+ {
1166
+ name: "skimRatio",
1167
+ type: "uint256",
1168
+ internalType: "uint256"
1169
+ },
1170
+ {
1171
+ name: "decimals",
1172
+ type: "tuple",
1173
+ internalType: "struct Decimals",
1174
+ components: [
1175
+ {
1176
+ name: "minDecimals",
1177
+ type: "uint8",
1178
+ internalType: "uint8"
1179
+ },
1180
+ {
1181
+ name: "maxDecimals",
1182
+ type: "uint8",
1183
+ internalType: "uint8"
1184
+ }
1185
+ ]
1186
+ },
1187
+ {
1188
+ name: "basePriceDecimals",
1189
+ type: "uint256",
1190
+ internalType: "uint256"
1191
+ },
1192
+ {
1193
+ name: "reservedBalanceThreshold",
1194
+ type: "uint256",
1195
+ internalType: "uint256"
1196
+ },
1197
+ {
1198
+ name: "twapPeriod",
1199
+ type: "uint32",
1200
+ internalType: "uint32"
1201
+ },
1202
+ {
1203
+ name: "maxTwapDeviation",
1204
+ type: "uint256",
1205
+ internalType: "uint256"
1206
+ }
1207
+ ]
1208
+ }
1209
+ ],
1210
+ stateMutability: "view"
1211
+ },
1212
+ {
1213
+ type: "function",
1214
+ name: "getVaultDescription",
1215
+ inputs: [
1216
+ {
1217
+ name: "vault",
1218
+ type: "address",
1219
+ internalType: "address"
1220
+ }
1221
+ ],
1222
+ outputs: [
1223
+ {
1224
+ name: "",
1225
+ type: "tuple",
1226
+ internalType: "struct VaultDescription",
1227
+ components: [
1228
+ {
1229
+ name: "tokenName",
1230
+ type: "string",
1231
+ internalType: "string"
1232
+ },
1233
+ {
1234
+ name: "tokenSymbol",
1235
+ type: "string",
1236
+ internalType: "string"
1237
+ },
1238
+ {
1239
+ name: "tokenDecimals",
1240
+ type: "uint8",
1241
+ internalType: "uint8"
1242
+ },
1243
+ {
1244
+ name: "token0",
1245
+ type: "address",
1246
+ internalType: "address"
1247
+ },
1248
+ {
1249
+ name: "token1",
1250
+ type: "address",
1251
+ internalType: "address"
1252
+ },
1253
+ {
1254
+ name: "deployer",
1255
+ type: "address",
1256
+ internalType: "address"
1257
+ },
1258
+ {
1259
+ name: "vault",
1260
+ type: "address",
1261
+ internalType: "address"
1262
+ },
1263
+ {
1264
+ name: "presaleContract",
1265
+ type: "address",
1266
+ internalType: "address"
1267
+ },
1268
+ {
1269
+ name: "stakingContract",
1270
+ type: "address",
1271
+ internalType: "address"
1272
+ },
1273
+ {
1274
+ name: "deployerContract",
1275
+ type: "address",
1276
+ internalType: "address"
1277
+ }
1278
+ ]
1279
+ }
1280
+ ],
1281
+ stateMutability: "view"
1282
+ },
1283
+ {
1284
+ type: "function",
1285
+ name: "getVaultFromPool",
1286
+ inputs: [
1287
+ {
1288
+ name: "pool",
1289
+ type: "address",
1290
+ internalType: "address"
1291
+ }
1292
+ ],
1293
+ outputs: [
1294
+ {
1295
+ name: "",
1296
+ type: "address",
1297
+ internalType: "address"
1298
+ }
1299
+ ],
1300
+ stateMutability: "view"
1301
+ },
1302
+ {
1303
+ type: "function",
1304
+ name: "getVaults",
1305
+ inputs: [
1306
+ {
1307
+ name: "_deployer",
1308
+ type: "address",
1309
+ internalType: "address"
1310
+ }
1311
+ ],
1312
+ outputs: [
1313
+ {
1314
+ name: "",
1315
+ type: "address[]",
1316
+ internalType: "address[]"
1317
+ }
1318
+ ],
1319
+ stateMutability: "view"
1320
+ },
1321
+ {
1322
+ type: "function",
1323
+ name: "getVaultsRepository",
1324
+ inputs: [
1325
+ {
1326
+ name: "vault",
1327
+ type: "address",
1328
+ internalType: "address"
1329
+ }
1330
+ ],
1331
+ outputs: [
1332
+ {
1333
+ name: "",
1334
+ type: "tuple",
1335
+ internalType: "struct VaultDescription",
1336
+ components: [
1337
+ {
1338
+ name: "tokenName",
1339
+ type: "string",
1340
+ internalType: "string"
1341
+ },
1342
+ {
1343
+ name: "tokenSymbol",
1344
+ type: "string",
1345
+ internalType: "string"
1346
+ },
1347
+ {
1348
+ name: "tokenDecimals",
1349
+ type: "uint8",
1350
+ internalType: "uint8"
1351
+ },
1352
+ {
1353
+ name: "token0",
1354
+ type: "address",
1355
+ internalType: "address"
1356
+ },
1357
+ {
1358
+ name: "token1",
1359
+ type: "address",
1360
+ internalType: "address"
1361
+ },
1362
+ {
1363
+ name: "deployer",
1364
+ type: "address",
1365
+ internalType: "address"
1366
+ },
1367
+ {
1368
+ name: "vault",
1369
+ type: "address",
1370
+ internalType: "address"
1371
+ },
1372
+ {
1373
+ name: "presaleContract",
1374
+ type: "address",
1375
+ internalType: "address"
1376
+ },
1377
+ {
1378
+ name: "stakingContract",
1379
+ type: "address",
1380
+ internalType: "address"
1381
+ },
1382
+ {
1383
+ name: "deployerContract",
1384
+ type: "address",
1385
+ internalType: "address"
1386
+ }
1387
+ ]
1388
+ }
1389
+ ],
1390
+ stateMutability: "view"
1391
+ },
1392
+ {
1393
+ type: "function",
1394
+ name: "mintTokens",
1395
+ inputs: [
1396
+ {
1397
+ name: "to",
1398
+ type: "address",
1399
+ internalType: "address"
1400
+ },
1401
+ {
1402
+ name: "amount",
1403
+ type: "uint256",
1404
+ internalType: "uint256"
1405
+ }
1406
+ ],
1407
+ outputs: [],
1408
+ stateMutability: "nonpayable"
1409
+ },
1410
+ {
1411
+ type: "function",
1412
+ name: "modelHelper",
1413
+ inputs: [],
1414
+ outputs: [
1415
+ {
1416
+ name: "",
1417
+ type: "address",
1418
+ internalType: "address"
1419
+ }
1420
+ ],
1421
+ stateMutability: "view"
1422
+ },
1423
+ {
1424
+ type: "function",
1425
+ name: "numDeployers",
1426
+ inputs: [],
1427
+ outputs: [
1428
+ {
1429
+ name: "",
1430
+ type: "uint256",
1431
+ internalType: "uint256"
1432
+ }
1433
+ ],
1434
+ stateMutability: "view"
1435
+ },
1436
+ {
1437
+ type: "function",
1438
+ name: "numVaults",
1439
+ inputs: [
1440
+ {
1441
+ name: "_deployer",
1442
+ type: "address",
1443
+ internalType: "address"
1444
+ }
1445
+ ],
1446
+ outputs: [
1447
+ {
1448
+ name: "",
1449
+ type: "uint256",
1450
+ internalType: "uint256"
1451
+ }
1452
+ ],
1453
+ stateMutability: "view"
1454
+ },
1455
+ {
1456
+ type: "function",
1457
+ name: "owner",
1458
+ inputs: [],
1459
+ outputs: [
1460
+ {
1461
+ name: "",
1462
+ type: "address",
1463
+ internalType: "address"
1464
+ }
1465
+ ],
1466
+ stateMutability: "view"
1467
+ },
1468
+ {
1469
+ type: "function",
1470
+ name: "setMultiSigAddress",
1471
+ inputs: [
1472
+ {
1473
+ name: "_address",
1474
+ type: "address",
1475
+ internalType: "address"
1476
+ }
1477
+ ],
1478
+ outputs: [],
1479
+ stateMutability: "nonpayable"
1480
+ },
1481
+ {
1482
+ type: "function",
1483
+ name: "setPermissionlessDeploy",
1484
+ inputs: [
1485
+ {
1486
+ name: "_flag",
1487
+ type: "bool",
1488
+ internalType: "bool"
1489
+ }
1490
+ ],
1491
+ outputs: [],
1492
+ stateMutability: "nonpayable"
1493
+ },
1494
+ {
1495
+ type: "function",
1496
+ name: "setPresaleProtocolParams",
1497
+ inputs: [
1498
+ {
1499
+ name: "_params",
1500
+ type: "tuple",
1501
+ internalType: "struct PresaleProtocolParams",
1502
+ components: [
1503
+ {
1504
+ name: "maxSoftCap",
1505
+ type: "uint256",
1506
+ internalType: "uint256"
1507
+ },
1508
+ {
1509
+ name: "minContributionRatioBps",
1510
+ type: "uint16",
1511
+ internalType: "uint16"
1512
+ },
1513
+ {
1514
+ name: "maxContributionRatioBps",
1515
+ type: "uint16",
1516
+ internalType: "uint16"
1517
+ },
1518
+ {
1519
+ name: "presalePercentage",
1520
+ type: "uint256",
1521
+ internalType: "uint256"
1522
+ },
1523
+ {
1524
+ name: "minDuration",
1525
+ type: "uint256",
1526
+ internalType: "uint256"
1527
+ },
1528
+ {
1529
+ name: "maxDuration",
1530
+ type: "uint256",
1531
+ internalType: "uint256"
1532
+ },
1533
+ {
1534
+ name: "referralPercentage",
1535
+ type: "uint256",
1536
+ internalType: "uint256"
1537
+ },
1538
+ {
1539
+ name: "teamFee",
1540
+ type: "uint256",
1541
+ internalType: "uint256"
1542
+ }
1543
+ ]
1544
+ }
1545
+ ],
1546
+ outputs: [],
1547
+ stateMutability: "nonpayable"
1548
+ },
1549
+ {
1550
+ type: "function",
1551
+ name: "setProtocolParameters",
1552
+ inputs: [
1553
+ {
1554
+ name: "_params",
1555
+ type: "tuple",
1556
+ internalType: "struct ProtocolParameters",
1557
+ components: [
1558
+ {
1559
+ name: "floorPercentage",
1560
+ type: "uint8",
1561
+ internalType: "uint8"
1562
+ },
1563
+ {
1564
+ name: "anchorPercentage",
1565
+ type: "uint8",
1566
+ internalType: "uint8"
1567
+ },
1568
+ {
1569
+ name: "idoPriceMultiplier",
1570
+ type: "uint8",
1571
+ internalType: "uint8"
1572
+ },
1573
+ {
1574
+ name: "floorBips",
1575
+ type: "uint16[2]",
1576
+ internalType: "uint16[2]"
1577
+ },
1578
+ {
1579
+ name: "shiftRatio",
1580
+ type: "uint256",
1581
+ internalType: "uint256"
1582
+ },
1583
+ {
1584
+ name: "slideRatio",
1585
+ type: "uint256",
1586
+ internalType: "uint256"
1587
+ },
1588
+ {
1589
+ name: "discoveryBips",
1590
+ type: "int24",
1591
+ internalType: "int24"
1592
+ },
1593
+ {
1594
+ name: "shiftAnchorUpperBips",
1595
+ type: "int24",
1596
+ internalType: "int24"
1597
+ },
1598
+ {
1599
+ name: "slideAnchorUpperBips",
1600
+ type: "int24",
1601
+ internalType: "int24"
1602
+ },
1603
+ {
1604
+ name: "lowBalanceThresholdFactor",
1605
+ type: "uint256",
1606
+ internalType: "uint256"
1607
+ },
1608
+ {
1609
+ name: "highBalanceThresholdFactor",
1610
+ type: "uint256",
1611
+ internalType: "uint256"
1612
+ },
1613
+ {
1614
+ name: "inflationFee",
1615
+ type: "uint256",
1616
+ internalType: "uint256"
1617
+ },
1618
+ {
1619
+ name: "loanFee",
1620
+ type: "uint256",
1621
+ internalType: "uint256"
1622
+ },
1623
+ {
1624
+ name: "maxLoanUtilization",
1625
+ type: "uint256",
1626
+ internalType: "uint256"
1627
+ },
1628
+ {
1629
+ name: "deployFee",
1630
+ type: "uint256",
1631
+ internalType: "uint256"
1632
+ },
1633
+ {
1634
+ name: "presalePremium",
1635
+ type: "uint256",
1636
+ internalType: "uint256"
1637
+ },
1638
+ {
1639
+ name: "selfRepayLtvTreshold",
1640
+ type: "uint256",
1641
+ internalType: "uint256"
1642
+ },
1643
+ {
1644
+ name: "halfStep",
1645
+ type: "uint256",
1646
+ internalType: "uint256"
1647
+ },
1648
+ {
1649
+ name: "skimRatio",
1650
+ type: "uint256",
1651
+ internalType: "uint256"
1652
+ },
1653
+ {
1654
+ name: "decimals",
1655
+ type: "tuple",
1656
+ internalType: "struct Decimals",
1657
+ components: [
1658
+ {
1659
+ name: "minDecimals",
1660
+ type: "uint8",
1661
+ internalType: "uint8"
1662
+ },
1663
+ {
1664
+ name: "maxDecimals",
1665
+ type: "uint8",
1666
+ internalType: "uint8"
1667
+ }
1668
+ ]
1669
+ },
1670
+ {
1671
+ name: "basePriceDecimals",
1672
+ type: "uint256",
1673
+ internalType: "uint256"
1674
+ },
1675
+ {
1676
+ name: "reservedBalanceThreshold",
1677
+ type: "uint256",
1678
+ internalType: "uint256"
1679
+ },
1680
+ {
1681
+ name: "twapPeriod",
1682
+ type: "uint32",
1683
+ internalType: "uint32"
1684
+ },
1685
+ {
1686
+ name: "maxTwapDeviation",
1687
+ type: "uint256",
1688
+ internalType: "uint256"
1689
+ }
1690
+ ]
1691
+ }
1692
+ ],
1693
+ outputs: [],
1694
+ stateMutability: "nonpayable"
1695
+ },
1696
+ {
1697
+ type: "function",
1698
+ name: "setVaultOwnership",
1699
+ inputs: [
1700
+ {
1701
+ name: "vaultAddress",
1702
+ type: "address",
1703
+ internalType: "address"
1704
+ },
1705
+ {
1706
+ name: "newOwner",
1707
+ type: "address",
1708
+ internalType: "address"
1709
+ }
1710
+ ],
1711
+ outputs: [],
1712
+ stateMutability: "nonpayable"
1713
+ },
1714
+ {
1715
+ type: "function",
1716
+ name: "teamMultiSig",
1717
+ inputs: [],
1718
+ outputs: [
1719
+ {
1720
+ name: "",
1721
+ type: "address",
1722
+ internalType: "address"
1723
+ }
1724
+ ],
1725
+ stateMutability: "view"
1726
+ },
1727
+ {
1728
+ type: "function",
1729
+ name: "tokenFactory",
1730
+ inputs: [],
1731
+ outputs: [
1732
+ {
1733
+ name: "",
1734
+ type: "address",
1735
+ internalType: "address"
1736
+ }
1737
+ ],
1738
+ stateMutability: "view"
1739
+ },
1740
+ {
1741
+ type: "function",
1742
+ name: "upgradeToken",
1743
+ inputs: [
1744
+ {
1745
+ name: "_token",
1746
+ type: "address",
1747
+ internalType: "address"
1748
+ },
1749
+ {
1750
+ name: "_newImplementation",
1751
+ type: "address",
1752
+ internalType: "address"
1753
+ }
1754
+ ],
1755
+ outputs: [],
1756
+ stateMutability: "nonpayable"
1757
+ },
1758
+ {
1759
+ type: "error",
1760
+ name: "InvalidDecimals",
1761
+ inputs: []
1762
+ },
1763
+ {
1764
+ type: "error",
1765
+ name: "InvalidFeeTier",
1766
+ inputs: []
1767
+ },
1768
+ {
1769
+ type: "error",
1770
+ name: "InvalidParams",
1771
+ inputs: []
1772
+ },
1773
+ {
1774
+ type: "error",
1775
+ name: "InvalidSymbol",
1776
+ inputs: []
1777
+ },
1778
+ {
1779
+ type: "error",
1780
+ name: "NotAuthorized",
1781
+ inputs: []
1782
+ },
1783
+ {
1784
+ type: "error",
1785
+ name: "OnlyVault",
1786
+ inputs: []
1787
+ },
1788
+ {
1789
+ type: "error",
1790
+ name: "SafeERC20FailedOperation",
1791
+ inputs: [
1792
+ {
1793
+ name: "token",
1794
+ type: "address",
1795
+ internalType: "address"
1796
+ }
1797
+ ]
1798
+ },
1799
+ {
1800
+ type: "error",
1801
+ name: "SupplyTransferError",
1802
+ inputs: []
1803
+ },
1804
+ {
1805
+ type: "error",
1806
+ name: "TokenAlreadyExistsError",
1807
+ inputs: []
1808
+ },
1809
+ {
1810
+ type: "error",
1811
+ name: "TotalSupplyTooLow",
1812
+ inputs: [
1813
+ {
1814
+ name: "minRequired",
1815
+ type: "uint256",
1816
+ internalType: "uint256"
1817
+ },
1818
+ {
1819
+ name: "provided",
1820
+ type: "uint256",
1821
+ internalType: "uint256"
1822
+ }
1823
+ ]
1824
+ },
1825
+ {
1826
+ type: "error",
1827
+ name: "TransferFailed",
1828
+ inputs: []
1829
+ },
1830
+ {
1831
+ type: "error",
1832
+ name: "Unauthorized",
1833
+ inputs: []
1834
+ },
1835
+ {
1836
+ type: "error",
1837
+ name: "ZeroAddress",
1838
+ inputs: []
1839
+ }
1840
+ ];
1841
+
1842
+ // data/abi/ModelHelper.json
1843
+ var ModelHelper_default = [
1844
+ {
1845
+ type: "function",
1846
+ name: "enforceSolvencyInvariant",
1847
+ inputs: [
1848
+ {
1849
+ name: "_vault",
1850
+ type: "address",
1851
+ internalType: "address"
1852
+ }
1853
+ ],
1854
+ outputs: [],
1855
+ stateMutability: "view"
1856
+ },
1857
+ {
1858
+ type: "function",
1859
+ name: "getCirculatingSupply",
1860
+ inputs: [
1861
+ {
1862
+ name: "pool",
1863
+ type: "address",
1864
+ internalType: "address"
1865
+ },
1866
+ {
1867
+ name: "vault",
1868
+ type: "address",
1869
+ internalType: "address"
1870
+ },
1871
+ {
1872
+ name: "includeStaked",
1873
+ type: "bool",
1874
+ internalType: "bool"
1875
+ }
1876
+ ],
1877
+ outputs: [
1878
+ {
1879
+ name: "",
1880
+ type: "uint256",
1881
+ internalType: "uint256"
1882
+ }
1883
+ ],
1884
+ stateMutability: "view"
1885
+ },
1886
+ {
1887
+ type: "function",
1888
+ name: "getExcessReserveBalance",
1889
+ inputs: [
1890
+ {
1891
+ name: "pool",
1892
+ type: "address",
1893
+ internalType: "address"
1894
+ },
1895
+ {
1896
+ name: "vault",
1897
+ type: "address",
1898
+ internalType: "address"
1899
+ },
1900
+ {
1901
+ name: "isToken0",
1902
+ type: "bool",
1903
+ internalType: "bool"
1904
+ }
1905
+ ],
1906
+ outputs: [
1907
+ {
1908
+ name: "",
1909
+ type: "uint256",
1910
+ internalType: "uint256"
1911
+ }
1912
+ ],
1913
+ stateMutability: "view"
1914
+ },
1915
+ {
1916
+ type: "function",
1917
+ name: "getIntrinsicMinimumValue",
1918
+ inputs: [
1919
+ {
1920
+ name: "_vault",
1921
+ type: "address",
1922
+ internalType: "address"
1923
+ }
1924
+ ],
1925
+ outputs: [
1926
+ {
1927
+ name: "",
1928
+ type: "uint256",
1929
+ internalType: "uint256"
1930
+ }
1931
+ ],
1932
+ stateMutability: "view"
1933
+ },
1934
+ {
1935
+ type: "function",
1936
+ name: "getLiquidityRatio",
1937
+ inputs: [
1938
+ {
1939
+ name: "pool",
1940
+ type: "address",
1941
+ internalType: "address"
1942
+ },
1943
+ {
1944
+ name: "vault",
1945
+ type: "address",
1946
+ internalType: "address"
1947
+ }
1948
+ ],
1949
+ outputs: [
1950
+ {
1951
+ name: "liquidityRatio",
1952
+ type: "uint256",
1953
+ internalType: "uint256"
1954
+ }
1955
+ ],
1956
+ stateMutability: "view"
1957
+ },
1958
+ {
1959
+ type: "function",
1960
+ name: "getPositionCapacity",
1961
+ inputs: [
1962
+ {
1963
+ name: "pool",
1964
+ type: "address",
1965
+ internalType: "address"
1966
+ },
1967
+ {
1968
+ name: "vault",
1969
+ type: "address",
1970
+ internalType: "address"
1971
+ },
1972
+ {
1973
+ name: "position",
1974
+ type: "tuple",
1975
+ internalType: "struct LiquidityPosition",
1976
+ components: [
1977
+ {
1978
+ name: "lowerTick",
1979
+ type: "int24",
1980
+ internalType: "int24"
1981
+ },
1982
+ {
1983
+ name: "upperTick",
1984
+ type: "int24",
1985
+ internalType: "int24"
1986
+ },
1987
+ {
1988
+ name: "liquidity",
1989
+ type: "uint128",
1990
+ internalType: "uint128"
1991
+ },
1992
+ {
1993
+ name: "price",
1994
+ type: "uint256",
1995
+ internalType: "uint256"
1996
+ },
1997
+ {
1998
+ name: "tickSpacing",
1999
+ type: "int24",
2000
+ internalType: "int24"
2001
+ },
2002
+ {
2003
+ name: "liquidityType",
2004
+ type: "uint8",
2005
+ internalType: "enum LiquidityType"
2006
+ }
2007
+ ]
2008
+ },
2009
+ {
2010
+ name: "liquidityType",
2011
+ type: "uint8",
2012
+ internalType: "enum LiquidityType"
2013
+ }
2014
+ ],
2015
+ outputs: [
2016
+ {
2017
+ name: "amount0Current",
2018
+ type: "uint256",
2019
+ internalType: "uint256"
2020
+ }
2021
+ ],
2022
+ stateMutability: "view"
2023
+ },
2024
+ {
2025
+ type: "function",
2026
+ name: "getTotalSupply",
2027
+ inputs: [
2028
+ {
2029
+ name: "pool",
2030
+ type: "address",
2031
+ internalType: "address"
2032
+ },
2033
+ {
2034
+ name: "isToken0",
2035
+ type: "bool",
2036
+ internalType: "bool"
2037
+ }
2038
+ ],
2039
+ outputs: [
2040
+ {
2041
+ name: "totalSupply",
2042
+ type: "uint256",
2043
+ internalType: "uint256"
2044
+ }
2045
+ ],
2046
+ stateMutability: "view"
2047
+ },
2048
+ {
2049
+ type: "function",
2050
+ name: "getUnderlyingBalances",
2051
+ inputs: [
2052
+ {
2053
+ name: "pool",
2054
+ type: "address",
2055
+ internalType: "address"
2056
+ },
2057
+ {
2058
+ name: "vault",
2059
+ type: "address",
2060
+ internalType: "address"
2061
+ },
2062
+ {
2063
+ name: "liquidityType",
2064
+ type: "uint8",
2065
+ internalType: "enum LiquidityType"
2066
+ }
2067
+ ],
2068
+ outputs: [
2069
+ {
2070
+ name: "",
2071
+ type: "int24",
2072
+ internalType: "int24"
2073
+ },
2074
+ {
2075
+ name: "",
2076
+ type: "int24",
2077
+ internalType: "int24"
2078
+ },
2079
+ {
2080
+ name: "",
2081
+ type: "uint256",
2082
+ internalType: "uint256"
2083
+ },
2084
+ {
2085
+ name: "",
2086
+ type: "uint256",
2087
+ internalType: "uint256"
2088
+ }
2089
+ ],
2090
+ stateMutability: "view"
2091
+ },
2092
+ {
2093
+ type: "function",
2094
+ name: "getVaultInfo",
2095
+ inputs: [
2096
+ {
2097
+ name: "pool",
2098
+ type: "address",
2099
+ internalType: "address"
2100
+ },
2101
+ {
2102
+ name: "vault",
2103
+ type: "address",
2104
+ internalType: "address"
2105
+ },
2106
+ {
2107
+ name: "tokenInfo",
2108
+ type: "tuple",
2109
+ internalType: "struct TokenInfo",
2110
+ components: [
2111
+ {
2112
+ name: "token0",
2113
+ type: "address",
2114
+ internalType: "address"
2115
+ },
2116
+ {
2117
+ name: "token1",
2118
+ type: "address",
2119
+ internalType: "address"
2120
+ }
2121
+ ]
2122
+ }
2123
+ ],
2124
+ outputs: [
2125
+ {
2126
+ name: "vaultInfo",
2127
+ type: "tuple",
2128
+ internalType: "struct VaultInfo",
2129
+ components: [
2130
+ {
2131
+ name: "liquidityRatio",
2132
+ type: "uint256",
2133
+ internalType: "uint256"
2134
+ },
2135
+ {
2136
+ name: "circulatingSupply",
2137
+ type: "uint256",
2138
+ internalType: "uint256"
2139
+ },
2140
+ {
2141
+ name: "spotPriceX96",
2142
+ type: "uint256",
2143
+ internalType: "uint256"
2144
+ },
2145
+ {
2146
+ name: "anchorCapacity",
2147
+ type: "uint256",
2148
+ internalType: "uint256"
2149
+ },
2150
+ {
2151
+ name: "floorCapacity",
2152
+ type: "uint256",
2153
+ internalType: "uint256"
2154
+ },
2155
+ {
2156
+ name: "token0",
2157
+ type: "address",
2158
+ internalType: "address"
2159
+ },
2160
+ {
2161
+ name: "token1",
2162
+ type: "address",
2163
+ internalType: "address"
2164
+ },
2165
+ {
2166
+ name: "newFloor",
2167
+ type: "uint256",
2168
+ internalType: "uint256"
2169
+ },
2170
+ {
2171
+ name: "totalInterest",
2172
+ type: "uint256",
2173
+ internalType: "uint256"
2174
+ },
2175
+ {
2176
+ name: "initialized",
2177
+ type: "bool",
2178
+ internalType: "bool"
2179
+ },
2180
+ {
2181
+ name: "stakingContract",
2182
+ type: "address",
2183
+ internalType: "address"
2184
+ },
2185
+ {
2186
+ name: "sToken",
2187
+ type: "address",
2188
+ internalType: "address"
2189
+ }
2190
+ ]
2191
+ }
2192
+ ],
2193
+ stateMutability: "view"
2194
+ },
2195
+ {
2196
+ type: "function",
2197
+ name: "totalUnderlyingBalance",
2198
+ inputs: [
2199
+ {
2200
+ name: "pool",
2201
+ type: "address",
2202
+ internalType: "address"
2203
+ },
2204
+ {
2205
+ name: "vault",
2206
+ type: "address",
2207
+ internalType: "address"
2208
+ }
2209
+ ],
2210
+ outputs: [
2211
+ {
2212
+ name: "totalToken0",
2213
+ type: "uint256",
2214
+ internalType: "uint256"
2215
+ }
2216
+ ],
2217
+ stateMutability: "view"
2218
+ },
2219
+ {
2220
+ type: "error",
2221
+ name: "InsolvencyInvariant",
2222
+ inputs: []
2223
+ }
2224
+ ];
2225
+
2226
+ // data/abi/Resolver.json
2227
+ var Resolver_default = [
2228
+ {
2229
+ type: "constructor",
2230
+ inputs: [
2231
+ {
2232
+ name: "_deployer",
2233
+ type: "address",
2234
+ internalType: "address"
2235
+ }
2236
+ ],
2237
+ stateMutability: "nonpayable"
2238
+ },
2239
+ {
2240
+ type: "function",
2241
+ name: "areAddressesImported",
2242
+ inputs: [
2243
+ {
2244
+ name: "names",
2245
+ type: "bytes32[]",
2246
+ internalType: "bytes32[]"
2247
+ },
2248
+ {
2249
+ name: "destinations",
2250
+ type: "address[]",
2251
+ internalType: "address[]"
2252
+ }
2253
+ ],
2254
+ outputs: [
2255
+ {
2256
+ name: "",
2257
+ type: "bool",
2258
+ internalType: "bool"
2259
+ }
2260
+ ],
2261
+ stateMutability: "view"
2262
+ },
2263
+ {
2264
+ type: "function",
2265
+ name: "configureDeployerACL",
2266
+ inputs: [
2267
+ {
2268
+ name: "_vault",
2269
+ type: "address",
2270
+ internalType: "address"
2271
+ }
2272
+ ],
2273
+ outputs: [],
2274
+ stateMutability: "nonpayable"
2275
+ },
2276
+ {
2277
+ type: "function",
2278
+ name: "getAddress",
2279
+ inputs: [
2280
+ {
2281
+ name: "name",
2282
+ type: "bytes32",
2283
+ internalType: "bytes32"
2284
+ }
2285
+ ],
2286
+ outputs: [
2287
+ {
2288
+ name: "",
2289
+ type: "address",
2290
+ internalType: "address"
2291
+ }
2292
+ ],
2293
+ stateMutability: "view"
2294
+ },
2295
+ {
2296
+ type: "function",
2297
+ name: "getVaultAddress",
2298
+ inputs: [
2299
+ {
2300
+ name: "_vault",
2301
+ type: "address",
2302
+ internalType: "address"
2303
+ },
2304
+ {
2305
+ name: "name",
2306
+ type: "bytes32",
2307
+ internalType: "bytes32"
2308
+ }
2309
+ ],
2310
+ outputs: [
2311
+ {
2312
+ name: "",
2313
+ type: "address",
2314
+ internalType: "address"
2315
+ }
2316
+ ],
2317
+ stateMutability: "view"
2318
+ },
2319
+ {
2320
+ type: "function",
2321
+ name: "importAddresses",
2322
+ inputs: [
2323
+ {
2324
+ name: "names",
2325
+ type: "bytes32[]",
2326
+ internalType: "bytes32[]"
2327
+ },
2328
+ {
2329
+ name: "destinations",
2330
+ type: "address[]",
2331
+ internalType: "address[]"
2332
+ }
2333
+ ],
2334
+ outputs: [],
2335
+ stateMutability: "nonpayable"
2336
+ },
2337
+ {
2338
+ type: "function",
2339
+ name: "importVaultAddress",
2340
+ inputs: [
2341
+ {
2342
+ name: "_vault",
2343
+ type: "address",
2344
+ internalType: "address"
2345
+ },
2346
+ {
2347
+ name: "names",
2348
+ type: "bytes32[]",
2349
+ internalType: "bytes32[]"
2350
+ },
2351
+ {
2352
+ name: "destinations",
2353
+ type: "address[]",
2354
+ internalType: "address[]"
2355
+ }
2356
+ ],
2357
+ outputs: [],
2358
+ stateMutability: "nonpayable"
2359
+ },
2360
+ {
2361
+ type: "function",
2362
+ name: "initFactory",
2363
+ inputs: [
2364
+ {
2365
+ name: "_factory",
2366
+ type: "address",
2367
+ internalType: "address"
2368
+ }
2369
+ ],
2370
+ outputs: [],
2371
+ stateMutability: "nonpayable"
2372
+ },
2373
+ {
2374
+ type: "function",
2375
+ name: "owner",
2376
+ inputs: [],
2377
+ outputs: [
2378
+ {
2379
+ name: "",
2380
+ type: "address",
2381
+ internalType: "address"
2382
+ }
2383
+ ],
2384
+ stateMutability: "view"
2385
+ },
2386
+ {
2387
+ type: "function",
2388
+ name: "renounceOwnership",
2389
+ inputs: [],
2390
+ outputs: [],
2391
+ stateMutability: "nonpayable"
2392
+ },
2393
+ {
2394
+ type: "function",
2395
+ name: "requireAndGetAddress",
2396
+ inputs: [
2397
+ {
2398
+ name: "name",
2399
+ type: "bytes32",
2400
+ internalType: "bytes32"
2401
+ },
2402
+ {
2403
+ name: "reason",
2404
+ type: "string",
2405
+ internalType: "string"
2406
+ }
2407
+ ],
2408
+ outputs: [
2409
+ {
2410
+ name: "",
2411
+ type: "address",
2412
+ internalType: "address"
2413
+ }
2414
+ ],
2415
+ stateMutability: "view"
2416
+ },
2417
+ {
2418
+ type: "function",
2419
+ name: "requireDeployerACL",
2420
+ inputs: [
2421
+ {
2422
+ name: "_vault",
2423
+ type: "address",
2424
+ internalType: "address"
2425
+ }
2426
+ ],
2427
+ outputs: [],
2428
+ stateMutability: "view"
2429
+ },
2430
+ {
2431
+ type: "function",
2432
+ name: "transferOwnership",
2433
+ inputs: [
2434
+ {
2435
+ name: "newOwner",
2436
+ type: "address",
2437
+ internalType: "address"
2438
+ }
2439
+ ],
2440
+ outputs: [],
2441
+ stateMutability: "nonpayable"
2442
+ },
2443
+ {
2444
+ type: "event",
2445
+ name: "AddressImported",
2446
+ inputs: [
2447
+ {
2448
+ name: "name",
2449
+ type: "bytes32",
2450
+ indexed: false,
2451
+ internalType: "bytes32"
2452
+ },
2453
+ {
2454
+ name: "destination",
2455
+ type: "address",
2456
+ indexed: false,
2457
+ internalType: "address"
2458
+ }
2459
+ ],
2460
+ anonymous: false
2461
+ },
2462
+ {
2463
+ type: "event",
2464
+ name: "OwnershipTransferred",
2465
+ inputs: [
2466
+ {
2467
+ name: "previousOwner",
2468
+ type: "address",
2469
+ indexed: true,
2470
+ internalType: "address"
2471
+ },
2472
+ {
2473
+ name: "newOwner",
2474
+ type: "address",
2475
+ indexed: true,
2476
+ internalType: "address"
2477
+ }
2478
+ ],
2479
+ anonymous: false
2480
+ },
2481
+ {
2482
+ type: "error",
2483
+ name: "AddressNotFound",
2484
+ inputs: [
2485
+ {
2486
+ name: "reason",
2487
+ type: "string",
2488
+ internalType: "string"
2489
+ }
2490
+ ]
2491
+ },
2492
+ {
2493
+ type: "error",
2494
+ name: "InputLengthsMismatch",
2495
+ inputs: []
2496
+ },
2497
+ {
2498
+ type: "error",
2499
+ name: "InvalidAddress",
2500
+ inputs: []
2501
+ },
2502
+ {
2503
+ type: "error",
2504
+ name: "NotAllowed",
2505
+ inputs: []
2506
+ },
2507
+ {
2508
+ type: "error",
2509
+ name: "OnlyFactoryOrManagerAllowed",
2510
+ inputs: []
2511
+ },
2512
+ {
2513
+ type: "error",
2514
+ name: "OwnableInvalidOwner",
2515
+ inputs: [
2516
+ {
2517
+ name: "owner",
2518
+ type: "address",
2519
+ internalType: "address"
2520
+ }
2521
+ ]
2522
+ },
2523
+ {
2524
+ type: "error",
2525
+ name: "OwnableUnauthorizedAccount",
2526
+ inputs: [
2527
+ {
2528
+ name: "account",
2529
+ type: "address",
2530
+ internalType: "address"
2531
+ }
2532
+ ]
2533
+ }
2534
+ ];
2535
+
2536
+ // data/abi/RewardsCalculator.json
2537
+ var RewardsCalculator_default = [
2538
+ {
2539
+ type: "function",
2540
+ name: "calculateRewards",
2541
+ inputs: [
2542
+ {
2543
+ name: "params",
2544
+ type: "tuple",
2545
+ internalType: "struct RewardParams",
2546
+ components: [
2547
+ {
2548
+ name: "ethAmount",
2549
+ type: "uint256",
2550
+ internalType: "uint256"
2551
+ },
2552
+ {
2553
+ name: "circulating",
2554
+ type: "uint256",
2555
+ internalType: "uint256"
2556
+ },
2557
+ {
2558
+ name: "totalStaked",
2559
+ type: "uint256",
2560
+ internalType: "uint256"
2561
+ }
2562
+ ]
2563
+ }
2564
+ ],
2565
+ outputs: [
2566
+ {
2567
+ name: "",
2568
+ type: "uint256",
2569
+ internalType: "uint256"
2570
+ }
2571
+ ],
2572
+ stateMutability: "pure"
2573
+ },
2574
+ {
2575
+ type: "error",
2576
+ name: "InvalidParams",
2577
+ inputs: []
2578
+ }
2579
+ ];
2580
+
2581
+ // src/abi.ts
2582
+ var ABIS = {
2583
+ AdaptiveSupply: AdaptiveSupply_default,
2584
+ ExchangeHelper: ExchangeHelper_default,
2585
+ Factory: Factory_default,
2586
+ ModelHelper: ModelHelper_default,
2587
+ Resolver: Resolver_default,
2588
+ RewardsCalculator: RewardsCalculator_default
2589
+ };
2590
+ var meta = abi_meta_default;
2591
+ var ABI_SOURCE_REF = meta.ref;
2592
+ var ABI_FETCHED_AT = meta.fetchedAt;
2593
+ function listAbis() {
2594
+ return Object.keys(ABIS).sort();
2595
+ }
2596
+ function getAbi(contract) {
2597
+ const abi = ABIS[contract];
2598
+ if (!abi) {
2599
+ const status = meta.contracts[contract];
2600
+ if (status && !status.available) {
2601
+ throw new Error(
2602
+ `ABI for "${contract}" is not bundled at oikos-cash/core@${meta.ref.slice(0, 8)}: ${status.reason ?? "unavailable at this ref"}`
2603
+ );
2604
+ }
2605
+ throw new Error(
2606
+ `Unknown contract "${contract}". Known contracts with ABIs: ${listAbis().join(", ")}.`
2607
+ );
2608
+ }
2609
+ return abi.slice();
2610
+ }
2611
+ function getAbiSourceMeta() {
2612
+ return {
2613
+ ref: meta.ref,
2614
+ fetchedAt: meta.fetchedAt,
2615
+ contracts: Object.fromEntries(
2616
+ Object.entries(meta.contracts).map(([k, v]) => [k, { ...v }])
2617
+ )
2618
+ };
2619
+ }
2620
+
27
2621
  // src/networks.ts
28
2622
  var NETWORKS = [
29
2623
  {
@@ -35,11 +2629,11 @@ var NETWORKS = [
35
2629
 
36
2630
  // src/index.ts
37
2631
  var deployment = deployment_default;
38
- var meta = meta_default;
39
- var SOURCE_TAG = meta.tag;
40
- var SOURCE_URL = meta.source;
41
- var FETCHED_AT = meta.fetchedAt;
42
- var SOURCE_SHA256 = meta.sha256;
2632
+ var meta2 = meta_default;
2633
+ var SOURCE_TAG = meta2.tag;
2634
+ var SOURCE_URL = meta2.source;
2635
+ var FETCHED_AT = meta2.fetchedAt;
2636
+ var SOURCE_SHA256 = meta2.sha256;
43
2637
  function resolveChainId(network) {
44
2638
  if (typeof network === "number") {
45
2639
  if (!Number.isFinite(network) || !Number.isInteger(network)) {
@@ -85,8 +2679,10 @@ function getSupportedNetworks() {
85
2679
 
86
2680
  // src/cli.ts
87
2681
  var HELP = `Usage: oikos-addresses <network> [contract]
2682
+ oikos-addresses --abi <Contract>
88
2683
 
89
- Print Oikos Protocol contract addresses for a given network.
2684
+ Print Oikos Protocol contract addresses (and optionally ABIs)
2685
+ for a given network.
90
2686
 
91
2687
  Arguments:
92
2688
  network Chain id (e.g. 56) or network name (e.g. bsc, bnb, binance)
@@ -96,13 +2692,15 @@ Examples:
96
2692
  oikos-addresses 56
97
2693
  oikos-addresses bsc
98
2694
  oikos-addresses bsc Vault
2695
+ oikos-addresses --abi Resolver
99
2696
  oikos-addresses --list
100
2697
  oikos-addresses --json bsc
101
2698
 
102
2699
  Options:
103
- -h, --help Show this help
104
- -l, --list List supported networks
105
- -j, --json Output a single-line JSON (default is pretty-printed JSON)
2700
+ -h, --help Show this help
2701
+ -l, --list List supported networks and ABI availability
2702
+ -j, --json Output a single-line JSON (default is pretty-printed JSON)
2703
+ -a, --abi <name> Print the bundled ABI for <name> as JSON
106
2704
  `;
107
2705
  function printNetworks() {
108
2706
  const rows = getSupportedNetworks().map((n) => ({
@@ -110,14 +2708,29 @@ function printNetworks() {
110
2708
  name: n.name,
111
2709
  aliases: n.aliases.join(", ")
112
2710
  }));
113
- console.log(`Source: oikos-cash/core @ ${SOURCE_TAG}`);
114
- console.log(` ${SOURCE_URL}`);
115
- console.log(` sha256=${SOURCE_SHA256.slice(0, 12)}\u2026 fetchedAt=${FETCHED_AT}`);
2711
+ console.log(`Addresses: oikos-cash/core @ ${SOURCE_TAG}`);
2712
+ console.log(` ${SOURCE_URL}`);
2713
+ console.log(` sha256=${SOURCE_SHA256.slice(0, 12)}\u2026 fetchedAt=${FETCHED_AT}`);
2714
+ console.log("");
2715
+ console.log(`ABIs: oikos-cash/core @ ${ABI_SOURCE_REF.slice(0, 12)}\u2026 fetchedAt=${ABI_FETCHED_AT}`);
116
2716
  console.log("");
117
2717
  console.log("Supported networks:");
118
2718
  for (const r of rows) {
119
2719
  console.log(` ${r.chainId} ${r.name} [${r.aliases}]`);
120
2720
  }
2721
+ console.log("");
2722
+ console.log("Contracts (ABI bundled?):");
2723
+ const abiMeta = getAbiSourceMeta();
2724
+ const names = Object.keys(abiMeta.contracts).sort();
2725
+ for (const name of names) {
2726
+ const status = abiMeta.contracts[name];
2727
+ if (status && status.available) {
2728
+ console.log(` ${name.padEnd(20)} \u2713 ${status.items} items`);
2729
+ } else {
2730
+ const reason = status?.reason ?? "unavailable";
2731
+ console.log(` ${name.padEnd(20)} \u2717 ${reason}`);
2732
+ }
2733
+ }
121
2734
  }
122
2735
  function main(argv) {
123
2736
  const args = argv.slice(2);
@@ -131,6 +2744,27 @@ function main(argv) {
131
2744
  }
132
2745
  const compact = args.includes("-j") || args.includes("--json");
133
2746
  const positional = args.filter((a) => !a.startsWith("-"));
2747
+ const abiFlagIdx = args.findIndex((a) => a === "-a" || a === "--abi");
2748
+ if (abiFlagIdx >= 0) {
2749
+ const next = args[abiFlagIdx + 1];
2750
+ const abiContract = next && !next.startsWith("-") ? next : positional[0];
2751
+ if (!abiContract) {
2752
+ process.stderr.write("Error: --abi requires a contract name\n");
2753
+ return 1;
2754
+ }
2755
+ try {
2756
+ const abi = getAbi(abiContract);
2757
+ console.log(
2758
+ compact ? JSON.stringify(abi) : JSON.stringify(abi, null, 2)
2759
+ );
2760
+ return 0;
2761
+ } catch (err) {
2762
+ const msg = err instanceof Error ? err.message : String(err);
2763
+ process.stderr.write(`Error: ${msg}
2764
+ `);
2765
+ return 1;
2766
+ }
2767
+ }
134
2768
  const [network, contract] = positional;
135
2769
  if (!network) {
136
2770
  process.stderr.write("Error: missing <network>\n\n");