Resolve an ERC-1967 proxy implementation at the incident block

Debugging upgraded code against yesterday’s transaction can produce a plausible but incorrect diagnosis. Read the proxy’s implementation slot at the incident height.

Read storage on the proxy

Call eth_getStorageAt using the proxy address, the slot below and the historical block. An address in the slot sits in the rightmost 20 bytes of the returned 32-byte word.

0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc

For a word ending in 0000000000000000000000000000000000000042 with zero upper bytes, inspect code at the address ending in 42. Keep using the proxy address as the target when reproducing application reads through its fallback.

Investigate an empty slot

A zero word can indicate a beacon-based proxy. In that case inspect the ERC-1967 beacon slot and call implementation() on the beacon at the same height. Other proxy designs may use entirely different mechanisms. End-of-block storage can already include an upgrade made later in the same block. eips.ethereum.org EIP-1967