Deposit wallet with an ERC-223 receive hook, routing token sweeps through a shared sweeper registry by delegatecall.
Historical Significance
Adding tokenFallback is a small change with a real consequence: without it, an ERC-223 token transfer to this address reverts, and a customer's deposit simply fails. It is a record of the brief period when ERC-223 looked like it might displace ERC-20, and of the cost that fell on anyone operating deposit addresses at scale, who had to redeploy their whole fleet to accept a standard that never took hold.
Token Information
Key Facts
Description
The sweeper list address is fixed at construction and is the only thing in storage. The payable fallback is empty, so the address behaves like a plain account for incoming ether.
tokenFallback exists for ERC-223 tokens, which refuse to transfer into a contract that does not implement it. The body does nothing except read its three parameters, a deliberate no-op written that way to silence the unused-parameter warning while keeping the function present in the ABI.
sweep asks the registry which sweeper handles the named token, then delegatecalls it with the calldata it received, so the sweeping logic executes against this wallet's balances. The amount parameter is likewise read and discarded here, because the sweeper reads it out of the forwarded calldata instead.
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 UserWallet {
AbstractSweeperList sweeperList;
function UserWallet(address _sweeperlist) {
sweeperList = AbstractSweeperList(_sweeperlist);
}
function () public payable { }
function tokenFallback(address _from, uint _value, bytes _data) {
(_from);
(_value);
(_data);
}
function sweep(address _token, uint _amount)
returns (bool) {
(_amount);
return sweeperList.sweeperOf(_token).delegatecall(msg.data);
}
}
contract AbstractSweeperList {
function sweeperOf(address _token) returns (address);
}