Open grostim opened 2 years ago
I was thinking about using the downloader to create a separate json file with the balances, and then a separate importer dedicated to the balance statements.
This sounds like a way to go
But why do you want for insert balance statements?
It's a good practice with beancount to insert balance statement on a regular basis for each account as an integrity checkpoint. https://beancount.github.io/docs/beancount_language_syntax.html#balance-assertions
Ok, I will accept a PR if you implement this.
I think downloaded balances should be saved to separate files with names like {config_name}_balances.json
. But instead of making separate importer, we can add new options to downloader.py
and importer.py
to avoid code duplication.
I agree.
I'll think about it.
Hi!
Have you considered gathering token balance from API ?
With Blockscout it should be pretty straightforward thanks to :
https://blockscout.com/xdai/mainnet/api?module=account&action=tokenlist&address=0x
With etherscan and clones, it should be more work as you need to make one request per token, and we will a dict to list the tokens to be checked.
I am wondering what would be neatest way to implement that without breaking the current behaviour ? I was thinking about using the downloader to create a separate json file with the balances, and then a separate importer dedicated to the balance statements.
What do you think ?