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 } }

1

2 Answers 2

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.

2
  • i have added truffle.js in edit. please have a look at question again Commented Feb 14, 2018 at 12:08
  • my rpc localhost server is running on portno. 8545 Commented Feb 14, 2018 at 12:15
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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