question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gas Estimation: tests dont work with ganache-cli@6.4.2 and later

See original GitHub issue

Running any version of ganache-cli >=6.4.2 (Gas Exactimation) breaks tests on this repository. In reviewing the ganache-cli@6.4.2 changelog, I read to submit an issue here if an OOG error is experienced.

Expected Behavior

By following the “Test” section of the README, I expect all tests to run successfully (with npm run test). This is what happens prior to ganache-cli@6.4.2.

To run ganache-cli, I am not using the npm script, but rather using ganache-cli -p 8545 -m "asset member awake bring mosquito lab sustain muscle elephant equip someone obvious" -a 100

Current Behavior

error=Error: Returned error: VM Exception while processing transaction: out of gas

ganache-cli versions 6.4.2, 6.4.3, and 6.4.4 produce the above error when running npm run test.

Steps to Reproduce (for bugs)

# Install Ganache-cli globally:
npm install --global ganache-cli

# Install Truffle globally:
npm install --global truffle@v4.1.12

# Install local node dependencies:
npm install

# Compile contracts
npm run compile

# Run ganache-cli
ganache-cli -p 8545 -m "asset member awake bring mosquito lab sustain muscle elephant equip someone obvious" -a 100

# Run contracts test suite
npm run test

Context

This was discovered when running tests on this repository.

Your Environment

  • truffle@4.1.12
  • solc@0.5.5+commit.47a71e8f.Darwin.appleclang

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
shanefontainecommented, Jul 2, 2019

That makes sense. Thank you.

2reactions
shanefontainecommented, Jul 2, 2019

Great timing. This beta version works perfectly. I’ll go ahead and close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gas Estimation: tests dont work with ganache-cli@6.4.2 and ...
Running any version of ganache-cli >=6.4.2 (Gas Exactimation) breaks tests on this repository. In reviewing the ganache-cli@6.4.2 changelog, ...
Read more >
gas estimation about tests on Ganache forked mainnet
I come up with this solution with gas estimation. Could someone help check whether it is feasible? If we want to send a...
Read more >
ganache-cli - npm
Using the --blockTime flag is discouraged unless you have tests which require a specific mining interval. -d or --deterministic : Generate ...
Read more >
Ganache CLI - Nethereum Documentation
Ganache CLI is the latest version of TestRPC: a fast and customizable blockchain emulator. ... Gas price and mining speed can be modified....
Read more >
Brownie Documentation
Brownie is a Python framework for Ethereum smart contract testing, ... Brownie is designed to use ganache-cli as a local development environment.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found