Contract 0x4A224CD0517f08B26608a2f73bF390b01a6618c8

 
Ad
Crypto.com
Txn Hash Method
Block
From
To
Value
0xf1dc56d1c030b4441c53b06b3de56ae33a659c05d64a6f68ee151a7675ffbebeTransfer Ownersh...114621772020-12-16 5:17:18282 days 7 hrs ago0x8f3e8a974d6eb27316054147fdf0e960dab2e1b3 IN  0x4a224cd0517f08b26608a2f73bf390b01a6618c80 Ether0.00169493555
0x311c90a9411131a7473e916f6893559658f6fe334e1a315c19680c1147f00bb50x60806040114621402020-12-16 5:07:49282 days 7 hrs ago0x8f3e8a974d6eb27316054147fdf0e960dab2e1b3 IN  Create: UniswapLPOracleFactory0 Ether0.14552092555
[ Download CSV Export 
Latest 6 internal transactions
Parent Txn Hash Block From To Value
0xbd03ffc80eff983579f3a8ecdf7afdb8ccfc69e1e59fba85e53d34e6a87ce80f114622652020-12-16 5:36:56282 days 7 hrs ago 0x4a224cd0517f08b26608a2f73bf390b01a6618c8  Contract Creation0 Ether
0x75da6bc3fb01c1697554975e22774ae0a72094b5197e2eb587430ac2080bb8b5114622632020-12-16 5:36:43282 days 7 hrs ago 0x4a224cd0517f08b26608a2f73bf390b01a6618c8  Contract Creation0 Ether
0x1c766aa67662dfc77e360ae41ecb9697eb7418bac39d489d2c2bd595064e0999114622112020-12-16 5:24:32282 days 7 hrs ago 0x4a224cd0517f08b26608a2f73bf390b01a6618c8  Contract Creation0 Ether
0x36effd58d2cc1f4404a95d984c77ec8233d5feaf819962a0e4fc619b7f4d7dd6114622092020-12-16 5:24:12282 days 7 hrs ago 0x4a224cd0517f08b26608a2f73bf390b01a6618c8  Contract Creation0 Ether
0x08a0c46d0e261748b7bfc3a2787ffd35391703ea0389d14c33282c9f3159c429114622042020-12-16 5:23:24282 days 7 hrs ago 0x4a224cd0517f08b26608a2f73bf390b01a6618c8  Contract Creation0 Ether
0x08a0c46d0e261748b7bfc3a2787ffd35391703ea0389d14c33282c9f3159c429114622042020-12-16 5:23:24282 days 7 hrs ago 0x4a224cd0517f08b26608a2f73bf390b01a6618c8  Contract Creation0 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UniswapLPOracleFactory

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

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

// File: node_modules\@openzeppelin\contracts\GSN\Context.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

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

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

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

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

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

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

// File: @uniswap\v2-core\contracts\interfaces\IUniswapV2Factory.sol

pragma solidity >=0.5.0;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

// File: @uniswap\lib\contracts\libraries\TransferHelper.sol

pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferETH(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
    }
}

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

pragma solidity >=0.6.2;

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

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

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

// File: node_modules\@uniswap\v2-periphery\contracts\interfaces\IUniswapV2Router02.sol

pragma solidity >=0.6.2;


interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

// File: @uniswap\v2-core\contracts\interfaces\IUniswapV2Pair.sol

pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

// File: node_modules\@uniswap\v2-periphery\contracts\libraries\SafeMath.sol

pragma solidity =0.6.6;

// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)

library SafeMath {
    function add(uint x, uint y) internal pure returns (uint z) {
        require((z = x + y) >= x, 'ds-math-add-overflow');
    }

    function sub(uint x, uint y) internal pure returns (uint z) {
        require((z = x - y) <= x, 'ds-math-sub-underflow');
    }

    function mul(uint x, uint y) internal pure returns (uint z) {
        require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');
    }
}

// File: node_modules\@uniswap\v2-periphery\contracts\interfaces\IERC20.sol

pragma solidity >=0.5.0;

interface IERC20 {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
}

// File: node_modules\@uniswap\v2-periphery\contracts\interfaces\IWETH.sol

pragma solidity >=0.5.0;

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

// File: @uniswap\v2-periphery\contracts\UniswapV2Router02.sol

pragma solidity =0.6.6;








contract UniswapV2Router02 is IUniswapV2Router02 {
    using SafeMath for uint;

    address public immutable override factory;
    address public immutable override WETH;

    modifier ensure(uint deadline) {
        require(deadline >= block.timestamp, 'UniswapV2Router: EXPIRED');
        _;
    }

    constructor(address _factory, address _WETH) public {
        factory = _factory;
        WETH = _WETH;
    }

    receive() external payable {
        assert(msg.sender == WETH); // only accept ETH via fallback from the WETH contract
    }

    // **** ADD LIQUIDITY ****
    function _addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin
    ) internal virtual returns (uint amountA, uint amountB) {
        // create the pair if it doesn't exist yet
        if (IUniswapV2Factory(factory).getPair(tokenA, tokenB) == address(0)) {
            IUniswapV2Factory(factory).createPair(tokenA, tokenB);
        }
        (uint reserveA, uint reserveB) = UniswapV2Library.getReserves(factory, tokenA, tokenB);
        if (reserveA == 0 && reserveB == 0) {
            (amountA, amountB) = (amountADesired, amountBDesired);
        } else {
            uint amountBOptimal = UniswapV2Library.quote(amountADesired, reserveA, reserveB);
            if (amountBOptimal <= amountBDesired) {
                require(amountBOptimal >= amountBMin, 'UniswapV2Router: INSUFFICIENT_B_AMOUNT');
                (amountA, amountB) = (amountADesired, amountBOptimal);
            } else {
                uint amountAOptimal = UniswapV2Library.quote(amountBDesired, reserveB, reserveA);
                assert(amountAOptimal <= amountADesired);
                require(amountAOptimal >= amountAMin, 'UniswapV2Router: INSUFFICIENT_A_AMOUNT');
                (amountA, amountB) = (amountAOptimal, amountBDesired);
            }
        }
    }
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint amountA, uint amountB, uint liquidity) {
        (amountA, amountB) = _addLiquidity(tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin);
        address pair = UniswapV2Library.pairFor(factory, tokenA, tokenB);
        TransferHelper.safeTransferFrom(tokenA, msg.sender, pair, amountA);
        TransferHelper.safeTransferFrom(tokenB, msg.sender, pair, amountB);
        liquidity = IUniswapV2Pair(pair).mint(to);
    }
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountETH, uint liquidity) {
        (amountToken, amountETH) = _addLiquidity(
            token,
            WETH,
            amountTokenDesired,
            msg.value,
            amountTokenMin,
            amountETHMin
        );
        address pair = UniswapV2Library.pairFor(factory, token, WETH);
        TransferHelper.safeTransferFrom(token, msg.sender, pair, amountToken);
        IWETH(WETH).deposit{value: amountETH}();
        assert(IWETH(WETH).transfer(pair, amountETH));
        liquidity = IUniswapV2Pair(pair).mint(to);
        // refund dust eth, if any
        if (msg.value > amountETH) TransferHelper.safeTransferETH(msg.sender, msg.value - amountETH);
    }

    // **** REMOVE LIQUIDITY ****
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountA, uint amountB) {
        address pair = UniswapV2Library.pairFor(factory, tokenA, tokenB);
        IUniswapV2Pair(pair).transferFrom(msg.sender, pair, liquidity); // send liquidity to pair
        (uint amount0, uint amount1) = IUniswapV2Pair(pair).burn(to);
        (address token0,) = UniswapV2Library.sortTokens(tokenA, tokenB);
        (amountA, amountB) = tokenA == token0 ? (amount0, amount1) : (amount1, amount0);
        require(amountA >= amountAMin, 'UniswapV2Router: INSUFFICIENT_A_AMOUNT');
        require(amountB >= amountBMin, 'UniswapV2Router: INSUFFICIENT_B_AMOUNT');
    }
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountToken, uint amountETH) {
        (amountToken, amountETH) = removeLiquidity(
            token,
            WETH,
            liquidity,
            amountTokenMin,
            amountETHMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, amountToken);
        IWETH(WETH).withdraw(amountETH);
        TransferHelper.safeTransferETH(to, amountETH);
    }
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountA, uint amountB) {
        address pair = UniswapV2Library.pairFor(factory, tokenA, tokenB);
        uint value = approveMax ? uint(-1) : liquidity;
        IUniswapV2Pair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountA, amountB) = removeLiquidity(tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline);
    }
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountToken, uint amountETH) {
        address pair = UniswapV2Library.pairFor(factory, token, WETH);
        uint value = approveMax ? uint(-1) : liquidity;
        IUniswapV2Pair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountToken, amountETH) = removeLiquidityETH(token, liquidity, amountTokenMin, amountETHMin, to, deadline);
    }

    // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) ****
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountETH) {
        (, amountETH) = removeLiquidity(
            token,
            WETH,
            liquidity,
            amountTokenMin,
            amountETHMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, IERC20(token).balanceOf(address(this)));
        IWETH(WETH).withdraw(amountETH);
        TransferHelper.safeTransferETH(to, amountETH);
    }
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountETH) {
        address pair = UniswapV2Library.pairFor(factory, token, WETH);
        uint value = approveMax ? uint(-1) : liquidity;
        IUniswapV2Pair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        amountETH = removeLiquidityETHSupportingFeeOnTransferTokens(
            token, liquidity, amountTokenMin, amountETHMin, to, deadline
        );
    }

    // **** SWAP ****
    // requires the initial amount to have already been sent to the first pair
    function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual {
        for (uint i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0,) = UniswapV2Library.sortTokens(input, output);
            uint amountOut = amounts[i + 1];
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOut) : (amountOut, uint(0));
            address to = i < path.length - 2 ? UniswapV2Library.pairFor(factory, output, path[i + 2]) : _to;
            IUniswapV2Pair(UniswapV2Library.pairFor(factory, input, output)).swap(
                amount0Out, amount1Out, to, new bytes(0)
            );
        }
    }
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint[] memory amounts) {
        amounts = UniswapV2Library.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, UniswapV2Library.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, to);
    }
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint[] memory amounts) {
        amounts = UniswapV2Library.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'UniswapV2Router: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, UniswapV2Library.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, to);
    }
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == WETH, 'UniswapV2Router: INVALID_PATH');
        amounts = UniswapV2Library.getAmountsOut(factory, msg.value, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT');
        IWETH(WETH).deposit{value: amounts[0]}();
        assert(IWETH(WETH).transfer(UniswapV2Library.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
    }
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[path.length - 1] == WETH, 'UniswapV2Router: INVALID_PATH');
        amounts = UniswapV2Library.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'UniswapV2Router: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, UniswapV2Library.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        IWETH(WETH).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferETH(to, amounts[amounts.length - 1]);
    }
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[path.length - 1] == WETH, 'UniswapV2Router: INVALID_PATH');
        amounts = UniswapV2Library.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, UniswapV2Library.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        IWETH(WETH).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferETH(to, amounts[amounts.length - 1]);
    }
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == WETH, 'UniswapV2Router: INVALID_PATH');
        amounts = UniswapV2Library.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= msg.value, 'UniswapV2Router: EXCESSIVE_INPUT_AMOUNT');
        IWETH(WETH).deposit{value: amounts[0]}();
        assert(IWETH(WETH).transfer(UniswapV2Library.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
        // refund dust eth, if any
        if (msg.value > amounts[0]) TransferHelper.safeTransferETH(msg.sender, msg.value - amounts[0]);
    }

    // **** SWAP (supporting fee-on-transfer tokens) ****
    // requires the initial amount to have already been sent to the first pair
    function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual {
        for (uint i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0,) = UniswapV2Library.sortTokens(input, output);
            IUniswapV2Pair pair = IUniswapV2Pair(UniswapV2Library.pairFor(factory, input, output));
            uint amountInput;
            uint amountOutput;
            { // scope to avoid stack too deep errors
            (uint reserve0, uint reserve1,) = pair.getReserves();
            (uint reserveInput, uint reserveOutput) = input == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
            amountInput = IERC20(input).balanceOf(address(pair)).sub(reserveInput);
            amountOutput = UniswapV2Library.getAmountOut(amountInput, reserveInput, reserveOutput);
            }
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOutput) : (amountOutput, uint(0));
            address to = i < path.length - 2 ? UniswapV2Library.pairFor(factory, output, path[i + 2]) : _to;
            pair.swap(amount0Out, amount1Out, to, new bytes(0));
        }
    }
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) {
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, UniswapV2Library.pairFor(factory, path[0], path[1]), amountIn
        );
        uint balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        payable
        ensure(deadline)
    {
        require(path[0] == WETH, 'UniswapV2Router: INVALID_PATH');
        uint amountIn = msg.value;
        IWETH(WETH).deposit{value: amountIn}();
        assert(IWETH(WETH).transfer(UniswapV2Library.pairFor(factory, path[0], path[1]), amountIn));
        uint balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        ensure(deadline)
    {
        require(path[path.length - 1] == WETH, 'UniswapV2Router: INVALID_PATH');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, UniswapV2Library.pairFor(factory, path[0], path[1]), amountIn
        );
        _swapSupportingFeeOnTransferTokens(path, address(this));
        uint amountOut = IERC20(WETH).balanceOf(address(this));
        require(amountOut >= amountOutMin, 'UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT');
        IWETH(WETH).withdraw(amountOut);
        TransferHelper.safeTransferETH(to, amountOut);
    }

    // **** LIBRARY FUNCTIONS ****
    function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) {
        return UniswapV2Library.quote(amountA, reserveA, reserveB);
    }

    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut)
        public
        pure
        virtual
        override
        returns (uint amountOut)
    {
        return UniswapV2Library.getAmountOut(amountIn, reserveIn, reserveOut);
    }

    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut)
        public
        pure
        virtual
        override
        returns (uint amountIn)
    {
        return UniswapV2Library.getAmountIn(amountOut, reserveIn, reserveOut);
    }

    function getAmountsOut(uint amountIn, address[] memory path)
        public
        view
        virtual
        override
        returns (uint[] memory amounts)
    {
        return UniswapV2Library.getAmountsOut(factory, amountIn, path);
    }

    function getAmountsIn(uint amountOut, address[] memory path)
        public
        view
        virtual
        override
        returns (uint[] memory amounts)
    {
        return UniswapV2Library.getAmountsIn(factory, amountOut, path);
    }
}

// File: @uniswap\v2-periphery\contracts\libraries\UniswapV2Library.sol

pragma solidity >=0.5.0;



library UniswapV2Library {
    using SafeMath for uint;

    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
        require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');
        (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);
        pair = address(uint(keccak256(abi.encodePacked(
                hex'ff',
                factory,
                keccak256(abi.encodePacked(token0, token1)),
                hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash
            ))));
    }

    // fetches and sorts the reserves for a pair
    function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
        (address token0,) = sortTokens(tokenA, tokenB);
        (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();
        (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
    }

    // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
    function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
        require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');
        require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        amountB = amountA.mul(reserveB) / reserveA;
    }

    // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
        require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        uint amountInWithFee = amountIn.mul(997);
        uint numerator = amountInWithFee.mul(reserveOut);
        uint denominator = reserveIn.mul(1000).add(amountInWithFee);
        amountOut = numerator / denominator;
    }

    // given an output amount of an asset and pair reserves, returns a required input amount of the other asset
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
        require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        uint numerator = reserveIn.mul(amountOut).mul(1000);
        uint denominator = reserveOut.sub(amountOut).mul(997);
        amountIn = (numerator / denominator).add(1);
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[0] = amountIn;
        for (uint i; i < path.length - 1; i++) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);
            amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
        }
    }

    // performs chained getAmountIn calculations on any number of pairs
    function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[amounts.length - 1] = amountOut;
        for (uint i = path.length - 1; i > 0; i--) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);
            amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
        }
    }
}

// File: @uniswap\lib\contracts\libraries\FixedPoint.sol

pragma solidity >=0.4.0;

// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
library FixedPoint {
    // range: [0, 2**112 - 1]
    // resolution: 1 / 2**112
    struct uq112x112 {
        uint224 _x;
    }

    // range: [0, 2**144 - 1]
    // resolution: 1 / 2**112
    struct uq144x112 {
        uint _x;
    }

    uint8 private constant RESOLUTION = 112;

    // encode a uint112 as a UQ112x112
    function encode(uint112 x) internal pure returns (uq112x112 memory) {
        return uq112x112(uint224(x) << RESOLUTION);
    }

    // encodes a uint144 as a UQ144x112
    function encode144(uint144 x) internal pure returns (uq144x112 memory) {
        return uq144x112(uint256(x) << RESOLUTION);
    }

    // divide a UQ112x112 by a uint112, returning a UQ112x112
    function div(uq112x112 memory self, uint112 x) internal pure returns (uq112x112 memory) {
        require(x != 0, 'FixedPoint: DIV_BY_ZERO');
        return uq112x112(self._x / uint224(x));
    }

    // multiply a UQ112x112 by a uint, returning a UQ144x112
    // reverts on overflow
    function mul(uq112x112 memory self, uint y) internal pure returns (uq144x112 memory) {
        uint z;
        require(y == 0 || (z = uint(self._x) * y) / y == uint(self._x), "FixedPoint: MULTIPLICATION_OVERFLOW");
        return uq144x112(z);
    }

    // returns a UQ112x112 which represents the ratio of the numerator to the denominator
    // equivalent to encode(numerator).div(denominator)
    function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) {
        require(denominator > 0, "FixedPoint: DIV_BY_ZERO");
        return uq112x112((uint224(numerator) << RESOLUTION) / denominator);
    }

    // decode a UQ112x112 into a uint112 by truncating after the radix point
    function decode(uq112x112 memory self) internal pure returns (uint112) {
        return uint112(self._x >> RESOLUTION);
    }

    // decode a UQ144x112 into a uint144 by truncating after the radix point
    function decode144(uq144x112 memory self) internal pure returns (uint144) {
        return uint144(self._x >> RESOLUTION);
    }
}

// File: @uniswap\v2-periphery\contracts\libraries\UniswapV2OracleLibrary.sol

pragma solidity >=0.5.0;



// library with helper methods for oracles that are concerned with computing average prices
library UniswapV2OracleLibrary {
    using FixedPoint for *;

    // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]
    function currentBlockTimestamp() internal view returns (uint32) {
        return uint32(block.timestamp % 2 ** 32);
    }

    // produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
    function currentCumulativePrices(
        address pair
    ) internal view returns (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) {
        blockTimestamp = currentBlockTimestamp();
        price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast();
        price1Cumulative = IUniswapV2Pair(pair).price1CumulativeLast();

        // if time has elapsed since the last update on the pair, mock the accumulated price values
        (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) = IUniswapV2Pair(pair).getReserves();
        if (blockTimestampLast != blockTimestamp) {
            // subtraction overflow is desired
            uint32 timeElapsed = blockTimestamp - blockTimestampLast;
            // addition overflow is desired
            // counterfactual
            price0Cumulative += uint(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed;
            // counterfactual
            price1Cumulative += uint(FixedPoint.fraction(reserve0, reserve1)._x) * timeElapsed;
        }
    }
}

// File: contracts\UniswapLPOracleInstance.sol

pragma solidity ^0.6.2;







contract UniswapLPOracleInstance is Ownable {
    using SafeMath for uint256;

    // fixed window oracle that recomputes the average price for the entire period once every period
    // note that the price average is only guaranteed to be over at least 1 period, but may be over a longer period

    using FixedPoint for *;

    uint256 public constant PERIOD = 1 hours;

    IUniswapV2Pair public pair;
    address public token0;
    address public token1;

    uint256 public price0CumulativeLast;
    uint256 public price1CumulativeLast;
    uint32 public blockTimestampLast;
    bool public firstRun;
    FixedPoint.uq112x112 public price0Average;
    FixedPoint.uq112x112 public price1Average;

    /**
    @notice the constructor function is fired once during token creation to initialize the oracle contract to a specific token pair
    @param _factory is the address of the Uniswap factory contract
    @param _tokenA is the address of the asset being looked up
    @param _tokenB is the address of the USDC token
    **/
    constructor(
        address _factory,
        address _tokenA,
        address _tokenB
    ) public {
        if (_tokenA == _tokenB) {
            price0Average = FixedPoint.uq112x112(uint224(1));
            price1Average = FixedPoint.uq112x112(uint224(1));
        } else {
            IUniswapV2Pair _pair = IUniswapV2Pair(
                UniswapV2Library.pairFor(_factory, _tokenA, _tokenB)
            );
            pair = _pair;
            token0 = _pair.token0();
            token1 = _pair.token1();
            price0CumulativeLast = _pair.price0CumulativeLast(); // fetch the current accumulated price value (1 / 0)
            price1CumulativeLast = _pair.price1CumulativeLast(); // fetch the current accumulated price value (0 / 1)
            uint112 reserve0;
            uint112 reserve1;
            (reserve0, reserve1, blockTimestampLast) = _pair.getReserves();
            require(reserve0 != 0 && reserve1 != 0, "NO_RESERVES"); // ensure that there's liquidity in the pair
            firstRun = true;
            update();
            firstRun = false;
        }
    }

    /**
    @notice update updates the prices for the input token pair over a set 24hour period
    @dev this is an internal function called by consult if the timeElapsed is greater than 24 hours
    **/
    function update() public {
        (
            uint256 price0Cumulative,
            uint256 price1Cumulative,
            uint32 blockTimestamp
        ) = UniswapV2OracleLibrary.currentCumulativePrices(address(pair));
        uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired

        //check if this is the first update
        if (timeElapsed >= PERIOD || firstRun == true) {
            // ensure that at least one full period has passed since the last update
            // cumulative price is in (uq112x112 price * seconds) units so we simply wrap it after division by time elapsed
            price0Average = FixedPoint.uq112x112(
                uint224((price0Cumulative - price0CumulativeLast) / timeElapsed)
            );
            price1Average = FixedPoint.uq112x112(
                uint224((price1Cumulative - price1CumulativeLast) / timeElapsed)
            );

            price0CumulativeLast = price0Cumulative;
            price1CumulativeLast = price1Cumulative;
            blockTimestampLast = blockTimestamp;
        }
    }

    /**
    @notice consult returns the price of a token in USDC
    @return price is the price of one asset in USDC(example 1WETH in USDC)
    **/
    function consult(address token, uint256 amount)
        external
        returns (uint256 price)
    {
        if (token0 == address(0)) {
            return amount;
        }

        if (token == token0) {
            update();
            price = price0Average.mul(amount).decode144();
        } else {
            require(token == token1, "INVALID_TOKEN");
            price = price1Average.mul(amount).decode144();
        }
    }

    /**
    @notice viewPrice is a view function that retreives the current price without having to run the update function
    @return price is the price of one asset in USDC(example 1WETH in USDC)
    **/
    function viewPrice(address token, uint256 amount)
        external
        view
        returns (uint256 price)
    {
        if (token0 == address(0)) {
            return amount;
        }

        if (token == token0) {
            price = price0Average.mul(amount).decode144();
        } else {
            require(token == token1, "INVALID_TOKEN");
            price = price1Average.mul(amount).decode144();
        }
    }
}

// File: contracts\interfaces\ExtendedIERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface ExtendedIERC20 {
    function decimals() external view returns (uint8);

    /**
     * @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\UniswapLPOracleFactory.sol

pragma solidity ^0.6.2;






////////////////////////////////////////////////////////////////////////////////////////////
/// @title UniswapLPOracleFactory
/// @author Christopher Dixon
////////////////////////////////////////////////////////////////////////////////////////////
/**
The UniswapLPOracleFactory contract is designed to produce individual UniswapLPOracleInstance contracts
This contract uses the OpenZeppelin contract Library to inherit functions from
  Ownable.sol
**/

contract UniswapLPOracleFactory is Ownable {
    using SafeMath for uint256;
    address public usdc_add;
    address public factory;
    IUniswapV2Router02 public uniswapRouter;

    mapping(address => address[]) public LPAssetTracker;
    mapping(address => address) public instanceTracker;
    mapping(address => address) public tokenToUSDC;

    /**
    @notice constructor function is fired once during contract creation. This constructor initializes uniswapRouter
            as a usable contract instance within the UniswapLPOracleFactory
    @param usdcAdd is the address of the ERC20 USDC address
    @param _uniFactoryAdd is the address of the uniswap factory contract
    **/
    constructor(
        address usdcAdd,
        address _uniFactoryAdd,
        address _uniRouterAddress
    ) public {
        uniswapRouter = IUniswapV2Router02(_uniRouterAddress);
        usdc_add = usdcAdd;
        factory = _uniFactoryAdd;
    }

    function USDC() public view returns (address) {
        return usdc_add;
    }

    function OneUSDC() public view returns (uint256) {
        return OneToken(usdc_add);
    }

    function OneToken(address token) public view returns (uint256) {
        ExtendedIERC20 ercToken = ExtendedIERC20(token);
        return uint256(10)**uint256(ercToken.decimals());
    }

    function sortTokens(address tokenA, address tokenB)
        internal
        pure
        returns (address token0, address token1)
    {
        require(tokenA != tokenB, "IDENTICAL_ADDRESSES");
        (token0, token1) = tokenA < tokenB
            ? (tokenA, tokenB)
            : (tokenB, tokenA);
        require(token0 != address(0), "ZERO_ADDRESS");
    }

    /**
    @notice createNewOracle allows the owner of this contract to deploy deploy two new asset oracle contracts
            when a new LP token is whitelisted. this contract will link the address of an LP token contract to
            two seperate oracles that are designed to look up the price of their respective assets in USDC. This
            will allow us to calculate the price of one at LP token token from the prices of their underlying assets

    @param _tokenA is the address of the first token in an Liquidity pair
    @param _tokenB is the address of the second token in a liquidity pair
    @param _lpToken is the address of the token that this oracle will provide a price feed for
    **/
    function createNewOracles(
        address _tokenA,
        address _tokenB,
        address _lpToken
    ) public onlyOwner {
        (address token0, address token1) = sortTokens(_tokenA, _tokenB);

        address oracle1 = tokenToUSDC[token0];
        if (oracle1 == address(0)) {
            oracle1 = address(
                new UniswapLPOracleInstance(factory, token0, usdc_add)
            );
            tokenToUSDC[token0] = oracle1;
        }

        address oracle2 = tokenToUSDC[token1];
        if (oracle2 == address(0)) {
            oracle2 = address(
                new UniswapLPOracleInstance(factory, token1, usdc_add)
            );
            tokenToUSDC[token1] = oracle2;
        }

        LPAssetTracker[_lpToken] = [oracle1, oracle2];
        instanceTracker[oracle1] = token0;
        instanceTracker[oracle2] = token1;
    }

    /**
    @notice getUnderlyingPrice allows for the price calculation and retrieval of a LP tokens price
    @param _lpToken is the address of the LP token  whos asset price is being retrieved
    @return returns the price of one LP token
    **/
    function getUnderlyingPrice(address _lpToken) public returns (uint256) {
        address[] memory oracleAdds = LPAssetTracker[_lpToken];
        //retreives the oracle contract addresses for each asset that makes up a LP
        UniswapLPOracleInstance oracle1 = UniswapLPOracleInstance(
            oracleAdds[0]
        );
        UniswapLPOracleInstance oracle2 = UniswapLPOracleInstance(
            oracleAdds[1]
        );

        (uint256 reserveA, uint256 reserveB) = UniswapV2Library.getReserves(
            factory,
            instanceTracker[oracleAdds[0]],
            instanceTracker[oracleAdds[1]]
        );

        uint256 priceAsset1 = oracle1.consult(
            instanceTracker[oracleAdds[0]],
            reserveA
        );
        uint256 priceAsset2 = oracle2.consult(
            instanceTracker[oracleAdds[1]],
            reserveB
        );

        // Get the total supply of the pool
        IERC20 lpToken = IERC20(_lpToken);
        uint256 totalSupplyOfLP = lpToken.totalSupply();

        return
            _calculatePriceOfLP(
                totalSupplyOfLP,
                priceAsset1,
                priceAsset2,
                lpToken.decimals()
            );
        //return USDC price of the pool divided by totalSupply of its LPs to get price
        //of one LP
    }

    function _calculatePriceOfLP(
        uint256 supply,
        uint256 value0,
        uint256 value1,
        uint8 supplyDecimals
    ) public pure returns (uint256) {
        uint256 totalValue = value0 + value1;
        uint16 shiftAmount = supplyDecimals;
        uint256 valueShifted = totalValue * uint256(10)**shiftAmount;
        uint256 supplyShifted = supply;
        uint256 valuePerSupply = valueShifted / supplyShifted;

        return valuePerSupply;
    }

    /**
    @notice viewUnderlyingPrice allows for the price retrieval of a LP tokens price
    @param _lpToken is the address of the LP token  whos asset price is being retrieved
    @return returns the price of one LP token
    **/
    function viewUnderlyingPrice(address _lpToken)
        public
        view
        returns (uint256)
    {
        address[] memory oracleAdds = LPAssetTracker[_lpToken];
        //retreives the oracle contract addresses for each asset that makes up a LP
        UniswapLPOracleInstance oracle1 = UniswapLPOracleInstance(
            oracleAdds[0]
        );
        UniswapLPOracleInstance oracle2 = UniswapLPOracleInstance(
            oracleAdds[1]
        );
        // instantiates both ase usable oracle instances
        (uint256 reserveA, uint256 reserveB) = UniswapV2Library.getReserves(
            factory,
            instanceTracker[oracleAdds[0]],
            instanceTracker[oracleAdds[1]]
        );

        uint256 priceAsset1 = oracle1.viewPrice(
            instanceTracker[oracleAdds[0]],
            reserveA
        );
        uint256 priceAsset2 = oracle2.viewPrice(
            instanceTracker[oracleAdds[1]],
            reserveB
        );

        // Get the total supply of the pool
        IERC20 lpToken = IERC20(_lpToken);
        uint256 totalSupplyOfLP = lpToken.totalSupply();

        return
            _calculatePriceOfLP(
                totalSupplyOfLP,
                priceAsset1,
                priceAsset2,
                lpToken.decimals()
            );
        //return USDC price of the pool divided by totalSupply of its LPs to get price
        //of one LP
    }

    function viewPriceOfToken(address _token, uint256 _amount)
        public
        view
        returns (uint256)
    {
        require(
            tokenToUSDC[_token] != address(0),
            "Token not registered with a USDC pairing"
        );

        UniswapLPOracleInstance oracle = UniswapLPOracleInstance(
            tokenToUSDC[_token]
        );
        if (_amount == 0) {
            _amount = OneToken(_token);
        }
        return oracle.viewPrice(_token, _amount);
    }

    function getPriceOfToken(address _token, uint256 _amount)
        public
        returns (uint256)
    {
        require(
            tokenToUSDC[_token] != address(0),
            "Token not registered with a USDC pairing"
        );

        UniswapLPOracleInstance oracle = UniswapLPOracleInstance(
            tokenToUSDC[_token]
        );
        if (_amount == 0) {
            _amount = OneToken(_token);
        }
        return oracle.consult(_token, _amount);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"usdcAdd","type":"address"},{"internalType":"address","name":"_uniFactoryAdd","type":"address"},{"internalType":"address","name":"_uniRouterAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"LPAssetTracker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"OneToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OneUSDC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"uint256","name":"value0","type":"uint256"},{"internalType":"uint256","name":"value1","type":"uint256"},{"internalType":"uint8","name":"supplyDecimals","type":"uint8"}],"name":"_calculatePriceOfLP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenA","type":"address"},{"internalType":"address","name":"_tokenB","type":"address"},{"internalType":"address","name":"_lpToken","type":"address"}],"name":"createNewOracles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"getPriceOfToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"}],"name":"getUnderlyingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"instanceTracker","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenToUSDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdc_add","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"viewPriceOfToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"}],"name":"viewUnderlyingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051612e4c380380612e4c8339818101604052606081101561003357600080fd5b508051602082015160409092015190919060006100576001600160e01b036100e116565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600380546001600160a01b03199081166001600160a01b0393841617909155600180548216948316949094179093556002805490931691161790556100e5565b3390565b612d58806100f46000396000f3fe60806040523480156200001157600080fd5b5060043610620001305760003560e01c80638da5cb5b11620000b1578063c45a0155116200007b578063c45a0155146200030f578063f2fde38b1462000319578063f9160f3d1462000342578063fa7827d2146200036b578063fc57d4df14620003755762000130565b80638da5cb5b14620002975780639485bada14620002a15780639adc328b14620002dc578063b04c6d3f14620002e65762000130565b8063715018a611620000ff578063715018a61462000213578063735de9f7146200021f5780637ef69d12146200022957806388c342ea146200025e57806389a30271146200028d5762000130565b80631a2a16b514620001355780633373a44714620001765780634d9f612014620001bb57806358ca41f514620001ea575b600080fd5b62000164600480360360408110156200014d57600080fd5b506001600160a01b0381351690602001356200039e565b60408051918252519081900360200190f35b6200019f600480360360208110156200018e57600080fd5b50356001600160a01b0316620004bc565b604080516001600160a01b039092168252519081900360200190f35b6200019f60048036036040811015620001d357600080fd5b506001600160a01b038135169060200135620004d7565b62000164600480360360208110156200020257600080fd5b50356001600160a01b03166200050d565b6200021d62000588565b005b6200019f6200063f565b62000164600480360360808110156200024157600080fd5b508035906020810135906040810135906060013560ff166200064e565b62000164600480360360408110156200027657600080fd5b506001600160a01b03813516906020013562000679565b6200019f62000778565b6200019f62000788565b6200021d60048036036060811015620002b957600080fd5b506001600160a01b03813581169160208101358216916040909101351662000797565b6200019f62000a0e565b6200016460048036036020811015620002fe57600080fd5b50356001600160a01b031662000a1d565b6200019f62000df5565b6200021d600480360360208110156200033157600080fd5b50356001600160a01b031662000e04565b6200019f600480360360208110156200035a57600080fd5b50356001600160a01b031662000f13565b6200016462000f2e565b62000164600480360360208110156200038d57600080fd5b50356001600160a01b031662000f4d565b6001600160a01b03828116600090815260066020526040812054909116620003f85760405162461bcd60e51b815260040180806020018281038252602881526020018062002cfb6028913960400191505060405180910390fd5b6001600160a01b038084166000908152600660205260409020541682620004275762000424846200050d565b92505b806001600160a01b031663949c4fa385856040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b031681526020018281526020019250505060206040518083038186803b1580156200048657600080fd5b505afa1580156200049b573d6000803e3d6000fd5b505050506040513d6020811015620004b257600080fd5b5051949350505050565b6005602052600090815260409020546001600160a01b031681565b60046020528160005260406000208181548110620004f157fe5b6000918252602090912001546001600160a01b03169150829050565b600080829050806001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200054d57600080fd5b505afa15801562000562573d6000803e3d6000fd5b505050506040513d60208110156200057957600080fd5b505160ff16600a0a9392505050565b62000592620011d1565b6000546001600160a01b03908116911614620005f5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6003546001600160a01b031681565b600083830160ff8316600a81900a820287848183816200066a57fe5b049a9950505050505050505050565b6001600160a01b03828116600090815260066020526040812054909116620006d35760405162461bcd60e51b815260040180806020018281038252602881526020018062002cfb6028913960400191505060405180910390fd5b6001600160a01b0380841660009081526006602052604090205416826200070257620006ff846200050d565b92505b806001600160a01b0316633ddac95385856040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156200076357600080fd5b505af11580156200049b573d6000803e3d6000fd5b6001546001600160a01b03165b90565b6000546001600160a01b031690565b620007a1620011d1565b6000546001600160a01b0390811691161462000804576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080620008138585620011d5565b6001600160a01b038083166000908152600660205260409020549294509092501680620008d0576002546001546040516001600160a01b0392831692869216906200085e9062001527565b6001600160a01b03938416815291831660208301529091166040808301919091525190819003606001906000f0801580156200089e573d6000803e3d6000fd5b506001600160a01b03848116600090815260066020526040902080546001600160a01b03191691831691909117905590505b6001600160a01b03808316600090815260066020526040902054168062000987576002546001546040516001600160a01b039283169286921690620009159062001527565b6001600160a01b03938416815291831660208301529091166040808301919091525190819003606001906000f08015801562000955573d6000803e3d6000fd5b506001600160a01b03848116600090815260066020526040902080546001600160a01b03191691831691909117905590505b6040805180820182526001600160a01b0380851682528381166020808401919091529088166000908152600490915291909120620009c791600262001535565b506001600160a01b0391821660009081526005602052604080822080549685166001600160a01b031997881617905591831681522080549290911691909216179055505050565b6001546001600160a01b031681565b6001600160a01b0381166000908152600460209081526040808320805482518185028101850190935280835260609383018282801562000a8757602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000a68575b5050505050905060008160008151811062000a9e57fe5b6020026020010151905060008260018151811062000ab857fe5b6020026020010151905060008062000b6d600260009054906101000a90046001600160a01b0316600560008860008151811062000af157fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b0316600560008960018151811062000b3f57fe5b6020908102919091018101516001600160a01b039081168352908201929092526040016000205416620012b2565b915091506000846001600160a01b031663949c4fa3600560008960008151811062000b9457fe5b6020908102919091018101516001600160a01b0390811683528282019390935260409182016000205482516001600160e01b031960e087901b16815293166004840152602483018890529051604480840193829003018186803b15801562000bfb57600080fd5b505afa15801562000c10573d6000803e3d6000fd5b505050506040513d602081101562000c2757600080fd5b505186519091506000906001600160a01b0386169063949c4fa39060059084908b90600190811062000c5557fe5b6020908102919091018101516001600160a01b0390811683528282019390935260409182016000205482516001600160e01b031960e087901b16815293166004840152602483018890529051604480840193829003018186803b15801562000cbc57600080fd5b505afa15801562000cd1573d6000803e3d6000fd5b505050506040513d602081101562000ce857600080fd5b5051604080516318160ddd60e01b815290519192508a916000916001600160a01b038416916318160ddd91600480820192602092909190829003018186803b15801562000d3457600080fd5b505afa15801562000d49573d6000803e3d6000fd5b505050506040513d602081101562000d6057600080fd5b50516040805163313ce56760e01b8152905191925062000de6918391879187916001600160a01b0388169163313ce56791600480820192602092909190829003018186803b15801562000db257600080fd5b505afa15801562000dc7573d6000803e3d6000fd5b505050506040513d602081101562000dde57600080fd5b50516200064e565b9b9a5050505050505050505050565b6002546001600160a01b031681565b62000e0e620011d1565b6000546001600160a01b0390811691161462000e71576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811662000eb85760405162461bcd60e51b815260040180806020018281038252602681526020018062002cb06026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6006602052600090815260409020546001600160a01b031681565b60015460009062000f48906001600160a01b03166200050d565b905090565b6001600160a01b0381166000908152600460209081526040808320805482518185028101850190935280835260609383018282801562000fb757602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000f98575b5050505050905060008160008151811062000fce57fe5b6020026020010151905060008260018151811062000fe857fe5b6020026020010151905060008062001021600260009054906101000a90046001600160a01b0316600560008860008151811062000af157fe5b915091506000846001600160a01b0316633ddac95360056000896000815181106200104857fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b0316856040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015620010d557600080fd5b505af1158015620010ea573d6000803e3d6000fd5b505050506040513d60208110156200110157600080fd5b505186519091506000906001600160a01b03861690633ddac9539060059084908b9060019081106200112f57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b0316856040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015620011bc57600080fd5b505af115801562000cd1573d6000803e3d6000fd5b3390565b600080826001600160a01b0316846001600160a01b0316141562001236576040805162461bcd60e51b81526020600482015260136024820152724944454e544943414c5f41444452455353455360681b604482015290519081900360640190fd5b826001600160a01b0316846001600160a01b031610620012585782846200125b565b83835b90925090506001600160a01b038216620012ab576040805162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b604482015290519081900360640190fd5b9250929050565b6000806000620012c3858562001389565b509050600080620012d688888862001465565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156200130f57600080fd5b505afa15801562001324573d6000803e3d6000fd5b505050506040513d60608110156200133b57600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506001600160a01b0387811690841614620013775780826200137a565b81815b90999098509650505050505050565b600080826001600160a01b0316846001600160a01b03161415620013df5760405162461bcd60e51b815260040180806020018281038252602581526020018062002cd66025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b0316106200140157828462001404565b83835b90925090506001600160a01b038216620012ab576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b600080600062001476858562001389565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501206001600160f81b031960688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b6116e980620015c783390190565b8280548282559060005260206000209081019282156200158d579160200282015b828111156200158d57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062001556565b506200159b9291506200159f565b5090565b6200078591905b808211156200159b5780546001600160a01b0319168155600101620015a656fe60806040523480156200001157600080fd5b50604051620016e9380380620016e9833981810160405260608110156200003757600080fd5b508051602082015160409092015190919060006200005d6001600160e01b036200046c16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350806001600160a01b0316826001600160a01b0316141562000103576040805160208082018352600191829052600780546001600160e01b0319908116841790915583519182019093528190526008805490921617905562000463565b60006200011d8484846200047060201b62000a541760201c565b905080600160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018057600080fd5b505afa15801562000195573d6000803e3d6000fd5b505050506040513d6020811015620001ac57600080fd5b5051600280546001600160a01b0319166001600160a01b039283161790556040805163d21220a760e01b815290519183169163d21220a791600480820192602092909190829003018186803b1580156200020557600080fd5b505afa1580156200021a573d6000803e3d6000fd5b505050506040513d60208110156200023157600080fd5b5051600380546001600160a01b0319166001600160a01b0392831617905560408051635909c0d560e01b8152905191831691635909c0d591600480820192602092909190829003018186803b1580156200028a57600080fd5b505afa1580156200029f573d6000803e3d6000fd5b505050506040513d6020811015620002b657600080fd5b5051600490815560408051635a3d549360e01b815290516001600160a01b03841692635a3d549392808201926020929091829003018186803b158015620002fc57600080fd5b505afa15801562000311573d6000803e3d6000fd5b505050506040513d60208110156200032857600080fd5b505160055560408051630240bc6b60e21b8152905160009182916001600160a01b03851691630902f1ac916004808301926060929190829003018186803b1580156200037357600080fd5b505afa15801562000388573d6000803e3d6000fd5b505050506040513d60608110156200039f57600080fd5b50805160208201516040909201516006805463ffffffff191663ffffffff909216919091179055925090506001600160701b03821615801590620003eb57506001600160701b03811615155b6200042b576040805162461bcd60e51b815260206004820152600b60248201526a4e4f5f524553455256455360a81b604482015290519081900360640190fd5b6006805460ff60201b1916640100000000179055620004526001600160e01b036200054d16565b50506006805460ff60201b19169055505b50505062000a1e565b3390565b600080806200048985856001600160e01b036200066f16565b604080516001600160601b0319606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b60008060006200057d600160009054906101000a90046001600160a01b03166200075260201b620007a61760201c565b600654929550909350915063ffffffff908116820390610e10908216101580620005b65750600654640100000000900460ff1615156001145b15620006695760405180602001604052808263ffffffff16600454870381620005db57fe5b046001600160e01b039081169091529051600780546001600160e01b031916919092161790556040805160208101909152600554819063ffffffff8416908603816200062357fe5b046001600160e01b039081169091529051600880546001600160e01b03191691909216179055600484905560058390556006805463ffffffff191663ffffffff84161790555b50505050565b600080826001600160a01b0316846001600160a01b03161415620006c55760405162461bcd60e51b8152600401808060200182810382526025815260200180620016c46025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610620006e7578284620006ea565b83835b90925090506001600160a01b0382166200074b576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b60008080620007696001600160e01b036200095516565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015620007a557600080fd5b505afa158015620007ba573d6000803e3d6000fd5b505050506040513d6020811015620007d157600080fd5b505160408051635a3d549360e01b815290519194506001600160a01b03861691635a3d549391600480820192602092909190829003018186803b1580156200081857600080fd5b505afa1580156200082d573d6000803e3d6000fd5b505050506040513d60208110156200084457600080fd5b505160408051630240bc6b60e21b81529051919350600091829182916001600160a01b03891691630902f1ac916004808301926060929190829003018186803b1580156200089157600080fd5b505afa158015620008a6573d6000803e3d6000fd5b505050506040513d6060811015620008bd57600080fd5b5080516020820151604090920151909450909250905063ffffffff808216908516146200094b57600081850390508063ffffffff166200090984866200095f60201b6200097f1760201c565b600001516001600160e01b031602870196508063ffffffff166200093985856200095f60201b6200097f1760201c565b516001600160e01b0316029590950194505b5050509193909250565b63ffffffff421690565b6200096962000a0c565b6000826001600160701b031611620009c8576040805162461bcd60e51b815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604482015290519081900360640190fd5b6040805160208101909152806001600160701b038416600160701b600160e01b03607087901b1681620009f757fe5b046001600160e01b0316815250905092915050565b60408051602081019091526000815290565b610c968062000a2e6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063a2e6204511610097578063c3e75bda11610066578063c3e75bda146101f9578063c5700a0214610215578063d21220a714610236578063f2fde38b1461023e57610100565b8063a2e62045146101d9578063a6bb4539146101e1578063a8aa1b31146101e9578063b4d1d795146101f157610100565b80635e6aaf2c116100d35780635e6aaf2c14610177578063715018a61461019b5780638da5cb5b146101a5578063949c4fa3146101ad57610100565b80630dfe1681146101055780633ddac953146101295780635909c0d5146101675780635a3d54931461016f575b600080fd5b61010d610264565b604080516001600160a01b039092168252519081900360200190f35b6101556004803603604081101561013f57600080fd5b506001600160a01b038135169060200135610273565b60408051918252519081900360200190f35b61015561037e565b610155610384565b61017f61038a565b604080516001600160e01b039092168252519081900360200190f35b6101a3610399565b005b61010d61044d565b610155600480360360408110156101c357600080fd5b506001600160a01b03813516906020013561045c565b6101a36104b9565b61017f6105c3565b61010d6105d2565b6101556105e1565b6102016105e7565b604080519115158252519081900360200190f35b61021d6105f8565b6040805163ffffffff9092168252519081900360200190f35b61010d610604565b6101a36004803603602081101561025457600080fd5b50356001600160a01b0316610613565b6002546001600160a01b031681565b6002546000906001600160a01b031661028d575080610378565b6002546001600160a01b03848116911614156102ed576102ab6104b9565b60408051602081019091526007546001600160e01b031681526102dd906102d8908463ffffffff61071d16565b61079b565b6001600160901b03169050610378565b6003546001600160a01b0384811691161461033f576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22faa27a5a2a760991b604482015290519081900360640190fd5b60408051602081019091526008546001600160e01b0316815261036c906102d8908463ffffffff61071d16565b6001600160901b031690505b92915050565b60045481565b60055481565b6008546001600160e01b031681565b6103a16107a2565b6000546001600160a01b03908116911614610403576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6002546000906001600160a01b0316610476575080610378565b6002546001600160a01b03848116911614156102ed5760408051602081019091526007546001600160e01b031681526102dd906102d8908463ffffffff61071d16565b600154600090819081906104d5906001600160a01b03166107a6565b600654929550909350915063ffffffff908116820390610e1090821610158061050d5750600654640100000000900460ff1615156001145b156105bd5760405180602001604052808263ffffffff1660045487038161053057fe5b046001600160e01b039081169091529051600780546001600160e01b031916919092161790556040805160208101909152600554819063ffffffff84169086038161057757fe5b046001600160e01b039081169091529051600880546001600160e01b03191691909216179055600484905560058390556006805463ffffffff191663ffffffff84161790555b50505050565b6007546001600160e01b031681565b6001546001600160a01b031681565b610e1081565b600654640100000000900460ff1681565b60065463ffffffff1681565b6003546001600160a01b031681565b61061b6107a2565b6000546001600160a01b0390811691161461067d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166106c25760405162461bcd60e51b8152600401808060200182810382526026815260200180610bf36026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610725610a2f565b600082158061074b57505082516001600160e01b03168281029083828161074857fe5b04145b6107865760405162461bcd60e51b8152600401808060200182810382526023815260200180610c3e6023913960400191505060405180910390fd5b60408051602081019091529081529392505050565b5160701c90565b3390565b60008060006107b3610975565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b1580156107ee57600080fd5b505afa158015610802573d6000803e3d6000fd5b505050506040513d602081101561081857600080fd5b505160408051635a3d549360e01b815290519194506001600160a01b03861691635a3d549391600480820192602092909190829003018186803b15801561085e57600080fd5b505afa158015610872573d6000803e3d6000fd5b505050506040513d602081101561088857600080fd5b505160408051630240bc6b60e21b81529051919350600091829182916001600160a01b03891691630902f1ac916004808301926060929190829003018186803b1580156108d457600080fd5b505afa1580156108e8573d6000803e3d6000fd5b505050506040513d60608110156108fe57600080fd5b5080516020820151604090920151909450909250905063ffffffff8082169085161461096b5780840363ffffffff8116610938848661097f565b516001600160e01b031602969096019563ffffffff8116610959858561097f565b516001600160e01b0316029590950194505b5050509193909250565b63ffffffff421690565b610987610a42565b6000826001600160701b0316116109e5576040805162461bcd60e51b815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604482015290519081900360640190fd5b6040805160208101909152806001600160701b0384166dffffffffffffffffffffffffffff60701b607087901b1681610a1a57fe5b046001600160e01b0316815250905092915050565b6040518060200160405280600081525090565b60408051602081019091526000815290565b6000806000610a638585610b14565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501206001600160f81b031960688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b600080826001600160a01b0316846001600160a01b03161415610b685760405162461bcd60e51b8152600401808060200182810382526025815260200180610c196025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610610b88578284610b8b565b83835b90925090506001600160a01b038216610beb576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b925092905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345534669786564506f696e743a204d554c5449504c49434154494f4e5f4f564552464c4f57a26469706673582212205f4ad33033b43372549df36ea8c24c3d00b93bfb3fcb6abeb854e60009f8ce0164736f6c63430006060033556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345534f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553546f6b656e206e6f7420726567697374657265642077697468206120555344432070616972696e67a2646970667358221220c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a64736f6c63430006060033000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d

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

000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d

-----Decoded View---------------
Arg [0] : usdcAdd (address): 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [1] : _uniFactoryAdd (address): 0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
Arg [2] : _uniRouterAddress (address): 0x7a250d5630b4cf539739df2c5dacb4c659f2488d

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [1] : 0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
Arg [2] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d


Deployed ByteCode Sourcemap

50786:8174:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;50786:8174:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;57948:509:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;57948:509:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;51034:50;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;51034:50:0;-1:-1:-1;;;;;51034:50:0;;:::i;:::-;;;;-1:-1:-1;;;;;51034:50:0;;;;;;;;;;;;;;50976:51;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;50976:51:0;;;;;;;;:::i;51947:188::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;51947:188:0;-1:-1:-1;;;;;51947:188:0;;:::i;2791:148::-;;;:::i;:::-;;50928:39;;;:::i;55754:483::-;;;;;;15:3:-1;10;7:12;4:2;;;32:1;29;22:12;4:2;-1:-1;55754:483:0;;;;;;;;;;;;;;;;;;;:::i;58465:492::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;58465:492:0;;;;;;;;:::i;51758:80::-;;;:::i;2149:79::-;;;:::i;53243:883::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;53243:883:0;;;;;;;;;;;;;;;;;;;:::i;50869:23::-;;;:::i;56484:1456::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;56484:1456:0;-1:-1:-1;;;;;56484:1456:0;;:::i;50899:22::-;;;:::i;3094:244::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;3094:244:0;-1:-1:-1;;;;;3094:244:0;;:::i;51091:46::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;51091:46:0;-1:-1:-1;;;;;51091:46:0;;:::i;51846:93::-;;;:::i;54388:1358::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;54388:1358:0;-1:-1:-1;;;;;54388:1358:0;;:::i;57948:509::-;-1:-1:-1;;;;;58102:19:0;;;58055:7;58102:19;;;:11;:19;;;;;;58055:7;;58102:19;58080:123;;;;-1:-1:-1;;;58080:123:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;58287:19:0;;;58216:30;58287:19;;;:11;:19;;;;;;;58332:12;58328:71;;58371:16;58380:6;58371:8;:16::i;:::-;58361:26;;58328:71;58416:6;-1:-1:-1;;;;;58416:16:0;;58433:6;58441:7;58416:33;;;;;;;;;;;;;-1:-1:-1;;;;;58416:33:0;-1:-1:-1;;;;;58416:33:0;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;58416:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;58416:33:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;58416:33:0;;57948:509;-1:-1:-1;;;;57948:509:0:o;51034:50::-;;;;;;;;;;;;-1:-1:-1;;;;;51034:50:0;;:::o;50976:51::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;50976:51:0;;-1:-1:-1;50976:51:0;;-1:-1:-1;50976:51:0:o;51947:188::-;52001:7;52021:23;52062:5;52021:47;;52107:8;-1:-1:-1;;;;;52107:17:0;;:19;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;52107:19:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;52107:19:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;52107:19:0;52099:28;;52094:2;52086:41;;51947:188;-1:-1:-1;;;51947:188:0:o;2791:148::-;2371:12;:10;:12::i;:::-;2361:6;;-1:-1:-1;;;;;2361:6:0;;;:22;;;2353:67;;;;;-1:-1:-1;;;2353:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2898:1:::1;2882:6:::0;;2861:40:::1;::::0;-1:-1:-1;;;;;2882:6:0;;::::1;::::0;2861:40:::1;::::0;2898:1;;2861:40:::1;2929:1;2912:19:::0;;-1:-1:-1;;;;;;2912:19:0::1;::::0;;2791:148::o;50928:39::-;;;-1:-1:-1;;;;;50928:39:0;;:::o;55754:483::-;55917:7;55958:15;;;55984:35;;;56074:2;56066:24;;;56053:37;;56125:6;55917:7;56125:6;56053:37;56125:6;56167:28;;;;;;55754:483;-1:-1:-1;;;;;;;;;;55754:483:0:o;58465:492::-;-1:-1:-1;;;;;58604:19:0;;;58557:7;58604:19;;;:11;:19;;;;;;58557:7;;58604:19;58582:123;;;;-1:-1:-1;;;58582:123:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;58789:19:0;;;58718:30;58789:19;;;:11;:19;;;;;;;58834:12;58830:71;;58873:16;58882:6;58873:8;:16::i;:::-;58863:26;;58830:71;58918:6;-1:-1:-1;;;;;58918:14:0;;58933:6;58941:7;58918:31;;;;;;;;;;;;;-1:-1:-1;;;;;58918:31:0;-1:-1:-1;;;;;58918:31:0;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;58918:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;51758:80:0;51822:8;;-1:-1:-1;;;;;51822:8:0;51758:80;;:::o;2149:79::-;2187:7;2214:6;-1:-1:-1;;;;;2214:6:0;2149:79;:::o;53243:883::-;2371:12;:10;:12::i;:::-;2361:6;;-1:-1:-1;;;;;2361:6:0;;;:22;;;2353:67;;;;;-1:-1:-1;;;2353:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;53384:14:::1;53400::::0;53418:28:::1;53429:7;53438;53418:10;:28::i;:::-;-1:-1:-1::0;;;;;53477:19:0;;::::1;53459:15;53477:19:::0;;;:11:::1;:19;::::0;;;;;53383:63;;-1:-1:-1;53383:63:0;;-1:-1:-1;53477:19:0::1;53511:21:::0;53507:203:::1;;53613:7;::::0;;53630:8;53585:54:::1;::::0;-1:-1:-1;;;;;53613:7:0;;::::1;::::0;53622:6;;53630:8:::1;::::0;53585:54:::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;;;;;53585:54:0;;::::1;::::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;;;;;;;;;-1:-1:-1;53585:54:0::1;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;-1:-1:::0;;;;;;53669:19:0;;::::1;;::::0;;;:11:::1;:19;::::0;;;;:29;;-1:-1:-1;;;;;;53669:29:0::1;::::0;;::::1;::::0;;;::::1;::::0;;;-1:-1:-1;53507:203:0::1;-1:-1:-1::0;;;;;53740:19:0;;::::1;53722:15;53740:19:::0;;;:11:::1;:19;::::0;;;;;::::1;53774:21:::0;53770:203:::1;;53876:7;::::0;;53893:8;53848:54:::1;::::0;-1:-1:-1;;;;;53876:7:0;;::::1;::::0;53885:6;;53893:8:::1;::::0;53848:54:::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;;;;;53848:54:0;;::::1;::::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;;;;;;;;;-1:-1:-1;53848:54:0::1;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;-1:-1:::0;;;;;;53932:19:0;;::::1;;::::0;;;:11:::1;:19;::::0;;;;:29;;-1:-1:-1;;;;;;53932:29:0::1;::::0;;::::1;::::0;;;::::1;::::0;;;-1:-1:-1;53770:203:0::1;53985:45;::::0;;;;::::1;::::0;;-1:-1:-1;;;;;53985:45:0;;::::1;::::0;;;;::::1;;::::0;;::::1;::::0;;;;:24;;::::1;-1:-1:-1::0;53985:24:0;;;:14:::1;:24:::0;;;;;;;:45:::1;::::0;::::1;;:::i;:::-;-1:-1:-1::0;;;;;;54041:24:0;;::::1;;::::0;;;:15:::1;:24;::::0;;;;;:33;;;;::::1;-1:-1:-1::0;;;;;;54041:33:0;;::::1;;::::0;;54085:24;;::::1;::::0;;;:33;;;;;::::1;::::0;;;::::1;;::::0;;-1:-1:-1;;;53243:883:0:o;50869:23::-;;;-1:-1:-1;;;;;50869:23:0;;:::o;56484:1456::-;-1:-1:-1;;;;;56634:24:0;;56579:7;56634:24;;;:14;:24;;;;;;;;56604:54;;;;;;;;;;;;;;;;;:27;;:54;;56634:24;56604:54;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;56604:54:0;;;;;;;;;;;;;;;;;;;;;;;56754:31;56826:10;56837:1;56826:13;;;;;;;;;;;;;;56754:96;;56861:31;56933:10;56944:1;56933:13;;;;;;;;;;;;;;56861:96;;57027:16;57045;57065:151;57108:7;;;;;;;;;-1:-1:-1;;;;;57108:7:0;57130:15;:30;57146:10;57157:1;57146:13;;;;;;;;;;;;;;-1:-1:-1;;;;;57130:30:0;-1:-1:-1;;;;;57130:30:0;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;57130:30:0;57175:15;:30;57191:10;57202:1;57191:13;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;57175:30:0;;;;;;;;;;;;;;-1:-1:-1;57175:30:0;;;57065:28;:151::i;:::-;57026:190;;;;57229:19;57251:7;-1:-1:-1;;;;;57251:17:0;;57283:15;:30;57299:10;57310:1;57299:13;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;57283:30:0;;;;;;;;;;;;;;;;-1:-1:-1;57283:30:0;;57251:96;;-1:-1:-1;;;;;;57251:96:0;;;;;;;57283:30;;57251:96;;;;;;;;;;;;;;;;;;;;;;;;;;2:2:-1;;;;27:1;24;17:12;2:2;57251:96:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;57251:96:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;57251:96:0;57428:13;;57251:96;;-1:-1:-1;57358:19:0;;-1:-1:-1;;;;;57380:17:0;;;;;57412:15;;57358:19;;57428:10;;57439:1;;57428:13;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;57412:30:0;;;;;;;;;;;;;;;;-1:-1:-1;57412:30:0;;57380:96;;-1:-1:-1;;;;;;57380:96:0;;;;;;;57412:30;;57380:96;;;;;;;;;;;;;;;;;;;;;;;;;;2:2:-1;;;;27:1;24;17:12;2:2;57380:96:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;57380:96:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;57380:96:0;57604:21;;;-1:-1:-1;;;57604:21:0;;;;57380:96;;-1:-1:-1;57558:8:0;;57534:14;;-1:-1:-1;;;;;57604:19:0;;;;;:21;;;;;57380:96;;57604:21;;;;;;;;:19;:21;;;2:2:-1;;;;27:1;24;17:12;2:2;57604:21:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;57604:21:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;57604:21:0;57790:18;;;-1:-1:-1;;;57790:18:0;;;;57604:21;;-1:-1:-1;57658:165:0;;57604:21;;57730:11;;57760;;-1:-1:-1;;;;;57790:16:0;;;;;:18;;;;;57604:21;;57790:18;;;;;;;;:16;:18;;;2:2:-1;;;;27:1;24;17:12;2:2;57790:18:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;57790:18:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;57790:18:0;57658:19;:165::i;:::-;57638:185;56484:1456;-1:-1:-1;;;;;;;;;;;56484:1456:0:o;50899:22::-;;;-1:-1:-1;;;;;50899:22:0;;:::o;3094:244::-;2371:12;:10;:12::i;:::-;2361:6;;-1:-1:-1;;;;;2361:6:0;;;:22;;;2353:67;;;;;-1:-1:-1;;;2353:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3183:22:0;::::1;3175:73;;;;-1:-1:-1::0;;;3175:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3285:6;::::0;;3264:38:::1;::::0;-1:-1:-1;;;;;3264:38:0;;::::1;::::0;3285:6;::::1;::::0;3264:38:::1;::::0;::::1;3313:6;:17:::0;;-1:-1:-1;;;;;;3313:17:0::1;-1:-1:-1::0;;;;;3313:17:0;;;::::1;::::0;;;::::1;::::0;;3094:244::o;51091:46::-;;;;;;;;;;;;-1:-1:-1;;;;;51091:46:0;;:::o;51846:93::-;51922:8;;51886:7;;51913:18;;-1:-1:-1;;;;;51922:8:0;51913;:18::i;:::-;51906:25;;51846:93;:::o;54388:1358::-;-1:-1:-1;;;;;54500:24:0;;54450:7;54500:24;;;:14;:24;;;;;;;;54470:54;;;;;;;;;;;;;;;;;:27;;:54;;54500:24;54470:54;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;54470:54:0;;;;;;;;;;;;;;;;;;;;;;;54620:31;54692:10;54703:1;54692:13;;;;;;;;;;;;;;54620:96;;54727:31;54799:10;54810:1;54799:13;;;;;;;;;;;;;;54727:96;;54837:16;54855;54875:151;54918:7;;;;;;;;;-1:-1:-1;;;;;54918:7:0;54940:15;:30;54956:10;54967:1;54956:13;;;;;;;54875:151;54836:190;;;;55039:19;55061:7;-1:-1:-1;;;;;55061:15:0;;55091;:30;55107:10;55118:1;55107:13;;;;;;;;;;;;;;-1:-1:-1;;;;;55091:30:0;-1:-1:-1;;;;;55091:30:0;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;55091:30:0;55136:8;55061:94;;;;;;;;;;;;;-1:-1:-1;;;;;55061:94:0;-1:-1:-1;;;;;55061:94:0;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;55061:94:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;55061:94:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;55061:94:0;55234:13;;55061:94;;-1:-1:-1;55166:19:0;;-1:-1:-1;;;;;55188:15:0;;;;;55218;;55166:19;;55234:10;;55245:1;;55234:13;;;;;;;;;;;;-1:-1:-1;;;;;55218:30:0;-1:-1:-1;;;;;55218:30:0;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;55218:30:0;55263:8;55188:94;;;;;;;;;;;;;-1:-1:-1;;;;;55188:94:0;-1:-1:-1;;;;;55188:94:0;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;55188:94:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;670:106:0;758:10;670:106;:::o;52143:371::-;52245:14;52261;52311:6;-1:-1:-1;;;;;52301:16:0;:6;-1:-1:-1;;;;;52301:16:0;;;52293:48;;;;;-1:-1:-1;;;52293:48:0;;;;;;;;;;;;-1:-1:-1;;;52293:48:0;;;;;;;;;;;;;;;52380:6;-1:-1:-1;;;;;52371:15:0;:6;-1:-1:-1;;;;;52371:15:0;;:79;;52435:6;52443;52371:79;;;52403:6;52411;52371:79;52352:98;;-1:-1:-1;52352:98:0;-1:-1:-1;;;;;;52469:20:0;;52461:45;;;;;-1:-1:-1;;;52461:45:0;;;;;;;;;;;;-1:-1:-1;;;52461:45:0;;;;;;;;;;;;;;;52143:371;;;;;:::o;35100:391::-;35193:13;35208;35235:14;35254:26;35265:6;35273;35254:10;:26::i;:::-;35234:46;;;35292:13;35307;35340:32;35348:7;35357:6;35365;35340:7;:32::i;:::-;-1:-1:-1;;;;;35325:60:0;;:62;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;35325:62:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;35325:62:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;35325:62:0;;;;;;;35291:96;;;;;-1:-1:-1;35291:96:0;;-1:-1:-1;;;;;;35421:16:0;;;;;;;:62;;35464:8;35474;35421:62;;;35441:8;35451;35421:62;35398:85;;;;-1:-1:-1;35100:391:0;-1:-1:-1;;;;;;;35100:391:0:o;34123:349::-;34198:14;34214;34259:6;-1:-1:-1;;;;;34249:16:0;:6;-1:-1:-1;;;;;34249:16:0;;;34241:66;;;;-1:-1:-1;;;34241:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34346:6;-1:-1:-1;;;;;34337:15:0;:6;-1:-1:-1;;;;;34337:15:0;;:53;;34375:6;34383;34337:53;;;34356:6;34364;34337:53;34318:72;;-1:-1:-1;34318:72:0;-1:-1:-1;;;;;;34409:20:0;;34401:63;;;;;-1:-1:-1;;;34401:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;34564:478;34653:12;34679:14;34695;34713:26;34724:6;34732;34713:10;:26::i;:::-;34877:32;;;-1:-1:-1;;34877:32:0;;;;;;;;;;;;;;;;;;;;;;;;;22::-1;26:21;;;22:32;6:49;;34877:32:0;;;;;34867:43;;;;;;-1:-1:-1;;;;;;34780:251:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;34780:251:0;;;;;;;34770:262;;;;;;;;;34564:478;-1:-1:-1;;;;;34564:478:0:o;50786:8174::-;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;50786:8174:0;-1:-1:-1;;;;;50786:8174:0;;;;;;;;;;;-1:-1:-1;50786:8174:0;;;;;;;-1:-1:-1;50786:8174:0;;;-1:-1:-1;50786:8174:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;;50786:8174:0;;;;;;

Swarm Source

ipfs://c8c23e261c3bef34a45970f956d2125743c356257188e13a0501ccc6555b8d4a
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.