diff options
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.sol | 16 |
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; + } } |