diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-07 02:43:07 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-07 03:41:15 +0800 |
commit | dd8727d3aebf1f4b552f8bad921b92107ad22936 (patch) | |
tree | 1312b3b7ba60b98ee36ba092aaffb4ad02a8c808 /packages/contracts/test/exchange/wrapper.ts | |
parent | b933946f335fe10f029d785b3a7bf64be1929557 (diff) | |
download | dexon-sol-tools-dd8727d3aebf1f4b552f8bad921b92107ad22936.tar.gz dexon-sol-tools-dd8727d3aebf1f4b552f8bad921b92107ad22936.tar.zst dexon-sol-tools-dd8727d3aebf1f4b552f8bad921b92107ad22936.zip |
Apply various fixes based on PR feedback
Diffstat (limited to 'packages/contracts/test/exchange/wrapper.ts')
-rw-r--r-- | packages/contracts/test/exchange/wrapper.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts index c47f3a4e4..8ef966be8 100644 --- a/packages/contracts/test/exchange/wrapper.ts +++ b/packages/contracts/test/exchange/wrapper.ts @@ -201,6 +201,9 @@ describe('Exchange wrappers', () => { await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress, { 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: 250000, }); @@ -365,6 +368,9 @@ describe('Exchange wrappers', () => { const takerAssetFillAmount = signedOrder.takerAssetAmount; await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress, { 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: 270000, }); // Verify post-conditions @@ -541,6 +547,9 @@ describe('Exchange wrappers', () => { await exchangeWrapper.batchFillOrdersNoThrowAsync(signedOrders, takerAddress, { 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, }); @@ -598,6 +607,9 @@ describe('Exchange wrappers', () => { const newOrders = [invalidOrder, ...validOrders]; await exchangeWrapper.batchFillOrdersNoThrowAsync(newOrders, takerAddress, { 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: 450000, }); @@ -761,6 +773,9 @@ describe('Exchange wrappers', () => { }); await exchangeWrapper.marketSellOrdersNoThrowAsync(signedOrders, takerAddress, { 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, }); @@ -940,6 +955,9 @@ describe('Exchange wrappers', () => { }); await exchangeWrapper.marketSellOrdersNoThrowAsync(signedOrders, takerAddress, { 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, }); |