Documentation for eth_defi.aave_v3.events.aave_v3_fetch_events_to_csv function.
- aave_v3_fetch_events_to_csv(json_rpc_url, state, aave_network_name, start_block, end_block, output_folder='/tmp', max_workers=16, log_info=<built-in function print>)
Fetch all tracked Aave v3 events to CSV files for notebook analysis.
Creates couple of CSV files with the event data:
A progress bar and estimation on the completion is rendered for console / Jupyter notebook using tqdm.
The scan be resumed using state storage to retrieve the last scanned block number from the previous round. However, the mechanism here is no perfect and only good for notebook use - for advanced persistent usage like database backed scans, please write your own scan loop using proper transaction management.
Any Ethereum address is lowercased in the resulting dataset and is not checksummed.
json_rpc_url (str) – JSON-RPC URL
start_block (int) – First block to process (inclusive), default is block xxx (when Aave v3 xxx was created on mainnet)
end_block (int) – Last block to process (inclusive), default is block xxx (1000 block after default start block)
aave_network_name (str) – Network name, e.g. ‘Polygon’
state (eth_defi.event_reader.state.ScanState) – Store the current scan state, so we can resume
output_folder (str) – Folder to contain output CSV files, default is /tmp folder
max_workers (int) – How many threads to allocate for JSON-RPC IO. You can increase your EVM node output a bit by making a lot of parallel requests, until you exhaust your nodes IO capacity. Experiement with different values and see how your node performs.
log_info – Which function to use to output info messages about the progress