Back to Home

Sweeper

0xd20832294a04...cce53f0e46f5
Source VerifiedEdit this contract
Deployed September 12, 2017 (9 years ago)Block 4,265,998

Sweeper that reads its destination and its kill switch from a shared controller, then empties either ether or a token balance to that destination.

Verified Source

Historical Significance

Everything configurable lives on the controller and nothing lives here, so a deployed sweeper needs no storage writes over its whole life. That matters when the same contract is deployed many times: each deployment costs only its code, and the operator retains the ability to redirect or freeze all of them from one place.

Key Facts
Deployment Block
4,265,998
Deployment Date
Sep 12, 2017, 12:53 PM
Code Size
2.1 KB
Transactions by Year
20174
20222

Description

Two modifiers guard both entry points. The first requires the caller to be whatever address the controller returns from _mainAddress. The second reads _disabled from the same controller and reverts when it is set, which gives an operator one flag that stops every deployed sweeper at once.

sweepEth asks the controller for the destination again, sends the contract's whole ether balance with send, and logs the destination and amount. sweepTokens does the same for an ERC20, reading the contract's token balance and transferring all of it. Both return the success flag rather than reverting on a failed transfer, so a sweep that cannot complete reports back instead of throwing.

Source Verified

Solidityeh_crack_source_verified
Compiler: v0.4.14

Bytecode Overview

Opcodes2,114
Unique Opcodes133
Jump Instructions60
Storage Operations9

External Links