Deposit wallet whose only function delegates the sweep to a per-token sweeper chosen by a controller.
Historical Significance
Stripped to the one operation an exchange deposit address actually needs. Everything that would normally be local state lives on the controller, so the deployed bytecode holds no configuration at all beyond the controller reference. That is what makes a wallet like this cheap enough to deploy once per customer.
Key Facts
Description
The smallest member of its family. A single storage slot holds the controller. sweep asks that controller for the sweeper registered against the given token and delegatecalls it with the original calldata, returning the result.
There is no fallback, no token callback handler and no owner. Any call that does not match the one selector reverts. Compiled by an early 0.4 series release, it predates the require builtin and uses the invalid opcode for its failure path.
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)
contract Controller {
function sweeperOf(address _token) returns (address);
}
contract UserWallet {
Controller controller;
function sweep(address _token, uint _amount) returns (bool) {
return controller.sweeperOf(_token).delegatecall(msg.data);
}
}