aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/contracts/current/protocol/Exchange/mixins/MExchangeCore.sol
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/src/contracts/current/protocol/Exchange/mixins/MExchangeCore.sol')
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/mixins/MExchangeCore.sol58
1 files changed, 42 insertions, 16 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/mixins/MExchangeCore.sol b/packages/contracts/src/contracts/current/protocol/Exchange/mixins/MExchangeCore.sol
index 656df079e..5b78e70da 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/mixins/MExchangeCore.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/mixins/MExchangeCore.sol
@@ -16,25 +16,51 @@
*/
-pragma solidity ^0.4.21;
-pragma experimental ABIEncoderV2;
+pragma solidity ^0.4.23;
-import "../LibOrder.sol";
-import "../LibFillResults.sol";
+import "../libs/LibOrder.sol";
+import "../libs/LibFillResults.sol";
+import "../interfaces/IExchangeCore.sol";
-contract MExchangeCore {
+contract MExchangeCore is
+ IExchangeCore
+{
- function fillOrder(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature)
- public
- returns (LibFillResults.FillResults memory fillResults);
+ // Fill event is emitted whenever an order is filled.
+ event Fill(
+ address indexed makerAddress,
+ address takerAddress,
+ address indexed feeRecipientAddress,
+ uint256 makerAssetFilledAmount,
+ uint256 takerAssetFilledAmount,
+ uint256 makerFeePaid,
+ uint256 takerFeePaid,
+ bytes32 indexed orderHash,
+ bytes makerAssetData,
+ bytes takerAssetData
+ );
+
+ // Cancel event is emitted whenever an individual order is cancelled.
+ event Cancel(
+ address indexed makerAddress,
+ address indexed feeRecipientAddress,
+ bytes32 indexed orderHash,
+ bytes makerAssetData,
+ bytes takerAssetData
+ );
- function cancelOrder(LibOrder.Order memory order)
- public
- returns (bool);
+ // CancelUpTo event is emitted whenever `cancelOrdersUpTo` is executed succesfully.
+ event CancelUpTo(
+ address indexed makerAddress,
+ uint256 makerEpoch
+ );
- function cancelOrdersUpTo(uint256 salt)
- external;
+ /// @dev Logs a Fill event with the given arguments.
+ /// The sole purpose of this function is to get around the stack variable limit.
+ function emitFillEvent(
+ LibOrder.Order memory order,
+ address takerAddress,
+ bytes32 orderHash,
+ LibFillResults.FillResults memory fillResults)
+ internal;
}