@bananapus/suckers-v6 0.0.34 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bananapus/suckers-v6",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -151,7 +151,7 @@ contract JBArbitrumSucker is JBSucker, IJBArbitrumSucker {
151
151
  /// @notice Uses the L1/L2 gateway to send the root and assets over the bridge to the peer.
152
152
  /// @param transportPayment the amount of `msg.value` that is going to get paid for sending this message.
153
153
  /// @param token The token to bridge the outbox tree for.
154
- /// @param remoteToken Information about the remote token being bridged to.
154
+ /// @param remoteToken Information about the remote token to bridge to.
155
155
  // forge-lint: disable-next-line(mixed-case-function)
156
156
  function _sendRootOverAMB(
157
157
  uint256 transportPayment,
@@ -201,7 +201,7 @@ contract JBCCIPSucker is JBSucker, IAny2EVMMessageReceiver {
201
201
  /// @param transportPayment The amount of `msg.value` that is going to get paid for sending this message.
202
202
  /// @param token The token to bridge the outbox tree for.
203
203
  /// @param amount The amount of tokens to bridge.
204
- /// @param remoteToken Information about the remote token being bridged to.
204
+ /// @param remoteToken Information about the remote token to bridge to.
205
205
  /// @param sucker_message The message root to send to the remote peer.
206
206
  // forge-lint: disable-next-line(mixed-case-function)
207
207
  function _sendRootOverAMB(
@@ -122,7 +122,7 @@ contract JBCeloSucker is JBOptimismSucker {
122
122
  /// `nativeValue = 0` because Celo's native token is CELO (not ETH), so we never attach ETH as msg.value.
123
123
  /// @param transportPayment the amount of `msg.value` that is going to get paid for sending this message.
124
124
  /// @param token The token to bridge the outbox tree for.
125
- /// @param remoteToken Information about the remote token being bridged to.
125
+ /// @param remoteToken Information about the remote token to bridge to.
126
126
  // forge-lint: disable-next-line(mixed-case-function)
127
127
  function _sendRootOverAMB(
128
128
  uint256 transportPayment,
@@ -87,7 +87,7 @@ contract JBOptimismSucker is JBSucker, IJBOptimismSucker {
87
87
  /// over the `OPBRIDGE`.
88
88
  /// @param transportPayment the amount of `msg.value` that is going to get paid for sending this message.
89
89
  /// @param token The token to bridge the outbox tree for.
90
- /// @param remoteToken Information about the remote token being bridged to.
90
+ /// @param remoteToken Information about the remote token to bridge to.
91
91
  // forge-lint: disable-next-line(mixed-case-function)
92
92
  function _sendRootOverAMB(
93
93
  uint256 transportPayment,
package/src/JBSucker.sol CHANGED
@@ -389,7 +389,7 @@ abstract contract JBSucker is ERC2771Context, JBPermissioned, Initializable, ERC
389
389
  /// messages time to arrive, accepting roots after deprecation provides a stronger guarantee that users can always
390
390
  /// claim their bridged tokens. Double-spend is not a concern because `toRemote` is already disabled in
391
391
  /// `SENDING_DISABLED` and `DEPRECATED` states, so no new outbound transfers can occur.
392
- /// @param root The merkle root, token, and amount being received.
392
+ /// @param root The merkle root, token, and amount to receive.
393
393
  function fromRemote(JBMessageRoot calldata root) external payable {
394
394
  // Make sure that the message came from our peer.
395
395
  // Use msg.sender (not _msgSender()) because bridge messengers never use ERC2771 meta-transactions.
@@ -620,7 +620,7 @@ abstract contract JBSucker is ERC2771Context, JBPermissioned, Initializable, ERC
620
620
  /// for the original caller instead of being added back to `transportPayment`. This preserves
621
621
  /// `transportPayment = msg.value - fee`, which is critical for zero-cost bridges (OP, Base, Celo, Arb L2->L1)
622
622
  /// that revert on non-zero transport payment. The retained fee is excluded from `amountToAddToBalanceOf`.
623
- /// @param token The terminal token being bridged.
623
+ /// @param token The terminal token to bridge.
624
624
  function toRemote(address token) external payable override {
625
625
  JBRemoteToken memory remoteToken = _remoteTokenFor[token];
626
626
 
@@ -963,7 +963,7 @@ abstract contract JBSucker is ERC2771Context, JBPermissioned, Initializable, ERC
963
963
  }
964
964
 
965
965
  /// @notice The action(s) to perform after a user has succesfully proven their claim.
966
- /// @param terminalToken The terminal token being sucked.
966
+ /// @param terminalToken The terminal token to suck.
967
967
  /// @param terminalTokenAmount The amount of terminal tokens.
968
968
  /// @param projectTokenAmount The amount of project tokens.
969
969
  /// @param beneficiary The beneficiary of the project tokens (bytes32 for cross-VM compatibility).
@@ -1000,8 +1000,8 @@ abstract contract JBSucker is ERC2771Context, JBPermissioned, Initializable, ERC
1000
1000
  }
1001
1001
 
1002
1002
  /// @notice Inserts a new leaf into the outbox merkle tree for the specified `token`.
1003
- /// @param projectTokenCount The amount of project tokens being cashed out.
1004
- /// @param token The terminal token being cashed out for.
1003
+ /// @param projectTokenCount The amount of project tokens to cash out.
1004
+ /// @param token The terminal token to cash out for.
1005
1005
  /// @param terminalTokenAmount The amount of terminal tokens reclaimed by cashing out.
1006
1006
  /// @param beneficiary The beneficiary of the project tokens on the remote chain (bytes32 for cross-VM
1007
1007
  /// compatibility).
@@ -1127,7 +1127,7 @@ abstract contract JBSucker is ERC2771Context, JBPermissioned, Initializable, ERC
1127
1127
  }
1128
1128
 
1129
1129
  /// @notice Cash out project tokens for terminal tokens.
1130
- /// @param projectToken The project token being cashed out (unused, kept for interface compatibility).
1130
+ /// @param projectToken The project token to cash out (unused, kept for interface compatibility).
1131
1131
  /// @param count The number of project tokens to cash out.
1132
1132
  /// @param token The terminal token to cash out for.
1133
1133
  /// @param minTokensReclaimed The minimum amount of terminal tokens to reclaim. If the amount reclaimed is less than
@@ -1245,8 +1245,8 @@ abstract contract JBSucker is ERC2771Context, JBPermissioned, Initializable, ERC
1245
1245
  /// @dev This is chain/sucker/bridge specific logic.
1246
1246
  /// @param transportPayment The amount of `msg.value` that is going to get paid for sending this message.
1247
1247
  /// @param index The index of the most recent message that is part of the root.
1248
- /// @param token The terminal token being bridged.
1249
- /// @param amount The amount of terminal tokens being bridged.
1248
+ /// @param token The terminal token to bridge.
1249
+ /// @param amount The amount of terminal tokens to bridge.
1250
1250
  /// @param remoteToken The remote token which the terminal token is mapped to.
1251
1251
  /// @param message The message/root to send to the remote chain.
1252
1252
  // forge-lint: disable-next-line(mixed-case-function)
@@ -1268,7 +1268,7 @@ abstract contract JBSucker is ERC2771Context, JBPermissioned, Initializable, ERC
1268
1268
  /// @param terminalToken The terminal token that the project tokens were cashed out for.
1269
1269
  /// @param terminalTokenAmount The amount of terminal tokens reclaimed by the cash out.
1270
1270
  /// @param beneficiary The beneficiary of the project tokens (bytes32 for cross-VM compatibility).
1271
- /// @param index The index of the leaf being proved in the terminal token's inbox tree.
1271
+ /// @param index The index of the leaf to prove in the terminal token's inbox tree.
1272
1272
  /// @param leaves The leaves that prove that the leaf at the `index` is in the tree (i.e. the merkle branch that the
1273
1273
  /// leaf is on).
1274
1274
  function _validate(
@@ -1364,7 +1364,7 @@ abstract contract JBSucker is ERC2771Context, JBPermissioned, Initializable, ERC
1364
1364
  /// @param terminalToken The terminal token that the project tokens were cashed out for.
1365
1365
  /// @param terminalTokenAmount The amount of terminal tokens reclaimed by the cash out.
1366
1366
  /// @param beneficiary The beneficiary of the project tokens (bytes32 for cross-VM compatibility).
1367
- /// @param index The index of the leaf being proved in the terminal token's inbox tree.
1367
+ /// @param index The index of the leaf to prove in the terminal token's inbox tree.
1368
1368
  /// @param leaves The leaves that prove that the leaf at the `index` is in the tree (i.e. the merkle branch that the
1369
1369
  /// leaf is on).
1370
1370
  function _validateForEmergencyExit(
@@ -1467,8 +1467,8 @@ abstract contract JBSucker is ERC2771Context, JBPermissioned, Initializable, ERC
1467
1467
  }
1468
1468
 
1469
1469
  /// @notice Builds a hash as they are stored in the merkle tree.
1470
- /// @param projectTokenCount The number of project tokens being cashed out.
1471
- /// @param terminalTokenAmount The amount of terminal tokens being reclaimed by the cash out.
1470
+ /// @param projectTokenCount The number of project tokens to cash out.
1471
+ /// @param terminalTokenAmount The amount of terminal tokens to reclaim from the cash out.
1472
1472
  /// @param beneficiary The beneficiary which will receive the project tokens (bytes32 for cross-VM compatibility).
1473
1473
  /// @return hash The keccak256 hash of the leaf data.
1474
1474
  function _buildTreeHash(
@@ -1605,9 +1605,9 @@ abstract contract JBSucker is ERC2771Context, JBPermissioned, Initializable, ERC
1605
1605
  /// @dev Delegates snapshot construction to JBSuckerLib (deployed library, called via DELEGATECALL) to reduce
1606
1606
  /// child contract bytecode.
1607
1607
  /// @param transportPayment The amount of `msg.value` that is going to get paid for sending this message.
1608
- /// @param token The terminal token being bridged.
1608
+ /// @param token The terminal token to bridge.
1609
1609
  /// @param remoteToken The remote token which the terminal token is mapped to.
1610
- /// @param amount The amount of terminal tokens being bridged.
1610
+ /// @param amount The amount of terminal tokens to bridge.
1611
1611
  /// @param nonce The outbox nonce for this send.
1612
1612
  /// @param root The merkle root of the outbox tree.
1613
1613
  /// @param index The index of the most recent message that is part of the root.
@@ -401,8 +401,8 @@ contract JBSuckerRegistry is ERC2771Context, Ownable, JBPermissioned, IJBSuckerR
401
401
  /// @param values The aggregate values recorded so far.
402
402
  /// @param hasActiveValue Whether the recorded value for each index came from an active sucker.
403
403
  /// @param chainCount The number of populated chain entries.
404
- /// @param chainId The peer-chain id being recorded.
405
- /// @param value The value being recorded.
404
+ /// @param chainId The peer-chain id to record.
405
+ /// @param value The value to record.
406
406
  /// @param isActive Whether the value came from an active sucker.
407
407
  /// @return The updated number of populated chain entries.
408
408
  function _recordPeerValue(
@@ -184,7 +184,7 @@ contract JBSwapCCIPSucker is JBCCIPSucker, IUnlockCallback, IUniswapV3SwapCallba
184
184
  // ------------------- transient stored properties ------------------- //
185
185
  //*********************************************************************//
186
186
 
187
- /// @notice Leaf index + 1 of the claim currently being processed (set by `claim` override).
187
+ /// @notice Leaf index + 1 of the claim currently in progress (set by the `claim` override).
188
188
  /// @dev Transient storage — auto-resets to 0 each transaction, saving ~9,800 gas per claim vs SSTORE.
189
189
  /// Value 0 means no active claim (bypass scaling); non-zero means leafIndex = value - 1.
190
190
  uint256 transient _currentClaimLeafIndex;
@@ -370,8 +370,8 @@ contract JBSwapCCIPSucker is JBCCIPSucker, IUnlockCallback, IUniswapV3SwapCallba
370
370
  }
371
371
 
372
372
  /// @notice Uniswap V3 swap callback — delegates to JBSwapPoolLib (via DELEGATECALL) to reduce bytecode.
373
- /// @param amount0Delta The amount of token0 being used for the swap.
374
- /// @param amount1Delta The amount of token1 being used for the swap.
373
+ /// @param amount0Delta The amount of token0 used for the swap.
374
+ /// @param amount1Delta The amount of token1 used for the swap.
375
375
  /// @param data Encoded (originalTokenIn, normalizedTokenIn, normalizedTokenOut).
376
376
  function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external override {
377
377
  JBSwapPoolLib.executeV3SwapCallback({
@@ -502,7 +502,7 @@ contract JBSwapCCIPSucker is JBCCIPSucker, IUnlockCallback, IUniswapV3SwapCallba
502
502
  /// Delegates CCIP message construction to JBCCIPLib (via DELEGATECALL) to reduce bytecode.
503
503
  /// @param transportPayment The ETH sent for CCIP fees.
504
504
  /// @param index The last leaf index in the current batch.
505
- /// @param token The local token being bridged.
505
+ /// @param token The local token to bridge.
506
506
  /// @param amount The amount of local tokens to bridge.
507
507
  /// @param remoteToken The remote token configuration (including minGas).
508
508
  /// @param sucker_message The merkle root message to send to the remote chain.
@@ -4,7 +4,7 @@ pragma solidity ^0.8.0;
4
4
  /// @notice Optional data-hook interface for adding project-specific adjusted accounts to peer-chain snapshots.
5
5
  interface IJBPeerChainAdjustedAccounts {
6
6
  /// @notice Extra supply, surplus, and balance that should be included in cross-chain peer snapshots.
7
- /// @param projectId The ID of the project being snapshotted.
7
+ /// @param projectId The ID of the project to snapshot.
8
8
  /// @param decimals The decimals the returned surplus and balance should use.
9
9
  /// @param currency The currency the returned surplus and balance should be in terms of.
10
10
  /// @return supply The extra supply to include in `sourceTotalSupply`.
@@ -61,8 +61,8 @@ interface IJBSucker is IERC165 {
61
61
  event NewInboxTreeRoot(address indexed token, uint64 nonce, bytes32 root, address caller);
62
62
 
63
63
  /// @notice Emitted when the outbox tree root and bridged assets are sent to the remote peer.
64
- /// @param root The outbox tree root being sent.
65
- /// @param token The terminal token being bridged.
64
+ /// @param root The outbox tree root sent to the remote peer.
65
+ /// @param token The terminal token to bridge.
66
66
  /// @param index The current outbox tree index.
67
67
  /// @param nonce The nonce assigned to this root message.
68
68
  /// @param caller The address that initiated the send.
@@ -7,7 +7,7 @@ interface IL1ArbitrumGateway {
7
7
  /// @param _token The L1 token address.
8
8
  /// @param _from The sender on L1.
9
9
  /// @param _to The recipient on L2.
10
- /// @param _amount The amount of tokens being bridged.
10
+ /// @param _amount The amount of tokens to bridge.
11
11
  /// @param _data Additional data (forwarded to the L2 gateway).
12
12
  /// @return The ABI-encoded calldata for `finalizeInboundTransfer` on the L2 gateway.
13
13
  function getOutboundCalldata(
@@ -25,7 +25,7 @@ library JBCCIPLib {
25
25
  /// @param token The token to bridge (may be NATIVE_TOKEN).
26
26
  /// @param amount The amount to bridge.
27
27
  /// @return tokenAmounts The CCIP token amounts array (length 0 or 1).
28
- /// @return bridgeToken The actual ERC-20 token address being bridged (WETH if native was wrapped).
28
+ /// @return bridgeToken The actual ERC-20 token address to bridge (WETH if native was wrapped).
29
29
  function prepareTokenAmounts(
30
30
  ICCIPRouter ccipRouter,
31
31
  address token,
@@ -19,7 +19,7 @@ library JBRelayBeneficiary {
19
19
  /// @dev Returns `beneficiary` unchanged if the payer is not a registered sucker or if no relay data is found.
20
20
  /// @param payer The address that called `terminal.pay()` (i.e. `context.payer`).
21
21
  /// @param beneficiary The beneficiary set in the payment context (i.e. `context.beneficiary`).
22
- /// @param projectId The project being paid.
22
+ /// @param projectId The project to pay.
23
23
  /// @param metadata The payment metadata (`context.payerMetadata` or `context.metadata`).
24
24
  /// @param registry The sucker registry used to verify that `payer` is a legitimate sucker.
25
25
  /// @return effectiveBeneficiary The resolved beneficiary — the relay address if valid, or the original.
@@ -227,7 +227,7 @@ library JBSuckerLib {
227
227
  /// @param prices The price oracle to use for non-ETH terminal-token balances.
228
228
  /// @param projectId The project ID.
229
229
  /// @param remoteToken The remote token bytes32 address.
230
- /// @param amount The amount of terminal tokens being bridged.
230
+ /// @param amount The amount of terminal tokens to bridge.
231
231
  /// @param nonce The outbox nonce for this send.
232
232
  /// @param root The merkle root of the outbox tree.
233
233
  /// @param messageVersion The message format version.
@@ -269,8 +269,8 @@ library JBSuckerLib {
269
269
  /// @notice Optional project-specific adjusted accounts to add to peer-chain snapshots.
270
270
  /// @dev Reads the current ruleset's data hook and asks it for extra supply/surplus. Non-supporting hooks,
271
271
  /// broken hooks, and short return data are ignored so a project's baseline snapshot remains usable.
272
- /// @param controller The controller for the project being snapshotted.
273
- /// @param projectId The project being snapshotted.
272
+ /// @param controller The controller for the project to snapshot.
273
+ /// @param projectId The project to snapshot.
274
274
  /// @return additionalSupply The supply to add to `sourceTotalSupply`.
275
275
  /// @return additionalSurplus The surplus to add to `sourceSurplus`, denominated in ETH at 18 decimals.
276
276
  /// @return additionalBalance The balance to add to `sourceBalance`, denominated in ETH at 18 decimals.
@@ -308,7 +308,7 @@ library JBSuckerLib {
308
308
  /// @notice Builds the local accounting values used in outbound peer-chain snapshots.
309
309
  /// @param directory The JB directory to look up controllers and terminals.
310
310
  /// @param prices The price oracle to use for non-ETH terminal-token balances.
311
- /// @param projectId The project being snapshotted.
311
+ /// @param projectId The project to snapshot.
312
312
  /// @return localTotalSupply The total project token supply, including reserved tokens.
313
313
  /// @return ethSurplus The terminal surplus denominated in ETH at 18 decimals.
314
314
  /// @return ethBalance The terminal balance denominated in ETH at 18 decimals.
@@ -54,7 +54,7 @@ library JBSwapLib {
54
54
  //*********************************************************************//
55
55
 
56
56
  /// @notice Estimate the price impact of a swap, scaled by IMPACT_PRECISION.
57
- /// @param amountIn The amount of tokens being swapped in.
57
+ /// @param amountIn The amount of tokens to swap in.
58
58
  /// @param liquidity The pool's in-range liquidity.
59
59
  /// @param sqrtP The sqrt price in Q96 format.
60
60
  /// @param zeroForOne Whether the swap is token0 -> token1.
@@ -84,7 +84,7 @@ library JBSwapLib {
84
84
 
85
85
  /// @notice Compute a sqrtPriceLimitX96 from input/output amounts so the swap stops
86
86
  /// if the execution price would be worse than the minimum acceptable rate.
87
- /// @param amountIn The amount of tokens being swapped in.
87
+ /// @param amountIn The amount of tokens to swap in.
88
88
  /// @param minimumAmountOut The minimum acceptable output.
89
89
  /// @param zeroForOne True when selling token0 for token1 (price decreases).
90
90
  /// @return sqrtPriceLimit The V3-compatible sqrtPriceLimitX96.
@@ -260,8 +260,8 @@ library JBSwapPoolLib {
260
260
  /// `uniswapV3SwapCallback` so the V3 callback logic lives in library bytecode.
261
261
  /// @dev DELEGATECALL preserves msg.sender (the V3 pool), allowing pool verification.
262
262
  /// @param v3Factory The Uniswap V3 factory for pool verification.
263
- /// @param amount0Delta The amount of token0 being used for the swap.
264
- /// @param amount1Delta The amount of token1 being used for the swap.
263
+ /// @param amount0Delta The amount of token0 used for the swap.
264
+ /// @param amount1Delta The amount of token1 used for the swap.
265
265
  /// @param data Encoded (originalTokenIn, normalizedTokenIn, normalizedTokenOut).
266
266
  function executeV3SwapCallback(
267
267
  IUniswapV3Factory v3Factory,
@@ -6,7 +6,7 @@ import {JBInboxTreeRoot} from "./JBInboxTreeRoot.sol";
6
6
  /// @notice Information about the remote (inbox) tree's root, passed in a message from the remote chain.
7
7
  /// @custom:member version The message format version. Used to reject incompatible messages.
8
8
  /// @custom:member token The remote token address (bytes32 for cross-VM compatibility with SVM).
9
- /// @custom:member amount The amount of tokens being sent.
9
+ /// @custom:member amount The amount of tokens to send.
10
10
  /// @custom:member remoteRoot The root of the merkle tree.
11
11
  /// @custom:member sourceTotalSupply The total token supply (including reserved tokens) on the source chain at the
12
12
  /// time the message was sent. Used by the receiving chain to track cross-chain supply for cash out tax calculations.