A TrueBlocks recipe to show ERC 20 token balances for an address.
Note: The following assumes you have a copy of (either by having built it yourself or downloaded it) the TrueBlocks Appearance Index.
Preliminaries
We start by extracting from the chain all the transactions for the address in question. We will use a randomly selected address that we know owns a number of different tokens.
chifra list 0x03fdcadc09559262f40f5ea61c720278264eb1da
This produces a list of 2,129 appearances (at the time of this writing). Each appearances is a pair of integers detailing the blockNumber and transactionIndex of the transaction. Note that other methods of getting such a list (such as EtherScan APIs) return far fewer transactions. We will explain this in a later post.