aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/2.0.0/protocol/Exchange/mixins/MTransactions.sol
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-09-04 11:55:37 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-09-04 11:55:37 +0800
commit99fbf384fdcae26eb608f9e0c95a852b7cb7bd99 (patch)
tree843ccc0183ffadc6d5c24881ea8fd707ed1937a5 /packages/contracts/src/2.0.0/protocol/Exchange/mixins/MTransactions.sol
parentcb4fcf4de7b9decad05536f2edf1c1ffd8666a72 (diff)
downloaddexon-sol-tools-99fbf384fdcae26eb608f9e0c95a852b7cb7bd99.tar.gz
dexon-sol-tools-99fbf384fdcae26eb608f9e0c95a852b7cb7bd99.tar.zst
dexon-sol-tools-99fbf384fdcae26eb608f9e0c95a852b7cb7bd99.zip
Apply styling fixes
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.