Add getOrdersInfo function
This commit is contained in:
parent
5022878680
commit
02ddfa07a7
@ -529,4 +529,20 @@ contract MixinWrapperFunctions is
|
|||||||
cancelOrder(orders[i]);
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,4 +149,12 @@ contract IWrapperFunctions {
|
|||||||
/// @param orders Array of order specifications.
|
/// @param orders Array of order specifications.
|
||||||
function batchCancelOrders(LibOrder.Order[] memory orders)
|
function batchCancelOrders(LibOrder.Order[] memory orders)
|
||||||
public;
|
public;
|
||||||
|
|
||||||
|
/// @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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user