I want to label each ethereum address whether it is EOA or not.

I'm thinking of the following method.

  • Scan all transactions whose "to address" is the address to check. if the "input" of every transaction is null, then the address is EOA.

Is this OK? Or is there other methods that are more appropriate or efficient?

(For the data source of transactions, I use BigQuery public dataset.)


1 Answer 1


Unfortunately, I could not find the precise details on the data presented in the dataset. The links from this page did not work for me.

But the only correct way to find whether an account is an EOA is to actually check whether there is a code stored on this address. Looking at the transactions alone is never enough since there may be smart contracts with no transactions to them and there can also be EOAs with transactions with non-null data to their address (it is a noop, but might be used to send angry messages like during the Poly network hack).

If you need to answer queries like "whether an address is an EOA" on-demand, the right way to do it would be to query Infura or Alchemy for the code of the account and check whether it is empty.

  • Thank you. I understand. Actually, after rechecking the schema, I found the "countracts" table in the schema. This table would be the easiest way to go.
    – nakaakist
    Jul 31, 2022 at 2:14

Your Answer

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

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