Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions contracts/src/7683/T1ERC7683.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import { IT1XChainReader } from "../libraries/xChain/IT1XChainReader.sol";
contract T1ERC7683 is IT1ERC7683, T1Permit2, AccessControlUpgradeable, EIP712 {
using SafeERC20 for IERC20;

error InvalidDestinationSettler(bytes32 provided, bytes32 expected);

/// @notice Role for pausing/unpausing open operations
bytes32 public constant OPEN_PAUSER_ROLE = keccak256("OPEN_PAUSER_ROLE");
/// @notice Role for pausing/unpausing settlement operations
Expand Down Expand Up @@ -246,6 +248,12 @@ contract T1ERC7683 is IT1ERC7683, T1Permit2, AccessControlUpgradeable, EIP712 {

if (orderData.originDomain != localDomain) revert InvalidOriginDomain(orderData.originDomain);

// Ensure destinationSettler matches counterpart

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment seems superfluous

bytes32 expectedSettler = TypeCasts.addressToBytes32(counterpart);
if (orderData.destinationSettler != expectedSettler) {
revert InvalidDestinationSettler(orderData.destinationSettler, expectedSettler);
}

// enforce fillDeadline into orderData
orderData.fillDeadline = _fillDeadline;
// enforce sender into orderData
Expand Down
Loading