Sixty-nine bytes of hand-written assembly that resolve an implementation from a fixed settings contract and delegatecall it.
Historical Significance
This is the same upgrade system as the larger settings proxies, rewritten by hand for the case where the proxy is deployed thousands of times and every byte of deployment cost is multiplied. Resolving the implementation through a registry on every call, rather than storing it, is what lets the operator move an entire fleet at once.
Key Facts
Description
The routine writes the four-byte selector for lib() into the first word of memory, staticcalls a hardcoded settings contract with it, and reads the answer back out of the same word. That address is then delegatecalled with the incoming calldata copied to memory zero, and the returndata is copied back and returned.
Everything reuses one scratch word, and both the staticcall and the delegatecall branch to the same two-instruction failure handler. There is no dispatcher, no storage, and no constructor state: the settings address is baked into the code, so every deployment of these bytes points at the same registry.
No Solidity compiler produces this shape, so the source published here is Yul with the deployed bytes reproduced verbatim.
Source Verified
Byzantium Era
First Metropolis hard fork. Added zk-SNARK precompiles, REVERT opcode, and staticcall.
Bytecode Overview
Verified Source Available
This contract has verified source code.
View Verification ProofShow source code (Yul)
// Submitted by EthereumHistory (ethereumhistory.com)
//
// 69 byte hand written proxy. It asks a fixed settings contract at
// 0x4e6489aC49B4f1F1204657c4845AA008f1E7bc88 for the current implementation by
// staticcalling lib(), selector 0x92801230, straight into scratch memory, then
// delegatecalls that address with the incoming calldata and returns whatever
// comes back.
//
// Both the staticcall and the delegatecall share a single failure branch at
// offset 0x42, which is a JUMPDEST holding "dup1 revert". The lib() result is
// read back from the same four byte scratch slot the selector was written to,
// so the whole routine uses no memory beyond the first word.
//
// No Solidity compiler emits this shape, so the deployed bytes are reproduced
// exactly with Yul verbatim.
object "Proxy" {
code {
datacopy(0, dataoffset("Proxy_deployed"), datasize("Proxy_deployed"))
return(0, datasize("Proxy_deployed"))
}
object "Proxy_deployed" {
code {
verbatim_0i_0o(hex"6000639280123081526020816004601c734e6489ac49b4f1f1204657c4845aa008f1e7bc885afa15604257808036818051828280375af4156042573d908181803ef35b80fd")
}
}
}