Event signature · Lending

Repay (Aave V3) event signature and topic0

The topic0 of the Repay (Aave V3) event is 0xa534c8dbe71f871f9f3530e97a74601fea17b426cae02e1c5aee42c96c784051, the keccak-256 hash of Repay(address,address,address,uint256,bool); 3 of its 5 arguments are indexed. Debt repaid on an Aave V3-style money market.

Anatomy of a Repay (Aave V3) log

Topics

  • topic00xa534c8dbe71f871f9f3530e97a74601fea17b426cae02e1c5aee42c96c784051keccak256("Repay(address,address,address,uint256,bool)")
  • topic1reserve (address)indexed: filterable
  • topic2user (address)indexed: filterable
  • topic3repayer (address)indexed: filterable

Data

  • dataamount (uint256), useATokens (bool)ABI-encoded, decoded with the ABI
Parameters

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.

NameTypeIn the log
reserveaddresstopic1
useraddresstopic2
repayeraddresstopic3
amountuint256data
useATokensbooldata

Solidity declaration

event Repay(address indexed reserve, address indexed user, address indexed repayer, uint256 amount, bool useATokens);

Canonical signature

Repay(address,address,address,uint256,bool)

topic0

0xa534c8dbe71f871f9f3530e97a74601fea17b426cae02e1c5aee42c96c784051

Ready-made alerts

Get an alert on Repay

Each rule opens with the contract and the conditions filled in. Sign in, pick your chat and click Create.

Who emits it

Contracts we list that emit Repay

Any other contract with the same signature emits a log with the same topic0.

Code

Read Repay 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.

viem
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 Repay(address indexed reserve, address indexed user, address indexed repayer, uint256 amount, bool useATokens)"),
  fromBlock: "latest",
})

for (const log of logs) console.log(log.args) // { reserve, user, repayer, amount, useATokens }
ethers v6
import { Interface, JsonRpcProvider } from "ethers"

const provider = new JsonRpcProvider(process.env.RPC_URL)
const iface = new Interface(["event Repay(address indexed reserve, address indexed user, address indexed repayer, uint256 amount, bool useATokens)"])

const logs = await provider.getLogs({
  address: "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2",
  topics: [iface.getEvent("Repay")!.topicHash],
})

for (const log of logs) console.log(iface.parseLog(log)?.args)
JSON-RPC (eth_getLogs)
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "address": "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2",
      "topics": [
        "0xa534c8dbe71f871f9f3530e97a74601fea17b426cae02e1c5aee42c96c784051"
      ],
      "fromBlock": "latest"
    }
  ]
}
Solidity
event Repay(address indexed reserve, address indexed user, address indexed repayer, uint256 amount, bool useATokens);

// inside a function:
emit Repay(reserve, user, repayer, amount, useATokens);
Example

An example Repay 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.

Encoded (as the node returns it)
  • topic0keccak256("Repay(address,address,address,uint256,bool)")0xa534c8dbe71f871f9f3530e97a74601fea17b426cae02e1c5aee42c96c784051
  • topic1reserve0x0000000000000000000000001111111111111111111111111111111111111111
  • topic2user0x0000000000000000000000002222222222222222222222222222222222222222
  • topic3repayer0x0000000000000000000000003333333333333333333333333333333333333333
  • data0x0000000000000000000000000000000000000000000000000000000000000fa00000000000000000000000000000000000000000000000000000000000000001
Decoded with the ABI
  • reserveaddress · indexed0x1111111111111111111111111111111111111111
  • useraddress · indexed0x2222222222222222222222222222222222222222
  • repayeraddress · indexed0x3333333333333333333333333333333333333333
  • amountuint2564000
  • useATokensbooltrue
FAQ

Frequently asked questions

What is the topic0 of the Repay (Aave V3) event?

0xa534c8dbe71f871f9f3530e97a74601fea17b426cae02e1c5aee42c96c784051: the keccak-256 hash of Repay(address,address,address,uint256,bool).

Which Repay (Aave V3) arguments are indexed?

reserve, user, repayer are indexed and sit in the log's topics; amount, useATokens are in the data.

How do I get an alert when a contract emits Repay (Aave V3)?

Open one of the ready-made rules on this page, or add any contract and pick Repay (Aave 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.

Keep exploring

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.