aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-19 23:48:06 +0800
committerFabio Berger <me@fabioberger.com>2018-07-19 23:48:06 +0800
commitd8898cf9a30cc349868afcf2b78e6369e57aa726 (patch)
treef96d1aa76c7e5aa9e3311d5cdbd0d31c8ec8d7fb /packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol
parent1aaf633df883f62fad890b2d87a2dc89067821c5 (diff)
parent3de88d5345c7a4549bc69e2ca28f0601f5d42189 (diff)
downloaddexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.gz
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.bz2
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.lz
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.xz
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.zst
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.zip
merge v2-prototype
Diffstat (limited to 'packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol')
-rw-r--r--packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol b/packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol
index a16d2f897..d420f7e85 100644
--- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol
+++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol
@@ -529,4 +529,20 @@ contract MixinWrapperFunctions is
cancelOrder(orders[i]);
}
}
+
+ /// @dev Fetches information for all passed in orders.
+ /// @param orders Array of order specifications.
+ /// @return Array of OrderInfo instances that correspond to each order.
+ function getOrdersInfo(LibOrder.Order[] memory orders)
+ public
+ view
+ returns (LibOrder.OrderInfo[] memory)
+ {
+ uint256 length = orders.length;
+ LibOrder.OrderInfo[] memory ordersInfo = new LibOrder.OrderInfo[](length);
+ for (uint256 i = 0; i < length; i++) {
+ ordersInfo[i] = getOrderInfo(orders[i]);
+ }
+ return ordersInfo;
+ }
}