Owner-operated collection point for one token: sweep moves the whole balance to a destination the owner can change, and logs both actions with everything indexed.
Historical Significance
The care shown here is in what gets recorded rather than what gets moved. Emitting the previous destination alongside the new one, and refusing to log a sweep the token said had failed, are both small decisions that make the contract auditable after the fact by someone who was not watching at the time. Most collection contracts of this period logged neither.
Key Facts
Description
Three addresses in storage: an owner, a destination, and the token this contract exists to collect. sweep is owner-only, reads the contract's entire balance of the token, and transfers all of it to the destination. It returns the token's own boolean rather than reverting, and only emits LogSweep when that boolean is true, so a token that reports failure instead of throwing leaves no log and no false record.
setDestination is likewise owner-only and emits DestinationChanged with both the old and the new address indexed, which makes the history of where this contract has been pointing reconstructible from logs alone.
Every address field in both events is indexed. That costs gas on every sweep and buys the ability to filter by caller, by destination or by token without reading storage, which is the trade an operator running many of these makes deliberately.
Source Verified
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
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.15;
contract Token {
function balanceOf(address _owner) constant returns (uint256);
function transfer(address _to, uint256 _value) returns (bool);
}
contract Sweeper {
address public owner;
address public destination;
Token public token;
event DestinationChanged(address indexed previousDestination, address indexed newDestination);
event LogSweep(address indexed caller, address indexed destination, address indexed token, uint256 amount);
function setDestination(address _destination) returns (bool) {
require(msg.sender == owner);
address previous = destination;
destination = _destination;
DestinationChanged(previous, _destination);
return true;
}
function sweep() returns (bool) {
require(msg.sender == owner);
Token t = token;
uint256 balance = t.balanceOf(this);
bool ok = t.transfer(destination, balance);
if (ok) {
LogSweep(msg.sender, destination, token, balance);
}
return ok;
}
}External Links
Related contracts
Msg
Same eraMinimal contract that stores a single public string in state, exposed via the auto-generated m() getter. First of 281 identical siblings. Source verified by EthereumHistory.
0x2c8f58...37b173January 13, 2018Wallet
Same eraToken collection wallet that moves an entire token balance to a chosen address, without the ERC223 callback handler.
0x002204...531195January 19, 2018Wallet
Same eraOwner wallet that forwards ether to its owner, logs any call from a stranger with the full calldata, and lets the owner execute arbitrary calls.
0x001feb...9e7a4fJanuary 20, 2018Forwarder
Same eraNinety-three bytes with one hardcoded destination: every payment received is transferred straight back out to the same address.
0x458353...a562deJanuary 20, 2018Sweeper
Same eraMinimal ETH sweeper, first of 1,900 identical deployments in a 2-day burst in January 2018. All sweep to a single hardcoded destination. Source verified by EthereumHistory.
0xeb15f6...6cb3e1January 23, 2018Sweep
Same eraETH sweep-to-fixed-recipient — fallback forwards the contract's entire balance to `0xd293a88c…8d4` via `.send()` and reverts on failure. Massive cluster of 1899 identical deployments — likely deposit-address contracts for a single custodian.
0x00188b...b260a7January 23, 2018