Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running migration: 4_parameterizer_factory.js Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: The contract code couldn't be stored, please check your gas amount #92

Open
gavinbains opened this issue Nov 26, 2018 · 0 comments

Comments

@gavinbains
Copy link

gavinbains commented Nov 26, 2018

I get the following error when trying to migrate the contracts. I haven't been able to figure out why this is happening.

Running migration: 4_parameterizer_factory.js
  Deploying ParameterizerFactory...
  ... 0xa2cf44175fc7bd144394cdd2e7cb859f10f5df0322e347fa6dd7f6d3287f9135
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: The contract code couldn't be stored, please check your gas amount.
    at Object.callback (/usr/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/contract.js:147:1)
    at /usr/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/method.js:142:1
    at /usr/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:89:1
    at /usr/lib/node_modules/truffle/build/webpack:/packages/truffle-migrate/index.js:225:1
    at /usr/lib/node_modules/truffle/build/webpack:/packages/truffle-provider/wrapper.js:134:1
    at XMLHttpRequest.request.onreadystatechange (/usr/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1)
    at XMLHttpRequestEventTarget.dispatchEvent (/usr/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1)
    at XMLHttpRequest._setReadyState (/usr/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1)
    at XMLHttpRequest._onHttpResponseEnd (/usr/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:469:1)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1092:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

I tried to increase the gas in the truffle.js file:

ourTestNet: {
      host: "127.0.0.1",
      port: 8545,
      network_id: "*",
      gas: 6000000 
    }

I came across a thread that mentioned I should comment out the gas line, but that didn't work either.
I tried increasing the gasLimit in genesis.json

{
  "difficulty" : "0x20000",
  "extraData"  : "",
  "gasLimit"   : "0x80000000",
  "alloc": {},
  "config": {
        "chainId": 15,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    }
}

But that didn't work either.

In order to deploy, I run the following order of commands:

geth --datadir=./chaindata/ init ./genesis.json

geth --datadir=./chaindata/ --ipcpath $HOME/.ethereum/geth.ipc --rpc --rpcapi db,eth,net,web3,personal,miner

mist –rpc http://127.0.0.1:8545

geth attach

personal.unlockAccount('0xE8533657196e9aC9156Db54B75047b97C76F6231', '123456789')

miner.start()

truffle migrate --network ourTestNet

Any idea why this could be happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant