I'm using truffle to deploy a contract on the rinkeby testnet

Here is transaction info saying that my address received ether however as shown below, the balance still shows as 0.

    truffle(rinkeby)> web3.eth.getTransaction("0x4979d45cb9cf0959a9f2a139eb7adc6a231b866cc52289287bb2dd5b125b0635")
{ blockHash: '0xdf597f365e50a92bf3edbd37fc293f40d174b1c0a9b6d7a2cfb4df8c785126cb',
  blockNumber: 1759853,
  from: '0x31b98d14007bdee637298086988a0bbd31184523',
  gas: 21000,
  gasPrice: BigNumber { s: 1, e: 9, c: [ 1000008601 ] },
  hash: '0x4979d45cb9cf0959a9f2a139eb7adc6a231b866cc52289287bb2dd5b125b0635',
  input: '0x',
  nonce: 56835,
  to: '0x9c1a6ce6a1a5f6c80390977c9c9f653ff49a8729',
  transactionIndex: 2,
  value: BigNumber { s: 1, e: 19, c: [ 187500 ] },
  v: '0x2b',
  r: '0xbffa1a59cd0622b265d656bd9aad9a83bdc536ce1ba8b85af5d194ba93c56905',
  s: '0x43ef0187a715be575081e6a96c860b264cfb0a0007645b7267d5bca6535f213c' }

When seeing balance, it shows as 0:

truffle(rinkeby)> web3.eth.getBalance("0x9c1a6ce6a1a5f6c80390977c9c9f653ff49a8729")
BigNumber { s: 1, e: 0, c: [ 0 ] }

In etherscan it shows that there is a balance of 18 ether for the account: https://www.rinkeby.io/#explorer

This is the geth command I'm using:

geth --rinkeby --rpc --rpcapi db,eth,net,web3,personal --rpcaddr --unlock 9c1a6ce6a1a5f6c80390977c9c9f653ff49a8729

And it's synced to the newest block.

When I try and deploy the contract with the following command, it says:

    root@b91a643434cf:/voteApp# truffle migrate --network rinkeby
Using network 'rinkeby'.

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
  • What is your truffle.js configuration file? Perhaps you are not using the correct address to deploy the contracts. – Ismael Feb 14 '18 at 4:08

following this tutorial fixed this: http://blog.jaumesola.com/setting-up-an-ethereum-node-on-the-rinkeby-testnet


intitalise with genesis block

$ curl -O https://www.rinkeby.io/rinkeby.json $ geth --datadir=. init rinkeby.json load blockchain

$ geth --networkid=4 --datadir=. --ethstats='yournode:Respect my authoritah!@stats.rinkeby.io' --bootnodes=enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@ --cache=1024 Wait. You will see the INFO message "Block synchronisation started" then many INFO lines starting with "Imported...". Sync is in progress...

Note the 1GB cache, you can use less or more depending on your available memory Network id 4 corresponds to the Rinkeby chain Blockchain data will be stored in geth/ Check blockchain sync progress While the node is up & running (the above command) you can get info about the blockchain sync progress (among other data) through the JavaScript console. In another terminal window type:

$ cd /path/to/rinkeby $ geth attach ipc:geth.ipc At the ">" prompt you can type, e.g.

eth eth.syncing adm adm.peers

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.