Slot pre-images to look for in the data segment, mapped to the resolver for
the slot they hash to.
Normally a proxy embeds its slot as a PUSH32 constant, and we match that value
directly via slotResolvers. Some proxies instead keep the pre-image
string in their data segment and hash it at runtime, so the slot value never
appears in the bytecode at all and there is nothing for that scan to match.
This happens when the source writes the slot as an expression rather than as a
hex literal, and the compiler does not fold it. Polygon's UpgradableProxy is
one such contract: it declares the slot as
keccak256("matic.network.proxy.implementation") and solc 0.6.6 inlines that
expression at each use site, so the string ships and the hash is computed on
every call.
Keys are the hex encoding of the ASCII pre-image, so that the data segment
scan in disasm can match them the same way it matches slot values.
Slot pre-images to look for in the data segment, mapped to the resolver for the slot they hash to.
Normally a proxy embeds its slot as a PUSH32 constant, and we match that value directly via slotResolvers. Some proxies instead keep the pre-image string in their data segment and hash it at runtime, so the slot value never appears in the bytecode at all and there is nothing for that scan to match.
This happens when the source writes the slot as an expression rather than as a hex literal, and the compiler does not fold it. Polygon's UpgradableProxy is one such contract: it declares the slot as
keccak256("matic.network.proxy.implementation")and solc 0.6.6 inlines that expression at each use site, so the string ships and the hash is computed on every call.Keys are the hex encoding of the ASCII pre-image, so that the data segment scan in disasm can match them the same way it matches slot values.