@reserve-protocol/dtf-rebalance-lib 3.3.0 → 3.3.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/README.md +11 -4
- package/dist/5.0.0/open-auction.d.ts +2 -1
- package/dist/5.0.0/start-rebalance.d.ts +1 -1
- package/dist/5.0.0/types.d.ts +24 -0
- package/dist/5.0.0/types.js +3 -0
- package/dist/6.0.0/open-auction.d.ts +9 -0
- package/dist/6.0.0/open-auction.js +24 -0
- package/dist/6.0.0/start-rebalance.d.ts +8 -0
- package/dist/6.0.0/start-rebalance.js +29 -0
- package/dist/6.0.0/types.d.ts +6 -0
- package/dist/6.0.0/types.js +3 -0
- package/dist/index.d.ts +2 -1
- package/dist/open-auction.d.ts +3 -2
- package/dist/open-auction.js +11 -11
- package/dist/start-rebalance.d.ts +4 -3
- package/dist/start-rebalance.js +12 -12
- package/dist/types.d.ts +3 -1
- package/dist/types.js +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ Each call to `getOpenAuction()` produces one of three round types:
|
|
|
48
48
|
|
|
49
49
|
| Parameter | Type | Description |
|
|
50
50
|
| --- | --- | --- |
|
|
51
|
-
| `version` | `FolioVersion` | Protocol version (`V4` or `
|
|
51
|
+
| `version` | `FolioVersion` | Protocol version (`V4`, `V5`, or `V6`) |
|
|
52
52
|
| `_supply` | `bigint` | Current total share supply |
|
|
53
53
|
| `tokens` | `string[]` | Token addresses in the basket |
|
|
54
54
|
| `_assets` | `bigint[]` | Current token balances |
|
|
@@ -56,12 +56,12 @@ Each call to `getOpenAuction()` produces one of three round types:
|
|
|
56
56
|
| `_targetBasket` | `bigint[]` | D18 ideal basket proportions |
|
|
57
57
|
| `_prices` | `number[]` | USD price per whole token |
|
|
58
58
|
| `_priceError` | `number[]` | Price error fraction per token |
|
|
59
|
-
| `_maxAuctionSizes` | `number[]` | Max USD auction size per token |
|
|
59
|
+
| `_maxAuctionSizes` | `number[]` | Max USD auction size per token (`V5`/`V6`; ignored by `V4`) |
|
|
60
60
|
| `weightControl` | `boolean` | `false` = tracking, `true` = native |
|
|
61
61
|
| `deferWeights` | `boolean` | Use full weight range (native only) |
|
|
62
62
|
| `debug` | `boolean?` | Log debug output |
|
|
63
63
|
|
|
64
|
-
**Returns** `StartRebalanceArgsPartial` -- contains `tokens` (with weight ranges, price ranges, and max auction sizes per token) and `limits` (low/spot/high).
|
|
64
|
+
**Returns** `StartRebalanceArgsPartial` -- contains `tokens` (with weight ranges, price ranges, and max auction sizes per token for `V5`/`V6`) and `limits` (low/spot/high). Folio `V6` additionally requires the caller to pass the expected rebalance nonce to the on-chain `startRebalance()` call.
|
|
65
65
|
|
|
66
66
|
### `getOpenAuction()`
|
|
67
67
|
|
|
@@ -79,8 +79,15 @@ Each call to `getOpenAuction()` produces one of three round types:
|
|
|
79
79
|
| `_priceError` | `number[]` | Price error fraction per token |
|
|
80
80
|
| `_finalStageAt` | `number` | Progression threshold to enter FINAL (e.g. 0.9) |
|
|
81
81
|
| `debug` | `boolean?` | Log debug output |
|
|
82
|
+
| `_auctionLength` | `bigint?` | Required for `V6`; omitted for `V4`/`V5` |
|
|
82
83
|
|
|
83
|
-
**Returns** `[OpenAuctionArgs, AuctionMetrics]` -- the on-chain call arguments and a metrics object describing the round type, progression, and per-token surplus/deficit sizes.
|
|
84
|
+
**Returns** `[OpenAuctionArgs, AuctionMetrics]` -- the on-chain call arguments and a metrics object describing the round type, progression, and per-token surplus/deficit sizes. For `V6`, `OpenAuctionArgs.auctionLength` is included and must be supplied to the on-chain `openAuction()` call.
|
|
85
|
+
|
|
86
|
+
## Version Notes
|
|
87
|
+
|
|
88
|
+
The default exported `Rebalance` and `StartRebalanceArgsPartial` types match the `V5` shape for compatibility. Version-specific aliases are also exported: `RebalanceV4`, `RebalanceV5`, `RebalanceV6`, `StartRebalanceArgsPartialV4`, `StartRebalanceArgsPartialV5`, and `StartRebalanceArgsPartialV6`.
|
|
89
|
+
|
|
90
|
+
Folio `V6` uses the same rebalance math as `V5`, plus protocol ABI differences: `startRebalance()` requires an expected nonce and `openAuction()` requires `auctionLength`.
|
|
84
91
|
|
|
85
92
|
## Utility functions
|
|
86
93
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PriceRange, RebalanceLimits, WeightRange, PriceControl } from "../types";
|
|
2
|
+
export interface TokenRebalanceParams {
|
|
3
|
+
token: string;
|
|
4
|
+
weight: WeightRange;
|
|
5
|
+
price: PriceRange;
|
|
6
|
+
maxAuctionSize: bigint;
|
|
7
|
+
inRebalance: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface RebalanceTimestamps {
|
|
10
|
+
startedAt: bigint;
|
|
11
|
+
restrictedUntil: bigint;
|
|
12
|
+
availableUntil: bigint;
|
|
13
|
+
}
|
|
14
|
+
export interface Rebalance {
|
|
15
|
+
nonce: bigint;
|
|
16
|
+
priceControl: PriceControl;
|
|
17
|
+
tokens: TokenRebalanceParams[];
|
|
18
|
+
limits: RebalanceLimits;
|
|
19
|
+
timestamps: RebalanceTimestamps;
|
|
20
|
+
}
|
|
21
|
+
export interface StartRebalanceArgsPartial {
|
|
22
|
+
tokens: TokenRebalanceParams[];
|
|
23
|
+
limits: RebalanceLimits;
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AuctionMetrics, OpenAuctionArgs } from "../types";
|
|
2
|
+
import { Rebalance } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Get the values needed to call Folio 6.0.0 `openAuction()`.
|
|
5
|
+
*
|
|
6
|
+
* 6.0.0 uses the same auction parameter math as 5.0.0; the on-chain ABI additionally
|
|
7
|
+
* requires an auction length. If omitted, callers should provide one before submitting.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getOpenAuction: (rebalance: Rebalance, _supply: bigint, _initialSupply: bigint, _initialAssets: bigint[] | undefined, _targetBasket: bigint[] | undefined, _assets: bigint[], _decimals: bigint[], _prices: number[], _priceError: number[], _finalStageAt: number, debug?: boolean, _auctionLength?: bigint) => [OpenAuctionArgs, AuctionMetrics];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOpenAuction = void 0;
|
|
4
|
+
const open_auction_1 = require("../5.0.0/open-auction");
|
|
5
|
+
/**
|
|
6
|
+
* Get the values needed to call Folio 6.0.0 `openAuction()`.
|
|
7
|
+
*
|
|
8
|
+
* 6.0.0 uses the same auction parameter math as 5.0.0; the on-chain ABI additionally
|
|
9
|
+
* requires an auction length. If omitted, callers should provide one before submitting.
|
|
10
|
+
*/
|
|
11
|
+
const getOpenAuction = (rebalance, _supply, _initialSupply, _initialAssets = [], _targetBasket = [], _assets, _decimals, _prices, _priceError, _finalStageAt, debug, _auctionLength) => {
|
|
12
|
+
if (_auctionLength === undefined) {
|
|
13
|
+
throw new Error("Folio 6.0.0 openAuction requires auctionLength");
|
|
14
|
+
}
|
|
15
|
+
const [openAuctionArgs, auctionMetrics] = (0, open_auction_1.getOpenAuction)(rebalance, _supply, _initialSupply, _initialAssets, _targetBasket, _assets, _decimals, _prices, _priceError, _finalStageAt, debug);
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
18
|
+
...openAuctionArgs,
|
|
19
|
+
auctionLength: _auctionLength,
|
|
20
|
+
},
|
|
21
|
+
auctionMetrics,
|
|
22
|
+
];
|
|
23
|
+
};
|
|
24
|
+
exports.getOpenAuction = getOpenAuction;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StartRebalanceArgsPartial } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Get the arguments needed to call Folio 6.0.0 startRebalance.
|
|
4
|
+
*
|
|
5
|
+
* 6.0.0 uses the same token rebalance parameter math as 5.0.0; the on-chain ABI
|
|
6
|
+
* additionally requires the expected rebalance nonce, which is supplied by the caller.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getStartRebalance: (_supply: bigint, tokens: string[], _assets: bigint[], decimals: bigint[], _targetBasket: bigint[], _prices: number[], _priceError: number[], _maxAuctionSizes: number[], weightControl: boolean, deferWeights: boolean, debug?: boolean) => StartRebalanceArgsPartial;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStartRebalance = void 0;
|
|
4
|
+
const start_rebalance_1 = require("../5.0.0/start-rebalance");
|
|
5
|
+
/**
|
|
6
|
+
* Get the arguments needed to call Folio 6.0.0 startRebalance.
|
|
7
|
+
*
|
|
8
|
+
* 6.0.0 uses the same token rebalance parameter math as 5.0.0; the on-chain ABI
|
|
9
|
+
* additionally requires the expected rebalance nonce, which is supplied by the caller.
|
|
10
|
+
*/
|
|
11
|
+
const getStartRebalance = (_supply, tokens, _assets, decimals, _targetBasket, _prices, _priceError, _maxAuctionSizes, weightControl, deferWeights, debug) => {
|
|
12
|
+
const args = (0, start_rebalance_1.getStartRebalance)(_supply, tokens, _assets, decimals, _targetBasket, _prices, _priceError, _maxAuctionSizes, weightControl, deferWeights, debug);
|
|
13
|
+
if (!deferWeights || !weightControl) {
|
|
14
|
+
return args;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
...args,
|
|
18
|
+
tokens: args.tokens.map((tokenParams, i) => ({
|
|
19
|
+
...tokenParams,
|
|
20
|
+
weight: _targetBasket[i] === 0n
|
|
21
|
+
? {
|
|
22
|
+
...tokenParams.weight,
|
|
23
|
+
spot: 0n,
|
|
24
|
+
}
|
|
25
|
+
: tokenParams.weight,
|
|
26
|
+
})),
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
exports.getStartRebalance = getStartRebalance;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Rebalance as RebalanceV5, StartRebalanceArgsPartial as StartRebalanceArgsPartialV5 } from "../types";
|
|
2
|
+
export interface Rebalance extends RebalanceV5 {
|
|
3
|
+
bidsEnabled: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface StartRebalanceArgsPartial extends StartRebalanceArgsPartialV5 {
|
|
6
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export * from "./open-auction";
|
|
|
4
4
|
export * from "./start-rebalance";
|
|
5
5
|
export * from "./utils";
|
|
6
6
|
export type { Rebalance as RebalanceV4, StartRebalanceArgsPartial as StartRebalanceArgsPartialV4, } from "./4.0.0/types";
|
|
7
|
-
export type { Rebalance as RebalanceV5, StartRebalanceArgsPartial as StartRebalanceArgsPartialV5, } from "./types";
|
|
7
|
+
export type { Rebalance as RebalanceV5, StartRebalanceArgsPartial as StartRebalanceArgsPartialV5, } from "./5.0.0/types";
|
|
8
|
+
export type { Rebalance as RebalanceV6, StartRebalanceArgsPartial as StartRebalanceArgsPartialV6, } from "./6.0.0/types";
|
package/dist/open-auction.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AuctionMetrics, FolioVersion, OpenAuctionArgs, WeightRange } from "./types";
|
|
2
2
|
import { Rebalance as Rebalance_4_0_0 } from "./4.0.0/types";
|
|
3
|
-
import { Rebalance as Rebalance_5_0_0 } from "./types";
|
|
3
|
+
import { Rebalance as Rebalance_5_0_0 } from "./5.0.0/types";
|
|
4
|
+
import { Rebalance as Rebalance_6_0_0 } from "./6.0.0/types";
|
|
4
5
|
/**
|
|
5
6
|
* Generator for the `_targetBasket` parameter
|
|
6
7
|
*
|
|
@@ -33,4 +34,4 @@ export declare const getTargetBasket: (_initialWeights: WeightRange[], _prices:
|
|
|
33
34
|
* @return OpenAuctionArgs
|
|
34
35
|
* @return AuctionMetrics
|
|
35
36
|
*/
|
|
36
|
-
export declare const getOpenAuction: (version: FolioVersion, _rebalance: Rebalance_5_0_0 | Rebalance_4_0_0, _supply: bigint, _initialSupply: bigint, _initialAssets: bigint[] | undefined, _targetBasket: bigint[] | undefined, _assets: bigint[], _decimals: bigint[], _prices: number[], _priceError: number[], _finalStageAt: number, debug?: boolean) => [OpenAuctionArgs, AuctionMetrics];
|
|
37
|
+
export declare const getOpenAuction: (version: FolioVersion, _rebalance: Rebalance_6_0_0 | Rebalance_5_0_0 | Rebalance_4_0_0, _supply: bigint, _initialSupply: bigint, _initialAssets: bigint[] | undefined, _targetBasket: bigint[] | undefined, _assets: bigint[], _decimals: bigint[], _prices: number[], _priceError: number[], _finalStageAt: number, debug?: boolean, _auctionLength?: bigint) => [OpenAuctionArgs, AuctionMetrics];
|
package/dist/open-auction.js
CHANGED
|
@@ -6,6 +6,7 @@ const numbers_1 = require("./numbers");
|
|
|
6
6
|
const types_1 = require("./types");
|
|
7
7
|
const open_auction_1 = require("./4.0.0/open-auction");
|
|
8
8
|
const open_auction_2 = require("./5.0.0/open-auction");
|
|
9
|
+
const open_auction_3 = require("./6.0.0/open-auction");
|
|
9
10
|
/**
|
|
10
11
|
* Generator for the `_targetBasket` parameter
|
|
11
12
|
*
|
|
@@ -61,20 +62,19 @@ exports.getTargetBasket = getTargetBasket;
|
|
|
61
62
|
* @return OpenAuctionArgs
|
|
62
63
|
* @return AuctionMetrics
|
|
63
64
|
*/
|
|
64
|
-
const getOpenAuction = (version, _rebalance, _supply, _initialSupply, _initialAssets = [], _targetBasket = [], _assets, _decimals, _prices, _priceError, _finalStageAt, debug) => {
|
|
65
|
+
const getOpenAuction = (version, _rebalance, _supply, _initialSupply, _initialAssets = [], _targetBasket = [], _assets, _decimals, _prices, _priceError, _finalStageAt, debug, _auctionLength) => {
|
|
65
66
|
if (debug) {
|
|
66
67
|
console.log("getOpenAuction version", version);
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
throw new Error(`unsupported version: ${version}`);
|
|
69
|
+
switch (version) {
|
|
70
|
+
case types_1.FolioVersion.V4:
|
|
71
|
+
return (0, open_auction_1.getOpenAuction)(_rebalance, _supply, _initialSupply, _initialAssets, _targetBasket, _assets, _decimals, _prices, _priceError, _finalStageAt, debug);
|
|
72
|
+
case types_1.FolioVersion.V5:
|
|
73
|
+
return (0, open_auction_2.getOpenAuction)(_rebalance, _supply, _initialSupply, _initialAssets, _targetBasket, _assets, _decimals, _prices, _priceError, _finalStageAt, debug);
|
|
74
|
+
case types_1.FolioVersion.V6:
|
|
75
|
+
return (0, open_auction_3.getOpenAuction)(_rebalance, _supply, _initialSupply, _initialAssets, _targetBasket, _assets, _decimals, _prices, _priceError, _finalStageAt, debug, _auctionLength);
|
|
76
|
+
default:
|
|
77
|
+
throw new Error(`unsupported version: ${version}`);
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
exports.getOpenAuction = getOpenAuction;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FolioVersion } from "./types";
|
|
2
2
|
import { StartRebalanceArgsPartial as StartRebalanceArgsPartial_4_0_0 } from "./4.0.0/types";
|
|
3
|
-
import { StartRebalanceArgsPartial as StartRebalanceArgsPartial_5_0_0 } from "./types";
|
|
3
|
+
import { StartRebalanceArgsPartial as StartRebalanceArgsPartial_5_0_0 } from "./5.0.0/types";
|
|
4
|
+
import { StartRebalanceArgsPartial as StartRebalanceArgsPartial_6_0_0 } from "./6.0.0/types";
|
|
4
5
|
/**
|
|
5
6
|
* Get the arguments needed to call startRebalance
|
|
6
7
|
*
|
|
@@ -18,6 +19,6 @@ import { StartRebalanceArgsPartial as StartRebalanceArgsPartial_5_0_0 } from "./
|
|
|
18
19
|
* @param weightControl TRACKING=false, NATIVE=true
|
|
19
20
|
* @param deferWeights Whether to use the full range for weights, only possible for NATIVE DTFs
|
|
20
21
|
*
|
|
21
|
-
* @return StartRebalanceArgsPartial_5_0_0 | StartRebalanceArgsPartial_4_0_0, depending on `version` enum
|
|
22
|
+
* @return StartRebalanceArgsPartial_6_0_0 | StartRebalanceArgsPartial_5_0_0 | StartRebalanceArgsPartial_4_0_0, depending on `version` enum
|
|
22
23
|
*/
|
|
23
|
-
export declare const getStartRebalance: (version: FolioVersion, _supply: bigint, tokens: string[], _assets: bigint[], decimals: bigint[], _targetBasket: bigint[], _prices: number[], _priceError: number[], _maxAuctionSizes: number[], weightControl: boolean, deferWeights: boolean, debug?: boolean) => StartRebalanceArgsPartial_5_0_0 | StartRebalanceArgsPartial_4_0_0;
|
|
24
|
+
export declare const getStartRebalance: (version: FolioVersion, _supply: bigint, tokens: string[], _assets: bigint[], decimals: bigint[], _targetBasket: bigint[], _prices: number[], _priceError: number[], _maxAuctionSizes: number[], weightControl: boolean, deferWeights: boolean, debug?: boolean) => StartRebalanceArgsPartial_6_0_0 | StartRebalanceArgsPartial_5_0_0 | StartRebalanceArgsPartial_4_0_0;
|
package/dist/start-rebalance.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.getStartRebalance = void 0;
|
|
|
4
4
|
const types_1 = require("./types");
|
|
5
5
|
const start_rebalance_1 = require("./4.0.0/start-rebalance");
|
|
6
6
|
const start_rebalance_2 = require("./5.0.0/start-rebalance");
|
|
7
|
+
const start_rebalance_3 = require("./6.0.0/start-rebalance");
|
|
7
8
|
/**
|
|
8
9
|
* Get the arguments needed to call startRebalance
|
|
9
10
|
*
|
|
@@ -21,22 +22,21 @@ const start_rebalance_2 = require("./5.0.0/start-rebalance");
|
|
|
21
22
|
* @param weightControl TRACKING=false, NATIVE=true
|
|
22
23
|
* @param deferWeights Whether to use the full range for weights, only possible for NATIVE DTFs
|
|
23
24
|
*
|
|
24
|
-
* @return StartRebalanceArgsPartial_5_0_0 | StartRebalanceArgsPartial_4_0_0, depending on `version` enum
|
|
25
|
+
* @return StartRebalanceArgsPartial_6_0_0 | StartRebalanceArgsPartial_5_0_0 | StartRebalanceArgsPartial_4_0_0, depending on `version` enum
|
|
25
26
|
*/
|
|
26
27
|
const getStartRebalance = (version, _supply, tokens, _assets, decimals, _targetBasket, _prices, _priceError, _maxAuctionSizes, weightControl, deferWeights, debug) => {
|
|
27
28
|
if (debug) {
|
|
28
|
-
console.log("
|
|
29
|
+
console.log("getStartRebalance version", version);
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
throw new Error(`unsupported version: ${version}`);
|
|
31
|
+
switch (version) {
|
|
32
|
+
case types_1.FolioVersion.V4:
|
|
33
|
+
return (0, start_rebalance_1.getStartRebalance)(_supply, tokens, _assets, decimals, _targetBasket, _prices, _priceError, weightControl, deferWeights, debug);
|
|
34
|
+
case types_1.FolioVersion.V5:
|
|
35
|
+
return (0, start_rebalance_2.getStartRebalance)(_supply, tokens, _assets, decimals, _targetBasket, _prices, _priceError, _maxAuctionSizes, weightControl, deferWeights, debug);
|
|
36
|
+
case types_1.FolioVersion.V6:
|
|
37
|
+
return (0, start_rebalance_3.getStartRebalance)(_supply, tokens, _assets, decimals, _targetBasket, _prices, _priceError, _maxAuctionSizes, weightControl, deferWeights, debug);
|
|
38
|
+
default:
|
|
39
|
+
throw new Error(`unsupported version: ${version}`);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
exports.getStartRebalance = getStartRebalance;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare enum FolioVersion {
|
|
2
2
|
V4 = 4,
|
|
3
|
-
V5 = 5
|
|
3
|
+
V5 = 5,
|
|
4
|
+
V6 = 6
|
|
4
5
|
}
|
|
5
6
|
export declare enum PriceControl {
|
|
6
7
|
NONE = 0,
|
|
@@ -83,4 +84,5 @@ export interface OpenAuctionArgs {
|
|
|
83
84
|
newWeights: WeightRange[];
|
|
84
85
|
newPrices: PriceRange[];
|
|
85
86
|
newLimits: RebalanceLimits;
|
|
87
|
+
auctionLength?: bigint;
|
|
86
88
|
}
|
package/dist/types.js
CHANGED
|
@@ -6,6 +6,7 @@ var FolioVersion;
|
|
|
6
6
|
(function (FolioVersion) {
|
|
7
7
|
FolioVersion[FolioVersion["V4"] = 4] = "V4";
|
|
8
8
|
FolioVersion[FolioVersion["V5"] = 5] = "V5";
|
|
9
|
+
FolioVersion[FolioVersion["V6"] = 6] = "V6";
|
|
9
10
|
})(FolioVersion || (exports.FolioVersion = FolioVersion = {}));
|
|
10
11
|
// === FOLIO DATA STRUCTURES ===
|
|
11
12
|
var PriceControl;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reserve-protocol/dtf-rebalance-lib",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Rebalancing library for DTFs in typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"clean": "rm -rf dist",
|
|
22
22
|
"compile": "hardhat compile",
|
|
23
|
-
"compile:dtf-artifacts": "
|
|
23
|
+
"compile:dtf-artifacts": "FOUNDRY_PROFILE=reserve-index-dtf forge build --skip script --skip test",
|
|
24
24
|
"build": "npm run clean && tsc --project tsconfig.build.json",
|
|
25
25
|
"build:internal-tools": "npm run build -w @reserve-protocol/dtf-rebalance-tools",
|
|
26
26
|
"build:tools": "npm run build:internal-tools",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
|
|
56
56
|
"@openzeppelin/contracts": "^5.3.0",
|
|
57
|
-
"@reserve-protocol/reserve-index-dtf": "github:reserve-protocol/reserve-index-dtf#
|
|
57
|
+
"@reserve-protocol/reserve-index-dtf": "github:reserve-protocol/reserve-index-dtf#e3b66635f13f3059e1762255882d4fc21c4e03df",
|
|
58
58
|
"@types/node": "^24.0.0",
|
|
59
59
|
"dotenv": "^16.5.0",
|
|
60
60
|
"hardhat": "^2.24.1",
|