aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/2.0.0/protocol/Exchange/mixins/MTransactions.sol
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/src/2.0.0/protocol/Exchange/mixins/MTransactions.sol')
-rw-r--r--packages/contracts/src/2.0.0/protocol/Exchange/mixins/MTransactions.sol22
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/mixins/MTransactions.sol b/packages/contracts/src/2.0.0/protocol/Exchange/mixins/MTransactions.sol
index f2b5e4b16..4f61a4945 100644
--- a/packages/contracts/src/2.0.0/protocol/Exchange/mixins/MTransactions.sol
+++ b/packages/contracts/src/2.0.0/protocol/Exchange/mixins/MTransactions.sol
@@ -23,6 +23,28 @@ import "../interfaces/ITransactions.sol";
contract MTransactions is
ITransactions
{
+ // Hash for the EIP712 ZeroEx Transaction Schema
+ bytes32 constant internal EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH = keccak256(abi.encodePacked(
+ "ZeroExTransaction(",
+ "uint256 salt,",
+ "address signerAddress,",
+ "bytes data",
+ ")"
+ ));
+
+ /// @dev Calculates EIP712 hash of the Transaction.
+ /// @param salt Arbitrary number to ensure uniqueness of transaction hash.
+ /// @param signerAddress Address of transaction signer.
+ /// @param data AbiV2 encoded calldata.
+ /// @return EIP712 hash of the Transaction.
+ function hashZeroExTransaction(
+ uint256 salt,
+ address signerAddress,
+ bytes memory data
+ )
+ internal
+ pure
+ returns (bytes32 result);
/// @dev The current function will be called in the context of this address (either 0x transaction signer or `msg.sender`).
/// If calling a fill function, this address will represent the taker.