ETH Price: $2,072.40 (+1.74%)

Transaction Decoder

Block:
11201724 at Nov-06-2020 04:54:33 AM +UTC
Transaction Fee:
0.00136664 ETH $2.83
Gas Used:
68,332 Gas / 20 Gwei

Emitted Events:

153 0xa4463f9ff0d87531232c8c4819b536c332da6eac.0x4791c50923dfb6217d0f4e45cd4e2dbc03b2e6f2b4e47b04abb512c4bc361a4b( 0x4791c50923dfb6217d0f4e45cd4e2dbc03b2e6f2b4e47b04abb512c4bc361a4b, 0x000000000000000000000000e4d6b3ccda6567e5aa511a6bb48b422287d22d16, 0x00000000000000000000000000000000000000000000000010a5c32ed277eb68, 0x00000000000000000000000000000000000000000000000bbc1ce5734a25cb38, 0000000000000000000000000000000000000000000000150894e849b3900000, 000000000000000000000000000000000000000000000000000000000000000e )

Account State Difference:

  Address   Before After State Difference Code
0xa4463f9F...332DA6EAc 248.832755234948606834 Eth247.633175753317515274 Eth1.19957948163109156
(UUPool)
760.471736245882829143 Eth760.473102885882829143 Eth0.00136664
0xE4d6b3CC...287D22d16
14.761940238152439982 Eth
Nonce: 11
15.960153079783531542 Eth
Nonce: 12
1.19821284163109156

Execution Trace

0xa4463f9ff0d87531232c8c4819b536c332da6eac.CALL( )
  • EtherollToken.CALL( )
  • EtherollToken.balanceOf( 0xE4d6b3CCDA6567e5AA511A6bb48B422287D22d16 ) => ( 216469146072611408696 )
  • EtherollToken.CALL( )
  • EtherollToken.balanceOf( 0xE4d6b3CCDA6567e5AA511A6bb48B422287D22d16 ) => ( 216469146072611408696 )
  • ETH 1.19957948163109156 0xe4d6b3ccda6567e5aa511a6bb48b422287d22d16.CALL( )
  • EtherollToken.balanceOf( 0xE4d6b3CCDA6567e5AA511A6bb48B422287D22d16 ) => ( 216469146072611408696 )
    pragma solidity ^0.4.2;
    
    /* 
    `* is owned
    */
    contract owned {
    
        address public owner;
    
        function owned() {
            owner = msg.sender;
        }
    
        modifier onlyOwner {
            if (msg.sender != owner) throw;
            _;
        }
    
        function ownerTransferOwnership(address newOwner)
            onlyOwner
        {
            owner = newOwner;
        }
    
    }
    
    /* 
    * safe math
    */
    contract DSSafeAddSub {
    
        function safeToAdd(uint a, uint b) internal returns (bool) {
            return (a + b >= a);
        }
        
        function safeAdd(uint a, uint b) internal returns (uint) {
            if (!safeToAdd(a, b)) throw;
            return a + b;
        }
    
        function safeToSubtract(uint a, uint b) internal returns (bool) {
            return (b <= a);
        }
    
        function safeSub(uint a, uint b) internal returns (uint) {
            if (!safeToSubtract(a, b)) throw;
            return a - b;
        } 
    
    }
    
    
    /**
     *
     * @title  EtherollToken
     * 
     * The official token powering etheroll.
     * EtherollToken is a ERC.20 standard token with some custom functionality
     *
     */ 
    
    
    contract EtherollToken is owned, DSSafeAddSub {
    
        /* check address */
        modifier onlyBy(address _account) {
            if (msg.sender != _account) throw;
            _;
        }    
    
        /* vars */
        string public standard = 'Token 1.0';
        string public name = "DICE";
        string public symbol = "ROL";
        uint8 public decimals = 16;
        uint public totalSupply = 250000000000000000000000; 
    
        address public priviledgedAddress;  
        bool public tokensFrozen;
        uint public crowdfundDeadline = now + 2 * 1 weeks;       
        uint public nextFreeze = now + 12 * 1 weeks;
        uint public nextThaw = now + 13 * 1 weeks;
       
    
        /* map balances */
        mapping (address => uint) public balanceOf;
        mapping (address => mapping (address => uint)) public allowance;  
    
        /* events */
        event Transfer(address indexed _from, address indexed _to, uint256 _value);
        event Approval(address indexed _owner, address indexed _spender, uint256 _value);
        event LogTokensFrozen(bool indexed Frozen);    
    
        /*
        *  @notice sends all tokens to msg.sender on init    
        */  
        function EtherollToken(){
            /* send creator all initial tokens 25,000,000 */
            balanceOf[msg.sender] = 250000000000000000000000;
            /* tokens are not frozen */  
            tokensFrozen = false;                                      
    
        }  
    
        /*
        *  @notice public function    
        *  @param _to address to send tokens to   
        *  @param _value number of tokens to transfer 
        *  @returns boolean success         
        */     
        function transfer(address _to, uint _value) public
            returns (bool success)    
        {
            if(tokensFrozen && msg.sender != priviledgedAddress) return false;  /* transfer only by priviledgedAddress during crowdfund or reward phases */
            if (balanceOf[msg.sender] < _value) return false;                   /* check if the sender has enough */
            if (balanceOf[_to] + _value < balanceOf[_to]) return false;         /* check for overflows */              
            balanceOf[msg.sender] -=  _value;                                   /* subtract from the sender */
            balanceOf[_to] += _value;                                           /* add the same to the recipient */
            Transfer(msg.sender, _to, _value);                                  /* notify anyone listening that this transfer took place */
            return true;
        }      
    
        /*
        *  @notice public function    
        *  @param _from address to send tokens from 
        *  @param _to address to send tokens to   
        *  @param _value number of tokens to transfer     
        *  @returns boolean success      
        *  another contract attempts to spend tokens on your behalf
        */       
        function transferFrom(address _from, address _to, uint _value) public
            returns (bool success) 
        {                
            if(tokensFrozen && msg.sender != priviledgedAddress) return false;  /* transfer only by priviledgedAddress during crowdfund or reward phases */
            if (balanceOf[_from] < _value) return false;                        /* check if the sender has enough */
            if (balanceOf[_to] + _value < balanceOf[_to]) return false;         /* check for overflows */                
            if (_value > allowance[_from][msg.sender]) return false;            /* check allowance */
            balanceOf[_from] -= _value;                                         /* subtract from the sender */
            balanceOf[_to] += _value;                                           /* add the same to the recipient */
            allowance[_from][msg.sender] -= _value;                             /* reduce allowance */
            Transfer(_from, _to, _value);                                       /* notify anyone listening that this transfer took place */
            return true;
        }        
     
        /*
        *  @notice public function    
        *  @param _spender address being granted approval to spend on behalf of msg.sender
        *  @param _value number of tokens granted approval for _spender to spend on behalf of msg.sender    
        *  @returns boolean success      
        *  approves another contract to spend some tokens on your behalf
        */      
        function approve(address _spender, uint _value) public
            returns (bool success)
        {
            /* set allowance for _spender on behalf of msg.sender */
            allowance[msg.sender][_spender] = _value;
    
            /* log event about transaction */
            Approval(msg.sender, _spender, _value);        
            return true;
        } 
      
        /*
        *  @notice address restricted function 
        *  crowdfund contract calls this to burn its unsold coins 
        */     
        function priviledgedAddressBurnUnsoldCoins() public
            /* only crowdfund contract can call this */
            onlyBy(priviledgedAddress)
        {
            /* totalSupply should equal total tokens in circulation */
            totalSupply = safeSub(totalSupply, balanceOf[priviledgedAddress]); 
            /* burns unsold tokens from crowdfund address */
            balanceOf[priviledgedAddress] = 0;
        }
    
        /*
        *  @notice public function 
        *  locks/unlocks tokens on a recurring cycle
        */         
        function updateTokenStatus() public
        {
            
            /* locks tokens during initial crowdfund period */
            if(now < crowdfundDeadline){                       
                tokensFrozen = true;         
                LogTokensFrozen(tokensFrozen);  
            }  
    
            /* locks tokens */
            if(now >= nextFreeze){          
                tokensFrozen = true;
                LogTokensFrozen(tokensFrozen);  
            }
    
            /* unlocks tokens */
            if(now >= nextThaw){         
                tokensFrozen = false;
                nextFreeze = now + 12 * 1 weeks;
                nextThaw = now + 13 * 1 weeks;              
                LogTokensFrozen(tokensFrozen);  
            }        
          
        }                              
    
        /*
        *  @notice owner restricted function
        *  @param _newPriviledgedAddress the address
        *  only this address can burn unsold tokens
        *  transfer tokens only by priviledgedAddress during crowdfund or reward phases
        */      
        function ownerSetPriviledgedAddress(address _newPriviledgedAddress) public 
            onlyOwner
        {
            priviledgedAddress = _newPriviledgedAddress;
        }   
                        
        
    }