Event signature · Lending

Supply (Aave V3) event signature and topic0

The topic0 of the Supply (Aave V3) event is 0x2b627736bca15cd5381dcf80b0bf11fd197d01a037c52b927a881a10fb73ba61, the keccak-256 hash of Supply(address,address,address,uint256,uint16); 3 of its 5 arguments are indexed. Assets supplied (deposited) to an Aave V3-style money market.

Anatomy of a Supply (Aave V3) log

Topics

  • topic00x2b627736bca15cd5381dcf80b0bf11fd197d01a037c52b927a881a10fb73ba61keccak256("Supply(address,address,address,uint256,uint16)")
  • topic1reserve (address)indexed: filterable
  • topic2onBehalfOf (address)indexed: filterable
  • topic3referralCode (uint16)indexed: filterable

Data

  • datauser (address), amount (uint256)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
useraddressdata
onBehalfOfaddresstopic2
amountuint256data
referralCodeuint16topic3

Solidity declaration

event Supply(address indexed reserve, address user, address indexed onBehalfOf, uint256 amount, uint16 indexed referralCode);

Canonical signature

Supply(address,address,address,uint256,uint16)

topic0

0x2b627736bca15cd5381dcf80b0bf11fd197d01a037c52b927a881a10fb73ba61

Ready-made alerts

Get an alert on Supply

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 Supply

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

Code

Read Supply 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 Supply(address indexed reserve, address user, address indexed onBehalfOf, uint256 amount, uint16 indexed referralCode)"),
  fromBlock: "latest",
})

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

const provider = new JsonRpcProvider(process.env.RPC_URL)
const iface = new Interface(["event Supply(address indexed reserve, address user, address indexed onBehalfOf, uint256 amount, uint16 indexed referralCode)"])

const logs = await provider.getLogs({
  address: "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2",
  topics: [iface.getEvent("Supply")!.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": [
        "0x2b627736bca15cd5381dcf80b0bf11fd197d01a037c52b927a881a10fb73ba61"
      ],
      "fromBlock": "latest"
    }
  ]
}
Solidity
event Supply(address indexed reserve, address user, address indexed onBehalfOf, uint256 amount, uint16 indexed referralCode);

// inside a function:
emit Supply(reserve, user, onBehalfOf, amount, referralCode);
Example

An example Supply 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("Supply(address,address,address,uint256,uint16)")0x2b627736bca15cd5381dcf80b0bf11fd197d01a037c52b927a881a10fb73ba61
  • topic1reserve0x0000000000000000000000001111111111111111111111111111111111111111
  • topic2onBehalfOf0x0000000000000000000000003333333333333333333333333333333333333333
  • topic3referralCode0x0000000000000000000000000000000000000000000000000000000000000005
  • data0x00000000000000000000000022222222222222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000fa0
Decoded with the ABI
  • reserveaddress · indexed0x1111111111111111111111111111111111111111
  • useraddress0x2222222222222222222222222222222222222222
  • onBehalfOfaddress · indexed0x3333333333333333333333333333333333333333
  • amountuint2564000
  • referralCodeuint16 · indexed5
FAQ

Frequently asked questions

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

0x2b627736bca15cd5381dcf80b0bf11fd197d01a037c52b927a881a10fb73ba61: the keccak-256 hash of Supply(address,address,address,uint256,uint16).

Which Supply (Aave V3) arguments are indexed?

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

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

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