Back to Home

Sweeper

Unclassified
0x59714275a62c...1205f902773b
ByzantiumSource VerifiedEdit this contract
Deployed September 20, 2018 (7 years ago)Block 6,363,594

Token sweeper with an owner, a second authorised caller, a halt switch and a separate flag controlling whether it accepts ether at all.

Byzantium EraVerified Source

Historical Significance

The split between an owner and a single authorised caller is the interesting design choice. Routine collection runs under a hot key that can be rotated without touching ownership, while the owner key stays cold and is only needed to change configuration. The halt flag gives an operator one switch that stops collection everywhere without revoking the hot key or redeploying.

Key Facts
Deployment Block
6,363,594
Deployment Date
Sep 20, 2018, 12:52 AM
Code Size
4.4 KB
Gas at Deploy
1,303,373
Transactions by Year
20181

Description

Four storage values drive everything: an owner, an authorised caller, a halted flag and an accept-ether flag, with the two booleans packed into the same slot as the authorised caller. The payable fallback rejects payments outright unless the accept-ether flag is set.

sweep and sweepFrom move a fixed amount of a token to the caller, using transfer and transferFrom respectively, and both return false rather than reverting when the balance is short. sweepAll moves the whole balance. sendEther forwards ether and is gated on the accept-ether flag. Every sweep path requires the caller to be the owner or the authorised caller, requires a non-zero token address, and requires that the halted flag is clear. The owner alone can flip either flag, rotate the authorised caller, or transfer ownership, and both address setters refuse the zero address.

Source Verified

Solidityeh_crack_source_verified
Compiler: v0.4.24
Heuristic Analysis

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

Detected Type: Unclassified

Bytecode Overview

Opcodes4,499
Unique Opcodes177
Jump Instructions162
Storage Operations38

External Links

Related contracts