Skip to content

Commit

Permalink
fix(@embark/test): increase default gas limit to 8M so tests support …
Browse files Browse the repository at this point in the history
…bigger contracts

Was needed for the Teller Dapp as its Escrow contract is too big for the other default
  • Loading branch information
jrainville authored and iurimatias committed Jan 23, 2020
1 parent b8f93ea commit b6856b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/plugins/ethereum-blockchain-client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down
4 changes: 3 additions & 1 deletion packages/plugins/ganache/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'});
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/mocha-tests/src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b6856b2

Please sign in to comment.