Upgraded (proxy) event signature and topic0
The topic0 of the Upgraded (proxy) event is 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b, the keccak-256 hash of Upgraded(address); 1 of its 1 arguments is indexed. Proxy pointed at a new implementation (EIP-1967).
Topics
- topic00xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3bkeccak256("Upgraded(address)")
- topic1implementation (address)indexed: filterable
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 |
|---|---|---|
| implementation | address | topic1 |
Solidity declaration
event Upgraded(address indexed implementation);
Canonical signature
Upgraded(address)
topic0
0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b
Get an alert on Upgraded
Each rule opens with the contract and the conditions filled in. Sign in, pick your chat and click Create.
Contracts we list that emit Upgraded
Any other contract with the same signature emits a log with the same topic0.
Read Upgraded 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 Upgraded(address indexed implementation)"),
fromBlock: "latest",
})
for (const log of logs) console.log(log.args) // { implementation }import { Interface, JsonRpcProvider } from "ethers"
const provider = new JsonRpcProvider(process.env.RPC_URL)
const iface = new Interface(["event Upgraded(address indexed implementation)"])
const logs = await provider.getLogs({
address: "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2",
topics: [iface.getEvent("Upgraded")!.topicHash],
})
for (const log of logs) console.log(iface.parseLog(log)?.args){
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getLogs",
"params": [
{
"address": "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2",
"topics": [
"0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b"
],
"fromBlock": "latest"
}
]
}event Upgraded(address indexed implementation);
// inside a function:
emit Upgraded(implementation);An example Upgraded 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("Upgraded(address)")0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b
- topic1implementation0x0000000000000000000000001111111111111111111111111111111111111111
- data0x
- implementationaddress · indexed0x1111111111111111111111111111111111111111
Frequently asked questions
What is the topic0 of the Upgraded (proxy) event?
0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b: the keccak-256 hash of Upgraded(address).
Which Upgraded (proxy) arguments are indexed?
implementation is indexed and sit in the log's topics.
How do I get an alert when a contract emits Upgraded (proxy)?
Open one of the ready-made rules on this page, or add any contract and pick Upgraded (proxy) 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.