paradigmxyz / cryo

cryo is the easiest way to extract blockchain data to parquet, csv, json, or python dataframes
Apache License 2.0
1.12k stars 97 forks source link

`balances` is pulling the balance for addresses before the execution of transactions in a block #154

Open Cybourgeoisie opened 8 months ago

Cybourgeoisie commented 8 months ago

Version cryo commit 041f38b, latest as of writing

Platform Max OSX

Description

Pulling balances data down will return the correct addresses at the correct blocks & transactions, however they are returning the balances before the transaction is executed and the balances are updated, not after.

I pulled a random address while reviewing this issue for the following example:

The output from cryo, displayed in duckdb: Screenshot 2023-12-16 at 7 54 23 AM

The transactions in etherscan: Screenshot 2023-12-16 at 7 55 28 AM

The assumed behavior (at least, my assumed behavior) is that this would return the balances of addresses after a block has been executed, not before.