diff --git a/contracts/dev-utils/contracts/src/LibTransactionDecoder.sol b/contracts/dev-utils/contracts/src/LibTransactionDecoder.sol index ef8d0fde3f..df5158e9ee 100644 --- a/contracts/dev-utils/contracts/src/LibTransactionDecoder.sol +++ b/contracts/dev-utils/contracts/src/LibTransactionDecoder.sol @@ -48,8 +48,6 @@ contract LibTransactionDecoder { if (functionSelector == IExchange(address(0)).batchCancelOrders.selector) { functionName = "batchCancelOrders"; - } else if (functionSelector == IExchange(address(0)).batchFillOrders.selector) { - functionName = "batchFillOrders"; } else if (functionSelector == IExchange(address(0)).batchFillOrdersNoThrow.selector) { functionName = "batchFillOrdersNoThrow"; } else if (functionSelector == IExchange(address(0)).batchFillOrKillOrders.selector) { @@ -58,8 +56,6 @@ contract LibTransactionDecoder { functionName = "cancelOrder"; } else if (functionSelector == IExchange(address(0)).fillOrder.selector) { functionName = "fillOrder"; - } else if (functionSelector == IExchange(address(0)).fillOrderNoThrow.selector) { - functionName = "fillOrderNoThrow"; } else if (functionSelector == IExchange(address(0)).fillOrKillOrder.selector) { functionName = "fillOrKillOrder"; } else if (functionSelector == IExchange(address(0)).marketBuyOrdersNoThrow.selector) { @@ -88,8 +84,7 @@ contract LibTransactionDecoder { signatures = new bytes[](0); } else if ( functionSelector == IExchange(address(0)).batchFillOrKillOrders.selector || - functionSelector == IExchange(address(0)).batchFillOrdersNoThrow.selector || - functionSelector == IExchange(address(0)).batchFillOrders.selector + functionSelector == IExchange(address(0)).batchFillOrdersNoThrow.selector ) { (orders, takerAssetFillAmounts, signatures) = _makeReturnValuesForBatchFill(transactionData); } else if (functionSelector == IExchange(address(0)).cancelOrder.selector) { @@ -99,8 +94,7 @@ contract LibTransactionDecoder { signatures = new bytes[](0); } else if ( functionSelector == IExchange(address(0)).fillOrKillOrder.selector || - functionSelector == IExchange(address(0)).fillOrder.selector || - functionSelector == IExchange(address(0)).fillOrderNoThrow.selector + functionSelector == IExchange(address(0)).fillOrder.selector ) { (orders, takerAssetFillAmounts, signatures) = _makeReturnValuesForSingleOrderFill(transactionData); } else if ( diff --git a/contracts/exchange-forwarder/test/utils/forwarder_test_factory.ts b/contracts/exchange-forwarder/test/utils/forwarder_test_factory.ts index 2ea4c0ea79..b97124e145 100644 --- a/contracts/exchange-forwarder/test/utils/forwarder_test_factory.ts +++ b/contracts/exchange-forwarder/test/utils/forwarder_test_factory.ts @@ -164,7 +164,7 @@ export class ForwarderTestFactory { this._forwarderFeeRecipientAddress, ); - const ordersInfoBefore = await this._exchangeWrapper.getOrdersInfoAsync(orders); + const ordersInfoBefore = await Promise.all(orders.map(order => this._exchangeWrapper.getOrderInfoAsync(order))); const orderStatusesBefore = ordersInfoBefore.map(orderInfo => orderInfo.orderStatus); const expectedResults = computeExpectedResults(orders, ordersInfoBefore, fractionalNumberOfOrdersToFill); @@ -197,7 +197,9 @@ export class ForwarderTestFactory { await expect(tx).to.revertWith(options.revertError); } else { const gasUsed = (await tx).gasUsed; - const ordersInfoAfter = await this._exchangeWrapper.getOrdersInfoAsync(orders); + const ordersInfoAfter = await Promise.all( + orders.map(order => this._exchangeWrapper.getOrderInfoAsync(order)), + ); const orderStatusesAfter = ordersInfoAfter.map(orderInfo => orderInfo.orderStatus); await this._checkResultsAsync( @@ -235,7 +237,7 @@ export class ForwarderTestFactory { this._forwarderFeeRecipientAddress, ); - const ordersInfoBefore = await this._exchangeWrapper.getOrdersInfoAsync(orders); + const ordersInfoBefore = await Promise.all(orders.map(order => this._exchangeWrapper.getOrderInfoAsync(order))); const orderStatusesBefore = ordersInfoBefore.map(orderInfo => orderInfo.orderStatus); const expectedResults = computeExpectedResults(orders, ordersInfoBefore, fractionalNumberOfOrdersToFill); @@ -266,7 +268,9 @@ export class ForwarderTestFactory { await expect(tx).to.revertWith(options.revertError); } else { const gasUsed = (await tx).gasUsed; - const ordersInfoAfter = await this._exchangeWrapper.getOrdersInfoAsync(orders); + const ordersInfoAfter = await Promise.all( + orders.map(order => this._exchangeWrapper.getOrderInfoAsync(order)), + ); const orderStatusesAfter = ordersInfoAfter.map(orderInfo => orderInfo.orderStatus); await this._checkResultsAsync( diff --git a/contracts/exchange/test/utils/constants.ts b/contracts/exchange/test/utils/constants.ts index e3b250ed9e..78c1f7c1a9 100644 --- a/contracts/exchange/test/utils/constants.ts +++ b/contracts/exchange/test/utils/constants.ts @@ -12,16 +12,8 @@ export const constants = { ExchangeFunctionName.SetProtocolFeeMultiplier, ExchangeFunctionName.SetProtocolFeeCollectorAddress, ], - SINGLE_FILL_FN_NAMES: [ - ExchangeFunctionName.FillOrder, - ExchangeFunctionName.FillOrKillOrder, - ExchangeFunctionName.FillOrderNoThrow, - ], - BATCH_FILL_FN_NAMES: [ - ExchangeFunctionName.BatchFillOrders, - ExchangeFunctionName.BatchFillOrKillOrders, - ExchangeFunctionName.BatchFillOrdersNoThrow, - ], + SINGLE_FILL_FN_NAMES: [ExchangeFunctionName.FillOrder, ExchangeFunctionName.FillOrKillOrder], + BATCH_FILL_FN_NAMES: [ExchangeFunctionName.BatchFillOrKillOrders, ExchangeFunctionName.BatchFillOrdersNoThrow], MARKET_FILL_FN_NAMES: [ ExchangeFunctionName.MarketBuyOrdersFillOrKill, ExchangeFunctionName.MarketSellOrdersFillOrKill,