Contract 0xb4d40b3dba88e53cdbd9361717f5d86899ede1b3

Contract Overview

Balance:
0 Ether

Latest 25 internal transaction, Click here to view more Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0x0ab333deb9c99c42695b1a8d27314868f01e4ba3fa2b62490bb898ad0683f0ab105568424 days 8 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x0251da70340353b06a5fd6613d1452ec53fba99899ef88269b038f57f0f8dc5e105568404 days 8 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x1a2f32ac10c80d1e0551b5db3a9e489d53bb6942b2289e2f7d7263020900a320105567404 days 9 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0xbd5ea5f8665fe0e5286ebbcaf999f3ce1dbc74b5f5fbaee1a8f34f98559446f5105567354 days 9 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x80992a3575ecb281a18f4dc817c27c9f37b7c40d8adadc1824827a3f28dfbdd2105548824 days 15 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x1721af6700b887ffe6797bf14944d7e2e6e333c2202dca85bbfa720447785b29105548814 days 15 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x2551a4cf7e127f811d68ae761fa5762c8129fbc7db474b25d0e1c67755aa1bd3105548044 days 15 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x4fce00ae5e3c786c6a160faa73f4ca206d8c6578a8ae581b0c0cfcf195f5b487105547344 days 15 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x596ea243fc5bed27ca947636f63f15202ab1c2de3e939093c6e9a05485662e57105529044 days 22 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0xa122ca2af772880d344b3703c44ce495e60410168669c7c58bd481c932670eab105529034 days 22 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x29e656c6c57a836e4d8040c80a50696ec12a5b216720f95c76e85b5d06e9b88a105528054 days 22 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x3f220bfd9c0139adb0b04d148f61f2163f933f9556f068491f09763ce8495eb3105523804 days 23 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x3ddc6539dc17a2f5337029b687f2f98640a07bc4c0a837a5ceaff77d83193903105507265 days 5 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0xcc54dd596c7a5a1353408b3c41122a0d0e582d1fdef648792560605ea11483c4105507245 days 5 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x14d8763dac3055b791db96dfe35a277dc2b56510cc21f10af53bcd1f23a03247105506405 days 5 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0xbcd76ab8447c28c5bc4c7eab6d5143c451192b4fa45797dc9c75bb3e218de6c3105504365 days 6 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x5ddaa0bc95692562402e4c27a997647a2ac2c6e5aea938b65e28d3bf5a4b3cf4105487345 days 12 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0xa74dc81db63ef8c89bacbe761a694aa85ac096ddf15faa978f9bdc10e74fd8e4105487335 days 12 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0xbe81ccafbecf218bf4cde8bff4712f97ff225c91666cf55cf609bdbb1c65c1bd105486525 days 12 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0xcfe1734a2bbdcefc877c39b47642678ad392f446ce0a2b2437859aa15692dae6105485715 days 12 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x4c5b0b13795dc3715bcbc12151af84beb07c2bc2be6c69bc2d68ba85b804e6b8105467465 days 18 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0xef3da08b5d004decec233ebf157cffadf485d7392f5f56f4c9a4caa0e4f96713105467445 days 18 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x333ea984e918d4e68ac53b33071ac0b94bf24d548a4f035f68f5940f5993d055105466395 days 19 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0x2640f21bde0c08f2809c206dbebc0752b6f6b15ef9c997add30db644906a90ee105464745 days 19 hrs ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
0xa3affa68ca7132c3017a39f3c63f4fa7e8dd6245b54df2aea3872bcb17c778c8105447666 days 1 hr ago0x2b3a76ed4edb76e8fcd261fd978e78efb313d5a20xb4d40b3dba88e53cdbd9361717f5d86899ede1b30 Ether
[ Download CSV Export 
Contract Source Code Verified (Exact Match)
Contract Name: TokenFRT
Compiler Version: v0.5.2+commit.1df8f40c
Optimization Enabled: Yes
Runs (Optimizer):  200


Contract Source Code
pragma solidity ^0.5.2;

// File: @gnosis.pm/util-contracts/contracts/Proxy.sol

/// @title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.
/// @author Alan Lu - <[email protected]>
contract Proxied {
    address public masterCopy;
}

/// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <[email protected]>
contract Proxy is Proxied {
    /// @dev Constructor function sets address of master copy contract.
    /// @param _masterCopy Master copy address.
    constructor(address _masterCopy) public {
        require(_masterCopy != address(0), "The master copy is required");
        masterCopy = _masterCopy;
    }

    /// @dev Fallback function forwards all transactions and returns all received return data.
    function() external payable {
        address _masterCopy = masterCopy;
        assembly {
            calldatacopy(0, 0, calldatasize)
            let success := delegatecall(not(0), _masterCopy, 0, calldatasize, 0, 0)
            returndatacopy(0, 0, returndatasize)
            switch success
                case 0 {
                    revert(0, returndatasize)
                }
                default {
                    return(0, returndatasize)
                }
        }
    }
}

// File: @gnosis.pm/util-contracts/contracts/Token.sol

/// Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
pragma solidity ^0.5.2;

/// @title Abstract token contract - Functions to be implemented by token contracts
contract Token {
    /*
     *  Events
     */
    event Transfer(address indexed from, address indexed to, uint value);
    event Approval(address indexed owner, address indexed spender, uint value);

    /*
     *  Public functions
     */
    function transfer(address to, uint value) public returns (bool);
    function transferFrom(address from, address to, uint value) public returns (bool);
    function approve(address spender, uint value) public returns (bool);
    function balanceOf(address owner) public view returns (uint);
    function allowance(address owner, address spender) public view returns (uint);
    function totalSupply() public view returns (uint);
}

// File: @gnosis.pm/util-contracts/contracts/Math.sol

/// @title Math library - Allows calculation of logarithmic and exponential functions
/// @author Alan Lu - <[email protected]>
/// @author Stefan George - <[email protected]>
library GnosisMath {
    /*
     *  Constants
     */
    // This is equal to 1 in our calculations
    uint public constant ONE = 0x10000000000000000;
    uint public constant LN2 = 0xb17217f7d1cf79ac;
    uint public constant LOG2_E = 0x171547652b82fe177;

    /*
     *  Public functions
     */
    /// @dev Returns natural exponential function value of given x
    /// @param x x
    /// @return e**x
    function exp(int x) public pure returns (uint) {
        // revert if x is > MAX_POWER, where
        // MAX_POWER = int(mp.floor(mp.log(mpf(2**256 - 1) / ONE) * ONE))
        require(x <= 2454971259878909886679);
        // return 0 if exp(x) is tiny, using
        // MIN_POWER = int(mp.floor(mp.log(mpf(1) / ONE) * ONE))
        if (x < -818323753292969962227) return 0;
        // Transform so that e^x -> 2^x
        x = x * int(ONE) / int(LN2);
        // 2^x = 2^whole(x) * 2^frac(x)
        //       ^^^^^^^^^^ is a bit shift
        // so Taylor expand on z = frac(x)
        int shift;
        uint z;
        if (x >= 0) {
            shift = x / int(ONE);
            z = uint(x % int(ONE));
        } else {
            shift = x / int(ONE) - 1;
            z = ONE - uint(-x % int(ONE));
        }
        // 2^x = 1 + (ln 2) x + (ln 2)^2/2! x^2 + ...
        //
        // Can generate the z coefficients using mpmath and the following lines
        // >>> from mpmath import mp
        // >>> mp.dps = 100
        // >>> ONE =  0x10000000000000000
        // >>> print('\n'.join(hex(int(mp.log(2)**i / mp.factorial(i) * ONE)) for i in range(1, 7)))
        // 0xb17217f7d1cf79ab
        // 0x3d7f7bff058b1d50
        // 0xe35846b82505fc5
        // 0x276556df749cee5
        // 0x5761ff9e299cc4
        // 0xa184897c363c3
        uint zpow = z;
        uint result = ONE;
        result += 0xb17217f7d1cf79ab * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0x3d7f7bff058b1d50 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0xe35846b82505fc5 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0x276556df749cee5 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0x5761ff9e299cc4 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0xa184897c363c3 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0xffe5fe2c4586 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0x162c0223a5c8 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0x1b5253d395e * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0x1e4cf5158b * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0x1e8cac735 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0x1c3bd650 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0x1816193 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0x131496 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0xe1b7 * zpow / ONE;
        zpow = zpow * z / ONE;
        result += 0x9c7 * zpow / ONE;
        if (shift >= 0) {
            if (result >> (256 - shift) > 0) return (2 ** 256 - 1);
            return result << shift;
        } else return result >> (-shift);
    }

    /// @dev Returns natural logarithm value of given x
    /// @param x x
    /// @return ln(x)
    function ln(uint x) public pure returns (int) {
        require(x > 0);
        // binary search for floor(log2(x))
        int ilog2 = floorLog2(x);
        int z;
        if (ilog2 < 0) z = int(x << uint(-ilog2));
        else z = int(x >> uint(ilog2));
        // z = x * 2^-⌊log₂x⌋
        // so 1 <= z < 2
        // and ln z = ln x - ⌊log₂x⌋/log₂e
        // so just compute ln z using artanh series
        // and calculate ln x from that
        int term = (z - int(ONE)) * int(ONE) / (z + int(ONE));
        int halflnz = term;
        int termpow = term * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 3;
        termpow = termpow * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 5;
        termpow = termpow * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 7;
        termpow = termpow * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 9;
        termpow = termpow * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 11;
        termpow = termpow * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 13;
        termpow = termpow * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 15;
        termpow = termpow * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 17;
        termpow = termpow * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 19;
        termpow = termpow * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 21;
        termpow = termpow * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 23;
        termpow = termpow * term / int(ONE) * term / int(ONE);
        halflnz += termpow / 25;
        return (ilog2 * int(ONE)) * int(ONE) / int(LOG2_E) + 2 * halflnz;
    }

    /// @dev Returns base 2 logarithm value of given x
    /// @param x x
    /// @return logarithmic value
    function floorLog2(uint x) public pure returns (int lo) {
        lo = -64;
        int hi = 193;
        // I use a shift here instead of / 2 because it floors instead of rounding towards 0
        int mid = (hi + lo) >> 1;
        while ((lo + 1) < hi) {
            if (mid < 0 && x << uint(-mid) < ONE || mid >= 0 && x >> uint(mid) < ONE) hi = mid;
            else lo = mid;
            mid = (hi + lo) >> 1;
        }
    }

    /// @dev Returns maximum of an array
    /// @param nums Numbers to look through
    /// @return Maximum number
    function max(int[] memory nums) public pure returns (int maxNum) {
        require(nums.length > 0);
        maxNum = -2 ** 255;
        for (uint i = 0; i < nums.length; i++) if (nums[i] > maxNum) maxNum = nums[i];
    }

    /// @dev Returns whether an add operation causes an overflow
    /// @param a First addend
    /// @param b Second addend
    /// @return Did no overflow occur?
    function safeToAdd(uint a, uint b) internal pure returns (bool) {
        return a + b >= a;
    }

    /// @dev Returns whether a subtraction operation causes an underflow
    /// @param a Minuend
    /// @param b Subtrahend
    /// @return Did no underflow occur?
    function safeToSub(uint a, uint b) internal pure returns (bool) {
        return a >= b;
    }

    /// @dev Returns whether a multiply operation causes an overflow
    /// @param a First factor
    /// @param b Second factor
    /// @return Did no overflow occur?
    function safeToMul(uint a, uint b) internal pure returns (bool) {
        return b == 0 || a * b / b == a;
    }

    /// @dev Returns sum if no overflow occurred
    /// @param a First addend
    /// @param b Second addend
    /// @return Sum
    function add(uint a, uint b) internal pure returns (uint) {
        require(safeToAdd(a, b));
        return a + b;
    }

    /// @dev Returns difference if no overflow occurred
    /// @param a Minuend
    /// @param b Subtrahend
    /// @return Difference
    function sub(uint a, uint b) internal pure returns (uint) {
        require(safeToSub(a, b));
        return a - b;
    }

    /// @dev Returns product if no overflow occurred
    /// @param a First factor
    /// @param b Second factor
    /// @return Product
    function mul(uint a, uint b) internal pure returns (uint) {
        require(safeToMul(a, b));
        return a * b;
    }

    /// @dev Returns whether an add operation causes an overflow
    /// @param a First addend
    /// @param b Second addend
    /// @return Did no overflow occur?
    function safeToAdd(int a, int b) internal pure returns (bool) {
        return (b >= 0 && a + b >= a) || (b < 0 && a + b < a);
    }

    /// @dev Returns whether a subtraction operation causes an underflow
    /// @param a Minuend
    /// @param b Subtrahend
    /// @return Did no underflow occur?
    function safeToSub(int a, int b) internal pure returns (bool) {
        return (b >= 0 && a - b <= a) || (b < 0 && a - b > a);
    }

    /// @dev Returns whether a multiply operation causes an overflow
    /// @param a First factor
    /// @param b Second factor
    /// @return Did no overflow occur?
    function safeToMul(int a, int b) internal pure returns (bool) {
        return (b == 0) || (a * b / b == a);
    }

    /// @dev Returns sum if no overflow occurred
    /// @param a First addend
    /// @param b Second addend
    /// @return Sum
    function add(int a, int b) internal pure returns (int) {
        require(safeToAdd(a, b));
        return a + b;
    }

    /// @dev Returns difference if no overflow occurred
    /// @param a Minuend
    /// @param b Subtrahend
    /// @return Difference
    function sub(int a, int b) internal pure returns (int) {
        require(safeToSub(a, b));
        return a - b;
    }

    /// @dev Returns product if no overflow occurred
    /// @param a First factor
    /// @param b Second factor
    /// @return Product
    function mul(int a, int b) internal pure returns (int) {
        require(safeToMul(a, b));
        return a * b;
    }
}

// File: @gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol

/**
 * Deprecated: Use Open Zeppeling one instead
 */
contract StandardTokenData {
    /*
     *  Storage
     */
    mapping(address => uint) balances;
    mapping(address => mapping(address => uint)) allowances;
    uint totalTokens;
}

/**
 * Deprecated: Use Open Zeppeling one instead
 */
/// @title Standard token contract with overflow protection
contract GnosisStandardToken is Token, StandardTokenData {
    using GnosisMath for *;

    /*
     *  Public functions
     */
    /// @dev Transfers sender's tokens to a given address. Returns success
    /// @param to Address of token receiver
    /// @param value Number of tokens to transfer
    /// @return Was transfer successful?
    function transfer(address to, uint value) public returns (bool) {
        if (!balances[msg.sender].safeToSub(value) || !balances[to].safeToAdd(value)) {
            return false;
        }

        balances[msg.sender] -= value;
        balances[to] += value;
        emit Transfer(msg.sender, to, value);
        return true;
    }

    /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success
    /// @param from Address from where tokens are withdrawn
    /// @param to Address to where tokens are sent
    /// @param value Number of tokens to transfer
    /// @return Was transfer successful?
    function transferFrom(address from, address to, uint value) public returns (bool) {
        if (!balances[from].safeToSub(value) || !allowances[from][msg.sender].safeToSub(
            value
        ) || !balances[to].safeToAdd(value)) {
            return false;
        }
        balances[from] -= value;
        allowances[from][msg.sender] -= value;
        balances[to] += value;
        emit Transfer(from, to, value);
        return true;
    }

    /// @dev Sets approved amount of tokens for spender. Returns success
    /// @param spender Address of allowed account
    /// @param value Number of approved tokens
    /// @return Was approval successful?
    function approve(address spender, uint value) public returns (bool) {
        allowances[msg.sender][spender] = value;
        emit Approval(msg.sender, spender, value);
        return true;
    }

    /// @dev Returns number of allowed tokens for given address
    /// @param owner Address of token owner
    /// @param spender Address of token spender
    /// @return Remaining allowance for spender
    function allowance(address owner, address spender) public view returns (uint) {
        return allowances[owner][spender];
    }

    /// @dev Returns number of tokens owned by given address
    /// @param owner Address of token owner
    /// @return Balance of owner
    function balanceOf(address owner) public view returns (uint) {
        return balances[owner];
    }

    /// @dev Returns total supply of tokens
    /// @return Total supply
    function totalSupply() public view returns (uint) {
        return totalTokens;
    }
}

// File: contracts/TokenFRT.sol

/// @title Standard token contract with overflow protection
contract TokenFRT is Proxied, GnosisStandardToken {
    address public owner;

    string public constant symbol = "MGN";
    string public constant name = "Magnolia Token";
    uint8 public constant decimals = 18;

    struct UnlockedToken {
        uint amountUnlocked;
        uint withdrawalTime;
    }

    /*
     *  Storage
     */
    address public minter;

    // user => UnlockedToken
    mapping(address => UnlockedToken) public unlockedTokens;

    // user => amount
    mapping(address => uint) public lockedTokenBalances;

    /*
     *  Public functions
     */

    // @dev allows to set the minter of Magnolia tokens once.
    // @param   _minter the minter of the Magnolia tokens, should be the DX-proxy
    function updateMinter(address _minter) public {
        require(msg.sender == owner, "Only the minter can set a new one");
        require(_minter != address(0), "The new minter must be a valid address");

        minter = _minter;
    }

    // @dev the intention is to set the owner as the DX-proxy, once it is deployed
    // Then only an update of the DX-proxy contract after a 30 days delay could change the minter again.
    function updateOwner(address _owner) public {
        require(msg.sender == owner, "Only the owner can update the owner");
        require(_owner != address(0), "The new owner must be a valid address");
        owner = _owner;
    }

    function mintTokens(address user, uint amount) public {
        require(msg.sender == minter, "Only the minter can mint tokens");

        lockedTokenBalances[user] = add(lockedTokenBalances[user], amount);
        totalTokens = add(totalTokens, amount);
    }

    /// @dev Lock Token
    function lockTokens(uint amount) public returns (uint totalAmountLocked) {
        // Adjust amount by balance
        uint actualAmount = min(amount, balances[msg.sender]);

        // Update state variables
        balances[msg.sender] = sub(balances[msg.sender], actualAmount);
        lockedTokenBalances[msg.sender] = add(lockedTokenBalances[msg.sender], actualAmount);

        // Get return variable
        totalAmountLocked = lockedTokenBalances[msg.sender];
    }

    function unlockTokens() public returns (uint totalAmountUnlocked, uint withdrawalTime) {
        // Adjust amount by locked balances
        uint amount = lockedTokenBalances[msg.sender];

        if (amount > 0) {
            // Update state variables
            lockedTokenBalances[msg.sender] = sub(lockedTokenBalances[msg.sender], amount);
            unlockedTokens[msg.sender].amountUnlocked = add(unlockedTokens[msg.sender].amountUnlocked, amount);
            unlockedTokens[msg.sender].withdrawalTime = now + 24 hours;
        }

        // Get return variables
        totalAmountUnlocked = unlockedTokens[msg.sender].amountUnlocked;
        withdrawalTime = unlockedTokens[msg.sender].withdrawalTime;
    }

    function withdrawUnlockedTokens() public {
        require(unlockedTokens[msg.sender].withdrawalTime < now, "The tokens cannot be withdrawn yet");
        balances[msg.sender] = add(balances[msg.sender], unlockedTokens[msg.sender].amountUnlocked);
        unlockedTokens[msg.sender].amountUnlocked = 0;
    }

    function min(uint a, uint b) public pure returns (uint) {
        if (a < b) {
            return a;
        } else {
            return b;
        }
    }
    
    /// @dev Returns whether an add operation causes an overflow
    /// @param a First addend
    /// @param b Second addend
    /// @return Did no overflow occur?
    function safeToAdd(uint a, uint b) public pure returns (bool) {
        return a + b >= a;
    }

    /// @dev Returns whether a subtraction operation causes an underflow
    /// @param a Minuend
    /// @param b Subtrahend
    /// @return Did no underflow occur?
    function safeToSub(uint a, uint b) public pure returns (bool) {
        return a >= b;
    }

    /// @dev Returns sum if no overflow occurred
    /// @param a First addend
    /// @param b Second addend
    /// @return Sum
    function add(uint a, uint b) public pure returns (uint) {
        require(safeToAdd(a, b), "It must be a safe adition");
        return a + b;
    }

    /// @dev Returns difference if no overflow occurred
    /// @param a Minuend
    /// @param b Subtrahend
    /// @return Difference
    function sub(uint a, uint b) public pure returns (uint) {
        require(safeToSub(a, b), "It must be a safe substraction");
        return a - b;
    }
}

Contract ABI
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minter","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"safeToAdd","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_minter","type":"address"}],"name":"updateMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"lockTokens","outputs":[{"name":"totalAmountLocked","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"add","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"min","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"unlockedTokens","outputs":[{"name":"amountUnlocked","type":"uint256"},{"name":"withdrawalTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"updateOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"lockedTokenBalances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"masterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"sub","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"withdrawUnlockedTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"safeToSub","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"user","type":"address"},{"name":"amount","type":"uint256"}],"name":"mintTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unlockTokens","outputs":[{"name":"totalAmountUnlocked","type":"uint256"},{"name":"withdrawalTime","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}]

Contract Creation Code
608060405234801561001057600080fd5b50610e66806100206000396000f3fe608060405234801561001057600080fd5b5060043610610190576000357c010000000000000000000000000000000000000000000000000000000090048063836115fe116100fb578063a9059cbb116100b4578063dd62ed3e1161008e578063dd62ed3e146104b2578063e31c71c4146104e0578063f0dda65c14610503578063f968f4931461052f57610190565b8063a9059cbb1461045b578063b67d77c514610487578063c17ccc6c146104aa57610190565b8063836115fe146103b8578063880cdc31146103f75780638b525d0c1461041d5780638da5cb5b1461044357806395d89b411461044b578063a619486e1461045357610190565b80634e30a66c1161014d5780634e30a66c146102e45780634eb03f6e146103075780636e27d8891461032f57806370a082311461034c578063771602f7146103725780637ae2b5c71461039557610190565b806306fdde03146101955780630754617214610212578063095ea7b31461023657806318160ddd1461027657806323b872dd14610290578063313ce567146102c6575b600080fd5b61019d610537565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d75781810151838201526020016101bf565b50505050905090810190601f1680156102045780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61021a61056e565b60408051600160a060020a039092168252519081900360200190f35b6102626004803603604081101561024c57600080fd5b50600160a060020a03813516906020013561057d565b604080519115158252519081900360200190f35b61027e6105e4565b60408051918252519081900360200190f35b610262600480360360608110156102a657600080fd5b50600160a060020a038135811691602081013590911690604001356105ea565b6102ce610717565b6040805160ff9092168252519081900360200190f35b610262600480360360408110156102fa57600080fd5b508035906020013561071c565b61032d6004803603602081101561031d57600080fd5b5035600160a060020a0316610723565b005b61027e6004803603602081101561034557600080fd5b50356107e8565b61027e6004803603602081101561036257600080fd5b5035600160a060020a0316610861565b61027e6004803603604081101561038857600080fd5b508035906020013561087c565b61027e600480360360408110156103ab57600080fd5b50803590602001356108e3565b6103de600480360360208110156103ce57600080fd5b5035600160a060020a03166108fb565b6040805192835260208301919091528051918290030190f35b61032d6004803603602081101561040d57600080fd5b5035600160a060020a0316610914565b61027e6004803603602081101561043357600080fd5b5035600160a060020a03166109d9565b61021a6109eb565b61019d6109fa565b61021a610a31565b6102626004803603604081101561047157600080fd5b50600160a060020a038135169060200135610a40565b61027e6004803603604081101561049d57600080fd5b5080359060200135610b0d565b61032d610b75565b61027e600480360360408110156104c857600080fd5b50600160a060020a0381358116916020013516610c0e565b610262600480360360408110156104f657600080fd5b5080359060200135610c39565b61032d6004803603604081101561051957600080fd5b50600160a060020a038135169060200135610c3e565b6103de610cf0565b60408051808201909152600e81527f4d61676e6f6c696120546f6b656e000000000000000000000000000000000000602082015281565b600554600160a060020a031681565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60035490565b600160a060020a038316600090815260016020526040812054610613908363ffffffff610c3916565b15806106505750600160a060020a038416600090815260026020908152604080832033845290915290205461064e908363ffffffff610c3916565b155b806106815750600160a060020a03831660009081526001602052604090205461067f908363ffffffff61071c16565b155b1561068e57506000610710565b600160a060020a0380851660008181526001602081815260408084208054899003905560028252808420338552825280842080548990039055948816808452918152918490208054870190558351868152935190937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92908290030190a35060015b9392505050565b601281565b8101101590565b600454600160a060020a0316331461076f5760405160e560020a62461bcd028152600401808060200182810382526021815260200180610d8a6021913960400191505060405180910390fd5b600160a060020a03811615156107b95760405160e560020a62461bcd028152600401808060200182810382526026815260200180610dd06026913960400191505060405180910390fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b3360009081526001602052604081205481906108059084906108e3565b336000908152600160205260409020549091506108229082610b0d565b33600090815260016020908152604080832093909355600790522054610848908261087c565b3360009081526007602052604090208190559392505050565b600160a060020a031660009081526001602052604090205490565b6000610888838361071c565b15156108de576040805160e560020a62461bcd02815260206004820152601960248201527f4974206d757374206265206120736166652061646974696f6e00000000000000604482015290519081900360640190fd5b500190565b6000818310156108f45750816105de565b50806105de565b6006602052600090815260409020805460019091015482565b600454600160a060020a031633146109605760405160e560020a62461bcd028152600401808060200182810382526023815260200180610df66023913960400191505060405180910390fd5b600160a060020a03811615156109aa5760405160e560020a62461bcd028152600401808060200182810382526025815260200180610dab6025913960400191505060405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60076020526000908152604090205481565b600454600160a060020a031681565b60408051808201909152600381527f4d474e0000000000000000000000000000000000000000000000000000000000602082015281565b600054600160a060020a031681565b33600090815260016020526040812054610a60908363ffffffff610c3916565b1580610a925750600160a060020a038316600090815260016020526040902054610a90908363ffffffff61071c16565b155b15610a9f575060006105de565b33600081815260016020908152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6000610b198383610c39565b1515610b6f576040805160e560020a62461bcd02815260206004820152601e60248201527f4974206d7573742062652061207361666520737562737472616374696f6e0000604482015290519081900360640190fd5b50900390565b336000908152600660205260409020600101544211610bc85760405160e560020a62461bcd028152600401808060200182810382526022815260200180610e196022913960400191505060405180910390fd5b33600090815260016020908152604080832054600690925290912054610bee919061087c565b336000908152600160209081526040808320939093556006905290812055565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b111590565b600554600160a060020a03163314610ca0576040805160e560020a62461bcd02815260206004820152601f60248201527f4f6e6c7920746865206d696e7465722063616e206d696e7420746f6b656e7300604482015290519081900360640190fd5b600160a060020a038216600090815260076020526040902054610cc3908261087c565b600160a060020a038316600090815260076020526040902055600354610ce9908261087c565b6003555050565b33600090815260076020526040812054819081811115610d695733600090815260076020526040902054610d249082610b0d565b33600090815260076020908152604080832093909355600690522054610d4a908261087c565b3360009081526006602052604090209081556201518042016001909101555b50503360009081526006602052604090208054600190910154909290915056fe4f6e6c7920746865206d696e7465722063616e207365742061206e6577206f6e65546865206e6577206f776e6572206d75737420626520612076616c69642061646472657373546865206e6577206d696e746572206d75737420626520612076616c696420616464726573734f6e6c7920746865206f776e65722063616e2075706461746520746865206f776e657254686520746f6b656e732063616e6e6f742062652077697468647261776e20796574a165627a7a723058207726e6f0c450cb8b99086f1152d9b8c73d93a9c1e2b99bea38999f8a95259e4c0029


   Swarm Source:
bzzr://7726e6f0c450cb8b99086f1152d9b8c73d93a9c1e2b99bea38999f8a95259e4c
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward