@logswap/sdk 0.5.79 → 0.5.80
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/admin.d.ts +702 -51
- package/dist/admin.js +53 -46
- package/dist/client.d.ts +2 -2
- package/dist/client.js +2 -2
- package/dist/fpool.d.ts +185 -119
- package/dist/fpool.js +41 -42
- package/dist/generated.d.ts +1280 -670
- package/dist/generated.js +781 -465
- package/dist/history.d.ts +1 -2
- package/dist/history.js +3 -5
- package/dist/indexer.js +2 -1
- package/dist/keys.d.ts +6 -0
- package/dist/keys.js +2 -0
- package/dist/pools.d.ts +3 -3
- package/dist/pools.js +2 -1
- package/package.json +1 -1
- package/src/admin.ts +64 -54
- package/src/client.ts +2 -2
- package/src/fpool.ts +59 -55
- package/src/generated.ts +781 -465
- package/src/history.ts +3 -4
- package/src/indexer.ts +3 -2
- package/src/keys.ts +8 -0
- package/src/pools.ts +6 -5
package/dist/fpool.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export { fPoolManagerAbi, padPolicyAbi, polPolicyAbi, privatePolicyAbi, publicPo
|
|
|
47
47
|
export declare const fPolicyBaseAbi: readonly [{
|
|
48
48
|
readonly type: "constructor";
|
|
49
49
|
readonly inputs: readonly [{
|
|
50
|
-
readonly name: "
|
|
50
|
+
readonly name: "manager_";
|
|
51
51
|
readonly internalType: "contract FPoolManager";
|
|
52
52
|
readonly type: "address";
|
|
53
53
|
}];
|
|
@@ -76,6 +76,16 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
76
76
|
readonly type: "address";
|
|
77
77
|
}];
|
|
78
78
|
readonly stateMutability: "view";
|
|
79
|
+
}, {
|
|
80
|
+
readonly type: "function";
|
|
81
|
+
readonly inputs: readonly [];
|
|
82
|
+
readonly name: "cManager";
|
|
83
|
+
readonly outputs: readonly [{
|
|
84
|
+
readonly name: "";
|
|
85
|
+
readonly internalType: "address";
|
|
86
|
+
readonly type: "address";
|
|
87
|
+
}];
|
|
88
|
+
readonly stateMutability: "view";
|
|
79
89
|
}, {
|
|
80
90
|
readonly type: "function";
|
|
81
91
|
readonly inputs: readonly [{
|
|
@@ -93,7 +103,7 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
93
103
|
}, {
|
|
94
104
|
readonly type: "function";
|
|
95
105
|
readonly inputs: readonly [];
|
|
96
|
-
readonly name: "
|
|
106
|
+
readonly name: "feeCurated";
|
|
97
107
|
readonly outputs: readonly [{
|
|
98
108
|
readonly name: "";
|
|
99
109
|
readonly internalType: "bool";
|
|
@@ -104,10 +114,10 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
104
114
|
readonly type: "function";
|
|
105
115
|
readonly inputs: readonly [{
|
|
106
116
|
readonly name: "";
|
|
107
|
-
readonly internalType: "
|
|
108
|
-
readonly type: "
|
|
117
|
+
readonly internalType: "uint256";
|
|
118
|
+
readonly type: "uint256";
|
|
109
119
|
}];
|
|
110
|
-
readonly name: "
|
|
120
|
+
readonly name: "feeListed";
|
|
111
121
|
readonly outputs: readonly [{
|
|
112
122
|
readonly name: "";
|
|
113
123
|
readonly internalType: "bool";
|
|
@@ -116,32 +126,26 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
116
126
|
readonly stateMutability: "view";
|
|
117
127
|
}, {
|
|
118
128
|
readonly type: "function";
|
|
119
|
-
readonly inputs: readonly [
|
|
120
|
-
|
|
129
|
+
readonly inputs: readonly [{
|
|
130
|
+
readonly name: "poolId";
|
|
131
|
+
readonly internalType: "bytes32";
|
|
132
|
+
readonly type: "bytes32";
|
|
133
|
+
}];
|
|
134
|
+
readonly name: "incomeFee";
|
|
121
135
|
readonly outputs: readonly [{
|
|
122
136
|
readonly name: "";
|
|
123
|
-
readonly internalType: "
|
|
124
|
-
readonly type: "
|
|
125
|
-
}
|
|
126
|
-
readonly stateMutability: "view";
|
|
127
|
-
}, {
|
|
128
|
-
readonly type: "function";
|
|
129
|
-
readonly inputs: readonly [{
|
|
137
|
+
readonly internalType: "address";
|
|
138
|
+
readonly type: "address";
|
|
139
|
+
}, {
|
|
130
140
|
readonly name: "";
|
|
131
141
|
readonly internalType: "uint256";
|
|
132
142
|
readonly type: "uint256";
|
|
133
143
|
}];
|
|
134
|
-
readonly name: "feeListed";
|
|
135
|
-
readonly outputs: readonly [{
|
|
136
|
-
readonly name: "";
|
|
137
|
-
readonly internalType: "bool";
|
|
138
|
-
readonly type: "bool";
|
|
139
|
-
}];
|
|
140
144
|
readonly stateMutability: "view";
|
|
141
145
|
}, {
|
|
142
146
|
readonly type: "function";
|
|
143
147
|
readonly inputs: readonly [];
|
|
144
|
-
readonly name: "
|
|
148
|
+
readonly name: "incomeFeeRate";
|
|
145
149
|
readonly outputs: readonly [{
|
|
146
150
|
readonly name: "";
|
|
147
151
|
readonly internalType: "uint256";
|
|
@@ -168,6 +172,20 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
168
172
|
readonly type: "address";
|
|
169
173
|
}];
|
|
170
174
|
readonly stateMutability: "view";
|
|
175
|
+
}, {
|
|
176
|
+
readonly type: "function";
|
|
177
|
+
readonly inputs: readonly [{
|
|
178
|
+
readonly name: "";
|
|
179
|
+
readonly internalType: "bytes32";
|
|
180
|
+
readonly type: "bytes32";
|
|
181
|
+
}];
|
|
182
|
+
readonly name: "managerOf";
|
|
183
|
+
readonly outputs: readonly [{
|
|
184
|
+
readonly name: "";
|
|
185
|
+
readonly internalType: "address";
|
|
186
|
+
readonly type: "address";
|
|
187
|
+
}];
|
|
188
|
+
readonly stateMutability: "view";
|
|
171
189
|
}, {
|
|
172
190
|
readonly type: "function";
|
|
173
191
|
readonly inputs: readonly [{
|
|
@@ -236,7 +254,7 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
236
254
|
}, {
|
|
237
255
|
readonly type: "function";
|
|
238
256
|
readonly inputs: readonly [];
|
|
239
|
-
readonly name: "
|
|
257
|
+
readonly name: "minQuoteRatio";
|
|
240
258
|
readonly outputs: readonly [{
|
|
241
259
|
readonly name: "";
|
|
242
260
|
readonly internalType: "uint256";
|
|
@@ -281,6 +299,57 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
281
299
|
readonly type: "bytes32";
|
|
282
300
|
}];
|
|
283
301
|
readonly stateMutability: "view";
|
|
302
|
+
}, {
|
|
303
|
+
readonly type: "function";
|
|
304
|
+
readonly inputs: readonly [{
|
|
305
|
+
readonly name: "";
|
|
306
|
+
readonly internalType: "address";
|
|
307
|
+
readonly type: "address";
|
|
308
|
+
}, {
|
|
309
|
+
readonly name: "";
|
|
310
|
+
readonly internalType: "struct PoolKey";
|
|
311
|
+
readonly type: "tuple";
|
|
312
|
+
readonly components: readonly [{
|
|
313
|
+
readonly name: "base";
|
|
314
|
+
readonly internalType: "address";
|
|
315
|
+
readonly type: "address";
|
|
316
|
+
}, {
|
|
317
|
+
readonly name: "quote";
|
|
318
|
+
readonly internalType: "address";
|
|
319
|
+
readonly type: "address";
|
|
320
|
+
}, {
|
|
321
|
+
readonly name: "tickSpacing";
|
|
322
|
+
readonly internalType: "int256";
|
|
323
|
+
readonly type: "int256";
|
|
324
|
+
}, {
|
|
325
|
+
readonly name: "policy";
|
|
326
|
+
readonly internalType: "address";
|
|
327
|
+
readonly type: "address";
|
|
328
|
+
}, {
|
|
329
|
+
readonly name: "swapFee";
|
|
330
|
+
readonly internalType: "uint256";
|
|
331
|
+
readonly type: "uint256";
|
|
332
|
+
}];
|
|
333
|
+
}, {
|
|
334
|
+
readonly name: "";
|
|
335
|
+
readonly internalType: "uint256";
|
|
336
|
+
readonly type: "uint256";
|
|
337
|
+
}];
|
|
338
|
+
readonly name: "onCInitialize";
|
|
339
|
+
readonly outputs: readonly [{
|
|
340
|
+
readonly name: "";
|
|
341
|
+
readonly internalType: "uint8";
|
|
342
|
+
readonly type: "uint8";
|
|
343
|
+
}, {
|
|
344
|
+
readonly name: "";
|
|
345
|
+
readonly internalType: "uint256";
|
|
346
|
+
readonly type: "uint256";
|
|
347
|
+
}, {
|
|
348
|
+
readonly name: "";
|
|
349
|
+
readonly internalType: "uint256";
|
|
350
|
+
readonly type: "uint256";
|
|
351
|
+
}];
|
|
352
|
+
readonly stateMutability: "pure";
|
|
284
353
|
}, {
|
|
285
354
|
readonly type: "function";
|
|
286
355
|
readonly inputs: readonly [{
|
|
@@ -428,7 +497,7 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
428
497
|
readonly internalType: "uint256";
|
|
429
498
|
readonly type: "uint256";
|
|
430
499
|
}, {
|
|
431
|
-
readonly name: "
|
|
500
|
+
readonly name: "minQuoteRatio";
|
|
432
501
|
readonly internalType: "uint256";
|
|
433
502
|
readonly type: "uint256";
|
|
434
503
|
}, {
|
|
@@ -490,6 +559,16 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
490
559
|
readonly type: "bool";
|
|
491
560
|
}];
|
|
492
561
|
readonly stateMutability: "view";
|
|
562
|
+
}, {
|
|
563
|
+
readonly type: "function";
|
|
564
|
+
readonly inputs: readonly [{
|
|
565
|
+
readonly name: "cManager_";
|
|
566
|
+
readonly internalType: "address";
|
|
567
|
+
readonly type: "address";
|
|
568
|
+
}];
|
|
569
|
+
readonly name: "setCManager";
|
|
570
|
+
readonly outputs: readonly [];
|
|
571
|
+
readonly stateMutability: "nonpayable";
|
|
493
572
|
}, {
|
|
494
573
|
readonly type: "function";
|
|
495
574
|
readonly inputs: readonly [{
|
|
@@ -497,45 +576,41 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
497
576
|
readonly internalType: "bool";
|
|
498
577
|
readonly type: "bool";
|
|
499
578
|
}];
|
|
500
|
-
readonly name: "
|
|
579
|
+
readonly name: "setFeeCurated";
|
|
501
580
|
readonly outputs: readonly [];
|
|
502
581
|
readonly stateMutability: "nonpayable";
|
|
503
582
|
}, {
|
|
504
583
|
readonly type: "function";
|
|
505
584
|
readonly inputs: readonly [{
|
|
506
|
-
readonly name: "
|
|
507
|
-
readonly internalType: "
|
|
508
|
-
readonly type: "
|
|
585
|
+
readonly name: "fee";
|
|
586
|
+
readonly internalType: "uint256";
|
|
587
|
+
readonly type: "uint256";
|
|
509
588
|
}, {
|
|
510
589
|
readonly name: "listed";
|
|
511
590
|
readonly internalType: "bool";
|
|
512
591
|
readonly type: "bool";
|
|
513
592
|
}];
|
|
514
|
-
readonly name: "
|
|
593
|
+
readonly name: "setFeeListed";
|
|
515
594
|
readonly outputs: readonly [];
|
|
516
595
|
readonly stateMutability: "nonpayable";
|
|
517
596
|
}, {
|
|
518
597
|
readonly type: "function";
|
|
519
598
|
readonly inputs: readonly [{
|
|
520
|
-
readonly name: "
|
|
521
|
-
readonly internalType: "
|
|
522
|
-
readonly type: "
|
|
599
|
+
readonly name: "rate";
|
|
600
|
+
readonly internalType: "uint256";
|
|
601
|
+
readonly type: "uint256";
|
|
523
602
|
}];
|
|
524
|
-
readonly name: "
|
|
603
|
+
readonly name: "setIncomeFeeRate";
|
|
525
604
|
readonly outputs: readonly [];
|
|
526
605
|
readonly stateMutability: "nonpayable";
|
|
527
606
|
}, {
|
|
528
607
|
readonly type: "function";
|
|
529
608
|
readonly inputs: readonly [{
|
|
530
|
-
readonly name: "
|
|
609
|
+
readonly name: "ratio";
|
|
531
610
|
readonly internalType: "uint256";
|
|
532
611
|
readonly type: "uint256";
|
|
533
|
-
}, {
|
|
534
|
-
readonly name: "listed";
|
|
535
|
-
readonly internalType: "bool";
|
|
536
|
-
readonly type: "bool";
|
|
537
612
|
}];
|
|
538
|
-
readonly name: "
|
|
613
|
+
readonly name: "setMinQuoteRatio";
|
|
539
614
|
readonly outputs: readonly [];
|
|
540
615
|
readonly stateMutability: "nonpayable";
|
|
541
616
|
}, {
|
|
@@ -602,18 +677,14 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
602
677
|
readonly stateMutability: "nonpayable";
|
|
603
678
|
}, {
|
|
604
679
|
readonly type: "function";
|
|
605
|
-
readonly inputs: readonly [
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
readonly
|
|
609
|
-
|
|
610
|
-
readonly
|
|
611
|
-
readonly internalType: "uint256";
|
|
612
|
-
readonly type: "uint256";
|
|
680
|
+
readonly inputs: readonly [];
|
|
681
|
+
readonly name: "sponsor";
|
|
682
|
+
readonly outputs: readonly [{
|
|
683
|
+
readonly name: "";
|
|
684
|
+
readonly internalType: "address";
|
|
685
|
+
readonly type: "address";
|
|
613
686
|
}];
|
|
614
|
-
readonly
|
|
615
|
-
readonly outputs: readonly [];
|
|
616
|
-
readonly stateMutability: "nonpayable";
|
|
687
|
+
readonly stateMutability: "view";
|
|
617
688
|
}, {
|
|
618
689
|
readonly type: "event";
|
|
619
690
|
readonly anonymous: false;
|
|
@@ -654,6 +725,16 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
654
725
|
readonly indexed: true;
|
|
655
726
|
}];
|
|
656
727
|
readonly name: "AuthoritySet";
|
|
728
|
+
}, {
|
|
729
|
+
readonly type: "event";
|
|
730
|
+
readonly anonymous: false;
|
|
731
|
+
readonly inputs: readonly [{
|
|
732
|
+
readonly name: "manager";
|
|
733
|
+
readonly internalType: "address";
|
|
734
|
+
readonly type: "address";
|
|
735
|
+
readonly indexed: true;
|
|
736
|
+
}];
|
|
737
|
+
readonly name: "CManagerSet";
|
|
657
738
|
}, {
|
|
658
739
|
readonly type: "event";
|
|
659
740
|
readonly anonymous: false;
|
|
@@ -663,14 +744,14 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
663
744
|
readonly type: "bool";
|
|
664
745
|
readonly indexed: false;
|
|
665
746
|
}];
|
|
666
|
-
readonly name: "
|
|
747
|
+
readonly name: "FeeCuratedSet";
|
|
667
748
|
}, {
|
|
668
749
|
readonly type: "event";
|
|
669
750
|
readonly anonymous: false;
|
|
670
751
|
readonly inputs: readonly [{
|
|
671
|
-
readonly name: "
|
|
672
|
-
readonly internalType: "
|
|
673
|
-
readonly type: "
|
|
752
|
+
readonly name: "fee";
|
|
753
|
+
readonly internalType: "uint256";
|
|
754
|
+
readonly type: "uint256";
|
|
674
755
|
readonly indexed: true;
|
|
675
756
|
}, {
|
|
676
757
|
readonly name: "listed";
|
|
@@ -678,32 +759,27 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
678
759
|
readonly type: "bool";
|
|
679
760
|
readonly indexed: false;
|
|
680
761
|
}];
|
|
681
|
-
readonly name: "
|
|
762
|
+
readonly name: "FeeListed";
|
|
682
763
|
}, {
|
|
683
764
|
readonly type: "event";
|
|
684
765
|
readonly anonymous: false;
|
|
685
766
|
readonly inputs: readonly [{
|
|
686
|
-
readonly name: "
|
|
687
|
-
readonly internalType: "
|
|
688
|
-
readonly type: "
|
|
767
|
+
readonly name: "rate";
|
|
768
|
+
readonly internalType: "uint256";
|
|
769
|
+
readonly type: "uint256";
|
|
689
770
|
readonly indexed: false;
|
|
690
771
|
}];
|
|
691
|
-
readonly name: "
|
|
772
|
+
readonly name: "IncomeFeeRateSet";
|
|
692
773
|
}, {
|
|
693
774
|
readonly type: "event";
|
|
694
775
|
readonly anonymous: false;
|
|
695
776
|
readonly inputs: readonly [{
|
|
696
|
-
readonly name: "
|
|
777
|
+
readonly name: "ratio";
|
|
697
778
|
readonly internalType: "uint256";
|
|
698
779
|
readonly type: "uint256";
|
|
699
|
-
readonly indexed: true;
|
|
700
|
-
}, {
|
|
701
|
-
readonly name: "listed";
|
|
702
|
-
readonly internalType: "bool";
|
|
703
|
-
readonly type: "bool";
|
|
704
780
|
readonly indexed: false;
|
|
705
781
|
}];
|
|
706
|
-
readonly name: "
|
|
782
|
+
readonly name: "MinQuoteRatioSet";
|
|
707
783
|
}, {
|
|
708
784
|
readonly type: "event";
|
|
709
785
|
readonly anonymous: false;
|
|
@@ -769,21 +845,6 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
769
845
|
readonly indexed: false;
|
|
770
846
|
}];
|
|
771
847
|
readonly name: "QuoteListed";
|
|
772
|
-
}, {
|
|
773
|
-
readonly type: "event";
|
|
774
|
-
readonly anonymous: false;
|
|
775
|
-
readonly inputs: readonly [{
|
|
776
|
-
readonly name: "keepQuote";
|
|
777
|
-
readonly internalType: "uint256";
|
|
778
|
-
readonly type: "uint256";
|
|
779
|
-
readonly indexed: false;
|
|
780
|
-
}, {
|
|
781
|
-
readonly name: "minQuoteAtSeed";
|
|
782
|
-
readonly internalType: "uint256";
|
|
783
|
-
readonly type: "uint256";
|
|
784
|
-
readonly indexed: false;
|
|
785
|
-
}];
|
|
786
|
-
readonly name: "RulesSet";
|
|
787
848
|
}, {
|
|
788
849
|
readonly type: "error";
|
|
789
850
|
readonly inputs: readonly [];
|
|
@@ -792,14 +853,6 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
792
853
|
readonly type: "error";
|
|
793
854
|
readonly inputs: readonly [];
|
|
794
855
|
readonly name: "BadRate";
|
|
795
|
-
}, {
|
|
796
|
-
readonly type: "error";
|
|
797
|
-
readonly inputs: readonly [{
|
|
798
|
-
readonly name: "creator";
|
|
799
|
-
readonly internalType: "address";
|
|
800
|
-
readonly type: "address";
|
|
801
|
-
}];
|
|
802
|
-
readonly name: "CreatorNotListed";
|
|
803
856
|
}, {
|
|
804
857
|
readonly type: "error";
|
|
805
858
|
readonly inputs: readonly [{
|
|
@@ -836,6 +889,10 @@ export declare const fPolicyBaseAbi: readonly [{
|
|
|
836
889
|
readonly type: "error";
|
|
837
890
|
readonly inputs: readonly [];
|
|
838
891
|
readonly name: "NotRegistry";
|
|
892
|
+
}, {
|
|
893
|
+
readonly type: "error";
|
|
894
|
+
readonly inputs: readonly [];
|
|
895
|
+
readonly name: "NotSponsor";
|
|
839
896
|
}, {
|
|
840
897
|
readonly type: "error";
|
|
841
898
|
readonly inputs: readonly [];
|
|
@@ -894,7 +951,7 @@ export interface FPoolState {
|
|
|
894
951
|
*/
|
|
895
952
|
lnCapOverFloor: number;
|
|
896
953
|
/** Σ = ∫ Σ_j w_j (dx_j)², accrued even though the fee is fixed — the kernel stays calculable. */
|
|
897
|
-
|
|
954
|
+
realizedVariance: bigint;
|
|
898
955
|
/**
|
|
899
956
|
* The pool's policy: the contract the key names, holding the pool's roles
|
|
900
957
|
* and answering every question the manager does not decide itself. Read its roles with
|
|
@@ -968,13 +1025,18 @@ export interface FPoolRoles {
|
|
|
968
1025
|
authority: Address;
|
|
969
1026
|
/** The proposed next authority, until it accepts — zero when nothing is pending. */
|
|
970
1027
|
pendingAuthority: Address;
|
|
1028
|
+
/** The desk's optional pool operator (decision 073): one delegate besides the authority, zero when none. */
|
|
971
1029
|
operator: Address;
|
|
972
|
-
pendingOperator: Address;
|
|
973
1030
|
gateMint: boolean;
|
|
974
|
-
|
|
1031
|
+
/** The desk's swap admission (decision 073): open to all, listed takers/minters only, or one cached executor. */
|
|
1032
|
+
swapMode: FPoolSwapMode;
|
|
1033
|
+
/** The executor in `executor` mode, zero otherwise. */
|
|
1034
|
+
swapExecutor: Address;
|
|
975
1035
|
/** The policy's own ceiling on a harvest now — the bid ({@link FPoolDescription.harvestable}) narrowed by the policy's rule. */
|
|
976
1036
|
maxHarvest: bigint;
|
|
977
1037
|
}
|
|
1038
|
+
/** `PrivatePolicy.SwapMode`: Open = 0, Listed = 1, Executor = 2. */
|
|
1039
|
+
export type FPoolSwapMode = "open" | "listed" | "executor";
|
|
978
1040
|
/** Read a pool's roles from its policy. `state` saves the `getPool` round trip when already in hand. */
|
|
979
1041
|
export declare function getFPoolRoles(c: LogswapClient, poolId: Hex, state?: Pick<FPoolState, "policy" | "kind">): Promise<FPoolRoles>;
|
|
980
1042
|
/** Which of the two products a pool is configured as — a pad is a launch, anything else a basket/pool. A UI has to choose what to render. */
|
|
@@ -994,7 +1056,7 @@ export interface FPoolDescription {
|
|
|
994
1056
|
/**
|
|
995
1057
|
* The most a harvest may take now by the MANAGER's rule: the bid, `Q` once seeded (0 before).
|
|
996
1058
|
* The manager's `harvestable()` getter was cut in F version 21; this is the same number, read
|
|
997
|
-
* off `getPool`. The policy may allow less (a pad: the income; a POL: above `
|
|
1059
|
+
* off `getPool`. The policy may allow less (a pad: the income; a POL: above `minQuoteRatio`·L) —
|
|
998
1060
|
* {@link FPoolRoles.maxHarvest}.
|
|
999
1061
|
*/
|
|
1000
1062
|
harvestable: bigint;
|
|
@@ -1506,7 +1568,7 @@ export declare function fPoolRetire(c: LogswapClient, a: {
|
|
|
1506
1568
|
* `harvest(Q)` does it: the protocol's cut leaves the pool with the amount (with no treasury
|
|
1507
1569
|
* there is no cut). `[]` when the bid is already empty. Throws on a pad (F version 21: a pad
|
|
1508
1570
|
* never retires, whatever its bid), and when the pool's policy keeps a floor on the bid
|
|
1509
|
-
* (`PolPolicy.
|
|
1571
|
+
* (`PolPolicy.minQuoteRatio`): a `retire` under that policy waits for the market.
|
|
1510
1572
|
*/
|
|
1511
1573
|
export declare function fPoolEmptyingHarvests(c: LogswapClient, poolId: Hex): Promise<bigint[]>;
|
|
1512
1574
|
/**
|
|
@@ -1725,11 +1787,22 @@ export declare function fPoolAcceptAuthority(c: LogswapClient, a: {
|
|
|
1725
1787
|
account: Address;
|
|
1726
1788
|
policy?: Address;
|
|
1727
1789
|
}): Promise<`0x${string}`>;
|
|
1728
|
-
/**
|
|
1729
|
-
|
|
1790
|
+
/**
|
|
1791
|
+
* Set the desk's swap admission (the authority, on the desk's policy; decision 073): `open`, `listed` (the minters and takers
|
|
1792
|
+
* lists) or `executor` (one address, cached on the manager, no policy call per swap). `executor` is required in `executor` mode
|
|
1793
|
+
* and must be omitted otherwise. Preserves mint admission. `burn` is never gated.
|
|
1794
|
+
*/
|
|
1795
|
+
export declare function fPoolSetSwapMode(c: LogswapClient, a: {
|
|
1730
1796
|
poolId: Hex;
|
|
1731
|
-
|
|
1732
|
-
|
|
1797
|
+
mode: FPoolSwapMode;
|
|
1798
|
+
executor?: Address;
|
|
1799
|
+
account: Address;
|
|
1800
|
+
policy?: Address;
|
|
1801
|
+
}): Promise<`0x${string}`>;
|
|
1802
|
+
/** Turn mint admission on or off (the authority, on the desk's policy), preserving the swap mode and its executor. */
|
|
1803
|
+
export declare function fPoolSetMintGate(c: LogswapClient, a: {
|
|
1804
|
+
poolId: Hex;
|
|
1805
|
+
gated: boolean;
|
|
1733
1806
|
account: Address;
|
|
1734
1807
|
policy?: Address;
|
|
1735
1808
|
}): Promise<`0x${string}`>;
|
|
@@ -1781,25 +1854,19 @@ export declare function fPoolSetSponsorName(c: LogswapClient, a: {
|
|
|
1781
1854
|
export declare function fPoolSponsorName(c: LogswapClient, who: Address): Promise<string>;
|
|
1782
1855
|
/** The registry the manager asks at every birth — `addresses.policyRegistry`, else the manager's word; zero on a bare deployment. */
|
|
1783
1856
|
export declare function fPoolRegistryOf(c: LogswapClient): Promise<Address>;
|
|
1784
|
-
/** Who
|
|
1785
|
-
export declare function
|
|
1857
|
+
/** Who may run the pool (decision 073): the authority always, and the optional delegate. */
|
|
1858
|
+
export declare function fPoolRunners(s: Pick<FPoolRoles, "authority" | "operator">): Address[];
|
|
1786
1859
|
/**
|
|
1787
|
-
*
|
|
1788
|
-
* `harvest`, `retire`, `regenerate
|
|
1789
|
-
*
|
|
1860
|
+
* Grant, replace or revoke the pool operator (the authority, on the desk's policy; decision 073): one optional delegate who may
|
|
1861
|
+
* `harvest`, `retire`, `regenerate` and `setLegs` besides the authority. Immediate, with no acceptance step, so check the
|
|
1862
|
+
* address; the zero address revokes. A handover or a policy move clears it.
|
|
1790
1863
|
*/
|
|
1791
|
-
export declare function
|
|
1864
|
+
export declare function fPoolSetPoolOperator(c: LogswapClient, a: {
|
|
1792
1865
|
poolId: Hex;
|
|
1793
1866
|
operator: Address;
|
|
1794
1867
|
account: Address;
|
|
1795
1868
|
policy?: Address;
|
|
1796
1869
|
}): Promise<`0x${string}`>;
|
|
1797
|
-
/** The proposed operator takes the role. */
|
|
1798
|
-
export declare function fPoolAcceptOperator(c: LogswapClient, a: {
|
|
1799
|
-
poolId: Hex;
|
|
1800
|
-
account: Address;
|
|
1801
|
-
policy?: Address;
|
|
1802
|
-
}): Promise<`0x${string}`>;
|
|
1803
1870
|
/**
|
|
1804
1871
|
* The next generation's composition (operator; private pools only; ONLY while the pool is
|
|
1805
1872
|
* unseeded — between a retire and the seed that prices it). `weights` has one
|
|
@@ -1883,28 +1950,27 @@ export type FPoolRules = {
|
|
|
1883
1950
|
/** The pot the next graduation needs, in the pad's quote: `PadPolicy.threshold(poolId, gen)` (T(0) is per quote, decision 070). */
|
|
1884
1951
|
threshold: bigint;
|
|
1885
1952
|
pot: bigint;
|
|
1886
|
-
/** This pad's
|
|
1953
|
+
/** This pad's creator share, recorded at its birth from the key's salt and never changed (decisions 056, 057, 067): a fraction of the pot. The rest deepens the bid; nothing is bought or burnt (067). */
|
|
1887
1954
|
creatorShare: bigint;
|
|
1888
|
-
|
|
1955
|
+
/** The income fee the dead shares pay on their own new income dividend (decision 073), WAD. */
|
|
1956
|
+
incomeFeeRate: bigint;
|
|
1889
1957
|
/** The ranges the LOG Authority set on the policy NOW for the pads born after this read: what a new creator may choose. */
|
|
1890
1958
|
ranges: PadRanges;
|
|
1891
1959
|
} | {
|
|
1892
|
-
kind: "pol";
|
|
1893
|
-
|
|
1894
|
-
|
|
1960
|
+
kind: "pol"; /** The reserve a harvest leaves in the bid and a relaunch's seed must bring, a multiple of L (WAD). */
|
|
1961
|
+
minQuoteRatio: bigint; /** The income fee the pool's authority pays on its own new income dividend (decision 073), WAD. */
|
|
1962
|
+
incomeFeeRate: bigint;
|
|
1895
1963
|
} | {
|
|
1896
1964
|
kind: "public";
|
|
1897
|
-
curated: boolean;
|
|
1898
1965
|
} | {
|
|
1899
1966
|
kind: "private";
|
|
1900
1967
|
gateMint: boolean;
|
|
1901
|
-
|
|
1968
|
+
swapMode: FPoolSwapMode;
|
|
1969
|
+
swapExecutor: Address;
|
|
1902
1970
|
operator: Address;
|
|
1903
1971
|
};
|
|
1904
1972
|
/** The LOG Authority's range on a pad's creator choice (`PadPolicy`, decisions 056, 067), WAD fractions of the pot. */
|
|
1905
1973
|
export interface PadRanges {
|
|
1906
|
-
/** The protocol's share of the pot, recorded into each pad at birth. */
|
|
1907
|
-
protocolShare: bigint;
|
|
1908
1974
|
creatorShareMin: bigint;
|
|
1909
1975
|
/** At most the F manager's `PAYEE_CUT_MAX` (50%), which bounds a pad's payee whatever the policy (067). */
|
|
1910
1976
|
creatorShareMax: bigint;
|
|
@@ -1963,7 +2029,7 @@ export interface FPolicyTerms {
|
|
|
1963
2029
|
protocolCut: bigint;
|
|
1964
2030
|
carried: Address;
|
|
1965
2031
|
}
|
|
1966
|
-
/** Every F pool's raw state in one lens call (the manager's `Pool` struct: quote, swapFee, policy, seeded, gen, n, restructureTime, asks, lnCapOverFloor, Q,
|
|
2032
|
+
/** Every F pool's raw state in one lens call (the manager's `Pool` struct: quote, swapFee, policy, seeded, gen, n, restructureTime, asks, lnCapOverFloor, Q, realizedVariance, L, shares, refLogFloor). */
|
|
1967
2033
|
export declare function getFPoolsRaw(c: LogswapClient, poolIds: Hex[]): Promise<readonly unknown[]>;
|
|
1968
2034
|
/** Share value from the lens — (L + Q)/shares, WAD per share — the same figure as `fPoolShareValue`, from one source. */
|
|
1969
2035
|
export declare function shareValueOnChain(c: LogswapClient, poolId: Hex): Promise<bigint>;
|