ETH Price: $3,801.51 (+2.88%)
Gas: 14 Gwei

Token

Hegic WBTC LP Token (writeWBTC)
 

Overview

Max Total Supply

12,385.140402228387835212 writeWBTC

Holders

407

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
0.000004695620478479 writeWBTC

Value
$0.00
0x438120e0c088a8aa2313ba0330a5cedf49695915
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
HegicERCPool

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-10-10
*/

// SPDX-License-Identifier: GPL-3.0-or-later
// File: @openzeppelin/contracts/GSN/Context.sol


pragma solidity ^0.6.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: 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
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: @openzeppelin/contracts/math/SafeMath.sol


pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/utils/Address.sol


pragma solidity ^0.6.2;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol


pragma solidity ^0.6.0;





/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;
    using Address for address;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol


pragma solidity ^0.6.0;




/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol


pragma solidity ^0.6.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: @chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol

pragma solidity >=0.6.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);
  function description() external view returns (string memory);
  function version() external view returns (uint256);

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

// File: @uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol

pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

// File: contracts/Interfaces/Interfaces.sol

pragma solidity 0.6.12;

/**
 * Hegic
 * Copyright (C) 2020 Hegic Protocol
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */







interface ILiquidityPool {
    struct LockedLiquidity { uint amount; uint premium; bool locked; }

    event Profit(uint indexed id, uint amount);
    event Loss(uint indexed id, uint amount);
    event Provide(address indexed account, uint256 amount, uint256 writeAmount);
    event Withdraw(address indexed account, uint256 amount, uint256 writeAmount);

    function unlock(uint256 id) external;
    function send(uint256 id, address payable account, uint256 amount) external;
    function setLockupPeriod(uint value) external;
    function totalBalance() external view returns (uint256 amount);
    // function unlockPremium(uint256 amount) external;
}


interface IERCLiquidityPool is ILiquidityPool {
    function lock(uint id, uint256 amount, uint premium) external;
    function token() external view returns (IERC20);
}


interface IETHLiquidityPool is ILiquidityPool {
    function lock(uint id, uint256 amount) external payable;
}


interface IHegicStaking {    
    event Claim(address indexed acount, uint amount);
    event Profit(uint amount);


    function claimProfit() external returns (uint profit);
    function buy(uint amount) external;
    function sell(uint amount) external;
    function profitOf(address account) external view returns (uint);
}


interface IHegicStakingETH is IHegicStaking {
    function sendProfit() external payable;
}


interface IHegicStakingERC20 is IHegicStaking {
    function sendProfit(uint amount) external;
}


interface IHegicOptions {
    event Create(
        uint256 indexed id,
        address indexed account,
        uint256 settlementFee,
        uint256 totalFee
    );

    event Exercise(uint256 indexed id, uint256 profit);
    event Expire(uint256 indexed id, uint256 premium);
    enum State {Inactive, Active, Exercised, Expired}
    enum OptionType {Invalid, Put, Call}

    struct Option {
        State state;
        address payable holder;
        uint256 strike;
        uint256 amount;
        uint256 lockedAmount;
        uint256 premium;
        uint256 expiration;
        OptionType optionType;
    }

    function options(uint) external view returns (
        State state,
        address payable holder,
        uint256 strike,
        uint256 amount,
        uint256 lockedAmount,
        uint256 premium,
        uint256 expiration,
        OptionType optionType
    );
}

// For the future integrations of non-standard ERC20 tokens such as USDT and others
// interface ERC20Incorrect {
//     event Transfer(address indexed from, address indexed to, uint256 value);
//
//     event Approval(address indexed owner, address indexed spender, uint256 value);
//
//     function transfer(address to, uint256 value) external;
//
//     function transferFrom(
//         address from,
//         address to,
//         uint256 value
//     ) external;
//
//     function approve(address spender, uint256 value) external;
//     function balanceOf(address who) external view returns (uint256);
//     function allowance(address owner, address spender) external view returns (uint256);
//
// }

// File: contracts/Pool/HegicWBTCPool.sol

pragma solidity 0.6.12;

/**
 * Hegic
 * Copyright (C) 2020 Hegic Protocol
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */



/**
 * @author 0mllwntrmt3
 * @title Hegic WBTC Liquidity Pool
 * @notice Accumulates liquidity in WBTC from LPs and distributes P&L in WBTC
 */
contract HegicERCPool is
    IERCLiquidityPool,
    Ownable,
    ERC20("Hegic WBTC LP Token", "writeWBTC")
{
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    uint256 public constant INITIAL_RATE = 1e13;
    uint256 public lockupPeriod = 2 weeks;
    uint256 public lockedAmount;
    uint256 public lockedPremium;
    mapping(address => uint256) public lastProvideTimestamp;
    mapping(address => bool) public _revertTransfersInLockUpPeriod;
    LockedLiquidity[] public lockedLiquidity;
    IERC20 public override token;

    /*
     * @return _token WBTC Address
     */
    constructor(IERC20 _token) public {
        token = _token;
    }

    /**
     * @notice Used for changing the lockup period
     * @param value New period value
     */
    function setLockupPeriod(uint256 value) external override onlyOwner {
        require(value <= 60 days, "Lockup period is too large");
        lockupPeriod = value;
    }

    /*
     * @nonce calls by HegicPutOptions to lock funds
     * @param amount Amount of funds that should be locked in an option
     */
    function lock(uint id, uint256 amount, uint256 premium) external override onlyOwner {
        require(id == lockedLiquidity.length, "Wrong id");

        require(
            lockedAmount.add(amount).mul(10) <= totalBalance().mul(8),
            "Pool Error: Amount is too large."
        );

        lockedLiquidity.push(LockedLiquidity(amount, premium, true));
        lockedPremium = lockedPremium.add(premium);
        lockedAmount = lockedAmount.add(amount);
        token.safeTransferFrom(msg.sender, address(this), premium);
    }

    /*
     * @nonce Calls by HegicPutOptions to unlock funds
     * @param amount Amount of funds that should be unlocked in an expired option
     */
    function unlock(uint256 id) external override onlyOwner {
        LockedLiquidity storage ll = lockedLiquidity[id];
        require(ll.locked, "LockedLiquidity with such id has already unlocked");
        ll.locked = false;

        lockedPremium = lockedPremium.sub(ll.premium);
        lockedAmount = lockedAmount.sub(ll.amount);

        emit Profit(id, ll.premium);
    }

    /*
     * @nonce calls by HegicPutOptions to unlock the premiums after an option's expiraton
     * @param to Provider
     * @param amount Amount of premiums that should be unlocked
     */
    /*
     * @nonce calls by HegicCallOptions to send funds to liquidity providers after an option's expiration
     * @param to Provider
     * @param amount Funds that should be sent
     */
    function send(uint id, address payable to, uint256 amount)
        external
        override
        onlyOwner
    {
        LockedLiquidity storage ll = lockedLiquidity[id];
        require(ll.locked, "LockedLiquidity with such id has already unlocked");
        require(to != address(0));

        ll.locked = false;
        lockedPremium = lockedPremium.sub(ll.premium);
        lockedAmount = lockedAmount.sub(ll.amount);

        uint transferAmount = amount > ll.amount ? ll.amount : amount;
        token.safeTransfer(to, transferAmount);

        if (transferAmount <= ll.premium)
            emit Profit(id, ll.premium - transferAmount);
        else
            emit Loss(id, transferAmount - ll.premium);
    }

    /*
     * @nonce A provider supplies WBTC to the pool and receives writeWBTC tokens
     * @param amount Provided tokens
     * @param minMint Minimum amount of tokens that should be received by a provider.
                      Calling the provide function will require the minimum amount of tokens to be minted.
                      The actual amount that will be minted could vary but can only be higher (not lower) than the minimum value.
     * @return mint Amount of tokens to be received
     */
    function provide(uint256 amount, uint256 minMint) external returns (uint256 mint) {
        lastProvideTimestamp[msg.sender] = block.timestamp;
        uint supply = totalSupply();
        uint balance = totalBalance();
        if (supply > 0 && balance > 0)
            mint = amount.mul(supply).div(balance);
        else
            mint = amount.mul(INITIAL_RATE);

        require(mint >= minMint, "Pool: Mint limit is too large");
        require(mint > 0, "Pool: Amount is too small");
        _mint(msg.sender, mint);
        emit Provide(msg.sender, amount, mint);

        require(
            token.transferFrom(msg.sender, address(this), amount),
            "Token transfer error: Please lower the amount of premiums that you want to send."
        );
    }

    /*
     * @nonce Provider burns writeWBTC and receives WBTC from the pool
     * @param amount Amount of WBTC to receive
     * @param maxBurn Maximum amount of tokens that can be burned
     * @return mint Amount of tokens to be burnt
     */
    function withdraw(uint256 amount, uint256 maxBurn) external returns (uint256 burn) {
        require(
            lastProvideTimestamp[msg.sender].add(lockupPeriod) <= block.timestamp,
            "Pool: Withdrawal is locked up"
        );
        require(
            amount <= availableBalance(),
            "Pool Error: You are trying to unlock more funds than have been locked for your contract. Please lower the amount."
        );

        burn = divCeil(amount.mul(totalSupply()), totalBalance());

        require(burn <= maxBurn, "Pool: Burn limit is too small");
        require(burn <= balanceOf(msg.sender), "Pool: Amount is too large");
        require(burn > 0, "Pool: Amount is too small");

        _burn(msg.sender, burn);
        emit Withdraw(msg.sender, amount, burn);
        require(token.transfer(msg.sender, amount), "Insufficient funds");
    }

    /*
     * @nonce Returns provider's share in WBTC
     * @param account Provider's address
     * @return Provider's share in WBTC
     */
    function shareOf(address user) external view returns (uint256 share) {
        uint supply = totalSupply();
        if (supply > 0)
            share = totalBalance().mul(balanceOf(user)).div(supply);
        else
            share = 0;
    }

    /*
     * @nonce Returns the amount of WBTC available for withdrawals
     * @return balance Unlocked amount
     */
    function availableBalance() public view returns (uint256 balance) {
        return totalBalance().sub(lockedAmount);
    }

    /*
     * @nonce Returns the WBTC total balance provided to the pool
     * @return balance Pool balance
     */
    function totalBalance() public override view returns (uint256 balance) {
        return token.balanceOf(address(this)).sub(lockedPremium);
    }

    function _beforeTokenTransfer(address from, address to, uint256) internal override {
        if (
            lastProvideTimestamp[from].add(lockupPeriod) > block.timestamp &&
            lastProvideTimestamp[from] > lastProvideTimestamp[to]
        ) {
            require(
                !_revertTransfersInLockUpPeriod[to],
                "the recipient does not accept blocked funds"
            );
            lastProvideTimestamp[to] = lastProvideTimestamp[from];
        }
    }

    function divCeil(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0);
        uint256 c = a / b;
        if (a % b != 0)
            c = c + 1;
        return c;
    }
}

// File: contracts/Options/HegicWBTCOptions.sol

pragma solidity 0.6.12;

/**
 * Hegic
 * Copyright (C) 2020 Hegic Protocol
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */



/**
 * @author 0mllwntrmt3
 * @title Hegic WBTC (Wrapped Bitcoin) Bidirectional (Call and Put) Options
 * @notice Hegic Protocol Options Contract
 */
contract HegicWBTCOptions is Ownable, IHegicOptions {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    IHegicStakingERC20 public settlementFeeRecipient;
    Option[] public override options;
    uint256 public impliedVolRate;
    uint256 public optionCollateralizationRatio = 100;
    uint256 internal constant PRICE_DECIMALS = 1e8;
    uint256 internal contractCreationTimestamp;
    AggregatorV3Interface public priceProvider;
    HegicERCPool public pool;
    IUniswapV2Router01 public uniswapRouter;
    address[] public ethToWbtcSwapPath;
    IERC20 public wbtc;

    /**
     * @param _priceProvider The address of ChainLink BTC/USD price feed contract
     * @param _uniswap The address of Uniswap router contract
     * @param token The address of WBTC ERC20 token contract
     */
    constructor(
        AggregatorV3Interface _priceProvider,
        IUniswapV2Router01 _uniswap,
        ERC20 token,
        IHegicStakingERC20 _settlementFeeRecipient
    ) public {
        pool = new HegicERCPool(token);
        wbtc = token;
        priceProvider = _priceProvider;
        settlementFeeRecipient = _settlementFeeRecipient;
        impliedVolRate = 4500;
        uniswapRouter = _uniswap;
        contractCreationTimestamp = block.timestamp;
        approve();

        ethToWbtcSwapPath = new address[](2);
        ethToWbtcSwapPath[0] = uniswapRouter.WETH();
        ethToWbtcSwapPath[1] = address(wbtc);

    }

    /**
     * @notice Can be used to update the contract in critical situations
     *         in the first 14 days after deployment
     */
    function transferPoolOwnership() external onlyOwner {
        require(block.timestamp < contractCreationTimestamp + 14 days);
        pool.transferOwnership(owner());
    }

    /**
     * @notice Used for adjusting the options prices while balancing asset's implied volatility rate
     * @param value New IVRate value
     */
    function setImpliedVolRate(uint256 value) external onlyOwner {
        require(value >= 1000, "ImpliedVolRate limit is too small");
        impliedVolRate = value;
    }

    /**
     * @notice Used for changing settlementFeeRecipient
     * @param recipient New settlementFee recipient address
     */
    function setSettlementFeeRecipient(IHegicStakingERC20 recipient) external onlyOwner {
        require(block.timestamp < contractCreationTimestamp + 14 days);
        require(address(recipient) != address(0));
        settlementFeeRecipient = recipient;
    }

    /**
     * @notice Used for changing option collateralization ratio
     * @param value New optionCollateralizationRatio value
     */
    function setOptionCollaterizationRatio(uint value) external onlyOwner {
        require(50 <= value && value <= 100, "wrong value");
        optionCollateralizationRatio = value;
    }

    /**
     * @notice Creates a new option
     * @param period Option period in seconds (1 days <= period <= 4 weeks)
     * @param amount Option amount
     * @param strike Strike price of the option
     * @param optionType Call or Put option type
     * @return optionID Created option's ID
     */
    function create(
        uint256 period,
        uint256 amount,
        uint256 strike,
        OptionType optionType
    )
        external
        payable
        returns (uint256 optionID)
    {
        (uint256 total, uint256 totalETH, uint256 settlementFee, uint256 strikeFee, ) =
            fees(period, amount, strike, optionType);
        require(
            optionType == OptionType.Call || optionType == OptionType.Put,
            "Wrong option type"
        );
        require(period >= 1 days, "Period is too short");
        require(period <= 4 weeks, "Period is too long");
        require(amount > strikeFee, "price difference is too large");

        uint256 strikeAmount = amount.sub(strikeFee);
        uint premium = total.sub(settlementFee);
        optionID = options.length;

        Option memory option = Option(
            State.Active,
            msg.sender,
            strike,
            amount,
            strikeAmount.mul(optionCollateralizationRatio).div(100).add(strikeFee),
            premium,
            block.timestamp + period,
            optionType
        );

        uint amountIn = swapToWBTC(totalETH, total);
        if (amountIn < msg.value) {
            msg.sender.transfer(msg.value.sub(amountIn));
        }

        options.push(option);
        settlementFeeRecipient.sendProfit(settlementFee);
        pool.lock(optionID, option.lockedAmount, option.premium);

        emit Create(optionID, msg.sender, settlementFee, total);
    }

    /**
     * @notice Transfers an active option
     * @param optionID ID of your option
     * @param newHolder Address of new option holder
     */
    function transfer(uint256 optionID, address payable newHolder) external {
        Option storage option = options[optionID];

        require(newHolder != address(0), "new holder address is zero");
        require(option.expiration >= block.timestamp, "Option has expired");
        require(option.holder == msg.sender, "Wrong msg.sender");
        require(option.state == State.Active, "Only active option could be transferred");

        option.holder = newHolder;
    }

    /**
     * @notice Exercises an active option
     * @param optionID ID of your option
     */
    function exercise(uint256 optionID) external {
        Option storage option = options[optionID];

        require(option.expiration >= block.timestamp, "Option has expired");
        require(option.holder == msg.sender, "Wrong msg.sender");
        require(option.state == State.Active, "Wrong state");

        option.state = State.Exercised;
        uint256 profit = payProfit(optionID);

        emit Exercise(optionID, profit);
    }

    /**
     * @notice Unlocks an array of options
     * @param optionIDs array of options
     */
    function unlockAll(uint256[] calldata optionIDs) external {
        uint arrayLength = optionIDs.length;
        for (uint256 i = 0; i < arrayLength; i++) {
            unlock(optionIDs[i]);
        }
    }

    /**
     * @notice Allows the ERC pool contract to receive and send tokens
     */
    function approve() public {
        wbtc.safeApprove(address(pool), uint(-1));
        wbtc.safeApprove(address(settlementFeeRecipient), uint(-1));
    }

    /**
     * @notice Used for getting the actual options prices
     * @param period Option period in seconds (1 days <= period <= 4 weeks)
     * @param amount Option amount
     * @param strike Strike price of the option
     * @return total Total price to be paid
     * @return totalETH Total price in ETH to be paid
     * @return settlementFee Amount to be distributed to the HEGIC token holders
     * @return strikeFee Amount that covers the price difference in the ITM options
     * @return periodFee Option period fee amount
     */
    function fees(
        uint256 period,
        uint256 amount,
        uint256 strike,
        OptionType optionType
    )
        public
        view
        returns (
            uint256 total,
            uint256 totalETH,
            uint256 settlementFee,
            uint256 strikeFee,
            uint256 periodFee
        )
    {
        (, int latestPrice, , , ) = priceProvider.latestRoundData();
        uint256 currentPrice = uint256(latestPrice);
        settlementFee = getSettlementFee(amount);
        periodFee = getPeriodFee(amount, period, strike, currentPrice, optionType);
        strikeFee = getStrikeFee(amount, strike, currentPrice, optionType);
        total = periodFee.add(strikeFee).add(settlementFee);
        totalETH = uniswapRouter.getAmountsIn(total, ethToWbtcSwapPath)[0];
    }

    /**
     * @notice Unlock funds locked in the expired options
     * @param optionID ID of the option
     */
    function unlock(uint256 optionID) public {
        Option storage option = options[optionID];
        require(option.expiration < block.timestamp, "Option has not expired yet");
        require(option.state == State.Active, "Option is not active");
        option.state = State.Expired;
        pool.unlock(optionID);
        emit Expire(optionID, option.premium);
    }

    /**
     * @notice Calculates settlementFee
     * @param amount Option amount
     * @return fee Settlement fee amount
     */
    function getSettlementFee(uint256 amount)
        internal
        pure
        returns (uint256 fee)
    {
        return amount / 100;
    }

    /**
     * @notice Calculates periodFee
     * @param amount Option amount
     * @param period Option period in seconds (1 days <= period <= 4 weeks)
     * @param strike Strike price of the option
     * @param currentPrice Current price of BTC
     * @return fee Period fee amount
     *
     * amount < 1e30        |
     * impliedVolRate < 1e10| => amount * impliedVolRate * strike < 1e60 < 2^uint256
     * strike < 1e20 ($1T)  |
     *
     * in case amount * impliedVolRate * strike >= 2^256
     * transaction will be reverted by the SafeMath
     */
    function getPeriodFee(
        uint256 amount,
        uint256 period,
        uint256 strike,
        uint256 currentPrice,
        OptionType optionType
    ) internal view returns (uint256 fee) {
        if (optionType == OptionType.Put)
            return amount
                .mul(sqrt(period))
                .mul(impliedVolRate)
                .mul(strike)
                .div(currentPrice)
                .div(PRICE_DECIMALS);
        else
            return amount
                .mul(sqrt(period))
                .mul(impliedVolRate)
                .mul(currentPrice)
                .div(strike)
                .div(PRICE_DECIMALS);
    }

    /**
     * @notice Calculates strikeFee
     * @param amount Option amount
     * @param strike Strike price of the option
     * @param currentPrice Current price of BTC
     * @return fee Strike fee amount
     */
    function getStrikeFee(
        uint256 amount,
        uint256 strike,
        uint256 currentPrice,
        OptionType optionType
    ) internal pure returns (uint256 fee) {
        if (strike > currentPrice && optionType == OptionType.Put)
            return strike.sub(currentPrice).mul(amount).div(currentPrice);
        if (strike < currentPrice && optionType == OptionType.Call)
            return currentPrice.sub(strike).mul(amount).div(currentPrice);
        return 0;
    }

    /**
     * @notice Sends profits in WBTC from the WBTC pool to an option holder's address
     * @param optionID A specific option contract id
     */
    function payProfit(uint optionID)
        internal
        returns (uint profit)
    {
        Option memory option = options[optionID];
        (, int latestPrice, , , ) = priceProvider.latestRoundData();
        uint256 currentPrice = uint256(latestPrice);
        if (option.optionType == OptionType.Call) {
            require(option.strike <= currentPrice, "Current price is too low");
            profit = currentPrice.sub(option.strike).mul(option.amount).div(currentPrice);
        } else {
            require(option.strike >= currentPrice, "Current price is too high");
            profit = option.strike.sub(currentPrice).mul(option.amount).div(currentPrice);
        }
        if (profit > option.lockedAmount)
            profit = option.lockedAmount;
        pool.send(optionID, option.holder, profit);
    }

    /**
     * @notice Swap ETH to WBTC via Uniswap router
     * @param maxAmountIn The maximum amount of ETH that can be required before the transaction reverts.
     * @param amountOut The amount of WBTC tokens to receive.
     */
    function swapToWBTC(
        uint maxAmountIn,
        uint amountOut
    )
        internal
        returns (uint)
    {
            uint[] memory amounts = uniswapRouter.swapETHForExactTokens {
                value: maxAmountIn
            }(
                amountOut,
                ethToWbtcSwapPath,
                address(this),
                block.timestamp
            );
            return amounts[0];
    }

    /**
     * @return result Square root of the number
     */
    function sqrt(uint256 x) private pure returns (uint256 result) {
        result = x;
        uint256 k = x.div(2).add(1);
        while (k < result) (result, k) = (k, x.div(k).add(k).div(2));
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Loss","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Profit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"writeAmount","type":"uint256"}],"name":"Provide","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"writeAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"INITIAL_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_revertTransfersInLockUpPeriod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableBalance","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastProvideTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"premium","type":"uint256"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockedLiquidity","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"premium","type":"uint256"},{"internalType":"bool","name":"locked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedPremium","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockupPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minMint","type":"uint256"}],"name":"provide","outputs":[{"internalType":"uint256","name":"mint","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setLockupPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"shareOf","outputs":[{"internalType":"uint256","name":"share","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxBurn","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"burn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

6080604052621275006007553480156200001857600080fd5b506040516200264c3803806200264c833981810160405260208110156200003e57600080fd5b5051604080518082018252601381527f48656769632057425443204c5020546f6b656e000000000000000000000000006020828101919091528251808401909352600983526877726974655742544360b81b90830152906000620000a16200014d565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35081516200010090600490602085019062000151565b5080516200011690600590602084019062000151565b50506006805460ff1916601217905550600d80546001600160a01b039092166001600160a01b0319909216919091179055620001ed565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200019457805160ff1916838001178555620001c4565b82800160010185558215620001c4579182015b82811115620001c4578251825591602001919060010190620001a7565b50620001d2929150620001d6565b5090565b5b80821115620001d25760008155600101620001d7565b61244f80620001fd6000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c8063797be55e1161010f578063ad7a672f116100a2578063edd0d42111610071578063edd0d421146105ac578063ee947a7c146105d5578063f2fde38b146105dd578063fc0c546a14610603576101e5565b8063ad7a672f14610536578063c771c3901461053e578063dd62ed3e1461055b578063e8c3c54f14610589576101e5565b806395d89b41116100de57806395d89b41146104ce578063a457c2d7146104d6578063a9059cbb14610502578063ab2f0e511461052e576101e5565b8063797be55e1461044a5780637d4b11301461045257806381b34f15146104785780638da5cb5b146104aa576101e5565b806339509351116101875780636198e339116101565780636198e339146103f55780636ab28bc81461041457806370a082311461041c578063715018a614610442576101e5565b806339509351146103785780633f40406c146103a4578063441a3e70146103ca5780634dbac733146103ed576101e5565b806321e5e2c4116101c357806321e5e2c4146102c157806323b872dd146102e7578063313ce5671461031d5780633755269b1461033b576101e5565b806306fdde03146101ea578063095ea7b31461026757806318160ddd146102a7575b600080fd5b6101f261060b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561022c578181015183820152602001610214565b50505050905090810190601f1680156102595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102936004803603604081101561027d57600080fd5b506001600160a01b0381351690602001356106a1565b604080519115158252519081900360200190f35b6102af6106bf565b60408051918252519081900360200190f35b6102af600480360360208110156102d757600080fd5b50356001600160a01b03166106c5565b610293600480360360608110156102fd57600080fd5b506001600160a01b0381358116916020810135909116906040013561070e565b610325610795565b6040805160ff9092168252519081900360200190f35b6103586004803603602081101561035157600080fd5b503561079e565b604080519384526020840192909252151582820152519081900360600190f35b6102936004803603604081101561038e57600080fd5b506001600160a01b0381351690602001356107d1565b610293600480360360208110156103ba57600080fd5b50356001600160a01b031661081f565b6102af600480360360408110156103e057600080fd5b5080359060200135610834565b6102af610b1e565b6104126004803603602081101561040b57600080fd5b5035610b28565b005b6102af610c54565b6102af6004803603602081101561043257600080fd5b50356001600160a01b0316610c5a565b610412610c75565b6102af610d17565b6102af6004803603602081101561046857600080fd5b50356001600160a01b0316610d1d565b6104126004803603606081101561048e57600080fd5b508035906001600160a01b036020820135169060400135610d2f565b6104b2610ef0565b604080516001600160a01b039092168252519081900360200190f35b6101f2610eff565b610293600480360360408110156104ec57600080fd5b506001600160a01b038135169060200135610f60565b6102936004803603604081101561051857600080fd5b506001600160a01b038135169060200135610fc8565b6102af610fdc565b6102af610ff7565b6104126004803603602081101561055457600080fd5b5035611080565b6102af6004803603604081101561057157600080fd5b506001600160a01b0381358116916020013516611135565b6102af6004803603604081101561059f57600080fd5b5080359060200135611160565b610412600480360360608110156105c257600080fd5b5080359060208101359060400135611379565b6102af611576565b610412600480360360208110156105f357600080fd5b50356001600160a01b031661157c565b6104b2611674565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106975780601f1061066c57610100808354040283529160200191610697565b820191906000526020600020905b81548152906001019060200180831161067a57829003601f168201915b5050505050905090565b60006106b56106ae611683565b8484611687565b5060015b92915050565b60035490565b6000806106d06106bf565b90508015610703576106fc816106f66106e886610c5a565b6106f0610ff7565b90611773565b906117d3565b9150610708565b600091505b50919050565b600061071b848484611815565b61078b84610727611683565b610786856040518060600160405280602881526020016122ee602891396001600160a01b038a16600090815260026020526040812090610765611683565b6001600160a01b031681526020810191909152604001600020549190611972565b611687565b5060019392505050565b60065460ff1690565b600c81815481106107ab57fe5b600091825260209091206003909102018054600182015460029092015490925060ff1683565b60006106b56107de611683565b8461078685600260006107ef611683565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611a09565b600b6020526000908152604090205460ff1681565b600754336000908152600a60205260408120549091429161085491611a09565b11156108a7576040805162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a205769746864726177616c206973206c6f636b6564207570000000604482015290519081900360640190fd5b6108af610fdc565b8311156108ed5760405162461bcd60e51b815260040180806020018281038252607181526020018061227d6071913960800191505060405180910390fd5b61090f6109026108fb6106bf565b8590611773565b61090a610ff7565b611a63565b905081811115610966576040805162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a204275726e206c696d697420697320746f6f20736d616c6c000000604482015290519081900360640190fd5b61096f33610c5a565b8111156109c3576040805162461bcd60e51b815260206004820152601960248201527f506f6f6c3a20416d6f756e7420697320746f6f206c6172676500000000000000604482015290519081900360640190fd5b60008111610a14576040805162461bcd60e51b8152602060048201526019602482015278141bdbdb0e88105b5bdd5b9d081a5cc81d1bdbc81cdb585b1b603a1b604482015290519081900360640190fd5b610a1e3382611a98565b6040805184815260208101839052815133927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568928290030190a2600d546040805163a9059cbb60e01b81523360048201526024810186905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b158015610aac57600080fd5b505af1158015610ac0573d6000803e3d6000fd5b505050506040513d6020811015610ad657600080fd5b50516106b9576040805162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015290519081900360640190fd5b6509184e72a00081565b610b30611683565b6000546001600160a01b03908116911614610b80576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b6000600c8281548110610b8f57fe5b60009182526020909120600390910201600281015490915060ff16610be55760405162461bcd60e51b815260040180806020018281038252603181526020018061214b6031913960400191505060405180910390fd5b60028101805460ff191690556001810154600954610c0291611b94565b6009558054600854610c1391611b94565b6008556001810154604080519182525183917f9f78baa7a8e3640efadcbedc2d00f5930ade7a7bb66038dbf88684d49972957a919081900360200190a25050565b60085481565b6001600160a01b031660009081526001602052604090205490565b610c7d611683565b6000546001600160a01b03908116911614610ccd576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60095481565b600a6020526000908152604090205481565b610d37611683565b6000546001600160a01b03908116911614610d87576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b6000600c8481548110610d9657fe5b60009182526020909120600390910201600281015490915060ff16610dec5760405162461bcd60e51b815260040180806020018281038252603181526020018061214b6031913960400191505060405180910390fd5b6001600160a01b038316610dff57600080fd5b60028101805460ff191690556001810154600954610e1c91611b94565b6009558054600854610e2d91611b94565b60085580546000908311610e415782610e44565b81545b600d54909150610e5e906001600160a01b03168583611bd6565b81600101548111610eac57847f9f78baa7a8e3640efadcbedc2d00f5930ade7a7bb66038dbf88684d49972957a828460010154036040518082815260200191505060405180910390a2610ee9565b60018201546040805191830382525186917f86f83f021a5ecb92d6dcaec11be9da0e65b5401ce748ac3c1f0ddbae029f55ce919081900360200190a25b5050505050565b6000546001600160a01b031690565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106975780601f1061066c57610100808354040283529160200191610697565b60006106b5610f6d611683565b84610786856040518060600160405280602581526020016123f56025913960026000610f97611683565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611972565b60006106b5610fd5611683565b8484611815565b6000610ff2600854610fec610ff7565b90611b94565b905090565b600954600d54604080516370a0823160e01b81523060048201529051600093610ff29390926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561104e57600080fd5b505afa158015611062573d6000803e3d6000fd5b505050506040513d602081101561107857600080fd5b505190611b94565b611088611683565b6000546001600160a01b039081169116146110d8576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b624f1a00811115611130576040805162461bcd60e51b815260206004820152601a60248201527f4c6f636b757020706572696f6420697320746f6f206c61726765000000000000604482015290519081900360640190fd5b600755565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b336000908152600a602052604081204290558061117b6106bf565b90506000611187610ff7565b90506000821180156111995750600081115b156111b3576111ac816106f68785611773565b92506111c6565b6111c3856509184e72a000611773565b92505b8383101561121b576040805162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a204d696e74206c696d697420697320746f6f206c61726765000000604482015290519081900360640190fd5b6000831161126c576040805162461bcd60e51b8152602060048201526019602482015278141bdbdb0e88105b5bdd5b9d081a5cc81d1bdbc81cdb585b1b603a1b604482015290519081900360640190fd5b6112763384611c28565b6040805186815260208101859052815133927f4089141ea5e4c16575f5ebf65f1786497ea07c175846fc7745ef8d8986a4ff65928290030190a2600d54604080516323b872dd60e01b81523360048201523060248201526044810188905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b15801561130a57600080fd5b505af115801561131e573d6000803e3d6000fd5b505050506040513d602081101561133457600080fd5b50516113715760405162461bcd60e51b81526004018080602001828103825260508152602001806121e66050913960600191505060405180910390fd5b505092915050565b611381611683565b6000546001600160a01b039081169116146113d1576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b600c548314611412576040805162461bcd60e51b815260206004820152600860248201526715dc9bdb99c81a5960c21b604482015290519081900360640190fd5b61141f60086106f0610ff7565b611439600a6106f085600854611a0990919063ffffffff16565b111561148c576040805162461bcd60e51b815260206004820181905260248201527f506f6f6c204572726f723a20416d6f756e7420697320746f6f206c617267652e604482015290519081900360640190fd5b60408051606081018252838152602081018381526001928201838152600c8054948501815560005291517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7600390940293840155517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c8830155517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c9909101805460ff19169115159190911790556009546115469082611a09565b6009556008546115569083611a09565b600855600d54611571906001600160a01b0316333084611d1a565b505050565b60075481565b611584611683565b6000546001600160a01b039081169116146115d4576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b6001600160a01b0381166116195760405162461bcd60e51b815260040180806020018281038252602681526020018061219e6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600d546001600160a01b031681565b3390565b6001600160a01b0383166116cc5760405162461bcd60e51b81526004018080602001828103825260248152602001806123a76024913960400191505060405180910390fd5b6001600160a01b0382166117115760405162461bcd60e51b81526004018080602001828103825260228152602001806121c46022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600082611782575060006106b9565b8282028284828161178f57fe5b04146117cc5760405162461bcd60e51b815260040180806020018281038252602181526020018061225c6021913960400191505060405180910390fd5b9392505050565b60006117cc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611d7a565b6001600160a01b03831661185a5760405162461bcd60e51b81526004018080602001828103825260258152602001806123826025913960400191505060405180910390fd5b6001600160a01b03821661189f5760405162461bcd60e51b81526004018080602001828103825260238152602001806121286023913960400191505060405180910390fd5b6118aa838383611ddf565b6118e781604051806060016040528060268152602001612236602691396001600160a01b0386166000908152600160205260409020549190611972565b6001600160a01b0380851660009081526001602052604080822093909355908416815220546119169082611a09565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611a015760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119c65781810151838201526020016119ae565b50505050905090810190601f1680156119f35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156117cc576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000808211611a7157600080fd5b6000828481611a7c57fe5b049050828481611a8857fe5b06156117cc576001019392505050565b6001600160a01b038216611add5760405162461bcd60e51b81526004018080602001828103825260218152602001806123366021913960400191505060405180910390fd5b611ae982600083611ddf565b611b268160405180606001604052806022815260200161217c602291396001600160a01b0385166000908152600160205260409020549190611972565b6001600160a01b038316600090815260016020526040902055600354611b4c9082611b94565b6003556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60006117cc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611972565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611571908490611eb9565b6001600160a01b038216611c83576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611c8f60008383611ddf565b600354611c9c9082611a09565b6003556001600160a01b038216600090815260016020526040902054611cc29082611a09565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611d74908590611eb9565b50505050565b60008183611dc95760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156119c65781810151838201526020016119ae565b506000838581611dd557fe5b0495945050505050565b6007546001600160a01b0384166000908152600a60205260409020544291611e079190611a09565b118015611e3457506001600160a01b038083166000908152600a6020526040808220549286168252902054115b15611571576001600160a01b0382166000908152600b602052604090205460ff1615611e915760405162461bcd60e51b815260040180806020018281038252602b815260200180612357602b913960400191505060405180910390fd5b6001600160a01b038084166000908152600a6020526040808220549285168252902055505050565b6060611f0e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611f6a9092919063ffffffff16565b80519091501561157157808060200190516020811015611f2d57600080fd5b50516115715760405162461bcd60e51b815260040180806020018281038252602a8152602001806123cb602a913960400191505060405180910390fd5b6060611f798484600085611f81565b949350505050565b6060611f8c856120ee565b611fdd576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061201c5780518252601f199092019160209182019101611ffd565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461207e576040519150601f19603f3d011682016040523d82523d6000602084013e612083565b606091505b50915091508115612097579150611f799050565b8051156120a75780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156119c65781810151838201526020016119ae565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611f7957505015159291505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734c6f636b65644c6971756964697479207769746820737563682069642068617320616c726561647920756e6c6f636b656445524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373546f6b656e207472616e73666572206572726f723a20506c65617365206c6f7765722074686520616d6f756e74206f66207072656d69756d73207468617420796f752077616e7420746f2073656e642e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c204572726f723a20596f752061726520747279696e6720746f20756e6c6f636b206d6f72652066756e6473207468616e2068617665206265656e206c6f636b656420666f7220796f757220636f6e74726163742e20506c65617365206c6f7765722074686520616d6f756e742e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737374686520726563697069656e7420646f6573206e6f742061636365707420626c6f636b65642066756e647345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220799aac04beef961c34d546411febb0cd155f7d0eb936d6ce7a8329bd552f6dbc64736f6c634300060c00330000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101e55760003560e01c8063797be55e1161010f578063ad7a672f116100a2578063edd0d42111610071578063edd0d421146105ac578063ee947a7c146105d5578063f2fde38b146105dd578063fc0c546a14610603576101e5565b8063ad7a672f14610536578063c771c3901461053e578063dd62ed3e1461055b578063e8c3c54f14610589576101e5565b806395d89b41116100de57806395d89b41146104ce578063a457c2d7146104d6578063a9059cbb14610502578063ab2f0e511461052e576101e5565b8063797be55e1461044a5780637d4b11301461045257806381b34f15146104785780638da5cb5b146104aa576101e5565b806339509351116101875780636198e339116101565780636198e339146103f55780636ab28bc81461041457806370a082311461041c578063715018a614610442576101e5565b806339509351146103785780633f40406c146103a4578063441a3e70146103ca5780634dbac733146103ed576101e5565b806321e5e2c4116101c357806321e5e2c4146102c157806323b872dd146102e7578063313ce5671461031d5780633755269b1461033b576101e5565b806306fdde03146101ea578063095ea7b31461026757806318160ddd146102a7575b600080fd5b6101f261060b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561022c578181015183820152602001610214565b50505050905090810190601f1680156102595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102936004803603604081101561027d57600080fd5b506001600160a01b0381351690602001356106a1565b604080519115158252519081900360200190f35b6102af6106bf565b60408051918252519081900360200190f35b6102af600480360360208110156102d757600080fd5b50356001600160a01b03166106c5565b610293600480360360608110156102fd57600080fd5b506001600160a01b0381358116916020810135909116906040013561070e565b610325610795565b6040805160ff9092168252519081900360200190f35b6103586004803603602081101561035157600080fd5b503561079e565b604080519384526020840192909252151582820152519081900360600190f35b6102936004803603604081101561038e57600080fd5b506001600160a01b0381351690602001356107d1565b610293600480360360208110156103ba57600080fd5b50356001600160a01b031661081f565b6102af600480360360408110156103e057600080fd5b5080359060200135610834565b6102af610b1e565b6104126004803603602081101561040b57600080fd5b5035610b28565b005b6102af610c54565b6102af6004803603602081101561043257600080fd5b50356001600160a01b0316610c5a565b610412610c75565b6102af610d17565b6102af6004803603602081101561046857600080fd5b50356001600160a01b0316610d1d565b6104126004803603606081101561048e57600080fd5b508035906001600160a01b036020820135169060400135610d2f565b6104b2610ef0565b604080516001600160a01b039092168252519081900360200190f35b6101f2610eff565b610293600480360360408110156104ec57600080fd5b506001600160a01b038135169060200135610f60565b6102936004803603604081101561051857600080fd5b506001600160a01b038135169060200135610fc8565b6102af610fdc565b6102af610ff7565b6104126004803603602081101561055457600080fd5b5035611080565b6102af6004803603604081101561057157600080fd5b506001600160a01b0381358116916020013516611135565b6102af6004803603604081101561059f57600080fd5b5080359060200135611160565b610412600480360360608110156105c257600080fd5b5080359060208101359060400135611379565b6102af611576565b610412600480360360208110156105f357600080fd5b50356001600160a01b031661157c565b6104b2611674565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106975780601f1061066c57610100808354040283529160200191610697565b820191906000526020600020905b81548152906001019060200180831161067a57829003601f168201915b5050505050905090565b60006106b56106ae611683565b8484611687565b5060015b92915050565b60035490565b6000806106d06106bf565b90508015610703576106fc816106f66106e886610c5a565b6106f0610ff7565b90611773565b906117d3565b9150610708565b600091505b50919050565b600061071b848484611815565b61078b84610727611683565b610786856040518060600160405280602881526020016122ee602891396001600160a01b038a16600090815260026020526040812090610765611683565b6001600160a01b031681526020810191909152604001600020549190611972565b611687565b5060019392505050565b60065460ff1690565b600c81815481106107ab57fe5b600091825260209091206003909102018054600182015460029092015490925060ff1683565b60006106b56107de611683565b8461078685600260006107ef611683565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611a09565b600b6020526000908152604090205460ff1681565b600754336000908152600a60205260408120549091429161085491611a09565b11156108a7576040805162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a205769746864726177616c206973206c6f636b6564207570000000604482015290519081900360640190fd5b6108af610fdc565b8311156108ed5760405162461bcd60e51b815260040180806020018281038252607181526020018061227d6071913960800191505060405180910390fd5b61090f6109026108fb6106bf565b8590611773565b61090a610ff7565b611a63565b905081811115610966576040805162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a204275726e206c696d697420697320746f6f20736d616c6c000000604482015290519081900360640190fd5b61096f33610c5a565b8111156109c3576040805162461bcd60e51b815260206004820152601960248201527f506f6f6c3a20416d6f756e7420697320746f6f206c6172676500000000000000604482015290519081900360640190fd5b60008111610a14576040805162461bcd60e51b8152602060048201526019602482015278141bdbdb0e88105b5bdd5b9d081a5cc81d1bdbc81cdb585b1b603a1b604482015290519081900360640190fd5b610a1e3382611a98565b6040805184815260208101839052815133927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568928290030190a2600d546040805163a9059cbb60e01b81523360048201526024810186905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b158015610aac57600080fd5b505af1158015610ac0573d6000803e3d6000fd5b505050506040513d6020811015610ad657600080fd5b50516106b9576040805162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015290519081900360640190fd5b6509184e72a00081565b610b30611683565b6000546001600160a01b03908116911614610b80576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b6000600c8281548110610b8f57fe5b60009182526020909120600390910201600281015490915060ff16610be55760405162461bcd60e51b815260040180806020018281038252603181526020018061214b6031913960400191505060405180910390fd5b60028101805460ff191690556001810154600954610c0291611b94565b6009558054600854610c1391611b94565b6008556001810154604080519182525183917f9f78baa7a8e3640efadcbedc2d00f5930ade7a7bb66038dbf88684d49972957a919081900360200190a25050565b60085481565b6001600160a01b031660009081526001602052604090205490565b610c7d611683565b6000546001600160a01b03908116911614610ccd576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60095481565b600a6020526000908152604090205481565b610d37611683565b6000546001600160a01b03908116911614610d87576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b6000600c8481548110610d9657fe5b60009182526020909120600390910201600281015490915060ff16610dec5760405162461bcd60e51b815260040180806020018281038252603181526020018061214b6031913960400191505060405180910390fd5b6001600160a01b038316610dff57600080fd5b60028101805460ff191690556001810154600954610e1c91611b94565b6009558054600854610e2d91611b94565b60085580546000908311610e415782610e44565b81545b600d54909150610e5e906001600160a01b03168583611bd6565b81600101548111610eac57847f9f78baa7a8e3640efadcbedc2d00f5930ade7a7bb66038dbf88684d49972957a828460010154036040518082815260200191505060405180910390a2610ee9565b60018201546040805191830382525186917f86f83f021a5ecb92d6dcaec11be9da0e65b5401ce748ac3c1f0ddbae029f55ce919081900360200190a25b5050505050565b6000546001600160a01b031690565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106975780601f1061066c57610100808354040283529160200191610697565b60006106b5610f6d611683565b84610786856040518060600160405280602581526020016123f56025913960026000610f97611683565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611972565b60006106b5610fd5611683565b8484611815565b6000610ff2600854610fec610ff7565b90611b94565b905090565b600954600d54604080516370a0823160e01b81523060048201529051600093610ff29390926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561104e57600080fd5b505afa158015611062573d6000803e3d6000fd5b505050506040513d602081101561107857600080fd5b505190611b94565b611088611683565b6000546001600160a01b039081169116146110d8576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b624f1a00811115611130576040805162461bcd60e51b815260206004820152601a60248201527f4c6f636b757020706572696f6420697320746f6f206c61726765000000000000604482015290519081900360640190fd5b600755565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b336000908152600a602052604081204290558061117b6106bf565b90506000611187610ff7565b90506000821180156111995750600081115b156111b3576111ac816106f68785611773565b92506111c6565b6111c3856509184e72a000611773565b92505b8383101561121b576040805162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a204d696e74206c696d697420697320746f6f206c61726765000000604482015290519081900360640190fd5b6000831161126c576040805162461bcd60e51b8152602060048201526019602482015278141bdbdb0e88105b5bdd5b9d081a5cc81d1bdbc81cdb585b1b603a1b604482015290519081900360640190fd5b6112763384611c28565b6040805186815260208101859052815133927f4089141ea5e4c16575f5ebf65f1786497ea07c175846fc7745ef8d8986a4ff65928290030190a2600d54604080516323b872dd60e01b81523360048201523060248201526044810188905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b15801561130a57600080fd5b505af115801561131e573d6000803e3d6000fd5b505050506040513d602081101561133457600080fd5b50516113715760405162461bcd60e51b81526004018080602001828103825260508152602001806121e66050913960600191505060405180910390fd5b505092915050565b611381611683565b6000546001600160a01b039081169116146113d1576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b600c548314611412576040805162461bcd60e51b815260206004820152600860248201526715dc9bdb99c81a5960c21b604482015290519081900360640190fd5b61141f60086106f0610ff7565b611439600a6106f085600854611a0990919063ffffffff16565b111561148c576040805162461bcd60e51b815260206004820181905260248201527f506f6f6c204572726f723a20416d6f756e7420697320746f6f206c617267652e604482015290519081900360640190fd5b60408051606081018252838152602081018381526001928201838152600c8054948501815560005291517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7600390940293840155517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c8830155517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c9909101805460ff19169115159190911790556009546115469082611a09565b6009556008546115569083611a09565b600855600d54611571906001600160a01b0316333084611d1a565b505050565b60075481565b611584611683565b6000546001600160a01b039081169116146115d4576040805162461bcd60e51b81526020600482018190526024820152600080516020612316833981519152604482015290519081900360640190fd5b6001600160a01b0381166116195760405162461bcd60e51b815260040180806020018281038252602681526020018061219e6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600d546001600160a01b031681565b3390565b6001600160a01b0383166116cc5760405162461bcd60e51b81526004018080602001828103825260248152602001806123a76024913960400191505060405180910390fd5b6001600160a01b0382166117115760405162461bcd60e51b81526004018080602001828103825260228152602001806121c46022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600082611782575060006106b9565b8282028284828161178f57fe5b04146117cc5760405162461bcd60e51b815260040180806020018281038252602181526020018061225c6021913960400191505060405180910390fd5b9392505050565b60006117cc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611d7a565b6001600160a01b03831661185a5760405162461bcd60e51b81526004018080602001828103825260258152602001806123826025913960400191505060405180910390fd5b6001600160a01b03821661189f5760405162461bcd60e51b81526004018080602001828103825260238152602001806121286023913960400191505060405180910390fd5b6118aa838383611ddf565b6118e781604051806060016040528060268152602001612236602691396001600160a01b0386166000908152600160205260409020549190611972565b6001600160a01b0380851660009081526001602052604080822093909355908416815220546119169082611a09565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611a015760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119c65781810151838201526020016119ae565b50505050905090810190601f1680156119f35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156117cc576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000808211611a7157600080fd5b6000828481611a7c57fe5b049050828481611a8857fe5b06156117cc576001019392505050565b6001600160a01b038216611add5760405162461bcd60e51b81526004018080602001828103825260218152602001806123366021913960400191505060405180910390fd5b611ae982600083611ddf565b611b268160405180606001604052806022815260200161217c602291396001600160a01b0385166000908152600160205260409020549190611972565b6001600160a01b038316600090815260016020526040902055600354611b4c9082611b94565b6003556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60006117cc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611972565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611571908490611eb9565b6001600160a01b038216611c83576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611c8f60008383611ddf565b600354611c9c9082611a09565b6003556001600160a01b038216600090815260016020526040902054611cc29082611a09565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611d74908590611eb9565b50505050565b60008183611dc95760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156119c65781810151838201526020016119ae565b506000838581611dd557fe5b0495945050505050565b6007546001600160a01b0384166000908152600a60205260409020544291611e079190611a09565b118015611e3457506001600160a01b038083166000908152600a6020526040808220549286168252902054115b15611571576001600160a01b0382166000908152600b602052604090205460ff1615611e915760405162461bcd60e51b815260040180806020018281038252602b815260200180612357602b913960400191505060405180910390fd5b6001600160a01b038084166000908152600a6020526040808220549285168252902055505050565b6060611f0e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611f6a9092919063ffffffff16565b80519091501561157157808060200190516020811015611f2d57600080fd5b50516115715760405162461bcd60e51b815260040180806020018281038252602a8152602001806123cb602a913960400191505060405180910390fd5b6060611f798484600085611f81565b949350505050565b6060611f8c856120ee565b611fdd576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061201c5780518252601f199092019160209182019101611ffd565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461207e576040519150601f19603f3d011682016040523d82523d6000602084013e612083565b606091505b50915091508115612097579150611f799050565b8051156120a75780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156119c65781810151838201526020016119ae565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611f7957505015159291505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734c6f636b65644c6971756964697479207769746820737563682069642068617320616c726561647920756e6c6f636b656445524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373546f6b656e207472616e73666572206572726f723a20506c65617365206c6f7765722074686520616d6f756e74206f66207072656d69756d73207468617420796f752077616e7420746f2073656e642e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c204572726f723a20596f752061726520747279696e6720746f20756e6c6f636b206d6f72652066756e6473207468616e2068617665206265656e206c6f636b656420666f7220796f757220636f6e74726163742e20506c65617365206c6f7765722074686520616d6f756e742e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737374686520726563697069656e7420646f6573206e6f742061636365707420626c6f636b65642066756e647345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220799aac04beef961c34d546411febb0cd155f7d0eb936d6ce7a8329bd552f6dbc64736f6c634300060c0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599

-----Decoded View---------------
Arg [0] : _token (address): 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599


Deployed Bytecode Sourcemap

42066:7484:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17638:83;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19744:169;;;;;;;;;;;;;;;;-1:-1:-1;19744:169:0;;-1:-1:-1;;;;;19744:169:0;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;18713:100;;;:::i;:::-;;;;;;;;;;;;;;;;48053:248;;;;;;;;;;;;;;;;-1:-1:-1;48053:248:0;-1:-1:-1;;;;;48053:248:0;;:::i;20387:321::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;20387:321:0;;;;;;;;;;;;;;;;;:::i;18565:83::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;42544:40;;;;;;;;;;;;;;;;-1:-1:-1;42544:40:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21117:218;;;;;;;;;;;;;;;;-1:-1:-1;21117:218:0;;-1:-1:-1;;;;;21117:218:0;;;;;;:::i;42475:62::-;;;;;;;;;;;;;;;;-1:-1:-1;42475:62:0;-1:-1:-1;;;;;42475:62:0;;:::i;47008:889::-;;;;;;;;;;;;;;;;-1:-1:-1;47008:889:0;;;;;;;:::i;42250:43::-;;;:::i;43902:384::-;;;;;;;;;;;;;;;;-1:-1:-1;43902:384:0;;:::i;:::-;;42344:27;;;:::i;18876:119::-;;;;;;;;;;;;;;;;-1:-1:-1;18876:119:0;-1:-1:-1;;;;;18876:119:0;;:::i;31918:148::-;;;:::i;42378:28::-;;;:::i;42413:55::-;;;;;;;;;;;;;;;;-1:-1:-1;42413:55:0;-1:-1:-1;;;;;42413:55:0;;:::i;44693:741::-;;;;;;;;;;;;;;;;-1:-1:-1;44693:741:0;;;;;;;-1:-1:-1;;;;;44693:741:0;;;;;;:::i;31276:79::-;;;:::i;:::-;;;;-1:-1:-1;;;;;31276:79:0;;;;;;;;;;;;;;17840:87;;;:::i;21838:269::-;;;;;;;;;;;;;;;;-1:-1:-1;21838:269:0;;-1:-1:-1;;;;;21838:269:0;;;;;;:::i;19208:175::-;;;;;;;;;;;;;;;;-1:-1:-1;19208:175:0;;-1:-1:-1;;;;;19208:175:0;;;;;;:::i;48434:124::-;;;:::i;48687:146::-;;;:::i;42864:173::-;;;;;;;;;;;;;;;;-1:-1:-1;42864:173:0;;:::i;19446:151::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;19446:151:0;;;;;;;;;;:::i;45958:788::-;;;;;;;;;;;;;;;;-1:-1:-1;45958:788:0;;;;;;;:::i;43189:549::-;;;;;;;;;;;;;;;;-1:-1:-1;43189:549:0;;;;;;;;;;;;:::i;42300:37::-;;;:::i;32221:244::-;;;;;;;;;;;;;;;;-1:-1:-1;32221:244:0;-1:-1:-1;;;;;32221:244:0;;:::i;42591:28::-;;;:::i;17638:83::-;17708:5;17701:12;;;;;;;;;;;;;-1:-1:-1;;17701:12:0;;;;;;;;;;;;;;;;;;;;;;;;;;17675:13;;17701:12;;17708:5;;17701:12;;;17708:5;17701:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17638:83;:::o;19744:169::-;19827:4;19844:39;19853:12;:10;:12::i;:::-;19867:7;19876:6;19844:8;:39::i;:::-;-1:-1:-1;19901:4:0;19744:169;;;;;:::o;18713:100::-;18793:12;;18713:100;:::o;48053:248::-;48107:13;48133:11;48147:13;:11;:13::i;:::-;48133:27;-1:-1:-1;48175:10:0;;48171:122;;48208:47;48248:6;48208:35;48227:15;48237:4;48227:9;:15::i;:::-;48208:14;:12;:14::i;:::-;:18;;:35::i;:::-;:39;;:47::i;:::-;48200:55;;48171:122;;;48292:1;48284:9;;48171:122;48053:248;;;;:::o;20387:321::-;20493:4;20510:36;20520:6;20528:9;20539:6;20510:9;:36::i;:::-;20557:121;20566:6;20574:12;:10;:12::i;:::-;20588:89;20626:6;20588:89;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20588:19:0;;;;;;:11;:19;;;;;;20608:12;:10;:12::i;:::-;-1:-1:-1;;;;;20588:33:0;;;;;;;;;;;;-1:-1:-1;20588:33:0;;;;:37;:89::i;:::-;20557:8;:121::i;:::-;-1:-1:-1;20696:4:0;20387:321;;;;;:::o;18565:83::-;18631:9;;;;18565:83;:::o;42544:40::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;42544:40:0;;;:::o;21117:218::-;21205:4;21222:83;21231:12;:10;:12::i;:::-;21245:7;21254:50;21293:10;21254:11;:25;21266:12;:10;:12::i;:::-;-1:-1:-1;;;;;21254:25:0;;;;;;;;;;;;;;;;;-1:-1:-1;21254:25:0;;;:34;;;;;;;;;;;:38;:50::i;42475:62::-;;;;;;;;;;;;;;;:::o;47008:889::-;47161:12;;47145:10;47077:12;47124:32;;;:20;:32;;;;;;47077:12;;47178:15;;47124:50;;:36;:50::i;:::-;:69;;47102:148;;;;;-1:-1:-1;;;47102:148:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;47293:18;:16;:18::i;:::-;47283:6;:28;;47261:191;;;;-1:-1:-1;;;47261:191:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47472:50;47480:25;47491:13;:11;:13::i;:::-;47480:6;;:10;:25::i;:::-;47507:14;:12;:14::i;:::-;47472:7;:50::i;:::-;47465:57;;47551:7;47543:4;:15;;47535:57;;;;;-1:-1:-1;;;47535:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;47619:21;47629:10;47619:9;:21::i;:::-;47611:4;:29;;47603:67;;;;;-1:-1:-1;;;47603:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;47696:1;47689:4;:8;47681:46;;;;;-1:-1:-1;;;47681:46:0;;;;;;;;;;;;-1:-1:-1;;;47681:46:0;;;;;;;;;;;;;;;47740:23;47746:10;47758:4;47740:5;:23::i;:::-;47779:34;;;;;;;;;;;;;;47788:10;;47779:34;;;;;;;;47832:5;;:34;;;-1:-1:-1;;;47832:34:0;;47847:10;47832:34;;;;;;;;;;;;-1:-1:-1;;;;;47832:5:0;;;;-1:-1:-1;;47832:34:0;;;;;;;;;;;;;;;-1:-1:-1;47832:5:0;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;47832:34:0;47824:65;;;;;-1:-1:-1;;;47824:65:0;;;;;;;;;;;;-1:-1:-1;;;47824:65:0;;;;;;;;;;;;;;42250:43;42289:4;42250:43;:::o;43902:384::-;31498:12;:10;:12::i;:::-;31488:6;;-1:-1:-1;;;;;31488:22:0;;;:6;;:22;31480:67;;;;;-1:-1:-1;;;31480:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;31480:67:0;;;;;;;;;;;;;;;43969:26:::1;43998:15;44014:2;43998:19;;;;;;;;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;44036:9;::::0;::::1;::::0;43998:19;;-1:-1:-1;44036:9:0::1;;44028:71;;;;-1:-1:-1::0;;;44028:71:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;44110:9;::::0;::::1;:17:::0;;-1:-1:-1;;44110:17:0::1;::::0;;-1:-1:-1;44174:10:0;::::1;::::0;44156:13:::1;::::0;:29:::1;::::0;:17:::1;:29::i;:::-;44140:13;:45:::0;44228:9;;44211:12:::1;::::0;:27:::1;::::0;:16:::1;:27::i;:::-;44196:12;:42:::0;44267:10:::1;::::0;::::1;::::0;44256:22:::1;::::0;;;;;;44263:2;;44256:22:::1;::::0;;;;;::::1;::::0;;::::1;31558:1;43902:384:::0;:::o;42344:27::-;;;;:::o;18876:119::-;-1:-1:-1;;;;;18969:18:0;18942:7;18969:18;;;-1:-1:-1;18969:18:0;;;;;;;18876:119::o;31918:148::-;31498:12;:10;:12::i;:::-;31488:6;;-1:-1:-1;;;;;31488:22:0;;;:6;;:22;31480:67;;;;;-1:-1:-1;;;31480:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;31480:67:0;;;;;;;;;;;;;;;32025:1:::1;32009:6:::0;;31988:40:::1;::::0;-1:-1:-1;;;;;32009:6:0;;::::1;::::0;31988:40:::1;::::0;32025:1;;31988:40:::1;32056:1;32039:19:::0;;-1:-1:-1;;;;;;32039:19:0::1;::::0;;31918:148::o;42378:28::-;;;;:::o;42413:55::-;;;;;;;;;;;;;:::o;44693:741::-;31498:12;:10;:12::i;:::-;31488:6;;-1:-1:-1;;;;;31488:22:0;;;:6;;:22;31480:67;;;;;-1:-1:-1;;;31480:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;31480:67:0;;;;;;;;;;;;;;;44823:26:::1;44852:15;44868:2;44852:19;;;;;;;;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;44890:9;::::0;::::1;::::0;44852:19;;-1:-1:-1;44890:9:0::1;;44882:71;;;;-1:-1:-1::0;;;44882:71:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;44972:16:0;::::1;44964:25;;;::::0;::::1;;45002:9;::::0;::::1;:17:::0;;-1:-1:-1;;45002:17:0::1;::::0;;-1:-1:-1;45064:10:0;::::1;::::0;45046:13:::1;::::0;:29:::1;::::0;:17:::1;:29::i;:::-;45030:13;:45:::0;45118:9;;45101:12:::1;::::0;:27:::1;::::0;:16:::1;:27::i;:::-;45086:12;:42:::0;45172:9;;45141:19:::1;::::0;45163:18;::::1;:39;;45196:6;45163:39;;;45184:9:::0;;45163:39:::1;45213:5;::::0;45141:61;;-1:-1:-1;45213:38:0::1;::::0;-1:-1:-1;;;;;45213:5:0::1;45232:2:::0;45141:61;45213:18:::1;:38::i;:::-;45286:2;:10;;;45268:14;:28;45264:162;;45323:2;45316:39;45340:14;45327:2;:10;;;:27;45316:39;;;;;;;;;;;;;;;;;;45264:162;;;45415:10;::::0;::::1;::::0;45389:37:::1;::::0;;45398:27;;::::1;45389:37:::0;;;45394:2;;45389:37:::1;::::0;;;;;::::1;::::0;;::::1;45264:162;31558:1;;44693:741:::0;;;:::o;31276:79::-;31314:7;31341:6;-1:-1:-1;;;;;31341:6:0;;31276:79::o;17840:87::-;17912:7;17905:14;;;;;;;;;;;;;-1:-1:-1;;17905:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;17879:13;;17905:14;;17912:7;;17905:14;;;17912:7;17905:14;;;;;;;;;;;;;;;;;;;;;;;;21838:269;21931:4;21948:129;21957:12;:10;:12::i;:::-;21971:7;21980:96;22019:15;21980:96;;;;;;;;;;;;;;;;;:11;:25;21992:12;:10;:12::i;:::-;-1:-1:-1;;;;;21980:25:0;;;;;;;;;;;;;;;;;-1:-1:-1;21980:25:0;;;:34;;;;;;;;;;;;:38;:96::i;19208:175::-;19294:4;19311:42;19321:12;:10;:12::i;:::-;19335:9;19346:6;19311:9;:42::i;48434:124::-;48483:15;48518:32;48537:12;;48518:14;:12;:14::i;:::-;:18;;:32::i;:::-;48511:39;;48434:124;:::o;48687:146::-;48811:13;;48776:5;;:30;;;-1:-1:-1;;;48776:30:0;;48800:4;48776:30;;;;;;-1:-1:-1;;48776:49:0;;48811:13;;-1:-1:-1;;;;;48776:5:0;;;;-1:-1:-1;;48776:30:0;;;;;;;;;;;;;;;:5;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;48776:30:0;;:34;:49::i;42864:173::-;31498:12;:10;:12::i;:::-;31488:6;;-1:-1:-1;;;;;31488:22:0;;;:6;;:22;31480:67;;;;;-1:-1:-1;;;31480:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;31480:67:0;;;;;;;;;;;;;;;42960:7:::1;42951:5;:16;;42943:55;;;::::0;;-1:-1:-1;;;42943:55:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;43009:12;:20:::0;42864:173::o;19446:151::-;-1:-1:-1;;;;;19562:18:0;;;19535:7;19562:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;19446:151::o;45958:788::-;46072:10;46026:12;46051:32;;;:20;:32;;;;;46086:15;46051:50;;46026:12;46126:13;:11;:13::i;:::-;46112:27;;46150:12;46165:14;:12;:14::i;:::-;46150:29;;46203:1;46194:6;:10;:25;;;;;46218:1;46208:7;:11;46194:25;46190:142;;;46241:31;46264:7;46241:18;:6;46252;46241:10;:18::i;:31::-;46234:38;;46190:142;;;46308:24;:6;42289:4;46308:10;:24::i;:::-;46301:31;;46190:142;46361:7;46353:4;:15;;46345:57;;;;;-1:-1:-1;;;46345:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;46428:1;46421:4;:8;46413:46;;;;;-1:-1:-1;;;46413:46:0;;;;;;;;;;;;-1:-1:-1;;;46413:46:0;;;;;;;;;;;;;;;46470:23;46476:10;46488:4;46470:5;:23::i;:::-;46509:33;;;;;;;;;;;;;;46517:10;;46509:33;;;;;;;;46577:5;;:53;;;-1:-1:-1;;;46577:53:0;;46596:10;46577:53;;;;46616:4;46577:53;;;;;;;;;;;;-1:-1:-1;;;;;46577:5:0;;;;-1:-1:-1;;46577:53:0;;;;;;;;;;;;;;;-1:-1:-1;46577:5:0;:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;46577:53:0;46555:183;;;;-1:-1:-1;;;46555:183:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45958:788;;;;;;:::o;43189:549::-;31498:12;:10;:12::i;:::-;31488:6;;-1:-1:-1;;;;;31488:22:0;;;:6;;:22;31480:67;;;;;-1:-1:-1;;;31480:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;31480:67:0;;;;;;;;;;;;;;;43298:15:::1;:22:::0;43292:28;::::1;43284:49;;;::::0;;-1:-1:-1;;;43284:49:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;43284:49:0;;;;;;;;;;;;;::::1;;43404:21;43423:1;43404:14;:12;:14::i;:21::-;43368:32;43397:2;43368:24;43385:6;43368:12;;:16;;:24;;;;:::i;:32::-;:57;;43346:139;;;::::0;;-1:-1:-1;;;43346:139:0;;::::1;;::::0;::::1;::::0;;;;;;;::::1;::::0;;;;;;;;;;;;;::::1;;43519:38;::::0;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;43552:4:::1;43519:38:::0;;;;;;43498:15:::1;:60:::0;;;;::::1;::::0;;-1:-1:-1;43498:60:0;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;;;;;;;;-1:-1:-1;;43498:60:0::1;::::0;::::1;;::::0;;;::::1;::::0;;43585:13:::1;::::0;:26:::1;::::0;43519:38;43585:17:::1;:26::i;:::-;43569:13;:42:::0;43637:12:::1;::::0;:24:::1;::::0;43654:6;43637:16:::1;:24::i;:::-;43622:12;:39:::0;43672:5:::1;::::0;:58:::1;::::0;-1:-1:-1;;;;;43672:5:0::1;43695:10;43715:4;43722:7:::0;43672:22:::1;:58::i;:::-;43189:549:::0;;;:::o;42300:37::-;;;;:::o;32221:244::-;31498:12;:10;:12::i;:::-;31488:6;;-1:-1:-1;;;;;31488:22:0;;;:6;;:22;31480:67;;;;;-1:-1:-1;;;31480:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;31480:67:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;32310:22:0;::::1;32302:73;;;;-1:-1:-1::0;;;32302:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32412:6;::::0;;32391:38:::1;::::0;-1:-1:-1;;;;;32391:38:0;;::::1;::::0;32412:6;::::1;::::0;32391:38:::1;::::0;::::1;32440:6;:17:::0;;-1:-1:-1;;;;;;32440:17:0::1;-1:-1:-1::0;;;;;32440:17:0;;;::::1;::::0;;;::::1;::::0;;32221:244::o;42591:28::-;;;-1:-1:-1;;;;;42591:28:0;;:::o;670:106::-;758:10;670:106;:::o;24985:346::-;-1:-1:-1;;;;;25087:19:0;;25079:68;;;;-1:-1:-1;;;25079:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;25166:21:0;;25158:68;;;;-1:-1:-1;;;25158:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;25239:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;25291:32;;;;;;;;;;;;;;;;;24985:346;;;:::o;6102:471::-;6160:7;6405:6;6401:47;;-1:-1:-1;6435:1:0;6428:8;;6401:47;6472:5;;;6476:1;6472;:5;:1;6496:5;;;;;:10;6488:56;;;;-1:-1:-1;;;6488:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6564:1;6102:471;-1:-1:-1;;;6102:471:0:o;7049:132::-;7107:7;7134:39;7138:1;7141;7134:39;;;;;;;;;;;;;;;;;:3;:39::i;22597:539::-;-1:-1:-1;;;;;22703:20:0;;22695:70;;;;-1:-1:-1;;;22695:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22784:23:0;;22776:71;;;;-1:-1:-1;;;22776:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22860:47;22881:6;22889:9;22900:6;22860:20;:47::i;:::-;22940:71;22962:6;22940:71;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22940:17:0;;;;;;-1:-1:-1;22940:17:0;;;;;;;;:21;:71::i;:::-;-1:-1:-1;;;;;22920:17:0;;;;;;;-1:-1:-1;22920:17:0;;;;;;:91;;;;23045:20;;;;;;;:32;;23070:6;23045:24;:32::i;:::-;-1:-1:-1;;;;;23022:20:0;;;;;;;-1:-1:-1;23022:20:0;;;;;;;;;:55;;;;23093:35;;;;;;;23022:20;;23093:35;;;;;;;;;;;;;22597:539;;;:::o;5651:192::-;5737:7;5773:12;5765:6;;;;5757:29;;;;-1:-1:-1;;;5757:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5809:5:0;;;5651:192::o;4748:181::-;4806:7;4838:5;;;4862:6;;;;4854:46;;;;;-1:-1:-1;;;4854:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;49347:200;49409:7;49441:1;49437;:5;49429:14;;;;;;49454:9;49470:1;49466;:5;;;;;;49454:17;;49490:1;49486;:5;;;;;;:10;49482:38;;49519:1;49515:5;;49347:200;-1:-1:-1;;;49347:200:0:o;24127:418::-;-1:-1:-1;;;;;24211:21:0;;24203:67;;;;-1:-1:-1;;;24203:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24283:49;24304:7;24321:1;24325:6;24283:20;:49::i;:::-;24366:68;24389:6;24366:68;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24366:18:0;;;;;;-1:-1:-1;24366:18:0;;;;;;;;:22;:68::i;:::-;-1:-1:-1;;;;;24345:18:0;;;;;;-1:-1:-1;24345:18:0;;;;;:89;24460:12;;:24;;24477:6;24460:16;:24::i;:::-;24445:12;:39;24500:37;;;;;;;;24526:1;;-1:-1:-1;;;;;24500:37:0;;;;;;;;;;;;24127:418;;:::o;5212:136::-;5270:7;5297:43;5301:1;5304;5297:43;;;;;;;;;;;;;;;;;:3;:43::i;27111:177::-;27221:58;;;-1:-1:-1;;;;;27221:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;27221:58:0;-1:-1:-1;;;27221:58:0;;;27194:86;;27214:5;;27194:19;:86::i;23417:378::-;-1:-1:-1;;;;;23501:21:0;;23493:65;;;;;-1:-1:-1;;;23493:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;23571:49;23600:1;23604:7;23613:6;23571:20;:49::i;:::-;23648:12;;:24;;23665:6;23648:16;:24::i;:::-;23633:12;:39;-1:-1:-1;;;;;23704:18:0;;;;;;-1:-1:-1;23704:18:0;;;;;;:30;;23727:6;23704:22;:30::i;:::-;-1:-1:-1;;;;;23683:18:0;;;;;;-1:-1:-1;23683:18:0;;;;;;;;:51;;;;23750:37;;;;;;;23683:18;;;;23750:37;;;;;;;;;;23417:378;;:::o;27296:205::-;27424:68;;;-1:-1:-1;;;;;27424:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;27424:68:0;-1:-1:-1;;;27424:68:0;;;27397:96;;27417:5;;27397:19;:96::i;:::-;27296:205;;;;:::o;7677:278::-;7763:7;7798:12;7791:5;7783:28;;;;-1:-1:-1;;;7783:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7783:28:0;;;;;;;;;;;;;;;;;;7822:9;7838:1;7834;:5;;;;;;;7677:278;-1:-1:-1;;;;;7677:278:0:o;48841:498::-;48984:12;;-1:-1:-1;;;;;48953:26:0;;;;;;:20;:26;;;;;;49000:15;;48953:44;;:26;:30;:44::i;:::-;:62;:132;;;;-1:-1:-1;;;;;;49061:24:0;;;;;;;:20;:24;;;;;;;49032:26;;;;;;;;:53;48953:132;48935:397;;;-1:-1:-1;;;;;49139:34:0;;;;;;:30;:34;;;;;;;;49138:35;49112:140;;;;-1:-1:-1;;;49112:140:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;49294:26:0;;;;;;;:20;:26;;;;;;;49267:24;;;;;;;;;;:53;48841:498::o;29416:761::-;29866:69;;;;;;;;;;;;;;;;;;29840:23;;29866:69;;-1:-1:-1;;;;;29866:27:0;;;29894:4;;29866:27;:69::i;:::-;29950:17;;29840:95;;-1:-1:-1;29950:21:0;29946:224;;30092:10;30081:30;;;;;;;;;;;;;;;-1:-1:-1;30081:30:0;30073:85;;;;-1:-1:-1;;;30073:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13087:196;13190:12;13222:53;13245:6;13253:4;13259:1;13262:12;13222:22;:53::i;:::-;13215:60;13087:196;-1:-1:-1;;;;13087:196:0:o;14464:979::-;14594:12;14627:18;14638:6;14627:10;:18::i;:::-;14619:60;;;;;-1:-1:-1;;;14619:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;14753:12;14767:23;14794:6;-1:-1:-1;;;;;14794:11:0;14814:8;14825:4;14794:36;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;14794:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14752:78;;;;14845:7;14841:595;;;14876:10;-1:-1:-1;14869:17:0;;-1:-1:-1;14869:17:0;14841:595;14990:17;;:21;14986:439;;15253:10;15247:17;15314:15;15301:10;15297:2;15293:19;15286:44;15201:148;15389:20;;-1:-1:-1;;;15389:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15389:20:0;;;;;;;;;;;;;;;;9972:619;10032:4;10500:20;;10343:66;10540:23;;;;;;:42;;-1:-1:-1;;10567:15:0;;;10532:51;-1:-1:-1;;9972:619:0:o

Swarm Source

ipfs://799aac04beef961c34d546411febb0cd155f7d0eb936d6ce7a8329bd552f6dbc
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.