Verified contractPartial
TokenCollector
Address0x250e4e30cd5836bd458f0b906d47426925182d44
- Balance
0 ETH
- Transactions
48
- Compiler
solc 0.4.12
- Same code
474 more contracts
Details
- Compiler
- solc 0.4.12+commit.194ff033
- Language
- solidity
- Optimization
- Yes, 0 runs
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 4,094,712
- Creation transaction
- 0x353db4a1a6…92310a05ed
TokenCollector.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
pragma solidity ^0.4.11;
contract Ownable {
address public owner;
function Ownable() {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) onlyOwner {
if (newOwner != address(0)) {
owner = newOwner;
}
}
}
contract ERC20Basic {
function balanceOf(address who) constant returns (uint256);
function transfer(address to, uint256 value) returns (bool);
}
contract TokenCollector is Ownable {
function TokenCollector(address _owner) {
require(_owner != address(0));
owner = _owner;
}
function () payable {
owner.transfer(this.balance);
}
function collectToken(address _token, address _to) onlyOwner {
require(_token != address(0));
ERC20Basic token = ERC20Basic(_token);
uint256 balance = token.balanceOf(this);
address to = _to;
if (to == address(0)) {
to = owner;
}
require(balance > 0);
token.transfer(to, balance);
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 0,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.