I'm using Truffle 3.2.5 and Parity to try and migrate a project to Ropsten. I've tried changing the gas amount per the error's advice. I'm running a full Parity node on the same machine, so my truffle settings are localhost, 8545, network ID 3. All of my contracts compile, and I'm able to successfully run the exact same migration on testrpc. On Ropsten, I authorize the transaction in the Parity UI, Truffle successfully migrates 1_initial_migration.js, and then I get the following:
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 (/home/user/.nvm/versions/node/v7.10.0/lib/node_modules/truffle/node_modules/web3/lib/web3/contract.js:147:46)
at /home/user/.nvm/versions/node/v7.10.0/lib/node_modules/truffle/node_modules/web3/lib/web3/method.js:142:25
at /home/user/.nvm/versions/node/v7.10.0/lib/node_modules/truffle/node_modules/web3/lib/web3/requestmanager.js:89:9
at XMLHttpRequest.request.onreadystatechange (/home/user/.nvm/versions/node/v7.10.0/lib/node_modules/truffle/node_modules/web3/lib/web3/httpprovider.js:118:13)
at XMLHttpRequestEventTarget.dispatchEvent (/home/user/.nvm/versions/node/v7.10.0/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:64:18)
at XMLHttpRequest._setReadyState (/home/user/.nvm/versions/node/v7.10.0/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:354:12)
at XMLHttpRequest._onHttpResponseEnd (/home/user/.nvm/versions/node/v7.10.0/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:509:12)
at IncomingMessage.<anonymous> (/home/user/.nvm/versions/node/v7.10.0/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:469:24)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:188:7)
Thanks for any help
Here's my truffle.js
module.exports = {
migrations_directory: "./migrations",
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*" // Match any network id
},
live: {
host: "localhost",
port: 8545,
network_id: 3,
}
}
};
truffle.js
file. If you don't specify any network,truffle migrate
will go to the one withnetwork_id: "*"
. So don't forget to runtruffle migrate --network ropsten
. More info