0

I need to run a full node of ETH and its bound tokens for an experimental exchange site.

How will I do to differentiate ETH from others tokens ?

Is there a way to download the ETH blockchain excluding its tokens?

Thanks.

3
  • 1
    What are you asking? When you run full node you get the transaction records not the tokens
    – Nathan Aw
    Aug 2, 2018 at 13:53
  • What are you asking? When you run full node you get the transaction records not the tokens
    – Nathan Aw
    Aug 2, 2018 at 13:53
  • But tokens are associated to the ETH blockchain right ? What I want to know is how to differentiate each token inside the blockchain ? In such a way that when a transaction is made I know to which token the transaction is related to.
    – Ligth
    Aug 2, 2018 at 13:57

2 Answers 2

1

How will I do to differentiate ETH from others tokens ?

For ERC20 tokens, you listen to the Transfer event defined in the ERC20 standard for the token contracts you are interested in.

Is there a way to download the ETH blockchain excluding its tokens?

This is not possible. Token transactions are part of the blockchain, and the only way to validate transactions and blocks is if you have the complete transaction set. You could use a non-node provider such as Etherscan to selectively query the blockchain, but you will not be able to run a node where you pick and choose what to download.

2
  • Please what do you recommend for someone who wants to run a full node for exchange? Is it good to run in pruning mode or not ?
    – Ligth
    Aug 2, 2018 at 18:33
  • @Ligth This depends entirely on your requirements. You could technically index the chain with fast mode, or even light mode. Aug 3, 2018 at 0:21
0

You could also use an external API (like Alchemy, Blocknative, or Infura) to get token balances for both ETH and ERC-20

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.