LiquidationCall (Aave) event signature and topic0
The topic0 of the LiquidationCall (Aave) event is 0xe413a321e8681d831f4dbccbca790d2952b56f977908e45be37335533e005286, the keccak-256 hash of LiquidationCall(address,address,address,uint256,uint256,address,bool); 3 of its 7 arguments are indexed. Position liquidated on an Aave-style money market.
Topics
- topic00xe413a321e8681d831f4dbccbca790d2952b56f977908e45be37335533e005286keccak256("LiquidationCall(address,address,address,uint256,uint256,address,bool)")
- topic1collateralAsset (address)indexed: filterable
- topic2debtAsset (address)indexed: filterable
- topic3user (address)indexed: filterable
Data
- datadebtToCover (uint256), liquidatedCollateralAmount (uint256), liquidator (address), receiveAToken (bool)ABI-encoded, decoded with the ABI
Arguments and where they sit in the log
Indexed arguments travel as topics and can be filtered cheaply; the others are ABI-encoded together in the data.
| Name | Type | In the log |
|---|---|---|
| collateralAsset | address | topic1 |
| debtAsset | address | topic2 |
| user | address | topic3 |
| debtToCover | uint256 | data |
| liquidatedCollateralAmount | uint256 | data |
| liquidator | address | data |
| receiveAToken | bool | data |
Solidity declaration
event LiquidationCall(address indexed collateralAsset, address indexed debtAsset, address indexed user, uint256 debtToCover, uint256 liquidatedCollateralAmount, address liquidator, bool receiveAToken);
Canonical signature
LiquidationCall(address,address,address,uint256,uint256,address,bool)
topic0
0xe413a321e8681d831f4dbccbca790d2952b56f977908e45be37335533e005286
Get an alert on LiquidationCall
Each rule opens with the contract and the conditions filled in. Sign in, pick your chat and click Create.
Contracts we list that emit LiquidationCall
Any other contract with the same signature emits a log with the same topic0.
Read LiquidationCall logs in code
The same filter in viem, ethers and plain JSON-RPC, and the Solidity that emits it. The address is Aave V3 Core Pool, a contract we list that emits it.
import { createPublicClient, http, parseAbiItem } from "viem"
import { mainnet } from "viem/chains"
const client = createPublicClient({ chain: mainnet, transport: http() })
const logs = await client.getLogs({
address: "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2",
event: parseAbiItem("event LiquidationCall(address indexed collateralAsset, address indexed debtAsset, address indexed user, uint256 debtToCover, uint256 liquidatedCollateralAmount, address liquidator, bool receiveAToken)"),
fromBlock: "latest",
})
for (const log of logs) console.log(log.args) // { collateralAsset, debtAsset, user, debtToCover, liquidatedCollateralAmount, liquidator, receiveAToken }import { Interface, JsonRpcProvider } from "ethers"
const provider = new JsonRpcProvider(process.env.RPC_URL)
const iface = new Interface(["event LiquidationCall(address indexed collateralAsset, address indexed debtAsset, address indexed user, uint256 debtToCover, uint256 liquidatedCollateralAmount, address liquidator, bool receiveAToken)"])
const logs = await provider.getLogs({
address: "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2",
topics: [iface.getEvent("LiquidationCall")!.topicHash],
})
for (const log of logs) console.log(iface.parseLog(log)?.args){
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getLogs",
"params": [
{
"address": "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2",
"topics": [
"0xe413a321e8681d831f4dbccbca790d2952b56f977908e45be37335533e005286"
],
"fromBlock": "latest"
}
]
}event LiquidationCall(address indexed collateralAsset, address indexed debtAsset, address indexed user, uint256 debtToCover, uint256 liquidatedCollateralAmount, address liquidator, bool receiveAToken);
// inside a function:
emit LiquidationCall(collateralAsset, debtAsset, user, debtToCover, liquidatedCollateralAmount, liquidator, receiveAToken);An example LiquidationCall log, encoded and decoded
Placeholder values, not a real transaction: how each argument is stored in the topics and the data, and what decoding gives back.
- topic0keccak256("LiquidationCall(address,address,address,uint256,uint256,address,bool)")0xe413a321e8681d831f4dbccbca790d2952b56f977908e45be37335533e005286
- topic1collateralAsset0x0000000000000000000000001111111111111111111111111111111111111111
- topic2debtAsset0x0000000000000000000000002222222222222222222222222222222222222222
- topic3user0x0000000000000000000000003333333333333333333333333333333333333333
- data0x0000000000000000000000000000000000000000000000000000000000000fa0000000000000000000000000000000000000000000000000000000000000138800000000000000000000000066666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000001
- collateralAssetaddress · indexed0x1111111111111111111111111111111111111111
- debtAssetaddress · indexed0x2222222222222222222222222222222222222222
- useraddress · indexed0x3333333333333333333333333333333333333333
- debtToCoveruint2564000
- liquidatedCollateralAmountuint2565000
- liquidatoraddress0x6666666666666666666666666666666666666666
- receiveATokenbooltrue
Frequently asked questions
What is the topic0 of the LiquidationCall (Aave) event?
0xe413a321e8681d831f4dbccbca790d2952b56f977908e45be37335533e005286: the keccak-256 hash of LiquidationCall(address,address,address,uint256,uint256,address,bool).
Which LiquidationCall (Aave) arguments are indexed?
collateralAsset, debtAsset, user are indexed and sit in the log's topics; debtToCover, liquidatedCollateralAmount, liquidator, receiveAToken are in the data.
How do I get an alert when a contract emits LiquidationCall (Aave)?
Open one of the ready-made rules on this page, or add any contract and pick LiquidationCall (Aave) from the event list. Conditions can be set on indexed and non-indexed arguments, and each alert names the contract and links to the transaction.
More event signatures and tools
Know the moment a contract emits it
The Beta plan is free: one wallet and one contract, no credit card.