fix(@embark/test): increase default gas limit to 8M so tests support bigger contracts

Was needed for the Teller Dapp as its Escrow contract is too big for the other default
This commit is contained in:
Jonathan Rainville 2020-01-21 10:32:44 -05:00 committed by Iuri Matias
parent b8f93ea2ad
commit b6856b2083
3 changed files with 5 additions and 4 deletions

View File

@ -70,8 +70,7 @@ class EthereumBlockchainClient {
}
if (!contract.gasPrice) {
const gasPrice = await web3.eth.getGasPrice();
contract.gasPrice = contract.gasPrice || gasPrice;
contract.gasPrice = await web3.eth.getGasPrice();
}
embarkJsUtils.secureSend(web3, contractObject, {

View File

@ -2,7 +2,9 @@ class Ganache {
constructor(embark) {
embark.events.request('blockchain:vm:register', () => {
const ganache = require('ganache-cli');
return ganache.provider();
// Default to 8000000, which is the server default
// Somehow, the provider default is 6721975
return ganache.provider({gasLimit: '0x7A1200'});
});
}
}

View File

@ -7,7 +7,7 @@ const Web3 = require('web3');
const Reporter = require('./reporter');
const GAS_LIMIT = 6000000;
const GAS_LIMIT = 8000000;
const JAVASCRIPT_TEST_MATCH = /^.+\.js$/i;
const TEST_TIMEOUT = 15000; // 15 seconds in milliseconds