Skip to content

Commit

Permalink
Fixed orderIntent TYPEHASH per Alex's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean329 committed Jan 28, 2025
1 parent aa2824f commit 0651cbe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions contracts/src/interfaces/IHyperdriveMatchingEngineV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,13 @@ interface IHyperdriveMatchingEngineV2 {
/// @dev The type of the order. Legal values are `OpenLong`, `OpenShort`,
/// `CloseLong`, or `CloseShort`.
OrderType orderType;

/// @dev The minimum and maximum maturity time for the order.
/// For `OpenLong` or `OpenShort` orders where the `onlyNewPositions`
/// is false, these values are checked for match validation.
/// For `CloseLong` or `CloseShort` orders, these values must be equal
/// and specify the maturity time of the position to close.
uint256 minMaturityTime;
uint256 maxMaturityTime;

/// @dev The signature that demonstrates the source's intent to complete
/// the trade.
bytes signature;
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/matching/HyperdriveMatchingEngineV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ contract HyperdriveMatchingEngineV2 is
/// @notice The EIP712 typehash of the OrderIntent struct.
bytes32 public constant ORDER_INTENT_TYPEHASH =
keccak256(
"OrderIntent(address trader,address counterparty,address hyperdrive,uint256 amount,uint256 slippageGuard,uint256 minVaultSharePrice,Options options,uint8 orderType,uint256 minMaturityTime,uint256 maxMaturityTime,uint256 expiry,bytes32 salt)"
"OrderIntent(address trader,address counterparty,address feeRecipient,address hyperdrive,uint256 fundAmount,uint256 bondAmount,uint256 minVaultSharePrice,Options options,uint8 orderType,uint256 minMaturityTime,uint256 maxMaturityTime,uint256 expiry,bytes32 salt)"
);

/// @notice The EIP712 typehash of the Options struct
Expand Down

0 comments on commit 0651cbe

Please sign in to comment.