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