@bananapus/core-v6 0.0.82 → 0.0.83

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 CHANGED
@@ -15,7 +15,7 @@ In-repo docs (entry points for this repo):
15
15
  - [AUDIT_INSTRUCTIONS.md](./AUDIT_INSTRUCTIONS.md) — what to focus on for a security audit and how to start.
16
16
  - [SKILLS.md](./SKILLS.md) — implementation nuances, gotchas, and reading order for working on this codebase.
17
17
  - [STYLE_GUIDE.md](./STYLE_GUIDE.md) — Solidity conventions and repo layout used across the V6 ecosystem.
18
- - [CHANGELOG.md](./CHANGELOG.md) v5 v6 ABI and behavior deltas.
18
+ - [CHANGELOG.md](./CHANGELOG.md) - V5 to V6 ABI and behavior deltas.
19
19
  - [references/entrypoints.md](./references/entrypoints.md) — callable entrypoints by contract.
20
20
  - [references/types-errors-events.md](./references/types-errors-events.md) — packed metadata, errors, events, and hook return shapes.
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bananapus/core-v6",
3
- "version": "0.0.82",
3
+ "version": "0.0.83",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,10 +35,10 @@
35
35
  "artifacts": "source ./.env && npx sphinx artifacts --org-id 'ea165b21-7cdc-4d7b-be59-ecdd4c26bee4' --project-name 'nana-core-v6'"
36
36
  },
37
37
  "dependencies": {
38
- "@bananapus/permission-ids-v6": "^0.0.28",
38
+ "@bananapus/permission-ids-v6": "^0.0.30",
39
39
  "@chainlink/contracts": "1.5.0",
40
40
  "@openzeppelin/contracts": "5.6.1",
41
- "@prb/math": "4.1.1",
41
+ "@prb/math": "4.1.2",
42
42
  "@uniswap/permit2": "github:Uniswap/permit2#cc56ad0f3439c502c246fc5cfcc3db92bb8b7219"
43
43
  },
44
44
  "devDependencies": {
@@ -312,8 +312,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
312
312
  }
313
313
 
314
314
  /// @notice Converts a holder's internal project token credits into the project's ERC-20 representation,
315
- /// transferring them to the beneficiary's wallet. Credits and the ERC-20 are equivalent project tokens this
316
- /// just
315
+ /// transferring them to the beneficiary's wallet. Credits and the ERC-20 are equivalent project tokens; this just
317
316
  /// makes them transferable/tradeable.
318
317
  /// @dev Can only be called by the credit holder or an operator with `CLAIM_TOKENS` permission.
319
318
  /// @param holder The address whose project token credits are being redeemed.
@@ -373,8 +372,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
373
372
  return TOKENS.deployERC20For({projectId: projectId, name: name, symbol: symbol, salt: saltHash});
374
373
  }
375
374
 
376
- /// @notice When a project receives reserved tokens, if it has a terminal for the token, this is used to pay the
377
- /// terminal.
375
+ /// @notice Pays a project's terminal with reserved tokens when the project has a terminal for that token.
378
376
  /// @dev Can only be called by this controller.
379
377
  /// @param terminal The terminal to pay.
380
378
  /// @param projectId The ID of the project to pay.
@@ -417,9 +415,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
417
415
  }
418
416
  }
419
417
 
420
- /// @notice Creates a new Juicebox project in one transaction mints the project NFT, queues initial rulesets,
421
- /// and
422
- /// configures terminals. This is the primary entry point for launching a project.
418
+ /// @notice Creates a Juicebox project in one transaction: mints the NFT, queues rulesets, and configures terminals.
423
419
  /// @dev Anyone can call this on behalf of any owner. This is a launch convenience, not owner authorization proof:
424
420
  /// frontends and operators must use the transaction sender, an explicit owner signature, or their own deployment
425
421
  /// flow to decide whether the owner intentionally launched a configuration. Each sub-operation (mint, queue,
@@ -745,8 +741,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
745
741
  }
746
742
 
747
743
  /// @notice Sets the name and symbol of a project's token.
748
- /// @dev Can only be called by the project's owner or an address with the owner's permission to
749
- /// `SET_TOKEN_METADATA`.
744
+ /// @dev Can only be called by the project's owner or an address with the owner's `SET_TOKEN_METADATA` permission.
750
745
  /// @param projectId The ID of the project to update the token for.
751
746
  /// @param name The new name.
752
747
  /// @param symbol The new symbol.
@@ -761,8 +756,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
761
756
 
762
757
  /// @notice Set a project's metadata URI.
763
758
  /// @dev This is typically an IPFS hash, optionally with an `ipfs://` prefix.
764
- /// @dev Can only be called by the project's owner or an address with the owner's permission to
765
- /// `SET_PROJECT_URI`.
759
+ /// @dev Can only be called by the project's owner or an address with the owner's `SET_PROJECT_URI` permission.
766
760
  /// @param projectId The ID of the project to set the metadata URI of.
767
761
  /// @param uri The metadata URI to set.
768
762
  function setUriOf(uint256 projectId, string calldata uri) external override {
@@ -1246,8 +1240,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
1246
1240
  }
1247
1241
 
1248
1242
  /// @notice Sends pending reserved tokens to the project's reserved token splits.
1249
- /// @dev If the project has no reserved token splits, or if they don't add up to 100%, leftover tokens are sent to
1250
- /// the project's owner.
1243
+ /// @dev If the project has no reserved token splits, or if they don't add up to 100%, leftovers go to the owner.
1251
1244
  /// @param projectId The ID of the project to send reserved tokens for.
1252
1245
  /// @return tokenCount The amount of reserved tokens minted and sent.
1253
1246
  function _sendReservedTokensToSplitsOf(uint256 projectId) internal returns (uint256 tokenCount) {
@@ -49,8 +49,7 @@ contract JBDirectory is JBPermissioned, Ownable, IJBDirectory {
49
49
  // --------------------- public stored properties -------------------- //
50
50
  //*********************************************************************//
51
51
 
52
- /// @notice The specified project's controller, which dictates how its terminals interact with its tokens and
53
- /// rulesets.
52
+ /// @notice The specified project's controller, which dictates how terminals interact with tokens and rulesets.
54
53
  /// @custom:param projectId The ID of the project to get the controller of.
55
54
  mapping(uint256 projectId => IERC165) public override controllerOf;
56
55
 
@@ -98,8 +97,7 @@ contract JBDirectory is JBPermissioned, Ownable, IJBDirectory {
98
97
  /// its tokens and rulesets. If the project already has a controller, this triggers a full migration lifecycle
99
98
  /// (`beforeReceiveMigrationFrom` → `migrate` → state update → `afterReceiveMigrationFrom`).
100
99
  /// @dev Can only be called if:
101
- /// - The ruleset's metadata has `allowSetController` enabled, and the caller is the project's owner or has
102
- /// `SET_CONTROLLER` permission.
100
+ /// - The ruleset metadata enables `allowSetController`, and the caller owns the project or has `SET_CONTROLLER`.
103
101
  /// - OR the caller `isAllowedToSetFirstController` and the project has no controller yet.
104
102
  /// @param projectId The ID of the project to set the controller for.
105
103
  /// @param controller The address of the controller to set.
@@ -187,8 +187,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
187
187
  // -------------------------- constructor ---------------------------- //
188
188
  //*********************************************************************//
189
189
 
190
- /// @param feelessAddresses A contract that stores addresses that shouldn't incur fees when paid towards or
191
- /// from.
190
+ /// @param feelessAddresses A contract that stores addresses that shouldn't incur fees on payments to or from them.
192
191
  /// @param permissions A contract storing permissions.
193
192
  /// @param projects A contract which mints ERC-721s that represent project ownership and transfers.
194
193
  /// @param splits A contract that stores splits for each project.
@@ -260,9 +259,8 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
260
259
  /// @dev If `shouldReturnHeldFees` is true, the added amount offsets held fees proportionally.
261
260
  /// @param projectId The ID of the project to add funds to the balance of.
262
261
  /// @param token The terminal token being added (the ERC-20, or `JBConstants.NATIVE_TOKEN` for native).
263
- /// @param amount The amount of the terminal `token` to add, as a fixed point number with the same number of
264
- /// decimals as the token's accounting context. If `token` is the native token, this argument is ignored and
265
- /// `msg.value` is used instead.
262
+ /// @param amount The amount of terminal `token` to add, as a fixed point number using the token accounting
263
+ /// context's decimals. If `token` is the native token, this argument is ignored and `msg.value` is used instead.
266
264
  /// @param shouldReturnHeldFees If true, return held fees proportional to the amount added.
267
265
  /// @param memo A memo to pass along to the emitted event.
268
266
  /// @param metadata Extra data to pass along to the emitted event.
@@ -304,8 +302,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
304
302
  /// context. If fewer terminal tokens would be reclaimed, the cash out is reverted.
305
303
  /// @param beneficiary The address to send the reclaimed terminal tokens to, and to pass along to the ruleset's
306
304
  /// data hook and cash out hooks if applicable.
307
- /// @param metadata Bytes to send along to the emitted event, as well as the data hook and cash out hooks if
308
- /// applicable.
305
+ /// @param metadata Bytes to send to the emitted event, data hook, and cash out hooks, if applicable.
309
306
  /// @return reclaimAmount The amount of **terminal tokens** sent to `beneficiary` in exchange for the burned project
310
307
  /// tokens, as a fixed point number with the same number of decimals as the terminal token's accounting context.
311
308
  function cashOutTokensOf(
@@ -652,9 +649,8 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
652
649
  /// `msg.value` is used in its place.
653
650
  /// @param beneficiary The address to mint project tokens to, and to pass along to the ruleset's data hook and pay
654
651
  /// hook if applicable.
655
- /// @param minReturnedTokens The minimum number of project tokens the beneficiary must receive for the payment to
656
- /// succeed, as a fixed point number with 18 decimals. If fewer project tokens would be minted, the payment is
657
- /// reverted.
652
+ /// @param minReturnedTokens The minimum project tokens the beneficiary must receive for the payment to succeed, as
653
+ /// a fixed point number with 18 decimals. If fewer project tokens would be minted, the payment is reverted.
658
654
  /// @param memo A memo to pass along to the emitted event.
659
655
  /// @param metadata Bytes to pass along to the emitted event, as well as the data hook and pay hook if applicable.
660
656
  /// @return beneficiaryTokenCount The number of **project tokens** minted to `beneficiary`, as a fixed point number
@@ -780,18 +776,15 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
780
776
  /// payout limit. Anyone can call this on behalf of any project.
781
777
  /// @dev If splits don't add up to 100%, the remainder goes to the project owner. A wildcard split (no hook,
782
778
  /// projectId, or beneficiary) sends its share to `msg.sender` — useful for incentivizing the call.
783
- /// @dev Payouts to non-feeless addresses incur the 2.5% protocol fee. Projects whose terminal is feeless are
784
- /// exempt.
779
+ /// @dev Payouts to non-feeless addresses incur the 2.5% protocol fee; feeless project terminals are exempt.
785
780
  /// @param projectId The ID of the project having its payouts sent.
786
781
  /// @param token The token to send.
787
782
  /// @param amount The total number of terminal tokens to send, as a fixed point number with the same number of
788
783
  /// decimals as the token's accounting context.
789
784
  /// @param currency The expected currency of the payouts. Must match the currency of one of the
790
785
  /// project's current ruleset's payout limits.
791
- /// @param minTokensPaidOut The minimum number of terminal tokens that the `amount` should be worth (if expressed
792
- /// in terms of the token's accounting context currency), as a fixed point number with the same number of decimals
793
- /// as the token's accounting context. If the amount of tokens paid out would be less than this amount, the send is
794
- /// reverted.
786
+ /// @param minTokensPaidOut The minimum terminal-token value of `amount`, if expressed in the token accounting
787
+ /// context currency. If the payout would be less than this amount, the send is reverted.
795
788
  /// @return amountPaidOut The total amount paid out.
796
789
  function sendPayoutsOf(
797
790
  uint256 projectId,
@@ -946,8 +939,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
946
939
  });
947
940
  }
948
941
 
949
- /// @notice Simulates a cash out without modifying state — use this to preview how many tokens a holder would
950
- /// reclaim.
942
+ /// @notice Simulates a cash out without modifying state to preview how many tokens a holder would reclaim.
951
943
  /// @param holder The address cashing out tokens.
952
944
  /// @param projectId The ID of the project cashing out tokens.
953
945
  /// @param cashOutCount The number of project tokens to cash out.
@@ -988,9 +980,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
988
980
  });
989
981
  }
990
982
 
991
- /// @notice Simulates a payment without modifying state — use this to preview how many project tokens a payer
992
- /// would
993
- /// receive.
983
+ /// @notice Simulates a payment without modifying state to preview the project tokens a payer would receive.
994
984
  /// @param projectId The ID of the project to pay.
995
985
  /// @param token The token to pay with.
996
986
  /// @param amount The amount of tokens to pay.
@@ -1200,19 +1190,16 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
1200
1190
  }
1201
1191
  }
1202
1192
 
1203
- /// @notice Holders can cash out their tokens to reclaim some of a project's surplus, or to trigger rules determined
1204
- /// by
1205
- /// the project's current ruleset's data hook.
1193
+ /// @notice Holders can cash out their tokens to reclaim some of a project's surplus, or to trigger rules
1194
+ /// determined by the project's current ruleset's data hook.
1206
1195
  /// @dev Only a token holder or an operator with the `CASH_OUT_TOKENS` permission from that holder can cash out
1207
- /// those
1208
- /// tokens.
1196
+ /// those tokens.
1209
1197
  /// @param holder The account cashing out tokens.
1210
1198
  /// @param projectId The ID of the project cashing out tokens.
1211
1199
  /// @param cashOutCount The number of project tokens to cash out, as a fixed point number with 18 decimals.
1212
1200
  /// @param tokenToReclaim The address of the token to reclaim.
1213
1201
  /// @param beneficiary The address to send the reclaimed terminal tokens to.
1214
- /// @param metadata Bytes to send along to the emitted event, as well as the data hook and cash out hook if
1215
- /// applicable.
1202
+ /// @param metadata Bytes to send to the emitted event, data hook, and cash out hook, if applicable.
1216
1203
  /// @return reclaimAmount The number of terminal tokens reclaimed for the `beneficiary`, as a fixed point number
1217
1204
  /// with 18 decimals.
1218
1205
  function _cashOutTokensOf(
@@ -1500,8 +1487,8 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
1500
1487
  /// @param metadata Bytes to send along to the emitted event and cash out hooks as applicable.
1501
1488
  /// @param ruleset The ruleset active during this cash out as a `JBRuleset` struct.
1502
1489
  /// @param cashOutTaxRate The cash out tax rate influencing the reclaim amount, out of
1503
- /// `JBConstants.MAX_CASH_OUT_TAX_RATE`. @param beneficiary The address which will receive any terminal tokens that
1504
- /// are cashed out.
1490
+ /// `JBConstants.MAX_CASH_OUT_TAX_RATE`.
1491
+ /// @param beneficiary The address which will receive any cashed out terminal tokens.
1505
1492
  /// @param specifications The hook specifications to fulfill.
1506
1493
  /// @return amountEligibleForFees The amount of funds which were allocated to cash out hooks and are eligible for
1507
1494
  /// fees.
@@ -1707,8 +1694,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
1707
1694
  /// decimals as the token's accounting context. If this terminal's token is the native token, `amount` is ignored
1708
1695
  /// and `msg.value` is used in its place.
1709
1696
  /// @param payer The address making the payment.
1710
- /// @param beneficiary The address to mint tokens to, and pass along to the ruleset's data hook and pay hook if
1711
- /// applicable.
1697
+ /// @param beneficiary The token recipient passed to the ruleset's data hook and pay hook, if applicable.
1712
1698
  /// @param memo A memo to pass along to the emitted event.
1713
1699
  /// @param metadata Bytes to send along to the emitted event, as well as the data hook and pay hook if applicable.
1714
1700
  function _pay(
@@ -2086,8 +2072,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
2086
2072
  }
2087
2073
 
2088
2074
  /// @notice Allows a project to send out funds from its surplus up to the current surplus allowance.
2089
- /// @dev Only a project's owner or an operator with the `USE_ALLOWANCE` permission from that owner can use the
2090
- /// surplus allowance.
2075
+ /// @dev Only a project's owner or an operator with the owner's `USE_ALLOWANCE` permission can use the allowance.
2091
2076
  /// @dev Incurs the protocol fee unless the caller is a feeless address.
2092
2077
  /// @param projectId The ID of the project to use the surplus allowance of.
2093
2078
  /// @param owner The project's owner.
@@ -30,9 +30,8 @@ contract JBPermissions is ERC2771Context, IJBPermissions {
30
30
  // ------------------------- public constants ------------------------ //
31
31
  //*********************************************************************//
32
32
 
33
- /// @notice The project ID that acts as a wildcard granting the operator permissions across all projects owned
34
- /// by
35
- /// the account. Setting permissions for project ID 0 is powerful and should be done carefully.
33
+ /// @notice Project ID 0 acts as a wildcard for permissions across all projects owned by the account.
34
+ /// @dev Setting permissions for project ID 0 is powerful and should be done carefully.
36
35
  uint256 public constant override WILDCARD_PROJECT_ID = 0;
37
36
 
38
37
  //*********************************************************************//
@@ -40,8 +39,7 @@ contract JBPermissions is ERC2771Context, IJBPermissions {
40
39
  //*********************************************************************//
41
40
 
42
41
  /// @notice The packed permission bitmap that an account has granted to an operator for a specific project.
43
- /// @dev Each bit in the returned `uint256` corresponds to a permission ID (0–255). A `1` bit means that
44
- /// permission
42
+ /// @dev Each bit in the returned `uint256` corresponds to a permission ID (0–255). A `1` bit means the permission
45
43
  /// is granted. See `JBPermissionIds` for the meaning of each ID.
46
44
  /// @custom:param operator The address of the operator.
47
45
  /// @custom:param account The address of the account operated on behalf of.
@@ -58,8 +58,7 @@ contract JBRulesets is JBControlled, IJBRulesets {
58
58
 
59
59
  /// @notice The ID of the ruleset with the latest start time for a specific project, whether the ruleset has been
60
60
  /// approved or not.
61
- /// @dev If a project has multiple rulesets queued, the `latestRulesetIdOf` will be the last one. This is the
62
- /// "changeable" cycle.
61
+ /// @dev If a project has multiple rulesets queued, `latestRulesetIdOf` is the last "changeable" cycle.
63
62
  /// @custom:param projectId The ID of the project to get the latest ruleset ID of.
64
63
  /// @return latestRulesetIdOf The `rulesetId` of the project's latest ruleset.
65
64
  mapping(uint256 projectId => uint256) public override latestRulesetIdOf;
@@ -218,9 +217,7 @@ contract JBRulesets is JBControlled, IJBRulesets {
218
217
 
219
218
  /// @notice Cache the value of the ruleset weight for a specific ruleset.
220
219
  /// @dev The caller should pass the ruleset ID that `currentOf()` actually uses. When a queued ruleset is rejected
221
- /// by an approval hook, `currentOf()` falls back to the base ruleset callers should pass that base ruleset's
222
- /// ID,
223
- /// not the rejected latest.
220
+ /// by an approval hook, `currentOf()` falls back to the base ruleset, not the rejected latest.
224
221
  /// @param projectId The ID of the project having its ruleset weight cached.
225
222
  /// @param rulesetId The ID of the ruleset to update the cache for.
226
223
  function updateRulesetWeightCache(uint256 projectId, uint256 rulesetId) external override {
@@ -574,8 +571,7 @@ contract JBRulesets is JBControlled, IJBRulesets {
574
571
  /// @notice The date that is the nearest multiple of the base ruleset's duration from the start of the next cycle.
575
572
  /// @param baseRulesetStart The start time of the base ruleset.
576
573
  /// @param baseRulesetDuration The duration of the base ruleset.
577
- /// @param mustStartAtOrAfter The earliest time the next ruleset can start. The ruleset cannot start before this
578
- /// timestamp.
574
+ /// @param mustStartAtOrAfter The earliest timestamp the next ruleset can start at.
579
575
  /// @return start The next start time.
580
576
  function deriveStartFrom(
581
577
  uint256 baseRulesetStart,
@@ -703,8 +699,7 @@ contract JBRulesets is JBControlled, IJBRulesets {
703
699
  /// @param projectId The ID of the project to update the latest ruleset for.
704
700
  /// @param rulesetId The timestamp of when the ruleset was queued.
705
701
  /// @param weight The weight to store in the queued ruleset.
706
- /// @param mustStartAtOrAfter The earliest time the ruleset can start. The ruleset cannot start before this
707
- /// timestamp.
702
+ /// @param mustStartAtOrAfter The earliest timestamp the ruleset can start at.
708
703
  function _configureIntrinsicPropertiesFor(
709
704
  uint256 projectId,
710
705
  uint256 rulesetId,
@@ -791,8 +786,7 @@ contract JBRulesets is JBControlled, IJBRulesets {
791
786
  /// @param projectId The ID of the project to initialize the ruleset for.
792
787
  /// @param baseRuleset The ruleset struct to base the newly initialized one on.
793
788
  /// @param rulesetId The `rulesetId` for the ruleset to initialize.
794
- /// @param mustStartAtOrAfter The earliest time the ruleset can start. The ruleset cannot start before this
795
- /// timestamp.
789
+ /// @param mustStartAtOrAfter The earliest timestamp the ruleset can start at.
796
790
  /// @param weight The weight to give the newly initialized ruleset.
797
791
  function _initializeRulesetFor(
798
792
  uint256 projectId,
@@ -121,8 +121,7 @@ contract JBTerminalStore is IJBTerminalStore {
121
121
  /// @notice The currency-denominated amount of funds that a project has already paid out from its payout limit
122
122
  /// during the current ruleset for each terminal, in terms of the payout limit's currency.
123
123
  /// @dev Increases as projects pay out funds.
124
- /// @dev The used payout limit is represented as a fixed point number with the same amount of decimals as the
125
- /// terminal it applies to.
124
+ /// @dev The used payout limit is a fixed point number with the same decimals as the terminal it applies to.
126
125
  /// @custom:param terminal The terminal the payout limit applies to.
127
126
  /// @custom:param projectId The ID of the project to get the used payout limit of.
128
127
  /// @custom:param token The token the payout limit applies to in the terminal.
@@ -141,8 +140,7 @@ contract JBTerminalStore is IJBTerminalStore {
141
140
  /// @notice The currency-denominated amounts of funds that a project has used from its surplus allowance during the
142
141
  /// current ruleset for each terminal, in terms of the surplus allowance's currency.
143
142
  /// @dev Increases as projects use their allowance.
144
- /// @dev The used surplus allowance is represented as a fixed point number with the same amount of decimals as the
145
- /// terminal it applies to.
143
+ /// @dev The used surplus allowance is a fixed point number with the same decimals as the terminal it applies to.
146
144
  /// @dev Surplus allowance usage is keyed by `ruleset.id`, not cycle number. Implicit cycle progression
147
145
  /// (duration-based auto-cycling) does not reset allowance — this is by design. Projects must queue a new ruleset
148
146
  /// to get a fresh allowance.
@@ -414,8 +412,7 @@ contract JBTerminalStore is IJBTerminalStore {
414
412
  }
415
413
  }
416
414
 
417
- /// @notice Records a payout decrements the project's balance and enforces the payout limit. Called by the
418
- /// terminal during `sendPayoutsOf`.
415
+ /// @notice Records a payout during `sendPayoutsOf`, decrementing balance and enforcing the payout limit.
419
416
  /// @dev Reverts if the total payouts for this cycle would exceed the ruleset's payout limit. The balance is
420
417
  /// decremented before validation (safe because the entire tx reverts atomically on failure).
421
418
  /// @param projectId The ID of the project that is paying out funds.
@@ -812,8 +809,7 @@ contract JBTerminalStore is IJBTerminalStore {
812
809
  }
813
810
 
814
811
  /// @notice Simulates a payment without modifying state.
815
- /// @dev Invokes data hooks if configured. Returns the same token count and hook specifications that
816
- /// `recordPaymentFrom` would produce.
812
+ /// @dev Invokes data hooks if configured. Returns what `recordPaymentFrom` would produce.
817
813
  /// @param terminal The terminal to simulate the payment from.
818
814
  /// @param payer The address of the payer.
819
815
  /// @param amount The amount to pay.
@@ -1208,8 +1204,7 @@ contract JBTerminalStore is IJBTerminalStore {
1208
1204
  });
1209
1205
  }
1210
1206
 
1211
- /// @notice Gets the current surplus amount for a project across specified terminals and tokens, using a
1212
- /// pre-fetched ruleset.
1207
+ /// @notice Gets a project's current surplus across specified terminals and tokens using a pre-fetched ruleset.
1213
1208
  /// @dev Use this overload when the caller already has the current ruleset to avoid a redundant
1214
1209
  /// `RULESETS.currentOf()` call.
1215
1210
  /// @param projectId The ID of the project to get surplus for.
@@ -85,9 +85,7 @@ abstract contract JBPermissioned is Context, IJBPermissioned {
85
85
  ) revert JBPermissioned_Unauthorized(account, sender, projectId, permissionId);
86
86
  }
87
87
 
88
- /// @notice If the 'alsoGrantAccessIf' condition is truthy, proceed. Otherwise, require the message sender to be the
89
- /// account or
90
- /// have the relevant permission.
88
+ /// @notice If `alsoGrantAccessIf` is false, require the message sender to be the account or have permission.
91
89
  /// @param account The account to allow.
92
90
  /// @param projectId The project ID to check the permission under.
93
91
  /// @param permissionId The required permission ID. The operator must have this permission within the specified
@@ -75,8 +75,7 @@ interface IJBCashOutTerminal is IJBTerminal {
75
75
  JBCashOutHookSpecification[] memory hookSpecifications
76
76
  );
77
77
 
78
- /// @notice Burn a holder's project tokens to reclaim a proportional share of the project's surplus (paid out as a
79
- /// terminal token).
78
+ /// @notice Burn a holder's project tokens to reclaim a proportional share of surplus in a terminal token.
80
79
  /// @param holder The address whose project tokens are being burned.
81
80
  /// @param projectId The ID of the project whose project tokens are being burned.
82
81
  /// @param cashOutCount The number of project tokens to burn.
@@ -329,8 +329,8 @@ interface IJBController is IERC165, IJBProjectUriRegistry, IJBDirectoryAccessCon
329
329
  /// @notice Mints new project tokens (or credits) to a beneficiary, optionally reserving a portion for the ruleset's
330
330
  /// reserved splits.
331
331
  /// @param projectId The ID of the project whose project tokens are being minted.
332
- /// @param tokenCount The total number of project tokens to mint (the beneficiary's share plus the reserved share if
333
- /// `useReservedPercent` is true).
332
+ /// @param tokenCount The total number of project tokens to mint, including reserved tokens if
333
+ /// `useReservedPercent` is true.
334
334
  /// @param beneficiary The address that receives the non-reserved portion of the minted project tokens.
335
335
  /// @param memo A memo to pass along to the emitted event.
336
336
  /// @param useReservedPercent Whether to apply the ruleset's reserved percent.
@@ -13,8 +13,7 @@ interface IJBFeelessAddresses {
13
13
  /// @param caller The address that set the feeless status.
14
14
  event SetFeelessAddress(uint256 indexed projectId, address indexed addr, bool indexed isFeeless, address caller);
15
15
 
16
- /// @notice The optional hook (set by the owner) that can grant feeless status with arbitrary logic. Set to the
17
- /// zero address to disable.
16
+ /// @notice The optional owner-set hook that can grant feeless status. Set to the zero address to disable.
18
17
  /// @param hook The new feeless hook. The zero address disables hook consultation.
19
18
  /// @param caller The address that set the hook.
20
19
  event SetFeelessHook(IJBFeelessHook indexed hook, address caller);
@@ -17,8 +17,8 @@ interface IJBFeelessHook is IERC165 {
17
17
  /// the terminal (so it gets fee-free cash-outs when zapping, but does NOT get feeless status when it merely
18
18
  /// appears as a split recipient of someone else's payout).
19
19
  /// @param projectId The ID of the project the fee would be charged on behalf of.
20
- /// @param addr The address being checked (typically a payout recipient, surplus allowance beneficiary, or
21
- /// cash-out beneficiary).
20
+ /// @param addr The address being checked, typically a payout recipient, surplus allowance beneficiary, or cash-out
21
+ /// beneficiary.
22
22
  /// @param caller The outer caller that initiated the terminal operation, or `address(0)` if not provided.
23
23
  /// @return A flag indicating whether the address is feeless for the project under the hook's custom logic.
24
24
  function isFeeless(uint256 projectId, address addr, address caller) external view returns (bool);
@@ -1,8 +1,7 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  pragma solidity ^0.8.0;
3
3
 
4
- /// @notice Describes how a terminal accounts for a specific token — its address, decimal precision, and which
5
- /// currency
4
+ /// @notice Describes how a terminal accounts for a specific token — its address, decimal precision, and the currency
6
5
  /// it's priced in. Used when recording payments, payouts, and cash outs to ensure correct fixed-point arithmetic.
7
6
  /// @custom:member token The token address (use `JBConstants.NATIVE_TOKEN` for ETH).
8
7
  /// @custom:member decimals The number of decimals for this token's fixed-point amounts (e.g. 18 for ETH, 6 for USDC).
@@ -9,8 +9,7 @@ import {JBTokenAmount} from "./JBTokenAmount.sol";
9
9
  /// @custom:member cashOutCount The number of project tokens to cash out.
10
10
  /// @custom:member cashOutTaxRate The current ruleset's cash out tax rate, out of
11
11
  /// `JBConstants.MAX_CASH_OUT_TAX_RATE`.
12
- /// @custom:member reclaimedAmount The token amount reclaimed from the project's terminal balance. Includes the
13
- /// token
12
+ /// @custom:member reclaimedAmount The token amount reclaimed from the project's terminal balance. Includes the token
14
13
  /// reclaimed, the value, the number of decimals included, and the currency of the amount.
15
14
  /// @custom:member forwardedAmount The token amount forwarded to the cash out hook. Includes the token
16
15
  /// forwarded, the value, the number of decimals included, and the currency of the amount.
@@ -3,8 +3,7 @@ pragma solidity ^0.8.0;
3
3
 
4
4
  import {IJBCashOutHook} from "../interfaces/IJBCashOutHook.sol";
5
5
 
6
- /// @notice A cash out hook specification sent from the ruleset's data hook back to the terminal. This specification is
7
- /// fulfilled by the terminal.
6
+ /// @notice A cash out hook specification sent from the ruleset's data hook back to the terminal for fulfillment.
8
7
  /// @custom:member hook The cash out hook to use when fulfilling this specification.
9
8
  /// @custom:member noop A flag indicating if the hook callback should be skipped.
10
9
  /// @custom:member amount The amount to send to the hook.
@@ -3,8 +3,7 @@ pragma solidity ^0.8.0;
3
3
 
4
4
  import {IJBPayHook} from "../interfaces/IJBPayHook.sol";
5
5
 
6
- /// @notice A pay hook specification sent from the ruleset's data hook back to the terminal. This specification is
7
- /// fulfilled by the terminal.
6
+ /// @notice A pay hook specification sent from the ruleset's data hook back to the terminal for fulfillment.
8
7
  /// @custom:member hook The pay hook to use when fulfilling this specification.
9
8
  /// @custom:member noop A flag indicating if the hook callback should be skipped.
10
9
  /// @custom:member amount The amount to send to the hook.
@@ -15,8 +15,7 @@ import {IJBSplitHook} from "./../interfaces/IJBSplitHook.sol";
15
15
  /// `beneficiary`.
16
16
  /// @custom:member percent The percent of the total token amount that this split sends. This number is out of
17
17
  /// `JBConstants.SPLITS_TOTAL_PERCENT`.
18
- /// @custom:member projectId The ID of a project to `pay`, if applicable. Resulting tokens will be routed to the
19
- /// `beneficiary`.
18
+ /// @custom:member projectId The ID of a project to `pay`, if applicable. Resulting tokens are routed to `beneficiary`.
20
19
  /// @custom:member beneficiary Receives this split's tokens if the `hook` and `projectId` are zero. If the `projectId`
21
20
  /// is specified, the `beneficiary` receives any project tokens minted by this split. If `beneficiary` is `address(0)`,
22
21
  /// the application processing the split decides on the recipient. For example, the terminal uses `msg.sender` for