@bananapus/core-v6 0.0.40 → 0.0.41

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bananapus/core-v6",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1238,7 +1238,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
1238
1238
 
1239
1239
  /// @notice Splits a token count into beneficiary and reserved portions.
1240
1240
  /// @param tokenCount The total token count, including reserved tokens.
1241
- /// @param reservedPercent The reserved percent to apply.
1241
+ /// @param reservedPercent The reserved percent to apply, out of `JBConstants.MAX_RESERVED_PERCENT`.
1242
1242
  /// @return beneficiaryTokenCount The number of tokens for the beneficiary.
1243
1243
  /// @return reservedTokenCount The number of tokens to reserve.
1244
1244
  function _splitTokenCount(
@@ -159,7 +159,7 @@ contract JBFundAccessLimits is JBControlled, IJBFundAccessLimits {
159
159
 
160
160
  /// @notice Look up how much a project can distribute (via `sendPayoutsOf`) from a specific terminal and token,
161
161
  /// denominated in a specific currency. Returns 0 if no limit is configured for that currency.
162
- /// @dev The fixed point return amount uses the same number of decimals as the terminal.
162
+ /// @dev The fixed point return amount uses the same number of decimals as the token's accounting context.
163
163
  /// @param projectId The project's ID.
164
164
  /// @param rulesetId The ruleset's ID.
165
165
  /// @param terminal The terminal the payout limit applies to.
@@ -203,7 +203,7 @@ contract JBFundAccessLimits is JBControlled, IJBFundAccessLimits {
203
203
 
204
204
  /// @notice Get all payout limits for a project's terminal and token during a ruleset. A project can have multiple
205
205
  /// payout limits denominated in different currencies (e.g. 10,000 USD + 5 ETH). Each is enforced independently.
206
- /// @dev The fixed point `amount`s returned use the same number of decimals as the terminal.
206
+ /// @dev The fixed point `amount`s returned use the same number of decimals as the token's accounting context.
207
207
  /// @param projectId The project's ID.
208
208
  /// @param rulesetId The ruleset's ID.
209
209
  /// @param terminal The terminal the payout limits apply to.
@@ -250,7 +250,7 @@ contract JBFundAccessLimits is JBControlled, IJBFundAccessLimits {
250
250
 
251
251
  /// @notice Look up how much a project's owner can withdraw from the surplus (via `useAllowanceOf`) from a specific
252
252
  /// terminal and token, denominated in a specific currency. Returns 0 if no allowance is configured.
253
- /// @dev The fixed point return amount uses the same number of decimals as the terminal.
253
+ /// @dev The fixed point return amount uses the same number of decimals as the token's accounting context.
254
254
  /// @param projectId The project's ID.
255
255
  /// @param rulesetId The ruleset's ID.
256
256
  /// @param terminal The terminal the surplus allowance applies to.
@@ -295,7 +295,7 @@ contract JBFundAccessLimits is JBControlled, IJBFundAccessLimits {
295
295
 
296
296
  /// @notice Get all surplus allowances for a project's terminal and token during a ruleset. Like payout limits, a
297
297
  /// project can have multiple surplus allowances in different currencies, each enforced independently.
298
- /// @dev The fixed point `amount`s returned use the same number of decimals as the terminal.
298
+ /// @dev The fixed point `amount`s returned use the same number of decimals as the token's accounting context.
299
299
  /// @param projectId The project's ID.
300
300
  /// @param rulesetId The ruleset's ID.
301
301
  /// @param terminal The terminal the surplus allowances apply to.
@@ -229,7 +229,8 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
229
229
  /// @dev If `shouldReturnHeldFees` is true, the added amount offsets held fees proportionally.
230
230
  /// @param projectId The ID of the project to add funds to the balance of.
231
231
  /// @param amount The amount of tokens to add to the balance, as a fixed point number with the same number of
232
- /// decimals as this terminal. If this is a native token terminal, this is ignored and `msg.value` is used instead.
232
+ /// decimals as the token's accounting context. If this is a native token terminal, this is ignored and `msg.value`
233
+ /// is used instead.
233
234
  /// @param token The token to add to the balance.
234
235
  /// @param shouldReturnHeldFees If true, return held fees proportional to the amount added.
235
236
  /// @param memo A memo to pass along to the emitted event.
@@ -266,8 +267,8 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
266
267
  /// decimals.
267
268
  /// @param tokenToReclaim The token to reclaim.
268
269
  /// @param minTokensReclaimed The minimum number of terminal tokens expected in return, as a fixed point number with
269
- /// the same number of decimals as this terminal. If the amount of tokens minted for the beneficiary would be less
270
- /// than this amount, the cash out is reverted.
270
+ /// the same number of decimals as the token's accounting context. If the amount of tokens minted for the
271
+ /// beneficiary would be less than this amount, the cash out is reverted.
271
272
  /// @param beneficiary The address to send the cashed out terminal tokens to, and to pass along to the ruleset's
272
273
  /// data hook and cash out hook if applicable.
273
274
  /// @param metadata Bytes to send along to the emitted event, as well as the data hook and cash out hook if
@@ -310,7 +311,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
310
311
  /// @param projectId The ID of the project the split belongs to.
311
312
  /// @param token The address of the token to pay to the split.
312
313
  /// @param amount The total amount to pay to the split, as a fixed point number with the same number of
313
- /// decimals as this terminal.
314
+ /// decimals as the token's accounting context.
314
315
  /// @return netPayoutAmount The amount sent to the split after subtracting fees.
315
316
  function executePayout(
316
317
  JBSplit calldata split,
@@ -572,14 +573,14 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
572
573
  /// beneficiary will receive.
573
574
  /// @param projectId The ID of the project to pay.
574
575
  /// @param amount The amount of tokens to send, as a fixed point number with the same number of
575
- /// decimals as this terminal. If this terminal's token is native, this is ignored and `msg.value` is used in its
576
- /// place.
576
+ /// decimals as the token's accounting context. If this terminal's token is native, this is ignored and `msg.value`
577
+ /// is used in its place.
577
578
  /// @param token The token to pay with.
578
579
  /// @param beneficiary The address to mint tokens to, and pass along to the ruleset's data hook and pay hook if
579
580
  /// applicable.
580
581
  /// @param minReturnedTokens The minimum number of project tokens expected in return for this payment, as a fixed
581
- /// point number with the same number of decimals as this terminal. If the amount of tokens minted for the
582
- /// beneficiary would be less than this amount, the payment is reverted.
582
+ /// point number with the same number of decimals as the token's accounting context. If the amount of tokens minted
583
+ /// for the beneficiary would be less than this amount, the payment is reverted.
583
584
  /// @param memo A memo to pass along to the emitted event.
584
585
  /// @param metadata Bytes to pass along to the emitted event, as well as the data hook and pay hook if applicable.
585
586
  /// @return beneficiaryTokenCount The number of tokens minted to the beneficiary, as a fixed point number with 18
@@ -703,13 +704,14 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
703
704
  /// exempt.
704
705
  /// @param projectId The ID of the project having its payouts sent.
705
706
  /// @param token The token to send.
706
- /// @param amount The total number of terminal tokens to send, as a fixed point number with same number of decimals
707
- /// as this terminal.
707
+ /// @param amount The total number of terminal tokens to send, as a fixed point number with the same number of
708
+ /// decimals as the token's accounting context.
708
709
  /// @param currency The expected currency of the payouts. Must match the currency of one of the
709
710
  /// project's current ruleset's payout limits.
710
711
  /// @param minTokensPaidOut The minimum number of terminal tokens that the `amount` should be worth (if expressed
711
- /// in terms of this terminal's currency), as a fixed point number with the same number of decimals as this
712
- /// terminal. If the amount of tokens paid out would be less than this amount, the send is reverted.
712
+ /// in terms of the token's accounting context currency), as a fixed point number with the same number of decimals
713
+ /// as the token's accounting context. If the amount of tokens paid out would be less than this amount, the send is
714
+ /// reverted.
713
715
  /// @return amountPaidOut The total amount paid out.
714
716
  function sendPayoutsOf(
715
717
  uint256 projectId,
@@ -735,7 +737,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
735
737
  /// @param projectId The ID of the project to use the surplus allowance of.
736
738
  /// @param token The token to pay out from the surplus.
737
739
  /// @param amount The amount of terminal tokens to use from the project's current surplus allowance, as a fixed
738
- /// point number with the same amount of decimals as this terminal.
740
+ /// point number with the same number of decimals as the token's accounting context.
739
741
  /// @param currency The expected currency of the amount to pay out. Must match the currency of one of the
740
742
  /// project's current ruleset's surplus allowances.
741
743
  /// @param minTokensPaidOut The minimum number of terminal tokens that should be returned from the surplus allowance
@@ -745,7 +747,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
745
747
  /// @param feeBeneficiary The address to send the tokens resulting from paying the fee.
746
748
  /// @param memo A memo to pass along to the emitted event.
747
749
  /// @return netAmountPaidOut The number of tokens that were sent to the beneficiary, as a fixed point number with
748
- /// the same amount of decimals as the terminal.
750
+ /// the same number of decimals as the token's accounting context.
749
751
  function useAllowanceOf(
750
752
  uint256 projectId,
751
753
  address token,
@@ -1408,8 +1410,9 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
1408
1410
  /// @param cashOutCount The number of tokens to cash out.
1409
1411
  /// @param metadata Bytes to send along to the emitted event and cash out hooks as applicable.
1410
1412
  /// @param ruleset The ruleset active during this cash out as a `JBRuleset` struct.
1411
- /// @param cashOutTaxRate The cash out tax rate influencing the reclaim amount.
1412
- /// @param beneficiary The address which will receive any terminal tokens that are cashed out.
1413
+ /// @param cashOutTaxRate The cash out tax rate influencing the reclaim amount, out of
1414
+ /// `JBConstants.MAX_CASH_OUT_TAX_RATE`. @param beneficiary The address which will receive any terminal tokens that
1415
+ /// are cashed out.
1413
1416
  /// @param specifications The hook specifications to fulfill.
1414
1417
  /// @return amountEligibleForFees The amount of funds which were allocated to cash out hooks and are eligible for
1415
1418
  /// fees.
@@ -1593,8 +1596,8 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
1593
1596
  /// @param projectId The ID of the project to pay.
1594
1597
  /// @param token The address of the token to pay the project with.
1595
1598
  /// @param amount The amount of tokens to send, as a fixed point number with the same number of
1596
- /// decimals as this terminal. If this terminal's token is the native token, `amount` is ignored and `msg.value` is
1597
- /// used in its place.
1599
+ /// decimals as the token's accounting context. If this terminal's token is the native token, `amount` is ignored
1600
+ /// and `msg.value` is used in its place.
1598
1601
  /// @param payer The address making the payment.
1599
1602
  /// @param beneficiary The address to mint tokens to, and pass along to the ruleset's data hook and pay hook if
1600
1603
  /// applicable.
@@ -1733,9 +1736,9 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
1733
1736
  /// @param projectId The project to return held fees to.
1734
1737
  /// @param token The token that the held fees are in.
1735
1738
  /// @param amount The amount to base the calculation on, as a fixed point number with the same number of decimals
1736
- /// as this terminal.
1739
+ /// as the token's accounting context.
1737
1740
  /// @return returnedFees The amount of held fees that were returned, as a fixed point number with the same number of
1738
- /// decimals as this terminal
1741
+ /// decimals as the token's accounting context.
1739
1742
  function _returnHeldFees(uint256 projectId, address token, uint256 amount) internal returns (uint256 returnedFees) {
1740
1743
  // Keep a reference to the start index.
1741
1744
  uint256 startIndex = _nextHeldFeeIndexOf[projectId][token];
@@ -1812,8 +1815,8 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
1812
1815
  /// @notice Sends payouts to a project's payout split group using the specified ruleset.
1813
1816
  /// @param projectId The ID of the project to send the payouts of.
1814
1817
  /// @param token The token to pay out.
1815
- /// @param amount The number of terminal tokens to pay out, as a fixed point number with same number of decimals as
1816
- /// this terminal.
1818
+ /// @param amount The number of terminal tokens to pay out, as a fixed point number with the same number of decimals
1819
+ /// as the token's accounting context.
1817
1820
  /// @param currency The expected currency of the amount to pay out. Must match the currency of one of the
1818
1821
  /// project's current ruleset's payout limits.
1819
1822
  /// @return amountPaidOut The total amount that was paid out.
@@ -2013,7 +2016,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
2013
2016
  /// @param owner The project's owner.
2014
2017
  /// @param token The token to pay out from the surplus.
2015
2018
  /// @param amount The amount of terminal tokens to use from the project's current surplus allowance, as a fixed
2016
- /// point number with the same amount of decimals as this terminal.
2019
+ /// point number with the same number of decimals as the token's accounting context.
2017
2020
  /// @param currency The expected currency of the amount to pay out. Must match the currency of one of the
2018
2021
  /// project's current ruleset's surplus allowances.
2019
2022
  /// @param beneficiary The address to send the funds to.
@@ -96,8 +96,9 @@ contract JBRulesets is JBControlled, IJBRulesets {
96
96
  /// replaced). When a duration ends without a queued replacement, the ruleset rolls over with decayed weight.
97
97
  /// @param weight Tokens minted per unit paid (18 decimals). Terminals divide payment amount by weight to determine
98
98
  /// issuance. A value of 1 means "inherit decayed weight from previous ruleset".
99
- /// @param weightCutPercent How much to reduce weight each auto-cycle (out of 1,000,000,000). Only applies when no
100
- /// explicit replacement is queued. 0 = no decay. 100,000,000 = 10% cut per cycle.
99
+ /// @param weightCutPercent How much to reduce weight each auto-cycle, out of
100
+ /// `JBConstants.MAX_WEIGHT_CUT_PERCENT`. Only applies when no explicit replacement is queued. 0 = no decay.
101
+ /// 100,000,000 = 10% cut per cycle.
101
102
  /// @param approvalHook A contract that gates whether the *next* queued ruleset can take effect (e.g. `JBDeadline`
102
103
  /// for minimum notice periods). Set to address(0) for no approval gate.
103
104
  /// @param metadata Packed 256-bit field decoded by `JBRulesetMetadataResolver`. Not used by `JBRulesets` itself.
@@ -614,7 +615,8 @@ contract JBRulesets is JBControlled, IJBRulesets {
614
615
  /// @param baseRulesetStart The start time of the base ruleset.
615
616
  /// @param baseRulesetDuration The duration of the base ruleset.
616
617
  /// @param baseRulesetWeight The weight of the base ruleset.
617
- /// @param baseRulesetWeightCutPercent The weight cut percent of the base ruleset.
618
+ /// @param baseRulesetWeightCutPercent The weight cut percent of the base ruleset, out of
619
+ /// `JBConstants.MAX_WEIGHT_CUT_PERCENT`.
618
620
  /// @param baseRulesetCacheId The ID of the ruleset to base the calculation on (the previous ruleset).
619
621
  /// @param start The start time of the ruleset to derive a weight for.
620
622
  /// @return weight The derived weight, as a fixed point number with 18 decimals.
@@ -16,7 +16,7 @@ interface IJBCashOutTerminal is IJBTerminal {
16
16
  /// @param holder The address whose tokens were cashed out.
17
17
  /// @param beneficiary The address that received the reclaimed funds.
18
18
  /// @param cashOutCount The number of tokens cashed out.
19
- /// @param cashOutTaxRate The cash out tax rate applied.
19
+ /// @param cashOutTaxRate The cash out tax rate applied, out of `JBConstants.MAX_CASH_OUT_TAX_RATE`.
20
20
  /// @param reclaimAmount The amount of funds reclaimed.
21
21
  /// @param metadata Extra metadata associated with the cash out.
22
22
  /// @param caller The address that called the cash out function.
@@ -69,7 +69,7 @@ interface IJBController is IERC165, IJBProjectUriRegistry, IJBDirectoryAccessCon
69
69
  /// @param tokenCount The total number of tokens minted, including reserved tokens.
70
70
  /// @param beneficiaryTokenCount The number of tokens minted for the beneficiary.
71
71
  /// @param memo A memo associated with the mint.
72
- /// @param reservedPercent The reserved percent applied to the mint.
72
+ /// @param reservedPercent The reserved percent applied to the mint, out of `JBConstants.MAX_RESERVED_PERCENT`.
73
73
  /// @param caller The address that called the mint function.
74
74
  event MintTokens(
75
75
  address indexed beneficiary,
@@ -22,7 +22,8 @@ interface IJBRulesets {
22
22
  /// @param projectId The ID of the project the ruleset was queued for.
23
23
  /// @param duration The duration of the ruleset in seconds.
24
24
  /// @param weight The weight of the ruleset.
25
- /// @param weightCutPercent The percent by which the weight decreases each cycle.
25
+ /// @param weightCutPercent The percent by which the weight decreases each cycle, out of
26
+ /// `JBConstants.MAX_WEIGHT_CUT_PERCENT`.
26
27
  /// @param approvalHook The approval hook for the ruleset.
27
28
  /// @param metadata The packed ruleset metadata.
28
29
  /// @param mustStartAtOrAfter The earliest time the ruleset can start.
@@ -89,7 +90,8 @@ interface IJBRulesets {
89
90
  /// @param baseRulesetStart The start time of the base ruleset.
90
91
  /// @param baseRulesetDuration The duration of the base ruleset.
91
92
  /// @param baseRulesetWeight The weight of the base ruleset.
92
- /// @param baseRulesetWeightCutPercent The weight cut percent of the base ruleset.
93
+ /// @param baseRulesetWeightCutPercent The weight cut percent of the base ruleset, out of
94
+ /// `JBConstants.MAX_WEIGHT_CUT_PERCENT`.
93
95
  /// @param baseRulesetCacheId The cache ID of the base ruleset.
94
96
  /// @param start The start time to derive the weight for.
95
97
  /// @return weight The derived weight.
@@ -150,7 +152,8 @@ interface IJBRulesets {
150
152
  /// @param projectId The ID of the project to queue the ruleset for.
151
153
  /// @param duration The duration of the ruleset in seconds.
152
154
  /// @param weight The weight of the ruleset.
153
- /// @param weightCutPercent The percent by which the weight decreases each cycle.
155
+ /// @param weightCutPercent The percent by which the weight decreases each cycle, out of
156
+ /// `JBConstants.MAX_WEIGHT_CUT_PERCENT`.
154
157
  /// @param approvalHook The approval hook for the ruleset.
155
158
  /// @param metadata The packed ruleset metadata.
156
159
  /// @param mustStartAtOrAfter The earliest time the ruleset can start.
@@ -20,7 +20,7 @@ library JBCashOuts {
20
20
  /// @param surplus The total amount of surplus terminal tokens.
21
21
  /// @param cashOutCount The number of tokens to cash out, as a fixed point number with 18 decimals.
22
22
  /// @param totalSupply The total token supply, as a fixed point number with 18 decimals.
23
- /// @param cashOutTaxRate The current ruleset's cash out tax rate.
23
+ /// @param cashOutTaxRate The current ruleset's cash out tax rate, out of `JBConstants.MAX_CASH_OUT_TAX_RATE`.
24
24
  /// @return reclaimableSurplus The amount of surplus tokens that can be reclaimed.
25
25
  function cashOutFrom(
26
26
  uint256 surplus,
@@ -64,7 +64,7 @@ library JBCashOuts {
64
64
  /// @param surplus The total amount of surplus terminal tokens.
65
65
  /// @param desiredOutput The minimum amount of surplus tokens the caller wants to receive.
66
66
  /// @param totalSupply The total token supply, as a fixed point number with 18 decimals.
67
- /// @param cashOutTaxRate The current ruleset's cash out tax rate.
67
+ /// @param cashOutTaxRate The current ruleset's cash out tax rate, out of `JBConstants.MAX_CASH_OUT_TAX_RATE`.
68
68
  /// @return count The minimum number of tokens to cash out.
69
69
  function minCashOutCountFor(
70
70
  uint256 surplus,
@@ -7,7 +7,8 @@ import {JBTokenAmount} from "./JBTokenAmount.sol";
7
7
  /// @custom:member projectId The ID of the project to cash out from.
8
8
  /// @custom:member rulesetId The ID of the ruleset the cash out is made during.
9
9
  /// @custom:member cashOutCount The number of project tokens to cash out.
10
- /// @custom:member cashOutTaxRate The current ruleset's cash out tax rate.
10
+ /// @custom:member cashOutTaxRate The current ruleset's cash out tax rate, out of
11
+ /// `JBConstants.MAX_CASH_OUT_TAX_RATE`.
11
12
  /// @custom:member reclaimedAmount The token amount reclaimed from the project's terminal balance. Includes the
12
13
  /// token
13
14
  /// reclaimed, the value, the number of decimals included, and the currency of the amount.
@@ -15,7 +15,8 @@ import {JBTokenAmount} from "./JBTokenAmount.sol";
15
15
  /// Includes the token of the surplus, the surplus value, the number of decimals
16
16
  /// included, and the currency of the surplus.
17
17
  /// @custom:member useTotalSurplus If true, use surplus across all of a project's terminals when calculating cash outs.
18
- /// @custom:member cashOutTaxRate The cash out tax rate of the ruleset the cash out is made during.
18
+ /// @custom:member cashOutTaxRate The cash out tax rate of the ruleset the cash out is made during, out of
19
+ /// `JBConstants.MAX_CASH_OUT_TAX_RATE`.
19
20
  /// @custom:member beneficiaryIsFeeless Whether the cash out's beneficiary is a feeless address. Useful for data hooks
20
21
  /// that charge their own fees — they can skip fees when value stays in the protocol (e.g. project-to-project
21
22
  /// routing).
@@ -13,7 +13,8 @@ import {JBTokenAmount} from "./JBTokenAmount.sol";
13
13
  /// @custom:member beneficiary The specified address that should be the beneficiary of anything that this payment
14
14
  /// yields.
15
15
  /// @custom:member weight The weight of the ruleset during which the payment is made.
16
- /// @custom:member reservedPercent The reserved percent of the ruleset the payment is made during.
16
+ /// @custom:member reservedPercent The reserved percent of the ruleset the payment is made during, out of
17
+ /// `JBConstants.MAX_RESERVED_PERCENT`.
17
18
  /// @custom:member metadata Extra data specified by the payer.
18
19
  struct JBBeforePayRecordedContext {
19
20
  address terminal;
@@ -2,7 +2,7 @@
2
2
  pragma solidity ^0.8.0;
3
3
 
4
4
  /// @custom:member amount The total amount the fee was taken from, as a fixed point number with the same number of
5
- /// decimals as the terminal in which this struct was created.
5
+ /// decimals as the token's accounting context.
6
6
  /// @custom:member beneficiary The address that will receive the tokens that are minted as a result of the fee payment.
7
7
  /// @custom:member unlockTimestamp The timestamp at which the fee is unlocked and can be processed.
8
8
  struct JBFee {
@@ -15,8 +15,9 @@ import {IJBRulesetApprovalHook} from "./../interfaces/IJBRulesetApprovalHook.sol
15
15
  /// @custom:member duration How many seconds the ruleset lasts. 0 = no auto-cycling (must be explicitly replaced).
16
16
  /// @custom:member weight Tokens minted per unit paid (18 decimals). The terminal divides payment amount by weight to
17
17
  /// determine token issuance. Higher weight = more tokens per unit of payment.
18
- /// @custom:member weightCutPercent How much to reduce weight each cycle (out of 1,000,000,000). 100,000,000 = 10% cut
19
- /// per cycle. 0 = no decay. Only applies when a cycle auto-rolls without an explicitly queued replacement.
18
+ /// @custom:member weightCutPercent How much to reduce weight each cycle, out of
19
+ /// `JBConstants.MAX_WEIGHT_CUT_PERCENT`. 100,000,000 = 10% cut per cycle. 0 = no decay. Only applies when a cycle
20
+ /// auto-rolls without an explicitly queued replacement.
20
21
  /// @custom:member approvalHook A contract that gates whether queued rulesets can take effect (e.g. `JBDeadline` for
21
22
  /// minimum notice periods). If the hook rejects a queued ruleset, the current one continues.
22
23
  /// @custom:member metadata Packed 256-bit field containing reservedPercent, cashOutTaxRate, baseCurrency, boolean
@@ -14,7 +14,8 @@ import {JBSplitGroup} from "./JBSplitGroup.sol";
14
14
  /// @custom:member duration How long the ruleset lasts in seconds. 0 = stays active until explicitly replaced.
15
15
  /// @custom:member weight Tokens minted per unit of payment (18 decimals). Pass 1 to inherit decayed weight from the
16
16
  /// previous ruleset. Pass 0 for no token issuance.
17
- /// @custom:member weightCutPercent Decay rate per cycle (out of 1,000,000,000). 100,000,000 = 10% cut. 0 = no decay.
17
+ /// @custom:member weightCutPercent Decay rate per cycle, out of `JBConstants.MAX_WEIGHT_CUT_PERCENT`. 100,000,000 =
18
+ /// 10% cut. 0 = no decay.
18
19
  /// @custom:member approvalHook Contract that must approve the *next* queued ruleset for it to take effect.
19
20
  /// @custom:member metadata The ruleset's behavioral flags and parameters (see `JBRulesetMetadata`).
20
21
  /// @custom:member splitGroups How payouts and reserved tokens are distributed during this ruleset.
@@ -3,10 +3,11 @@ pragma solidity ^0.8.0;
3
3
 
4
4
  /// @notice Human-readable configuration for a ruleset's behavioral flags and parameters. This struct is packed into
5
5
  /// 256 bits for on-chain storage (see `JBRulesetMetadataResolver` for the packing layout).
6
- /// @custom:member reservedPercent Percentage of newly minted tokens set aside for the reserved token split group
7
- /// (0–10,000 basis points). 5,000 = 50% reserved.
8
- /// @custom:member cashOutTaxRate Tax applied when holders cash out tokens (0–10,000 basis points). Higher rate = less
9
- /// reclaim per token. 0 = proportional, 10,000 = no reclaim (100% tax).
6
+ /// @custom:member reservedPercent Percentage of newly minted tokens set aside for the reserved token split group,
7
+ /// out of `JBConstants.MAX_RESERVED_PERCENT`. 5,000 = 50% reserved.
8
+ /// @custom:member cashOutTaxRate Tax applied when holders cash out tokens, out of
9
+ /// `JBConstants.MAX_CASH_OUT_TAX_RATE`. Higher rate = less reclaim per token. 0 = proportional, 10,000 = no reclaim
10
+ /// (100% tax).
10
11
  /// @custom:member baseCurrency The currency used to interpret the ruleset's weight for token issuance. Convention:
11
12
  /// `uint32(uint160(tokenAddress))` for tokens, or `JBCurrencyIds.ETH`/`JBCurrencyIds.USD` for well-known currencies.
12
13
  /// @custom:member pausePay If `true`, the project cannot receive payments during this ruleset.