AaveLiquidationReader
Documentation for eth_defi.aave_v3.liquidation.AaveLiquidationReader Python class.
- class AaveLiquidationReader
Bases:
objectMethods summary
__init__(client, web3[, hypersync_read_timeout])build_query(start_block, end_block)Create liquidation event query.
decode_event(chain_id, chain_name, log, ...)Decode liquidation event from the log data.
fetch_liquidations(start_block, end_block)fetch_liquidations_async(start_block, end_block)Identify smart contracts emitting 4626 like events.
resolve_token(address)Resolve token address to checksum address.
- __init__(client, web3, hypersync_read_timeout=90)
- Parameters
client (hypersync.HypersyncClient) –
web3 (web3.main.Web3) –
hypersync_read_timeout (float) –
- resolve_token(address)
Resolve token address to checksum address.
Cached
- Parameters
address (eth_typing.evm.HexAddress) –
- Return type
- build_query(start_block, end_block)
Create liquidation event query.
The event in the question:
// Event Signature // 0xe413a321e8681d831f4dbccbca790d2952b56f977908e45be37335533e005286 LiquidationCall( address collateralAsset, address debtAsset, address user, uint256 debtToCover, uint256 liquidatedCollateralAmount, address liquidator, bool receiveAToken )
See also:
- decode_event(chain_id, chain_name, log, block_lookup)
Decode liquidation event from the log data.
Convert raw addresses and amounts to more manageable format
- Parameters
- Return type
- async fetch_liquidations_async(start_block, end_block, display_progress=True)
Identify smart contracts emitting 4626 like events.
Scan all event matches using HyperSync
See stream() example here: https://github.com/enviodev/hypersync-client-python/blob/main/examples/all-erc20-transfers.py
- Parameters
- Return type
AsyncIterable[eth_defi.aave_v3.liquidation.AaveLiquidationEvent]