@bananapus/core-v6 0.0.39 → 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.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/src/JBChainlinkV3SequencerPriceFeed.sol +1 -1
  3. package/src/JBController.sol +16 -16
  4. package/src/JBDirectory.sol +4 -4
  5. package/src/JBERC20.sol +5 -5
  6. package/src/JBFundAccessLimits.sol +5 -5
  7. package/src/JBMultiTerminal.sol +103 -100
  8. package/src/JBPermissions.sol +2 -2
  9. package/src/JBPrices.sol +3 -3
  10. package/src/JBRulesets.sol +6 -4
  11. package/src/JBSplits.sol +2 -2
  12. package/src/JBTerminalStore.sol +33 -33
  13. package/src/JBTokens.sol +6 -6
  14. package/src/interfaces/IJBCashOutTerminal.sol +6 -6
  15. package/src/interfaces/IJBController.sol +11 -11
  16. package/src/interfaces/IJBMigratable.sol +5 -5
  17. package/src/interfaces/IJBPayoutTerminal.sol +3 -3
  18. package/src/interfaces/IJBPermissions.sol +4 -4
  19. package/src/interfaces/IJBPermitTerminal.sol +1 -1
  20. package/src/interfaces/IJBPrices.sol +4 -4
  21. package/src/interfaces/IJBRulesets.sol +6 -3
  22. package/src/interfaces/IJBTerminal.sol +10 -10
  23. package/src/interfaces/IJBTerminalStore.sol +20 -20
  24. package/src/interfaces/IJBTokens.sol +6 -6
  25. package/src/libraries/JBCashOuts.sol +4 -4
  26. package/src/libraries/JBPayoutSplitGroupLib.sol +5 -5
  27. package/src/libraries/JBSurplus.sol +1 -1
  28. package/src/structs/JBAfterCashOutRecordedContext.sol +10 -9
  29. package/src/structs/JBAfterPayRecordedContext.sol +5 -5
  30. package/src/structs/JBBeforeCashOutRecordedContext.sol +8 -7
  31. package/src/structs/JBBeforePayRecordedContext.sol +6 -5
  32. package/src/structs/JBFee.sol +1 -1
  33. package/src/structs/JBPermissionsData.sol +3 -3
  34. package/src/structs/JBRuleset.sol +3 -2
  35. package/src/structs/JBRulesetConfig.sol +2 -1
  36. package/src/structs/JBRulesetMetadata.sol +6 -5
  37. package/src/structs/JBSplitHookContext.sol +2 -2
@@ -227,9 +227,9 @@ contract JBTerminalStore is IJBTerminalStore {
227
227
  }
228
228
  }
229
229
 
230
- /// @notice Records funds being added to a project's balance.
231
- /// @param projectId The ID of the project which funds are being added to the balance of.
232
- /// @param token The token being added to the balance.
230
+ /// @notice Records funds added to a project's balance.
231
+ /// @param projectId The ID of the project which funds are added to the balance of.
232
+ /// @param token The token to add to the balance.
233
233
  /// @param amount The amount of terminal tokens added, as a fixed point number with the same amount of decimals as
234
234
  /// its relative terminal.
235
235
  function recordAddedBalanceFor(uint256 projectId, address token, uint256 amount) external override {
@@ -241,10 +241,10 @@ contract JBTerminalStore is IJBTerminalStore {
241
241
  /// @dev Uses the data hook if configured, otherwise applies the bonding curve formula based on cash out tax rate,
242
242
  /// surplus, and supply. The terminal calls this before actually burning tokens and transferring funds.
243
243
  /// @param holder The account that is cashing out tokens.
244
- /// @param projectId The ID of the project being cashed out from.
244
+ /// @param projectId The ID of the project to cash out from.
245
245
  /// @param cashOutCount The number of project tokens to cash out, as supplied by the caller and later burned by the
246
246
  /// terminal, as a fixed point number with 18 decimals.
247
- /// @param tokenToReclaim The token being reclaimed by the cash out.
247
+ /// @param tokenToReclaim The token to reclaim by the cash out.
248
248
  /// @param beneficiaryIsFeeless Whether the cash out's beneficiary is a feeless address. Passed through to data
249
249
  /// hooks so they can skip their own fees when value stays in the protocol (e.g. project-to-project routing).
250
250
  /// @param metadata Bytes to send to the data hook, if the project's current ruleset specifies one.
@@ -318,9 +318,9 @@ contract JBTerminalStore is IJBTerminalStore {
318
318
  /// current ruleset's weight. Uses the data hook if configured, otherwise mints proportionally.
319
319
  /// @dev Called by the terminal after accepting funds. Updates the project's recorded balance.
320
320
  /// @param payer The address that made the payment to the terminal.
321
- /// @param amount The amount of tokens being paid. Includes the token being paid, their value, the number of
321
+ /// @param amount The amount of tokens to pay. Includes the token paid, their value, the number of
322
322
  /// decimals included, and the currency of the amount.
323
- /// @param projectId The ID of the project being paid.
323
+ /// @param projectId The ID of the project to pay.
324
324
  /// @param beneficiary The address that should be the beneficiary of anything the payment yields (including project
325
325
  /// tokens minted by the payment).
326
326
  /// @param metadata Bytes to send to the data hook, if the project's current ruleset specifies one.
@@ -362,7 +362,7 @@ contract JBTerminalStore is IJBTerminalStore {
362
362
  /// @dev Reverts if the total payouts for this cycle would exceed the ruleset's payout limit. The balance is
363
363
  /// decremented before validation (safe because the entire tx reverts atomically on failure).
364
364
  /// @param projectId The ID of the project that is paying out funds.
365
- /// @param token The token being paid out.
365
+ /// @param token The token to pay out.
366
366
  /// @param amount The amount to pay out (use from the payout limit), as a fixed point number.
367
367
  /// @param currency The currency of the `amount`. This must match the project's current ruleset's currency.
368
368
  /// @return ruleset The ruleset the payout was made during, as a `JBRuleset` struct.
@@ -432,12 +432,12 @@ contract JBTerminalStore is IJBTerminalStore {
432
432
  usedPayoutLimitOf[msg.sender][projectId][token][ruleset.cycleNumber][currency] = newUsedPayoutLimitOf;
433
433
  }
434
434
 
435
- /// @notice Records a terminal migration — zeros out the project's balance and returns the amount being moved to
435
+ /// @notice Records a terminal migration — zeros out the project's balance and returns the amount moved to
436
436
  /// the new terminal. The current ruleset must allow terminal migration.
437
- /// @param projectId The ID of the project being migrated.
438
- /// @param token The token being migrated.
439
- /// @return balance The project's current balance (which is being migrated), as a fixed point number with the same
440
- /// amount of decimals as its relative terminal.
437
+ /// @param projectId The ID of the project to migrate.
438
+ /// @param token The token to migrate.
439
+ /// @return balance The project's current balance (the amount that will migrate), as a fixed point number with the
440
+ /// same amount of decimals as its relative terminal.
441
441
  function recordTerminalMigration(uint256 projectId, address token) external override returns (uint256 balance) {
442
442
  // Get a reference to the project's current ruleset.
443
443
  JBRuleset memory ruleset = RULESETS.currentOf(projectId);
@@ -459,10 +459,10 @@ contract JBTerminalStore is IJBTerminalStore {
459
459
  /// @dev Called by the terminal during `useAllowanceOf`. Unlike payouts, surplus withdrawals go directly to a
460
460
  /// beneficiary rather than through splits.
461
461
  /// @param projectId The ID of the project to use the surplus allowance of.
462
- /// @param token The token whose balances should contribute to the surplus allowance being reclaimed from.
462
+ /// @param token The token whose balances should contribute to the surplus allowance to reclaim from.
463
463
  /// @param amount The amount to use from the surplus allowance, as a fixed point number.
464
464
  /// @param currency The currency of the `amount`. Must match the currency of the surplus allowance.
465
- /// @return ruleset The ruleset during the surplus allowance is being used during, as a `JBRuleset` struct.
465
+ /// @return ruleset The ruleset the surplus allowance applies to, as a `JBRuleset` struct.
466
466
  /// @return usedAmount The amount of terminal tokens used, as a fixed point number with the same amount of decimals
467
467
  /// as its relative terminal.
468
468
  function recordUsedAllowanceOf(
@@ -697,9 +697,9 @@ contract JBTerminalStore is IJBTerminalStore {
697
697
  /// preview and execution).
698
698
  /// @param terminal The terminal to simulate the cash out from.
699
699
  /// @param holder The address cashing out.
700
- /// @param projectId The ID of the project being cashed out from.
701
- /// @param cashOutCount The number of project tokens being cashed out.
702
- /// @param tokenToReclaim The token being reclaimed.
700
+ /// @param projectId The ID of the project to cash out from.
701
+ /// @param cashOutCount The number of project tokens to cash out.
702
+ /// @param tokenToReclaim The token to reclaim.
703
703
  /// @param beneficiaryIsFeeless Whether the cash out's beneficiary is a feeless address.
704
704
  /// @param metadata Extra data to pass along to the data hook.
705
705
  /// @return ruleset The project's current ruleset.
@@ -741,8 +741,8 @@ contract JBTerminalStore is IJBTerminalStore {
741
741
  /// `recordPaymentFrom` would produce.
742
742
  /// @param terminal The terminal to simulate the payment from.
743
743
  /// @param payer The address of the payer.
744
- /// @param amount The amount being paid.
745
- /// @param projectId The ID of the project being paid.
744
+ /// @param amount The amount to pay.
745
+ /// @param projectId The ID of the project to pay.
746
746
  /// @param beneficiary The address to mint project tokens to.
747
747
  /// @param metadata Extra data to pass along to the data hook.
748
748
  /// @return ruleset The project's current ruleset.
@@ -841,9 +841,9 @@ contract JBTerminalStore is IJBTerminalStore {
841
841
  /// @dev When `useTotalSurplusForCashOuts` is enabled, surplus is aggregated from ALL registered terminals without
842
842
  /// validation. Projects MUST only register trusted terminals — an untrusted terminal can over-report surplus and
843
843
  /// cause the executing terminal to overpay cash-outs.
844
- /// @param terminal The terminal the cash out is being recorded from.
845
- /// @param projectId The ID of the project being cashed out from.
846
- /// @param tokenToReclaim The token being reclaimed.
844
+ /// @param terminal The terminal recording the cash out.
845
+ /// @param projectId The ID of the project to cash out from.
846
+ /// @param tokenToReclaim The token to reclaim.
847
847
  /// @param ruleset The ruleset during the cash out.
848
848
  /// @return The surplus amount in the token's native decimals and currency.
849
849
  function _cashOutSurplusOf(
@@ -939,9 +939,9 @@ contract JBTerminalStore is IJBTerminalStore {
939
939
  /// @notice Computes cash out results without writing state.
940
940
  /// @param terminal The terminal recording the cash out.
941
941
  /// @param holder The account that is cashing out tokens.
942
- /// @param projectId The ID of the project being cashed out from.
942
+ /// @param projectId The ID of the project to cash out from.
943
943
  /// @param cashOutCount The number of project tokens to cash out.
944
- /// @param tokenToReclaim The token being reclaimed.
944
+ /// @param tokenToReclaim The token to reclaim.
945
945
  /// @param beneficiaryIsFeeless Whether the cash out's beneficiary is a feeless address.
946
946
  /// @param metadata Bytes to send to the data hook.
947
947
  /// @return ruleset The ruleset during the cash out.
@@ -1035,8 +1035,8 @@ contract JBTerminalStore is IJBTerminalStore {
1035
1035
  /// @notice Computes payment results without writing state.
1036
1036
  /// @param terminal The terminal recording the payment.
1037
1037
  /// @param payer The address that made the payment.
1038
- /// @param amount The amount of tokens being paid.
1039
- /// @param projectId The ID of the project being paid.
1038
+ /// @param amount The amount of tokens to pay.
1039
+ /// @param projectId The ID of the project to pay.
1040
1040
  /// @param beneficiary The beneficiary of the payment.
1041
1041
  /// @param metadata Bytes to send to the data hook.
1042
1042
  /// @return ruleset The ruleset the payment would be made during.
@@ -1239,12 +1239,12 @@ contract JBTerminalStore is IJBTerminalStore {
1239
1239
 
1240
1240
  /// @notice Gets a project's surplus amount in a terminal as measured by a given ruleset, across multiple accounting
1241
1241
  /// contexts.
1242
- /// @dev This amount changes as the value of the balance changes in relation to the currency being used to measure
1242
+ /// @dev This amount changes as the value of the balance changes in relation to the currency used to measure
1243
1243
  /// various payout limits.
1244
- /// @param terminal The terminal the surplus is being calculated for.
1244
+ /// @param terminal The terminal to calculate surplus for.
1245
1245
  /// @param projectId The ID of the project to get the surplus for.
1246
1246
  /// @param accountingContexts The accounting contexts of tokens whose balances should contribute to the surplus
1247
- /// being calculated.
1247
+ /// calculated.
1248
1248
  /// @param ruleset The ruleset to base the surplus on.
1249
1249
  /// @param targetDecimals The number of decimals to include in the resulting fixed point number.
1250
1250
  /// @param targetCurrency The currency that the reported surplus is expected to be in terms of.
@@ -1285,12 +1285,12 @@ contract JBTerminalStore is IJBTerminalStore {
1285
1285
 
1286
1286
  /// @notice Get a project's surplus amount of a specific token in a given terminal as measured by a given ruleset
1287
1287
  /// (one specific accounting context).
1288
- /// @dev This amount changes as the value of the balance changes in relation to the currency being used to measure
1288
+ /// @dev This amount changes as the value of the balance changes in relation to the currency used to measure
1289
1289
  /// the payout limits.
1290
- /// @param terminal The terminal the surplus is being calculated for.
1290
+ /// @param terminal The terminal to calculate surplus for.
1291
1291
  /// @param projectId The ID of the project to get the surplus of.
1292
1292
  /// @param accountingContext The accounting context of the token whose balance should contribute to the surplus
1293
- /// being measured.
1293
+ /// measured.
1294
1294
  /// @param ruleset The ID of the ruleset to base the surplus calculation on.
1295
1295
  /// @param targetDecimals The number of decimals to include in the resulting fixed point number.
1296
1296
  /// @param targetCurrency The currency that the reported surplus is expected to be in terms of.
package/src/JBTokens.sol CHANGED
@@ -47,7 +47,7 @@ contract JBTokens is JBControlled, IJBTokens {
47
47
  /// @custom:param projectId The ID of the project to which the credits belong.
48
48
  mapping(address holder => mapping(uint256 projectId => uint256)) public override creditBalanceOf;
49
49
 
50
- /// @notice Each token's project.
50
+ /// @notice The project ID that a given ERC-20 token is associated with.
51
51
  /// @custom:param token The address of the token associated with the project.
52
52
  // slither-disable-next-line unused-return
53
53
  mapping(IJBToken token => uint256) public override projectIdOf;
@@ -77,7 +77,7 @@ contract JBTokens is JBControlled, IJBTokens {
77
77
  /// @notice Destroy a holder's tokens for a project. Credits (internal balance) are burned first; if more tokens
78
78
  /// need burning, the remaining amount is burned from the holder's ERC-20 balance.
79
79
  /// @dev Only a project's current controller can burn its tokens. Called during cash outs and manual burns.
80
- /// @param holder The address that owns the tokens which are being burned.
80
+ /// @param holder The address to burn tokens from.
81
81
  /// @param projectId The ID of the project the burned tokens belong to.
82
82
  /// @param count The number of tokens to burn.
83
83
  function burnFrom(address holder, uint256 projectId, uint256 count) external override onlyControllerOf(projectId) {
@@ -135,8 +135,8 @@ contract JBTokens is JBControlled, IJBTokens {
135
135
  /// balance and the equivalent ERC-20 tokens are minted to the beneficiary. The project must have an ERC-20
136
136
  /// deployed or attached.
137
137
  /// @dev Only a project's controller can claim that project's tokens.
138
- /// @param holder The owner of the credits being redeemed.
139
- /// @param projectId The ID of the project whose tokens are being claimed.
138
+ /// @param holder The owner of the credits to redeem.
139
+ /// @param projectId The ID of the project to claim tokens for.
140
140
  /// @param count The number of tokens to claim.
141
141
  /// @param beneficiary The account into which the claimed tokens will go.
142
142
  function claimTokensFor(
@@ -317,7 +317,7 @@ contract JBTokens is JBControlled, IJBTokens {
317
317
  /// @notice Update the name and symbol of a project's ERC-20 token. The project must already have a token deployed
318
318
  /// or attached.
319
319
  /// @dev Only a project's controller can set the token's name and symbol.
320
- /// @param projectId The ID of the project whose token is being updated.
320
+ /// @param projectId The ID of the project to update the token for.
321
321
  /// @param name The new name.
322
322
  /// @param symbol The new symbol.
323
323
  function setTokenMetadataFor(
@@ -351,7 +351,7 @@ contract JBTokens is JBControlled, IJBTokens {
351
351
  /// just a balance in this contract), so this function enables transfers via the controller.
352
352
  /// @dev Only a project's controller can transfer credits for that project.
353
353
  /// @param holder The address to transfer credits from.
354
- /// @param projectId The ID of the project whose credits are being transferred.
354
+ /// @param projectId The ID of the project to transfer credits for.
355
355
  /// @param recipient The recipient of the credits.
356
356
  /// @param count The number of token credits to transfer.
357
357
  function transferCreditsFrom(
@@ -12,11 +12,11 @@ interface IJBCashOutTerminal is IJBTerminal {
12
12
  /// @notice A cash out was processed for a project.
13
13
  /// @param rulesetId The ID of the ruleset during the cash out.
14
14
  /// @param rulesetCycleNumber The cycle number of the ruleset during the cash out.
15
- /// @param projectId The ID of the project being cashed out from.
15
+ /// @param projectId The ID of the project to cash out from.
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.
@@ -48,8 +48,8 @@ interface IJBCashOutTerminal is IJBTerminal {
48
48
  );
49
49
 
50
50
  /// @notice Simulates cashing out project tokens from this terminal without modifying state.
51
- /// @param holder The address whose tokens are being cashed out.
52
- /// @param projectId The ID of the project whose tokens are being cashed out.
51
+ /// @param holder The address cashing out tokens.
52
+ /// @param projectId The ID of the project cashing out tokens.
53
53
  /// @param cashOutCount The number of project tokens to cash out.
54
54
  /// @param tokenToReclaim The token to reclaim from the project's surplus.
55
55
  /// @param beneficiary The address that would receive the reclaimed tokens.
@@ -77,8 +77,8 @@ interface IJBCashOutTerminal is IJBTerminal {
77
77
 
78
78
  /// @notice Cashes out a holder's tokens for a project, reclaiming the token's proportional share of the project's
79
79
  /// surplus.
80
- /// @param holder The address whose tokens are being cashed out.
81
- /// @param projectId The ID of the project whose tokens are being cashed out.
80
+ /// @param holder The address cashing out tokens.
81
+ /// @param projectId The ID of the project cashing out tokens.
82
82
  /// @param cashOutCount The number of project tokens to cash out.
83
83
  /// @param tokenToReclaim The token to reclaim from the project's surplus.
84
84
  /// @param minTokensReclaimed The minimum number of terminal tokens expected to be reclaimed.
@@ -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,
@@ -82,8 +82,8 @@ interface IJBController is IERC165, IJBProjectUriRegistry, IJBDirectoryAccessCon
82
82
  );
83
83
 
84
84
  /// @notice A project was prepared for migration from another controller.
85
- /// @param projectId The ID of the project being prepared for migration.
86
- /// @param from The controller the project is being migrated from.
85
+ /// @param projectId The ID of the project to prepare for migration.
86
+ /// @param from The controller to migrate from.
87
87
  /// @param caller The address that called the prep migration function.
88
88
  event PrepMigration(uint256 indexed projectId, address from, address caller);
89
89
 
@@ -226,7 +226,7 @@ interface IJBController is IERC165, IJBProjectUriRegistry, IJBDirectoryAccessCon
226
226
  function pendingReservedTokenBalanceOf(uint256 projectId) external view returns (uint256);
227
227
 
228
228
  /// @notice Previews how many beneficiary and reserved tokens `mintTokensOf(...)` would produce.
229
- /// @param projectId The ID of the project whose tokens are being minted.
229
+ /// @param projectId The ID of the project to mint tokens for.
230
230
  /// @param tokenCount The number of tokens to mint, including any reserved tokens.
231
231
  /// @param useReservedPercent Whether to apply the ruleset's reserved percent.
232
232
  /// @return beneficiaryTokenCount The number of tokens that would be minted for the beneficiary.
@@ -257,7 +257,7 @@ interface IJBController is IERC165, IJBProjectUriRegistry, IJBDirectoryAccessCon
257
257
  /// @notice Adds a price feed for a project.
258
258
  /// @param projectId The ID of the project to add the feed for.
259
259
  /// @param pricingCurrency The currency the feed's output price is in terms of.
260
- /// @param unitCurrency The currency being priced by the feed.
260
+ /// @param unitCurrency The currency the feed prices.
261
261
  /// @param feed The price feed to add.
262
262
  function addPriceFeedFor(
263
263
  uint256 projectId,
@@ -268,15 +268,15 @@ interface IJBController is IERC165, IJBProjectUriRegistry, IJBDirectoryAccessCon
268
268
  external;
269
269
 
270
270
  /// @notice Burns a holder's project tokens or credits.
271
- /// @param holder The address whose tokens are being burned.
272
- /// @param projectId The ID of the project whose tokens are being burned.
271
+ /// @param holder The address to burn tokens for.
272
+ /// @param projectId The ID of the project to burn tokens for.
273
273
  /// @param tokenCount The number of tokens to burn.
274
274
  /// @param memo A memo to pass along to the emitted event.
275
275
  function burnTokensOf(address holder, uint256 projectId, uint256 tokenCount, string calldata memo) external;
276
276
 
277
277
  /// @notice Redeems credits to claim tokens into a beneficiary's account.
278
278
  /// @param holder The address to redeem credits from.
279
- /// @param projectId The ID of the project whose tokens are being claimed.
279
+ /// @param projectId The ID of the project to claim tokens for.
280
280
  /// @param tokenCount The number of tokens to claim.
281
281
  /// @param beneficiary The account the claimed tokens will go to.
282
282
  function claimTokensFor(address holder, uint256 projectId, uint256 tokenCount, address beneficiary) external;
@@ -331,7 +331,7 @@ interface IJBController is IERC165, IJBProjectUriRegistry, IJBDirectoryAccessCon
331
331
  returns (uint256 rulesetId);
332
332
 
333
333
  /// @notice Mints new project tokens or credits to a beneficiary, optionally reserving a portion.
334
- /// @param projectId The ID of the project whose tokens are being minted.
334
+ /// @param projectId The ID of the project to mint tokens for.
335
335
  /// @param tokenCount The number of tokens to mint, including any reserved tokens.
336
336
  /// @param beneficiary The address which will receive the non-reserved tokens.
337
337
  /// @param memo A memo to pass along to the emitted event.
@@ -377,14 +377,14 @@ interface IJBController is IERC165, IJBProjectUriRegistry, IJBDirectoryAccessCon
377
377
  function setTokenFor(uint256 projectId, IJBToken token) external;
378
378
 
379
379
  /// @notice Sets the name and symbol of a project's token.
380
- /// @param projectId The ID of the project whose token is being updated.
380
+ /// @param projectId The ID of the project to update the token for.
381
381
  /// @param name The new name.
382
382
  /// @param symbol The new symbol.
383
383
  function setTokenMetadataOf(uint256 projectId, string calldata name, string calldata symbol) external;
384
384
 
385
385
  /// @notice Transfers credits from one address to another.
386
386
  /// @param holder The address to transfer credits from.
387
- /// @param projectId The ID of the project whose credits are being transferred.
387
+ /// @param projectId The ID of the project to transfer credits for.
388
388
  /// @param recipient The address to transfer credits to.
389
389
  /// @param creditCount The number of credits to transfer.
390
390
  function transferCreditsFrom(address holder, uint256 projectId, address recipient, uint256 creditCount) external;
@@ -12,17 +12,17 @@ interface IJBMigratable is IERC165 {
12
12
  event Migrate(uint256 indexed projectId, IERC165 to, address caller);
13
13
 
14
14
  /// @notice Called after this controller has been set as the project's controller in the directory.
15
- /// @param from The controller being migrated from.
15
+ /// @param from The controller to migrate from.
16
16
  /// @param projectId The ID of the project that was migrated.
17
17
  function afterReceiveMigrationFrom(IERC165 from, uint256 projectId) external;
18
18
 
19
- /// @notice Prepares this controller to receive a project being migrated from another controller.
20
- /// @param from The controller being migrated from.
21
- /// @param projectId The ID of the project being migrated.
19
+ /// @notice Prepares this controller to receive a project to migrate from another controller.
20
+ /// @param from The controller to migrate from.
21
+ /// @param projectId The ID of the project to migrate.
22
22
  function beforeReceiveMigrationFrom(IERC165 from, uint256 projectId) external;
23
23
 
24
24
  /// @notice Migrates a project from this controller to another.
25
- /// @param projectId The ID of the project being migrated.
25
+ /// @param projectId The ID of the project to migrate.
26
26
  /// @param to The controller to migrate the project to.
27
27
  function migrate(uint256 projectId, IERC165 to) external;
28
28
  }
@@ -17,7 +17,7 @@ interface IJBPayoutTerminal is IJBTerminal {
17
17
  /// @notice A direct payout transfer reverted.
18
18
  /// @param projectId The ID of the project the payout was for.
19
19
  /// @param addr The address the payout was sent to.
20
- /// @param token The token being paid out.
20
+ /// @param token The token to pay out.
21
21
  /// @param amount The amount of the payout.
22
22
  /// @param fee The fee taken from the payout.
23
23
  /// @param reason The revert reason.
@@ -98,7 +98,7 @@ interface IJBPayoutTerminal is IJBTerminal {
98
98
 
99
99
  /// @notice Sends a project's payouts to its payout split group according to its ruleset's payout limits.
100
100
  /// @param projectId The ID of the project to send payouts for.
101
- /// @param token The token being paid out.
101
+ /// @param token The token to pay out.
102
102
  /// @param amount The total amount of tokens to pay out.
103
103
  /// @param currency The currency the amount is denominated in.
104
104
  /// @param minTokensPaidOut The minimum number of terminal tokens expected to be paid out.
@@ -115,7 +115,7 @@ interface IJBPayoutTerminal is IJBTerminal {
115
115
 
116
116
  /// @notice Uses a project's surplus allowance to send funds to a beneficiary.
117
117
  /// @param projectId The ID of the project to use the surplus allowance of.
118
- /// @param token The token being paid out.
118
+ /// @param token The token to pay out.
119
119
  /// @param amount The amount of the surplus allowance to use.
120
120
  /// @param currency The currency the amount is denominated in.
121
121
  /// @param minTokensPaidOut The minimum number of terminal tokens expected to be paid out.
@@ -27,7 +27,7 @@ interface IJBPermissions {
27
27
 
28
28
  /// @notice Checks if an operator has a specific permission for an account and project.
29
29
  /// @param operator The operator to check.
30
- /// @param account The account being operated on behalf of.
30
+ /// @param account The account the operator acts on behalf of.
31
31
  /// @param projectId The project ID the permission is scoped to. 0 represents all projects.
32
32
  /// @param permissionId The permission ID to check for.
33
33
  /// @param includeRoot Whether to return true if the operator has the ROOT permission.
@@ -47,7 +47,7 @@ interface IJBPermissions {
47
47
 
48
48
  /// @notice Checks if an operator has all of the specified permissions for an account and project.
49
49
  /// @param operator The operator to check.
50
- /// @param account The account being operated on behalf of.
50
+ /// @param account The account the operator acts on behalf of.
51
51
  /// @param projectId The project ID the permissions are scoped to. 0 represents all projects.
52
52
  /// @param permissionIds An array of permission IDs to check for.
53
53
  /// @param includeRoot Whether to return true if the operator has the ROOT permission.
@@ -67,13 +67,13 @@ interface IJBPermissions {
67
67
 
68
68
  /// @notice Returns the packed permissions that an operator has for an account and project.
69
69
  /// @param operator The address of the operator.
70
- /// @param account The address of the account being operated on behalf of.
70
+ /// @param account The address of the account operated on behalf of.
71
71
  /// @param projectId The project ID the permissions are scoped to. 0 is a wildcard for all projects.
72
72
  /// @return The packed permissions as a uint256 bitmap.
73
73
  function permissionsOf(address operator, address account, uint256 projectId) external view returns (uint256);
74
74
 
75
75
  /// @notice Sets permissions for an operator on behalf of an account.
76
76
  /// @param account The account setting its operator's permissions.
77
- /// @param permissionsData The data specifying the permissions the operator is being given.
77
+ /// @param permissionsData The data specifying the permissions to grant to the operator.
78
78
  function setPermissionsFor(address account, JBPermissionsData calldata permissionsData) external;
79
79
  }
@@ -13,7 +13,7 @@ interface IJBPermitTerminal is IJBTerminal {
13
13
  /// @param reason The failure reason.
14
14
  event Permit2AllowanceFailed(address indexed token, address indexed owner, bytes reason);
15
15
 
16
- /// @notice The Permit2 contract used for token approvals.
16
+ /// @notice The Permit2 contract used for gasless ERC-20 token approvals during payments.
17
17
  // forge-lint: disable-next-line(mixed-case-function)
18
18
  function PERMIT2() external returns (IPermit2);
19
19
  }
@@ -11,7 +11,7 @@ interface IJBPrices {
11
11
  /// @notice A price feed was added for a project's currency pair.
12
12
  /// @param projectId The ID of the project the price feed was added for.
13
13
  /// @param pricingCurrency The currency the feed's output price is in terms of.
14
- /// @param unitCurrency The currency being priced by the feed.
14
+ /// @param unitCurrency The currency the feed prices.
15
15
  /// @param feed The price feed that was added.
16
16
  /// @param caller The address that added the price feed.
17
17
  event AddPriceFeed(
@@ -31,7 +31,7 @@ interface IJBPrices {
31
31
  /// @notice Returns the price feed for a project's currency pair.
32
32
  /// @param projectId The ID of the project to get the price feed of.
33
33
  /// @param pricingCurrency The currency the feed's output price is in terms of.
34
- /// @param unitCurrency The currency being priced by the feed.
34
+ /// @param unitCurrency The currency the feed prices.
35
35
  /// @return The price feed for the currency pair.
36
36
  function priceFeedFor(
37
37
  uint256 projectId,
@@ -45,7 +45,7 @@ interface IJBPrices {
45
45
  /// @notice Returns the unit price for a currency pair.
46
46
  /// @param projectId The ID of the project to get the price for.
47
47
  /// @param pricingCurrency The currency the returned price is in terms of.
48
- /// @param unitCurrency The currency being priced.
48
+ /// @param unitCurrency The currency to price.
49
49
  /// @param decimals The number of decimals the returned price should use.
50
50
  /// @return The unit price.
51
51
  function pricePerUnitOf(
@@ -61,7 +61,7 @@ interface IJBPrices {
61
61
  /// @notice Adds a price feed for a project's currency pair.
62
62
  /// @param projectId The ID of the project to add the price feed for.
63
63
  /// @param pricingCurrency The currency the feed's output price is in terms of.
64
- /// @param unitCurrency The currency being priced by the feed.
64
+ /// @param unitCurrency The currency the feed prices.
65
65
  /// @param feed The price feed to add.
66
66
  function addPriceFeedFor(
67
67
  uint256 projectId,
@@ -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.
@@ -107,9 +107,9 @@ interface IJBTerminal is IERC165 {
107
107
  returns (uint256);
108
108
 
109
109
  /// @notice Simulates paying a project through this terminal without modifying state.
110
- /// @param projectId The ID of the project being paid.
111
- /// @param token The token being paid in.
112
- /// @param amount The amount of tokens being paid.
110
+ /// @param projectId The ID of the project to pay.
111
+ /// @param token The token to pay with.
112
+ /// @param amount The amount of tokens to pay.
113
113
  /// @param beneficiary The address to mint project tokens to.
114
114
  /// @param metadata Extra data to pass along to the data hook and pay hooks.
115
115
  /// @return ruleset The project's current ruleset.
@@ -139,8 +139,8 @@ interface IJBTerminal is IERC165 {
139
139
 
140
140
  /// @notice Adds funds to a project's balance.
141
141
  /// @param projectId The ID of the project to add funds to.
142
- /// @param token The token being added.
143
- /// @param amount The amount of tokens being added.
142
+ /// @param token The token added.
143
+ /// @param amount The amount of tokens added.
144
144
  /// @param shouldReturnHeldFees Whether held fees should be returned based on the amount added.
145
145
  /// @param memo A memo to pass along to the emitted event.
146
146
  /// @param metadata Extra data to pass along to the emitted event.
@@ -156,16 +156,16 @@ interface IJBTerminal is IERC165 {
156
156
  payable;
157
157
 
158
158
  /// @notice Migrates a project's funds from this terminal to another.
159
- /// @param projectId The ID of the project being migrated.
160
- /// @param token The address of the token being migrated.
159
+ /// @param projectId The ID of the project to migrate.
160
+ /// @param token The address of the token to migrate.
161
161
  /// @param to The terminal to migrate to.
162
162
  /// @return balance The amount of funds that were migrated.
163
163
  function migrateBalanceOf(uint256 projectId, address token, IJBTerminal to) external returns (uint256 balance);
164
164
 
165
165
  /// @notice Pays a project in a specified token.
166
- /// @param projectId The ID of the project being paid.
167
- /// @param token The token being paid in.
168
- /// @param amount The amount of tokens being paid.
166
+ /// @param projectId The ID of the project to pay.
167
+ /// @param token The token to pay with.
168
+ /// @param amount The amount of tokens to pay.
169
169
  /// @param beneficiary The address to mint project tokens to.
170
170
  /// @param minReturnedTokens The minimum number of project tokens expected in return.
171
171
  /// @param memo A memo to pass along to the emitted event.