0

I am trying to deploy contract on ropston testnet. I have created an account through truffle console and got three test ethers from https://faucet.bitfwd.xyz/. I have confirmed that my account has three ethers from this https://ropsten.etherscan.io/. But when I check balance from truffle console it always says zero. Although my node is synced.

web3.eth.getBalance('0x06ac473de96986b20b37f13ca311d07c0875e49b') BigNumber { s: 1, e: 0, c: [ 0 ] } here is screenshot of https://ropsten.etherscan.io/ which clearly shows it has three ethers.

enter image description here

When I do truffle migrate I get following error. enter image description here

Please help my finding where mistakes occur. Thanks in advance :)

Edit

Here is my truffle.js

module.exports = { networks: { development: { host: '127.0.0.1', port: 8545, network_id: '*', gas: 470000 } }

Shoaib Iqbal
  • 239
  • 2
  • 11
  • Are you certain that your local ethereum node is connected to Ropsten? And have you checked your node's logs to see if there's anything informative there? You may want to consider testing with infura: http://truffleframework.com/tutorials/using-infura-custom-provider . – Howard Feb 14 '18 at 16:27

2 Answers2

0

Ropsten is deprecated by 5 Oct. 2022 and i don't think there is any validators left to manage your transactions.

Try using Goerli testnet instead.

Akall
  • 463
  • 2
  • 7
0

Are you sure truffle migrate tries to migrate to ropsten ( with an e) ? It says "using network development" in your screenshot. You should have ropsten declared as a network in your truffle.js.

So: Please check wether you a) are checking your balance on ropsten via truffle console, and b) wether you are actually trying to migrate to ropsten.

Edit: I added Ropsten like this into my truffle.js :

ropsten:  {
     network_id: 3,
     host: "localhost",
     port:  8545,
     gas:   450000
}

Then migrate via truffle migrate --network ropsten

Regarding the balance, please check Why the balance that I see in the Ropsten isn't reflected in Truffle console? and make sure you really are in sync.

Christian W
  • 101
  • 3