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.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityI 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.
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.
You could also use an external API (like Alchemy, Blocknative, or Infura) to get token balances for both ETH and ERC-20