I want to distinguish between contract addresses and smart contract addresses. But when running


in the geth console with either a contract or a non-contract address, it returns "0x".

I am using geth 1.8.22. Does anyone has an idea why that happens?


I met this problem sometime ago, in my case the node I connected to isn't fully synced, that is to say, the node is in the midst of a fast sync, you should know that

Fast sync finishes syncing Blocks/Transactions/Receipts well before 
the state sync finished and the contract code is part of the state sync.
| improve this answer | |
  • It is possible to check whether node is synced or not via web3.eth.syncing. – Mikhail Vladimirov Apr 11 '19 at 15:09

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.