Contract 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f2028

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x15391fa0fbd2062aadf7f13db95501dd9a907d56b92b962eabc5d9df38adf2a0Update691669642023-03-12 15:02:32194 days 17 hrs ago0x9ee976cf6edb36653745d95f51768bebce5a2bb9 IN  0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH0.00004205 0.1
0xa1d7430e91ffb2575388c4b6da9ebfaa918765ad15cba4c1386bb85b0e736dd10x60806040691618462023-03-12 14:38:00194 days 18 hrs ago0x9ee976cf6edb36653745d95f51768bebce5a2bb9 IN  Contract Creation0 ETH0.00082092 0.1
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x2a9ab3af77d25a329c28afafc1244345dd68dc66e2000ec2748d230b7d62b6fe711465952023-03-18 16:29:33188 days 16 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x4e31743f8ec8bd6a66617f38b7442ec0b70857456480364fba276eae29e4a443711455432023-03-18 16:25:15188 days 16 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x3cecd5fb624f55e7b765586bfaacd76f98fb78c67f5ec8a8968f9c6a0521e382711025662023-03-18 13:28:25188 days 19 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0xf5683e989abfbde0fad8527c4bc89f0e28855c9a60ce38ae51753807100c703c711019112023-03-18 13:25:40188 days 19 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x2ad6667705e7cdbc961d7bccc7bd20fae2364d7c4b03ee7d75bb74395c9e8318708316252023-03-17 18:31:12189 days 14 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0xb31932abf2291aca2d486498ba1ede13682d13c64de75b5010aaac291f6116a7708044752023-03-17 16:37:40189 days 16 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x284ccc665081ede8533b5a1709c4dbf0890f94636aff74aa5192e94074c02ed3707921112023-03-17 15:45:47189 days 17 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x79851c062963c76c08d8126ae9788e6a0857663769e23a60efd1f175fabed22b707889402023-03-17 15:32:33189 days 17 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0xb0f1b922d294227aa488691c7e1c58b483d443b2eace63e27b72e980c03aaf92707780712023-03-17 14:47:31189 days 18 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x80226feab24db7fdd93aaa59ff19f85aaebd5d1966e731563d4b257942733e78707621772023-03-17 13:42:13189 days 19 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x4176da418d9737788bb66c5bb7e0883af5c10539d75c76bca70e60999824a1a5707596892023-03-17 13:31:56189 days 19 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x873b14fe94576c0b6433b895339f31256d8cf5df1073dcb6754903d2e633c5d7707478432023-03-17 12:42:53189 days 20 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0xc94a568706cc1696f58493b7ad1816b6b8c4168342a875581d0f18e096763b4b707252972023-03-17 11:09:39189 days 21 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x7cf68c64b23bc23ac3eca2981286c3caaffd6f3336e2e2147e8564e6b54d608b707218142023-03-17 10:55:24189 days 21 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x3ed29cc25a0f4550a3f5ad9cbbd15df92443bd12ebc8619c751f943060d7dee6707179442023-03-17 10:39:21189 days 22 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0xbaecf1585ddbd8172751dd5b75b0a6cfba646d6f9bca6a0f90b5984493a93608707166872023-03-17 10:34:12189 days 22 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x6c4c4c78c3ae12041906c07c9c52d5f63dea086ef34581f89972d44c3dc864e3707051112023-03-17 9:46:27189 days 23 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x30c4d5841c7a5ce0e6c35688f28cb45a22fea6add9faa3a6d99bb5e1d04a9981706942002023-03-17 9:01:31189 days 23 hrs ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x0761350214a5a4c07af8e66b3a4cb5eeb7866a662811a202d1a0e896f763f28b706913122023-03-17 8:49:37190 days ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x11e37fdcbaec4d86432d7a569503d7693caa52f0799a60b636ef800f26b74c7b706887312023-03-17 8:38:59190 days 10 mins ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x5e482b7ab017014e6c4ce10f1d5498fb9f3cdce87c3db9d548bbaa89ea33c5d4706881472023-03-17 8:36:32190 days 13 mins ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x8c2f4051218b4a7e5c23e25d5fa86ca390ab976f23763549cbffb21ca99d0fbb706851962023-03-17 8:24:23190 days 25 mins ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x6f197f1dc2e4e102b0f94e2322db2d586fd85ff513581bd4d3f52ec7352629f1706842642023-03-17 8:20:31190 days 29 mins ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0x398c831b8878760cbfb7e942ef562b211d5066c5406149f22f28b478449dfd32706825832023-03-17 8:13:34190 days 36 mins ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
0xfb2b5f1a4816da17f14d2396939cc1565626f76e59d8875e49fae5ff6c2ea7d9706821622023-03-17 8:11:47190 days 38 mins ago 0xfc0fd99a9a7557237d9a22127ac77a27e4c61df9 0xfa74ff1e2fbbf9a68ce1b2faa27ad69fcd1f20280 ETH
[ Download CSV Export 
Loading

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

Contract Name:
Oracle

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Arbiscan.io on 2023-03-12
*/

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.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 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.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.
 */
abstract 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() {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

pragma solidity >=0.6.12;

library Babylonian {
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
        // else z = 0
    }
}
pragma solidity >=0.6.12;


// 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 {
        uint256 _x;
    }

    uint8 private constant RESOLUTION = 112;
    uint256 private constant Q112 = uint256(1) << RESOLUTION;
    uint256 private constant Q224 = Q112 << RESOLUTION;

    // 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, uint256 y) internal pure returns (uq144x112 memory) {
        uint256 z;
        require(y == 0 || (z = uint256(self._x) * y) / y == uint256(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);
    }

    // take the reciprocal of a UQ112x112
    function reciprocal(uq112x112 memory self) internal pure returns (uq112x112 memory) {
        require(self._x != 0, "FixedPoint: ZERO_RECIPROCAL");
        return uq112x112(uint224(Q224 / self._x));
    }

    // square root of a UQ112x112
    function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) {
        return uq112x112(uint224(Babylonian.sqrt(uint256(self._x)) << 56));
    }
}
pragma solidity >=0.6.12;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Transfer(address indexed from, address indexed to, uint256 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 (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

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

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

    function transferFrom(
        address from,
        address to,
        uint256 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 (uint256);

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

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

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    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 (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to) external returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

pragma solidity >=0.6.12;

// 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 (
            uint256 price0Cumulative,
            uint256 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 += uint256(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed;
            // counterfactual
            price1Cumulative += uint256(FixedPoint.fraction(reserve0, reserve1)._x) * timeElapsed;
        }
    }
}


pragma solidity >=0.6.12;


contract Operator is Context, Ownable {
    address private _operator;

    event OperatorTransferred(address indexed previousOperator, address indexed newOperator);

    constructor() {
        _operator = _msgSender();
        emit OperatorTransferred(address(0), _operator);
    }

    function operator() public view returns (address) {
        return _operator;
    }

    modifier onlyOperator() {
        require(_operator == msg.sender, "operator: caller is not the operator");
        _;
    }

    function isOperator() public view returns (bool) {
        return _msgSender() == _operator;
    }

    function transferOperator(address newOperator_) public onlyOwner {
        _transferOperator(newOperator_);
    }

    function _transferOperator(address newOperator_) internal {
        require(newOperator_ != address(0) && newOperator_ != _operator, "operator: zero address given for new operator");
        emit OperatorTransferred(address(0), newOperator_);
        _operator = newOperator_;
    }
}

pragma solidity >=0.6.12;


contract Epoch is Operator {
    using SafeMath for uint256;

    uint256 private period;
    uint256 private startTime;
    uint256 private lastEpochTime;
    uint256 private epoch;

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

    constructor(
        uint256 _period,
        uint256 _startTime,
        uint256 _startEpoch
    )  {
        period = _period;
        startTime = _startTime;
        epoch = _startEpoch;
        lastEpochTime = startTime.sub(period);
    }

    /* ========== Modifier ========== */

    modifier checkStartTime {
        require(block.timestamp >= startTime, 'Epoch: not started yet');

        _;
    }

    modifier checkEpoch {
        uint256 _nextEpochPoint = nextEpochPoint();
        if (block.timestamp < _nextEpochPoint) {
            require(msg.sender == operator(), 'Epoch: only operator allowed for pre-epoch');
            _;
        } else {
            _;

            for (;;) {
                lastEpochTime = _nextEpochPoint;
                ++epoch;
                _nextEpochPoint = nextEpochPoint();
                if (block.timestamp < _nextEpochPoint) break;
            }
        }
    }

    /* ========== VIEW FUNCTIONS ========== */

    function getCurrentEpoch() public view returns (uint256) {
        return epoch;
    }

    function getPeriod() public view returns (uint256) {
        return period;
    }

    function getStartTime() public view returns (uint256) {
        return startTime;
    }

    function getLastEpochTime() public view returns (uint256) {
        return lastEpochTime;
    }

    function nextEpochPoint() public view returns (uint256) {
        return lastEpochTime.add(period);
    }

    /* ========== GOVERNANCE ========== */

    function setPeriod(uint256 _period) external onlyOperator {
        require(_period >= 1 hours && _period <= 48 hours, '_period: out of range');
        period = _period;
    }

    function setEpoch(uint256 _epoch) external onlyOperator {
        epoch = _epoch;
    }
}

pragma solidity >=0.6.12;



// 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
contract Oracle is Epoch {
    using FixedPoint for *;
    using SafeMath for uint256;

    /* ========== STATE VARIABLES ========== */

    // uniswap
    address public token0;
    address public token1;
    IUniswapV2Pair public pair;

    // oracle
    uint32 public blockTimestampLast;
    uint256 public price0CumulativeLast;
    uint256 public price1CumulativeLast;
    FixedPoint.uq112x112 public price0Average;
    FixedPoint.uq112x112 public price1Average;

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

    constructor(
        IUniswapV2Pair _pair,
        uint256 _period,
        uint256 _startTime
    )  Epoch(_period, _startTime, 0) {
        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, "Oracle: NO_RESERVES"); // ensure that there's liquidity in the pair
    }

    /* ========== MUTABLE FUNCTIONS ========== */

    /** @dev Updates 1-day EMA price from Uniswap.  */
    function update() external checkEpoch {
        (uint256 price0Cumulative, uint256 price1Cumulative, uint32 blockTimestamp) = UniswapV2OracleLibrary.currentCumulativePrices(address(pair));
        uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired

        if (timeElapsed == 0) {
            // prevent divided by zero
            return;
        }

        // overflow is desired, casting never truncates
        // 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;

        emit Updated(price0Cumulative, price1Cumulative);
    }

    // note this will always return 0 before update has been called successfully for the first time.
    function consult(address _token, uint256 _amountIn) external view returns (uint144 amountOut) {
        if (_token == token0) {
            amountOut = price0Average.mul(_amountIn).decode144();
        } else {
            require(_token == token1, "Oracle: INVALID_TOKEN");
            amountOut = price1Average.mul(_amountIn).decode144();
        }
    }

    function twap(address _token, uint256 _amountIn) external view returns (uint144 _amountOut) {
        (uint256 price0Cumulative, uint256 price1Cumulative, uint32 blockTimestamp) = UniswapV2OracleLibrary.currentCumulativePrices(address(pair));
        uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired
        if (_token == token0) {
            _amountOut = FixedPoint.uq112x112(uint224((price0Cumulative - price0CumulativeLast) / timeElapsed)).mul(_amountIn).decode144();
        } else if (_token == token1) {
            _amountOut = FixedPoint.uq112x112(uint224((price1Cumulative - price1CumulativeLast) / timeElapsed)).mul(_amountIn).decode144();
        }
    }

    function sync() external {
        pair.sync();
    }

    event Updated(uint256 price0CumulativeLast, uint256 price1CumulativeLast);
}

Contract ABI

[{"inputs":[{"internalType":"contract IUniswapV2Pair","name":"_pair","type":"address"},{"internalType":"uint256","name":"_period","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOperator","type":"address"},{"indexed":true,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price0CumulativeLast","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price1CumulativeLast","type":"uint256"}],"name":"Updated","type":"event"},{"inputs":[],"name":"blockTimestampLast","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amountIn","type":"uint256"}],"name":"consult","outputs":[{"internalType":"uint144","name":"amountOut","type":"uint144"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastEpochTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextEpochPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","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":"pair","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price0Average","outputs":[{"internalType":"uint224","name":"_x","type":"uint224"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price1Average","outputs":[{"internalType":"uint224","name":"_x","type":"uint224"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_epoch","type":"uint256"}],"name":"setEpoch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"setPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sync","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOperator_","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amountIn","type":"uint256"}],"name":"twap","outputs":[{"internalType":"uint144","name":"_amountOut","type":"uint144"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620017c2380380620017c28339810160408190526200003491620004bf565b8181600062000043336200041d565b600180546001600160a01b031916339081179091556040516000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600283905560038290556005819055620000aa82846200046d602090811b62000a8117901c565b6004908155600880546001600160a01b0319166001600160a01b03891690811790915560408051630dfe168160e01b81529051919550630dfe16819450808301935060209290829003018186803b1580156200010557600080fd5b505afa1580156200011a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200014091906200049f565b600680546001600160a01b0319166001600160a01b039283161790556008546040805163d21220a760e01b81529051919092169163d21220a7916004808301926020929190829003018186803b1580156200019a57600080fd5b505afa158015620001af573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001d591906200049f565b600780546001600160a01b0319166001600160a01b0392831617905560085460408051635909c0d560e01b815290519190921691635909c0d5916004808301926020929190829003018186803b1580156200022f57600080fd5b505afa15801562000244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200026a91906200054f565b60095560085460408051635a3d549360e01b815290516001600160a01b0390921691635a3d549391600480820192602092909190829003018186803b158015620002b357600080fd5b505afa158015620002c8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ee91906200054f565b600a5560085460408051630240bc6b60e21b8152905160009283926001600160a01b0390911691630902f1ac91600480820192606092909190829003018186803b1580156200033c57600080fd5b505afa15801562000351573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003779190620004f9565b6008805463ffffffff909216600160a01b0263ffffffff60a01b1990921691909117905590925090506001600160701b03821615801590620003c157506001600160701b03811615155b620004125760405162461bcd60e51b815260206004820152601360248201527f4f7261636c653a204e4f5f524553455256455300000000000000000000000000604482015260640160405180910390fd5b5050505050620005a8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006200047b828462000569565b9392505050565b80516001600160701b03811681146200049a57600080fd5b919050565b600060208284031215620004b257600080fd5b81516200047b816200058f565b600080600060608486031215620004d557600080fd5b8351620004e2816200058f565b602085015160409095015190969495509392505050565b6000806000606084860312156200050f57600080fd5b6200051a8462000482565b92506200052a6020850162000482565b9150604084015163ffffffff811681146200054457600080fd5b809150509250925092565b6000602082840312156200056257600080fd5b5051919050565b6000828210156200058a57634e487b7160e01b600052601160045260246000fd5b500390565b6001600160a01b0381168114620005a557600080fd5b50565b61120a80620005b86000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c8063715018a6116100de578063ba52245811610097578063c828371e11610071578063c828371e14610335578063d21220a71461033d578063f2fde38b14610350578063fff6cae91461036357600080fd5b8063ba522458146102f9578063c5700a0214610301578063c5967c261461032d57600080fd5b8063715018a6146102aa5780638da5cb5b146102b2578063a2e62045146102c3578063a6bb4539146102cb578063a8aa1b31146102de578063b97dd9e2146102f157600080fd5b80634456eda2116101305780634456eda21461022b578063570ca735146102495780635909c0d51461025a5780635a3d5493146102635780635e6aaf2c1461026c5780636808a1281461029757600080fd5b80630ceb2cef146101785780630dfe16811461018d5780630f3a9f65146101bd5780631ed24195146101d057806329605e77146101e25780633ddac953146101f5575b600080fd5b61018b610186366004611056565b61036b565b005b6006546101a0906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61018b6101cb366004611056565b6103a3565b6002545b6040519081526020016101b4565b61018b6101f0366004610fc1565b61042b565b610208610203366004610fdc565b61043f565b60405171ffffffffffffffffffffffffffffffffffff90911681526020016101b4565b6001546001600160a01b0316331460405190151581526020016101b4565b6001546001600160a01b03166101a0565b6101d460095481565b6101d4600a5481565b600c5461027f906001600160e01b031681565b6040516001600160e01b0390911681526020016101b4565b6102086102a5366004610fdc565b610512565b61018b610601565b6000546001600160a01b03166101a0565b61018b610615565b600b5461027f906001600160e01b031681565b6008546101a0906001600160a01b031681565b6005546101d4565b6004546101d4565b60085461031890600160a01b900463ffffffff1681565b60405163ffffffff90911681526020016101b4565b6101d4610983565b6003546101d4565b6007546101a0906001600160a01b031681565b61018b61035e366004610fc1565b6109a1565b61018b610a17565b6001546001600160a01b0316331461039e5760405162461bcd60e51b815260040161039590611088565b60405180910390fd5b600555565b6001546001600160a01b031633146103cd5760405162461bcd60e51b815260040161039590611088565b610e1081101580156103e257506202a3008111155b6104265760405162461bcd60e51b81526020600482015260156024820152745f706572696f643a206f7574206f662072616e676560581b6044820152606401610395565b600255565b610433610a8d565b61043c81610ae7565b50565b6006546000906001600160a01b038481169116141561048d576040805160208101909152600b546001600160e01b031681526104869061047f9084610bc7565b5160701c90565b905061050c565b6007546001600160a01b038481169116146104e25760405162461bcd60e51b815260206004820152601560248201527427b930b1b6329d1024a72b20a624a22faa27a5a2a760591b6044820152606401610395565b6040805160208101909152600c546001600160e01b031681526105099061047f9084610bc7565b90505b92915050565b600854600090819081908190610530906001600160a01b0316610c71565b600854929550909350915060009061055590600160a01b900463ffffffff1683611154565b6006549091506001600160a01b03888116911614156105b7576105b061047f8760405180602001604052808563ffffffff166009548a610595919061113d565b61059f919061110a565b6001600160e01b0316905290610bc7565b94506105f7565b6007546001600160a01b03888116911614156105f7576105f461047f8760405180602001604052808563ffffffff16600a5489610595919061113d565b94505b5050505092915050565b610609610a8d565b6106136000610e71565b565b600061061f610983565b9050804210156107f3576001546001600160a01b031633146106965760405162461bcd60e51b815260206004820152602a60248201527f45706f63683a206f6e6c79206f70657261746f7220616c6c6f77656420666f72604482015269040e0e4ca5acae0dec6d60b31b6064820152608401610395565b600854600090819081906106b2906001600160a01b0316610c71565b60085492955090935091506000906106d790600160a01b900463ffffffff1683611154565b905063ffffffff81166106eb575050505050565b60405180602001604052808263ffffffff166009548761070b919061113d565b610715919061110a565b6001600160e01b039081169091529051600b80546001600160e01b031916919092161790556040805160208101909152600a54819063ffffffff84169061075c908761113d565b610766919061110a565b6001600160e01b039081169091529051600c80546001600160e01b031916919092161790556009849055600a8390556008805463ffffffff60a01b1916600160a01b63ffffffff85160217905560408051858152602081018590527fd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902910160405180910390a15050505050565b6008546000908190819061080f906001600160a01b0316610c71565b600854929550909350915060009061083490600160a01b900463ffffffff1683611154565b905063ffffffff811661084a5750505050610950565b60405180602001604052808263ffffffff166009548761086a919061113d565b610874919061110a565b6001600160e01b039081169091529051600b80546001600160e01b031916919092161790556040805160208101909152600a54819063ffffffff8416906108bb908761113d565b6108c5919061110a565b6001600160e01b039081169091529051600c80546001600160e01b031916919092161790556009849055600a8390556008805463ffffffff60a01b1916600160a01b63ffffffff85160217905560408051858152602081018590527fd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902910160405180910390a1505050505b60048190556005805460009061096590611179565b90915550610971610983565b90508042101561097e5750565b610950565b600061099c600254600454610ec190919063ffffffff16565b905090565b6109a9610a8d565b6001600160a01b038116610a0e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610395565b61043c81610e71565b600860009054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610a6757600080fd5b505af1158015610a7b573d6000803e3d6000fd5b50505050565b6000610509828461113d565b6000546001600160a01b031633146106135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610395565b6001600160a01b03811615801590610b0d57506001546001600160a01b03828116911614155b610b6f5760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b6064820152608401610395565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6040805160208101909152600081526000821580610c04575083516001600160e01b031683610bf6818361111e565b9250610c02908361110a565b145b610c5c5760405162461bcd60e51b815260206004820152602360248201527f4669786564506f696e743a204d554c5449504c49434154494f4e5f4f564552466044820152624c4f5760e81b6064820152608401610395565b60408051602081019091529081529392505050565b6000806000610c7e610ecd565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015610cb957600080fd5b505afa158015610ccd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf1919061106f565b9250836001600160a01b0316635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2c57600080fd5b505afa158015610d40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d64919061106f565b91506000806000866001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610da457600080fd5b505afa158015610db8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddc9190611006565b9250925092508363ffffffff168163ffffffff1614610e67576000610e018286611154565b90508063ffffffff16610e148486610ede565b51610e2891906001600160e01b031661111e565b610e3290886110cc565b96508063ffffffff16610e458585610ede565b51610e5991906001600160e01b031661111e565b610e6390876110cc565b9550505b5050509193909250565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061050982846110cc565b600061099c64010000000042611194565b6040805160208101909152600081526000826001600160701b031611610f465760405162461bcd60e51b815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f0000000000000000006044820152606401610395565b604080516020810190915280610f7c6001600160701b0385166dffffffffffffffffffffffffffff60701b607088901b166110e4565b6001600160e01b031690529392505050565b80356001600160a01b0381168114610fa557600080fd5b919050565b80516001600160701b0381168114610fa557600080fd5b600060208284031215610fd357600080fd5b61050982610f8e565b60008060408385031215610fef57600080fd5b610ff883610f8e565b946020939093013593505050565b60008060006060848603121561101b57600080fd5b61102484610faa565b925061103260208501610faa565b9150604084015163ffffffff8116811461104b57600080fd5b809150509250925092565b60006020828403121561106857600080fd5b5035919050565b60006020828403121561108157600080fd5b5051919050565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b600082198211156110df576110df6111a8565b500190565b60006001600160e01b03838116806110fe576110fe6111be565b92169190910492915050565b600082611119576111196111be565b500490565b6000816000190483118215151615611138576111386111a8565b500290565b60008282101561114f5761114f6111a8565b500390565b600063ffffffff83811690831681811015611171576111716111a8565b039392505050565b600060001982141561118d5761118d6111a8565b5060010190565b6000826111a3576111a36111be565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fdfea2646970667358221220c654e37b1b1101a3503553191f28ab99ec56ef315a7a9ae67ab940c9ec3359f864736f6c6343000807003300000000000000000000000059b7983d2e5590ce020f49af220f2a749e8bc9f7000000000000000000000000000000000000000000000000000000000000546000000000000000000000000000000000000000000000000000000000640dae81

Deployed ByteCode Sourcemap

21613:3702:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21273:89;;;;;;:::i;:::-;;:::i;:::-;;21776:21;;;;;-1:-1:-1;;;;;21776:21:0;;;;;;-1:-1:-1;;;;;1828:32:1;;;1810:51;;1798:2;1783:18;21776:21:0;;;;;;;;21086:179;;;;;;:::i;:::-;;:::i;20632:83::-;20701:6;;20632:83;;;6329:25:1;;;6317:2;6302:18;20632:83:0;6183:177:1;18838:115:0;;;;;;:::i;:::-;;:::i;24090:363::-;;;;;;:::i;:::-;;:::i;:::-;;;5924:38:1;5912:51;;;5894:70;;5882:2;5867:18;24090:363:0;5748:222:1;18730:100:0;18813:9;;-1:-1:-1;;;;;18813:9:0;736:10;18797:25;18730:100;;2037:14:1;;2030:22;2012:41;;2000:2;1985:18;18730:100:0;1872:187:1;18502:85:0;18570:9;;-1:-1:-1;;;;;18570:9:0;18502:85;;21921:35;;;;;;21963;;;;;;22053:41;;;;;-1:-1:-1;;;;;22053:41:0;;;;;;-1:-1:-1;;;;;6139:32:1;;;6121:51;;6109:2;6094:18;22053:41:0;5975:203:1;24461:706:0;;;;;;:::i;:::-;;:::i;2696:103::-;;;:::i;2048:87::-;2094:7;2121:6;-1:-1:-1;;;;;2121:6:0;2048:87;;22972:1008;;;:::i;22005:41::-;;;;;-1:-1:-1;;;;;22005:41:0;;;21832:26;;;;;-1:-1:-1;;;;;21832:26:0;;;20536:88;20611:5;;20536:88;;20820:97;20896:13;;20820:97;;21882:32;;;;;-1:-1:-1;;;21882:32:0;;;;;;;;;6792:10:1;6780:23;;;6762:42;;6750:2;6735:18;21882:32:0;6618:192:1;20925:107:0;;;:::i;20723:89::-;20795:9;;20723:89;;21804:21;;;;;-1:-1:-1;;;;;21804:21:0;;;2954:201;;;;;;:::i;:::-;;:::i;25175:55::-;;;:::i;21273:89::-;18638:9;;-1:-1:-1;;;;;18638:9:0;18651:10;18638:23;18630:72;;;;-1:-1:-1;;;18630:72:0;;;;;;;:::i;:::-;;;;;;;;;21340:5:::1;:14:::0;21273:89::o;21086:179::-;18638:9;;-1:-1:-1;;;;;18638:9:0;18651:10;18638:23;18630:72;;;;-1:-1:-1;;;18630:72:0;;;;;;;:::i;:::-;21174:7:::1;21163;:18;;:41;;;;;21196:8;21185:7;:19;;21163:41;21155:75;;;::::0;-1:-1:-1;;;21155:75:0;;3664:2:1;21155:75:0::1;::::0;::::1;3646:21:1::0;3703:2;3683:18;;;3676:30;-1:-1:-1;;;3722:18:1;;;3715:51;3783:18;;21155:75:0::1;3462:345:1::0;21155:75:0::1;21241:6;:16:::0;21086:179::o;18838:115::-;1934:13;:11;:13::i;:::-;18914:31:::1;18932:12;18914:17;:31::i;:::-;18838:115:::0;:::o;24090:363::-;24209:6;;24165:17;;-1:-1:-1;;;;;24199:16:0;;;24209:6;;24199:16;24195:251;;;24244:17;;;;;;;;;:13;:17;-1:-1:-1;;;;;24244:17:0;;;:40;;:28;;24262:9;24244:17;:28::i;:::-;13231:7;11316:3;13231:21;;13131:130;24244:40;24232:52;;24195:251;;;24335:6;;-1:-1:-1;;;;;24325:16:0;;;24335:6;;24325:16;24317:50;;;;-1:-1:-1;;;24317:50:0;;2903:2:1;24317:50:0;;;2885:21:1;2942:2;2922:18;;;2915:30;-1:-1:-1;;;2961:18:1;;;2954:51;3022:18;;24317:50:0;2701:345:1;24317:50:0;24394:17;;;;;;;;;:13;:17;-1:-1:-1;;;;;24394:17:0;;;:40;;:28;;24412:9;24394:17;:28::i;:40::-;24382:52;;24195:251;24090:363;;;;:::o;24461:706::-;24697:4;;24533:18;;;;;;;;24642:61;;-1:-1:-1;;;;;24697:4:0;24642:46;:61::i;:::-;24752:18;;24564:139;;-1:-1:-1;24564:139:0;;-1:-1:-1;24564:139:0;-1:-1:-1;24714:18:0;;24735:35;;-1:-1:-1;;;24752:18:0;;;;24564:139;24735:35;:::i;:::-;24818:6;;24714:56;;-1:-1:-1;;;;;;24808:16:0;;;24818:6;;24808:16;24804:356;;;24854:113;:101;24945:9;24854:86;;;;;;;;24927:11;24883:55;;24903:20;;24884:16;:39;;;;:::i;:::-;24883:55;;;;:::i;:::-;-1:-1:-1;;;;;24854:86:0;;;:90;;:101::i;:113::-;24841:126;;24804:356;;;24999:6;;-1:-1:-1;;;;;24989:16:0;;;24999:6;;24989:16;24985:175;;;25035:113;:101;25126:9;25035:86;;;;;;;;25108:11;25064:55;;25084:20;;25065:16;:39;;;;:::i;25035:113::-;25022:126;;24985:175;24553:614;;;;24461:706;;;;:::o;2696:103::-;1934:13;:11;:13::i;:::-;2761:30:::1;2788:1;2761:18;:30::i;:::-;2696:103::o:0;22972:1008::-;19990:23;20016:16;:14;:16::i;:::-;19990:42;;20065:15;20047;:33;20043:428;;;18570:9;;-1:-1:-1;;;;;18570:9:0;20105:10;:24;20097:79;;;;-1:-1:-1;;;20097:79:0;;3253:2:1;20097:79:0;;;3235:21:1;3292:2;3272:18;;;3265:30;3331:34;3311:18;;;3304:62;-1:-1:-1;;;3382:18:1;;;3375:40;3432:19;;20097:79:0;3051:406:1;20097:79:0;23154:4:::1;::::0;23022:24:::1;::::0;;;;;23099:61:::1;::::0;-1:-1:-1;;;;;23154:4:0::1;23099:46;:61::i;:::-;23209:18;::::0;23021:139;;-1:-1:-1;23021:139:0;;-1:-1:-1;23021:139:0;-1:-1:-1;23171:18:0::1;::::0;23192:35:::1;::::0;-1:-1:-1;;;23209:18:0;::::1;;;23021:139:::0;23192:35:::1;:::i;:::-;23171:56:::0;-1:-1:-1;23267:16:0::1;::::0;::::1;23263:95;;23340:7;;;;18838:115:::0;:::o;23263:95::-:1;23564:86;;;;;;;;23637:11;23593:55;;23613:20;;23594:16;:39;;;;:::i;:::-;23593:55;;;;:::i;:::-;-1:-1:-1::0;;;;;23564:86:0;;::::1;::::0;;;23548:102;;:13:::1;:102:::0;;-1:-1:-1;;;;;;23548:102:0::1;::::0;;;::::1;;::::0;;23677:86:::1;::::0;;::::1;::::0;::::1;::::0;;;23726:20:::1;::::0;23677:86;;23706:55:::1;::::0;::::1;::::0;23707:39:::1;::::0;:16;:39:::1;:::i;:::-;23706:55;;;;:::i;:::-;-1:-1:-1::0;;;;;23677:86:0;;::::1;::::0;;;23661:102;;:13:::1;:102:::0;;-1:-1:-1;;;;;;23661:102:0::1;::::0;;;::::1;;::::0;;23776:20:::1;:39:::0;;;23826:20:::1;:39:::0;;;23876:18:::1;:35:::0;;-1:-1:-1;;;;23876:35:0::1;-1:-1:-1::0;;;23876:35:0::1;::::0;::::1;;;::::0;;23929:43:::1;::::0;;6539:25:1;;;6595:2;6580:18;;6573:34;;;23929:43:0::1;::::0;6512:18:1;23929:43:0::1;;;;;;;23010:970;;;;18838:115:::0;:::o;20043:428::-;23154:4:::1;::::0;23022:24:::1;::::0;;;;;23099:61:::1;::::0;-1:-1:-1;;;;;23154:4:0::1;23099:46;:61::i;:::-;23209:18;::::0;23021:139;;-1:-1:-1;23021:139:0;;-1:-1:-1;23021:139:0;-1:-1:-1;23171:18:0::1;::::0;23192:35:::1;::::0;-1:-1:-1;;;23209:18:0;::::1;;;23021:139:::0;23192:35:::1;:::i;:::-;23171:56:::0;-1:-1:-1;23267:16:0::1;::::0;::::1;23263:95;;23340:7;;;;;;23263:95;23564:86;;;;;;;;23637:11;23593:55;;23613:20;;23594:16;:39;;;;:::i;:::-;23593:55;;;;:::i;:::-;-1:-1:-1::0;;;;;23564:86:0;;::::1;::::0;;;23548:102;;:13:::1;:102:::0;;-1:-1:-1;;;;;;23548:102:0::1;::::0;;;::::1;;::::0;;23677:86:::1;::::0;;::::1;::::0;::::1;::::0;;;23726:20:::1;::::0;23677:86;;23706:55:::1;::::0;::::1;::::0;23707:39:::1;::::0;:16;:39:::1;:::i;:::-;23706:55;;;;:::i;:::-;-1:-1:-1::0;;;;;23677:86:0;;::::1;::::0;;;23661:102;;:13:::1;:102:::0;;-1:-1:-1;;;;;;23661:102:0::1;::::0;;;::::1;;::::0;;23776:20:::1;:39:::0;;;23826:20:::1;:39:::0;;;23876:18:::1;:35:::0;;-1:-1:-1;;;;23876:35:0::1;-1:-1:-1::0;;;23876:35:0::1;::::0;::::1;;;::::0;;23929:43:::1;::::0;;6539:25:1;;;6595:2;6580:18;;6573:34;;;23929:43:0::1;::::0;6512:18:1;23929:43:0::1;;;;;;;23010:970;;;;20225:1;20271:13:::0;:31;;;20323:5;20321:7;;20323:5;;20321:7;;;:::i;:::-;;;;-1:-1:-1;20365:16:0;:14;:16::i;:::-;20347:34;;20422:15;20404;:33;20400:44;;;18838:115;:::o;20400:44::-;20243:217;;20925:107;20972:7;20999:25;21017:6;;20999:13;;:17;;:25;;;;:::i;:::-;20992:32;;20925:107;:::o;2954:201::-;1934:13;:11;:13::i;:::-;-1:-1:-1;;;;;3043:22:0;::::1;3035:73;;;::::0;-1:-1:-1;;;3035:73:0;;2496:2:1;3035:73:0::1;::::0;::::1;2478:21:1::0;2535:2;2515:18;;;2508:30;2574:34;2554:18;;;2547:62;-1:-1:-1;;;2625:18:1;;;2618:36;2671:19;;3035:73:0::1;2294:402:1::0;3035:73:0::1;3119:28;3138:8;3119:18;:28::i;25175:55::-:0;25211:4;;;;;;;;;-1:-1:-1;;;;;25211:4:0;-1:-1:-1;;;;;25211:9:0;;:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25175:55::o;6708:98::-;6766:7;6793:5;6797:1;6793;:5;:::i;2213:132::-;2094:7;2121:6;-1:-1:-1;;;;;2121:6:0;736:10;2277:23;2269:68;;;;-1:-1:-1;;;2269:68:0;;4428:2:1;2269:68:0;;;4410:21:1;;;4447:18;;;4440:30;4506:34;4486:18;;;4479:62;4558:18;;2269:68:0;4226:356:1;18961:286:0;-1:-1:-1;;;;;19038:26:0;;;;;;:55;;-1:-1:-1;19084:9:0;;-1:-1:-1;;;;;19068:25:0;;;19084:9;;19068:25;;19038:55;19030:113;;;;-1:-1:-1;;;19030:113:0;;4014:2:1;19030:113:0;;;3996:21:1;4053:2;4033:18;;;4026:30;4092:34;4072:18;;;4065:62;-1:-1:-1;;;4143:18:1;;;4136:43;4196:19;;19030:113:0;3812:409:1;19030:113:0;19159:45;;-1:-1:-1;;;;;19159:45:0;;;19187:1;;19159:45;;19187:1;;19159:45;19215:9;:24;;-1:-1:-1;;;;;;19215:24:0;-1:-1:-1;;;;;19215:24:0;;;;;;;;;;18961:286::o;12165:265::-;-1:-1:-1;;;;;;;;;;;;12264:9:0;12292:6;;;:60;;-1:-1:-1;12344:7:0;;-1:-1:-1;;;;;12336:16:0;12331:1;12307:20;12331:1;12336:16;12307:20;:::i;:::-;12303:24;-1:-1:-1;12302:30:0;;12303:24;12302:30;:::i;:::-;:50;12292:60;12284:108;;;;-1:-1:-1;;;12284:108:0;;5194:2:1;12284:108:0;;;5176:21:1;5233:2;5213:18;;;5206:30;5272:34;5252:18;;;5245:62;-1:-1:-1;;;5323:18:1;;;5316:33;5366:19;;12284:108:0;4992:399:1;12284:108:0;12410:12;;;;;;;;;;;;;12165:265;-1:-1:-1;;;12165:265:0:o;17027:1136::-;17138:24;17177;17216:21;17282:23;:21;:23::i;:::-;17265:40;;17350:4;-1:-1:-1;;;;;17335:41:0;;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;17316:62;;17423:4;-1:-1:-1;;;;;17408:41:0;;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;17389:62;;17566:16;17584;17602:25;17646:4;-1:-1:-1;;;;;17631:32:0;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;17565:100;;;;;;17702:14;17680:36;;:18;:36;;;17676:480;;17781:18;17802:35;17819:18;17802:14;:35;:::i;:::-;17781:56;;18002:11;17948:65;;17956:39;17976:8;17986;17956:19;:39::i;:::-;:42;17948:65;;;-1:-1:-1;;;;;17948:51:0;:65;:::i;:::-;17928:85;;;;:::i;:::-;;;18133:11;18079:65;;18087:39;18107:8;18117;18087:19;:39::i;:::-;:42;18079:65;;;-1:-1:-1;;;;;18079:51:0;:65;:::i;:::-;18059:85;;;;:::i;:::-;;;17718:438;17676:480;17254:909;;;17027:1136;;;;;:::o;3315:191::-;3389:16;3408:6;;-1:-1:-1;;;;;3425:17:0;;;-1:-1:-1;;;;;;3425:17:0;;;;;;3458:40;;3408:6;;;;;;;3458:40;;3389:16;3458:40;3378:128;3315:191;:::o;6327:98::-;6385:7;6412:5;6416:1;6412;:5;:::i;16800:121::-;16856:6;16889:23;16907:5;16889:15;:23;:::i;12586:246::-;-1:-1:-1;;;;;;;;;;;;12718:1:0;12704:11;-1:-1:-1;;;;;12704:15:0;;12696:51;;;;-1:-1:-1;;;12696:51:0;;5598:2:1;12696:51:0;;;5580:21:1;5637:2;5617:18;;;5610:30;5676:25;5656:18;;;5649:53;5719:18;;12696:51:0;5396:347:1;12696:51:0;12765:59;;;;;;;;;;12775:48;-1:-1:-1;;;;;12775:48:0;;-1:-1:-1;;;11316:3:0;12776:32;;;;12775:48;:::i;:::-;-1:-1:-1;;;;;12765:59:0;;;12758:66;12586:246;-1:-1:-1;;;12586:246:0:o;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:188::-;271:13;;-1:-1:-1;;;;;313:42:1;;303:53;;293:81;;370:1;367;360:12;385:186;444:6;497:2;485:9;476:7;472:23;468:32;465:52;;;513:1;510;503:12;465:52;536:29;555:9;536:29;:::i;576:254::-;644:6;652;705:2;693:9;684:7;680:23;676:32;673:52;;;721:1;718;711:12;673:52;744:29;763:9;744:29;:::i;:::-;734:39;820:2;805:18;;;;792:32;;-1:-1:-1;;;576:254:1:o;835:450::-;922:6;930;938;991:2;979:9;970:7;966:23;962:32;959:52;;;1007:1;1004;997:12;959:52;1030:40;1060:9;1030:40;:::i;:::-;1020:50;;1089:49;1134:2;1123:9;1119:18;1089:49;:::i;:::-;1079:59;;1181:2;1170:9;1166:18;1160:25;1225:10;1218:5;1214:22;1207:5;1204:33;1194:61;;1251:1;1248;1241:12;1194:61;1274:5;1264:15;;;835:450;;;;;:::o;1290:180::-;1349:6;1402:2;1390:9;1381:7;1377:23;1373:32;1370:52;;;1418:1;1415;1408:12;1370:52;-1:-1:-1;1441:23:1;;1290:180;-1:-1:-1;1290:180:1:o;1475:184::-;1545:6;1598:2;1586:9;1577:7;1573:23;1569:32;1566:52;;;1614:1;1611;1604:12;1566:52;-1:-1:-1;1637:16:1;;1475:184;-1:-1:-1;1475:184:1:o;4587:400::-;4789:2;4771:21;;;4828:2;4808:18;;;4801:30;4867:34;4862:2;4847:18;;4840:62;-1:-1:-1;;;4933:2:1;4918:18;;4911:34;4977:3;4962:19;;4587:400::o;6815:128::-;6855:3;6886:1;6882:6;6879:1;6876:13;6873:39;;;6892:18;;:::i;:::-;-1:-1:-1;6928:9:1;;6815:128::o;6948:201::-;6988:1;-1:-1:-1;;;;;7053:10:1;;;;7072:37;;7089:18;;:::i;:::-;7127:10;;7123:20;;;;;6948:201;-1:-1:-1;;6948:201:1:o;7154:120::-;7194:1;7220;7210:35;;7225:18;;:::i;:::-;-1:-1:-1;7259:9:1;;7154:120::o;7279:168::-;7319:7;7385:1;7381;7377:6;7373:14;7370:1;7367:21;7362:1;7355:9;7348:17;7344:45;7341:71;;;7392:18;;:::i;:::-;-1:-1:-1;7432:9:1;;7279:168::o;7452:125::-;7492:4;7520:1;7517;7514:8;7511:34;;;7525:18;;:::i;:::-;-1:-1:-1;7562:9:1;;7452:125::o;7582:221::-;7621:4;7650:10;7710;;;;7680;;7732:12;;;7729:38;;;7747:18;;:::i;:::-;7784:13;;7582:221;-1:-1:-1;;;7582:221:1:o;7808:135::-;7847:3;-1:-1:-1;;7868:17:1;;7865:43;;;7888:18;;:::i;:::-;-1:-1:-1;7935:1:1;7924:13;;7808:135::o;7948:112::-;7980:1;8006;7996:35;;8011:18;;:::i;:::-;-1:-1:-1;8045:9:1;;7948:112::o;8065:127::-;8126:10;8121:3;8117:20;8114:1;8107:31;8157:4;8154:1;8147:15;8181:4;8178:1;8171:15;8197:127;8258:10;8253:3;8249:20;8246:1;8239:31;8289:4;8286:1;8279:15;8313:4;8310:1;8303:15

Metadata Hash

c654e37b1b1101a3503553191f28ab99ec56ef315a7a9ae67ab940c9ec3359f8
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.