Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x68a9d92Fe19399FEEBEd6A9a0980a7ea7638074C
Balance 0 ETH
Nonce 1
Code Size 5717 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

5717 bytes
0x6080604052600436106101a05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302d6f73081146101a557806306fdde03146101ed578063095ea7b314610277578063158ef93e146102af57806317a950ac146102c457806318160ddd146102f7578063188214001461030c57806323b872dd146103215780632a9053181461034b578063313ce567146103605780633be1e9521461038b5780633f4ba83a146103be57806342966c68146103d357806356780085146103eb5780635b7f415c146104005780635be7fde8146104155780635c975abb1461042a578063661884631461043f57806366a92cda1461046357806370a0823114610478578063715018a614610499578063726a431a146104ae5780638456cb59146104df5780638da5cb5b146104f457806395d89b4114610509578063a9059cbb1461051e578063a9aad58c14610542578063ca63b5b814610557578063cf3b196714610578578063d73dd6231461058d578063d8aeedf5146105b1578063dd62ed3e146105d2578063f2fde38b146105f9575b600080fd5b3480156101b157600080fd5b506101c9600160a060020a036004351660243561061a565b6040805167ffffffffffffffff909316835260208301919091528051918290030190f35b3480156101f957600080fd5b506102026106a7565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561023c578181015183820152602001610224565b50505050905090810190601f1680156102695780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028357600080fd5b5061029b600160a060020a03600435166024356106de565b604080519115158252519081900360200190f35b3480156102bb57600080fd5b5061029b610744565b3480156102d057600080fd5b506102e5600160a060020a0360043516610766565b60408051918252519081900360200190f35b34801561030357600080fd5b506102e5610777565b34801561031857600080fd5b5061020261077d565b34801561032d57600080fd5b5061029b600160a060020a03600435811690602435166044356107b4565b34801561035757600080fd5b506102026107e1565b34801561036c57600080fd5b50610375610818565b6040805160ff9092168252519081900360200190f35b34801561039757600080fd5b506103bc600160a060020a036004351660243567ffffffffffffffff6044351661081d565b005b3480156103ca57600080fd5b506103bc610991565b3480156103df57600080fd5b506103bc600435610a09565b3480156103f757600080fd5b506102e5610a16565b34801561040c57600080fd5b506102e5610a22565b34801561042157600080fd5b506102e5610a27565b34801561043657600080fd5b5061029b610a8c565b34801561044b57600080fd5b5061029b600160a060020a0360043516602435610a9c565b34801561046f57600080fd5b506103bc610b8c565b34801561048457600080fd5b506102e5600160a060020a0360043516610d2f565b3480156104a557600080fd5b506103bc610d58565b3480156104ba57600080fd5b506104c3610dc6565b60408051600160a060020a039092168252519081900360200190f35b3480156104eb57600080fd5b506103bc610dde565b34801561050057600080fd5b506104c3610e5b565b34801561051557600080fd5b50610202610e6a565b34801561052a57600080fd5b5061029b600160a060020a0360043516602435610ea1565b34801561054e57600080fd5b5061029b610ecc565b34801561056357600080fd5b506102e5600160a060020a0360043516610ed1565b34801561058457600080fd5b50610375610a22565b34801561059957600080fd5b5061029b600160a060020a0360043516602435610f57565b3480156105bd57600080fd5b506102e5600160a060020a0360043516610ff0565b3480156105de57600080fd5b506102e5600160a060020a036004358116906024351661100b565b34801561060557600080fd5b506103bc600160a060020a0360043516611036565b600080805b836001018110156106735760036000610642878667ffffffffffffffff16611056565b815260208101919091526040016000205467ffffffffffffffff16925082151561066b5761069f565b60010161061f565b6004600061068b878667ffffffffffffffff16611056565b815260208101919091526040016000205491505b509250929050565b60408051808201909152600681527f49514f4e49510000000000000000000000000000000000000000000000000000602082015290565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6006547501000000000000000000000000000000000000000000900460ff1681565b600061077182611094565b92915050565b60015490565b60408051808201909152600681527f49514f4e49510000000000000000000000000000000000000000000000000000602082015281565b60065460009060a060020a900460ff16156107ce57600080fd5b6107d98484846110af565b949350505050565b60408051808201909152600381527f4951510000000000000000000000000000000000000000000000000000000000602082015281565b601290565b6000600160a060020a038416151561083457600080fd5b3360009081526020819052604090205483111561085057600080fd5b33600090815260208190526040902054610870908463ffffffff61121416565b336000908152602081905260409020556108948467ffffffffffffffff8416611056565b6000818152600460205260409020549091506108b6908463ffffffff61122616565b600082815260046020908152604080832093909355600160a060020a03871682526005905220546108ed908463ffffffff61122616565b600160a060020a0385166000908152600560205260409020556109108483611233565b604080518481529051600160a060020a03861691339160008051602061160a8339815191529181900360200190a36040805167ffffffffffffffff84168152602081018590528151600160a060020a038716927f2ecd071e4d10ed2221b04636ed0724cce66a873aa98c1a31b4bb0e6846d3aab4928290030190a250505050565b600654600160a060020a031633146109a857600080fd5b60065460a060020a900460ff1615156109c057600080fd5b6006805474ff0000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b610a1333826113cd565b50565b670de0b6b3a764000081565b601281565b6000806000610a3733600061061a565b67ffffffffffffffff909116925090505b8115801590610a5657508142115b15610a8757610a63610b8c565b91820191610a7233600061061a565b67ffffffffffffffff90911692509050610a48565b505090565b60065460a060020a900460ff1681565b336000908152600260209081526040808320600160a060020a038616845290915281205480831115610af157336000908152600260209081526040808320600160a060020a0388168452909152812055610b26565b610b01818463ffffffff61121416565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000806000806000610b9f336000611056565b60008181526003602052604090205490955067ffffffffffffffff169350831515610bc957600080fd5b8367ffffffffffffffff164267ffffffffffffffff16111515610beb57600080fd5b610bff338567ffffffffffffffff16611056565b600081815260036020908152604080832054600483528184208054908590553385529284905292205492955067ffffffffffffffff90911693509150610c4b908263ffffffff61122616565b3360009081526020818152604080832093909355600590522054610c75908263ffffffff61121416565b3360009081526005602052604090205567ffffffffffffffff82161515610cb8576000858152600360205260409020805467ffffffffffffffff19169055610cf2565b600085815260036020526040808220805467ffffffffffffffff861667ffffffffffffffff19918216179091558583529120805490911690555b60408051828152905133917fb21fb52d5749b80f3182f8c6992236b5e5576681880914484d7f4c9b062e619e919081900360200190a25050505050565b600160a060020a038116600090815260056020526040812054610d5183611094565b0192915050565b600654600160a060020a03163314610d6f57600080fd5b600654604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26006805473ffffffffffffffffffffffffffffffffffffffff19169055565b736d1daea80bcce8423a0fc703c3b48a8909e226cd81565b600654600160a060020a03163314610df557600080fd5b60065460a060020a900460ff1615610e0c57600080fd5b6006805474ff0000000000000000000000000000000000000000191660a060020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600654600160a060020a031681565b60408051808201909152600381527f4951510000000000000000000000000000000000000000000000000000000000602082015290565b60065460009060a060020a900460ff1615610ebb57600080fd5b610ec583836114bc565b9392505050565b600081565b60008060036000610ee3856000611056565b815260208101919091526040016000205467ffffffffffffffff1690505b67ffffffffffffffff811615610f515760019091019060036000610f2f8567ffffffffffffffff8516611056565b815260208101919091526040016000205467ffffffffffffffff169050610f01565b50919050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610f8b908363ffffffff61122616565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a031660009081526005602052604090205490565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600654600160a060020a0316331461104d57600080fd5b610a138161158b565b67ffffffffffffffff166801000000000000000091909102177f57495348000000000000000000000000000000000000000000000000000000001790565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a03831615156110c657600080fd5b600160a060020a0384166000908152602081905260409020548211156110eb57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561111b57600080fd5b600160a060020a038416600090815260208190526040902054611144908363ffffffff61121416565b600160a060020a038086166000908152602081905260408082209390935590851681522054611179908363ffffffff61122616565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546111bb908363ffffffff61121416565b600160a060020a038086166000818152600260209081526040808320338452825291829020949094558051868152905192871693919260008051602061160a833981519152929181900390910190a35060019392505050565b60008282111561122057fe5b50900390565b8181018281101561077157fe5b6000808080804267ffffffffffffffff87161161124f57600080fd5b611263878767ffffffffffffffff16611056565b9450611270876000611056565b60008181526003602052604090205490945067ffffffffffffffff1692508215156112c3576000848152600360205260409020805467ffffffffffffffff191667ffffffffffffffff88161790556113c4565b6112d7878467ffffffffffffffff16611056565b91505b67ffffffffffffffff83161580159061130657508267ffffffffffffffff168667ffffffffffffffff16115b1561133f575060008181526003602052604090205490925067ffffffffffffffff908116918391166113388784611056565b91506112da565b8267ffffffffffffffff168667ffffffffffffffff161415611360576113c4565b67ffffffffffffffff83161561139a576000858152600360205260409020805467ffffffffffffffff191667ffffffffffffffff85161790555b6000848152600360205260409020805467ffffffffffffffff191667ffffffffffffffff88161790555b50505050505050565b600160a060020a0382166000908152602081905260409020548111156113f257600080fd5b600160a060020a03821660009081526020819052604090205461141b908263ffffffff61121416565b600160a060020a038316600090815260208190526040902055600154611447908263ffffffff61121416565b600155604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2604080518281529051600091600160a060020a0385169160008051602061160a8339815191529181900360200190a35050565b6000600160a060020a03831615156114d357600080fd5b336000908152602081905260409020548211156114ef57600080fd5b3360009081526020819052604090205461150f908363ffffffff61121416565b3360009081526020819052604080822092909255600160a060020a03851681522054611541908363ffffffff61122616565b600160a060020a0384166000818152602081815260409182902093909355805185815290519192339260008051602061160a8339815191529281900390910190a350600192915050565b600160a060020a03811615156115a057600080fd5b600654604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820d6c37530bbdab87b34380e709ea0540ce09eb9da0174eabceef0c051d95ac4090029

Verified Source Code Partial Match

Compiler: v0.4.24+commit.e67f0147 EVM: byzantium Optimization: Yes (200 runs)
IQONIQ.sol 638 lines
pragma solidity ^0.4.23;

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
    function totalSupply() public view returns (uint256);

    function balanceOf(address who) public view returns (uint256);

    function transfer(address to, uint256 value) public returns (bool);

    event Transfer(address indexed from, address indexed to, uint256 value);
}

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
    /**
     * @dev Multiplies two numbers, throws on overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
        // Gas optimization: this is cheaper than asserting 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        c = a * b;
        assert(c / a == b);
        return c;
    }

    /**
     * @dev Integer division of two numbers, truncating the quotient.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        // uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return a / b;
    }

    /**
     * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    /**
     * @dev Adds two numbers, throws on overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
        c = a + b;
        assert(c >= a);
        return c;
    }
}

/**
 * @title Basic token
 * @dev Basic version of StandardToken, with no allowances.
 */
contract BasicToken is ERC20Basic {
    using SafeMath for uint256;

    mapping(address => uint256) balances;

    uint256 totalSupply_;

    /**
     * @dev total number of tokens in existence
     */
    function totalSupply() public view returns (uint256) {
        return totalSupply_;
    }

    /**
     * @dev transfer token for a specified address
     * @param _to The address to transfer to.
     * @param _value The amount to be transferred.
     */
    function transfer(address _to, uint256 _value) public returns (bool) {
        require(_to != address(0));
        require(_value <= balances[msg.sender]);

        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        emit Transfer(msg.sender, _to, _value);
        return true;
    }

    /**
     * @dev Gets the balance of the specified address.
     * @param _owner The address to query the the balance of.
     * @return An uint256 representing the amount owned by the passed address.
     */
    function balanceOf(address _owner) public view returns (uint256) {
        return balances[_owner];
    }
}

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
    function allowance(address owner, address spender)
        public
        view
        returns (uint256);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) public returns (bool);

    function approve(address spender, uint256 value) public returns (bool);

    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
}

/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * @dev https://github.com/ethereum/EIPs/issues/20
 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 */
contract StandardToken is ERC20, BasicToken {
    mapping(address => mapping(address => uint256)) internal allowed;

    /**
     * @dev Transfer tokens from one address to another
     * @param _from address The address which you want to send tokens from
     * @param _to address The address which you want to transfer to
     * @param _value uint256 the amount of tokens to be transferred
     */
    function transferFrom(
        address _from,
        address _to,
        uint256 _value
    ) public returns (bool) {
        require(_to != address(0));
        require(_value <= balances[_from]);
        require(_value <= allowed[_from][msg.sender]);

        balances[_from] = balances[_from].sub(_value);
        balances[_to] = balances[_to].add(_value);
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
        emit Transfer(_from, _to, _value);
        return true;
    }

    /**
     * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
     *
     * Beware that changing an allowance with this method brings the risk that someone may use both the old
     * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
     * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     * @param _spender The address which will spend the funds.
     * @param _value The amount of tokens to be spent.
     */
    function approve(address _spender, uint256 _value) public returns (bool) {
        allowed[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

    /**
     * @dev Function to check the amount of tokens that an owner allowed to a spender.
     * @param _owner address The address which owns the funds.
     * @param _spender address The address which will spend the funds.
     * @return A uint256 specifying the amount of tokens still available for the spender.
     */
    function allowance(address _owner, address _spender)
        public
        view
        returns (uint256)
    {
        return allowed[_owner][_spender];
    }

    /**
     * @dev Increase the amount of tokens that an owner allowed to a spender.
     *
     * approve should be called when allowed[_spender] == 0. To increment
     * allowed value is better to use this function to avoid 2 calls (and wait until
     * the first transaction is mined)
     * From MonolithDAO Token.sol
     * @param _spender The address which will spend the funds.
     * @param _addedValue The amount of tokens to increase the allowance by.
     */
    function increaseApproval(address _spender, uint256 _addedValue)
        public
        returns (bool)
    {
        allowed[msg.sender][_spender] = (
            allowed[msg.sender][_spender].add(_addedValue)
        );
        emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

    /**
     * @dev Decrease the amount of tokens that an owner allowed to a spender.
     *
     * approve should be called when allowed[_spender] == 0. To decrement
     * allowed value is better to use this function to avoid 2 calls (and wait until
     * the first transaction is mined)
     * From MonolithDAO Token.sol
     * @param _spender The address which will spend the funds.
     * @param _subtractedValue The amount of tokens to decrease the allowance by.
     */
    function decreaseApproval(address _spender, uint256 _subtractedValue)
        public
        returns (bool)
    {
        uint256 oldValue = allowed[msg.sender][_spender];
        if (_subtractedValue > oldValue) {
            allowed[msg.sender][_spender] = 0;
        } else {
            allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
        }
        emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }
}

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address public owner;

    event OwnershipRenounced(address indexed previousOwner);
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    constructor() public {
        owner = msg.sender;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    /**
     * @dev Allows the current owner to relinquish control of the contract.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipRenounced(owner);
        owner = address(0);
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param _newOwner The address to transfer ownership to.
     */
    function transferOwnership(address _newOwner) public onlyOwner {
        _transferOwnership(_newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param _newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address _newOwner) internal {
        require(_newOwner != address(0));
        emit OwnershipTransferred(owner, _newOwner);
        owner = _newOwner;
    }
}

contract FreezableToken is StandardToken {
    // freezing chains
    mapping(bytes32 => uint64) internal chains;
    // freezing amounts for each chain
    mapping(bytes32 => uint256) internal freezings;
    // total freezing balance per address
    mapping(address => uint256) internal freezingBalance;

    event Freezed(address indexed to, uint64 release, uint256 amount);
    event Released(address indexed owner, uint256 amount);

    /**
     * @dev Gets the balance of the specified address include freezing tokens.
     * @param _owner The address to query the the balance of.
     * @return An uint256 representing the amount owned by the passed address.
     */
    function balanceOf(address _owner) public view returns (uint256 balance) {
        return super.balanceOf(_owner) + freezingBalance[_owner];
    }

    /**
     * @dev Gets the balance of the specified address without freezing tokens.
     * @param _owner The address to query the the balance of.
     * @return An uint256 representing the amount owned by the passed address.
     */
    function actualBalanceOf(address _owner)
        public
        view
        returns (uint256 balance)
    {
        return super.balanceOf(_owner);
    }

    function freezingBalanceOf(address _owner)
        public
        view
        returns (uint256 balance)
    {
        return freezingBalance[_owner];
    }

    /**
     * @dev gets freezing count
     * @param _addr Address of freeze tokens owner.
     */
    function freezingCount(address _addr) public view returns (uint256 count) {
        uint64 release = chains[toKey(_addr, 0)];
        while (release != 0) {
            count++;
            release = chains[toKey(_addr, release)];
        }
    }

    /**
     * @dev gets freezing end date and freezing balance for the freezing portion specified by index.
     * @param _addr Address of freeze tokens owner.
     * @param _index Freezing portion index. It ordered by release date descending.
     */
    function getFreezing(address _addr, uint256 _index)
        public
        view
        returns (uint64 _release, uint256 _balance)
    {
        for (uint256 i = 0; i < _index + 1; i++) {
            _release = chains[toKey(_addr, _release)];
            if (_release == 0) {
                return;
            }
        }
        _balance = freezings[toKey(_addr, _release)];
    }

    /**
     * @dev freeze your tokens to the specified address.
     *      Be careful, gas usage is not deterministic,
     *      and depends on how many freezes _to address already has.
     * @param _to Address to which token will be freeze.
     * @param _amount Amount of token to freeze.
     * @param _until Release date, must be in future.
     */
    function freezeTo(
        address _to,
        uint256 _amount,
        uint64 _until
    ) public {
        require(_to != address(0));
        require(_amount <= balances[msg.sender]);

        balances[msg.sender] = balances[msg.sender].sub(_amount);

        bytes32 currentKey = toKey(_to, _until);
        freezings[currentKey] = freezings[currentKey].add(_amount);
        freezingBalance[_to] = freezingBalance[_to].add(_amount);

        freeze(_to, _until);
        emit Transfer(msg.sender, _to, _amount);
        emit Freezed(_to, _until, _amount);
    }

    /**
     * @dev release first available freezing tokens.
     */
    function releaseOnce() public {
        bytes32 headKey = toKey(msg.sender, 0);
        uint64 head = chains[headKey];
        require(head != 0);
        require(uint64(block.timestamp) > head);
        bytes32 currentKey = toKey(msg.sender, head);

        uint64 next = chains[currentKey];

        uint256 amount = freezings[currentKey];
        delete freezings[currentKey];

        balances[msg.sender] = balances[msg.sender].add(amount);
        freezingBalance[msg.sender] = freezingBalance[msg.sender].sub(amount);

        if (next == 0) {
            delete chains[headKey];
        } else {
            chains[headKey] = next;
            delete chains[currentKey];
        }
        emit Released(msg.sender, amount);
    }

    /**
     * @dev release all available for release freezing tokens. Gas usage is not deterministic!
     * @return how many tokens was released
     */
    function releaseAll() public returns (uint256 tokens) {
        uint256 release;
        uint256 balance;
        (release, balance) = getFreezing(msg.sender, 0);
        while (release != 0 && block.timestamp > release) {
            releaseOnce();
            tokens += balance;
            (release, balance) = getFreezing(msg.sender, 0);
        }
    }

    function toKey(address _addr, uint256 _release)
        internal
        pure
        returns (bytes32 result)
    {
        // WISH masc to increase entropy
        result = 0x5749534800000000000000000000000000000000000000000000000000000000;
        assembly {
            result := or(result, mul(_addr, 0x10000000000000000))
            result := or(result, and(_release, 0xffffffffffffffff))
        }
    }

    function freeze(address _to, uint64 _until) internal {
        require(_until > block.timestamp);
        bytes32 key = toKey(_to, _until);
        bytes32 parentKey = toKey(_to, uint64(0));
        uint64 next = chains[parentKey];

        if (next == 0) {
            chains[parentKey] = _until;
            return;
        }

        bytes32 nextKey = toKey(_to, next);
        uint256 parent;

        while (next != 0 && _until > next) {
            parent = next;
            parentKey = nextKey;

            next = chains[nextKey];
            nextKey = toKey(_to, next);
        }

        if (_until == next) {
            return;
        }

        if (next != 0) {
            chains[key] = next;
        }

        chains[parentKey] = _until;
    }
}

/**
 * @title Burnable Token
 * @dev Token that can be irreversibly burned (destroyed).
 */
contract BurnableToken is BasicToken {
    event Burn(address indexed burner, uint256 value);

    /**
     * @dev Burns a specific amount of tokens.
     * @param _value The amount of token to be burned.
     */
    function burn(uint256 _value) public {
        _burn(msg.sender, _value);
    }

    function _burn(address _who, uint256 _value) internal {
        require(_value <= balances[_who]);
        // no need to require value <= totalSupply, since that would imply the
        // sender's balance is greater than the totalSupply, which *should* be an assertion failure

        balances[_who] = balances[_who].sub(_value);
        totalSupply_ = totalSupply_.sub(_value);
        emit Burn(_who, _value);
        emit Transfer(_who, address(0), _value);
    }
}

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
    event Pause();
    event Unpause();

    bool public paused = false;

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     */
    modifier whenNotPaused() {
        require(!paused);
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     */
    modifier whenPaused() {
        require(paused);
        _;
    }

    /**
     * @dev called by the owner to pause, triggers stopped state
     */
    function pause() public onlyOwner whenNotPaused {
        paused = true;
        emit Pause();
    }

    /**
     * @dev called by the owner to unpause, returns to normal state
     */
    function unpause() public onlyOwner whenPaused {
        paused = false;
        emit Unpause();
    }
}

contract Consts {
    uint256 public constant TOKEN_DECIMALS = 18;
    uint8 public constant TOKEN_DECIMALS_UINT8 = 18;
    uint256 public constant TOKEN_DECIMAL_MULTIPLIER = 10**TOKEN_DECIMALS;

    string public constant TOKEN_NAME = "IQONIQ";
    string public constant TOKEN_SYMBOL = "IQQ";
    bool public constant PAUSED = false;
    address public constant TARGET_USER =
        0x6d1DAEA80bCce8423A0Fc703c3B48A8909E226Cd;
}

contract IQONIQ is Consts, FreezableToken, BurnableToken, Pausable {
    event Initialized();
    bool public initialized = false;

    constructor() public {
        init();
        transferOwnership(TARGET_USER);
    }

    function name() public pure returns (string _name) {
        return TOKEN_NAME;
    }

    function symbol() public pure returns (string _symbol) {
        return TOKEN_SYMBOL;
    }

    function decimals() public pure returns (uint8 _decimals) {
        return TOKEN_DECIMALS_UINT8;
    }

    function transferFrom(
        address _from,
        address _to,
        uint256 _value
    ) public returns (bool _success) {
        require(!paused);
        return super.transferFrom(_from, _to, _value);
    }

    function transfer(address _to, uint256 _value)
        public
        returns (bool _success)
    {
        require(!paused);
        return super.transfer(_to, _value);
    }

    function init() private {
        require(!initialized);
        initialized = true;

        if (PAUSED) {
            pause();
        }

        address[1] memory addresses =
            [address(0x88949d221A62EdAF3dE7407F488C921EcD56031f)];
        uint256[1] memory amounts = [uint256(2500000000000000000000000000)];
        uint64[1] memory freezes = [uint64(0)];

        for (uint256 i = 0; i < addresses.length; i++) {
            if (freezes[i] == 0) {
                totalSupply_ = totalSupply_.add(amounts[i]);
                balances[addresses[i]] = balances[addresses[i]].add(amounts[i]);
            } else {
                totalSupply_ = totalSupply_.add(amounts[i]);

                bytes32 currentKey = toKey(addresses[i], freezes[i]);
                freezings[currentKey] = freezings[currentKey].add(amounts[i]);
                freezingBalance[addresses[i]] = freezingBalance[addresses[i]].add(amounts[i]);

                freeze(addresses[i], freezes[i]);
            }
        }

        emit Initialized();
    }
}

Read Contract

PAUSED 0xa9aad58c → bool
TARGET_USER 0x726a431a → address
TOKEN_DECIMALS 0x5b7f415c → uint256
TOKEN_DECIMALS_UINT8 0xcf3b1967 → uint8
TOKEN_DECIMAL_MULTIPLIER 0x56780085 → uint256
TOKEN_NAME 0x18821400 → string
TOKEN_SYMBOL 0x2a905318 → string
actualBalanceOf 0x17a950ac → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
freezingBalanceOf 0xd8aeedf5 → uint256
freezingCount 0xca63b5b8 → uint256
getFreezing 0x02d6f730 → uint64, uint256
initialized 0x158ef93e → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 13 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
burn 0x42966c68
uint256 _value
decreaseApproval 0x66188463
address _spender
uint256 _subtractedValue
returns: bool
freezeTo 0x3be1e952
address _to
uint256 _amount
uint64 _until
increaseApproval 0xd73dd623
address _spender
uint256 _addedValue
returns: bool
pause 0x8456cb59
No parameters
releaseAll 0x5be7fde8
No parameters
returns: uint256
releaseOnce 0x66a92cda
No parameters
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferOwnership 0xf2fde38b
address _newOwner
unpause 0x3f4ba83a
No parameters

Token Balances (1)

View Transfers →
USDT 500

Recent Transactions

No transactions found for this address