ETH Price: $1,880.68 (+0.77%)

Transaction Decoder

Block:
3944304 at Jun-28-2017 08:12:44 PM +UTC
Transaction Fee:
0.007529513051956593 ETH $14.16
Gas Used:
143,081 Gas / 52.624129353 Gwei

Emitted Events:

Account State Difference:

  Address   Before After State Difference Code
0x6D5C68E9...8432c209B
0 Eth
Nonce: 0
0 Eth
Nonce: 1
From: 0 To: 216830026789259368124221284573938974527733353278137255550595761658336620349041777049172130376588336250059991169287204646379692581519099175416828888022673182997493301924959101072602129044879688099661122481519347638377089009882539024110069730909039504300174042060401385307460142317571436395760478544478828678024827041407882420827998988156969888322872453069463697361826725240958385694847925305069902042845370593410638978508767101815122336029608686608235493230254816811452412303019434777566419788050778577504811750163704204991599368330881771641724516981254354765018883716461190303993355156012769814802454114814553604485823590063947059684232462646491528434793841860815535923530861548730875686960740584220308112601676820041232763321779485162690879135874787464421174063656802365081018434510553272179372555512905769
(F2Pool Old)
6,130.379216677734091091 Eth6,130.386746190786047684 Eth0.007529513051956593
0xEdcE8831...94d75B3a0
(Bittrex: Controller V1)
0xFBb1b73C...f520fBB98
(Bittrex)
97,715.959620806548351247 Eth
Nonce: 407761
97,715.952091293496394654 Eth
Nonce: 407762
0.007529513051956593

Execution Trace

Controller.CALL( )
  • 0x6d5c68e9183cf05b5891b1eeec06b178432c209b.60606040( )
    pragma solidity ^0.4.4;
    
    //copyright 2017 NewAlchemy
    //Written by Dennis Peterson
    
    contract AbstractSweeper {
        //abstract:
        function sweep(address token, uint amount) returns (bool);
    
        //concrete:
        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) {return 0;}
        function transfer(address a, uint val) returns (bool) {return false;}
    }
    
    contract DefaultSweeper is AbstractSweeper {
        function DefaultSweeper(address controller) 
                 AbstractSweeper(controller) {}
    
        function sweep(address _token, uint _amount)  
        canSweep
        returns (bool) {
            Token token = Token(_token);
            uint amount = _amount;
            if (amount > token.balanceOf(this)) {
                return false;
            }
    
            address destination = controller.destination();
    
    	// Because sweep is called with delegatecall, this typically
    	// comes from the UserWallet.
            bool success = token.transfer(destination, amount); 
            if (success) { 
                controller.logSweep(this, _token, _amount);
            } 
            return success;
        }
    }
    
    contract UserWallet {
        AbstractSweeperList c;
        function UserWallet(address _sweeperlist) {
            c = AbstractSweeperList(_sweeperlist);
        }
    
        function sweep(address _token, uint _amount) 
        returns (bool) {
            return c.sweeperOf(_token).delegatecall(msg.data);
        }
    }
    
    contract AbstractSweeperList {
        function sweeperOf(address _token) returns (address);
    }
    
    contract Controller is AbstractSweeperList {
        address public owner;
        address public authorizedCaller;
    
        //destination defaults to same as owner
        //but is separate to allow never exposing cold storage
        address public destination; 
    
        bool public halted;
    
        event LogNewWallet(address receiver);
        event LogSweep(address from, address 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);
        }
    
        //assuming halt because caller is compromised
        //so let caller stop for speed, only owner can restart
    
        function halt() onlyAdmins {
            halted = true;
        }
    
        function start() onlyOwner {
            halted = false;
        }
    
        //***********
        //SweeperList
        //***********
        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 token, uint amount) {
            LogSweep(from, token, amount);
        }
    }