status-go
status-go copied to clipboard
Only look for transfers after the first block that contains erc20 transfers
trafficstars
Problem
Since looking for transfers is expensive because getting events has to be done by iterating over a range of blocks, we could reduce the amount of blocks to iterate over by stopping once the first block containing erc20 transfers is reached
Implementation
- start looking for erc20 transfers from any address to any address from block 0 and iterate until an erc20 transfer is found.
- use the block number of the first transfer as a starting point
- I propose we only have this hardcoded value for mainnet
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.