Transaction Hash:
Block:
4159711 at Aug-15-2017 05:37:11 AM +UTC
Transaction Fee:
0.000740412 ETH
$2.31
Gas Used:
185,103 Gas / 4 Gwei
Emitted Events:
| 13 |
Controller.LogNewWallet( receiver=[Receiver] 0xc9fb9216e964833cf90d2f8f4c5db4ed3df9cdd8 )
|
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
| 0x6CaCE052...a27c4E21f |
39.018572962 Eth
Nonce: 17068
|
39.01783255 Eth
Nonce: 17069
| 0.000740412 | ||
| 0xa3C1E324...F099B5770 | (Bittrex: Controller) | ||||
|
0xb2930B35...e543a0347
Miner
| (MiningPoolHub: Old Address) | 19,973.614464723885259174 Eth | 19,973.615205135885259174 Eth | 0.000740412 | |
| 0xC9fB9216...D3df9cdd8 |
0 Eth
Nonce: 0
|
0 Eth
Nonce: 1
|
Execution Trace
Controller.CALL( )
-
0xc9fb9216e964833cf90d2f8f4c5db4ed3df9cdd8.60606040( )
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);
}
}