@bananapus/core-v6 0.0.38 → 0.0.40

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.
Files changed (56) hide show
  1. package/foundry.toml +1 -1
  2. package/package.json +1 -1
  3. package/src/JBChainlinkV3PriceFeed.sol +4 -1
  4. package/src/JBChainlinkV3SequencerPriceFeed.sol +4 -2
  5. package/src/JBController.sol +67 -58
  6. package/src/JBDeadline.sol +4 -4
  7. package/src/JBDirectory.sol +38 -36
  8. package/src/JBERC20.sol +10 -9
  9. package/src/JBFeelessAddresses.sol +6 -3
  10. package/src/JBFundAccessLimits.sol +26 -22
  11. package/src/JBMultiTerminal.sol +128 -125
  12. package/src/JBPermissions.sol +35 -38
  13. package/src/JBPrices.sol +25 -20
  14. package/src/JBProjects.sol +6 -3
  15. package/src/JBRulesets.sol +45 -42
  16. package/src/JBSplits.sol +19 -17
  17. package/src/JBTerminalStore.sol +57 -50
  18. package/src/JBTokens.sol +42 -32
  19. package/src/abstract/JBControlled.sol +3 -1
  20. package/src/abstract/JBPermissioned.sol +3 -1
  21. package/src/enums/JBApprovalStatus.sol +7 -1
  22. package/src/interfaces/IJBCashOutTerminal.sol +5 -5
  23. package/src/interfaces/IJBController.sol +13 -12
  24. package/src/interfaces/IJBDirectory.sol +3 -1
  25. package/src/interfaces/IJBMigratable.sol +5 -5
  26. package/src/interfaces/IJBMultiTerminal.sol +3 -2
  27. package/src/interfaces/IJBPayoutTerminal.sol +3 -3
  28. package/src/interfaces/IJBPermissions.sol +6 -5
  29. package/src/interfaces/IJBPermitTerminal.sol +1 -1
  30. package/src/interfaces/IJBPrices.sol +7 -5
  31. package/src/interfaces/IJBRulesets.sol +2 -1
  32. package/src/interfaces/IJBSplits.sol +2 -1
  33. package/src/interfaces/IJBTerminal.sol +13 -11
  34. package/src/interfaces/IJBTerminalStore.sol +23 -21
  35. package/src/interfaces/IJBTokens.sol +8 -7
  36. package/src/libraries/JBCashOuts.sol +8 -3
  37. package/src/libraries/JBConstants.sol +12 -3
  38. package/src/libraries/JBCurrencyIds.sol +2 -0
  39. package/src/libraries/JBFees.sol +5 -1
  40. package/src/libraries/JBFixedPointNumber.sol +2 -0
  41. package/src/libraries/JBPayoutSplitGroupLib.sol +10 -7
  42. package/src/libraries/JBRulesetMetadataResolver.sol +4 -0
  43. package/src/libraries/JBSplitGroupIds.sol +2 -1
  44. package/src/libraries/JBSurplus.sol +4 -2
  45. package/src/periphery/JBMatchingPriceFeed.sol +2 -0
  46. package/src/structs/JBAccountingContext.sol +7 -4
  47. package/src/structs/JBAfterCashOutRecordedContext.sol +8 -8
  48. package/src/structs/JBAfterPayRecordedContext.sol +5 -5
  49. package/src/structs/JBBeforeCashOutRecordedContext.sol +7 -7
  50. package/src/structs/JBBeforePayRecordedContext.sol +5 -5
  51. package/src/structs/JBFundAccessLimitGroup.sol +10 -17
  52. package/src/structs/JBPermissionsData.sol +3 -3
  53. package/src/structs/JBRuleset.sol +18 -26
  54. package/src/structs/JBRulesetConfig.sol +13 -25
  55. package/src/structs/JBRulesetMetadata.sol +25 -32
  56. package/src/structs/JBSplitHookContext.sol +2 -2
@@ -4,12 +4,12 @@ pragma solidity ^0.8.0;
4
4
  import {JBTokenAmount} from "./JBTokenAmount.sol";
5
5
 
6
6
  /// @custom:member payer The address the payment originated from.
7
- /// @custom:member projectId The ID of the project being paid.
8
- /// @custom:member rulesetId The ID of the ruleset the payment is being made during.
9
- /// @custom:member amount The payment's token amount. Includes the token being paid, the value, the number of decimals
7
+ /// @custom:member projectId The ID of the project to pay.
8
+ /// @custom:member rulesetId The ID of the ruleset the payment is made during.
9
+ /// @custom:member amount The payment's token amount. Includes the token paid, the value, the number of decimals
10
10
  /// included, and the currency of the amount.
11
- /// @custom:member forwardedAmount The token amount being forwarded to the pay hook. Includes the token
12
- /// being paid, the value, the number of decimals included, and the currency of the amount.
11
+ /// @custom:member forwardedAmount The token amount forwarded to the pay hook. Includes the token
12
+ /// paid, the value, the number of decimals included, and the currency of the amount.
13
13
  /// @custom:member weight The current ruleset's weight (used to determine how many tokens should be minted).
14
14
  /// @custom:member newlyIssuedTokenCount The number of project tokens minted for the beneficiary.
15
15
  /// @custom:member beneficiary The address which receives any tokens this payment yields.
@@ -5,17 +5,17 @@ import {JBTokenAmount} from "./JBTokenAmount.sol";
5
5
 
6
6
  /// @notice Context sent from the terminal to the ruleset's data hook upon cash out.
7
7
  /// @custom:member terminal The terminal that is facilitating the cash out.
8
- /// @custom:member holder The holder of the tokens being cashed out.
9
- /// @custom:member projectId The ID of the project whose tokens are being cashed out.
10
- /// @custom:member rulesetId The ID of the ruleset the cash out is being made during.
11
- /// @custom:member cashOutCount The number of tokens being cashed out, as a fixed point number with 18 decimals.
12
- /// @custom:member totalSupply The total token supply being used for the calculation, as a fixed point number with 18
8
+ /// @custom:member holder The holder of the tokens to cash out.
9
+ /// @custom:member projectId The ID of the project cashing out tokens.
10
+ /// @custom:member rulesetId The ID of the ruleset the cash out is made during.
11
+ /// @custom:member cashOutCount The number of tokens to cash out, as a fixed point number with 18 decimals.
12
+ /// @custom:member totalSupply The total token supply to use for the calculation, as a fixed point number with 18
13
13
  /// decimals.
14
14
  /// @custom:member surplus The surplus amount used for the calculation, as a fixed point number with 18 decimals.
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
- /// @custom:member useTotalSurplus If surplus across all of a project's terminals is being used when making cash outs.
18
- /// @custom:member cashOutTaxRate The cash out tax rate of the ruleset the cash out is being made during.
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.
19
19
  /// @custom:member beneficiaryIsFeeless Whether the cash out's beneficiary is a feeless address. Useful for data hooks
20
20
  /// that charge their own fees — they can skip fees when value stays in the protocol (e.g. project-to-project
21
21
  /// routing).
@@ -6,14 +6,14 @@ import {JBTokenAmount} from "./JBTokenAmount.sol";
6
6
  /// @notice Context sent from the terminal to the ruleset's data hook upon payment.
7
7
  /// @custom:member terminal The terminal that is facilitating the payment.
8
8
  /// @custom:member payer The address that the payment originated from.
9
- /// @custom:member amount The payment's token amount, including the token being paid, the value, the number of decimals
9
+ /// @custom:member amount The payment's token amount, including the token paid, the value, the number of decimals
10
10
  /// included, and the currency of the amount.
11
- /// @custom:member projectId The ID of the project being paid.
12
- /// @custom:member rulesetId The ID of the ruleset the payment is being made during.
11
+ /// @custom:member projectId The ID of the project to pay.
12
+ /// @custom:member rulesetId The ID of the ruleset the payment is made during.
13
13
  /// @custom:member beneficiary The specified address that should be the beneficiary of anything that this payment
14
14
  /// yields.
15
- /// @custom:member weight The weight of the ruleset during which the payment is being made.
16
- /// @custom:member reservedPercent The reserved percent of the ruleset the payment is being made during.
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.
17
17
  /// @custom:member metadata Extra data specified by the payer.
18
18
  struct JBBeforePayRecordedContext {
19
19
  address terminal;
@@ -3,23 +3,16 @@ pragma solidity ^0.8.0;
3
3
 
4
4
  import {JBCurrencyAmount} from "./JBCurrencyAmount.sol";
5
5
 
6
- /// @dev Payout limit example: if the `amount` is 5, the `currency` is 1 (USD), and the terminal's token is ETH, then
7
- /// the project can pay out 5 USD worth of ETH during a ruleset.
8
- /// @dev Surplus allowance example: if the `amount` is 5, the `currency` is 1 (USD), and the terminal's token is ETH,
9
- /// then the project can pay out 5 USD worth of ETH from its surplus during a ruleset. A project's surplus is its
10
- /// balance minus its current combined payout limit.
11
- /// @dev If a project has multiple payout limits or surplus allowances, they are all available. They can all be used
12
- /// during a single ruleset.
13
- /// @dev The payout limits' and surplus allowances' fixed point amounts have the same number of decimals as the
14
- /// terminal.
15
- /// @custom:member terminal The terminal that the payout limits and surplus allowances apply to.
16
- /// @custom:member token The token that the payout limits and surplus allowances apply to within the `terminal`.
17
- /// @custom:member payoutLimits An array of payout limits. The payout limits cumulatively dictate the maximum value of
18
- /// `token`s a project can pay out from its balance in a terminal during a ruleset. Each payout limit can have a unique
19
- /// currency and amount.
20
- /// @custom:member surplusAllowances An array of surplus allowances. The surplus allowances cumulatively dictates the
21
- /// maximum value of `token`s a project can pay out from its surplus (balance less payouts) in a terminal during a
22
- /// ruleset. Each surplus allowance can have a unique currency and amount.
6
+ /// @notice Defines how much a project can withdraw from a specific terminal and token each funding cycle.
7
+ /// @dev Example — payout limit of 5 USD in an ETH terminal: the project can distribute up to 5 USD worth of ETH to
8
+ /// its splits per cycle. Example surplus allowance of 5 USD: the project owner can pull up to 5 USD worth of ETH
9
+ /// from the surplus (balance above payout limits).
10
+ /// @dev Multiple limits in different currencies are additive — each can be used independently within one cycle.
11
+ /// @dev Amounts use the same decimal precision as the terminal token (e.g. 18 for ETH, 6 for USDC).
12
+ /// @custom:member terminal The terminal address these limits apply to.
13
+ /// @custom:member token The token address within that terminal these limits apply to.
14
+ /// @custom:member payoutLimits Maximum amounts distributable to splits per cycle, each in a specific currency.
15
+ /// @custom:member surplusAllowances Maximum amounts withdrawable from surplus per cycle, each in a specific currency.
23
16
  struct JBFundAccessLimitGroup {
24
17
  address terminal;
25
18
  address token;
@@ -1,11 +1,11 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  pragma solidity ^0.8.0;
3
3
 
4
- /// @custom:member operator The address that permissions are being given to.
5
- /// @custom:member projectId The ID of the project the operator is being given permissions for. Operators only have
4
+ /// @custom:member operator The address to give permissions to.
5
+ /// @custom:member projectId The ID of the project to give the operator permissions for. Operators only have
6
6
  /// permissions under this project's scope. An ID of 0 is a wildcard, which gives an operator permissions across all
7
7
  /// projects.
8
- /// @custom:member permissionIds The IDs of the permissions being given. See the `JBPermissionIds` library.
8
+ /// @custom:member permissionIds The IDs of the permissions to grant. See the `JBPermissionIds` library.
9
9
  struct JBPermissionsData {
10
10
  address operator;
11
11
  uint64 projectId;
@@ -3,32 +3,24 @@ pragma solidity ^0.8.0;
3
3
 
4
4
  import {IJBRulesetApprovalHook} from "./../interfaces/IJBRulesetApprovalHook.sol";
5
5
 
6
- /// @dev `JBRuleset` timestamps are unix timestamps (seconds since 00:00 January 1st, 1970 UTC).
7
- /// @custom:member cycleNumber The ruleset's cycle number. Each ruleset's `cycleNumber` is the previous ruleset's
8
- /// `cycleNumber` plus one. Each project's first ruleset has a `cycleNumber` of 1.
9
- /// @custom:member id The ruleset's ID, which is a timestamp of when this ruleset's rules were initialized. The
10
- /// `rulesetId` stays the same for rulesets that automatically cycle over from a manually queued ruleset.
11
- /// @custom:member basedOnId The `rulesetId` of the ruleset which was active when this ruleset was created.
12
- /// @custom:member start The timestamp from which this ruleset is considered active.
13
- /// @custom:member duration The number of seconds the ruleset lasts for. After this duration, a new ruleset will start.
14
- /// The project owner can queue new rulesets at any time, which will take effect once the current ruleset's duration is
15
- /// over. If the `duration` is 0, newly queued rulesets will take effect immediately. If a ruleset ends and there are no
16
- /// new rulesets queued, the current ruleset cycles over to another one with the same properties but a new `start`
17
- /// timestamp and a `weight` reduced by the ruleset's `weightCutPercent`.
18
- /// @custom:member weight A fixed point number with 18 decimals which is typically used by payment terminals to
19
- /// determine how many tokens should be minted when a payment is received. This can be used by other contracts for
20
- /// arbitrary calculations.
21
- /// @custom:member weightCutPercent The percentage by which to reduce the `weight` each time a new ruleset starts.
22
- /// `weight`
23
- /// is
24
- /// a percentage out of `JBConstants.MAX_WEIGHT_CUT_PERCENT`. If it's 0, the next ruleset will have the same `weight` by
25
- /// default. If it's 90%, the next ruleset's `weight` will be 10% smaller. If a ruleset explicitly sets a new `weight`,
26
- /// the `weightCutPercent` doesn't apply.
27
- /// @custom:member approvalHook An address of a contract that says whether a queued ruleset should be approved or
28
- /// rejected. If a
29
- /// ruleset is rejected, it won't go into effect. An approval hook can be used to create rules which dictate how a
30
- /// project owner can change their ruleset over time.
31
- /// @custom:member metadata Extra data associated with a ruleset which can be used by other contracts.
6
+ /// @notice A ruleset defines how a project behaves during a period of time — token issuance rate, cash-out terms,
7
+ /// payout rules, and permissions. Rulesets cycle automatically: when one expires, the next queued (and approved) one
8
+ /// takes effect. If nothing is queued, the current ruleset auto-cycles with decayed weight.
9
+ /// @dev Timestamps are unix timestamps (seconds since epoch).
10
+ /// @custom:member cycleNumber Which cycle this is (starts at 1, increments each cycle).
11
+ /// @custom:member id The ruleset's ID the unix timestamp when it was first stored. Stays the same across
12
+ /// auto-cycles.
13
+ /// @custom:member basedOnId The ID of the ruleset that was active when this one was created (forms a linked list).
14
+ /// @custom:member start When this ruleset became/becomes active.
15
+ /// @custom:member duration How many seconds the ruleset lasts. 0 = no auto-cycling (must be explicitly replaced).
16
+ /// @custom:member weight Tokens minted per unit paid (18 decimals). The terminal divides payment amount by weight to
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.
20
+ /// @custom:member approvalHook A contract that gates whether queued rulesets can take effect (e.g. `JBDeadline` for
21
+ /// minimum notice periods). If the hook rejects a queued ruleset, the current one continues.
22
+ /// @custom:member metadata Packed 256-bit field containing reservedPercent, cashOutTaxRate, baseCurrency, boolean
23
+ /// flags, data hook address, and custom metadata. Decoded by `JBRulesetMetadataResolver`.
32
24
  struct JBRuleset {
33
25
  uint48 cycleNumber;
34
26
  uint48 id;
@@ -6,31 +6,19 @@ import {JBFundAccessLimitGroup} from "./JBFundAccessLimitGroup.sol";
6
6
  import {JBRulesetMetadata} from "./JBRulesetMetadata.sol";
7
7
  import {JBSplitGroup} from "./JBSplitGroup.sol";
8
8
 
9
- /// @custom:member mustStartAtOrAfter The earliest time the ruleset can start.
10
- /// @custom:member duration The number of seconds the ruleset lasts for, after which a new ruleset will start. A
11
- /// duration of 0 means that the ruleset will stay active until the project owner explicitly issues a reconfiguration,
12
- /// at which point a new ruleset will immediately start with the updated properties. If the duration is greater than 0,
13
- /// a project owner cannot make changes to a ruleset's parameters while it is active – any proposed changes will apply
14
- /// to the subsequent ruleset. If no changes are proposed, a ruleset rolls over to another one with the same properties
15
- /// but new `start` timestamp and a cut `weight`.
16
- /// @custom:member weight A fixed point number with 18 decimals that contracts can use to base arbitrary calculations
17
- /// on. For example, payment terminals can use this to determine how many tokens should be minted when a payment is
18
- /// received.
19
- /// @custom:member weightCutPercent A percent by how much the `weight` of the subsequent ruleset should be reduced, if
20
- /// the
21
- /// project owner hasn't queued the subsequent ruleset with an explicit `weight`. If it's 0, each ruleset will have
22
- /// equal weight. If the number is 90%, the next ruleset will have a 10% smaller weight. This weight is out of
23
- /// `JBConstants.MAX_WEIGHT_CUT_PERCENT`.
24
- /// @custom:member approvalHook An address of a contract that says whether a proposed ruleset should be accepted or
25
- /// rejected. It
26
- /// can be used to create rules around how a project owner can change ruleset parameters over time.
27
- /// @custom:member metadata Metadata specifying the controller-specific parameters that a ruleset can have. These
28
- /// properties cannot change until the next ruleset starts.
29
- /// @custom:member splitGroups An array of splits to use for any number of groups while the ruleset is active.
30
- /// @custom:member fundAccessLimitGroups An array of structs which dictate the amount of funds a project can access from
31
- /// its balance in each payment terminal while the ruleset is active. Amounts are fixed point numbers using the same
32
- /// number of decimals as the corresponding terminal. The `_payoutLimit` and `_surplusAllowance` parameters must fit in
33
- /// a `uint232`.
9
+ /// @notice The configuration passed to `JBController.launchRulesetsFor` or `queueRulesetsOf` to define a new ruleset.
10
+ /// Includes the economic parameters (weight, duration, decay), the metadata (permissions and hooks), the split
11
+ /// recipients, and the fund access limits.
12
+ /// @custom:member mustStartAtOrAfter The earliest timestamp the ruleset can begin. Pass 0 to start immediately after
13
+ /// the previous ruleset ends.
14
+ /// @custom:member duration How long the ruleset lasts in seconds. 0 = stays active until explicitly replaced.
15
+ /// @custom:member weight Tokens minted per unit of payment (18 decimals). Pass 1 to inherit decayed weight from the
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.
18
+ /// @custom:member approvalHook Contract that must approve the *next* queued ruleset for it to take effect.
19
+ /// @custom:member metadata The ruleset's behavioral flags and parameters (see `JBRulesetMetadata`).
20
+ /// @custom:member splitGroups How payouts and reserved tokens are distributed during this ruleset.
21
+ /// @custom:member fundAccessLimitGroups How much the project can withdraw from each terminal per cycle.
34
22
  struct JBRulesetConfig {
35
23
  uint48 mustStartAtOrAfter;
36
24
  uint32 duration;
@@ -1,38 +1,31 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  pragma solidity ^0.8.0;
3
3
 
4
- /// @custom:member reservedPercent The reserved percent of the ruleset. This number is a percentage calculated out of
5
- /// `JBConstants.MAX_RESERVED_PERCENT`.
6
- /// @custom:member cashOutTaxRate The cash out tax rate of the ruleset. This number is a percentage calculated out of
7
- /// `JBConstants.MAX_CASH_OUT_TAX_RATE`.
8
- /// @custom:member baseCurrency The currency on which to base the ruleset's weight. By convention, this is
9
- /// `uint32(uint160(tokenAddress))` for tokens, or a constant ID from e.g. `JBCurrencyIds` for other currencies.
10
- /// @custom:member pausePay A flag indicating if the pay functionality should be paused during the ruleset.
11
- /// @custom:member pauseCreditTransfers A flag indicating if the project token transfer functionality should be paused
12
- /// during the funding cycle.
13
- /// @custom:member allowOwnerMinting A flag indicating if the project owner or an operator with the `MINT_TOKENS`
14
- /// permission from the owner should be allowed to mint project tokens on demand during this ruleset.
15
- /// @custom:member allowTerminalMigration A flag indicating if migrating terminals should be allowed during this
16
- /// ruleset.
17
- /// @custom:member allowSetTerminals A flag indicating if a project's terminals can be added or removed.
18
- /// @custom:member allowSetController A flag indicating if a project's controller can be changed.
19
- /// @custom:member allowAddAccountingContext A flag indicating if a project can add new accounting contexts for its
20
- /// terminals to use.
21
- /// @custom:member allowAddPriceFeed A flag indicating if a project can add new price feeds to calculate exchange rates
22
- /// between its tokens.
23
- /// @custom:member ownerMustSendPayouts A flag indicating if privileged payout distribution should be
24
- /// enforced, otherwise payouts can be distributed by anyone.
25
- /// @custom:member holdFees A flag indicating if fees should be held during this ruleset.
26
- /// @custom:member useTotalSurplusForCashOuts A flag indicating if cash outs should use the project's balance held
27
- /// in all terminals instead of the project's local terminal balance from which the cash out is being fulfilled.
28
- /// @custom:member useDataHookForPay A flag indicating if the data hook should be used for pay transactions during this
29
- /// ruleset.
30
- /// @custom:member useDataHookForCashOut A flag indicating if the data hook should be used for cash out transactions
31
- /// during
32
- /// this ruleset.
33
- /// @custom:member dataHook The data hook to use during this ruleset.
34
- /// @custom:member metadata Metadata of the metadata, only the 14 least significant bits can be used, the 2 most
35
- /// significant bits are disregarded.
4
+ /// @notice Human-readable configuration for a ruleset's behavioral flags and parameters. This struct is packed into
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).
10
+ /// @custom:member baseCurrency The currency used to interpret the ruleset's weight for token issuance. Convention:
11
+ /// `uint32(uint160(tokenAddress))` for tokens, or `JBCurrencyIds.ETH`/`JBCurrencyIds.USD` for well-known currencies.
12
+ /// @custom:member pausePay If `true`, the project cannot receive payments during this ruleset.
13
+ /// @custom:member pauseCreditTransfers If `true`, token credit transfers are disabled during this ruleset.
14
+ /// @custom:member allowOwnerMinting If `true`, the project owner (or MINT_TOKENS operator) can mint tokens on demand.
15
+ /// @custom:member allowSetCustomToken If `true`, the project can set a custom ERC-20 token via `setTokenFor`.
16
+ /// @custom:member allowTerminalMigration If `true`, terminals can be migrated to new implementations.
17
+ /// @custom:member allowSetTerminals If `true`, the project's terminal list can be modified.
18
+ /// @custom:member allowSetController If `true`, the project's controller can be changed.
19
+ /// @custom:member allowAddAccountingContext If `true`, new token accounting contexts can be added to terminals.
20
+ /// @custom:member allowAddPriceFeed If `true`, the project can register new price feeds in `JBPrices`.
21
+ /// @custom:member ownerMustSendPayouts If `true`, only the project owner can trigger payout distribution.
22
+ /// @custom:member holdFees If `true`, fees are accumulated but not processed until a future ruleset (or manually).
23
+ /// @custom:member useTotalSurplusForCashOuts If `true`, cash-out calculations use surplus across all terminals (not
24
+ /// just the one to cash out from).
25
+ /// @custom:member useDataHookForPay If `true`, the data hook is called before recording payments.
26
+ /// @custom:member useDataHookForCashOut If `true`, the data hook is called before recording cash outs.
27
+ /// @custom:member dataHook Contract called before pay/cash-out to potentially override token counts or add hooks.
28
+ /// @custom:member metadata 14 bits of application-specific metadata (upper 2 bits are ignored).
36
29
  struct JBRulesetMetadata {
37
30
  uint16 reservedPercent;
38
31
  uint16 cashOutTaxRate;
@@ -3,8 +3,8 @@ pragma solidity ^0.8.0;
3
3
 
4
4
  import {JBSplit} from "./JBSplit.sol";
5
5
 
6
- /// @custom:member token The token being sent to the split hook.
7
- /// @custom:member amount The amount being sent to the split hook, as a fixed point number.
6
+ /// @custom:member token The token to send to the split hook.
7
+ /// @custom:member amount The amount to send to the split hook, as a fixed point number.
8
8
  /// @custom:member decimals The number of decimals in the amount.
9
9
  /// @custom:member projectId The project the split belongs to.
10
10
  /// @custom:member groupId The group the split belongs to. By convention, this ID is `uint256(uint160(tokenAddress))`