contract ProdexpToken is StandardToken {
    using SafeMath for uint;
    
    string public name;
    string public symbol;
    uint public decimals;
    
    uint public unlockedTime;
    address public lockedAddress;
    address public icoAddress;

    //  The contract can be initialized with a number of tokens
    //  All the tokens are deposited to the owner address
    //
    // @param _balance Initial supply of the contract
    // @param _name Token Name
    // @param _symbol Token symbol
    // @param _decimals Token decimals
    constructor() {
        _totalSupply = 1000000000000000000000000000;
        name = "Prodexp Token";
        symbol = "PROD";
        decimals = 18;
        
        //Locked information
        lockedAddress = 0x26e7336705C074ac1Bc87C6637eAeFf63ABd14F4;
        icoAddress = 0x4E384604D8a9bDb44D3A25aC8717c81f421d5Cc5;
        unlockedTime = block.timestamp.add(1095 days);
        
        balances[icoAddress] = 200000000000000000000000000;
        emit Transfer(address(0), icoAddress, 200000000000000000000000000);
        
        balances[lockedAddress] = 800000000000000000000000000;
        emit Transfer(address(0), lockedAddress, 800000000000000000000000000);
    }

    // Forward ERC20 methods to upgraded contract if this one is deprecated
    function transfer(address _to, uint _value) public override {
        require(_validFromLockedAddress(msg.sender),"Locked address can not transfer now");
        return super.transfer(_to, _value);
    }

    // Forward ERC20 methods to upgraded contract if this one is deprecated
    function transferFrom(address _from, address _to, uint _value) public override {
        require(_validFromLockedAddress(_from),"Locked address can not transfer now");
        return super.transferFrom(_from, _to, _value);
    }

    // deprecate current contract if favour of a new one
    function totalSupply() public override view returns (uint) {
        return _totalSupply;
    }
    
    //Check sender is locked address or not, if yes, check for unlocked time
    function _validFromLockedAddress(address sender) private view returns(bool){
        if(sender != lockedAddress)
            return true;
            
        if(unlockedTime < block.timestamp)
            return true;
            
        return false;
    }
}
function totalSupply() public override view returns (uint) {
    return _totalSupply;
}

// deprecate current contract if favour of a new one