Skip to content

Commit d1f7a3a

Browse files
authored
feat(SpokePool): Remove depositExclusive (#642)
This function was used to express exclusivity as a period but its no longer useful since depositV3 now allows caller to express exclusivityPeriod instead of exclusivityDeadline
1 parent 44bfd94 commit d1f7a3a

File tree

1 file changed

+0
-68
lines changed

1 file changed

+0
-68
lines changed

contracts/SpokePool.sol

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -720,74 +720,6 @@ abstract contract SpokePool is
720720
);
721721
}
722722

723-
/**
724-
* @notice DEPRECATED. Use depositV3() instead.
725-
* @notice Submits deposit and sets exclusivityDeadline to current time plus some offset. This function is
726-
* designed to be called by users who want to set an exclusive relayer for some amount of time after their deposit
727-
* transaction is mined.
728-
* @notice If exclusivtyDeadlineOffset > 0, then exclusiveRelayer must be set to a valid address, which is a
729-
* requirement imposed by depositV3().
730-
* @param depositor The account credited with the deposit who can request to "speed up" this deposit by modifying
731-
* the output amount, recipient, and message.
732-
* @param recipient The account receiving funds on the destination chain. Can be an EOA or a contract. If
733-
* the output token is the wrapped native token for the chain, then the recipient will receive native token if
734-
* an EOA or wrapped native token if a contract.
735-
* @param inputToken The token pulled from the caller's account and locked into this contract to
736-
* initiate the deposit. The equivalent of this token on the relayer's repayment chain of choice will be sent
737-
* as a refund. If this is equal to the wrapped native token then the caller can optionally pass in native token as
738-
* msg.value, as long as msg.value = inputTokenAmount.
739-
* @param outputToken The token that the relayer will send to the recipient on the destination chain. Must be an
740-
* ERC20.
741-
* @param inputAmount The amount of input tokens to pull from the caller's account and lock into this contract.
742-
* This amount will be sent to the relayer on their repayment chain of choice as a refund following an optimistic
743-
* challenge window in the HubPool, plus a system fee.
744-
* @param outputAmount The amount of output tokens that the relayer will send to the recipient on the destination.
745-
* @param destinationChainId The destination chain identifier. Must be enabled along with the input token
746-
* as a valid deposit route from this spoke pool or this transaction will revert.
747-
* @param exclusiveRelayer The relayer that will be exclusively allowed to fill this deposit before the
748-
* exclusivity deadline timestamp.
749-
* @param quoteTimestamp The HubPool timestamp that is used to determine the system fee paid by the depositor.
750-
* This must be set to some time between [currentTime - depositQuoteTimeBuffer, currentTime]
751-
* where currentTime is block.timestamp on this chain or this transaction will revert.
752-
* @param fillDeadline The deadline for the relayer to fill the deposit. After this destination chain timestamp,
753-
* the fill will revert on the destination chain. Must be set between [currentTime, currentTime + fillDeadlineBuffer]
754-
* where currentTime is block.timestamp on this chain or this transaction will revert.
755-
* @param exclusivityPeriod Added to the current time to set the exclusive relayer deadline,
756-
* which is the deadline for the exclusiveRelayer to fill the deposit. After this destination chain timestamp,
757-
* anyone can fill the deposit.
758-
* @param message The message to send to the recipient on the destination chain if the recipient is a contract.
759-
* If the message is not empty, the recipient contract must implement handleV3AcrossMessage() or the fill will revert.
760-
*/
761-
function depositExclusive(
762-
address depositor,
763-
address recipient,
764-
address inputToken,
765-
address outputToken,
766-
uint256 inputAmount,
767-
uint256 outputAmount,
768-
uint256 destinationChainId,
769-
address exclusiveRelayer,
770-
uint32 quoteTimestamp,
771-
uint32 fillDeadline,
772-
uint32 exclusivityPeriod,
773-
bytes calldata message
774-
) public payable {
775-
depositV3(
776-
depositor.toBytes32(),
777-
recipient.toBytes32(),
778-
inputToken.toBytes32(),
779-
outputToken.toBytes32(),
780-
inputAmount,
781-
outputAmount,
782-
destinationChainId,
783-
exclusiveRelayer.toBytes32(),
784-
quoteTimestamp,
785-
fillDeadline,
786-
exclusivityPeriod,
787-
message
788-
);
789-
}
790-
791723
/**
792724
* @notice Depositor can use this function to signal to relayer to use updated output amount, recipient,
793725
* and/or message.

0 commit comments

Comments
 (0)