I know that for Bitcoin, each address get its BTC balance from its history of transactions. What about for ethereum? How do we know the ETH balance and ERC20 token balance(s) of an Eth address?
Thank you very much
For each ethereum address, do we get its ETH balance from the ethereum world state's database?
how do we know an ethereum account's balances of each ERC20 token - is there a data field for each address containing all the erc20 contracts an account has interacted with, then the wallet checks the smart contract's balanceOf field? If not, how do we know what erc20 tokens are found in an eth wallet?