1

I am getting the following error when doing truffle migrate on the following code: https://github.com/CoinFabrik/ico/tree/9ac3487b6103c96958cdabf8b9ce2071a7250cd8

Deploying Crowdsale...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: The contract code couldn't be stored, please check your gas amount.

I changed the truffle.js to reflect the first testrpc account I am deploying on testrpc (testrpc -p portnumber )

Could someone please help me in what I am doing wrong?

What I have tried so far amongst others:

Truffle v3.2.5 migration error: contract code couldn't be stored

Error: The contract code couldn't be stored, please check your gas amount , when creating new contract

  1. I have increased the gas in the truffle.js file
  2. Someone said my account needs to be unlocked but I am on testrpc
  3. I also saw somewhere that I need to use payable on the constructor but I am not sure where.
  4. Use --network testrpc
  5. Found out that the problem is with this line:
    await deployer.deploy(Crowdsale, MultiSigWallet.address, config.tests.startBlock, config.tests.endBlock, accounts[0], {gas: 4200000});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.