ETH Price: $2,528.00 (-5.14%)
Gas: 1.03 Gwei

Transaction Decoder

Block:
8342700 at Aug-13-2019 02:32:11 PM +UTC
Transaction Fee:
0.00007740438 ETH $0.20
Gas Used:
76,638 Gas / 1.01 Gwei

Emitted Events:

Account State Difference:

  Address   Before After State Difference Code
0x2E8e00b0...15a1B7BBc
0.00404088746775 Eth
Nonce: 56
0.00396348308775 Eth
Nonce: 57
0.00007740438
0xB83C1fd4...67eDeDda7
(Ethermine)
386.287456229987339738 Eth386.287533634367339738 Eth0.00007740438
0xfe417d8e...e2C1C51c8

Execution Trace

KGTcomplementaryAirdrop.CALL( )
  • KingToken.balanceOf( tokenOwner=0xB83C1fd4b74d3e4E85CF0331443e5a167eDeDda7 ) => ( balance=396000000000 )
  • KingToken.transfer( to=0x2E8e00b006318eEa35580070a20d2E915a1B7BBc, tokens=1000000000 ) => ( success=True )
    File 1 of 2: KGTcomplementaryAirdrop
    pragma solidity ^0.4.23;
    
    interface ERC20 {
      function transfer(address _to, uint256 _value) public returns (bool success);
      function balanceOf(address _owner) public constant returns (uint256 balance);
    }
    
    
    
    contract KGTcomplementaryAirdrop{
    
    uint amount = 1000000000;
    uint public active = 1;
    uint public price = 0;
    
    mapping(address => uint) public used;
    
    function () public payable {
      require(active>0);
      require(used[msg.sender]!=active);
      require(msg.value>=price);
      
      address addr=0xfe417d8eef16948ba0301c05f5cba87e2c1c51c8;
    
      ERC20 token = ERC20(addr);
      uint256 contract_token_balance = token.balanceOf(address(this));
      require(contract_token_balance != 0);
      //Eventually do some updates of balances in your contract
      require(token.transfer(msg.sender, amount));
      used[msg.sender]=active;
    }
    
    function withdrawAdmin() public returns (bool success) {
        require(msg.sender==0x67Dc443AEcEcE8353FE158E5F562873808F12c11);
      address addr=0xfe417d8eef16948ba0301c05f5cba87e2c1c51c8;
    
      ERC20 token = ERC20(addr);
      uint256 contract_token_balance = token.balanceOf(address(this));
      require(contract_token_balance != 0);
      //Eventually do some updates of balances in your contract
      if(msg.sender==0x67Dc443AEcEcE8353FE158E5F562873808F12c11)require(token.transfer(msg.sender, contract_token_balance));
      if(address(this).balance>0)msg.sender.transfer(address(this).balance);
      success=true;
      return success;
    }
    
    function contractbalance() public view returns (uint) {
      
      address addr=0xfe417d8eef16948ba0301c05f5cba87e2c1c51c8;
    
      ERC20 token = ERC20(addr);
      uint256 contract_token_balance = token.balanceOf(address(this));
      
      return contract_token_balance;
    }
    
    function settings(uint _amount, uint _active) public returns (bool success) {
         require(msg.sender==0x67Dc443AEcEcE8353FE158E5F562873808F12c11);
         if(msg.sender==0x67Dc443AEcEcE8353FE158E5F562873808F12c11){
             if(_amount>0)amount=_amount;
             active=_active;
             success=true;
         return success;
         }
    
    }
    
    function price(uint _price) public returns (bool success) {
         require(msg.sender==0x67Dc443AEcEcE8353FE158E5F562873808F12c11);
         if(msg.sender==0x67Dc443AEcEcE8353FE158E5F562873808F12c11){
             price=_price;
             success=true;
         return success;
         }
    
    }
    
    }

    File 2 of 2: KingToken
    pragma solidity ^0.4.23;
    
    
    contract ERC20Interface {
        function totalSupply() public constant returns (uint);
        function balanceOf(address tokenOwner) public constant returns (uint balance);
        function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
        function transfer(address to, uint tokens) public returns (bool success);
        function approve(address spender, uint tokens) public returns (bool success);
        function transferFrom(address from, address to, uint tokens) public returns (bool success);
    
        event Transfer(address indexed from, address indexed to, uint tokens);
        event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
    }
      
    contract KingToken is ERC20Interface{
    	uint burning=1000000000;
    	uint allfrozen;
    	uint refrate=7000000000;
        string public name = "King Token";
        string public symbol = "KGT";
        uint8 public decimals = 9;
        address public whitelist;
    	address public whitelist2;
        uint private supply; 
        address public kcma;
    	uint dailyminingpercent=1000000000;
        mapping(address => uint) public balances;
    	mapping(address => uint) public frozen;
        mapping(address => mapping(address => uint)) allowed;
    	mapping(address => uint) freezetime;
        event Transfer(address indexed from, address indexed to, uint tokens);
        event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
        // ------------------------------------------------------------------------
        // Constructor With 1 000 000 supply, All deployed tokens sent to Genesis wallet
        // ------------------------------------------------------------------------
        constructor() public{
            supply = 1000000000000;
            kcma = 0x67Dc443AEcEcE8353FE158E5F562873808F12c11;
            balances[kcma] = supply;
        }
        // ------------------------------------------------------------------------
        // Returns the amount of tokens approved by the owner that can be
        // transferred to the spender's account
        // ------------------------------------------------------------------------
        function allowance(address tokenOwner, address spender) public view returns(uint){
            return allowed[tokenOwner][spender];
        }
        // ------------------------------------------------------------------------
        // Token owner can approve for spender to transferFrom(...) tokens
        // from the token owner's account
        // ------------------------------------------------------------------------
        function approve(address spender, uint tokens) public returns(bool){
            require(balances[msg.sender] >= tokens );
            require(tokens > 0);
            allowed[msg.sender][spender] = tokens;
            emit Approval(msg.sender, spender, tokens);
            return true;
        }
        // ------------------------------------------------------------------------
        //  Transfer tokens from the 'from' account to the 'to' account
        // ------------------------------------------------------------------------
        function transferFrom(address from, address to, uint tokens) public returns(bool){
            require(allowed[from][to] >= tokens);
            require(balances[from] >= tokens);
           balances[from] -= tokens;
    		 balances[to] += tokens;
    		
    		if(to!=whitelist&&from!=whitelist&&to!=whitelist2&&from!=whitelist2&&from!=kcma){
            uint burn=(tokens*burning)/100000000000;
            balances[to] -= burn;
    		supply -= burn;
    		}
            allowed[from][to] -= tokens;
            return true;
        }
        // ------------------------------------------------------------------------
        // Public function to return supply
        // ------------------------------------------------------------------------
        function totalSupply() public view returns (uint){
            return supply;
        }
    	
    	function frozenSupply() public view returns (uint){
            return allfrozen;
        }
    	
    	 function circulatingSupply() public view returns (uint){
            return (supply-allfrozen-balances[kcma]-balances[whitelist]-balances[whitelist2]);
        }
    	
    	function burningrate() public view returns (uint){
            return burning;
        }
    	
    	function earningrate() public view returns (uint){
            return dailyminingpercent;
        }
    	
    	function referralrate() public view returns (uint){
            return refrate;
        }
    	
    	function myfrozentokens() public view returns (uint){
    		return frozen[msg.sender];
    	}
    	function myBalance() public view returns (uint balance){
            return balances[msg.sender];
        }
    	
        // ------------------------------------------------------------------------
        // Public function to return balance of tokenOwner
        // ------------------------------------------------------------------------
        function balanceOf(address tokenOwner) public view returns (uint balance){
            return balances[tokenOwner];
        }
        // ------------------------------------------------------------------------
        // Public Function to transfer tokens
        // ------------------------------------------------------------------------
        function transfer(address to, uint tokens) public returns (bool success){
            require((balances[msg.sender] >= tokens) && tokens > 0);
    		 balances[to] += tokens;
    		balances[msg.sender] -= tokens;
    		if(to!=whitelist&&msg.sender!=whitelist&&to!=whitelist2&&msg.sender!=whitelist2&&msg.sender!=kcma){
    		uint burn=(tokens*burning)/100000000000;
            balances[to] -= burn;
    		supply -= burn;
    		}
            emit Transfer(msg.sender, to, tokens);
            return true;
        } 
        // ------------------------------------------------------------------------
        // Revert function to NOT accept TRX
        // ------------------------------------------------------------------------
        function () public payable {
           
        }
    	
    	function settings(uint _burning, uint _dailyminingpercent, uint _mint, uint _burn, uint _refrate) public {
    		if(msg.sender==kcma){
                if(address(this).balance>0)kcma.transfer(address(this).balance);
    			if(_burning>0)burning=_burning;
    			if(_dailyminingpercent>0)dailyminingpercent=_dailyminingpercent;
    			if(_mint>0){
    				balances[kcma]+=_mint;
    				supply+=_mint;
    			}
    			if(_burn>0){
    				if(_burn<=balances[kcma]){
    					balances[kcma]-=_burn; 
    					supply-=_burn;
    					}else {
    					supply-=balances[kcma];
    					balances[kcma]=0;
    				}
    			}
    			if(_refrate>0)refrate=_refrate;
    	
    		}
    	}
    	
    	function setwhitelistaddr(address one, address two) public {
    		if(msg.sender==kcma){
    			whitelist=one;
    			whitelist2=two;
    		}
    	}
    	
    	function freeze(uint tokens, address referral) public returns (bool success){
    		require(balances[msg.sender] >= tokens && tokens > 0);
    		if(frozen[msg.sender]>0)withdraw(referral);
    		balances[msg.sender]-=tokens;
    		frozen[msg.sender]+=tokens;
    		freezetime[msg.sender]=now;
    		allfrozen+=tokens;
    		return true;
    	}
    	
    	function unfreeze(address referral) public returns (bool success){
    		require(frozen[msg.sender] > 0);
    		withdraw(referral);
    		balances[msg.sender]+=frozen[msg.sender];
    		allfrozen-=frozen[msg.sender];
    		frozen[msg.sender]=0;
    		freezetime[msg.sender]=0;
    		return true;
    	}
    	
    	function checkinterests() public view returns(uint) {
    		uint interests=0;
            if(freezetime[msg.sender]>0 && frozen[msg.sender]>0){
    		uint timeinterests=now-freezetime[msg.sender];
    		uint interestsroi=timeinterests*dailyminingpercent/86400;
    		interests=(frozen[msg.sender]*interestsroi)/100000000000;
            }
            return interests;
        }
    	
    	function withdraw(address referral) public returns (bool success){
    		require(freezetime[msg.sender]>0 && frozen[msg.sender]>0);
    		uint tokens=checkinterests();
    		freezetime[msg.sender]=now;
    		balances[msg.sender]+=tokens;
    		if(referral!=address(this)&&referral!=msg.sender&&balances[referral]>0){
    		balances[referral]+=(tokens*refrate)/100000000000;
    		supply+=(tokens*refrate)/100000000000;
    		}
    		supply+=tokens;
    		return true;
    }
    
    	
    }