ETH Price: $3,264.82 (+2.26%)
Gas: 1 Gwei

Token

ERC20 ***
 

Overview

Max Total Supply

3 ERC20 ***

Holders

2

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 0 Decimals)

Balance
1 ERC20 ***

Value
$0.00
0xf4128B00AFdA933428056d0F0D1d7652aF7e2B35
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:
HegicStakingWBTC

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/Staking/HegicStaking.sol

/**
 * 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/>.
 */



pragma solidity 0.6.12;


abstract
contract HegicStaking is ERC20, IHegicStaking {
    using SafeERC20 for IERC20;
    using SafeMath for uint;

    IERC20 public immutable HEGIC;
    uint public constant MAX_SUPPLY = 1500;
    uint public constant LOT_PRICE = 888_000e18;
    uint internal constant ACCURACY = 1e30;
    address payable public immutable FALLBACK_RECIPIENT;

    uint public totalProfit = 0;
    mapping(address => uint) internal lastProfit;
    mapping(address => uint) internal savedProfit;


    uint256 public lockupPeriod = 1 days;
    mapping(address => uint256) public lastBoughtTimestamp;
    mapping(address => bool) public _revertTransfersInLockUpPeriod;

    constructor(ERC20 _token, string memory name, string memory short)
        public
        ERC20(name, short)
    {
        HEGIC = _token;
        _setupDecimals(0);
        FALLBACK_RECIPIENT = msg.sender;
    }

    function claimProfit() external override returns (uint profit) {
        profit = saveProfit(msg.sender);
        require(profit > 0, "Zero profit");
        savedProfit[msg.sender] = 0;
        _transferProfit(profit);
        emit Claim(msg.sender, profit);
    }

    function buy(uint amount) external override {
        lastBoughtTimestamp[msg.sender] = block.timestamp;
        require(amount > 0, "Amount is zero");
        require(totalSupply() + amount <= MAX_SUPPLY);
        _mint(msg.sender, amount);
        HEGIC.safeTransferFrom(msg.sender, address(this), amount.mul(LOT_PRICE));
    }

    function sell(uint amount) external override lockupFree {
        _burn(msg.sender, amount);
        HEGIC.safeTransfer(msg.sender, amount.mul(LOT_PRICE));
    }

    /**
     * @notice Used for ...
     */
    function revertTransfersInLockUpPeriod(bool value) external {
        _revertTransfersInLockUpPeriod[msg.sender] = value;
    }

    function profitOf(address account) external view override returns (uint) {
        return savedProfit[account].add(getUnsaved(account));
    }

    function getUnsaved(address account) internal view returns (uint profit) {
        return totalProfit.sub(lastProfit[account]).mul(balanceOf(account)).div(ACCURACY);
    }

    function saveProfit(address account) internal returns (uint profit) {
        uint unsaved = getUnsaved(account);
        lastProfit[account] = totalProfit;
        profit = savedProfit[account].add(unsaved);
        savedProfit[account] = profit;
    }

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

    function _transferProfit(uint amount) internal virtual;

    modifier lockupFree {
        require(
            lastBoughtTimestamp[msg.sender].add(lockupPeriod) <= block.timestamp,
            "Action suspended due to lockup"
        );
        _;
    }
}

// File: contracts/Staking/HegicStakingWBTC.sol

/**
 * 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/>.
 */

pragma solidity 0.6.12;


contract HegicStakingWBTC is HegicStaking, IHegicStakingERC20 {
    using SafeERC20 for IERC20;
    using SafeMath for uint;

    IERC20 public immutable WBTC;

    constructor(ERC20 _token, ERC20 wbtc) public
        HegicStaking(_token, "HEGIC WBTC Staking lot", "hlWBTC") {
        WBTC = wbtc;
    }

    function sendProfit(uint amount) external override {
        uint _totalSupply = totalSupply();
        if (_totalSupply > 0) {
            totalProfit += amount.mul(ACCURACY) / _totalSupply;
            WBTC.safeTransferFrom(msg.sender, address(this), amount);
            emit Profit(amount);
        } else {
            WBTC.safeTransferFrom(msg.sender, FALLBACK_RECIPIENT, amount);
        }
    }

    function _transferProfit(uint amount) internal override {
        WBTC.safeTransfer(msg.sender, amount);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ERC20","name":"_token","type":"address"},{"internalType":"contract ERC20","name":"wbtc","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":"address","name":"acount","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Profit","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"},{"inputs":[],"name":"FALLBACK_RECIPIENT","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HEGIC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WBTC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"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":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimProfit","outputs":[{"internalType":"uint256","name":"profit","type":"uint256"}],"stateMutability":"nonpayable","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":"lastBoughtTimestamp","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":[{"internalType":"address","name":"account","type":"address"}],"name":"profitOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"revertTransfersInLockUpPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sell","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sendProfit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalProfit","outputs":[{"internalType":"uint256","name":"","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"}]

60e06040526000600655620151806009553480156200001d57600080fd5b5060405162001b7138038062001b71833981810160405260408110156200004357600080fd5b508051602091820151604080518082018252601681527f48454749432057425443205374616b696e67206c6f740000000000000000000081860190815282518084019093526006835265686c5742544360d01b95830195909552805193949293859391929183918391620000bb916003919062000136565b508051620000d190600490602084019062000136565b50506005805460ff19166012179055506001600160601b0319606084901b16608052620000ff600062000120565b50505033606090811b60a0521b6001600160601b03191660c05250620001d2565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200017957805160ff1916838001178555620001a9565b82800160010185558215620001a9579182015b82811115620001a95782518255916020019190600101906200018c565b50620001b7929150620001bb565b5090565b5b80821115620001b75760008155600101620001bc565b60805160601c60a05160601c60c05160601c61194b62000226600039806106dd528061077d52806107f252806112cf5250806105a0528061081552508061085b5280610a0c5280610b00525061194b6000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80635fc0d2dd116100de578063a673729111610097578063dd62ed3e11610071578063dd62ed3e14610489578063e4849b32146104b7578063ee947a7c146104d4578063f011a7af146104dc5761018e565b8063a67372911461041a578063a9059cbb14610440578063d96a094a1461046c5761018e565b80635fc0d2dd1461039357806370a08231146103b057806371e395a8146103d657806386001519146103de57806395d89b41146103e6578063a457c2d7146103ee5761018e565b8063313ce5671161014b5780633f40406c116101255780633f40406c146103375780634dede3de1461035d5780634ed37f021461036557806354198ce91461036d5761018e565b8063313ce567146102e557806332cb6b0c14610303578063395093511461030b5761018e565b806306fdde0314610193578063095ea7b31461021057806318160ddd146102505780631b0163731461026a57806323b872dd1461028e5780632ba59175146102c4575b600080fd5b61019b6104e4565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d55781810151838201526020016101bd565b50505050905090810190601f1680156102025780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61023c6004803603604081101561022657600080fd5b506001600160a01b03813516906020013561057a565b604080519115158252519081900360200190f35b610258610598565b60408051918252519081900360200190f35b61027261059e565b604080516001600160a01b039092168252519081900360200190f35b61023c600480360360608110156102a457600080fd5b506001600160a01b038135811691602081013590911690604001356105c2565b6102e3600480360360208110156102da57600080fd5b50351515610649565b005b6102ed610669565b6040805160ff9092168252519081900360200190f35b610258610672565b61023c6004803603604081101561032157600080fd5b506001600160a01b038135169060200135610678565b61023c6004803603602081101561034d57600080fd5b50356001600160a01b03166106c6565b6102726106db565b6102586106ff565b6102586004803603602081101561038357600080fd5b50356001600160a01b031661070d565b6102e3600480360360208110156103a957600080fd5b503561073a565b610258600480360360208110156103c657600080fd5b50356001600160a01b031661083e565b610272610859565b61025861087d565b61019b610883565b61023c6004803603604081101561040457600080fd5b506001600160a01b0381351690602001356108e4565b6102586004803603602081101561043057600080fd5b50356001600160a01b031661094c565b61023c6004803603604081101561045657600080fd5b506001600160a01b03813516906020013561095e565b6102e36004803603602081101561048257600080fd5b5035610972565b6102586004803603604081101561049f57600080fd5b506001600160a01b0381358116916020013516610a37565b6102e3600480360360208110156104cd57600080fd5b5035610a62565b610258610b27565b610258610b2d565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105705780601f1061054557610100808354040283529160200191610570565b820191906000526020600020905b81548152906001019060200180831161055357829003601f168201915b5050505050905090565b600061058e610587610bcf565b8484610bd3565b5060015b92915050565b60025490565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006105cf848484610cbf565b61063f846105db610bcf565b61063a8560405180606001604052806028815260200161180a602891396001600160a01b038a16600090815260016020526040812090610619610bcf565b6001600160a01b031681526020810191909152604001600020549190610e1a565b610bd3565b5060019392505050565b336000908152600b60205260409020805460ff1916911515919091179055565b60055460ff1690565b6105dc81565b600061058e610685610bcf565b8461063a8560016000610696610bcf565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610eb1565b600b6020526000908152604090205460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b69bc0a9392c65c3b00000081565b600061059261071b83610f12565b6001600160a01b03841660009081526008602052604090205490610eb1565b6000610744610598565b905080156107e55780610764836c0c9f2c9cd04674edea40000000610f62565b8161076b57fe5b600680549290910490910190556107ad7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316333085610fbb565b6040805183815290517f357d905f1831209797df4d55d79c5c5bf1d9f7311c976afd05e13d881eab9bc89181900360200190a161083a565b61083a6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016337f000000000000000000000000000000000000000000000000000000000000000085610fbb565b5050565b6001600160a01b031660009081526020819052604090205490565b7f000000000000000000000000000000000000000000000000000000000000000081565b60065481565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105705780601f1061054557610100808354040283529160200191610570565b600061058e6108f1610bcf565b8461063a856040518060600160405280602581526020016118f1602591396001600061091b610bcf565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610e1a565b600a6020526000908152604090205481565b600061058e61096b610bcf565b8484610cbf565b336000908152600a60205260409020429055806109c7576040805162461bcd60e51b815260206004820152600e60248201526d416d6f756e74206973207a65726f60901b604482015290519081900360640190fd5b6105dc816109d3610598565b0111156109df57600080fd5b6109e9338261101b565b610a343330610a028469bc0a9392c65c3b000000610f62565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190610fbb565b50565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600954336000908152600a60205260409020544291610a819190610eb1565b1115610ad4576040805162461bcd60e51b815260206004820152601e60248201527f416374696f6e2073757370656e6465642064756520746f206c6f636b75700000604482015290519081900360640190fd5b610ade338261110b565b610a3433610af68369bc0a9392c65c3b000000610f62565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190611207565b60095481565b6000610b383361125e565b905060008111610b7d576040805162461bcd60e51b815260206004820152600b60248201526a16995c9bc81c1c9bd99a5d60aa1b604482015290519081900360640190fd5b33600090815260086020526040812055610b96816112c2565b60408051828152905133917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4919081900360200190a290565b3390565b6001600160a01b038316610c185760405162461bcd60e51b81526004018080602001828103825260248152602001806118a36024913960400191505060405180910390fd5b6001600160a01b038216610c5d5760405162461bcd60e51b81526004018080602001828103825260228152602001806117a16022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610d045760405162461bcd60e51b815260040180806020018281038252602581526020018061187e6025913960400191505060405180910390fd5b6001600160a01b038216610d495760405162461bcd60e51b815260040180806020018281038252602381526020018061175c6023913960400191505060405180910390fd5b610d548383836112f6565b610d91816040518060600160405280602681526020016117c3602691396001600160a01b0386166000908152602081905260409020549190610e1a565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610dc09082610eb1565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610ea95760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e6e578181015183820152602001610e56565b50505050905090810190601f168015610e9b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610f0b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006105926c0c9f2c9cd04674edea40000000610f5c610f318561083e565b6001600160a01b038616600090815260076020526040902054600654610f5691611404565b90610f62565b90611446565b600082610f7157506000610592565b82820282848281610f7e57fe5b0414610f0b5760405162461bcd60e51b81526004018080602001828103825260218152602001806117e96021913960400191505060405180910390fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611015908590611488565b50505050565b6001600160a01b038216611076576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611082600083836112f6565b60025461108f9082610eb1565b6002556001600160a01b0382166000908152602081905260409020546110b59082610eb1565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0382166111505760405162461bcd60e51b81526004018080602001828103825260218152602001806118326021913960400191505060405180910390fd5b61115c826000836112f6565b6111998160405180606001604052806022815260200161177f602291396001600160a01b0385166000908152602081905260409020549190610e1a565b6001600160a01b0383166000908152602081905260409020556002546111bf9082611404565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611259908490611488565b505050565b60008061126a83610f12565b6006546001600160a01b03851660009081526007602090815260408083209390935560089052205490915061129f9082610eb1565b6001600160a01b0390931660009081526008602052604090208390555090919050565b610a346001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383611207565b6001600160a01b038316156113105761130e8361125e565b505b6001600160a01b0382161561132a576113288261125e565b505b6009546001600160a01b0384166000908152600a602052604090205442916113529190610eb1565b11801561137f57506001600160a01b038083166000908152600a6020526040808220549286168252902054115b15611259576001600160a01b0382166000908152600b602052604090205460ff16156113dc5760405162461bcd60e51b815260040180806020018281038252602b815260200180611853602b913960400191505060405180910390fd5b6001600160a01b038084166000908152600a6020526040808220549285168252902055505050565b6000610f0b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e1a565b6000610f0b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611539565b60606114dd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661159e9092919063ffffffff16565b805190915015611259578080602001905160208110156114fc57600080fd5b50516112595760405162461bcd60e51b815260040180806020018281038252602a8152602001806118c7602a913960400191505060405180910390fd5b600081836115885760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610e6e578181015183820152602001610e56565b50600083858161159457fe5b0495945050505050565b60606115ad84846000856115b5565b949350505050565b60606115c085611722565b611611576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106116505780518252601f199092019160209182019101611631565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146116b2576040519150601f19603f3d011682016040523d82523d6000602084013e6116b7565b606091505b509150915081156116cb5791506115ad9050565b8051156116db5780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610e6e578181015183820152602001610e56565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906115ad57505015159291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737374686520726563697069656e7420646f6573206e6f742061636365707420626c6f636b65642066756e647345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f58cfb47b13bef6ea7ee1abb283b0f010aba82ab09e33d18e33b795327badcae64736f6c634300060c0033000000000000000000000000584bc13c7d411c00c01a62e8019472de687684300000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80635fc0d2dd116100de578063a673729111610097578063dd62ed3e11610071578063dd62ed3e14610489578063e4849b32146104b7578063ee947a7c146104d4578063f011a7af146104dc5761018e565b8063a67372911461041a578063a9059cbb14610440578063d96a094a1461046c5761018e565b80635fc0d2dd1461039357806370a08231146103b057806371e395a8146103d657806386001519146103de57806395d89b41146103e6578063a457c2d7146103ee5761018e565b8063313ce5671161014b5780633f40406c116101255780633f40406c146103375780634dede3de1461035d5780634ed37f021461036557806354198ce91461036d5761018e565b8063313ce567146102e557806332cb6b0c14610303578063395093511461030b5761018e565b806306fdde0314610193578063095ea7b31461021057806318160ddd146102505780631b0163731461026a57806323b872dd1461028e5780632ba59175146102c4575b600080fd5b61019b6104e4565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d55781810151838201526020016101bd565b50505050905090810190601f1680156102025780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61023c6004803603604081101561022657600080fd5b506001600160a01b03813516906020013561057a565b604080519115158252519081900360200190f35b610258610598565b60408051918252519081900360200190f35b61027261059e565b604080516001600160a01b039092168252519081900360200190f35b61023c600480360360608110156102a457600080fd5b506001600160a01b038135811691602081013590911690604001356105c2565b6102e3600480360360208110156102da57600080fd5b50351515610649565b005b6102ed610669565b6040805160ff9092168252519081900360200190f35b610258610672565b61023c6004803603604081101561032157600080fd5b506001600160a01b038135169060200135610678565b61023c6004803603602081101561034d57600080fd5b50356001600160a01b03166106c6565b6102726106db565b6102586106ff565b6102586004803603602081101561038357600080fd5b50356001600160a01b031661070d565b6102e3600480360360208110156103a957600080fd5b503561073a565b610258600480360360208110156103c657600080fd5b50356001600160a01b031661083e565b610272610859565b61025861087d565b61019b610883565b61023c6004803603604081101561040457600080fd5b506001600160a01b0381351690602001356108e4565b6102586004803603602081101561043057600080fd5b50356001600160a01b031661094c565b61023c6004803603604081101561045657600080fd5b506001600160a01b03813516906020013561095e565b6102e36004803603602081101561048257600080fd5b5035610972565b6102586004803603604081101561049f57600080fd5b506001600160a01b0381358116916020013516610a37565b6102e3600480360360208110156104cd57600080fd5b5035610a62565b610258610b27565b610258610b2d565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105705780601f1061054557610100808354040283529160200191610570565b820191906000526020600020905b81548152906001019060200180831161055357829003601f168201915b5050505050905090565b600061058e610587610bcf565b8484610bd3565b5060015b92915050565b60025490565b7f0000000000000000000000008ac7de95ff8d0ee72e0b54f781ab2e18f27108fb81565b60006105cf848484610cbf565b61063f846105db610bcf565b61063a8560405180606001604052806028815260200161180a602891396001600160a01b038a16600090815260016020526040812090610619610bcf565b6001600160a01b031681526020810191909152604001600020549190610e1a565b610bd3565b5060019392505050565b336000908152600b60205260409020805460ff1916911515919091179055565b60055460ff1690565b6105dc81565b600061058e610685610bcf565b8461063a8560016000610696610bcf565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610eb1565b600b6020526000908152604090205460ff1681565b7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59981565b69bc0a9392c65c3b00000081565b600061059261071b83610f12565b6001600160a01b03841660009081526008602052604090205490610eb1565b6000610744610598565b905080156107e55780610764836c0c9f2c9cd04674edea40000000610f62565b8161076b57fe5b600680549290910490910190556107ad7f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5996001600160a01b0316333085610fbb565b6040805183815290517f357d905f1831209797df4d55d79c5c5bf1d9f7311c976afd05e13d881eab9bc89181900360200190a161083a565b61083a6001600160a01b037f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59916337f0000000000000000000000008ac7de95ff8d0ee72e0b54f781ab2e18f27108fb85610fbb565b5050565b6001600160a01b031660009081526020819052604090205490565b7f000000000000000000000000584bc13c7d411c00c01a62e8019472de6876843081565b60065481565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105705780601f1061054557610100808354040283529160200191610570565b600061058e6108f1610bcf565b8461063a856040518060600160405280602581526020016118f1602591396001600061091b610bcf565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610e1a565b600a6020526000908152604090205481565b600061058e61096b610bcf565b8484610cbf565b336000908152600a60205260409020429055806109c7576040805162461bcd60e51b815260206004820152600e60248201526d416d6f756e74206973207a65726f60901b604482015290519081900360640190fd5b6105dc816109d3610598565b0111156109df57600080fd5b6109e9338261101b565b610a343330610a028469bc0a9392c65c3b000000610f62565b6001600160a01b037f000000000000000000000000584bc13c7d411c00c01a62e8019472de6876843016929190610fbb565b50565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600954336000908152600a60205260409020544291610a819190610eb1565b1115610ad4576040805162461bcd60e51b815260206004820152601e60248201527f416374696f6e2073757370656e6465642064756520746f206c6f636b75700000604482015290519081900360640190fd5b610ade338261110b565b610a3433610af68369bc0a9392c65c3b000000610f62565b6001600160a01b037f000000000000000000000000584bc13c7d411c00c01a62e8019472de68768430169190611207565b60095481565b6000610b383361125e565b905060008111610b7d576040805162461bcd60e51b815260206004820152600b60248201526a16995c9bc81c1c9bd99a5d60aa1b604482015290519081900360640190fd5b33600090815260086020526040812055610b96816112c2565b60408051828152905133917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4919081900360200190a290565b3390565b6001600160a01b038316610c185760405162461bcd60e51b81526004018080602001828103825260248152602001806118a36024913960400191505060405180910390fd5b6001600160a01b038216610c5d5760405162461bcd60e51b81526004018080602001828103825260228152602001806117a16022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610d045760405162461bcd60e51b815260040180806020018281038252602581526020018061187e6025913960400191505060405180910390fd5b6001600160a01b038216610d495760405162461bcd60e51b815260040180806020018281038252602381526020018061175c6023913960400191505060405180910390fd5b610d548383836112f6565b610d91816040518060600160405280602681526020016117c3602691396001600160a01b0386166000908152602081905260409020549190610e1a565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610dc09082610eb1565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610ea95760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e6e578181015183820152602001610e56565b50505050905090810190601f168015610e9b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610f0b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006105926c0c9f2c9cd04674edea40000000610f5c610f318561083e565b6001600160a01b038616600090815260076020526040902054600654610f5691611404565b90610f62565b90611446565b600082610f7157506000610592565b82820282848281610f7e57fe5b0414610f0b5760405162461bcd60e51b81526004018080602001828103825260218152602001806117e96021913960400191505060405180910390fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611015908590611488565b50505050565b6001600160a01b038216611076576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611082600083836112f6565b60025461108f9082610eb1565b6002556001600160a01b0382166000908152602081905260409020546110b59082610eb1565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0382166111505760405162461bcd60e51b81526004018080602001828103825260218152602001806118326021913960400191505060405180910390fd5b61115c826000836112f6565b6111998160405180606001604052806022815260200161177f602291396001600160a01b0385166000908152602081905260409020549190610e1a565b6001600160a01b0383166000908152602081905260409020556002546111bf9082611404565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611259908490611488565b505050565b60008061126a83610f12565b6006546001600160a01b03851660009081526007602090815260408083209390935560089052205490915061129f9082610eb1565b6001600160a01b0390931660009081526008602052604090208390555090919050565b610a346001600160a01b037f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599163383611207565b6001600160a01b038316156113105761130e8361125e565b505b6001600160a01b0382161561132a576113288261125e565b505b6009546001600160a01b0384166000908152600a602052604090205442916113529190610eb1565b11801561137f57506001600160a01b038083166000908152600a6020526040808220549286168252902054115b15611259576001600160a01b0382166000908152600b602052604090205460ff16156113dc5760405162461bcd60e51b815260040180806020018281038252602b815260200180611853602b913960400191505060405180910390fd5b6001600160a01b038084166000908152600a6020526040808220549285168252902055505050565b6000610f0b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e1a565b6000610f0b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611539565b60606114dd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661159e9092919063ffffffff16565b805190915015611259578080602001905160208110156114fc57600080fd5b50516112595760405162461bcd60e51b815260040180806020018281038252602a8152602001806118c7602a913960400191505060405180910390fd5b600081836115885760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610e6e578181015183820152602001610e56565b50600083858161159457fe5b0495945050505050565b60606115ad84846000856115b5565b949350505050565b60606115c085611722565b611611576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106116505780518252601f199092019160209182019101611631565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146116b2576040519150601f19603f3d011682016040523d82523d6000602084013e6116b7565b606091505b509150915081156116cb5791506115ad9050565b8051156116db5780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610e6e578181015183820152602001610e56565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906115ad57505015159291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737374686520726563697069656e7420646f6573206e6f742061636365707420626c6f636b65642066756e647345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f58cfb47b13bef6ea7ee1abb283b0f010aba82ab09e33d18e33b795327badcae64736f6c634300060c0033

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

000000000000000000000000584bc13c7d411c00c01a62e8019472de687684300000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599

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

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


Deployed Bytecode Sourcemap

46074:854:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17638:83;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19744:169;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;19744:169:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;18713:100;;;:::i;:::-;;;;;;;;;;;;;;;;42224:51;;;:::i;:::-;;;;-1:-1:-1;;;;;42224:51:0;;;;;;;;;;;;;;20387:321;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;20387:321:0;;;;;;;;;;;;;;;;;:::i;43668:129::-;;;;;;;;;;;;;;;;-1:-1:-1;43668:129:0;;;;:::i;:::-;;18565:83;;;:::i;:::-;;;;;;;;;;;;;;;;;;;42084:38;;;:::i;21117:218::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;21117:218:0;;;;;;;;:::i;42529:62::-;;;;;;;;;;;;;;;;-1:-1:-1;42529:62:0;-1:-1:-1;;;;;42529:62:0;;:::i;46208:28::-;;;:::i;42129:43::-;;;:::i;43805:144::-;;;;;;;;;;;;;;;;-1:-1:-1;43805:144:0;-1:-1:-1;;;;;43805:144:0;;:::i;46394:411::-;;;;;;;;;;;;;;;;-1:-1:-1;46394:411:0;;:::i;18876:119::-;;;;;;;;;;;;;;;;-1:-1:-1;18876:119:0;-1:-1:-1;;;;;18876:119:0;;:::i;42048:29::-;;;:::i;42284:27::-;;;:::i;17840:87::-;;;:::i;21838:269::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;21838:269:0;;;;;;;;:::i;42468:54::-;;;;;;;;;;;;;;;;-1:-1:-1;42468:54:0;-1:-1:-1;;;;;42468:54:0;;:::i;19208:175::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;19208:175:0;;;;;;;;:::i;43106:335::-;;;;;;;;;;;;;;;;-1:-1:-1;43106:335:0;;:::i;19446:151::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;19446:151:0;;;;;;;;;;:::i;43449:164::-;;;;;;;;;;;;;;;;-1:-1:-1;43449:164:0;;:::i;42425:36::-;;;:::i;42827:271::-;;;:::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;42224:51::-;;;:::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;;;:89;:37;:89::i;:::-;20557:8;:121::i;:::-;-1:-1:-1;20696:4:0;20387:321;;;;;:::o;43668:129::-;43770:10;43739:42;;;;:30;:42;;;;;:50;;-1:-1:-1;;43739:50:0;;;;;;;;;;43668:129::o;18565:83::-;18631:9;;;;18565:83;:::o;42084:38::-;42118:4;42084:38;:::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;42529:62::-;;;;;;;;;;;;;;;:::o;46208:28::-;;;:::o;42129:43::-;42162:10;42129:43;:::o;43805:144::-;43872:4;43896:45;43921:19;43932:7;43921:10;:19::i;:::-;-1:-1:-1;;;;;43896:20:0;;;;;;:11;:20;;;;;;;:24;:45::i;46394:411::-;46456:17;46476:13;:11;:13::i;:::-;46456:33;-1:-1:-1;46504:16:0;;46500:298;;46575:12;46552:20;:6;42213:4;46552:10;:20::i;:::-;:35;;;;;46537:11;:50;;46552:35;;;;46537:50;;;;;46602:56;:4;-1:-1:-1;;;;;46602:21:0;46624:10;46644:4;46651:6;46602:21;:56::i;:::-;46678:14;;;;;;;;;;;;;;;;;46500:298;;;46725:61;-1:-1:-1;;;;;46725:4:0;:21;46747:10;46759:18;46779:6;46725:21;:61::i;:::-;46394:411;;:::o;18876:119::-;-1:-1:-1;;;;;18969:18:0;18942:7;18969:18;;;;;;;;;;;;18876:119::o;42048:29::-;;;:::o;42284:27::-;;;;:::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;;;;;;;;;;;:96;:38;:96::i;42468:54::-;;;;;;;;;;;;;:::o;19208:175::-;19294:4;19311:42;19321:12;:10;:12::i;:::-;19335:9;19346:6;19311:9;:42::i;43106:335::-;43181:10;43161:31;;;;:19;:31;;;;;43195:15;43161:49;;43229:10;43221:37;;;;;-1:-1:-1;;;43221:37:0;;;;;;;;;;;;-1:-1:-1;;;43221:37:0;;;;;;;;;;;;;;;42118:4;43293:6;43277:13;:11;:13::i;:::-;:22;:36;;43269:45;;;;;;43325:25;43331:10;43343:6;43325:5;:25::i;:::-;43361:72;43384:10;43404:4;43411:21;:6;42162:10;43411;:21::i;:::-;-1:-1:-1;;;;;43361:5:0;:22;;:72;;:22;:72::i;:::-;43106:335;:::o;19446:151::-;-1:-1:-1;;;;;19562:18:0;;;19535:7;19562:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;19446:151::o;43449:164::-;45155:12;;45139:10;45119:31;;;;:19;:31;;;;;;45172:15;;45119:49;;:31;:35;:49::i;:::-;:68;;45097:148;;;;;-1:-1:-1;;;45097:148:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;43516:25:::1;43522:10;43534:6;43516:5;:25::i;:::-;43552:53;43571:10;43583:21;:6:::0;42162:10:::1;43583;:21::i;:::-;-1:-1:-1::0;;;;;43552:5:0::1;:18;::::0;:53;:18:::1;:53::i;42425:36::-:0;;;;:::o;42827:271::-;42877:11;42910:22;42921:10;42910;:22::i;:::-;42901:31;;42960:1;42951:6;:10;42943:34;;;;;-1:-1:-1;;;42943:34:0;;;;;;;;;;;;-1:-1:-1;;;42943:34:0;;;;;;;;;;;;;;;43000:10;43014:1;42988:23;;;:11;:23;;;;;:27;43026:23;43042:6;43026:15;:23::i;:::-;43065:25;;;;;;;;43071:10;;43065:25;;;;;;;;;;42827:271;:::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;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;;:9;:17;;;;;;;;;;;;:71;:21;:71::i;:::-;-1:-1:-1;;;;;22920:17:0;;;:9;:17;;;;;;;;;;;:91;;;;23045:20;;;;;;;:32;;23070:6;23045:24;:32::i;:::-;-1:-1:-1;;;;;23022:20:0;;;:9;:20;;;;;;;;;;;;: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;;;;;;;;;;;;;;;;;;;;;;;;;;;;4920:1;4748:181;-1:-1:-1;;;4748:181:0:o;43957:173::-;44017:11;44048:74;42213:4;44048:60;44089:18;44099:7;44089:9;:18::i;:::-;-1:-1:-1;;;;;44064:19:0;;;;;;:10;:19;;;;;;44048:11;;:36;;:15;:36::i;:::-;:40;;:60::i;:::-;:64;;:74::i;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;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;;:9;:18;;;;;;;;;;;:30;;23727:6;23704:22;:30::i;:::-;-1:-1:-1;;;;;23683:18:0;;:9;:18;;;;;;;;;;;:51;;;;23750:37;;;;;;;23683:18;;:9;;23750:37;;;;;;;;;;23417:378;;:::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;;:9;:18;;;;;;;;;;;;:68;:22;:68::i;:::-;-1:-1:-1;;;;;24345:18:0;;:9;:18;;;;;;;;;;: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;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;:::-;27111:177;;;:::o;44138:258::-;44193:11;44217:12;44232:19;44243:7;44232:10;:19::i;:::-;44284:11;;-1:-1:-1;;;;;44262:19:0;;;;;;:10;:19;;;;;;;;:33;;;;44315:11;:20;;;;44217:34;;-1:-1:-1;44315:33:0;;44217:34;44315:24;:33::i;:::-;-1:-1:-1;;;;;44359:20:0;;;;;;;:11;:20;;;;;:29;;;-1:-1:-1;44306:42:0;;44138:258;-1:-1:-1;44138:258:0:o;46813:112::-;46880:37;-1:-1:-1;;;;;46880:4:0;:17;46898:10;46910:6;46880:17;:37::i;44404:591::-;-1:-1:-1;;;;;44502:18:0;;;44498:40;;44522:16;44533:4;44522:10;:16::i;:::-;;44498:40;-1:-1:-1;;;;;44553:16:0;;;44549:36;;44571:14;44582:2;44571:10;:14::i;:::-;;44549:36;44644:12;;-1:-1:-1;;;;;44614:25:0;;;;;;:19;:25;;;;;;44660:15;;44614:43;;:25;:29;:43::i;:::-;:61;:129;;;;-1:-1:-1;;;;;;44720:23:0;;;;;;;:19;:23;;;;;;;44692:25;;;;;;;;:51;44614:129;44596:392;;;-1:-1:-1;;;;;44797:34:0;;;;;;:30;:34;;;;;;;;44796:35;44770:140;;;;-1:-1:-1;;;44770:140:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;44951:25:0;;;;;;;:19;:25;;;;;;;44925:23;;;;;;;:51;44404:591;;;:::o;5212:136::-;5270:7;5297:43;5301:1;5304;5297:43;;;;;;;;;;;;;;;;;:3;:43::i;7049:132::-;7107:7;7134:39;7138:1;7141;7134:39;;;;;;;;;;;;;;;;;:3;:39::i;29416:761::-;29840:23;29866:69;29894:4;29866:69;;;;;;;;;;;;;;;;;29874:5;-1:-1:-1;;;;;29866:27:0;;;: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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7677:278;7763:7;7798:12;7791:5;7783:28;;;;-1:-1:-1;;;7783:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7822:9;7838:1;7834;:5;;;;;;;7677:278;-1:-1:-1;;;;;7677:278:0:o;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;;;;;;;;;;;;;;;;;15396:12;;15389:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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://f58cfb47b13bef6ea7ee1abb283b0f010aba82ab09e33d18e33b795327badcae
Loading...
Loading
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.