Verified contractPartial
Sweeper
Address0xbe9f937072bc109f970da909e523e2501afebdae
- Balance
0 ETH
- Transactions
2
- Compiler
solc 0.4.14
- Same code
168 more contracts
Details
- Compiler
- solc 0.4.14+commit.c2215d46
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: no, runtime code: yes
- Verified on Sourcify
- Created in block
- 9,153,722
- Creation transaction
- 0x6531a217d3…aa6dbae3e6
- Main copy (most transactions)
- 0xf4ab44ad…97ed2904
Sweeper.sol
// Submitted by EthereumHistory (ethereumhistory.com)
pragma solidity ^0.4.13;
contract Controller {
function _mainAddress() public returns (address);
function _disabled() public returns (bool);
}
contract ERC20 {
function balanceOf(address _owner) public returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
}
contract Sweeper {
Controller controller;
event LogSweep(address to, uint256 amount);
modifier onlyMain() {
require(msg.sender == controller._mainAddress());
_;
}
modifier notDisabled() {
if (controller._disabled()) {
revert();
}
_;
}
function () public payable {
}
function sweepEth() public onlyMain notDisabled returns (bool success) {
address dest = controller._mainAddress();
uint256 bal = this.balance;
success = dest.send(bal);
LogSweep(dest, bal);
}
function sweepTokens(address _token) public onlyMain notDisabled returns (bool success) {
address dest = controller._mainAddress();
ERC20 token = ERC20(_token);
uint256 bal = token.balanceOf(this);
success = token.transfer(dest, bal);
LogSweep(dest, bal);
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.