Add back batchFillOrders

This commit is contained in:
Amir Bandeali
2019-09-03 11:06:45 -07:00
parent ea8669439f
commit cb8cf1f107
9 changed files with 220 additions and 3 deletions

View File

@@ -54,6 +54,20 @@ export class ExchangeWrapper {
);
return txReceipt;
}
public async batchFillOrdersAsync(
orders: SignedOrder[],
from: string,
opts: { takerAssetFillAmounts?: BigNumber[]; gasPrice?: BigNumber } = {},
): Promise<TransactionReceiptWithDecodedLogs> {
return this._exchange.batchFillOrders.awaitTransactionSuccessAsync(
orders,
opts.takerAssetFillAmounts === undefined
? orders.map(signedOrder => signedOrder.takerAssetAmount)
: opts.takerAssetFillAmounts,
orders.map(signedOrder => signedOrder.signature),
{ from, gasPrice: opts.gasPrice },
);
}
public async batchFillOrKillOrdersAsync(
orders: SignedOrder[],
from: string,