From 00f5b94d0a585ccf4b1df4c9bddb4c19eb86cfe2 Mon Sep 17 00:00:00 2001 From: Greg Hysen Date: Fri, 14 Dec 2018 11:22:52 -0800 Subject: Added `gas` field so tests pass on Geth; --- .../test/extensions/balance_threshold_filter.ts | 36 ++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'contracts/extensions') diff --git a/contracts/extensions/test/extensions/balance_threshold_filter.ts b/contracts/extensions/test/extensions/balance_threshold_filter.ts index 20397b14f..07199d60b 100644 --- a/contracts/extensions/test/extensions/balance_threshold_filter.ts +++ b/contracts/extensions/test/extensions/balance_threshold_filter.ts @@ -428,7 +428,13 @@ describe(ContractName.BalanceThresholdFilter, () => { const txReceipt = await erc721TakerBalanceThresholdWrapper.batchFillOrdersNoThrowAsync( orders, validTakerAddress, - { takerAssetFillAmounts }, + { + takerAssetFillAmounts, + // HACK(albrow): We need to hardcode the gas estimate here because + // the Geth gas estimator doesn't work with the way we use + // delegatecall and swallow errors. + gas: 600000, + }, ); // Assert validated addresses const expectedValidatedAddresseses = [ @@ -704,7 +710,13 @@ describe(ContractName.BalanceThresholdFilter, () => { const txReceipt = await erc721TakerBalanceThresholdWrapper.fillOrderNoThrowAsync( validSignedOrder, validTakerAddress, - { takerAssetFillAmount }, + { + takerAssetFillAmount, + // HACK(albrow): We need to hardcode the gas estimate here because + // the Geth gas estimator doesn't work with the way we use + // delegatecall and swallow errors. + gas: 600000, + }, ); // Assert validated addresses const expectedValidatedAddresseses = [validSignedOrder.makerAddress, validTakerAddress]; @@ -963,7 +975,13 @@ describe(ContractName.BalanceThresholdFilter, () => { const txReceipt = await erc721TakerBalanceThresholdWrapper.marketSellOrdersNoThrowAsync( orders, validTakerAddress, - { takerAssetFillAmount: cumulativeTakerAssetFillAmount }, + { + takerAssetFillAmount: cumulativeTakerAssetFillAmount, + // HACK(albrow): We need to hardcode the gas estimate here because + // the Geth gas estimator doesn't work with the way we use + // delegatecall and swallow errors. + gas: 600000, + }, ); // Assert validated addresses const expectedValidatedAddresseses = [ @@ -1163,7 +1181,13 @@ describe(ContractName.BalanceThresholdFilter, () => { const txReceipt = await erc721TakerBalanceThresholdWrapper.marketBuyOrdersNoThrowAsync( orders, validTakerAddress, - { makerAssetFillAmount: cumulativeMakerAssetFillAmount }, + { + makerAssetFillAmount: cumulativeMakerAssetFillAmount, + // HACK(albrow): We need to hardcode the gas estimate here because + // the Geth gas estimator doesn't work with the way we use + // delegatecall and swallow errors. + gas: 600000, + }, ); // Assert validated addresses const expectedValidatedAddresseses = [ @@ -1493,7 +1517,7 @@ describe(ContractName.BalanceThresholdFilter, () => { // Cancel const txReceipt = await erc721MakerBalanceThresholdWrapper.batchCancelOrdersAsync( validSignedOrders, - validSignedOrder.makerAddress, + validSignedOrders[0].makerAddress, ); // Assert validated addresses const expectedValidatedAddresseses: string[] = []; @@ -1560,7 +1584,7 @@ describe(ContractName.BalanceThresholdFilter, () => { const cancelOrdersUpToThisSalt = new BigNumber(1); const txReceipt = await erc721MakerBalanceThresholdWrapper.cancelOrdersUpToAsync( cancelOrdersUpToThisSalt, - validSignedOrder.makerAddress, + validSignedOrders[0].makerAddress, ); // Assert validated addresses const expectedValidatedAddresseses: string[] = []; -- cgit v1.2.3