0

This is a timed crowed sale contract https://ropsten.etherscan.io/tx/0xaa3fa69a32060ad578cb9bc2a94fcc4cf7109f4e743f54c527c18f764f634ebb

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

If you look at the tx on etherscan the contract has plenty of gas to use. Here is the migration that is being run

const ICOCoinCrowdsale = artifacts.require('./ICOCoinCrowdsale.sol');
const ICOCoin = artifacts.require('./ICOCoin.sol');

module.exports = function(deployer, network, accounts) {


//const openingTime = web3.eth.getBlock('latest').timestamp + 2; // two secs in the future
const openingTime = Math.round((new Date()).getTime() / 1000);
const closingTime = openingTime + 86400 * 20; // 20 days
const rate = new web3.BigNumber(1000);
const wallet = accounts[0];

return deployer
    .then(() => {
        return deployer.deploy(ICOCoin,
            {
                gas:1842978
            });
    })
    .then(() => {
        return deployer.deploy(
            ICOCoinCrowdsale,
            openingTime,
            closingTime,
            rate,
            wallet,
            ICOCoin.address, 
            {
                gas:1834640
            }
        );
    });
};
  • It looks like your constructor didn't complete, perhaps some require within it failed, or access to an invalid position in an array or trying to call an invalid contract address, etc. – Ismael Jun 29 '18 at 2:24
1

The transaction failed for probably non-gas related issues when deploying your contracts. Impossible to say what the exact issue without seeing the Solidity code you're trying to deploy (e.g. ICOCoinCrowdsale.sol & ICOCoin.sol).

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.