Remove hard coded gas limits in all tests
This commit is contained in:
parent
1400ceb4e8
commit
71acf2bfa7
@ -618,12 +618,7 @@ blockchainTests.resets('Exchange core', () => {
|
|||||||
salt: new BigNumber(3),
|
salt: new BigNumber(3),
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
await exchangeWrapper.batchFillOrdersNoThrowAsync(signedOrders, takerAddress, {
|
await exchangeWrapper.batchFillOrdersNoThrowAsync(signedOrders, takerAddress);
|
||||||
// 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,
|
|
||||||
});
|
|
||||||
|
|
||||||
const newBalances = await erc20Wrapper.getBalancesAsync();
|
const newBalances = await erc20Wrapper.getBalancesAsync();
|
||||||
const fillMakerAssetAmount = signedOrders[2].makerAssetAmount.plus(signedOrders[3].makerAssetAmount);
|
const fillMakerAssetAmount = signedOrders[2].makerAssetAmount.plus(signedOrders[3].makerAssetAmount);
|
||||||
|
@ -223,10 +223,6 @@ blockchainTests.resets('Exchange wrappers', env => {
|
|||||||
);
|
);
|
||||||
await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress, {
|
await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress, {
|
||||||
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: 250000,
|
|
||||||
});
|
});
|
||||||
const newBalances = await erc20Wrapper.getBalancesAsync();
|
const newBalances = await erc20Wrapper.getBalancesAsync();
|
||||||
|
|
||||||
@ -450,10 +446,6 @@ blockchainTests.resets('Exchange wrappers', env => {
|
|||||||
);
|
);
|
||||||
await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress, {
|
await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress, {
|
||||||
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: 280000,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Verify post-conditions
|
// Verify post-conditions
|
||||||
@ -688,10 +680,6 @@ blockchainTests.resets('Exchange wrappers', env => {
|
|||||||
);
|
);
|
||||||
await exchangeWrapper.batchFillOrdersNoThrowAsync(signedOrders, takerAddress, {
|
await exchangeWrapper.batchFillOrdersNoThrowAsync(signedOrders, takerAddress, {
|
||||||
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,
|
|
||||||
});
|
});
|
||||||
const newBalances = await erc20Wrapper.getBalancesAsync();
|
const newBalances = await erc20Wrapper.getBalancesAsync();
|
||||||
|
|
||||||
@ -763,10 +751,6 @@ blockchainTests.resets('Exchange wrappers', env => {
|
|||||||
);
|
);
|
||||||
await exchangeWrapper.batchFillOrdersNoThrowAsync(newOrders, takerAddress, {
|
await exchangeWrapper.batchFillOrdersNoThrowAsync(newOrders, takerAddress, {
|
||||||
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: 450000,
|
|
||||||
});
|
});
|
||||||
const newBalances = await erc20Wrapper.getBalancesAsync();
|
const newBalances = await erc20Wrapper.getBalancesAsync();
|
||||||
|
|
||||||
@ -789,10 +773,6 @@ blockchainTests.resets('Exchange wrappers', env => {
|
|||||||
);
|
);
|
||||||
await exchangeWrapper.marketSellOrdersNoThrowAsync(signedOrders, takerAddress, {
|
await exchangeWrapper.marketSellOrdersNoThrowAsync(signedOrders, takerAddress, {
|
||||||
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: 6000000,
|
|
||||||
});
|
});
|
||||||
const newBalances = await erc20Wrapper.getBalancesAsync();
|
const newBalances = await erc20Wrapper.getBalancesAsync();
|
||||||
|
|
||||||
@ -864,10 +844,6 @@ blockchainTests.resets('Exchange wrappers', env => {
|
|||||||
);
|
);
|
||||||
await exchangeWrapper.marketSellOrdersNoThrowAsync(signedOrders, takerAddress, {
|
await exchangeWrapper.marketSellOrdersNoThrowAsync(signedOrders, takerAddress, {
|
||||||
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,
|
|
||||||
});
|
});
|
||||||
const newBalances = await erc20Wrapper.getBalancesAsync();
|
const newBalances = await erc20Wrapper.getBalancesAsync();
|
||||||
|
|
||||||
@ -938,10 +914,6 @@ blockchainTests.resets('Exchange wrappers', env => {
|
|||||||
);
|
);
|
||||||
await exchangeWrapper.marketSellOrdersNoThrowAsync(signedOrders, takerAddress, {
|
await exchangeWrapper.marketSellOrdersNoThrowAsync(signedOrders, takerAddress, {
|
||||||
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,
|
|
||||||
});
|
});
|
||||||
const newBalances = await erc20Wrapper.getBalancesAsync();
|
const newBalances = await erc20Wrapper.getBalancesAsync();
|
||||||
|
|
||||||
@ -985,10 +957,6 @@ blockchainTests.resets('Exchange wrappers', env => {
|
|||||||
);
|
);
|
||||||
await exchangeWrapper.marketBuyOrdersNoThrowAsync(signedOrders, takerAddress, {
|
await exchangeWrapper.marketBuyOrdersNoThrowAsync(signedOrders, takerAddress, {
|
||||||
makerAssetFillAmount,
|
makerAssetFillAmount,
|
||||||
// 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,
|
|
||||||
});
|
});
|
||||||
const newBalances = await erc20Wrapper.getBalancesAsync();
|
const newBalances = await erc20Wrapper.getBalancesAsync();
|
||||||
|
|
||||||
@ -1060,10 +1028,6 @@ blockchainTests.resets('Exchange wrappers', env => {
|
|||||||
);
|
);
|
||||||
await exchangeWrapper.marketBuyOrdersNoThrowAsync(signedOrders, takerAddress, {
|
await exchangeWrapper.marketBuyOrdersNoThrowAsync(signedOrders, takerAddress, {
|
||||||
makerAssetFillAmount,
|
makerAssetFillAmount,
|
||||||
// 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,
|
|
||||||
});
|
});
|
||||||
const newBalances = await erc20Wrapper.getBalancesAsync();
|
const newBalances = await erc20Wrapper.getBalancesAsync();
|
||||||
|
|
||||||
@ -1135,10 +1099,6 @@ blockchainTests.resets('Exchange wrappers', env => {
|
|||||||
);
|
);
|
||||||
await exchangeWrapper.marketBuyOrdersNoThrowAsync(signedOrders, takerAddress, {
|
await exchangeWrapper.marketBuyOrdersNoThrowAsync(signedOrders, takerAddress, {
|
||||||
makerAssetFillAmount,
|
makerAssetFillAmount,
|
||||||
// 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,
|
|
||||||
});
|
});
|
||||||
const newBalances = await erc20Wrapper.getBalancesAsync();
|
const newBalances = await erc20Wrapper.getBalancesAsync();
|
||||||
|
|
||||||
|
@ -427,10 +427,6 @@ describe(ContractName.BalanceThresholdFilter, () => {
|
|||||||
validTakerAddress,
|
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
|
// Assert validated addresses
|
||||||
@ -699,10 +695,6 @@ describe(ContractName.BalanceThresholdFilter, () => {
|
|||||||
validTakerAddress,
|
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
|
// Assert validated addresses
|
||||||
@ -951,10 +943,6 @@ describe(ContractName.BalanceThresholdFilter, () => {
|
|||||||
validTakerAddress,
|
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
|
// Assert validated addresses
|
||||||
|
Loading…
x
Reference in New Issue
Block a user