I am having issues with calling functions of contract deployed on the Ropsten Testnet. Previously, I tested this on testrpc and everything was working well. I'm working on transfer of ERC20 Standard tokens.

When I tried calling balanceOf using contract.call().balanceOf() it raised following error

web3.exceptions.BadFunctionCallOutput: Could not transact with/call contract function, is contract deployed correctly and chain synced?

Then I also tried contract.transact().balanceOf() which threw the following error

raise ValueError(response["error"]) ValueError: {'code': -32000, 'message': 'unknown account'}

Is it because geth hasn't fully synced with the Ropsten chain? If I have to fully sync with the Ropsten Chain now, does that mean when the contract is later deployed into main net, the main net chain has to be synced fully as well?

1 Answer 1


is contract deployed correctly and chain synced?

That error message is right. You should definitely sync fully, and that will apply to the main net, too. You might be pleasantly surprised how much faster parity syncs.

unknown account

This problem is unrelated to syncing. It also sounds like you are trying to transact from an account that geth doesn't have a key for. web3.eth.accounts needs to show the account you set as the from field in transact().

  • Oh shoot! I have already given about 8-9 hours for geth to sync. Anyways, Thanks for the answer!! Commented Sep 12, 2017 at 13:29

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.