Source Code
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 4150238 | 3115 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
DefaultSweeper
Compiler Version
v0.4.11+commit.68ef5810
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2017-08-15
*/
pragma solidity ^0.4.10;
// Copyright 2017 Bittrex
contract AbstractSweeper {
function sweep(address token, uint amount) returns (bool);
function () { throw; }
Controller controller;
function AbstractSweeper(address _controller) {
controller = Controller(_controller);
}
modifier canSweep() {
if (msg.sender != controller.authorizedCaller() && msg.sender != controller.owner()) throw;
if (controller.halted()) throw;
_;
}
}
contract Token {
function balanceOf(address a) returns (uint) {
(a);
return 0;
}
function transfer(address a, uint val) returns (bool) {
(a);
(val);
return false;
}
}
contract DefaultSweeper is AbstractSweeper {
function DefaultSweeper(address controller)
AbstractSweeper(controller) {}
function sweep(address _token, uint _amount)
canSweep
returns (bool) {
bool success = false;
address destination = controller.destination();
if (_token != address(0)) {
Token token = Token(_token);
uint amount = _amount;
if (amount > token.balanceOf(this)) {
return false;
}
success = token.transfer(destination, amount);
}
else {
uint amountInWei = _amount;
if (amountInWei > this.balance) {
return false;
}
success = destination.send(amountInWei);
}
if (success) {
controller.logSweep(this, destination, _token, _amount);
}
return success;
}
}
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);
}
contract Controller is AbstractSweeperList {
address public owner;
address public authorizedCaller;
address public destination;
bool public halted;
event LogNewWallet(address receiver);
event LogSweep(address indexed from, address indexed to, address indexed token, uint amount);
modifier onlyOwner() {
if (msg.sender != owner) throw;
_;
}
modifier onlyAuthorizedCaller() {
if (msg.sender != authorizedCaller) throw;
_;
}
modifier onlyAdmins() {
if (msg.sender != authorizedCaller && msg.sender != owner) throw;
_;
}
function Controller()
{
owner = msg.sender;
destination = msg.sender;
authorizedCaller = msg.sender;
}
function changeAuthorizedCaller(address _newCaller) onlyOwner {
authorizedCaller = _newCaller;
}
function changeDestination(address _dest) onlyOwner {
destination = _dest;
}
function changeOwner(address _owner) onlyOwner {
owner = _owner;
}
function makeWallet() onlyAdmins returns (address wallet) {
wallet = address(new UserWallet(this));
LogNewWallet(wallet);
}
function halt() onlyAdmins {
halted = true;
}
function start() onlyOwner {
halted = false;
}
address public defaultSweeper = address(new DefaultSweeper(this));
mapping (address => address) sweepers;
function addSweeper(address _token, address _sweeper) onlyOwner {
sweepers[_token] = _sweeper;
}
function sweeperOf(address _token) returns (address) {
address sweeper = sweepers[_token];
if (sweeper == 0) sweeper = defaultSweeper;
return sweeper;
}
function logSweep(address from, address to, address token, uint amount) {
LogSweep(from, to, token, amount);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"sweep","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"inputs":[{"name":"controller","type":"address"}],"payable":false,"type":"constructor"},{"payable":false,"type":"fallback"}]Contract Creation Code
6060604052341561000c57fe5b60405160208061050c83398101604052515b805b60008054600160a060020a031916600160a060020a0383161790555b505b505b6104bd8061004f6000396000f300606060405236156100255763ffffffff60e060020a6000350416636ea056a9811461003b575b341561002d57fe5b6100395b60006000fd5b565b005b341561004357fe5b61005a600160a060020a036004351660243561006e565b604080519115158252519081900360200190f35b600060006000600060006000600060009054906101000a9004600160a060020a0316600160a060020a03166397dc97cb6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b15156100d557fe5b6102c65a03f115156100e357fe5b50506040515133600160a060020a039081169116148015915061018a5750600060009054906101000a9004600160a060020a0316600160a060020a0316638da5cb5b6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b151561015c57fe5b6102c65a03f1151561016a57fe5b50505060405180519050600160a060020a031633600160a060020a031614155b156101955760006000fd5b600060009054906101000a9004600160a060020a0316600160a060020a031663b9b8af0b6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b15156101f057fe5b6102c65a03f115156101fe57fe5b5050604051511590506102115760006000fd5b6000805460408051602090810184905281517fb269681d0000000000000000000000000000000000000000000000000000000081529151939850600160a060020a039092169263b269681d9260048084019391929182900301818b87803b151561027757fe5b6102c65a03f1151561028557fe5b505060405151945050600160a060020a038816156103ae5787925086915082600160a060020a03166370a08231306000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b151561030357fe5b6102c65a03f1151561031157fe5b50506040515183111590506103295760009550610485565b82600160a060020a031663a9059cbb85846000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b151561039157fe5b6102c65a03f1151561039f57fe5b50506040515195506103f29050565b5085600160a060020a033016318111156103cb5760009550610485565b604051600160a060020a0385169082156108fc029083906000818181858888f19850505050505b84156104815760008054604080517f28090abb000000000000000000000000000000000000000000000000000000008152600160a060020a03308116600483015288811660248301528c81166044830152606482018c9052915191909216926328090abb926084808201939182900301818387803b151561046f57fe5b6102c65a03f1151561047d57fe5b5050505b8495505b5b5050505050929150505600a165627a7a72305820a2a232798773dfcd0ce7dda6123307b254fb29a3beac8cd03a61a9fc1aea73620029000000000000000000000000a3c1e324ca1ce40db73ed6026c4a177f099b5770
Deployed Bytecode
0x606060405236156100255763ffffffff60e060020a6000350416636ea056a9811461003b575b341561002d57fe5b6100395b60006000fd5b565b005b341561004357fe5b61005a600160a060020a036004351660243561006e565b604080519115158252519081900360200190f35b600060006000600060006000600060009054906101000a9004600160a060020a0316600160a060020a03166397dc97cb6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b15156100d557fe5b6102c65a03f115156100e357fe5b50506040515133600160a060020a039081169116148015915061018a5750600060009054906101000a9004600160a060020a0316600160a060020a0316638da5cb5b6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b151561015c57fe5b6102c65a03f1151561016a57fe5b50505060405180519050600160a060020a031633600160a060020a031614155b156101955760006000fd5b600060009054906101000a9004600160a060020a0316600160a060020a031663b9b8af0b6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b15156101f057fe5b6102c65a03f115156101fe57fe5b5050604051511590506102115760006000fd5b6000805460408051602090810184905281517fb269681d0000000000000000000000000000000000000000000000000000000081529151939850600160a060020a039092169263b269681d9260048084019391929182900301818b87803b151561027757fe5b6102c65a03f1151561028557fe5b505060405151945050600160a060020a038816156103ae5787925086915082600160a060020a03166370a08231306000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b151561030357fe5b6102c65a03f1151561031157fe5b50506040515183111590506103295760009550610485565b82600160a060020a031663a9059cbb85846000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b151561039157fe5b6102c65a03f1151561039f57fe5b50506040515195506103f29050565b5085600160a060020a033016318111156103cb5760009550610485565b604051600160a060020a0385169082156108fc029083906000818181858888f19850505050505b84156104815760008054604080517f28090abb000000000000000000000000000000000000000000000000000000008152600160a060020a03308116600483015288811660248301528c81166044830152606482018c9052915191909216926328090abb926084808201939182900301818387803b151561046f57fe5b6102c65a03f1151561047d57fe5b5050505b8495505b5b5050505050929150505600a165627a7a72305820a2a232798773dfcd0ce7dda6123307b254fb29a3beac8cd03a61a9fc1aea73620029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a3C1E324CA1ce40db73eD6026c4A177F099B5770
-----Decoded View---------------
Arg [0] : controller (address): 0xa3C1E324CA1ce40db73eD6026c4A177F099B5770
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a3C1E324CA1ce40db73eD6026c4A177F099B5770
Swarm Source
bzzr://a2a232798773dfcd0ce7dda6123307b254fb29a3beac8cd03a61a9fc1aea7362
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.