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 | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinTransactions.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinTransactions.sol index 9edb1694f..7f12834a3 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinTransactions.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinTransactions.sol @@ -16,12 +16,13 @@ */ pragma solidity ^0.4.21; -pragma experimental ABIEncoderV2; import "./mixins/MSignatureValidator.sol"; import "./mixins/MTransactions.sol"; +import "./libs/LibExchangeErrors.sol"; contract MixinTransactions is + LibExchangeErrors, MSignatureValidator, MTransactions { @@ -56,12 +57,18 @@ contract MixinTransactions is ); // Validate transaction has not been executed - require(!transactions[transactionHash]); + require( + !transactions[transactionHash], + DUPLICATE_TRANSACTION_HASH + ); // TODO: is SignatureType.Caller necessary if we make this check? if (signer != msg.sender) { // Validate signature - require(isValidSignature(transactionHash, signer, signature)); + require( + isValidSignature(transactionHash, signer, signature), + SIGNATURE_VALIDATION_FAILED + ); // Set the current transaction signer currentContextAddress = signer; @@ -69,7 +76,10 @@ contract MixinTransactions is // Execute transaction transactions[transactionHash] = true; - require(address(this).delegatecall(data)); + require( + address(this).delegatecall(data), + TRANSACTION_EXECUTION_FAILED + ); // Reset current transaction signer // TODO: Check if gas is paid when currentContextAddress is already 0. |