ETH Price: $2,506.34 (+0.31%)

Contract

0xfa7c660683Ff22989413256bd57f569562cE1559
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Nominate New Own...162304102022-12-21 3:32:47682 days ago1671593567IN
0xfa7c6606...562cE1559
0 ETH0.0005577911.84374649
Toggle Token For...147393122022-05-09 0:37:28908 days ago1652056648IN
0xfa7c6606...562cE1559
0 ETH0.0006446422.61927755
Increase Observa...147392872022-05-09 0:30:39908 days ago1652056239IN
0xfa7c6606...562cE1559
0 ETH0.0441650319.73524806
0x60806040147392702022-05-09 0:28:16908 days ago1652056096IN
 Contract Creation
0 ETH0.084531640

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x59985D79...E73D9174B
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
UniV3TWAPOracle

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 100000 runs

Other Settings:
default evmVersion, GNU GPLv2 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2022-03-31
*/

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.8.0;

// Sources flattened with hardhat v2.8.4 https://hardhat.org

// File contracts/Math/SafeMath.sol


/**
 * @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.
     *
     * _Available since v2.4.0._
     */
    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.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}


// File contracts/Common/Context.sol


/*
 * @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 payable(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 contracts/ERC20/IERC20.sol



/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
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 contracts/Utils/Address.sol


/**
 * @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) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @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");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        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 contracts/ERC20/ERC20.sol





/**
 * @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 {ERC20Mintable}.
 *
 * 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;

    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.approve(address spender, uint256 amount)
     */
    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 the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for `accounts`'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(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 Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal virtual {
        _burn(account, amount);
        _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
    }

    /**
     * @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:using-hooks.adoc[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}


// File contracts/Oracle/AggregatorV3Interface.sol


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 contracts/Uniswap_V3/pool/IUniswapV3PoolImmutables.sol


/// @title Pool state that never changes
/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values
interface IUniswapV3PoolImmutables {
    /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface
    /// @return The contract address
    function factory() external view returns (address);

    /// @notice The first of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token0() external view returns (address);

    /// @notice The second of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token1() external view returns (address);

    /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6
    /// @return The fee
    function fee() external view returns (uint24);

    /// @notice The pool tick spacing
    /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive
    /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...
    /// This value is an int24 to avoid casting even though it is always positive.
    /// @return The tick spacing
    function tickSpacing() external view returns (int24);

    /// @notice The maximum amount of position liquidity that can use any tick in the range
    /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and
    /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool
    /// @return The max amount of liquidity per tick
    function maxLiquidityPerTick() external view returns (uint128);
}


// File contracts/Uniswap_V3/pool/IUniswapV3PoolState.sol


/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
    /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas
    /// when accessed externally.
    /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value
    /// tick The current tick of the pool, i.e. according to the last tick transition that was run.
    /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick
    /// boundary.
    /// observationIndex The index of the last oracle observation that was written,
    /// observationCardinality The current maximum number of observations stored in the pool,
    /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.
    /// feeProtocol The protocol fee for both tokens of the pool.
    /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0
    /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.
    /// unlocked Whether the pool is currently locked to reentrancy
    function slot0()
        external
        view
        returns (
            uint160 sqrtPriceX96,
            int24 tick,
            uint16 observationIndex,
            uint16 observationCardinality,
            uint16 observationCardinalityNext,
            uint8 feeProtocol,
            bool unlocked
        );

    /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal0X128() external view returns (uint256);

    /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal1X128() external view returns (uint256);

    /// @notice The amounts of token0 and token1 that are owed to the protocol
    /// @dev Protocol fees will never exceed uint128 max in either token
    function protocolFees() external view returns (uint128 token0, uint128 token1);

    /// @notice The currently in range liquidity available to the pool
    /// @dev This value has no relationship to the total liquidity across all ticks
    function liquidity() external view returns (uint128);

    /// @notice Look up information about a specific tick in the pool
    /// @param tick The tick to look up
    /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or
    /// tick upper,
    /// liquidityNet how much liquidity changes when the pool price crosses the tick,
    /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,
    /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,
    /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick
    /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,
    /// secondsOutside the seconds spent on the other side of the tick from the current tick,
    /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.
    /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.
    /// In addition, these values are only relative and must be used only in comparison to previous snapshots for
    /// a specific position.
    function ticks(int24 tick)
        external
        view
        returns (
            uint128 liquidityGross,
            int128 liquidityNet,
            uint256 feeGrowthOutside0X128,
            uint256 feeGrowthOutside1X128,
            int56 tickCumulativeOutside,
            uint160 secondsPerLiquidityOutsideX128,
            uint32 secondsOutside,
            bool initialized
        );

    /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
    function tickBitmap(int16 wordPosition) external view returns (uint256);

    /// @notice Returns the information about a position by the position's key
    /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper
    /// @return _liquidity The amount of liquidity in the position,
    /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,
    /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,
    /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,
    /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke
    function positions(bytes32 key)
        external
        view
        returns (
            uint128 _liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
        );

    /// @notice Returns data about a specific observation index
    /// @param index The element of the observations array to fetch
    /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time
    /// ago, rather than at a specific index in the array.
    /// @return blockTimestamp The timestamp of the observation,
    /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
    /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,
    /// Returns initialized whether the observation has been initialized and the values are safe to use
    function observations(uint256 index)
        external
        view
        returns (
            uint32 blockTimestamp,
            int56 tickCumulative,
            uint160 secondsPerLiquidityCumulativeX128,
            bool initialized
        );
}


// File contracts/Uniswap_V3/pool/IUniswapV3PoolDerivedState.sol


/// @title Pool state that is not stored
/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the
/// blockchain. The functions here may have variable gas costs.
interface IUniswapV3PoolDerivedState {
    /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp
    /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing
    /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,
    /// you must call it with secondsAgos = [3600, 0].
    /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in
    /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
    /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned
    /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp
    /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block
    /// timestamp
    function observe(uint32[] calldata secondsAgos)
        external
        view
        returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);

    /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range
    /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.
    /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first
    /// snapshot is taken and the second snapshot is taken.
    /// @param tickLower The lower tick of the range
    /// @param tickUpper The upper tick of the range
    /// @return tickCumulativeInside The snapshot of the tick accumulator for the range
    /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range
    /// @return secondsInside The snapshot of seconds per liquidity for the range
    function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)
        external
        view
        returns (
            int56 tickCumulativeInside,
            uint160 secondsPerLiquidityInsideX128,
            uint32 secondsInside
        );
}


// File contracts/Uniswap_V3/pool/IUniswapV3PoolActions.sol


/// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone
interface IUniswapV3PoolActions {
    /// @notice Sets the initial price for the pool
    /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
    /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
    function initialize(uint160 sqrtPriceX96) external;

    /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position
    /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback
    /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends
    /// on tickLower, tickUpper, the amount of liquidity, and the current price.
    /// @param recipient The address for which the liquidity will be created
    /// @param tickLower The lower tick of the position in which to add liquidity
    /// @param tickUpper The upper tick of the position in which to add liquidity
    /// @param amount The amount of liquidity to mint
    /// @param data Any data that should be passed through to the callback
    /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback
    /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback
    function mint(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount,
        bytes calldata data
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Collects tokens owed to a position
    /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.
    /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or
    /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the
    /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.
    /// @param recipient The address which should receive the fees collected
    /// @param tickLower The lower tick of the position for which to collect fees
    /// @param tickUpper The upper tick of the position for which to collect fees
    /// @param amount0Requested How much token0 should be withdrawn from the fees owed
    /// @param amount1Requested How much token1 should be withdrawn from the fees owed
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);

    /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position
    /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0
    /// @dev Fees must be collected separately via a call to #collect
    /// @param tickLower The lower tick of the position for which to burn liquidity
    /// @param tickUpper The upper tick of the position for which to burn liquidity
    /// @param amount How much liquidity to burn
    /// @return amount0 The amount of token0 sent to the recipient
    /// @return amount1 The amount of token1 sent to the recipient
    function burn(
        int24 tickLower,
        int24 tickUpper,
        uint128 amount
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Swap token0 for token1, or token1 for token0
    /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
    /// @param recipient The address to receive the output of the swap
    /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0
    /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
    /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this
    /// value after the swap. If one for zero, the price cannot be greater than this value after the swap
    /// @param data Any data to be passed through to the callback
    /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive
    /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);

    /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback
    /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback
    /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling
    /// with 0 amount{0,1} and sending the donation amount(s) from the callback
    /// @param recipient The address which will receive the token0 and token1 amounts
    /// @param amount0 The amount of token0 to send
    /// @param amount1 The amount of token1 to send
    /// @param data Any data to be passed through to the callback
    function flash(
        address recipient,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external;

    /// @notice Increase the maximum number of price and liquidity observations that this pool will store
    /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to
    /// the input observationCardinalityNext.
    /// @param observationCardinalityNext The desired minimum number of observations for the pool to store
    function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;
}


// File contracts/Uniswap_V3/pool/IUniswapV3PoolOwnerActions.sol


/// @title Permissioned pool actions
/// @notice Contains pool methods that may only be called by the factory owner
interface IUniswapV3PoolOwnerActions {
    /// @notice Set the denominator of the protocol's % share of the fees
    /// @param feeProtocol0 new protocol fee for token0 of the pool
    /// @param feeProtocol1 new protocol fee for token1 of the pool
    function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;

    /// @notice Collect the protocol fee accrued to the pool
    /// @param recipient The address to which collected protocol fees should be sent
    /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1
    /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0
    /// @return amount0 The protocol fee collected in token0
    /// @return amount1 The protocol fee collected in token1
    function collectProtocol(
        address recipient,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);
}


// File contracts/Uniswap_V3/pool/IUniswapV3PoolEvents.sol


/// @title Events emitted by a pool
/// @notice Contains all events emitted by the pool
interface IUniswapV3PoolEvents {
    /// @notice Emitted exactly once by a pool when #initialize is first called on the pool
    /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize
    /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96
    /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
    event Initialize(uint160 sqrtPriceX96, int24 tick);

    /// @notice Emitted when liquidity is minted for a given position
    /// @param sender The address that minted the liquidity
    /// @param owner The owner of the position and recipient of any minted liquidity
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity minted to the position range
    /// @param amount0 How much token0 was required for the minted liquidity
    /// @param amount1 How much token1 was required for the minted liquidity
    event Mint(
        address sender,
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted when fees are collected by the owner of a position
    /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
    /// @param owner The owner of the position for which fees are collected
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount0 The amount of token0 fees collected
    /// @param amount1 The amount of token1 fees collected
    event Collect(
        address indexed owner,
        address recipient,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount0,
        uint128 amount1
    );

    /// @notice Emitted when a position's liquidity is removed
    /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
    /// @param owner The owner of the position for which liquidity is removed
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity to remove
    /// @param amount0 The amount of token0 withdrawn
    /// @param amount1 The amount of token1 withdrawn
    event Burn(
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted by the pool for any swaps between token0 and token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the output of the swap
    /// @param amount0 The delta of the token0 balance of the pool
    /// @param amount1 The delta of the token1 balance of the pool
    /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96
    /// @param liquidity The liquidity of the pool after the swap
    /// @param tick The log base 1.0001 of price of the pool after the swap
    event Swap(
        address indexed sender,
        address indexed recipient,
        int256 amount0,
        int256 amount1,
        uint160 sqrtPriceX96,
        uint128 liquidity,
        int24 tick
    );

    /// @notice Emitted by the pool for any flashes of token0/token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the tokens from flash
    /// @param amount0 The amount of token0 that was flashed
    /// @param amount1 The amount of token1 that was flashed
    /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
    /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee
    event Flash(
        address indexed sender,
        address indexed recipient,
        uint256 amount0,
        uint256 amount1,
        uint256 paid0,
        uint256 paid1
    );

    /// @notice Emitted by the pool for increases to the number of observations that can be stored
    /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index
    /// just before a mint/swap/burn.
    /// @param observationCardinalityNextOld The previous value of the next observation cardinality
    /// @param observationCardinalityNextNew The updated value of the next observation cardinality
    event IncreaseObservationCardinalityNext(
        uint16 observationCardinalityNextOld,
        uint16 observationCardinalityNextNew
    );

    /// @notice Emitted when the protocol fee is changed by the pool
    /// @param feeProtocol0Old The previous value of the token0 protocol fee
    /// @param feeProtocol1Old The previous value of the token1 protocol fee
    /// @param feeProtocol0New The updated value of the token0 protocol fee
    /// @param feeProtocol1New The updated value of the token1 protocol fee
    event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);

    /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner
    /// @param sender The address that collects the protocol fees
    /// @param recipient The address that receives the collected protocol fees
    /// @param amount0 The amount of token0 protocol fees that is withdrawn
    /// @param amount0 The amount of token1 protocol fees that is withdrawn
    event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);
}


// File contracts/Uniswap_V3/IUniswapV3Pool.sol







/// @title The interface for a Uniswap V3 Pool
/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform
/// to the ERC20 specification
/// @dev The pool interface is broken up into many smaller pieces
interface IUniswapV3Pool is
    IUniswapV3PoolImmutables,
    IUniswapV3PoolState,
    IUniswapV3PoolDerivedState,
    IUniswapV3PoolActions,
    IUniswapV3PoolOwnerActions,
    IUniswapV3PoolEvents
{

}


// File contracts/Uniswap_V3/libraries/FullMath.sol


/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        // 512-bit multiply [prod1 prod0] = a * b
        // Compute the product mod 2**256 and mod 2**256 - 1
        // then use the Chinese Remainder Theorem to reconstruct
        // the 512 bit result. The result is stored in two 256
        // variables such that product = prod1 * 2**256 + prod0
        uint256 prod0; // Least significant 256 bits of the product
        uint256 prod1; // Most significant 256 bits of the product
        assembly {
            let mm := mulmod(a, b, not(0))
            prod0 := mul(a, b)
            prod1 := sub(sub(mm, prod0), lt(mm, prod0))
        }

        // Handle non-overflow cases, 256 by 256 division
        if (prod1 == 0) {
            require(denominator > 0);
            assembly {
                result := div(prod0, denominator)
            }
            return result;
        }

        // Make sure the result is less than 2**256.
        // Also prevents denominator == 0
        require(denominator > prod1);

        ///////////////////////////////////////////////
        // 512 by 256 division.
        ///////////////////////////////////////////////

        // Make division exact by subtracting the remainder from [prod1 prod0]
        // Compute remainder using mulmod
        uint256 remainder;
        assembly {
            remainder := mulmod(a, b, denominator)
        }
        // Subtract 256 bit number from 512 bit number
        assembly {
            prod1 := sub(prod1, gt(remainder, prod0))
            prod0 := sub(prod0, remainder)
        }

        // Factor powers of two out of denominator
        // Compute largest power of two divisor of denominator.
        // Always >= 1.
        uint256 twos = (type(uint256).max - denominator + 1) & denominator;
        // Divide denominator by power of two
        assembly {
            denominator := div(denominator, twos)
        }

        // Divide [prod1 prod0] by the factors of two
        assembly {
            prod0 := div(prod0, twos)
        }
        // Shift in bits from prod1 into prod0. For this we need
        // to flip `twos` such that it is 2**256 / twos.
        // If twos is zero, then it becomes one
        assembly {
            twos := add(div(sub(0, twos), twos), 1)
        }
        prod0 |= prod1 * twos;

        // Invert denominator mod 2**256
        // Now that denominator is an odd number, it has an inverse
        // modulo 2**256 such that denominator * inv = 1 mod 2**256.
        // Compute the inverse by starting with a seed that is correct
        // correct for four bits. That is, denominator * inv = 1 mod 2**4
        uint256 inv = (3 * denominator) ^ 2;
        // Now use Newton-Raphson iteration to improve the precision.
        // Thanks to Hensel's lifting lemma, this also works in modular
        // arithmetic, doubling the correct bits in each step.
        inv *= 2 - denominator * inv; // inverse mod 2**8
        inv *= 2 - denominator * inv; // inverse mod 2**16
        inv *= 2 - denominator * inv; // inverse mod 2**32
        inv *= 2 - denominator * inv; // inverse mod 2**64
        inv *= 2 - denominator * inv; // inverse mod 2**128
        inv *= 2 - denominator * inv; // inverse mod 2**256

        // Because the division is now exact we can divide by multiplying
        // with the modular inverse of denominator. This will give us the
        // correct result modulo 2**256. Since the precoditions guarantee
        // that the outcome is less than 2**256, this is the final result.
        // We don't need to compute the high bits of the result and prod1
        // is no longer required.
        result = prod0 * inv;
        return result;
    }

    /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    function mulDivRoundingUp(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        result = mulDiv(a, b, denominator);
        if (mulmod(a, b, denominator) > 0) {
            require(result < type(uint256).max);
            result++;
        }
    }
}


// File contracts/Uniswap_V3/libraries/TickMath.sol


/// @title Math library for computing sqrt prices from ticks and vice versa
/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports
/// prices between 2**-128 and 2**128
library TickMath {
    /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128
    int24 internal constant MIN_TICK = -887272;
    /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128
    int24 internal constant MAX_TICK = -MIN_TICK;

    /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
    uint160 internal constant MIN_SQRT_RATIO = 4295128739;
    /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
    uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;

    /// @notice Calculates sqrt(1.0001^tick) * 2^96
    /// @dev Throws if |tick| > max tick
    /// @param tick The input tick for the above formula
    /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)
    /// at the given tick
    function getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtPriceX96) {
        uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));
        require(int256(absTick) <= int256(MAX_TICK), 'T');

        uint256 ratio = absTick & 0x1 != 0 ? 0xfffcb933bd6fad37aa2d162d1a594001 : 0x100000000000000000000000000000000;
        if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;
        if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;
        if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;
        if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;
        if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;
        if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;
        if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;
        if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;
        if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;
        if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;
        if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;
        if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;
        if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;
        if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;
        if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;
        if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;
        if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;
        if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;
        if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;

        if (tick > 0) ratio = type(uint256).max / ratio;

        // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.
        // we then downcast because we know the result always fits within 160 bits due to our tick input constraint
        // we round up in the division so getTickAtSqrtRatio of the output price is always consistent
        sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));
    }

    /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio
    /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may
    /// ever return.
    /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96
    /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio
    function getTickAtSqrtRatio(uint160 sqrtPriceX96) internal pure returns (int24 tick) {
        // second inequality must be < because the price can never reach the price at the max tick
        require(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO, 'R');
        uint256 ratio = uint256(sqrtPriceX96) << 32;

        uint256 r = ratio;
        uint256 msb = 0;

        assembly {
            let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(5, gt(r, 0xFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(4, gt(r, 0xFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(3, gt(r, 0xFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(2, gt(r, 0xF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(1, gt(r, 0x3))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := gt(r, 0x1)
            msb := or(msb, f)
        }

        if (msb >= 128) r = ratio >> (msb - 127);
        else r = ratio << (127 - msb);

        int256 log_2 = (int256(msb) - 128) << 64;

        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(63, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(62, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(61, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(60, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(59, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(58, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(57, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(56, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(55, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(54, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(53, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(52, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(51, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(50, f))
        }

        int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number

        int24 tickLow = int24((log_sqrt10001 - 3402992956809132418596140100660247210) >> 128);
        int24 tickHi = int24((log_sqrt10001 + 291339464771989622907027621153398088495) >> 128);

        tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96 ? tickHi : tickLow;
    }
}


// File contracts/Uniswap_V3/periphery/libraries/OracleLibrary.sol




/// @title Oracle library
/// @notice Provides functions to integrate with V3 pool oracle
library OracleLibrary {
    /// @notice Calculates time-weighted means of tick and liquidity for a given Uniswap V3 pool
    /// @param pool Address of the pool that we want to observe
    /// @param secondsAgo Number of seconds in the past from which to calculate the time-weighted means
    /// @return arithmeticMeanTick The arithmetic mean tick from (block.timestamp - secondsAgo) to block.timestamp
    /// @return harmonicMeanLiquidity The harmonic mean liquidity from (block.timestamp - secondsAgo) to block.timestamp
    function consult(address pool, uint32 secondsAgo)
        internal
        view
        returns (int24 arithmeticMeanTick, uint128 harmonicMeanLiquidity)
    {
        require(secondsAgo != 0, 'BP');

        uint32[] memory secondsAgos = new uint32[](2);
        secondsAgos[0] = secondsAgo;
        secondsAgos[1] = 0;

        (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s) =
            IUniswapV3Pool(pool).observe(secondsAgos);

        int56 tickCumulativesDelta = tickCumulatives[1] - tickCumulatives[0];
        uint160 secondsPerLiquidityCumulativesDelta =
            secondsPerLiquidityCumulativeX128s[1] - secondsPerLiquidityCumulativeX128s[0];

        arithmeticMeanTick = int24(tickCumulativesDelta / int32(secondsAgo));
        // Always round to negative infinity
        if (tickCumulativesDelta < 0 && (tickCumulativesDelta % int32(secondsAgo) != 0)) arithmeticMeanTick--;

        // We are multiplying here instead of shifting to ensure that harmonicMeanLiquidity doesn't overflow uint128
        uint192 secondsAgoX160 = uint192(secondsAgo) * type(uint160).max;
        harmonicMeanLiquidity = uint128(secondsAgoX160 / (uint192(secondsPerLiquidityCumulativesDelta) << 32));
    }

    /// @notice Given a tick and a token amount, calculates the amount of token received in exchange
    /// @param tick Tick value used to calculate the quote
    /// @param baseAmount Amount of token to be converted
    /// @param baseToken Address of an ERC20 token contract used as the baseAmount denomination
    /// @param quoteToken Address of an ERC20 token contract used as the quoteAmount denomination
    /// @return quoteAmount Amount of quoteToken received for baseAmount of baseToken
    function getQuoteAtTick(
        int24 tick,
        uint128 baseAmount,
        address baseToken,
        address quoteToken
    ) internal pure returns (uint256 quoteAmount) {
        uint160 sqrtRatioX96 = TickMath.getSqrtRatioAtTick(tick);

        // Calculate quoteAmount with better precision if it doesn't overflow when multiplied by itself
        if (sqrtRatioX96 <= type(uint128).max) {
            uint256 ratioX192 = uint256(sqrtRatioX96) * sqrtRatioX96;
            quoteAmount = baseToken < quoteToken
                ? FullMath.mulDiv(ratioX192, baseAmount, 1 << 192)
                : FullMath.mulDiv(1 << 192, baseAmount, ratioX192);
        } else {
            uint256 ratioX128 = FullMath.mulDiv(sqrtRatioX96, sqrtRatioX96, 1 << 64);
            quoteAmount = baseToken < quoteToken
                ? FullMath.mulDiv(ratioX128, baseAmount, 1 << 128)
                : FullMath.mulDiv(1 << 128, baseAmount, ratioX128);
        }
    }

    /// @notice Given a pool, it returns the number of seconds ago of the oldest stored observation
    /// @param pool Address of Uniswap V3 pool that we want to observe
    /// @return secondsAgo The number of seconds ago of the oldest observation stored for the pool
    function getOldestObservationSecondsAgo(address pool) internal view returns (uint32 secondsAgo) {
        (, , uint16 observationIndex, uint16 observationCardinality, , , ) = IUniswapV3Pool(pool).slot0();
        require(observationCardinality > 0, 'NI');

        (uint32 observationTimestamp, , , bool initialized) =
            IUniswapV3Pool(pool).observations((observationIndex + 1) % observationCardinality);

        // The next index might not be initialized if the cardinality is in the process of increasing
        // In this case the oldest observation is always in index 0
        if (!initialized) {
            (observationTimestamp, , , ) = IUniswapV3Pool(pool).observations(0);
        }

        secondsAgo = uint32(block.timestamp) - observationTimestamp;
    }

    /// @notice Given a pool, it returns the tick value as of the start of the current block
    /// @param pool Address of Uniswap V3 pool
    /// @return The tick that the pool was in at the start of the current block
    function getBlockStartingTickAndLiquidity(address pool) internal view returns (int24, uint128) {
        (, int24 tick, uint16 observationIndex, uint16 observationCardinality, , , ) = IUniswapV3Pool(pool).slot0();

        // 2 observations are needed to reliably calculate the block starting tick
        require(observationCardinality > 1, 'NEO');

        // If the latest observation occurred in the past, then no tick-changing trades have happened in this block
        // therefore the tick in `slot0` is the same as at the beginning of the current block.
        // We don't need to check if this observation is initialized - it is guaranteed to be.
        (uint32 observationTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, ) =
            IUniswapV3Pool(pool).observations(observationIndex);
        if (observationTimestamp != uint32(block.timestamp)) {
            return (tick, IUniswapV3Pool(pool).liquidity());
        }

        uint256 prevIndex = (uint256(observationIndex) + observationCardinality - 1) % observationCardinality;
        (
            uint32 prevObservationTimestamp,
            int56 prevTickCumulative,
            uint160 prevSecondsPerLiquidityCumulativeX128,
            bool prevInitialized
        ) = IUniswapV3Pool(pool).observations(prevIndex);

        require(prevInitialized, 'ONI');

        uint32 delta = observationTimestamp - prevObservationTimestamp;
        tick = int24((tickCumulative - prevTickCumulative) / int56(int32(delta)));
        uint128 liquidity =
            uint128(
                (uint192(delta) * type(uint160).max) /
                    (uint192(secondsPerLiquidityCumulativeX128 - prevSecondsPerLiquidityCumulativeX128) << 32)
            );
        return (tick, liquidity);
    }

    /// @notice Information for calculating a weighted arithmetic mean tick
    struct WeightedTickData {
        int24 tick;
        uint128 weight;
    }

    /// @notice Given an array of ticks and weights, calculates the weighted arithmetic mean tick
    /// @param weightedTickData An array of ticks and weights
    /// @return weightedArithmeticMeanTick The weighted arithmetic mean tick
    /// @dev Each entry of `weightedTickData` should represents ticks from pools with the same underlying pool tokens. If they do not,
    /// extreme care must be taken to ensure that ticks are comparable (including decimal differences).
    /// @dev Note that the weighted arithmetic mean tick corresponds to the weighted geometric mean price.
    function getWeightedArithmeticMeanTick(WeightedTickData[] memory weightedTickData)
        internal
        pure
        returns (int24 weightedArithmeticMeanTick)
    {
        // Accumulates the sum of products between each tick and its weight
        int256 numerator;

        // Accumulates the sum of the weights
        uint256 denominator;

        // Products fit in 152 bits, so it would take an array of length ~2**104 to overflow this logic
        for (uint256 i; i < weightedTickData.length; i++) {
            numerator += weightedTickData[i].tick * int256(int128(weightedTickData[i].weight));
            denominator += weightedTickData[i].weight;
        }

        weightedArithmeticMeanTick = int24(numerator / int256(denominator));
        // Always round to negative infinity
        if (numerator < 0 && (numerator % int256(denominator) != 0)) weightedArithmeticMeanTick--;
    }

    /// @notice Returns the "synthetic" tick which represents the price of the first entry in `tokens` in terms of the last
    /// @dev Useful for calculating relative prices along routes.
    /// @dev There must be one tick for each pairwise set of tokens.
    /// @param tokens The token contract addresses
    /// @param ticks The ticks, representing the price of each token pair in `tokens`
    /// @return syntheticTick The synthetic tick, representing the relative price of the outermost tokens in `tokens`
    function getChainedPrice(address[] memory tokens, int24[] memory ticks)
        internal
        pure
        returns (int256 syntheticTick)
    {
        require(tokens.length - 1 == ticks.length, 'DL');
        for (uint256 i = 1; i <= ticks.length; i++) {
            // check the tokens for address sort order, then accumulate the
            // ticks into the running synthetic tick, ensuring that intermediate tokens "cancel out"
            tokens[i - 1] < tokens[i] ? syntheticTick += ticks[i - 1] : syntheticTick -= ticks[i - 1];
        }
    }
}


// File contracts/Staking/Owned.sol


// https://docs.synthetix.io/contracts/Owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor (address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    modifier onlyOwner {
        require(msg.sender == owner, "Only the contract owner may perform this action");
        _;
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}


// File contracts/Oracle/UniV3TWAPOracle.sol


// ====================================================================
// |     ______                   _______                             |
// |    / _____________ __  __   / ____(_____  ____ _____  ________   |
// |   / /_  / ___/ __ `| |/_/  / /_  / / __ \/ __ `/ __ \/ ___/ _ \  |
// |  / __/ / /  / /_/ _>  <   / __/ / / / / / /_/ / / / / /__/  __/  |
// | /_/   /_/   \__,_/_/|_|  /_/   /_/_/ /_/\__,_/_/ /_/\___/\___/   |
// |                                                                  |
// ====================================================================
// ========================= UniV3TWAPOracle ==========================
// ====================================================================
// Wraps the in-built UniV3 pool's oracle with the Chainlink-style interface
// Outputs a price in 1e18

// Frax Finance: https://github.com/FraxFinance

// Primary Author(s)
// Travis Moore: https://github.com/FortisFortuna

// Reviewer(s) / Contributor(s)






contract UniV3TWAPOracle is Owned {
    using SafeMath for uint256;

    // Core
    address public timelock_address;
    IUniswapV3Pool public pool;
    ERC20 public token0;
    ERC20 public token1;

    // AggregatorV3Interface stuff
    uint8 public decimals; // For Chainlink mocking
    string public description;
    uint256 public version = 1;

    // Misc
    uint32 public lookback_secs = 300; // 5 minutes
    bool public price_in_token0 = false; // can flip the order of the pricing

    /* ========== MODIFIERS ========== */

    modifier onlyByOwnGov() {
        require(msg.sender == owner || msg.sender == timelock_address, "Not owner or timelock");
        _;
    }

    /* ========== CONSTRUCTOR ========== */

    constructor (
        address _creator_address,
        address _timelock_address,
        address _pool_address,
        uint8 _decimals,
        string memory _description
    ) Owned(_creator_address) {
        timelock_address = _timelock_address;

        // Core
        pool = IUniswapV3Pool(_pool_address);
        token0 = ERC20(pool.token0());
        token1 = ERC20(pool.token1());

        // Make sure both are E18, until you fix this
        require ((token0.decimals() == 18) && (token1.decimals() == 18), 'Must both be 18 decs');

        // Chainlink mocking related
        decimals = _decimals;
        description = _description;
    }

    /* ========== VIEWS ========== */

    function token_symbols() external view returns (string memory base, string memory pricing) {
        if (price_in_token0) {
            base = token1.symbol();
            pricing = token0.symbol();
        }
        else {
            base = token0.symbol();
            pricing = token1.symbol();
        }
    }

    // In E18
    function getPrecisePrice() public view returns (uint256 amount_out) {
        // Get the average price tick first
        (int24 arithmeticMeanTick, ) = OracleLibrary.consult(address(pool), lookback_secs);

        // Get the quote for selling 1 unit of a token. Assumes 1e18 for both.
        if (price_in_token0) {
            amount_out = OracleLibrary.getQuoteAtTick(arithmeticMeanTick, 1e18, address(token1), address(token0));
        }
        else {
            amount_out = OracleLibrary.getQuoteAtTick(arithmeticMeanTick, 1e18, address(token0), address(token1));
        }
    }

    // In E6
    function getPrice() public view returns (uint256) {
        return getPrecisePrice() / 1e12;
    }

    // AggregatorV3Interface / Chainlink compatibility
    function latestRoundData() external view returns (
        uint80 roundId,
        int256 answer,
        uint256 startedAt,
        uint256 updatedAt,
        uint80 answeredInRound
    ) {
        return (0, int256(getPrecisePrice()), 0, block.timestamp, 0);
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    function setTimelock(address _new_timelock_address) external onlyByOwnGov {
        timelock_address = _new_timelock_address;
    }

    // Convenience function
    function increaseObservationCardinality(uint16 _num_cardinals) external onlyByOwnGov {
        pool.increaseObservationCardinalityNext(_num_cardinals);
    }

    function setTWAPLookbackSec(uint32 _secs) external onlyByOwnGov {
        lookback_secs = _secs;
    }

    function toggleTokenForPricing() external onlyByOwnGov {
        price_in_token0 = !price_in_token0;
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_creator_address","type":"address"},{"internalType":"address","name":"_timelock_address","type":"address"},{"internalType":"address","name":"_pool_address","type":"address"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"string","name":"_description","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrecisePrice","outputs":[{"internalType":"uint256","name":"amount_out","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_num_cardinals","type":"uint16"}],"name":"increaseObservationCardinality","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lookback_secs","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"contract IUniswapV3Pool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price_in_token0","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_secs","type":"uint32"}],"name":"setTWAPLookbackSec","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_new_timelock_address","type":"address"}],"name":"setTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timelock_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleTokenForPricing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token_symbols","outputs":[{"internalType":"string","name":"base","type":"string"},{"internalType":"string","name":"pricing","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101775760003560e01c80638da5cb5b116100d8578063b8a40e6c1161008c578063d21220a711610066578063d21220a714610357578063dc6663c714610377578063feaf968c1461039757600080fd5b8063b8a40e6c14610317578063bdacb3031461033c578063c15e7dd01461034f57600080fd5b806398d5fdca116100bd57806398d5fdca146102f4578063ada2b26c146102fc578063b64218b71461030f57600080fd5b80638da5cb5b146102af5780639392a5b9146102cf57600080fd5b806353a47bb71161012f5780636e9b3e30116101145780636e9b3e301461027f5780637284e4161461029257806379ba5097146102a757600080fd5b806353a47bb71461024857806354fd4d501461026857600080fd5b806316f0115b1161016057806316f0115b146101db5780632fb77e88146101fb578063313ce5671461021157600080fd5b80630dfe16811461017c5780631627540c146101c6575b600080fd5b60045461019c9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101d96101d4366004611966565b6103d6565b005b60035461019c9073ffffffffffffffffffffffffffffffffffffffff1681565b6102036104fb565b6040516101bd9291906119fd565b6005546102369074010000000000000000000000000000000000000000900460ff1681565b60405160ff90911681526020016101bd565b60015461019c9073ffffffffffffffffffffffffffffffffffffffff1681565b61027160075481565b6040519081526020016101bd565b6101d961028d366004611a2b565b6107a3565b61029a6108d0565b6040516101bd9190611a4f565b6101d961095e565b60005461019c9073ffffffffffffffffffffffffffffffffffffffff1681565b6008546102e490640100000000900460ff1681565b60405190151581526020016101bd565b610271610aa9565b6101d961030a366004611a62565b610ac8565b610271610ba2565b6008546103279063ffffffff1681565b60405163ffffffff90911681526020016101bd565b6101d961034a366004611966565b610c5a565b6101d9610d44565b60055461019c9073ffffffffffffffffffffffffffffffffffffffff1681565b60025461019c9073ffffffffffffffffffffffffffffffffffffffff1681565b61039f610e24565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a0016101bd565b60005473ffffffffffffffffffffffffffffffffffffffff163314610482576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e000000000000000000000000000000000060648201526084015b60405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229060200160405180910390a150565b6008546060908190640100000000900460ff161561068157600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015610580573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526105c69190810190611b06565b9150600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015610635573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261067b9190810190611b06565b90509091565b60048054604080517f95d89b41000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff909216926395d89b419282820192600092908290030181865afa1580156106ee573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526107349190810190611b06565b9150600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015610635573d6000803e3d6000fd5b60005473ffffffffffffffffffffffffffffffffffffffff163314806107e0575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610846576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610479565b6003546040517f32148f6700000000000000000000000000000000000000000000000000000000815261ffff8316600482015273ffffffffffffffffffffffffffffffffffffffff909116906332148f6790602401600060405180830381600087803b1580156108b557600080fd5b505af11580156108c9573d6000803e3d6000fd5b5050505050565b600680546108dd90611baf565b80601f016020809104026020016040519081016040528092919081815260200182805461090990611baf565b80156109565780601f1061092b57610100808354040283529160200191610956565b820191906000526020600020905b81548152906001019060200180831161093957829003601f168201915b505050505081565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e65727368697000000000000000000000006064820152608401610479565b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff93841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b600064e8d4a51000610ab9610ba2565b610ac39190611c60565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff16331480610b05575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610b6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610479565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff92909216919091179055565b6003546008546000918291610bd39173ffffffffffffffffffffffffffffffffffffffff169063ffffffff16610e48565b50600854909150640100000000900460ff1615610c2557600554600454610c1f918391670de0b6b3a76400009173ffffffffffffffffffffffffffffffffffffffff9081169116611108565b91505090565b600454600554610c1f918391670de0b6b3a76400009173ffffffffffffffffffffffffffffffffffffffff9081169116611108565b60005473ffffffffffffffffffffffffffffffffffffffff16331480610c97575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610cfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610479565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480610d81575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610de7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610479565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff81166401000000009182900460ff1615909102179055565b600080600080600080610e35610ba2565b9096909550600094504293508492509050565b6000808263ffffffff16600003610ebb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f42500000000000000000000000000000000000000000000000000000000000006044820152606401610479565b6040805160028082526060820183526000926020830190803683370190505090508381600081518110610ef057610ef0611c74565b602002602001019063ffffffff16908163ffffffff1681525050600081600181518110610f1f57610f1f611c74565b602002602001019063ffffffff16908163ffffffff16815250506000808673ffffffffffffffffffffffffffffffffffffffff1663883bdbfd846040518263ffffffff1660e01b8152600401610f759190611ca3565b600060405180830381865afa158015610f92573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610fd89190810190611d85565b91509150600082600081518110610ff157610ff1611c74565b60200260200101518360018151811061100c5761100c611c74565b602002602001015161101e9190611e51565b905060008260008151811061103557611035611c74565b60200260200101518360018151811061105057611050611c74565b60200260200101516110629190611eb9565b9050611072600389900b83611eee565b965060008260060b1280156110965750611090600389900b83611f62565b60060b15155b156110a957866110a581611f84565b9750505b60006110cf73ffffffffffffffffffffffffffffffffffffffff63ffffffff8b16611fe1565b90506110f977ffffffffffffffffffffffffffffffffffffffff00000000602084901b1682612021565b96505050505050509250929050565b600080611114866112e2565b90506fffffffffffffffffffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff82161161121357600061116573ffffffffffffffffffffffffffffffffffffffff831680612058565b90508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16106111d5576111d07801000000000000000000000000000000000000000000000000876fffffffffffffffffffffffffffffffff168361177f565b61120b565b61120b81876fffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000061177f565b9250506112d9565b600061123f73ffffffffffffffffffffffffffffffffffffffff8316806801000000000000000061177f565b90508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16106112a7576112a2700100000000000000000000000000000000876fffffffffffffffffffffffffffffffff168361177f565b6112d5565b6112d581876fffffffffffffffffffffffffffffffff1670010000000000000000000000000000000061177f565b9250505b50949350505050565b60008060008360020b126112f9578260020b611306565b8260020b61130690612095565b90506113317ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff276186120cd565b60020b81131561139d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f54000000000000000000000000000000000000000000000000000000000000006044820152606401610479565b6000816001166000036113c1577001000000000000000000000000000000006113d3565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff169050600282161561141257608061140d826ffff97272373d413259a46990580e213a612058565b901c90505b600482161561143c576080611437826ffff2e50f5f656932ef12357cf3c7fdcc612058565b901c90505b6008821615611466576080611461826fffe5caca7e10e4e61c3624eaa0941cd0612058565b901c90505b601082161561149057608061148b826fffcb9843d60f6159c9db58835c926644612058565b901c90505b60208216156114ba5760806114b5826fff973b41fa98c081472e6896dfb254c0612058565b901c90505b60408216156114e45760806114df826fff2ea16466c96a3843ec78b326b52861612058565b901c90505b608082161561150e576080611509826ffe5dee046a99a2a811c461f1969c3053612058565b901c90505b610100821615611539576080611534826ffcbe86c7900a88aedcffc83b479aa3a4612058565b901c90505b61020082161561156457608061155f826ff987a7253ac413176f2b074cf7815e54612058565b901c90505b61040082161561158f57608061158a826ff3392b0822b70005940c7a398e4b70f3612058565b901c90505b6108008216156115ba5760806115b5826fe7159475a2c29b7443b29c7fa6e889d9612058565b901c90505b6110008216156115e55760806115e0826fd097f3bdfd2022b8845ad8f792aa5825612058565b901c90505b61200082161561161057608061160b826fa9f746462d870fdf8a65dc1f90e061e5612058565b901c90505b61400082161561163b576080611636826f70d869a156d2a1b890bb3df62baf32f7612058565b901c90505b618000821615611666576080611661826f31be135f97d08fd981231505542fcfa6612058565b901c90505b6201000082161561169257608061168d826f09aa508b5b7a84e1c677de54f3e99bc9612058565b901c90505b620200008216156116bd5760806116b8826e5d6af8dedb81196699c329225ee604612058565b901c90505b620400008216156116e75760806116e2826d2216e584f5fa1ea926041bedfe98612058565b901c90505b6208000082161561170f57608061170a826b048a170391f7dc42444e8fa2612058565b901c90505b60008460020b131561174857611745817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611c60565b90505b6117576401000000008261210b565b15611763576001611766565b60005b6117779060ff16602083901c61211f565b949350505050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff858709858702925082811083820303915050806000036117d657600084116117cb57600080fd5b50829004905061193a565b8084116117e257600080fd5b600084868809808403938111909203919050600085611821817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612137565b61182c90600161211f565b1695869004959384900493600081900304600101905061184c8184612058565b90931792600061185d876003612058565b600218905061186c8188612058565b611877906002612137565b6118819082612058565b905061188d8188612058565b611898906002612137565b6118a29082612058565b90506118ae8188612058565b6118b9906002612137565b6118c39082612058565b90506118cf8188612058565b6118da906002612137565b6118e49082612058565b90506118f08188612058565b6118fb906002612137565b6119059082612058565b90506119118188612058565b61191c906002612137565b6119269082612058565b90506119328186612058565b955050505050505b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461196357600080fd5b50565b60006020828403121561197857600080fd5b813561193a81611941565b60005b8381101561199e578181015183820152602001611986565b838111156119ad576000848401525b50505050565b600081518084526119cb816020860160208601611983565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b604081526000611a1060408301856119b3565b8281036020840152611a2281856119b3565b95945050505050565b600060208284031215611a3d57600080fd5b813561ffff8116811461193a57600080fd5b60208152600061193a60208301846119b3565b600060208284031215611a7457600080fd5b813563ffffffff8116811461193a57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611afe57611afe611a88565b604052919050565b600060208284031215611b1857600080fd5b815167ffffffffffffffff80821115611b3057600080fd5b818401915084601f830112611b4457600080fd5b815181811115611b5657611b56611a88565b611b8760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611ab7565b9150808252856020828501011115611b9e57600080fd5b6112d9816020840160208601611983565b600181811c90821680611bc357607f821691505b602082108103611bfc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082611c6f57611c6f611c02565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b81811015611ce157835163ffffffff1683529284019291840191600101611cbf565b50909695505050505050565b600067ffffffffffffffff821115611d0757611d07611a88565b5060051b60200190565b600082601f830112611d2257600080fd5b81516020611d37611d3283611ced565b611ab7565b82815260059290921b84018101918181019086841115611d5657600080fd5b8286015b84811015611d7a578051611d6d81611941565b8352918301918301611d5a565b509695505050505050565b60008060408385031215611d9857600080fd5b825167ffffffffffffffff80821115611db057600080fd5b818501915085601f830112611dc457600080fd5b81516020611dd4611d3283611ced565b82815260059290921b84018101918181019089841115611df357600080fd5b948201945b83861015611e215785518060060b8114611e125760008081fd5b82529482019490820190611df8565b91880151919650909350505080821115611e3a57600080fd5b50611e4785828601611d11565b9150509250929050565b60008160060b8360060b60008112817fffffffffffffffffffffffffffffffffffffffffffffffffff8000000000000001831281151615611e9457611e94611c31565b81667fffffffffffff018313811615611eaf57611eaf611c31565b5090039392505050565b600073ffffffffffffffffffffffffffffffffffffffff83811690831681811015611ee657611ee6611c31565b039392505050565b60008160060b8360060b80611f0557611f05611c02565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81147fffffffffffffffffffffffffffffffffffffffffffffffffff8000000000000083141615611f5957611f59611c31565b90059392505050565b60008260060b80611f7557611f75611c02565b808360060b0791505092915050565b60008160020b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8000008103611fb957611fb9611c31565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0192915050565b600077ffffffffffffffffffffffffffffffffffffffffffffffff8083168185168183048111821515161561201857612018611c31565b02949350505050565b600077ffffffffffffffffffffffffffffffffffffffffffffffff8084168061204c5761204c611c02565b92169190910492915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561209057612090611c31565b500290565b60007f800000000000000000000000000000000000000000000000000000000000000082036120c6576120c6611c31565b5060000390565b60008160020b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff800000810361210257612102611c31565b60000392915050565b60008261211a5761211a611c02565b500690565b6000821982111561213257612132611c31565b500190565b60008282101561214957612149611c31565b50039056fea2646970667358221220e393464060dbc50c1d885cc5f9d7f3d6d08fb265681f288c2d7a594260599bc964736f6c634300080d0033

Deployed Bytecode Sourcemap

80977:3513:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81137:19;;;;;;;;;;;;204:42:1;192:55;;;174:74;;162:2;147:18;81137:19:0;;;;;;;;79244:141;;;;;;:::i;:::-;;:::i;:::-;;81104:26;;;;;;;;;82460:323;;;:::i;:::-;;;;;;;;:::i;81227:21::-;;;;;;;;;;;;;;;2069:4:1;2057:17;;;2039:36;;2027:2;2012:18;81227:21:0;1897:184:1;79012:29:0;;;;;;;;;81312:26;;;;;;;;;2463:25:1;;;2451:2;2436:18;81312:26:0;2317:177:1;84098:159:0;;;;;;:::i;:::-;;:::i;81280:25::-;;;:::i;:::-;;;;;;;:::i;79393:271::-;;;:::i;78985:20::-;;;;;;;;;81413:35;;;;;;;;;;;;;;;3166:14:1;;3159:22;3141:41;;3129:2;3114:18;81413:35:0;3001:187:1;83426:100:0;;;:::i;84265:104::-;;;;;;:::i;:::-;;:::i;82806:598::-;;;:::i;81360:33::-;;;;;;;;;;;;3648:10:1;3636:23;;;3618:42;;3606:2;3591:18;81360:33:0;3474:192:1;83928:133:0;;;;;;:::i;:::-;;:::i;84377:108::-;;;:::i;81163:19::-;;;;;;;;;81066:31;;;;;;;;;83590:274;;;:::i;:::-;;;;3934:22:1;3983:15;;;3965:34;;4030:2;4015:18;;4008:34;;;;4058:18;;4051:34;;;;4116:2;4101:18;;4094:34;4165:15;;;4159:3;4144:19;;4137:44;3911:3;3896:19;83590:274:0;3671:516:1;79244:141:0;79724:5;;;;79710:10;:19;79702:79;;;;;;;4394:2:1;79702:79:0;;;4376:21:1;4433:2;4413:18;;;4406:30;4472:34;4452:18;;;4445:62;4543:17;4523:18;;;4516:45;4578:19;;79702:79:0;;;;;;;;;79316:14:::1;:23:::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;;;79355:22:::1;::::0;174:74:1;;;79355:22:0::1;::::0;162:2:1;147:18;79355:22:0::1;;;;;;;79244:141:::0;:::o;82460:323::-;82566:15;;82508:18;;;;82566:15;;;;;82562:214;;;82605:6;;;;;;;;;;;:13;;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;82598:22;;82645:6;;;;;;;;;;;:13;;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;82635:25;;82460:323;;:::o;82562:214::-;82709:6;;;:15;;;;;;;;:6;;;;;:13;;:15;;;;:6;;:15;;;;;;:6;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;82702:22;;82749:6;;;;;;;;;;;:13;;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;84098:159;81596:5;;;;81582:10;:19;;:53;;-1:-1:-1;81619:16:0;;;;81605:10;:30;81582:53;81574:87;;;;;;;6108:2:1;81574:87:0;;;6090:21:1;6147:2;6127:18;;;6120:30;6186:23;6166:18;;;6159:51;6227:18;;81574:87:0;5906:345:1;81574:87:0;84194:4:::1;::::0;:55:::1;::::0;;;;6430:6:1;6418:19;;84194:55:0::1;::::0;::::1;6400:38:1::0;84194:4:0::1;::::0;;::::1;::::0;:39:::1;::::0;6373:18:1;;84194:55:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;84098:159:::0;:::o;81280:25::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;79393:271::-;79462:14;;;;79448:10;:28;79440:94;;;;;;;7093:2:1;79440:94:0;;;7075:21:1;7132:2;7112:18;;;7105:30;7171:34;7151:18;;;7144:62;7242:23;7222:18;;;7215:51;7283:19;;79440:94:0;6891:417:1;79440:94:0;79563:5;;;79570:14;79550:35;;;79563:5;;;;7548:34:1;;79570:14:0;;;;7613:2:1;7598:18;;7591:43;79550:35:0;;7460:18:1;79550:35:0;;;;;;;79604:14;;;;79596:22;;;;;;79604:14;;;79596:22;;;;79629:27;;;79393:271::o;83426:100::-;83467:7;83514:4;83494:17;:15;:17::i;:::-;:24;;;;:::i;:::-;83487:31;;83426:100;:::o;84265:104::-;81596:5;;;;81582:10;:19;;:53;;-1:-1:-1;81619:16:0;;;;81605:10;:30;81582:53;81574:87;;;;;;;6108:2:1;81574:87:0;;;6090:21:1;6147:2;6127:18;;;6120:30;6186:23;6166:18;;;6159:51;6227:18;;81574:87:0;5906:345:1;81574:87:0;84340:13:::1;:21:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;84265:104::o;82806:598::-;82991:4;;82998:13;;82854:18;;;;82961:51;;82991:4;;;82998:13;;82961:21;:51::i;:::-;-1:-1:-1;83109:15:0;;82930:82;;-1:-1:-1;83109:15:0;;;;;83105:292;;;83217:6;;83234;;83154:88;;83183:18;;83203:4;;83217:6;;;;;83234;83154:28;:88::i;:::-;83141:101;;82874:530;82806:598;:::o;83105:292::-;83360:6;;83377;;83297:88;;83326:18;;83346:4;;83360:6;;;;;83377;83297:28;:88::i;83928:133::-;81596:5;;;;81582:10;:19;;:53;;-1:-1:-1;81619:16:0;;;;81605:10;:30;81582:53;81574:87;;;;;;;6108:2:1;81574:87:0;;;6090:21:1;6147:2;6127:18;;;6120:30;6186:23;6166:18;;;6159:51;6227:18;;81574:87:0;5906:345:1;81574:87:0;84013:16:::1;:40:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;83928:133::o;84377:108::-;81596:5;;;;81582:10;:19;;:53;;-1:-1:-1;81619:16:0;;;;81605:10;:30;81582:53;81574:87;;;;;;;6108:2:1;81574:87:0;;;6090:21:1;6147:2;6127:18;;;6120:30;6186:23;6166:18;;;6159:51;6227:18;;81574:87:0;5906:345:1;81574:87:0;84462:15:::1;::::0;;84443:34;;::::1;84462:15:::0;;;;::::1;;;84461:16;84443:34:::0;;::::1;;::::0;;84377:108::o;83590:274::-;83650:14;83675:13;83699:17;83727;83755:22;83804:1;83814:17;:15;:17::i;:::-;83796:60;;;;-1:-1:-1;83834:1:0;;-1:-1:-1;83837:15:0;;-1:-1:-1;83834:1:0;;-1:-1:-1;83590:274:0;-1:-1:-1;83590:274:0:o;70216:1266::-;70316:24;70342:29;70397:10;:15;;70411:1;70397:15;70389:30;;;;;;;8350:2:1;70389:30:0;;;8332:21:1;8389:1;8369:18;;;8362:29;8427:4;8407:18;;;8400:32;8449:18;;70389:30:0;8148:325:1;70389:30:0;70462:15;;;70475:1;70462:15;;;;;;;;70432:27;;70462:15;;;;;;;;;;-1:-1:-1;70462:15:0;70432:45;;70505:10;70488:11;70500:1;70488:14;;;;;;;;:::i;:::-;;;;;;:27;;;;;;;;;;;70543:1;70526:11;70538:1;70526:14;;;;;;;;:::i;:::-;;;;;;:18;;;;;;;;;;;70558:30;70590:51;70673:4;70658:28;;;70687:11;70658:41;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;70557:142;;;;70712:26;70762:15;70778:1;70762:18;;;;;;;;:::i;:::-;;;;;;;70741:15;70757:1;70741:18;;;;;;;;:::i;:::-;;;;;;;:39;;;;:::i;:::-;70712:68;;70791:43;70890:34;70925:1;70890:37;;;;;;;;:::i;:::-;;;;;;;70850:34;70885:1;70850:37;;;;;;;;:::i;:::-;;;;;;;:77;;;;:::i;:::-;70791:136;-1:-1:-1;70967:40:0;;;;;:20;:40;:::i;:::-;70940:68;;71092:1;71069:20;:24;;;:75;;;;-1:-1:-1;71098:40:0;;;;;:20;:40;:::i;:::-;:45;;;;71069:75;71065:101;;;71146:20;;;;:::i;:::-;;;;71065:101;71297:22;71322:39;71344:17;71322:19;;;:39;:::i;:::-;71297:64;-1:-1:-1;71404:69:0;71422:50;71470:2;71422:50;;;;71297:64;71404:69;:::i;:::-;71372:102;;70378:1104;;;;;;70216:1266;;;;;:::o;71994:975::-;72155:19;72187:20;72210:33;72238:4;72210:27;:33::i;:::-;72187:56;-1:-1:-1;72381:17:0;72365:33;;;;72361:601;;72415:17;72435:36;;;;;;:::i;:::-;72415:56;;72512:10;72500:22;;:9;:22;;;:158;;72610:48;72626:8;72636:10;72610:48;;72648:9;72610:15;:48::i;:::-;72500:158;;;72542:48;72558:9;72569:10;72542:48;;72581:8;72542:15;:48::i;:::-;72486:172;;72400:270;72361:601;;;72691:17;72711:52;;;;;72755:7;72711:15;:52::i;:::-;72691:72;;72804:10;72792:22;;:9;:22;;;:158;;72902:48;72918:8;72928:10;72902:48;;72940:9;72902:15;:48::i;:::-;72792:158;;;72834:48;72850:9;72861:10;72834:48;;72873:8;72834:15;:48::i;:::-;72778:172;;72676:286;72361:601;72176:793;71994:975;;;;;;:::o;62036:2618::-;62099:20;62132:15;62157:1;62150:4;:8;;;:57;;62201:4;62194:12;;62150:57;;;62177:4;62170:12;;62169:13;;;:::i;:::-;62132:75;-1:-1:-1;61306:9:0;61144:7;61306:9;:::i;:::-;62245:16;;62233:7;62226:35;;62218:49;;;;;;;14513:2:1;62218:49:0;;;14495:21:1;14552:1;14532:18;;;14525:29;14590:3;14570:18;;;14563:31;14611:18;;62218:49:0;14311:324:1;62218:49:0;62280:13;62296:7;62306:3;62296:13;62313:1;62296:18;:93;;62354:35;62296:93;;;62317:34;62296:93;62280:109;;;-1:-1:-1;62414:3:0;62404:13;;:18;62400:83;;62480:3;62433:42;:5;62441:34;62433:42;:::i;:::-;62432:51;;62424:59;;62400:83;62508:3;62498:13;;:18;62494:83;;62574:3;62527:42;:5;62535:34;62527:42;:::i;:::-;62526:51;;62518:59;;62494:83;62602:3;62592:13;;:18;62588:83;;62668:3;62621:42;:5;62629:34;62621:42;:::i;:::-;62620:51;;62612:59;;62588:83;62696:4;62686:14;;:19;62682:84;;62763:3;62716:42;:5;62724:34;62716:42;:::i;:::-;62715:51;;62707:59;;62682:84;62791:4;62781:14;;:19;62777:84;;62858:3;62811:42;:5;62819:34;62811:42;:::i;:::-;62810:51;;62802:59;;62777:84;62886:4;62876:14;;:19;62872:84;;62953:3;62906:42;:5;62914:34;62906:42;:::i;:::-;62905:51;;62897:59;;62872:84;62981:4;62971:14;;:19;62967:84;;63048:3;63001:42;:5;63009:34;63001:42;:::i;:::-;63000:51;;62992:59;;62967:84;63076:5;63066:15;;:20;63062:85;;63144:3;63097:42;:5;63105:34;63097:42;:::i;:::-;63096:51;;63088:59;;63062:85;63172:5;63162:15;;:20;63158:85;;63240:3;63193:42;:5;63201:34;63193:42;:::i;:::-;63192:51;;63184:59;;63158:85;63268:5;63258:15;;:20;63254:85;;63336:3;63289:42;:5;63297:34;63289:42;:::i;:::-;63288:51;;63280:59;;63254:85;63364:5;63354:15;;:20;63350:85;;63432:3;63385:42;:5;63393:34;63385:42;:::i;:::-;63384:51;;63376:59;;63350:85;63460:6;63450:16;;:21;63446:86;;63529:3;63482:42;:5;63490:34;63482:42;:::i;:::-;63481:51;;63473:59;;63446:86;63557:6;63547:16;;:21;63543:86;;63626:3;63579:42;:5;63587:34;63579:42;:::i;:::-;63578:51;;63570:59;;63543:86;63654:6;63644:16;;:21;63640:86;;63723:3;63676:42;:5;63684:34;63676:42;:::i;:::-;63675:51;;63667:59;;63640:86;63751:6;63741:16;;:21;63737:86;;63820:3;63773:42;:5;63781:34;63773:42;:::i;:::-;63772:51;;63764:59;;63737:86;63848:7;63838:17;;:22;63834:86;;63917:3;63871:41;:5;63879:33;63871:41;:::i;:::-;63870:50;;63862:58;;63834:86;63945:7;63935:17;;:22;63931:85;;64013:3;63968:40;:5;63976:32;63968:40;:::i;:::-;63967:49;;63959:57;;63931:85;64041:7;64031:17;;:22;64027:83;;64107:3;64064:38;:5;64072:30;64064:38;:::i;:::-;64063:47;;64055:55;;64027:83;64135:7;64125:17;;:22;64121:78;;64196:3;64158:33;:5;64166:25;64158:33;:::i;:::-;64157:42;;64149:50;;64121:78;64223:1;64216:4;:8;;;64212:47;;;64234:25;64254:5;64234:17;:25;:::i;:::-;64226:33;;64212:47;64614:17;64623:7;64614:5;:17;:::i;:::-;:22;:30;;64643:1;64614:30;;;64639:1;64614:30;64597:48;;;;64607:2;64598:11;;;64597:48;:::i;:::-;64574:72;62036:2618;-1:-1:-1;;;;62036:2618:0:o;56160:3893::-;56276:14;;;56795:6;56792:1;56789;56782:20;56832:1;56829;56825:9;56816:18;;56884:5;56880:2;56877:13;56869:5;56865:2;56861:14;56857:34;56848:43;;;56977:5;56986:1;56977:10;56973:185;;57026:1;57012:11;:15;57004:24;;;;;;-1:-1:-1;57081:23:0;;;;-1:-1:-1;57133:13:0;;56973:185;57289:5;57275:11;:19;57267:28;;;;;;57580:17;57658:11;57655:1;57652;57645:25;57835:21;;;;57791:20;;57780:32;;;;57632:38;-1:-1:-1;58021:12:0;58076:11;58037:31;58076:11;58037:17;:31;:::i;:::-;:35;;58071:1;58037:35;:::i;:::-;58036:51;58184:22;;;;;58317:16;;;;;58571:1;58567:12;;;58563:23;58588:1;58559:31;;-1:-1:-1;58620:12:0;58559:31;58620:5;:12;:::i;:::-;58611:21;;;;58973:11;58988:15;58992:11;58988:1;:15;:::i;:::-;59007:1;58987:21;;-1:-1:-1;59238:17:0;58987:21;59238:11;:17;:::i;:::-;59234:21;;:1;:21;:::i;:::-;59227:28;;;;:::i;:::-;;-1:-1:-1;59297:17:0;59227:28;59297:11;:17;:::i;:::-;59293:21;;:1;:21;:::i;:::-;59286:28;;;;:::i;:::-;;-1:-1:-1;59357:17:0;59286:28;59357:11;:17;:::i;:::-;59353:21;;:1;:21;:::i;:::-;59346:28;;;;:::i;:::-;;-1:-1:-1;59417:17:0;59346:28;59417:11;:17;:::i;:::-;59413:21;;:1;:21;:::i;:::-;59406:28;;;;:::i;:::-;;-1:-1:-1;59477:17:0;59406:28;59477:11;:17;:::i;:::-;59473:21;;:1;:21;:::i;:::-;59466:28;;;;:::i;:::-;;-1:-1:-1;59538:17:0;59466:28;59538:11;:17;:::i;:::-;59534:21;;:1;:21;:::i;:::-;59527:28;;;;:::i;:::-;;-1:-1:-1;60010:11:0;59527:28;60010:5;:11;:::i;:::-;60001:20;;60032:13;;;;;56160:3893;;;;;;:::o;259:154:1:-;345:42;338:5;334:54;327:5;324:65;314:93;;403:1;400;393:12;314:93;259:154;:::o;418:247::-;477:6;530:2;518:9;509:7;505:23;501:32;498:52;;;546:1;543;536:12;498:52;585:9;572:23;604:31;629:5;604:31;:::i;924:258::-;996:1;1006:113;1020:6;1017:1;1014:13;1006:113;;;1096:11;;;1090:18;1077:11;;;1070:39;1042:2;1035:10;1006:113;;;1137:6;1134:1;1131:13;1128:48;;;1172:1;1163:6;1158:3;1154:16;1147:27;1128:48;;924:258;;;:::o;1187:317::-;1229:3;1267:5;1261:12;1294:6;1289:3;1282:19;1310:63;1366:6;1359:4;1354:3;1350:14;1343:4;1336:5;1332:16;1310:63;:::i;:::-;1418:2;1406:15;1423:66;1402:88;1393:98;;;;1493:4;1389:109;;1187:317;-1:-1:-1;;1187:317:1:o;1509:383::-;1706:2;1695:9;1688:21;1669:4;1732:45;1773:2;1762:9;1758:18;1750:6;1732:45;:::i;:::-;1825:9;1817:6;1813:22;1808:2;1797:9;1793:18;1786:50;1853:33;1879:6;1871;1853:33;:::i;:::-;1845:41;1509:383;-1:-1:-1;;;;;1509:383:1:o;2499:272::-;2557:6;2610:2;2598:9;2589:7;2585:23;2581:32;2578:52;;;2626:1;2623;2616:12;2578:52;2665:9;2652:23;2715:6;2708:5;2704:18;2697:5;2694:29;2684:57;;2737:1;2734;2727:12;2776:220;2925:2;2914:9;2907:21;2888:4;2945:45;2986:2;2975:9;2971:18;2963:6;2945:45;:::i;3193:276::-;3251:6;3304:2;3292:9;3283:7;3279:23;3275:32;3272:52;;;3320:1;3317;3310:12;3272:52;3359:9;3346:23;3409:10;3402:5;3398:22;3391:5;3388:33;3378:61;;3435:1;3432;3425:12;4608:184;4660:77;4657:1;4650:88;4757:4;4754:1;4747:15;4781:4;4778:1;4771:15;4797:334;4868:2;4862:9;4924:2;4914:13;;4929:66;4910:86;4898:99;;5027:18;5012:34;;5048:22;;;5009:62;5006:88;;;5074:18;;:::i;:::-;5110:2;5103:22;4797:334;;-1:-1:-1;4797:334:1:o;5136:765::-;5216:6;5269:2;5257:9;5248:7;5244:23;5240:32;5237:52;;;5285:1;5282;5275:12;5237:52;5318:9;5312:16;5347:18;5388:2;5380:6;5377:14;5374:34;;;5404:1;5401;5394:12;5374:34;5442:6;5431:9;5427:22;5417:32;;5487:7;5480:4;5476:2;5472:13;5468:27;5458:55;;5509:1;5506;5499:12;5458:55;5538:2;5532:9;5560:2;5556;5553:10;5550:36;;;5566:18;;:::i;:::-;5608:112;5716:2;5647:66;5640:4;5636:2;5632:13;5628:86;5624:95;5608:112;:::i;:::-;5595:125;;5743:2;5736:5;5729:17;5783:7;5778:2;5773;5769;5765:11;5761:20;5758:33;5755:53;;;5804:1;5801;5794:12;5755:53;5817:54;5868:2;5863;5856:5;5852:14;5847:2;5843;5839:11;5817:54;:::i;6449:437::-;6528:1;6524:12;;;;6571;;;6592:61;;6646:4;6638:6;6634:17;6624:27;;6592:61;6699:2;6691:6;6688:14;6668:18;6665:38;6662:218;;6736:77;6733:1;6726:88;6837:4;6834:1;6827:15;6865:4;6862:1;6855:15;6662:218;;6449:437;;;:::o;7645:184::-;7697:77;7694:1;7687:88;7794:4;7791:1;7784:15;7818:4;7815:1;7808:15;7834:184;7886:77;7883:1;7876:88;7983:4;7980:1;7973:15;8007:4;8004:1;7997:15;8023:120;8063:1;8089;8079:35;;8094:18;;:::i;:::-;-1:-1:-1;8128:9:1;;8023:120::o;8478:184::-;8530:77;8527:1;8520:88;8627:4;8624:1;8617:15;8651:4;8648:1;8641:15;8667:647;8836:2;8888:21;;;8958:13;;8861:18;;;8980:22;;;8807:4;;8836:2;9059:15;;;;9033:2;9018:18;;;8807:4;9102:186;9116:6;9113:1;9110:13;9102:186;;;9181:13;;9196:10;9177:30;9165:43;;9263:15;;;;9228:12;;;;9138:1;9131:9;9102:186;;;-1:-1:-1;9305:3:1;;8667:647;-1:-1:-1;;;;;;8667:647:1:o;9319:181::-;9377:4;9410:18;9402:6;9399:30;9396:56;;;9432:18;;:::i;:::-;-1:-1:-1;9477:1:1;9473:14;9489:4;9469:25;;9319:181::o;9505:732::-;9570:5;9623:3;9616:4;9608:6;9604:17;9600:27;9590:55;;9641:1;9638;9631:12;9590:55;9670:6;9664:13;9696:4;9720:58;9736:41;9774:2;9736:41;:::i;:::-;9720:58;:::i;:::-;9812:15;;;9898:1;9894:10;;;;9882:23;;9878:32;;;9843:12;;;;9922:15;;;9919:35;;;9950:1;9947;9940:12;9919:35;9986:2;9978:6;9974:15;9998:210;10014:6;10009:3;10006:15;9998:210;;;10087:3;10081:10;10104:31;10129:5;10104:31;:::i;:::-;10148:18;;10186:12;;;;10031;;9998:210;;;-1:-1:-1;10226:5:1;9505:732;-1:-1:-1;;;;;;9505:732:1:o;10242:1303::-;10369:6;10377;10430:2;10418:9;10409:7;10405:23;10401:32;10398:52;;;10446:1;10443;10436:12;10398:52;10479:9;10473:16;10508:18;10549:2;10541:6;10538:14;10535:34;;;10565:1;10562;10555:12;10535:34;10603:6;10592:9;10588:22;10578:32;;10648:7;10641:4;10637:2;10633:13;10629:27;10619:55;;10670:1;10667;10660:12;10619:55;10699:2;10693:9;10721:4;10745:58;10761:41;10799:2;10761:41;:::i;10745:58::-;10837:15;;;10919:1;10915:10;;;;10907:19;;10903:28;;;10868:12;;;;10943:19;;;10940:39;;;10975:1;10972;10965:12;10940:39;10999:11;;;;11019:308;11035:6;11030:3;11027:15;11019:308;;;11108:3;11102:10;11159:5;11156:1;11145:20;11138:5;11135:31;11125:129;;11208:1;11237:2;11233;11226:14;11125:129;11267:18;;11052:12;;;;11305;;;;11019:308;;;11382:18;;;11376:25;11346:5;;-1:-1:-1;11376:25:1;;-1:-1:-1;;;11413:16:1;;;11410:36;;;11442:1;11439;11432:12;11410:36;;11465:74;11531:7;11520:8;11509:9;11505:24;11465:74;:::i;:::-;11455:84;;;10242:1303;;;;;:::o;11550:404::-;11588:4;11632:1;11629;11618:16;11668:1;11665;11654:16;11698:1;11693:3;11689:11;11809:3;11741:66;11737:76;11732:3;11728:86;11723:2;11716:10;11712:103;11709:129;;;11818:18;;:::i;:::-;11889:3;11871:16;11867:26;11862:3;11858:36;11854:2;11850:45;11847:71;;;11898:18;;:::i;:::-;-1:-1:-1;11935:13:1;;;11550:404;-1:-1:-1;;;11550:404:1:o;11959:254::-;11999:4;12028:42;12120:10;;;;12090;;12142:12;;;12139:38;;;12157:18;;:::i;:::-;12194:13;;11959:254;-1:-1:-1;;;11959:254:1:o;12218:389::-;12256:1;12297;12294;12283:16;12333:1;12330;12319:16;12354:3;12344:37;;12361:18;;:::i;:::-;12482:66;12477:3;12474:75;12405:66;12400:3;12397:75;12393:157;12390:183;;;12553:18;;:::i;:::-;12587:14;;;12218:389;-1:-1:-1;;;12218:389:1:o;12612:166::-;12642:1;12683;12680;12669:16;12704:3;12694:37;;12711:18;;:::i;:::-;12768:3;12764:1;12761;12750:16;12745:27;12740:32;;;12612:166;;;;:::o;12783:306::-;12820:3;12867:5;12864:1;12853:20;12897:66;12888:7;12885:79;12882:105;;12967:18;;:::i;:::-;13016:66;13003:80;;12783:306;-1:-1:-1;;12783:306:1:o;13094:303::-;13134:7;13166:50;13243:2;13240:1;13236:10;13273:2;13270:1;13266:10;13329:3;13325:2;13321:12;13316:3;13313:21;13306:3;13299:11;13292:19;13288:47;13285:73;;;13338:18;;:::i;:::-;13378:13;;13094:303;-1:-1:-1;;;;13094:303:1:o;13402:232::-;13442:1;13468:50;13545:2;13542:1;13538:10;13567:3;13557:37;;13574:18;;:::i;:::-;13612:10;;13608:20;;;;;13402:232;-1:-1:-1;;13402:232:1:o;13639:228::-;13679:7;13805:1;13737:66;13733:74;13730:1;13727:81;13722:1;13715:9;13708:17;13704:105;13701:131;;;13812:18;;:::i;:::-;-1:-1:-1;13852:9:1;;13639:228::o;13872:191::-;13907:3;13938:66;13931:5;13928:77;13925:103;;14008:18;;:::i;:::-;-1:-1:-1;14048:1:1;14044:13;;13872:191::o;14068:238::-;14102:3;14149:5;14146:1;14135:20;14179:66;14170:7;14167:79;14164:105;;14249:18;;:::i;:::-;14289:1;14285:15;;14068:238;-1:-1:-1;;14068:238:1:o;14640:112::-;14672:1;14698;14688:35;;14703:18;;:::i;:::-;-1:-1:-1;14737:9:1;;14640:112::o;14757:128::-;14797:3;14828:1;14824:6;14821:1;14818:13;14815:39;;;14834:18;;:::i;:::-;-1:-1:-1;14870:9:1;;14757:128::o;14890:125::-;14930:4;14958:1;14955;14952:8;14949:34;;;14963:18;;:::i;:::-;-1:-1:-1;15000:9:1;;14890:125::o

Swarm Source

ipfs://e393464060dbc50c1d885cc5f9d7f3d6d08fb265681f288c2d7a594260599bc9

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.