Following this blogpost: https://medium.com/@guccimanepunk/how-to-deploy-a-truffle-contract-to-ropsten-e2fb817870c1
I created an account with geth --testnet account new
I requesed Ether into this account, but when I check
geth attach http://127.0.0.1:8545
personal.unlockAccount(eth.accounts[0])
Unlock account 0x78ca93e2a0621a1b5e198e85fd8e1d2db78d17ba
eth.getBalance(eth.accounts[0])
0
So maybe that's the problem? (The faucet worked fine for me with my Metamask address. I'm suspecting that my geth account isn't syncing)
I start testnest with this:
~/geth --testnet --fast --rpc --rpcapi eth,net,web3,personal
How do I connect to Ropsten test network and deploy my contract with truffle?
truffle migrate --network ropsten
Using network 'ropsten'.
Running migration: 1_initial_migration.js
Deploying Migrations...
... undefined
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: insufficient funds for gas * price + value
at Object.InvalidResponse (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:41484:16)
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:329530:36
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:176186:11
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:325200:9
at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:328229:7)
at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176415:18)
at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176705:12)
at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176860:12)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176820:24)
at emitNone (events.js:111:20)
truffle.js:
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // Match any network id
},
ropsten: {
network_id: 3,
host: "127.0.0.1",
port: 8545,
gas: 9900000
}
}
};