Skip to content

Commit b6856b2

Browse files
jrainvilleiurimatias
authored andcommitted
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
1 parent b8f93ea commit b6856b2

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/plugins/ethereum-blockchain-client/src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ class EthereumBlockchainClient {
7070
}
7171

7272
if (!contract.gasPrice) {
73-
const gasPrice = await web3.eth.getGasPrice();
74-
contract.gasPrice = contract.gasPrice || gasPrice;
73+
contract.gasPrice = await web3.eth.getGasPrice();
7574
}
7675

7776
embarkJsUtils.secureSend(web3, contractObject, {

packages/plugins/ganache/src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ class Ganache {
22
constructor(embark) {
33
embark.events.request('blockchain:vm:register', () => {
44
const ganache = require('ganache-cli');
5-
return ganache.provider();
5+
// Default to 8000000, which is the server default
6+
// Somehow, the provider default is 6721975
7+
return ganache.provider({gasLimit: '0x7A1200'});
68
});
79
}
810
}

packages/plugins/mocha-tests/src/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Web3 = require('web3');
77

88
const Reporter = require('./reporter');
99

10-
const GAS_LIMIT = 6000000;
10+
const GAS_LIMIT = 8000000;
1111
const JAVASCRIPT_TEST_MATCH = /^.+\.js$/i;
1212
const TEST_TIMEOUT = 15000; // 15 seconds in milliseconds
1313

0 commit comments

Comments
 (0)