ETH Price: $1,951.85 (+1.27%)

Transaction Decoder

Block:
11195967 at Nov-05-2020 08:02:02 AM +UTC
Transaction Fee:
0.000924027 ETH $1.80
Gas Used:
31,863 Gas / 29 Gwei

Account State Difference:

  Address   Before After State Difference Code
(zhizhu.top)
1,481.324374899564660052 Eth1,481.325298926564660052 Eth0.000924027
0x8672e46b...7D56DE72d 0.001687521 Eth0.004187521 Eth0.0025
0xaaA52a5D...a6541F5f9
20.253878078267281309 Eth
Nonce: 146335
20.250454051267281309 Eth
Nonce: 146336
0.003424027

Execution Trace

ETH 0.0025 Multiplexer.sendEth( _to=[0x8672e46b46B77b34322569c3a96b4367D56DE72d], _value=[2500000000000000] ) => ( _success=True )
  • ETH 0.0025 0x8672e46b46b77b34322569c3a96b4367d56de72d.CALL( )
    contract Ownable {
        address public owner;
    
        function Ownable() public {
            owner = msg.sender;
        }
    
        modifier onlyOwner() {
            require(msg.sender == owner);
            _;
        }
    }
    
    
    contract Feeable is Ownable {
    
        uint8 public feePercent;
    
        function Feeable() public {
            feePercent = 0;
        }
    
        function setFeePercent(uint8 _feePercent) public onlyOwner {
            feePercent = _feePercent;
        }
    
        function minFee() public view returns(uint256) {
            return tx.gasprice * msg.gas * feePercent / 100;
        }
    }
    
    
    contract ERC20 {
        function balanceOf(address who) public view returns (uint256);
        function transfer(address to, uint256 value) public returns (bool);
        function transferFrom( address from, address to, uint value) returns (bool ok);
    }
    
    
    contract Multiplexer is Feeable {
    
    	function sendEth(address[] _to, uint256[] _value) payable returns (bool _success) {
    		// input validation
    		assert(_to.length == _value.length);
    		assert(_to.length <= 255);
            uint256 fee = minFee();
            require(msg.value > fee);
    
            uint256 remain_value = msg.value - fee;
    
    		// loop through to addresses and send value
    		for (uint8 i = 0; i < _to.length; i++) {
                require(remain_value >= _value[i]);
                remain_value = remain_value - _value[i];
    
    			_to[i].transfer(_value[i]);
    		}
    
    		return true;
    	}
    
    	function sendErc20(address _tokenAddress, address[] _to, uint256[] _value) payable returns (bool _success) {
    		// input validation
    		assert(_to.length == _value.length);
    		assert(_to.length <= 255);
            require(msg.value >= minFee());
    
    		// use the erc20 abi
    		ERC20 token = ERC20(_tokenAddress);
    		// loop through to addresses and send value
    		for (uint8 i = 0; i < _to.length; i++) {
    			assert(token.transferFrom(msg.sender, _to[i], _value[i]) == true);
    		}
    		return true;
    	}
    
        function claim(address _token) public onlyOwner {
            if (_token == 0x0) {
                owner.transfer(this.balance);
                return;
            }
            ERC20 erc20token = ERC20(_token);
            uint256 balance = erc20token.balanceOf(this);
            erc20token.transfer(owner, balance);
        }
    }