Back to Home

Sweeper

Unclassified
0xf9b6962fb914...cde4203464ca
ByzantiumSource VerifiedEdit this contract
Deployed April 16, 2018 (8 years ago)Block 5,452,989

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.

Byzantium EraVerified Source

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
Deployment Block
5,452,989
Deployment Date
Apr 16, 2018, 09:03 PM
Code Size
1.7 KB
Gas at Deploy
585,325
Transactions by Year
20186

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

Solidityeh_crack_source_verified
Compiler: v0.4.18
Heuristic Analysis

The following characteristics were detected through bytecode analysis and may not be accurate.

Detected Type: Unclassified

Bytecode Overview

Opcodes1,716
Unique Opcodes140
Jump Instructions46
Storage Operations19

External Links

Related contracts