AbsorbDebt (Compound V3) event signature and topic0
The topic0 of the AbsorbDebt (Compound V3) event is 0x1547a878dc89ad3c367b6338b4be6a65a5dd74fb77ae044da1e8747ef1f4f62f, the keccak-256 hash of AbsorbDebt(address,address,uint256,uint256); 2 of its 4 arguments are indexed. Underwater account's debt absorbed (liquidated) on a Compound V3 market.
Topics
- topic00x1547a878dc89ad3c367b6338b4be6a65a5dd74fb77ae044da1e8747ef1f4f62fkeccak256("AbsorbDebt(address,address,uint256,uint256)")
- topic1absorber (address)indexed: filterable
- topic2borrower (address)indexed: filterable
Data
- databasePaidOut (uint256), usdValue (uint256)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 |
|---|---|---|
| absorber | address | topic1 |
| borrower | address | topic2 |
| basePaidOut | uint256 | data |
| usdValue | uint256 | data |
Solidity declaration
event AbsorbDebt(address indexed absorber, address indexed borrower, uint256 basePaidOut, uint256 usdValue);
Canonical signature
AbsorbDebt(address,address,uint256,uint256)
topic0
0x1547a878dc89ad3c367b6338b4be6a65a5dd74fb77ae044da1e8747ef1f4f62f
Get an alert on AbsorbDebt
Each rule opens with the contract and the conditions filled in. Sign in, pick your chat and click Create.
Contracts we list that emit AbsorbDebt
Any other contract with the same signature emits a log with the same topic0.
Read AbsorbDebt logs in code
The same filter in viem, ethers and plain JSON-RPC, and the Solidity that emits it. The address is Compound V3 USDC (cUSDCv3), 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: "0xc3d688b66703497daa19211eedff47f25384cdc3",
event: parseAbiItem("event AbsorbDebt(address indexed absorber, address indexed borrower, uint256 basePaidOut, uint256 usdValue)"),
fromBlock: "latest",
})
for (const log of logs) console.log(log.args) // { absorber, borrower, basePaidOut, usdValue }import { Interface, JsonRpcProvider } from "ethers"
const provider = new JsonRpcProvider(process.env.RPC_URL)
const iface = new Interface(["event AbsorbDebt(address indexed absorber, address indexed borrower, uint256 basePaidOut, uint256 usdValue)"])
const logs = await provider.getLogs({
address: "0xc3d688b66703497daa19211eedff47f25384cdc3",
topics: [iface.getEvent("AbsorbDebt")!.topicHash],
})
for (const log of logs) console.log(iface.parseLog(log)?.args){
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getLogs",
"params": [
{
"address": "0xc3d688b66703497daa19211eedff47f25384cdc3",
"topics": [
"0x1547a878dc89ad3c367b6338b4be6a65a5dd74fb77ae044da1e8747ef1f4f62f"
],
"fromBlock": "latest"
}
]
}event AbsorbDebt(address indexed absorber, address indexed borrower, uint256 basePaidOut, uint256 usdValue);
// inside a function:
emit AbsorbDebt(absorber, borrower, basePaidOut, usdValue);An example AbsorbDebt 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("AbsorbDebt(address,address,uint256,uint256)")0x1547a878dc89ad3c367b6338b4be6a65a5dd74fb77ae044da1e8747ef1f4f62f
- topic1absorber0x0000000000000000000000001111111111111111111111111111111111111111
- topic2borrower0x0000000000000000000000002222222222222222222222222222222222222222
- data0x0000000000000000000000000000000000000000000000000000000000000bb80000000000000000000000000000000000000000000000000000000000000fa0
- absorberaddress · indexed0x1111111111111111111111111111111111111111
- borroweraddress · indexed0x2222222222222222222222222222222222222222
- basePaidOutuint2563000
- usdValueuint2564000
Frequently asked questions
What is the topic0 of the AbsorbDebt (Compound V3) event?
0x1547a878dc89ad3c367b6338b4be6a65a5dd74fb77ae044da1e8747ef1f4f62f: the keccak-256 hash of AbsorbDebt(address,address,uint256,uint256).
Which AbsorbDebt (Compound V3) arguments are indexed?
absorber, borrower are indexed and sit in the log's topics; basePaidOut, usdValue are in the data.
How do I get an alert when a contract emits AbsorbDebt (Compound V3)?
Open one of the ready-made rules on this page, or add any contract and pick AbsorbDebt (Compound V3) 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.