@bananapus/core-v6 0.0.39 → 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.
- package/package.json +1 -1
- package/src/JBChainlinkV3SequencerPriceFeed.sol +1 -1
- package/src/JBController.sol +15 -15
- package/src/JBDirectory.sol +4 -4
- package/src/JBERC20.sol +5 -5
- package/src/JBFundAccessLimits.sol +1 -1
- package/src/JBMultiTerminal.sol +77 -77
- package/src/JBPermissions.sol +2 -2
- package/src/JBPrices.sol +3 -3
- package/src/JBRulesets.sol +1 -1
- package/src/JBSplits.sol +2 -2
- package/src/JBTerminalStore.sol +33 -33
- package/src/JBTokens.sol +6 -6
- package/src/interfaces/IJBCashOutTerminal.sol +5 -5
- package/src/interfaces/IJBController.sol +10 -10
- package/src/interfaces/IJBMigratable.sol +5 -5
- package/src/interfaces/IJBPayoutTerminal.sol +3 -3
- package/src/interfaces/IJBPermissions.sol +4 -4
- package/src/interfaces/IJBPermitTerminal.sol +1 -1
- package/src/interfaces/IJBPrices.sol +4 -4
- package/src/interfaces/IJBTerminal.sol +10 -10
- package/src/interfaces/IJBTerminalStore.sol +20 -20
- package/src/interfaces/IJBTokens.sol +6 -6
- package/src/libraries/JBCashOuts.sol +2 -2
- package/src/libraries/JBPayoutSplitGroupLib.sol +5 -5
- package/src/libraries/JBSurplus.sol +1 -1
- package/src/structs/JBAfterCashOutRecordedContext.sol +8 -8
- package/src/structs/JBAfterPayRecordedContext.sol +5 -5
- package/src/structs/JBBeforeCashOutRecordedContext.sol +7 -7
- package/src/structs/JBBeforePayRecordedContext.sol +5 -5
- package/src/structs/JBPermissionsData.sol +3 -3
- package/src/structs/JBRulesetMetadata.sol +1 -1
- package/src/structs/JBSplitHookContext.sol +2 -2
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ import {JBChainlinkV3PriceFeed} from "./JBChainlinkV3PriceFeed.sol";
|
|
|
8
8
|
|
|
9
9
|
/// @notice Extends `JBChainlinkV3PriceFeed` with L2 sequencer uptime checks (for Optimism, Arbitrum, etc.). Reverts if
|
|
10
10
|
/// the sequencer is down or has not been back online for at least `GRACE_PERIOD_TIME` seconds — preventing stale
|
|
11
|
-
/// prices from
|
|
11
|
+
/// prices from to use immediately after an outage.
|
|
12
12
|
contract JBChainlinkV3SequencerPriceFeed is JBChainlinkV3PriceFeed {
|
|
13
13
|
//*********************************************************************//
|
|
14
14
|
// --------------------------- custom errors ------------------------- //
|
package/src/JBController.sol
CHANGED
|
@@ -176,7 +176,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
|
|
|
176
176
|
/// ruleset must have `allowAddPriceFeed` enabled.
|
|
177
177
|
/// @param projectId The ID of the project to add the feed for.
|
|
178
178
|
/// @param pricingCurrency The currency the feed's output price is in terms of.
|
|
179
|
-
/// @param unitCurrency The currency
|
|
179
|
+
/// @param unitCurrency The currency the feed prices.
|
|
180
180
|
/// @param feed The address of the price feed to add.
|
|
181
181
|
function addPriceFeedFor(
|
|
182
182
|
uint256 projectId,
|
|
@@ -204,7 +204,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
|
|
|
204
204
|
|
|
205
205
|
/// @notice Called after this controller has been set as the project's controller in the directory.
|
|
206
206
|
/// @dev Can only be called by the directory.
|
|
207
|
-
/// @param from The controller
|
|
207
|
+
/// @param from The controller to migrate from.
|
|
208
208
|
/// @param projectId The ID of the project that migrated to this controller.
|
|
209
209
|
function afterReceiveMigrationFrom(IERC165 from, uint256 projectId) external view override {
|
|
210
210
|
from; // Suppress unused variable warning.
|
|
@@ -214,9 +214,9 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
|
|
|
214
214
|
if (_msgSender() != address(DIRECTORY)) revert JBController_OnlyDirectory(_msgSender(), DIRECTORY);
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
/// @notice Prepares this controller to receive a project
|
|
217
|
+
/// @notice Prepares this controller to receive a project to migrate from another controller.
|
|
218
218
|
/// @dev This controller should not be the project's controller yet.
|
|
219
|
-
/// @param from The controller
|
|
219
|
+
/// @param from The controller to migrate from.
|
|
220
220
|
/// @param projectId The ID of the project that will migrate to this controller.
|
|
221
221
|
function beforeReceiveMigrationFrom(IERC165 from, uint256 projectId) external override {
|
|
222
222
|
// Keep a reference to the sender.
|
|
@@ -243,8 +243,8 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
|
|
|
243
243
|
/// @notice Burns a holder's project tokens (or credits), permanently removing them from supply. Used by terminals
|
|
244
244
|
/// during cash outs, or directly by holders who want to burn voluntarily.
|
|
245
245
|
/// @dev Can only be called by the holder, an operator with `BURN_TOKENS` permission, or a project terminal.
|
|
246
|
-
/// @param holder The address
|
|
247
|
-
/// @param projectId The ID of the project
|
|
246
|
+
/// @param holder The address to burn tokens for.
|
|
247
|
+
/// @param projectId The ID of the project to burn tokens for.
|
|
248
248
|
/// @param tokenCount The number of tokens to burn.
|
|
249
249
|
/// @param memo A memo to pass along to the emitted event.
|
|
250
250
|
function burnTokensOf(
|
|
@@ -279,7 +279,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
|
|
|
279
279
|
/// wallet. Credits and ERC-20 tokens are interchangeable — this just makes them transferable/tradeable.
|
|
280
280
|
/// @dev Can only be called by the credit holder or an operator with `CLAIM_TOKENS` permission.
|
|
281
281
|
/// @param holder The address to redeem credits from.
|
|
282
|
-
/// @param projectId The ID of the project
|
|
282
|
+
/// @param projectId The ID of the project to claim tokens for.
|
|
283
283
|
/// @param tokenCount The number of tokens to claim.
|
|
284
284
|
/// @param beneficiary The account the claimed tokens will go to.
|
|
285
285
|
function claimTokensFor(
|
|
@@ -338,9 +338,9 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
|
|
|
338
338
|
/// terminal.
|
|
339
339
|
/// @dev Can only be called by this controller.
|
|
340
340
|
/// @param terminal The terminal to pay.
|
|
341
|
-
/// @param projectId The ID of the project
|
|
342
|
-
/// @param token The token
|
|
343
|
-
/// @param splitTokenCount The number of tokens
|
|
341
|
+
/// @param projectId The ID of the project to pay.
|
|
342
|
+
/// @param token The token to pay with.
|
|
343
|
+
/// @param splitTokenCount The number of tokens to pay.
|
|
344
344
|
/// @param beneficiary The payment's beneficiary.
|
|
345
345
|
/// @param metadata The pay metadata sent to the terminal.
|
|
346
346
|
function executePayReservedTokenToTerminal(
|
|
@@ -521,7 +521,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
|
|
|
521
521
|
/// reserved percent (which accumulates until `sendReservedTokensToSplitsOf` is called).
|
|
522
522
|
/// @dev Can be called by the project owner, an operator with `MINT_TOKENS` permission, a project terminal, or the
|
|
523
523
|
/// data hook. If `allowOwnerMinting` is false in the current ruleset, only terminals and the data hook can mint.
|
|
524
|
-
/// @param projectId The ID of the project
|
|
524
|
+
/// @param projectId The ID of the project to mint tokens for.
|
|
525
525
|
/// @param tokenCount The number of tokens to mint, including any reserved tokens.
|
|
526
526
|
/// @param beneficiary The address which will receive the (non-reserved) tokens.
|
|
527
527
|
/// @param memo A memo to pass along to the emitted event.
|
|
@@ -694,7 +694,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
|
|
|
694
694
|
/// @notice Sets the name and symbol of a project's token.
|
|
695
695
|
/// @dev Can only be called by the project's owner or an address with the owner's permission to
|
|
696
696
|
/// `SET_TOKEN_METADATA`.
|
|
697
|
-
/// @param projectId The ID of the project
|
|
697
|
+
/// @param projectId The ID of the project to update the token for.
|
|
698
698
|
/// @param name The new name.
|
|
699
699
|
/// @param symbol The new symbol.
|
|
700
700
|
function setTokenMetadataOf(uint256 projectId, string calldata name, string calldata symbol) external override {
|
|
@@ -729,7 +729,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
|
|
|
729
729
|
/// @dev Can only be called by the credit holder or an operator with `TRANSFER_CREDITS` permission. The current
|
|
730
730
|
/// ruleset must not have credit transfers paused.
|
|
731
731
|
/// @param holder The address to transfer credits from.
|
|
732
|
-
/// @param projectId The ID of the project
|
|
732
|
+
/// @param projectId The ID of the project to transfer credits for.
|
|
733
733
|
/// @param recipient The address to transfer credits to.
|
|
734
734
|
/// @param creditCount The number of credits to transfer.
|
|
735
735
|
function transferCreditsFrom(
|
|
@@ -844,7 +844,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
|
|
|
844
844
|
}
|
|
845
845
|
|
|
846
846
|
/// @notice Previews how many beneficiary and reserved tokens `mintTokensOf(...)` would produce.
|
|
847
|
-
/// @param projectId The ID of the project
|
|
847
|
+
/// @param projectId The ID of the project to mint tokens for.
|
|
848
848
|
/// @param tokenCount The number of tokens to mint, including any reserved tokens.
|
|
849
849
|
/// @param useReservedPercent Whether to apply the ruleset's reserved percent.
|
|
850
850
|
/// @return beneficiaryTokenCount The number of tokens that would be minted for the beneficiary.
|
|
@@ -960,7 +960,7 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
|
|
|
960
960
|
|
|
961
961
|
/// @notice Queues one or more rulesets and stores information pertinent to the configuration.
|
|
962
962
|
/// @param projectId The ID of the project to queue rulesets for.
|
|
963
|
-
/// @param rulesetConfigurations The rulesets
|
|
963
|
+
/// @param rulesetConfigurations The rulesets to queue.
|
|
964
964
|
/// @return rulesetId The ID of the last ruleset that was successfully queued.
|
|
965
965
|
function _queueRulesets(
|
|
966
966
|
uint256 projectId,
|
package/src/JBDirectory.sol
CHANGED
|
@@ -93,7 +93,7 @@ contract JBDirectory is JBPermissioned, Ownable, IJBDirectory {
|
|
|
93
93
|
/// `SET_CONTROLLER` permission.
|
|
94
94
|
/// - OR the caller is the project's current controller.
|
|
95
95
|
/// - OR the caller `isAllowedToSetFirstController` and the project has no controller yet.
|
|
96
|
-
/// @param projectId The ID of the project
|
|
96
|
+
/// @param projectId The ID of the project to set the controller for.
|
|
97
97
|
/// @param controller The address of the controller to set.
|
|
98
98
|
function setControllerOf(uint256 projectId, IERC165 controller) external override {
|
|
99
99
|
// Keep a reference to the current controller.
|
|
@@ -172,9 +172,9 @@ contract JBDirectory is JBPermissioned, Ownable, IJBDirectory {
|
|
|
172
172
|
/// @dev Can only be called by the project's owner or an address with `SET_PRIMARY_TERMINAL` permission. The
|
|
173
173
|
/// terminal must accept the token for this project. If the terminal isn't already in the project's terminal list,
|
|
174
174
|
/// it will be added automatically (requires `ADD_TERMINALS` permission).
|
|
175
|
-
/// @param projectId The ID of the project
|
|
175
|
+
/// @param projectId The ID of the project to set the primary terminal for.
|
|
176
176
|
/// @param token The token to set the primary terminal for.
|
|
177
|
-
/// @param terminal The terminal
|
|
177
|
+
/// @param terminal The terminal to set as the primary terminal.
|
|
178
178
|
function setPrimaryTerminalOf(uint256 projectId, address token, IJBTerminal terminal) external override {
|
|
179
179
|
// Enforce permissions.
|
|
180
180
|
_requirePermissionFrom({
|
|
@@ -209,7 +209,7 @@ contract JBDirectory is JBPermissioned, Ownable, IJBDirectory {
|
|
|
209
209
|
/// cash outs for a project. This overwrites the existing list.
|
|
210
210
|
/// @dev Can only be called by the project's owner, an address with `SET_TERMINALS` permission, or the project's
|
|
211
211
|
/// controller. Unless the caller is the controller, the ruleset must have `allowSetTerminals` enabled.
|
|
212
|
-
/// @param projectId The ID of the project
|
|
212
|
+
/// @param projectId The ID of the project to set terminals for.
|
|
213
213
|
/// @param terminals An array of terminal addresses to set for the project.
|
|
214
214
|
function setTerminalsOf(uint256 projectId, IJBTerminal[] calldata terminals) external override {
|
|
215
215
|
// Cache the controller to avoid redundant storage reads.
|
package/src/JBERC20.sol
CHANGED
|
@@ -127,7 +127,7 @@ contract JBERC20 is ERC20Votes, ERC20Permit, JBPermissioned, IERC1271, IJBToken
|
|
|
127
127
|
/// @notice Validates a signature on behalf of this token contract (ERC-1271).
|
|
128
128
|
/// @dev Allows the project owner or an operator with `SIGN_FOR_ERC20` permission to sign messages on behalf of
|
|
129
129
|
/// this token. Useful for Etherscan contract verification and other off-chain signature flows.
|
|
130
|
-
/// @param hash The hash of the data
|
|
130
|
+
/// @param hash The hash of the data to sign.
|
|
131
131
|
/// @param signature The signature to validate.
|
|
132
132
|
/// @return magicValue `0x1626ba7e` if the signature is valid, `0xffffffff` otherwise.
|
|
133
133
|
function isValidSignature(bytes32 hash, bytes memory signature) external view override returns (bytes4 magicValue) {
|
|
@@ -170,17 +170,17 @@ contract JBERC20 is ERC20Votes, ERC20Permit, JBPermissioned, IERC1271, IJBToken
|
|
|
170
170
|
return super.decimals();
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
/// @notice The token's name.
|
|
173
|
+
/// @notice The token's name, set during initialization.
|
|
174
174
|
function name() public view virtual override returns (string memory) {
|
|
175
175
|
return _name;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
/// @notice
|
|
178
|
+
/// @notice The current nonce for a given account, used for permit signatures.
|
|
179
179
|
function nonces(address owner) public view virtual override(ERC20Permit, Nonces) returns (uint256) {
|
|
180
180
|
return super.nonces(owner);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
/// @notice The token's symbol.
|
|
183
|
+
/// @notice The token's ticker symbol, set during initialization.
|
|
184
184
|
function symbol() public view virtual override returns (string memory) {
|
|
185
185
|
return _symbol;
|
|
186
186
|
}
|
|
@@ -195,7 +195,7 @@ contract JBERC20 is ERC20Votes, ERC20Permit, JBPermissioned, IERC1271, IJBToken
|
|
|
195
195
|
// ----------------------- public transactions ----------------------- //
|
|
196
196
|
//*********************************************************************//
|
|
197
197
|
|
|
198
|
-
/// @notice
|
|
198
|
+
/// @notice Initialize a new project token with the given name, symbol, and owner.
|
|
199
199
|
/// @param name_ The token's name.
|
|
200
200
|
/// @param symbol_ The token's symbol.
|
|
201
201
|
/// @param tokens The JBTokens contract that manages this token.
|
|
@@ -70,7 +70,7 @@ contract JBFundAccessLimits is JBControlled, IJBFundAccessLimits {
|
|
|
70
70
|
/// surplus. Both reset each funding cycle.
|
|
71
71
|
/// @dev Only a project's controller can set fund access limits (called during `queueRulesetsOf`).
|
|
72
72
|
/// @dev Limits within each group must be sorted by currency in strictly increasing order to prevent duplicates.
|
|
73
|
-
/// @param projectId The ID of the project
|
|
73
|
+
/// @param projectId The ID of the project to set fund access limits for.
|
|
74
74
|
/// @param rulesetId The ID of the ruleset that the limits will apply within.
|
|
75
75
|
/// @param fundAccessLimitGroups An array containing payout limits and surplus allowances for each payment terminal.
|
|
76
76
|
/// Amounts are fixed point numbers using the same number of decimals as the associated terminal.
|
package/src/JBMultiTerminal.sol
CHANGED
|
@@ -104,10 +104,10 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
104
104
|
/// @notice The directory of terminals and controllers for PROJECTS.
|
|
105
105
|
IJBDirectory public immutable override DIRECTORY;
|
|
106
106
|
|
|
107
|
-
/// @notice The contract that stores addresses that shouldn't incur fees when
|
|
107
|
+
/// @notice The contract that stores addresses that shouldn't incur fees when paid towards or from.
|
|
108
108
|
IJBFeelessAddresses public immutable override FEELESS_ADDRESSES;
|
|
109
109
|
|
|
110
|
-
/// @notice The
|
|
110
|
+
/// @notice The Permit2 contract used for token approvals and transfers.
|
|
111
111
|
IPermit2 public immutable override PERMIT2;
|
|
112
112
|
|
|
113
113
|
/// @notice Mints ERC-721s that represent project ownership and transfers.
|
|
@@ -140,23 +140,23 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
140
140
|
/// @custom:param token The token that was received.
|
|
141
141
|
mapping(uint256 projectId => mapping(address token => uint256)) internal _feeFreeSurplusOf;
|
|
142
142
|
|
|
143
|
-
/// @notice Fees
|
|
143
|
+
/// @notice Fees currently held for each project.
|
|
144
144
|
/// @dev Projects can temporarily hold fees and unlock them later by adding funds to the project's balance.
|
|
145
145
|
/// @dev Held fees can be processed at any time by this terminal's owner.
|
|
146
|
-
/// @custom:param projectId The ID of the project
|
|
147
|
-
/// @custom:param token The token
|
|
146
|
+
/// @custom:param projectId The ID of the project holding fees.
|
|
147
|
+
/// @custom:param token The token the fees are held in.
|
|
148
148
|
mapping(uint256 projectId => mapping(address token => JBFee[])) internal _heldFeesOf;
|
|
149
149
|
|
|
150
150
|
/// @notice The next index to use when processing a next held fee.
|
|
151
|
-
/// @custom:param projectId The ID of the project
|
|
152
|
-
/// @custom:param token The token
|
|
151
|
+
/// @custom:param projectId The ID of the project holding fees.
|
|
152
|
+
/// @custom:param token The token the fees are held in.
|
|
153
153
|
mapping(uint256 projectId => mapping(address token => uint256)) internal _nextHeldFeeIndexOf;
|
|
154
154
|
|
|
155
155
|
//*********************************************************************//
|
|
156
156
|
// -------------------------- constructor ---------------------------- //
|
|
157
157
|
//*********************************************************************//
|
|
158
158
|
|
|
159
|
-
/// @param feelessAddresses A contract that stores addresses that shouldn't incur fees when
|
|
159
|
+
/// @param feelessAddresses A contract that stores addresses that shouldn't incur fees when paid towards or
|
|
160
160
|
/// from.
|
|
161
161
|
/// @param permissions A contract storing permissions.
|
|
162
162
|
/// @param projects A contract which mints ERC-721s that represent project ownership and transfers.
|
|
@@ -230,8 +230,8 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
230
230
|
/// @param projectId The ID of the project to add funds to the balance of.
|
|
231
231
|
/// @param amount The amount of tokens to add to the balance, as a fixed point number with the same number of
|
|
232
232
|
/// decimals as this terminal. If this is a native token terminal, this is ignored and `msg.value` is used instead.
|
|
233
|
-
/// @param token The token
|
|
234
|
-
/// @param shouldReturnHeldFees
|
|
233
|
+
/// @param token The token to add to the balance.
|
|
234
|
+
/// @param shouldReturnHeldFees If true, return held fees proportional to the amount added.
|
|
235
235
|
/// @param memo A memo to pass along to the emitted event.
|
|
236
236
|
/// @param metadata Extra data to pass along to the emitted event.
|
|
237
237
|
function addToBalanceOf(
|
|
@@ -260,11 +260,11 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
260
260
|
/// @notice Burns project tokens to reclaim a share of the project's surplus (determined by the bonding curve) or
|
|
261
261
|
/// to trigger custom logic through the ruleset's data hook and cash out hook.
|
|
262
262
|
/// @dev Only the token holder or an operator with `CASH_OUT_TOKENS` permission from that holder can call this.
|
|
263
|
-
/// @param holder The account
|
|
263
|
+
/// @param holder The account cashing out tokens.
|
|
264
264
|
/// @param projectId The ID of the project the project tokens belong to.
|
|
265
265
|
/// @param cashOutCount The number of project tokens to cash out and burn, as a fixed point number with 18
|
|
266
266
|
/// decimals.
|
|
267
|
-
/// @param tokenToReclaim The token
|
|
267
|
+
/// @param tokenToReclaim The token to reclaim.
|
|
268
268
|
/// @param minTokensReclaimed The minimum number of terminal tokens expected in return, as a fixed point number with
|
|
269
269
|
/// the same number of decimals as this terminal. If the amount of tokens minted for the beneficiary would be less
|
|
270
270
|
/// than this amount, the cash out is reverted.
|
|
@@ -308,8 +308,8 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
308
308
|
/// @dev Only accepts calls from this terminal itself.
|
|
309
309
|
/// @param split The split to pay.
|
|
310
310
|
/// @param projectId The ID of the project the split belongs to.
|
|
311
|
-
/// @param token The address of the token
|
|
312
|
-
/// @param amount The total amount
|
|
311
|
+
/// @param token The address of the token to pay to the split.
|
|
312
|
+
/// @param amount The total amount to pay to the split, as a fixed point number with the same number of
|
|
313
313
|
/// decimals as this terminal.
|
|
314
314
|
/// @return netPayoutAmount The amount sent to the split after subtracting fees.
|
|
315
315
|
function executePayout(
|
|
@@ -457,7 +457,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
457
457
|
/// @notice Process a specified amount of fees for a project.
|
|
458
458
|
/// @dev Only accepts calls from this terminal itself.
|
|
459
459
|
/// @param projectId The ID of the project paying the fee.
|
|
460
|
-
/// @param token The token the fee is
|
|
460
|
+
/// @param token The token the fee is paid in.
|
|
461
461
|
/// @param amount The fee amount, as a fixed point number with 18 decimals.
|
|
462
462
|
/// @param beneficiary The address to mint tokens to (from the project which receives fees), and pass along to the
|
|
463
463
|
/// ruleset's data hook and pay hook if applicable.
|
|
@@ -506,9 +506,9 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
506
506
|
/// @notice Migrate a project's funds and operations to a new terminal that accepts the same token type.
|
|
507
507
|
/// @dev Only a project's owner or an operator with the `MIGRATE_TERMINAL` permission from that owner can migrate
|
|
508
508
|
/// the project's terminal.
|
|
509
|
-
/// @param projectId The ID of the project
|
|
510
|
-
/// @param token The address of the token
|
|
511
|
-
/// @param to The terminal
|
|
509
|
+
/// @param projectId The ID of the project to migrate.
|
|
510
|
+
/// @param token The address of the token to migrate.
|
|
511
|
+
/// @param to The terminal to migrate to, which will receive the project's funds and operations.
|
|
512
512
|
/// @return balance The amount of funds that were migrated, as a fixed point number with the same amount of decimals
|
|
513
513
|
/// as this terminal.
|
|
514
514
|
function migrateBalanceOf(
|
|
@@ -569,12 +569,12 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
569
569
|
}
|
|
570
570
|
|
|
571
571
|
/// @notice Pay a project with tokens. The project's current ruleset determines how many project tokens the
|
|
572
|
-
/// beneficiary
|
|
573
|
-
/// @param projectId The ID of the project
|
|
574
|
-
/// @param amount The amount of
|
|
572
|
+
/// beneficiary will receive.
|
|
573
|
+
/// @param projectId The ID of the project to pay.
|
|
574
|
+
/// @param amount The amount of tokens to send, as a fixed point number with the same number of
|
|
575
575
|
/// decimals as this terminal. If this terminal's token is native, this is ignored and `msg.value` is used in its
|
|
576
576
|
/// place.
|
|
577
|
-
/// @param token The token
|
|
577
|
+
/// @param token The token to pay with.
|
|
578
578
|
/// @param beneficiary The address to mint tokens to, and pass along to the ruleset's data hook and pay hook if
|
|
579
579
|
/// applicable.
|
|
580
580
|
/// @param minReturnedTokens The minimum number of project tokens expected in return for this payment, as a fixed
|
|
@@ -702,10 +702,10 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
702
702
|
/// @dev Payouts to non-feeless addresses incur the 2.5% protocol fee. Projects whose terminal is feeless are
|
|
703
703
|
/// exempt.
|
|
704
704
|
/// @param projectId The ID of the project having its payouts sent.
|
|
705
|
-
/// @param token The token
|
|
705
|
+
/// @param token The token to send.
|
|
706
706
|
/// @param amount The total number of terminal tokens to send, as a fixed point number with same number of decimals
|
|
707
707
|
/// as this terminal.
|
|
708
|
-
/// @param currency The expected currency of the payouts
|
|
708
|
+
/// @param currency The expected currency of the payouts. Must match the currency of one of the
|
|
709
709
|
/// project's current ruleset's payout limits.
|
|
710
710
|
/// @param minTokensPaidOut The minimum number of terminal tokens that the `amount` should be worth (if expressed
|
|
711
711
|
/// in terms of this terminal's currency), as a fixed point number with the same number of decimals as this
|
|
@@ -733,10 +733,10 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
733
733
|
/// @dev Only the project's owner or an operator with `USE_ALLOWANCE` permission can call this.
|
|
734
734
|
/// @dev Incurs the 2.5% protocol fee unless the caller is a feeless address.
|
|
735
735
|
/// @param projectId The ID of the project to use the surplus allowance of.
|
|
736
|
-
/// @param token The token
|
|
736
|
+
/// @param token The token to pay out from the surplus.
|
|
737
737
|
/// @param amount The amount of terminal tokens to use from the project's current surplus allowance, as a fixed
|
|
738
738
|
/// point number with the same amount of decimals as this terminal.
|
|
739
|
-
/// @param currency The expected currency of the amount
|
|
739
|
+
/// @param currency The expected currency of the amount to pay out. Must match the currency of one of the
|
|
740
740
|
/// project's current ruleset's surplus allowances.
|
|
741
741
|
/// @param minTokensPaidOut The minimum number of terminal tokens that should be returned from the surplus allowance
|
|
742
742
|
/// (excluding fees), as a fixed point number with 18 decimals. If the amount of surplus used would be less than
|
|
@@ -835,12 +835,12 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
835
835
|
});
|
|
836
836
|
}
|
|
837
837
|
|
|
838
|
-
/// @notice Returns the fees currently
|
|
838
|
+
/// @notice Returns the fees currently held for a project. Fees are held for 28 days after a payout before
|
|
839
839
|
/// they can be processed (sent to the fee project).
|
|
840
840
|
/// @dev Held fees can be returned to the project by calling `addToBalanceOf` with `shouldReturnHeldFees = true`
|
|
841
841
|
/// before the 28-day lock expires.
|
|
842
|
-
/// @param projectId The ID of the project
|
|
843
|
-
/// @param token The token
|
|
842
|
+
/// @param projectId The ID of the project holding fees.
|
|
843
|
+
/// @param token The token the fees are held in.
|
|
844
844
|
/// @param count The maximum number of held fees to return.
|
|
845
845
|
/// @return heldFees The held fees.
|
|
846
846
|
function heldFeesOf(
|
|
@@ -879,8 +879,8 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
879
879
|
|
|
880
880
|
/// @notice Simulates a cash out without modifying state — use this to preview how many tokens a holder would
|
|
881
881
|
/// reclaim.
|
|
882
|
-
/// @param holder The address
|
|
883
|
-
/// @param projectId The ID of the project
|
|
882
|
+
/// @param holder The address cashing out tokens.
|
|
883
|
+
/// @param projectId The ID of the project cashing out tokens.
|
|
884
884
|
/// @param cashOutCount The number of project tokens to cash out.
|
|
885
885
|
/// @param tokenToReclaim The token to reclaim from the project's surplus.
|
|
886
886
|
/// @param beneficiary The address that would receive the reclaimed tokens.
|
|
@@ -922,9 +922,9 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
922
922
|
/// @notice Simulates a payment without modifying state — use this to preview how many project tokens a payer
|
|
923
923
|
/// would
|
|
924
924
|
/// receive.
|
|
925
|
-
/// @param projectId The ID of the project
|
|
926
|
-
/// @param token The token
|
|
927
|
-
/// @param amount The amount of tokens
|
|
925
|
+
/// @param projectId The ID of the project to pay.
|
|
926
|
+
/// @param token The token to pay with.
|
|
927
|
+
/// @param amount The amount of tokens to pay.
|
|
928
928
|
/// @param beneficiary The address to mint project tokens to.
|
|
929
929
|
/// @param metadata Extra data to pass along to the data hook and pay hooks.
|
|
930
930
|
/// @return ruleset The project's current ruleset.
|
|
@@ -986,9 +986,9 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
986
986
|
//*********************************************************************//
|
|
987
987
|
|
|
988
988
|
/// @notice Accepts an incoming token.
|
|
989
|
-
/// @param projectId The ID of the project
|
|
990
|
-
/// @param token The token
|
|
991
|
-
/// @param amount The number of tokens
|
|
989
|
+
/// @param projectId The ID of the project to accept the transfer for.
|
|
990
|
+
/// @param token The token to accept.
|
|
991
|
+
/// @param amount The number of tokens to accept.
|
|
992
992
|
/// @param metadata The metadata in which permit2 context is provided.
|
|
993
993
|
/// @return amount The number of tokens which have been accepted.
|
|
994
994
|
function _acceptFundsFor(
|
|
@@ -1052,10 +1052,10 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1052
1052
|
|
|
1053
1053
|
/// @notice Adds funds to a project's balance without minting tokens.
|
|
1054
1054
|
/// @param projectId The ID of the project to add funds to the balance of.
|
|
1055
|
-
/// @param token The address of the token
|
|
1055
|
+
/// @param token The address of the token to add to the project's balance.
|
|
1056
1056
|
/// @param amount The amount of tokens to add as a fixed point number with the same number of decimals as this
|
|
1057
1057
|
/// terminal. If this is a native token terminal, this is ignored and `msg.value` is used instead.
|
|
1058
|
-
/// @param shouldReturnHeldFees
|
|
1058
|
+
/// @param shouldReturnHeldFees If true, return held fees proportional to the amount added.
|
|
1059
1059
|
/// @param memo A memo to pass along to the emitted event.
|
|
1060
1060
|
/// @param metadata Extra data to pass along to the emitted event.
|
|
1061
1061
|
function _addToBalanceOf(
|
|
@@ -1088,10 +1088,10 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1088
1088
|
|
|
1089
1089
|
/// @notice Logic to be triggered before transferring tokens from this terminal.
|
|
1090
1090
|
/// @param to The address the transfer is going to.
|
|
1091
|
-
/// @param token The token
|
|
1092
|
-
/// @param amount The number of tokens
|
|
1091
|
+
/// @param token The token to transfer.
|
|
1092
|
+
/// @param amount The number of tokens to transfer, as a fixed point number with the same number of decimals
|
|
1093
1093
|
/// as this terminal.
|
|
1094
|
-
/// @return payValue The value to attach to the transaction
|
|
1094
|
+
/// @return payValue The value to attach to the transaction.
|
|
1095
1095
|
function _beforeTransferTo(address to, address token, uint256 amount) internal returns (uint256) {
|
|
1096
1096
|
// If the token is the native token, no allowance needed, and the full amount should be used as the payValue.
|
|
1097
1097
|
if (token == JBConstants.NATIVE_TOKEN) return amount;
|
|
@@ -1131,9 +1131,9 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1131
1131
|
/// those
|
|
1132
1132
|
/// tokens.
|
|
1133
1133
|
/// @param holder The account cashing out tokens.
|
|
1134
|
-
/// @param projectId The ID of the project
|
|
1134
|
+
/// @param projectId The ID of the project cashing out tokens.
|
|
1135
1135
|
/// @param cashOutCount The number of project tokens to cash out, as a fixed point number with 18 decimals.
|
|
1136
|
-
/// @param tokenToReclaim The address of the token
|
|
1136
|
+
/// @param tokenToReclaim The address of the token to reclaim.
|
|
1137
1137
|
/// @param beneficiary The address to send the reclaimed terminal tokens to.
|
|
1138
1138
|
/// @param metadata Bytes to send along to the emitted event, as well as the data hook and cash out hook if
|
|
1139
1139
|
/// applicable.
|
|
@@ -1281,9 +1281,9 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1281
1281
|
/// @notice Fund a project either by calling this terminal's internal `addToBalance` function or by calling the
|
|
1282
1282
|
/// recipient terminal's `addToBalance` function.
|
|
1283
1283
|
/// @param terminal The terminal on which the project is expecting to receive funds.
|
|
1284
|
-
/// @param projectId The ID of the project
|
|
1285
|
-
/// @param token The token
|
|
1286
|
-
/// @param amount The amount
|
|
1284
|
+
/// @param projectId The ID of the project to fund.
|
|
1285
|
+
/// @param token The token to use.
|
|
1286
|
+
/// @param amount The amount to fund, as a fixed point number with the amount of decimals that the terminal's
|
|
1287
1287
|
/// accounting context specifies.
|
|
1288
1288
|
/// @param metadata Additional metadata to include with the payment.
|
|
1289
1289
|
function _efficientAddToBalance(
|
|
@@ -1316,9 +1316,9 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1316
1316
|
/// @notice Pay a project either by calling this terminal's internal `pay` function or by calling the recipient
|
|
1317
1317
|
/// terminal's `pay` function.
|
|
1318
1318
|
/// @param terminal The terminal on which the project is expecting to receive payments.
|
|
1319
|
-
/// @param projectId The ID of the project
|
|
1320
|
-
/// @param token The token
|
|
1321
|
-
/// @param amount The amount
|
|
1319
|
+
/// @param projectId The ID of the project to pay.
|
|
1320
|
+
/// @param token The token to pay with.
|
|
1321
|
+
/// @param amount The amount to pay, as a fixed point number with the amount of decimals that the terminal's
|
|
1322
1322
|
/// accounting context specifies.
|
|
1323
1323
|
/// @param beneficiary The address to receive any platform tokens minted.
|
|
1324
1324
|
/// @param metadata Additional metadata to include with the payment.
|
|
@@ -1368,9 +1368,9 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1368
1368
|
|
|
1369
1369
|
/// @notice Fund a project on another terminal by granting a temporary pull allowance for this call only.
|
|
1370
1370
|
/// @param terminal The recipient terminal.
|
|
1371
|
-
/// @param projectId The ID of the project
|
|
1372
|
-
/// @param token The token
|
|
1373
|
-
/// @param amount The amount
|
|
1371
|
+
/// @param projectId The ID of the project to fund.
|
|
1372
|
+
/// @param token The token to use.
|
|
1373
|
+
/// @param amount The amount to fund.
|
|
1374
1374
|
/// @param metadata Additional metadata to include with the payment.
|
|
1375
1375
|
function _externalAddToBalance(
|
|
1376
1376
|
IJBTerminal terminal,
|
|
@@ -1402,15 +1402,15 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
1404
|
/// @notice Fulfills a list of cash out hook specifications.
|
|
1405
|
-
/// @param projectId The ID of the project
|
|
1406
|
-
/// @param beneficiaryReclaimAmount The number of tokens
|
|
1407
|
-
/// @param holder The address
|
|
1408
|
-
/// @param cashOutCount The number of tokens
|
|
1405
|
+
/// @param projectId The ID of the project to cash out from.
|
|
1406
|
+
/// @param beneficiaryReclaimAmount The number of tokens to cash out from the project.
|
|
1407
|
+
/// @param holder The address holding the tokens to cash out.
|
|
1408
|
+
/// @param cashOutCount The number of tokens to cash out.
|
|
1409
1409
|
/// @param metadata Bytes to send along to the emitted event and cash out hooks as applicable.
|
|
1410
|
-
/// @param ruleset The ruleset
|
|
1410
|
+
/// @param ruleset The ruleset active during this cash out as a `JBRuleset` struct.
|
|
1411
1411
|
/// @param cashOutTaxRate The cash out tax rate influencing the reclaim amount.
|
|
1412
1412
|
/// @param beneficiary The address which will receive any terminal tokens that are cashed out.
|
|
1413
|
-
/// @param specifications The hook specifications
|
|
1413
|
+
/// @param specifications The hook specifications to fulfill.
|
|
1414
1414
|
/// @return amountEligibleForFees The amount of funds which were allocated to cash out hooks and are eligible for
|
|
1415
1415
|
/// fees.
|
|
1416
1416
|
function _fulfillCashOutHookSpecificationsFor(
|
|
@@ -1503,13 +1503,13 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
|
|
1505
1505
|
/// @notice Fulfills a list of pay hook specifications.
|
|
1506
|
-
/// @param projectId The ID of the project
|
|
1506
|
+
/// @param projectId The ID of the project to pay.
|
|
1507
1507
|
/// @param specifications The pay hook specifications to be fulfilled.
|
|
1508
1508
|
/// @param tokenAmount The amount of tokens that the project was paid.
|
|
1509
1509
|
/// @param payer The address that sent the payment.
|
|
1510
|
-
/// @param ruleset The ruleset
|
|
1510
|
+
/// @param ruleset The ruleset active during this payment.
|
|
1511
1511
|
/// @param beneficiary The address which will receive any tokens that the payment yields.
|
|
1512
|
-
/// @param newlyIssuedTokenCount The
|
|
1512
|
+
/// @param newlyIssuedTokenCount The number of tokens issued and sent to the beneficiary.
|
|
1513
1513
|
/// @param metadata Bytes to send along to the emitted event and pay hooks as applicable.
|
|
1514
1514
|
function _fulfillPayHookSpecificationsFor(
|
|
1515
1515
|
uint256 projectId,
|
|
@@ -1590,9 +1590,9 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1590
1590
|
|
|
1591
1591
|
/// @notice Internal implementation of payment logic. Records the payment in the store, mints tokens via the
|
|
1592
1592
|
/// controller, and fulfills any pay hook specifications from the data hook.
|
|
1593
|
-
/// @param projectId The ID of the project
|
|
1594
|
-
/// @param token The address of the token
|
|
1595
|
-
/// @param amount The amount of
|
|
1593
|
+
/// @param projectId The ID of the project to pay.
|
|
1594
|
+
/// @param token The address of the token to pay the project with.
|
|
1595
|
+
/// @param amount The amount of tokens to send, as a fixed point number with the same number of
|
|
1596
1596
|
/// decimals as this terminal. If this terminal's token is the native token, `amount` is ignored and `msg.value` is
|
|
1597
1597
|
/// used in its place.
|
|
1598
1598
|
/// @param payer The address making the payment.
|
|
@@ -1671,11 +1671,11 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1671
1671
|
|
|
1672
1672
|
/// @notice Process a fee of the specified amount from a project.
|
|
1673
1673
|
/// @param projectId The ID of the project paying the fee.
|
|
1674
|
-
/// @param token The token the fee is
|
|
1674
|
+
/// @param token The token the fee is paid in.
|
|
1675
1675
|
/// @param amount The fee amount, as a fixed point number with 18 decimals.
|
|
1676
1676
|
/// @param beneficiary The address which will receive any platform tokens minted.
|
|
1677
1677
|
/// @param feeTerminal The terminal that'll receive the fee.
|
|
1678
|
-
/// @param wasHeld A flag indicating if the fee
|
|
1678
|
+
/// @param wasHeld A flag indicating if the fee to process was held by this terminal.
|
|
1679
1679
|
function _processFee(
|
|
1680
1680
|
uint256 projectId,
|
|
1681
1681
|
address token,
|
|
@@ -1730,7 +1730,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1730
1730
|
/// @notice Returns held fees to the project who paid them based on the specified amount.
|
|
1731
1731
|
/// @dev Partial replenishments use the raw floor calculation so repaying a dust amount cannot both credit the
|
|
1732
1732
|
/// payer project and leave the fee project owed the 1-unit minimum fee.
|
|
1733
|
-
/// @param projectId The project held fees
|
|
1733
|
+
/// @param projectId The project to return held fees to.
|
|
1734
1734
|
/// @param token The token that the held fees are in.
|
|
1735
1735
|
/// @param amount The amount to base the calculation on, as a fixed point number with the same number of decimals
|
|
1736
1736
|
/// as this terminal.
|
|
@@ -1811,10 +1811,10 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1811
1811
|
|
|
1812
1812
|
/// @notice Sends payouts to a project's payout split group using the specified ruleset.
|
|
1813
1813
|
/// @param projectId The ID of the project to send the payouts of.
|
|
1814
|
-
/// @param token The token
|
|
1814
|
+
/// @param token The token to pay out.
|
|
1815
1815
|
/// @param amount The number of terminal tokens to pay out, as a fixed point number with same number of decimals as
|
|
1816
1816
|
/// this terminal.
|
|
1817
|
-
/// @param currency The expected currency of the amount
|
|
1817
|
+
/// @param currency The expected currency of the amount to pay out. Must match the currency of one of the
|
|
1818
1818
|
/// project's current ruleset's payout limits.
|
|
1819
1819
|
/// @return amountPaidOut The total amount that was paid out.
|
|
1820
1820
|
function _sendPayoutsOf(
|
|
@@ -1925,10 +1925,10 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1925
1925
|
|
|
1926
1926
|
/// @notice Takes a fee into the platform's project (with the `_FEE_BENEFICIARY_PROJECT_ID`).
|
|
1927
1927
|
/// @param projectId The ID of the project paying the fee.
|
|
1928
|
-
/// @param token The address of the token that the fee is
|
|
1928
|
+
/// @param token The address of the token that the fee is paid in.
|
|
1929
1929
|
/// @param amount The fee's token amount, as a fixed point number with 18 decimals.
|
|
1930
1930
|
/// @param beneficiary The address to mint the platform's project's tokens for.
|
|
1931
|
-
/// @param shouldHoldFees If fees should be tracked and held instead of
|
|
1931
|
+
/// @param shouldHoldFees If fees should be tracked and held instead of processing them immediately.
|
|
1932
1932
|
/// @return feeAmount The amount of the fee taken.
|
|
1933
1933
|
function _takeFeeFrom(
|
|
1934
1934
|
uint256 projectId,
|
|
@@ -1981,8 +1981,8 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
1981
1981
|
/// @notice Transfers tokens.
|
|
1982
1982
|
/// @param from The address the transfer should originate from.
|
|
1983
1983
|
/// @param to The address the transfer should go to.
|
|
1984
|
-
/// @param token The token
|
|
1985
|
-
/// @param amount The number of tokens
|
|
1984
|
+
/// @param token The token to transfer.
|
|
1985
|
+
/// @param amount The number of tokens to transfer, as a fixed point number with the same number of decimals
|
|
1986
1986
|
/// as this terminal.
|
|
1987
1987
|
function _transferFrom(address from, address payable to, address token, uint256 amount) internal {
|
|
1988
1988
|
if (from == address(this)) {
|
|
@@ -2011,10 +2011,10 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
2011
2011
|
/// @dev Incurs the protocol fee unless the caller is a feeless address.
|
|
2012
2012
|
/// @param projectId The ID of the project to use the surplus allowance of.
|
|
2013
2013
|
/// @param owner The project's owner.
|
|
2014
|
-
/// @param token The token
|
|
2014
|
+
/// @param token The token to pay out from the surplus.
|
|
2015
2015
|
/// @param amount The amount of terminal tokens to use from the project's current surplus allowance, as a fixed
|
|
2016
2016
|
/// point number with the same amount of decimals as this terminal.
|
|
2017
|
-
/// @param currency The expected currency of the amount
|
|
2017
|
+
/// @param currency The expected currency of the amount to pay out. Must match the currency of one of the
|
|
2018
2018
|
/// project's current ruleset's surplus allowances.
|
|
2019
2019
|
/// @param beneficiary The address to send the funds to.
|
|
2020
2020
|
/// @param feeBeneficiary The address to send the tokens resulting from paying the fee.
|
|
@@ -2174,7 +2174,7 @@ contract JBMultiTerminal is JBPermissioned, ERC2771Context, IJBMultiTerminal {
|
|
|
2174
2174
|
|
|
2175
2175
|
/// @notice Packages a payment amount with the token's accounting context.
|
|
2176
2176
|
/// @param projectId The ID of the project the token amount belongs to.
|
|
2177
|
-
/// @param token The token
|
|
2177
|
+
/// @param token The token to pay with.
|
|
2178
2178
|
/// @param value The token amount's value.
|
|
2179
2179
|
/// @return tokenAmount The packaged token amount.
|
|
2180
2180
|
function _tokenAmountOf(
|