Skip to content

Commit

Permalink
Merge pull request #7 from skip-mev/jw/enforce-timeout-is-future
Browse files Browse the repository at this point in the history
when submitting order enforce timeout timestamp is in the future
  • Loading branch information
thal0x authored Dec 17, 2024
2 parents 8421c15 + cca68b1 commit 7a05185
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 7a05185

Please sign in to comment.