polkascan / explorer

Polkascan Substrate Explorer
GNU General Public License v3.0
42 stars 44 forks source link

Historical balance of an account #9

Closed wouterter closed 1 year ago

wouterter commented 1 year ago

Show balance history of an account, plus USD equivalent for current and historical price. Based on the indexed event data from the Polkascan API, we'll find all events that might have changed the balance. For every event, we'll retrieve the account balance from the state of the corresponding block. The state will be fetched from the Substrate node. This might not be a perfectly accurate picture of the balance history, but it's a pragmatic solution with a pretty granular result. To determine which event types are candidates for balance changes, we'll check the metadata to find attributes that specify a token amount. This will also depend on the runtime version.