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});
Jennifer
  • 11
  • 2
  • If you're specifying a non-standard port for testrpc, have you told Truffle what it is? – Edmund Edgar Oct 05 '17 at 21:25
  • Yes, actually I specified the same port of 20487 found in https://github.com/CoinFabrik/ico/blob/9ac3487b6103c96958cdabf8b9ce2071a7250cd8/truffle.js – Jennifer Oct 05 '17 at 21:35

0 Answers0