Added testing for the BatchMatchOrdersError Rich Error

This commit is contained in:
James Towle
2019-07-02 17:49:04 -05:00
committed by Amir Bandeali
parent 29eff3b515
commit 0df68a6e06
8 changed files with 125 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
import {
BatchMatchedFillResults,
BatchMatchOrder,
FillResults,
LogDecoder,
MatchedFillResults,
@@ -274,6 +275,20 @@ export class ExchangeWrapper {
const ordersInfo = (await this._exchange.getOrdersInfo.callAsync(signedOrders)) as OrderInfo[];
return ordersInfo;
}
public async batchMatchOrdersRawAsync(
params: BatchMatchOrder,
from: string,
): Promise<TransactionReceiptWithDecodedLogs> {
const txHash = await this._exchange.batchMatchOrders.sendTransactionAsync(
params.leftOrders,
params.rightOrders,
params.leftSignatures,
params.rightSignatures,
{ from },
);
const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
return tx;
}
public async batchMatchOrdersAsync(
signedOrdersLeft: SignedOrder[],
signedOrdersRight: SignedOrder[],