Verified contractPartial
Sweeper
Address0xd5dcc86a490b45b79e6dfd9322e52b16733ca540
- Balance
0 ETH
- Transactions
7
- Compiler
solc 0.4.21
- Same code
887 more contracts
Details
- Compiler
- solc 0.4.21+commit.dfe3193c
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 9,145,903
- Creation transaction
- 0xbd99abc23b…2ded01dc7c
- Main copy (most transactions)
- 0xa4a904f7…82a2b01c
Sweeper.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
pragma solidity ^0.4.13;
contract ERC20 {
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
}
contract Sweeper {
address public destinationAddress;
event TokenSweep(address token, uint256 amount);
event Sweep(uint256 amount);
function Sweeper(address _destinationAddress) public {
destinationAddress = _destinationAddress;
}
function () public payable {
destinationAddress.transfer(msg.value);
Sweep(msg.value);
}
function tokenFallback(address _from, uint256 _value, bytes _data) public {
ERC20 token = ERC20(msg.sender);
if (token.transfer(destinationAddress, _value)) {
TokenSweep(msg.sender, _value);
} else {
revert();
}
}
function sweepTokens(address _token) public {
ERC20 token = ERC20(_token);
uint256 balance = token.balanceOf(this);
token.transfer(destinationAddress, balance);
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.