Owner-only forwarder that calls a stored address and function selector, passing on the ether sent.
Historical Significance
Packing an address and a selector into one storage slot saved a storage write per deployment at a time when that mattered. The unguarded ownership setter is the more interesting detail, since the fallback is carefully restricted to the owner while the function that decides who the owner is was left open to anyone.
Key Facts
Description
A forwarder holding an owner in the first storage slot and, packed together in the second, a target address and a four byte function selector. Sending ether to it causes it to call that selector on that target with the ether attached, and to throw if either the caller is not the owner or the call fails. transferOwner(address) rewrites the owner and carries no access check of its own, so any account can claim ownership. The bytecode carries no metadata trailer, so this is an exact match rather than a partial one.
Source Verified
Byzantium Era
First Metropolis hard fork. Added zk-SNARK precompiles, REVERT opcode, and staticcall.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
pragma solidity ^0.4.0;
contract Proxy {
address owner;
address target;
bytes4 method;
function () payable {
if (msg.sender != owner) throw;
if (!target.call.value(msg.value)(method)) throw;
}
function transferOwner(address _owner) {
owner = _owner;
}
}