@logswap/sdk 0.5.37 → 0.5.38
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/client.d.ts +1 -1
- package/dist/client.js +6 -3
- package/dist/fpool.d.ts +302 -73
- package/dist/fpool.js +104 -52
- package/dist/generated.d.ts +257 -46
- package/dist/generated.js +171 -25
- package/package.json +1 -1
- package/src/client.ts +6 -3
- package/src/fpool.ts +143 -68
- package/src/generated.ts +171 -25
package/dist/client.d.ts
CHANGED
|
@@ -64,5 +64,5 @@ export declare const EXPECTED_VERSION = 3n;
|
|
|
64
64
|
* passes it; when one lands, raise this constant in the same change, which is the discipline
|
|
65
65
|
* `EXPECTED_VERSION` enforces mechanically and this one asks for.
|
|
66
66
|
*/
|
|
67
|
-
export declare const EXPECTED_F_VERSION =
|
|
67
|
+
export declare const EXPECTED_F_VERSION = 8n;
|
|
68
68
|
export declare function assertVersion(c: LogswapClient, expected?: bigint): Promise<void>;
|
package/dist/client.js
CHANGED
|
@@ -42,9 +42,12 @@ export const EXPECTED_VERSION = 3n;
|
|
|
42
42
|
*/
|
|
43
43
|
// 7 (2026-09-15): the reserves are the state and the marks derived, `lockStrike`, the dividend
|
|
44
44
|
// harvest, the relaunch (`dissolve(poolId, successor)`, `rollIn`), the reserve-named seed, the
|
|
45
|
-
// sponsor facet — decisions 025–031.
|
|
46
|
-
//
|
|
47
|
-
|
|
45
|
+
// sponsor facet — decisions 025–031.
|
|
46
|
+
// 8 (2026-09-15): the relaunch is in place (decisions 032) — every share id carries the
|
|
47
|
+
// generation (`fPoolShareId(poolId, gen)`), `dissolve(poolId)`, `redeem`, `claim` / `dividendOf`
|
|
48
|
+
// / `rollIn` / `previewRollIn` take the generation, `Pool.gen` replaces `dissolved` and
|
|
49
|
+
// `successor`. A 7 deployment's share ids do not even resolve with this SDK.
|
|
50
|
+
export const EXPECTED_F_VERSION = 8n;
|
|
48
51
|
export async function assertVersion(c, expected = EXPECTED_VERSION) {
|
|
49
52
|
const { cPoolManagerAbi } = await import("./generated.js");
|
|
50
53
|
const got = await c.public.readContract({
|
package/dist/fpool.d.ts
CHANGED
|
@@ -177,6 +177,32 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
177
177
|
readonly type: "uint256";
|
|
178
178
|
}];
|
|
179
179
|
readonly stateMutability: "view";
|
|
180
|
+
}, {
|
|
181
|
+
readonly type: "function";
|
|
182
|
+
readonly inputs: readonly [{
|
|
183
|
+
readonly name: "poolId";
|
|
184
|
+
readonly internalType: "bytes32";
|
|
185
|
+
readonly type: "bytes32";
|
|
186
|
+
}, {
|
|
187
|
+
readonly name: "gen";
|
|
188
|
+
readonly internalType: "uint256";
|
|
189
|
+
readonly type: "uint256";
|
|
190
|
+
}];
|
|
191
|
+
readonly name: "bundleOf";
|
|
192
|
+
readonly outputs: readonly [{
|
|
193
|
+
readonly name: "supply";
|
|
194
|
+
readonly internalType: "uint256";
|
|
195
|
+
readonly type: "uint256";
|
|
196
|
+
}, {
|
|
197
|
+
readonly name: "quote";
|
|
198
|
+
readonly internalType: "uint256";
|
|
199
|
+
readonly type: "uint256";
|
|
200
|
+
}, {
|
|
201
|
+
readonly name: "base";
|
|
202
|
+
readonly internalType: "uint256[]";
|
|
203
|
+
readonly type: "uint256[]";
|
|
204
|
+
}];
|
|
205
|
+
readonly stateMutability: "view";
|
|
180
206
|
}, {
|
|
181
207
|
readonly type: "function";
|
|
182
208
|
readonly inputs: readonly [{
|
|
@@ -297,6 +323,10 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
297
323
|
readonly name: "poolId";
|
|
298
324
|
readonly internalType: "bytes32";
|
|
299
325
|
readonly type: "bytes32";
|
|
326
|
+
}, {
|
|
327
|
+
readonly name: "gen";
|
|
328
|
+
readonly internalType: "uint256";
|
|
329
|
+
readonly type: "uint256";
|
|
300
330
|
}, {
|
|
301
331
|
readonly name: "holder";
|
|
302
332
|
readonly internalType: "address";
|
|
@@ -394,9 +424,9 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
394
424
|
readonly internalType: "bool";
|
|
395
425
|
readonly type: "bool";
|
|
396
426
|
}, {
|
|
397
|
-
readonly name: "
|
|
398
|
-
readonly internalType: "
|
|
399
|
-
readonly type: "
|
|
427
|
+
readonly name: "gen";
|
|
428
|
+
readonly internalType: "uint16";
|
|
429
|
+
readonly type: "uint16";
|
|
400
430
|
}, {
|
|
401
431
|
readonly name: "n";
|
|
402
432
|
readonly internalType: "uint8";
|
|
@@ -457,10 +487,6 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
457
487
|
readonly name: "name";
|
|
458
488
|
readonly internalType: "bytes32";
|
|
459
489
|
readonly type: "bytes32";
|
|
460
|
-
}, {
|
|
461
|
-
readonly name: "successor";
|
|
462
|
-
readonly internalType: "bytes32";
|
|
463
|
-
readonly type: "bytes32";
|
|
464
490
|
}];
|
|
465
491
|
}];
|
|
466
492
|
readonly stateMutability: "view";
|
|
@@ -796,6 +822,32 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
796
822
|
readonly name: "quoteSwap";
|
|
797
823
|
readonly outputs: readonly [];
|
|
798
824
|
readonly stateMutability: "nonpayable";
|
|
825
|
+
}, {
|
|
826
|
+
readonly type: "function";
|
|
827
|
+
readonly inputs: readonly [{
|
|
828
|
+
readonly name: "poolId";
|
|
829
|
+
readonly internalType: "bytes32";
|
|
830
|
+
readonly type: "bytes32";
|
|
831
|
+
}, {
|
|
832
|
+
readonly name: "gen";
|
|
833
|
+
readonly internalType: "uint256";
|
|
834
|
+
readonly type: "uint256";
|
|
835
|
+
}, {
|
|
836
|
+
readonly name: "owner";
|
|
837
|
+
readonly internalType: "address";
|
|
838
|
+
readonly type: "address";
|
|
839
|
+
}, {
|
|
840
|
+
readonly name: "shares";
|
|
841
|
+
readonly internalType: "uint256";
|
|
842
|
+
readonly type: "uint256";
|
|
843
|
+
}];
|
|
844
|
+
readonly name: "redeem";
|
|
845
|
+
readonly outputs: readonly [{
|
|
846
|
+
readonly name: "quoteOut";
|
|
847
|
+
readonly internalType: "uint256";
|
|
848
|
+
readonly type: "uint256";
|
|
849
|
+
}];
|
|
850
|
+
readonly stateMutability: "nonpayable";
|
|
799
851
|
}, {
|
|
800
852
|
readonly type: "function";
|
|
801
853
|
readonly inputs: readonly [{
|
|
@@ -874,6 +926,10 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
874
926
|
readonly name: "poolId";
|
|
875
927
|
readonly internalType: "bytes32";
|
|
876
928
|
readonly type: "bytes32";
|
|
929
|
+
}, {
|
|
930
|
+
readonly name: "gen";
|
|
931
|
+
readonly internalType: "uint256";
|
|
932
|
+
readonly type: "uint256";
|
|
877
933
|
}];
|
|
878
934
|
readonly name: "shareIdOf";
|
|
879
935
|
readonly outputs: readonly [{
|
|
@@ -1330,10 +1386,20 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
1330
1386
|
readonly type: "bytes32";
|
|
1331
1387
|
readonly indexed: true;
|
|
1332
1388
|
}, {
|
|
1333
|
-
readonly name: "
|
|
1334
|
-
readonly internalType: "
|
|
1335
|
-
readonly type: "
|
|
1389
|
+
readonly name: "gen";
|
|
1390
|
+
readonly internalType: "uint256";
|
|
1391
|
+
readonly type: "uint256";
|
|
1336
1392
|
readonly indexed: true;
|
|
1393
|
+
}, {
|
|
1394
|
+
readonly name: "supply";
|
|
1395
|
+
readonly internalType: "uint256";
|
|
1396
|
+
readonly type: "uint256";
|
|
1397
|
+
readonly indexed: false;
|
|
1398
|
+
}, {
|
|
1399
|
+
readonly name: "quote";
|
|
1400
|
+
readonly internalType: "uint256";
|
|
1401
|
+
readonly type: "uint256";
|
|
1402
|
+
readonly indexed: false;
|
|
1337
1403
|
}];
|
|
1338
1404
|
readonly name: "Dissolve";
|
|
1339
1405
|
}, {
|
|
@@ -1654,6 +1720,41 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
1654
1720
|
readonly internalType: "bytes32";
|
|
1655
1721
|
readonly type: "bytes32";
|
|
1656
1722
|
readonly indexed: true;
|
|
1723
|
+
}, {
|
|
1724
|
+
readonly name: "gen";
|
|
1725
|
+
readonly internalType: "uint256";
|
|
1726
|
+
readonly type: "uint256";
|
|
1727
|
+
readonly indexed: true;
|
|
1728
|
+
}, {
|
|
1729
|
+
readonly name: "owner";
|
|
1730
|
+
readonly internalType: "address";
|
|
1731
|
+
readonly type: "address";
|
|
1732
|
+
readonly indexed: true;
|
|
1733
|
+
}, {
|
|
1734
|
+
readonly name: "shares";
|
|
1735
|
+
readonly internalType: "uint256";
|
|
1736
|
+
readonly type: "uint256";
|
|
1737
|
+
readonly indexed: false;
|
|
1738
|
+
}, {
|
|
1739
|
+
readonly name: "quoteOut";
|
|
1740
|
+
readonly internalType: "uint256";
|
|
1741
|
+
readonly type: "uint256";
|
|
1742
|
+
readonly indexed: false;
|
|
1743
|
+
}];
|
|
1744
|
+
readonly name: "Redeem";
|
|
1745
|
+
}, {
|
|
1746
|
+
readonly type: "event";
|
|
1747
|
+
readonly anonymous: false;
|
|
1748
|
+
readonly inputs: readonly [{
|
|
1749
|
+
readonly name: "poolId";
|
|
1750
|
+
readonly internalType: "bytes32";
|
|
1751
|
+
readonly type: "bytes32";
|
|
1752
|
+
readonly indexed: true;
|
|
1753
|
+
}, {
|
|
1754
|
+
readonly name: "gen";
|
|
1755
|
+
readonly internalType: "uint256";
|
|
1756
|
+
readonly type: "uint256";
|
|
1757
|
+
readonly indexed: true;
|
|
1657
1758
|
}, {
|
|
1658
1759
|
readonly name: "L0";
|
|
1659
1760
|
readonly internalType: "uint256";
|
|
@@ -1782,18 +1883,10 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
1782
1883
|
readonly type: "error";
|
|
1783
1884
|
readonly inputs: readonly [];
|
|
1784
1885
|
readonly name: "BadParam";
|
|
1785
|
-
}, {
|
|
1786
|
-
readonly type: "error";
|
|
1787
|
-
readonly inputs: readonly [];
|
|
1788
|
-
readonly name: "BadSuccessor";
|
|
1789
1886
|
}, {
|
|
1790
1887
|
readonly type: "error";
|
|
1791
1888
|
readonly inputs: readonly [];
|
|
1792
1889
|
readonly name: "BalanceOverflow";
|
|
1793
|
-
}, {
|
|
1794
|
-
readonly type: "error";
|
|
1795
|
-
readonly inputs: readonly [];
|
|
1796
|
-
readonly name: "Dissolved_";
|
|
1797
1890
|
}, {
|
|
1798
1891
|
readonly type: "error";
|
|
1799
1892
|
readonly inputs: readonly [];
|
|
@@ -1858,6 +1951,10 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
1858
1951
|
readonly type: "error";
|
|
1859
1952
|
readonly inputs: readonly [];
|
|
1860
1953
|
readonly name: "NotOperator";
|
|
1954
|
+
}, {
|
|
1955
|
+
readonly type: "error";
|
|
1956
|
+
readonly inputs: readonly [];
|
|
1957
|
+
readonly name: "NotRetired";
|
|
1861
1958
|
}, {
|
|
1862
1959
|
readonly type: "error";
|
|
1863
1960
|
readonly inputs: readonly [];
|
|
@@ -1918,6 +2015,10 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
1918
2015
|
readonly type: "error";
|
|
1919
2016
|
readonly inputs: readonly [];
|
|
1920
2017
|
readonly name: "TokensNotSettled";
|
|
2018
|
+
}, {
|
|
2019
|
+
readonly type: "error";
|
|
2020
|
+
readonly inputs: readonly [];
|
|
2021
|
+
readonly name: "TooManyGenerations";
|
|
1921
2022
|
}, {
|
|
1922
2023
|
readonly type: "error";
|
|
1923
2024
|
readonly inputs: readonly [];
|
|
@@ -2124,6 +2225,32 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
2124
2225
|
readonly type: "uint256";
|
|
2125
2226
|
}];
|
|
2126
2227
|
readonly stateMutability: "view";
|
|
2228
|
+
}, {
|
|
2229
|
+
readonly type: "function";
|
|
2230
|
+
readonly inputs: readonly [{
|
|
2231
|
+
readonly name: "poolId";
|
|
2232
|
+
readonly internalType: "bytes32";
|
|
2233
|
+
readonly type: "bytes32";
|
|
2234
|
+
}, {
|
|
2235
|
+
readonly name: "gen";
|
|
2236
|
+
readonly internalType: "uint256";
|
|
2237
|
+
readonly type: "uint256";
|
|
2238
|
+
}];
|
|
2239
|
+
readonly name: "bundleOf";
|
|
2240
|
+
readonly outputs: readonly [{
|
|
2241
|
+
readonly name: "supply";
|
|
2242
|
+
readonly internalType: "uint256";
|
|
2243
|
+
readonly type: "uint256";
|
|
2244
|
+
}, {
|
|
2245
|
+
readonly name: "quote";
|
|
2246
|
+
readonly internalType: "uint256";
|
|
2247
|
+
readonly type: "uint256";
|
|
2248
|
+
}, {
|
|
2249
|
+
readonly name: "base";
|
|
2250
|
+
readonly internalType: "uint256[]";
|
|
2251
|
+
readonly type: "uint256[]";
|
|
2252
|
+
}];
|
|
2253
|
+
readonly stateMutability: "view";
|
|
2127
2254
|
}, {
|
|
2128
2255
|
readonly type: "function";
|
|
2129
2256
|
readonly inputs: readonly [{
|
|
@@ -2144,6 +2271,10 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
2144
2271
|
readonly name: "poolId";
|
|
2145
2272
|
readonly internalType: "bytes32";
|
|
2146
2273
|
readonly type: "bytes32";
|
|
2274
|
+
}, {
|
|
2275
|
+
readonly name: "gen";
|
|
2276
|
+
readonly internalType: "uint256";
|
|
2277
|
+
readonly type: "uint256";
|
|
2147
2278
|
}, {
|
|
2148
2279
|
readonly name: "to";
|
|
2149
2280
|
readonly internalType: "address";
|
|
@@ -2250,10 +2381,6 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
2250
2381
|
readonly name: "poolId";
|
|
2251
2382
|
readonly internalType: "bytes32";
|
|
2252
2383
|
readonly type: "bytes32";
|
|
2253
|
-
}, {
|
|
2254
|
-
readonly name: "successor";
|
|
2255
|
-
readonly internalType: "bytes32";
|
|
2256
|
-
readonly type: "bytes32";
|
|
2257
2384
|
}];
|
|
2258
2385
|
readonly name: "dissolve";
|
|
2259
2386
|
readonly outputs: readonly [];
|
|
@@ -2616,6 +2743,10 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
2616
2743
|
readonly name: "poolId";
|
|
2617
2744
|
readonly internalType: "bytes32";
|
|
2618
2745
|
readonly type: "bytes32";
|
|
2746
|
+
}, {
|
|
2747
|
+
readonly name: "gen";
|
|
2748
|
+
readonly internalType: "uint256";
|
|
2749
|
+
readonly type: "uint256";
|
|
2619
2750
|
}];
|
|
2620
2751
|
readonly name: "shareIdOf";
|
|
2621
2752
|
readonly outputs: readonly [{
|
|
@@ -2968,10 +3099,20 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
2968
3099
|
readonly type: "bytes32";
|
|
2969
3100
|
readonly indexed: true;
|
|
2970
3101
|
}, {
|
|
2971
|
-
readonly name: "
|
|
2972
|
-
readonly internalType: "
|
|
2973
|
-
readonly type: "
|
|
3102
|
+
readonly name: "gen";
|
|
3103
|
+
readonly internalType: "uint256";
|
|
3104
|
+
readonly type: "uint256";
|
|
2974
3105
|
readonly indexed: true;
|
|
3106
|
+
}, {
|
|
3107
|
+
readonly name: "supply";
|
|
3108
|
+
readonly internalType: "uint256";
|
|
3109
|
+
readonly type: "uint256";
|
|
3110
|
+
readonly indexed: false;
|
|
3111
|
+
}, {
|
|
3112
|
+
readonly name: "quote";
|
|
3113
|
+
readonly internalType: "uint256";
|
|
3114
|
+
readonly type: "uint256";
|
|
3115
|
+
readonly indexed: false;
|
|
2975
3116
|
}];
|
|
2976
3117
|
readonly name: "Dissolve";
|
|
2977
3118
|
}, {
|
|
@@ -3292,6 +3433,41 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
3292
3433
|
readonly internalType: "bytes32";
|
|
3293
3434
|
readonly type: "bytes32";
|
|
3294
3435
|
readonly indexed: true;
|
|
3436
|
+
}, {
|
|
3437
|
+
readonly name: "gen";
|
|
3438
|
+
readonly internalType: "uint256";
|
|
3439
|
+
readonly type: "uint256";
|
|
3440
|
+
readonly indexed: true;
|
|
3441
|
+
}, {
|
|
3442
|
+
readonly name: "owner";
|
|
3443
|
+
readonly internalType: "address";
|
|
3444
|
+
readonly type: "address";
|
|
3445
|
+
readonly indexed: true;
|
|
3446
|
+
}, {
|
|
3447
|
+
readonly name: "shares";
|
|
3448
|
+
readonly internalType: "uint256";
|
|
3449
|
+
readonly type: "uint256";
|
|
3450
|
+
readonly indexed: false;
|
|
3451
|
+
}, {
|
|
3452
|
+
readonly name: "quoteOut";
|
|
3453
|
+
readonly internalType: "uint256";
|
|
3454
|
+
readonly type: "uint256";
|
|
3455
|
+
readonly indexed: false;
|
|
3456
|
+
}];
|
|
3457
|
+
readonly name: "Redeem";
|
|
3458
|
+
}, {
|
|
3459
|
+
readonly type: "event";
|
|
3460
|
+
readonly anonymous: false;
|
|
3461
|
+
readonly inputs: readonly [{
|
|
3462
|
+
readonly name: "poolId";
|
|
3463
|
+
readonly internalType: "bytes32";
|
|
3464
|
+
readonly type: "bytes32";
|
|
3465
|
+
readonly indexed: true;
|
|
3466
|
+
}, {
|
|
3467
|
+
readonly name: "gen";
|
|
3468
|
+
readonly internalType: "uint256";
|
|
3469
|
+
readonly type: "uint256";
|
|
3470
|
+
readonly indexed: true;
|
|
3295
3471
|
}, {
|
|
3296
3472
|
readonly name: "L0";
|
|
3297
3473
|
readonly internalType: "uint256";
|
|
@@ -3420,18 +3596,10 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
3420
3596
|
readonly type: "error";
|
|
3421
3597
|
readonly inputs: readonly [];
|
|
3422
3598
|
readonly name: "BadParam";
|
|
3423
|
-
}, {
|
|
3424
|
-
readonly type: "error";
|
|
3425
|
-
readonly inputs: readonly [];
|
|
3426
|
-
readonly name: "BadSuccessor";
|
|
3427
3599
|
}, {
|
|
3428
3600
|
readonly type: "error";
|
|
3429
3601
|
readonly inputs: readonly [];
|
|
3430
3602
|
readonly name: "BalanceOverflow";
|
|
3431
|
-
}, {
|
|
3432
|
-
readonly type: "error";
|
|
3433
|
-
readonly inputs: readonly [];
|
|
3434
|
-
readonly name: "Dissolved_";
|
|
3435
3603
|
}, {
|
|
3436
3604
|
readonly type: "error";
|
|
3437
3605
|
readonly inputs: readonly [];
|
|
@@ -3492,6 +3660,10 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
3492
3660
|
readonly type: "error";
|
|
3493
3661
|
readonly inputs: readonly [];
|
|
3494
3662
|
readonly name: "NotOperator";
|
|
3663
|
+
}, {
|
|
3664
|
+
readonly type: "error";
|
|
3665
|
+
readonly inputs: readonly [];
|
|
3666
|
+
readonly name: "NotRetired";
|
|
3495
3667
|
}, {
|
|
3496
3668
|
readonly type: "error";
|
|
3497
3669
|
readonly inputs: readonly [];
|
|
@@ -3552,6 +3724,10 @@ export declare const fPoolManagerAbi: readonly [{
|
|
|
3552
3724
|
readonly type: "error";
|
|
3553
3725
|
readonly inputs: readonly [];
|
|
3554
3726
|
readonly name: "TokensNotSettled";
|
|
3727
|
+
}, {
|
|
3728
|
+
readonly type: "error";
|
|
3729
|
+
readonly inputs: readonly [];
|
|
3730
|
+
readonly name: "TooManyGenerations";
|
|
3555
3731
|
}, {
|
|
3556
3732
|
readonly type: "error";
|
|
3557
3733
|
readonly inputs: readonly [];
|
|
@@ -3612,10 +3788,14 @@ export interface FPoolState {
|
|
|
3612
3788
|
* The pad's promise. Pairs with a locked seed (shares at 0xdead) — the class is the two bits.
|
|
3613
3789
|
*/
|
|
3614
3790
|
lockStrike: boolean;
|
|
3791
|
+
/** False before the first seed — and between a dissolve and the next one (decisions 032). */
|
|
3615
3792
|
seeded: boolean;
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3793
|
+
/**
|
|
3794
|
+
* The live GENERATION (decisions 032). Every dissolve retires one into a frozen bundle its
|
|
3795
|
+
* shares redeem ({@link fPoolRedeem}) and opens the next; the share id carries it
|
|
3796
|
+
* ({@link fPoolShareId}), so generations `0 … gen-1` are retired claims and `gen` is the pool.
|
|
3797
|
+
*/
|
|
3798
|
+
gen: number;
|
|
3619
3799
|
totalSupply: bigint;
|
|
3620
3800
|
/** What the pool holds of each base — the STATE since decisions 026; the mark `x` is derived from it. */
|
|
3621
3801
|
reserves: bigint[];
|
|
@@ -3722,16 +3902,18 @@ export declare function fPoolZapOut(c: LogswapClient, a: {
|
|
|
3722
3902
|
deadline?: bigint;
|
|
3723
3903
|
}): Promise<`0x${string}`>;
|
|
3724
3904
|
/**
|
|
3725
|
-
* Roll a
|
|
3726
|
-
* lock:
|
|
3727
|
-
* back — buy through
|
|
3728
|
-
*
|
|
3729
|
-
*
|
|
3730
|
-
*
|
|
3905
|
+
* Roll a retired generation's bundle into the pool's live one (decisions 025, 032), on the
|
|
3906
|
+
* router under one lock: redeem `shares` of generation `gen` in place — the legs, the quote and
|
|
3907
|
+
* any unpulled dividend come back — buy through the pool's own curve only what the live
|
|
3908
|
+
* generation's ratio lacks, mint `dL` of it to `to`, and refund the rest in kind. Quote the
|
|
3909
|
+
* bundle does not cover is pulled from the payer, at most `maxQuoteIn`; surplus base is
|
|
3910
|
+
* refunded, never sold. Size `dL` with {@link fPoolPreviewRollIn}. The router must be the
|
|
3911
|
+
* caller's ERC-6909 operator ({@link approveRouterForFPool}).
|
|
3731
3912
|
*/
|
|
3732
3913
|
export declare function fPoolRollIn(c: LogswapClient, a: {
|
|
3733
|
-
|
|
3734
|
-
|
|
3914
|
+
poolId: Hex;
|
|
3915
|
+
/** the retired generation whose shares roll */
|
|
3916
|
+
gen: bigint | number;
|
|
3735
3917
|
shares: bigint;
|
|
3736
3918
|
dL: bigint;
|
|
3737
3919
|
maxQuoteIn?: bigint;
|
|
@@ -3741,13 +3923,14 @@ export declare function fPoolRollIn(c: LogswapClient, a: {
|
|
|
3741
3923
|
deadline?: bigint;
|
|
3742
3924
|
}): Promise<`0x${string}`>;
|
|
3743
3925
|
/**
|
|
3744
|
-
* The roll `holder`'s `shares` of `
|
|
3745
|
-
* the bundle's base covers on every
|
|
3746
|
-
* as `maxQuoteIn`) or over (refunded — the up direction's distribution) at
|
|
3747
|
-
*
|
|
3748
|
-
* with `previewZapIn` in mind.
|
|
3926
|
+
* The roll `holder`'s `shares` of retired generation `gen` fund into the live one WITHOUT a
|
|
3927
|
+
* trade: the largest `dL` the bundle's base covers on every leg, and the quote the bundle is
|
|
3928
|
+
* short of (pass it as `maxQuoteIn`) or over (refunded — the up direction's distribution) at
|
|
3929
|
+
* that `dL`. A leg the live generation admitted since makes `dL` zero: such a roll must buy, so
|
|
3930
|
+
* size it below with `previewZapIn` in mind. Zero for the live generation, or before the next
|
|
3931
|
+
* seed.
|
|
3749
3932
|
*/
|
|
3750
|
-
export declare function fPoolPreviewRollIn(c: LogswapClient,
|
|
3933
|
+
export declare function fPoolPreviewRollIn(c: LogswapClient, poolId: Hex, gen: bigint | number, holder: Address, shares: bigint): Promise<{
|
|
3751
3934
|
dL: bigint;
|
|
3752
3935
|
quoteShort: bigint;
|
|
3753
3936
|
quoteExcess: bigint;
|
|
@@ -3765,14 +3948,19 @@ export declare function fPoolHarvest(c: LogswapClient, a: {
|
|
|
3765
3948
|
to?: Address;
|
|
3766
3949
|
account: Address;
|
|
3767
3950
|
}): Promise<`0x${string}`>;
|
|
3768
|
-
/**
|
|
3951
|
+
/**
|
|
3952
|
+
* Pull one's settled dividend (decisions 028) on a generation's shares without moving them;
|
|
3953
|
+
* anyone with shares. `gen` defaults to the live generation; a retired generation's harvests
|
|
3954
|
+
* stay claimable under its own id (decisions 032).
|
|
3955
|
+
*/
|
|
3769
3956
|
export declare function fPoolClaim(c: LogswapClient, a: {
|
|
3770
3957
|
poolId: Hex;
|
|
3958
|
+
gen?: bigint | number;
|
|
3771
3959
|
to?: Address;
|
|
3772
3960
|
account: Address;
|
|
3773
3961
|
}): Promise<`0x${string}`>;
|
|
3774
|
-
/** A holder's dividend as of now — banked plus pending on the current balance (decisions 028). */
|
|
3775
|
-
export declare function fPoolDividendOf(c: LogswapClient, poolId: Hex, holder: Address): Promise<bigint>;
|
|
3962
|
+
/** A holder's dividend as of now on generation `gen` (the live one by default) — banked plus pending on the current balance (decisions 028). */
|
|
3963
|
+
export declare function fPoolDividendOf(c: LogswapClient, poolId: Hex, holder: Address, gen?: bigint | number): Promise<bigint>;
|
|
3776
3964
|
/** The lever's floor: `harvest` may not take Q/L under ln 1.25 — the floor stays ≥ 20% below the mark (decisions 025). */
|
|
3777
3965
|
export declare const LEVER_FLOOR = 223143551314209755n;
|
|
3778
3966
|
/** Commit quote, deepening θ — the other sign of `harvest`, the same word as the C floor edit (decisions 011). The mark does not move: governance may write θ, never x. */
|
|
@@ -3788,11 +3976,48 @@ export declare function fPoolManagerAllowanceOk(c: LogswapClient, token: Address
|
|
|
3788
3976
|
export declare function isRouterOperatorForFPool(c: LogswapClient, owner: Address): Promise<boolean>;
|
|
3789
3977
|
/** Approve the router to move this account's F-pool shares. Needed once, before any `fPoolZapOut`. */
|
|
3790
3978
|
export declare function approveRouterForFPool(c: LogswapClient, account: Address): Promise<`0x${string}`>;
|
|
3791
|
-
/**
|
|
3792
|
-
|
|
3979
|
+
/**
|
|
3980
|
+
* The ERC-6909 id carrying generation `gen` of a pool's shares (decisions 032): bit 255 set (the
|
|
3981
|
+
* share flag), the pool id's top 239 bits, the generation in the low 16. Each generation's shares
|
|
3982
|
+
* are their own asset — a retired one is a claim on its bundle, the live one on the pool.
|
|
3983
|
+
*/
|
|
3984
|
+
export declare function fPoolShareId(poolId: Hex, gen?: bigint | number): bigint;
|
|
3985
|
+
/** The generation a share id carries — its low 16 bits. */
|
|
3986
|
+
export declare function fPoolGenOfShareId(id: bigint): number;
|
|
3987
|
+
/** The pool's live generation, one read. */
|
|
3988
|
+
export declare function fPoolGen(c: LogswapClient, poolId: Hex): Promise<number>;
|
|
3793
3989
|
/** The ERC-6909 id carrying claims on a token. Bit 255 clear, so it can never meet a share id. */
|
|
3794
3990
|
export declare function fPoolClaimId(token: Address): bigint;
|
|
3795
|
-
|
|
3991
|
+
/** A holder's shares of generation `gen` — the live one by default. */
|
|
3992
|
+
export declare function fPoolShareBalance(c: LogswapClient, poolId: Hex, owner: Address, gen?: bigint | number): Promise<bigint>;
|
|
3993
|
+
/** A retired generation's bundle (decisions 032): what is left to redeem — supply, quote, base per leg index. */
|
|
3994
|
+
export declare function fPoolBundleOf(c: LogswapClient, poolId: Hex, gen: bigint | number): Promise<{
|
|
3995
|
+
supply: bigint;
|
|
3996
|
+
quote: bigint;
|
|
3997
|
+
base: bigint[];
|
|
3998
|
+
}>;
|
|
3999
|
+
/** A holder's claim on one retired generation, as the lens reports it: what `redeem` pays now. */
|
|
4000
|
+
export interface FPoolClaimRow {
|
|
4001
|
+
gen: number;
|
|
4002
|
+
shares: bigint;
|
|
4003
|
+
base: bigint[];
|
|
4004
|
+
quote: bigint;
|
|
4005
|
+
dividend: bigint;
|
|
4006
|
+
}
|
|
4007
|
+
/** A holder's claims on a pool's retired generations — one row per generation still held (decisions 032). */
|
|
4008
|
+
export declare function fPoolClaimsOf(c: LogswapClient, poolId: Hex, owner: Address): Promise<FPoolClaimRow[]>;
|
|
4009
|
+
/**
|
|
4010
|
+
* Redeem `shares` of a RETIRED generation (decisions 032): its bundle, pro rata — the base per
|
|
4011
|
+
* leg and the quote — plus the owner's settled dividend. Not `burn`: nothing can move a bundle's
|
|
4012
|
+
* ratio, so there is no slippage to bound. The owner, or an operator of theirs.
|
|
4013
|
+
*/
|
|
4014
|
+
export declare function fPoolRedeem(c: LogswapClient, a: {
|
|
4015
|
+
poolId: Hex;
|
|
4016
|
+
gen: bigint | number;
|
|
4017
|
+
shares: bigint;
|
|
4018
|
+
owner?: Address;
|
|
4019
|
+
account: Address;
|
|
4020
|
+
}): Promise<`0x${string}`>;
|
|
3796
4021
|
export declare function fPoolClaimBalance(c: LogswapClient, token: Address, owner: Address): Promise<bigint>;
|
|
3797
4022
|
export declare enum FPoolQuoteKind {
|
|
3798
4023
|
QuoteIn = 0,
|
|
@@ -3874,36 +4099,38 @@ export declare function fPoolSeed(c: LogswapClient, a: {
|
|
|
3874
4099
|
weights: bigint[];
|
|
3875
4100
|
})): Promise<`0x${string}`>;
|
|
3876
4101
|
/**
|
|
3877
|
-
*
|
|
3878
|
-
* and on a pool that is not strike-locked at any Q
|
|
3879
|
-
*
|
|
3880
|
-
*
|
|
3881
|
-
*
|
|
4102
|
+
* Retire the live generation (decisions 025, 032). Allowed at Q ≤ L/1e9 on every pool — the
|
|
4103
|
+
* market filled the ask — and on a pool that is not strike-locked at any Q. The live (S, Q, R_j)
|
|
4104
|
+
* become a frozen bundle every share of this generation redeems ({@link fPoolRedeem}) or rolls
|
|
4105
|
+
* ({@link fPoolRollIn}), forever; the pool is unseeded until the next {@link fPoolSeed}, which
|
|
4106
|
+
* opens generation `gen + 1` under the same id, gates, lists and promises.
|
|
3882
4107
|
*/
|
|
3883
4108
|
export declare function fPoolDissolve(c: LogswapClient, a: {
|
|
3884
4109
|
poolId: Hex;
|
|
3885
|
-
successor?: Hex;
|
|
3886
4110
|
account: Address;
|
|
3887
4111
|
}): Promise<`0x${string}`>;
|
|
3888
4112
|
/**
|
|
3889
|
-
* The sponsor's relaunch as ONE transaction (decisions 025): `
|
|
3890
|
-
* `
|
|
3891
|
-
* came back — the manager's `multicall`, the sponsor as sender throughout
|
|
3892
|
-
* operator,
|
|
3893
|
-
* against {@link fPoolManagerAbi}.
|
|
3894
|
-
*
|
|
4113
|
+
* The sponsor's relaunch as ONE transaction (decisions 025, 032): `dissolve` the live generation,
|
|
4114
|
+
* `redeem` the sponsor's own shares of it (when `shares` > 0), `seed` the next generation with
|
|
4115
|
+
* what came back — the manager's `multicall`, the sponsor as sender throughout, the same pool.
|
|
4116
|
+
* Gates, allowlist, operator, `minBuffer` and names carry over; anything else goes in `extra`,
|
|
4117
|
+
* pre-encoded against {@link fPoolManagerAbi}. The seed names reserves (decisions 029): `r0`
|
|
4118
|
+
* outright, or `x0` marks against the key's `weights`.
|
|
3895
4119
|
*/
|
|
3896
4120
|
export declare function fPoolRelaunch(c: LogswapClient, a: {
|
|
3897
4121
|
poolId: Hex;
|
|
3898
|
-
|
|
3899
|
-
/** the sponsor's old shares to burn — its whole balance, usually */
|
|
4122
|
+
/** the sponsor's shares of the retiring generation to redeem inside the batch — its whole balance, usually; 0 to keep the claim */
|
|
3900
4123
|
shares: bigint;
|
|
3901
4124
|
L0: bigint;
|
|
3902
4125
|
Q0: bigint;
|
|
3903
|
-
r0: bigint[];
|
|
3904
4126
|
extra?: Hex[];
|
|
3905
4127
|
account: Address;
|
|
3906
|
-
}
|
|
4128
|
+
} & ({
|
|
4129
|
+
r0: bigint[];
|
|
4130
|
+
} | {
|
|
4131
|
+
x0: bigint[];
|
|
4132
|
+
weights: bigint[];
|
|
4133
|
+
})): Promise<`0x${string}`>;
|
|
3907
4134
|
/**
|
|
3908
4135
|
* Propose the next authority — step one of two (contracts `2aa6b7b`, decisions 020). Nothing moves
|
|
3909
4136
|
* until `next` accepts; proposing again (the zero address included) cancels a pending proposal.
|
|
@@ -3999,6 +4226,7 @@ export declare function fPoolTransferShares(c: LogswapClient, a: {
|
|
|
3999
4226
|
to: Address;
|
|
4000
4227
|
shares: bigint;
|
|
4001
4228
|
account: Address;
|
|
4229
|
+
gen?: bigint | number;
|
|
4002
4230
|
}): Promise<`0x${string}`>;
|
|
4003
4231
|
export interface DiscoveredFPool {
|
|
4004
4232
|
poolId: Hex;
|
|
@@ -4038,11 +4266,12 @@ export declare function discoverFPools(c: LogswapClient, opts?: {
|
|
|
4038
4266
|
*/
|
|
4039
4267
|
export declare function fPoolShareHolders(c: LogswapClient, poolIdHex: Hex, opts?: {
|
|
4040
4268
|
fromBlock?: bigint;
|
|
4269
|
+
gen?: bigint | number;
|
|
4041
4270
|
}): Promise<Array<{
|
|
4042
4271
|
holder: Address;
|
|
4043
4272
|
shares: bigint;
|
|
4044
4273
|
}>>;
|
|
4045
|
-
/** Every F pool's state in one lens call (the raw manager struct: quote, phi, authority, lockStrike, seeded,
|
|
4274
|
+
/** Every F pool's state in one lens call (the raw manager struct: quote, phi, authority, lockStrike, seeded, gen, n, Q, L, shares, theta0, bigSigma, leverTheta). */
|
|
4046
4275
|
export declare function getFPoolsRaw(c: LogswapClient, poolIds: Hex[]): Promise<readonly unknown[]>;
|
|
4047
4276
|
/** Share value from the lens — (L + Q)/shares, WAD per share — the same figure as `fPoolShareValue`, from one source. */
|
|
4048
4277
|
export declare function shareValueOnChain(c: LogswapClient, poolId: Hex): Promise<bigint>;
|