Upgradeable proxy that logs bare ether transfers as deposits and delegates everything else to a target supplied by a settings contract.
Historical Significance
Resolving the implementation on each call rather than caching it means an upgrade takes effect everywhere at once with no per proxy transaction. The cost is a call into settings on every single invocation, paid forever, which is the trade later proxy standards avoided by storing the implementation locally and updating it explicitly.
Key Facts
Description
The fallback branches on whether there is any calldata. An empty call is treated as a deposit and emits Deposit with the sender and the value. Any other call reads target from the settings contract in the first storage slot and delegatecalls it with the original calldata, reverting if it fails.
initialize takes an address and does nothing, which is the signature a deployer would call through the proxy so that the implementation could pick it up. The settings reference is readable, but the target itself is not stored here at all and is fetched fresh on every call.
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 (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
pragma solidity ^0.4.18;
contract Settings {
function target() public returns (address);
}
contract Proxy {
Settings public settings;
event Deposit(address from, uint256 value);
function () public payable {
if (msg.data.length == 0) {
Deposit(msg.sender, msg.value);
} else {
require(settings.target().delegatecall(msg.data));
}
}
function initialize(address _owner) public {
}
}