Skip to content

Commit

Permalink
when submitting order enforce timeout timestamp is in the future
Browse files Browse the repository at this point in the history
  • Loading branch information
thal0x committed Dec 17, 2024
1 parent 8421c15 commit cca68b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions solidity/src/FastTransferGateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ contract FastTransferGateway is Initializable, UUPSUpgradeable, OwnableUpgradeab
uint64 timeoutTimestamp,
bytes calldata data
) public returns (bytes32) {
require(timeoutTimestamp > block.timestamp, "FastTransferGateway: timeout timestamp must be in the future");

FastTransferOrder memory order = FastTransferOrder(
sender, recipient, amountIn, amountOut, nonce, localDomain, destinationDomain, timeoutTimestamp, data
);
Expand Down Expand Up @@ -209,6 +211,8 @@ contract FastTransferGateway is Initializable, UUPSUpgradeable, OwnableUpgradeab
bytes calldata data,
bytes calldata signature
) public returns (bytes32) {
require(timeoutTimestamp > block.timestamp, "FastTransferGateway: timeout timestamp must be in the future");

FastTransferOrder memory order = FastTransferOrder(
sender, recipient, amountIn, amountOut, nonce, localDomain, destinationDomain, timeoutTimestamp, data
);
Expand Down

0 comments on commit cca68b1

Please sign in to comment.