diff options
Diffstat (limited to 'packages/contracts/src/contracts/current/protocol/Exchange/MixinTransactions.sol')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/Exchange/MixinTransactions.sol | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinTransactions.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinTransactions.sol index d153dfa5c..30b0102fd 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinTransactions.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinTransactions.sol @@ -17,9 +17,9 @@ */ pragma solidity ^0.4.24; +import "./libs/LibExchangeErrors.sol"; import "./mixins/MSignatureValidator.sol"; import "./mixins/MTransactions.sol"; -import "./libs/LibExchangeErrors.sol"; contract MixinTransactions is LibExchangeErrors, @@ -50,29 +50,29 @@ contract MixinTransactions is // Prevent reentrancy require( currentContextAddress == address(0), - REENTRANCY_NOT_ALLOWED + REENTRANCY_ILLEGAL ); // Calculate transaction hash - bytes32 transactionHash = keccak256( + bytes32 transactionHash = keccak256(abi.encodePacked( address(this), signer, salt, data - ); + )); // Validate transaction has not been executed require( !transactions[transactionHash], - DUPLICATE_TRANSACTION_HASH + INVALID_TX_HASH ); - // TODO: is SignatureType.Caller necessary if we make this check? + // Transaction always valid if signer is sender of transaction if (signer != msg.sender) { // Validate signature require( isValidSignature(transactionHash, signer, signature), - SIGNATURE_VALIDATION_FAILED + INVALID_TX_SIGNATURE ); // Set the current transaction signer @@ -83,7 +83,7 @@ contract MixinTransactions is transactions[transactionHash] = true; require( address(this).delegatecall(data), - TRANSACTION_EXECUTION_FAILED + FAILED_EXECUTION ); // Reset current transaction signer |