@@ -18,6 +18,7 @@ import "@openzeppelin/contracts/utils/math/SignedMath.sol";
1818
1919// This interface is expected to be implemented by any contract that expects to receive messages from the SpokePool.
2020interface AcrossMessageHandler {
21+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
2122 function handleAcrossMessage (
2223 address tokenSent ,
2324 uint256 amount ,
@@ -143,10 +144,11 @@ abstract contract SpokePool is
143144 // their fees are negative.
144145 // It's important that it isn't too large, however, as it should be multipliable by ~2e18 without overflowing.
145146 // 1e40 * 2e18 = 2e58 << 2^255 ~= 5e76
147+ /// @custom:audit FOLLOWING VARIABLE TO BE DEPRECATED
146148 uint256 public constant SLOW_FILL_MAX_TOKENS_TO_SEND = 1e40 ;
147149
148150 // Set max payout adjustment to something
149-
151+ /// @custom:audit FOLLOWING VARIABLE TO BE DEPRECATED
150152 bytes32 public constant UPDATE_DEPOSIT_DETAILS_HASH =
151153 keccak256 (
152154 "UpdateDepositDetails(uint32 depositId,uint256 originChainId,int64 updatedRelayerFeePct,address updatedRecipient,bytes updatedMessage) "
@@ -162,6 +164,7 @@ abstract contract SpokePool is
162164 event SetXDomainAdmin (address indexed newAdmin );
163165 event SetHubPool (address indexed newHubPool );
164166 event EnabledDepositRoute (address indexed originToken , uint256 indexed destinationChainId , bool enabled );
167+ /// @custom:audit FOLLOWING EVENT TO BE DEPRECATED
165168 event RequestedSpeedUpDeposit (
166169 int64 newRelayerFeePct ,
167170 uint32 indexed depositId ,
@@ -170,6 +173,7 @@ abstract contract SpokePool is
170173 bytes updatedMessage ,
171174 bytes depositorSignature
172175 );
176+ /// @custom:audit FOLLOWING EVENT TO BE DEPRECATED
173177 event FilledRelay (
174178 uint256 amount ,
175179 uint256 totalFilledAmount ,
@@ -187,6 +191,7 @@ abstract contract SpokePool is
187191 bytes message ,
188192 RelayExecutionInfo updatableRelayData
189193 );
194+ /// @custom:audit FOLLOWING EVENT TO BE DEPRECATED
190195 event RefundRequested (
191196 address indexed relayer ,
192197 address refundToken ,
@@ -203,6 +208,7 @@ abstract contract SpokePool is
203208 bytes32 indexed relayerRefundRoot ,
204209 bytes32 indexed slowRelayRoot
205210 );
211+ /// @custom:audit FOLLOWING EVENT TO BE DEPRECATED
206212 event ExecutedRelayerRefundRoot (
207213 uint256 amountToReturn ,
208214 uint256 indexed chainId ,
@@ -237,6 +243,7 @@ abstract contract SpokePool is
237243 * @param payoutAdjustmentPct Adjustment to the payout amount. Can be used to increase or decrease the payout to
238244 * allow for rewards or penalties. Used in slow fills.
239245 */
246+ /// @custom:audit FOLLOWING STRUCT TO BE DEPRECATED
240247 struct RelayExecution {
241248 RelayData relay;
242249 bytes32 relayHash;
@@ -260,6 +267,7 @@ abstract contract SpokePool is
260267 * @param isSlowRelay Whether this is a slow relay.
261268 * @param payoutAdjustmentPct Adjustment to the payout amount.
262269 */
270+ /// @custom:audit FOLLOWING STRUCT TO BE DEPRECATED
263271 struct RelayExecutionInfo {
264272 address recipient;
265273 bytes message;
@@ -437,10 +445,6 @@ abstract contract SpokePool is
437445 * DEPOSITOR FUNCTIONS *
438446 **************************************/
439447
440- // Note: The following deposit functions will be removed in favor of the
441- // depositUSS_ functions. These are maintained for backwards compatibility with
442- // UI's that expect to call this interface.
443-
444448 /**
445449 * @notice Called by user to bridge funds from origin to destination chain. Depositor will effectively lock
446450 * tokens in this contract and receive a destination token on the destination chain. The origin => destination
@@ -501,6 +505,7 @@ abstract contract SpokePool is
501505 * @param message Arbitrary data that can be used to pass additional information to the recipient along with the tokens.
502506 * Note: this is intended to be used to pass along instructions for how a contract should use or allocate the tokens.
503507 */
508+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
504509 function depositFor (
505510 address depositor ,
506511 address recipient ,
@@ -530,6 +535,7 @@ abstract contract SpokePool is
530535 * Note: this is intended to be used to pass along instructions for how a contract should use or allocate the tokens.
531536 * @param maxCount used to protect the depositor from frontrunning to guarantee their quote remains valid.
532537 */
538+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
533539 function depositNow (
534540 address recipient ,
535541 address originToken ,
@@ -567,6 +573,7 @@ abstract contract SpokePool is
567573 * Note: this is intended to be used to pass along instructions for how a contract should use or allocate the tokens.
568574 * @param maxCount used to protect the depositor from frontrunning to guarantee their quote remains valid.
569575 */
576+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
570577 function depositForNow (
571578 address depositor ,
572579 address recipient ,
@@ -611,6 +618,7 @@ abstract contract SpokePool is
611618 * relayer fee %, and the deposit ID. This signature is produced by signing a hash of data according to the
612619 * EIP-712 standard. See more in the _verifyUpdateRelayerFeeMessage() comments.
613620 */
621+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
614622 function speedUpDeposit (
615623 address depositor ,
616624 int64 updatedRelayerFeePct ,
@@ -806,12 +814,6 @@ abstract contract SpokePool is
806814 * RELAYER FUNCTIONS *
807815 **************************************/
808816
809- // Note: The following fill functions will be removed in favor of the
810- // fillRelayUSS_ functions. These are maintained for backwards compatibility with
811- // relayers so that they can fill old deposits that emitted FundsDepositted events
812- // pre-upgrade. All future deposits that emit USSFundsDeposited events will be
813- // fillable only with fillRelayUSS_ functions.
814-
815817 /**
816818 /**
817819 * @notice Called by relayer to fulfill part of a deposit by sending destination tokens to the recipient.
@@ -840,6 +842,7 @@ abstract contract SpokePool is
840842 * @param message Message to send to recipient along with tokens.
841843 * @param maxCount Max count to protect the relayer from frontrunning.
842844 */
845+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
843846 function fillRelay (
844847 address depositor ,
845848 address recipient ,
@@ -912,6 +915,7 @@ abstract contract SpokePool is
912915 * EIP-712 standard. See more in the _verifyUpdateRelayerFeeMessage() comments.
913916 * @param maxCount Max fill count to protect the relayer from frontrunning.
914917 */
918+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
915919 function fillRelayWithUpdatedDeposit (
916920 address depositor ,
917921 address recipient ,
@@ -1153,6 +1157,7 @@ abstract contract SpokePool is
11531157 * for rewards or penalties.
11541158 * @param proof Inclusion proof for this leaf in slow relay root in root bundle.
11551159 */
1160+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
11561161 function executeSlowRelayLeaf (
11571162 address depositor ,
11581163 address recipient ,
@@ -1447,6 +1452,7 @@ abstract contract SpokePool is
14471452 }
14481453
14491454 // Verifies inclusion proof of leaf in root and sends recipient remainder of relay. Marks relay as filled.
1455+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
14501456 function _executeSlowRelayLeaf (
14511457 address depositor ,
14521458 address recipient ,
@@ -1531,6 +1537,7 @@ abstract contract SpokePool is
15311537 MerkleLib.setClaimed (rootBundle.claimedBitmap, leafId);
15321538 }
15331539
1540+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
15341541 function _verifyUpdateDepositMessage (
15351542 address depositor ,
15361543 uint32 depositId ,
@@ -1617,6 +1624,7 @@ abstract contract SpokePool is
16171624 require (isValid, "invalid signature " );
16181625 }
16191626
1627+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
16201628 function _verifySlowFill (
16211629 RelayExecution memory relayExecution ,
16221630 uint32 rootBundleId ,
@@ -1648,6 +1656,7 @@ abstract contract SpokePool is
16481656 revert InvalidMerkleProof ();
16491657 }
16501658
1659+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
16511660 function _computeAmountPreFees (uint256 amount , int64 feesPct ) private pure returns (uint256 ) {
16521661 return (1e18 * amount) / uint256 ((int256 (1e18 ) - feesPct));
16531662 }
@@ -1656,6 +1665,7 @@ abstract contract SpokePool is
16561665 return (amount * uint256 (int256 (1e18 ) - feesPct)) / 1e18 ;
16571666 }
16581667
1668+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
16591669 function _getRelayHash (SpokePoolInterface.RelayData memory relayData ) private pure returns (bytes32 ) {
16601670 return keccak256 (abi.encode (relayData));
16611671 }
@@ -1684,6 +1694,7 @@ abstract contract SpokePool is
16841694 * @dev Caller must approve this contract to transfer up to maxTokensToSend of the relayData.destinationToken.
16851695 * The amount to be sent might end up less if there is insufficient relay amount remaining to be sent.
16861696 */
1697+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
16871698 function _fillRelay (RelayExecution memory relayExecution ) internal returns (uint256 fillAmountPreFees ) {
16881699 RelayData memory relayData = relayExecution.relay;
16891700 // We limit the relay fees to prevent the user spending all their funds on fees. Note that 0.5e18 (i.e. 50%)
@@ -1918,6 +1929,7 @@ abstract contract SpokePool is
19181929 }
19191930 }
19201931
1932+ /// @custom:audit FOLLOWING FUNCTION TO BE DEPRECATED
19211933 function _emitFillRelay (RelayExecution memory relayExecution , uint256 fillAmountPreFees ) internal {
19221934 RelayExecutionInfo memory relayExecutionInfo = RelayExecutionInfo ({
19231935 relayerFeePct: relayExecution.updatedRelayerFeePct,
0 commit comments