Ganache-cli: Deploying contract always runs out of gas on testrpc

Created on 17 Jul 2016  路  2Comments  路  Source: trufflesuite/ganache-cli

Can't deploy the following contract https://github.com/JefStat/prediction_market_dapp/blob/master/contracts/PredictionMarket.sol no matter the amount of gas being sent with the transaction.
Testrpc is started as follows
testrpc --accounts 3 --port 8546 --gasLimit 1111115141592

Expected Behavior

I expect the contract to deploy like it does on a custom network

Current Behavior

Deploying the contract causing the following stacktrace

Error: VM Exception while executing transaction: invalid JUMP
    at /usr/lib/node_modules/ethereumjs-testrpc/lib/blockchain.js:528:18
    at Object.async.eachSeries (/usr/lib/node_modules/ethereumjs-testrpc/node_modules/async-eventemitter/node_modules/async/lib/async.js:130:20)
    at VM.AsyncEventEmitter.emit (/usr/lib/node_modules/ethereumjs-testrpc/node_modules/async-eventemitter/lib/AsyncEventEmitter.js:42:9)
    at afterBlock (/usr/lib/node_modules/ethereumjs-testrpc/node_modules/ethereumjs-vm/lib/runBlock.js:55:10)
    at /usr/lib/node_modules/ethereumjs-testrpc/node_modules/ethereumjs-vm/lib/runBlock.js:179:9
    at /usr/lib/node_modules/ethereumjs-testrpc/node_modules/ethereumjs-vm/lib/cache.js:107:7
    at /usr/lib/node_modules/ethereumjs-testrpc/node_modules/async/lib/async.js:52:16
    at iterate (/usr/lib/node_modules/ethereumjs-testrpc/node_modules/async/lib/async.js:260:24)
    at Object.async.forEachOfSeries.async.eachOfSeries (/usr/lib/node_modules/ethereumjs-testrpc/node_modules/async/lib/async.js:281:9)
    at Object.async.forEachSeries.async.eachSeries (/usr/lib/node_modules/ethereumjs-testrpc/node_modules/async/lib/async.js:214:22)

Steps to Reproduce (for bugs)

  1. clone repository
  2. run truffle deploy -e test

    Context

Trying to get some unit test on this contract running

Your Environment

Most helpful comment

For those who land here later, a parent contract constructor was calling a function, which had a modifier, which was throwing an exception.

All 2 comments

Problem was a bug in the contract. New user error

For those who land here later, a parent contract constructor was calling a function, which had a modifier, which was throwing an exception.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kumavis picture kumavis  路  3Comments

redshark1802 picture redshark1802  路  4Comments

zweicoder picture zweicoder  路  3Comments

dwalintukan picture dwalintukan  路  6Comments

ralph-pichler picture ralph-pichler  路  6Comments