aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IExchangeCore.sol
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-06-30 09:36:00 +0800
committerGitHub <noreply@github.com>2018-06-30 09:36:00 +0800
commit6c34255a3e45a2f0b85dd7e9d925c7a789f603f1 (patch)
treea67cd2c3eb6434651dccef2cb21e65feda29b05f /packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IExchangeCore.sol
parent762c0143eb10306ca70b0f206e80eb9aed925f99 (diff)
parent41064adc6689deb8febcf833f6987957e845b477 (diff)
downloaddexon-sol-tools-6c34255a3e45a2f0b85dd7e9d925c7a789f603f1.tar
dexon-sol-tools-6c34255a3e45a2f0b85dd7e9d925c7a789f603f1.tar.gz
dexon-sol-tools-6c34255a3e45a2f0b85dd7e9d925c7a789f603f1.tar.bz2
dexon-sol-tools-6c34255a3e45a2f0b85dd7e9d925c7a789f603f1.tar.lz
dexon-sol-tools-6c34255a3e45a2f0b85dd7e9d925c7a789f603f1.tar.xz
dexon-sol-tools-6c34255a3e45a2f0b85dd7e9d925c7a789f603f1.tar.zst
dexon-sol-tools-6c34255a3e45a2f0b85dd7e9d925c7a789f603f1.zip
Merge pull request #781 from 0xProject/refactor/contracts/fileStructure
Update contracts file structure
Diffstat (limited to 'packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IExchangeCore.sol')
-rw-r--r--packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IExchangeCore.sol59
1 files changed, 59 insertions, 0 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IExchangeCore.sol b/packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IExchangeCore.sol
new file mode 100644
index 000000000..98222f33f
--- /dev/null
+++ b/packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IExchangeCore.sol
@@ -0,0 +1,59 @@
+/*
+
+ Copyright 2018 ZeroEx Intl.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+pragma solidity ^0.4.24;
+pragma experimental ABIEncoderV2;
+
+import "../libs/LibOrder.sol";
+import "../libs/LibFillResults.sol";
+
+contract IExchangeCore {
+
+ /// @dev Cancels all orders created by makerAddress with a salt less than or equal to the targetOrderEpoch
+ /// and senderAddress equal to msg.sender (or null address if msg.sender == makerAddress).
+ /// @param targetOrderEpoch Orders created with a salt less or equal to this value will be cancelled.
+ function cancelOrdersUpTo(uint256 targetOrderEpoch)
+ external;
+
+ /// @dev Fills the input order.
+ /// @param order Order struct containing order specifications.
+ /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
+ /// @param signature Proof that order has been created by maker.
+ /// @return Amounts filled and fees paid by maker and taker.
+ function fillOrder(
+ LibOrder.Order memory order,
+ uint256 takerAssetFillAmount,
+ bytes memory signature
+ )
+ public
+ returns (LibFillResults.FillResults memory fillResults);
+
+ /// @dev After calling, the order can not be filled anymore.
+ /// @param order Order struct containing order specifications.
+ function cancelOrder(LibOrder.Order memory order)
+ public;
+
+ /// @dev Gets information about an order: status, hash, and amount filled.
+ /// @param order Order to gather information on.
+ /// @return OrderInfo Information about the order and its state.
+ /// See LibOrder.OrderInfo for a complete description.
+ function getOrderInfo(LibOrder.Order memory order)
+ public
+ view
+ returns (LibOrder.OrderInfo memory orderInfo);
+}