S Price: $0.702843 (-7.81%)

Contract

0x0CFEe36A516C8277b8428C182Ebea717f3A03F43

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Operato...102562882025-02-26 8:43:4612 hrs ago1740559426IN
0x0CFEe36A...7f3A03F43
0 S0.0016875155
Update102548662025-02-26 8:34:3612 hrs ago1740558876IN
0x0CFEe36A...7f3A03F43
0 S0.0069691655

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GreenOracle

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 999999 runs

Other Settings:
paris EvmVersion
File 1 of 9 : GreenOracle.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;

import "../lib/Babylonian.sol";
import "../lib/FixedPoint.sol";
import "../lib/UniswapV2OracleLibrary.sol";
import "../utils/Epoch.sol";
import "../interfaces/IUniswapV2Pair.sol";

/**
 * @title GreenOracle
 * @notice A fixed window Uniswap V2 oracle for computing the average price of a pair over a given period.
 *         This oracle updates its average price once per epoch (window) and supports a minimum window length.
 *         The price returned is guaranteed to be an average over at least one full epoch.
 */
contract GreenOracle is Epoch {
    using FixedPoint for *;

    // Factor to adjust for differing decimals.
    // For example, if the GREEN token has 18 decimals and USDC.e has 6, then 1e12 scales USDC.e to 18 decimals.
    uint144 private constant GREEN_DECIMALS_FACTOR = 1e12;

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

    // Uniswap V2 pair details.
    address public token0;
    address public token1;
    IUniswapV2Pair public pair;
    address public green; // The GREEN token address.

    // Oracle state variables.
    uint32 public _lastTimestamp;            // Last timestamp when reserves were recorded.
    uint256 public price0CumulativeLast;       // Last recorded cumulative price for token0.
    uint256 public price1CumulativeLast;       // Last recorded cumulative price for token1.
    FixedPoint.uq112x112 public price0Average;   // Average price for token0 over the epoch.
    FixedPoint.uq112x112 public price1Average;   // Average price for token1 over the epoch.

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

    /**
     * @notice Creates a new GreenOracle instance.
     * @param _pair The Uniswap V2 pair (e.g., GREEN/USDC.e).
     * @param _green The GREEN token address.
     * @param _period The epoch period (in seconds) over which the price is averaged.
     * @param _startTime The timestamp when the oracle should start operating.
     */
    constructor(
        IUniswapV2Pair _pair,
        address _green,
        uint256 _period,
        uint256 _startTime
    ) Epoch(_period, _startTime, 0) {
        pair = _pair;
        green = _green;
        token0 = pair.token0();
        token1 = pair.token1();

        // Initialize cumulative prices and timestamp from the pair.
        price0CumulativeLast = pair.price0CumulativeLast();
        price1CumulativeLast = pair.price1CumulativeLast();

        // Retrieve reserves to ensure the pair has liquidity.
        uint112 reserve0;
        uint112 reserve1;
        (reserve0, reserve1, _lastTimestamp) = pair.getReserves();
        require(reserve0 != 0 && reserve1 != 0, "GreenOracle: NO_RESERVES");
    }

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

    /**
     * @notice Updates the average prices for token0 and token1 over the current epoch.
     * @dev This function should be called once per epoch (enforced by the Epoch modifier).
     *      It uses the UniswapV2OracleLibrary to obtain current cumulative prices and calculates the average.
     *      Overflow in the cumulative price difference is intentional.
     */
    function update() external checkEpoch {
        (uint256 price0Cumulative, uint256 price1Cumulative, uint32 currentTimestamp) =
                            UniswapV2OracleLibrary.currentCumulativePrices(address(pair));
        uint32 timeElapsed = currentTimestamp - _lastTimestamp; // Overflow is desired.

        if (timeElapsed == 0) {
            // Avoid division by zero if no time has elapsed.
            return;
        }

        // Compute the average prices over the elapsed time.
        price0Average = FixedPoint.uq112x112(uint224((price0Cumulative - price0CumulativeLast) / timeElapsed));
        price1Average = FixedPoint.uq112x112(uint224((price1Cumulative - price1CumulativeLast) / timeElapsed));

        // Update state for the next epoch.
        price0CumulativeLast = price0Cumulative;
        price1CumulativeLast = price1Cumulative;
        _lastTimestamp = currentTimestamp;

        emit Updated(price0Cumulative, price1Cumulative);
    }

    /**
     * @notice Returns the amount of output tokens for a given input amount based on the stored average price.
     * @dev Before the first successful update, this function returns 0.
     * @param _token The input token address (should be token0 or token1).
     * @param _amountIn The input amount.
     * @return _amountOut The output amount calculated from the average price.
     */
    function consult(address _token, uint256 _amountIn) external view returns (uint144 _amountOut) {
        if (_token == token0) {
            _amountOut = price0Average.mul(_amountIn).decode144();
        } else {
            require(_token == token1, "GreenOracle: INVALID_TOKEN");
            _amountOut = price1Average.mul(_amountIn).decode144();
        }
        // Adjust the output amount based on GREEN's decimals relative to USDC.e.
        if (_token == green) {
            _amountOut *= GREEN_DECIMALS_FACTOR;
        } else {
            _amountOut /= GREEN_DECIMALS_FACTOR;
        }
    }

    /**
     * @notice Returns the time-weighted average price (TWAP) for a given input amount.
     * @dev This function calculates the TWAP using the current cumulative prices from Uniswap.
     * @param _token The input token address (should be token0 or token1).
     * @param _amountIn The input amount.
     * @return _amountOut The output amount calculated from the TWAP.
     */
    function twap(address _token, uint256 _amountIn) external view returns (uint144 _amountOut) {
        (uint256 price0Cumulative, uint256 price1Cumulative, uint32 currentTimestamp) =
                            UniswapV2OracleLibrary.currentCumulativePrices(address(pair));
        uint32 timeElapsed = currentTimestamp - _lastTimestamp; // 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();
        }
        // Adjust the output amount based on GREEN's decimals.
        if (_token == green) {
            _amountOut *= GREEN_DECIMALS_FACTOR;
        } else {
            _amountOut /= GREEN_DECIMALS_FACTOR;
        }
    }

    /* ========== EVENTS ========== */

    /**
     * @notice Emitted when the oracle updates its cumulative prices.
     * @param price0CumulativeLast The new cumulative price for token0.
     * @param price1CumulativeLast The new cumulative price for token1.
     */
    event Updated(uint256 price0CumulativeLast, uint256 price1CumulativeLast);
}

File 2 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}

File 3 of 9 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 4 of 9 : IUniswapV2Pair.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.28;

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;
}

File 5 of 9 : Babylonian.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.28;

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
    }
}

File 6 of 9 : FixedPoint.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.28;

import "./Babylonian.sol";

// 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));
    }
}

File 7 of 9 : UniswapV2OracleLibrary.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.28;

import "./FixedPoint.sol";
import "../interfaces/IUniswapV2Pair.sol";

// 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;
        }
    }
}

File 8 of 9 : Operator.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract Operator is Context, Ownable {
    address private _operator;

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

    constructor() Ownable(_msgSender()) {
        _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), "operator: zero address given for new operator");
        emit OperatorTransferred(_operator, newOperator_);
        _operator = newOperator_;
    }

    function _renounceOperator() public onlyOwner {
        emit OperatorTransferred(_operator, address(0));
        _operator = address(0);
    }
}

File 9 of 9 : Epoch.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.28;

import '../owner/Operator.sol';

contract Epoch is Operator {
    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 - 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 + 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;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IUniswapV2Pair","name":"_pair","type":"address"},{"internalType":"address","name":"_green","type":"address"},{"internalType":"uint256","name":"_period","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"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":"_lastTimestamp","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_renounceOperator","outputs":[],"stateMutability":"nonpayable","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":"green","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"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"}]

608060405234801561001057600080fd5b50604051611e30380380611e3083398101604081905261002f91610443565b81816000338061005a57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b610063816103db565b50600180546001600160a01b031916339081179091556040516000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a36002839055600382905560058190556100bd838361048b565b6004908155600880546001600160a01b03808b166001600160a01b0319928316811790935560098054918b169190921617905560408051630dfe168160e01b81529051919550630dfe168194508083019350602092908290030181865afa15801561012c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061015091906104b2565b600680546001600160a01b0319166001600160a01b039283161790556008546040805163d21220a760e01b81529051919092169163d21220a79160048083019260209291908290030181865afa1580156101ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d291906104b2565b600780546001600160a01b0319166001600160a01b0392831617905560085460408051635909c0d560e01b815290519190921691635909c0d59160048083019260209291908290030181865afa158015610230573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025491906104d6565b600a5560085460408051635a3d549360e01b815290516001600160a01b0390921691635a3d5493916004808201926020929091908290030181865afa1580156102a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c591906104d6565b600b5560085460408051630240bc6b60e21b8152905160009283926001600160a01b0390911691630902f1ac916004808201926060929091908290030181865afa158015610317573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033b919061050b565b6009805463ffffffff909216600160a01b0263ffffffff60a01b1990921691909117905590925090506001600160701b0382161580159061038457506001600160701b03811615155b6103d05760405162461bcd60e51b815260206004820152601860248201527f477265656e4f7261636c653a204e4f5f524553455256455300000000000000006044820152606401610051565b50505050505061055b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044057600080fd5b50565b6000806000806080858703121561045957600080fd5b84516104648161042b565b60208601519094506104758161042b565b6040860151606090960151949790965092505050565b818103818111156104ac57634e487b7160e01b600052601160045260246000fd5b92915050565b6000602082840312156104c457600080fd5b81516104cf8161042b565b9392505050565b6000602082840312156104e857600080fd5b5051919050565b80516001600160701b038116811461050657600080fd5b919050565b60008060006060848603121561052057600080fd5b610529846104ef565b9250610537602085016104ef565b9150604084015163ffffffff8116811461055057600080fd5b809150509250925092565b6118c68061056a6000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c8063715018a6116100ee578063b97dd9e211610097578063c828371e11610071578063c828371e14610416578063d21220a71461041e578063f2f1e1321461043e578063f2fde38b1461045e57600080fd5b8063b97dd9e2146103fe578063ba52245814610406578063c5967c261461040e57600080fd5b8063a2e62045116100c8578063a2e62045146103ae578063a6bb4539146103b6578063a8aa1b31146103de57600080fd5b8063715018a6146103805780638a27f103146103885780638da5cb5b1461039057600080fd5b80634456eda21161015b5780635909c0d5116101355780635909c0d5146103065780635a3d54931461030f5780635e6aaf2c146103185780636808a1281461036d57600080fd5b80634456eda214610280578063570ca735146102ab57806358aee3c1146102c957600080fd5b80631ed241951161018c5780631ed241951461022557806329605e77146102375780633ddac9531461024a57600080fd5b80630ceb2cef146101b35780630dfe1681146101c85780630f3a9f6514610212575b600080fd5b6101c66101c136600461156e565b610471565b005b6006546101e89073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101c661022036600461156e565b610521565b6002545b604051908152602001610209565b6101c66102453660046115b0565b610647565b61025d6102583660046115cb565b61065b565b60405171ffffffffffffffffffffffffffffffffffff9091168152602001610209565b60015473ffffffffffffffffffffffffffffffffffffffff1633146040519015158152602001610209565b60015473ffffffffffffffffffffffffffffffffffffffff166101e8565b6009546102f19074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610209565b610229600a5481565b610229600b5481565b600d54610340907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681565b6040517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091168152602001610209565b61025d61037b3660046115cb565b6107df565b6101c6610966565b6101c661097a565b60005473ffffffffffffffffffffffffffffffffffffffff166101e8565b6101c66109f1565b600c54610340907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681565b6008546101e89073ffffffffffffffffffffffffffffffffffffffff1681565b600554610229565b600454610229565b610229610edd565b600354610229565b6007546101e89073ffffffffffffffffffffffffffffffffffffffff1681565b6009546101e89073ffffffffffffffffffffffffffffffffffffffff1681565b6101c661046c3660046115b0565b610ef4565b60015473ffffffffffffffffffffffffffffffffffffffff16331461051c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260448201527f61746f720000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600555565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260448201527f61746f72000000000000000000000000000000000000000000000000000000006064820152608401610513565b610e1081101580156105dc57506202a3008111155b610642576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5f706572696f643a206f7574206f662072616e676500000000000000000000006044820152606401610513565b600255565b61064f610f55565b61065881610fa8565b50565b60065460009073ffffffffffffffffffffffffffffffffffffffff908116908416036106cb576040805160208101909152600c547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681526106c4906106bd90846110d9565b5160701c90565b905061078e565b60075473ffffffffffffffffffffffffffffffffffffffff84811691161461074f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f477265656e4f7261636c653a20494e56414c49445f544f4b454e0000000000006044820152606401610513565b6040805160208101909152600d547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815261078b906106bd90846110d9565b90505b60095473ffffffffffffffffffffffffffffffffffffffff908116908416036107c7576107c064e8d4a5100082611624565b90506107d9565b6107d664e8d4a51000826116b4565b90505b92915050565b60085460009081908190819061080a9073ffffffffffffffffffffffffffffffffffffffff166111cc565b60095492955090935091506000906108409074010000000000000000000000000000000000000000900463ffffffff16836116f8565b60065490915073ffffffffffffffffffffffffffffffffffffffff908116908816036108c4576108bd6106bd8760405180602001604052808563ffffffff16600a548a61088d9190611714565b6108979190611727565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169052906110d9565b9450610911565b60075473ffffffffffffffffffffffffffffffffffffffff908116908816036109115761090e6106bd8760405180602001604052808563ffffffff16600b548961088d9190611714565b94505b60095473ffffffffffffffffffffffffffffffffffffffff9081169088160361094a5761094364e8d4a5100086611624565b945061095c565b61095964e8d4a51000866116b4565b94505b5050505092915050565b61096e610f55565b61097860006113f0565b565b610982610f55565b60015460405160009173ffffffffffffffffffffffffffffffffffffffff16907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908390a3600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60006109fb610edd565b905080421015610cad5760015473ffffffffffffffffffffffffffffffffffffffff163314610aac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f45706f63683a206f6e6c79206f70657261746f7220616c6c6f77656420666f7260448201527f207072652d65706f6368000000000000000000000000000000000000000000006064820152608401610513565b60085460009081908190610ad59073ffffffffffffffffffffffffffffffffffffffff166111cc565b6009549295509093509150600090610b0b9074010000000000000000000000000000000000000000900463ffffffff16836116f8565b90508063ffffffff16600003610b22575050505050565b60405180602001604052808263ffffffff16600a5487610b429190611714565b610b4c9190611727565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600c80547fffffffff0000000000000000000000000000000000000000000000000000000016919092161790556040805160208101909152600b54819063ffffffff841690610bc09087611714565b610bca9190611727565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600d80547fffffffff000000000000000000000000000000000000000000000000000000001691909216179055600a849055600b839055600980547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff85160217905560408051858152602081018590527fd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902910160405180910390a15050505050565b60085460009081908190610cd69073ffffffffffffffffffffffffffffffffffffffff166111cc565b6009549295509093509150600090610d0c9074010000000000000000000000000000000000000000900463ffffffff16836116f8565b90508063ffffffff16600003610d255750505050610eae565b60405180602001604052808263ffffffff16600a5487610d459190611714565b610d4f9190611727565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600c80547fffffffff0000000000000000000000000000000000000000000000000000000016919092161790556040805160208101909152600b54819063ffffffff841690610dc39087611714565b610dcd9190611727565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600d80547fffffffff000000000000000000000000000000000000000000000000000000001691909216179055600a849055600b839055600980547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff85160217905560408051858152602081018590527fd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902910160405180910390a1505050505b600481905560058054600090610ec39061173b565b90915550610ecf610edd565b905080421061065857610eae565b6000600254600454610eef9190611773565b905090565b610efc610f55565b73ffffffffffffffffffffffffffffffffffffffff8116610f4c576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610513565b610658816113f0565b60005473ffffffffffffffffffffffffffffffffffffffff163314610978576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610513565b73ffffffffffffffffffffffffffffffffffffffff811661104b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201527f206e6577206f70657261746f72000000000000000000000000000000000000006064820152608401610513565b60015460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed90600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b604080516020810190915260008152600082158061112b575083517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168361111d8183611786565b92506111299083611727565b145b6111b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4669786564506f696e743a204d554c5449504c49434154494f4e5f4f5645524660448201527f4c4f5700000000000000000000000000000000000000000000000000000000006064820152608401610513565b60408051602081019091529081529392505050565b60008060006111d9611465565b90508373ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611226573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124a919061179d565b92508373ffffffffffffffffffffffffffffffffffffffff16635a3d54936040518163ffffffff1660e01b8152600401602060405180830381865afa158015611297573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112bb919061179d565b915060008060008673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561130d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133191906117d4565b9250925092508363ffffffff168163ffffffff16146113e657600061135682866116f8565b90508063ffffffff166113698486611476565b5161139291907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16611786565b61139c9088611773565b96508063ffffffff166113af8585611476565b516113d891907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16611786565b6113e29087611773565b9550505b5050509193909250565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610eef64010000000042611824565b6040805160208101909152600081526000826dffffffffffffffffffffffffffff16116114ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f0000000000000000006044820152606401610513565b6040805160208101909152806115476dffffffffffffffffffffffffffff85167bffffffffffffffffffffffffffff0000000000000000000000000000607088901b16611838565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690529392505050565b60006020828403121561158057600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146115ab57600080fd5b919050565b6000602082840312156115c257600080fd5b6107d682611587565b600080604083850312156115de57600080fd5b6115e783611587565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600071ffffffffffffffffffffffffffffffffffff821671ffffffffffffffffffffffffffffffffffff841671ffffffffffffffffffffffffffffffffffff818302169250818304811482151761167d5761167d6115f5565b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600071ffffffffffffffffffffffffffffffffffff8316806116d8576116d8611685565b8071ffffffffffffffffffffffffffffffffffff84160491505092915050565b63ffffffff82811682821603908111156107d9576107d96115f5565b818103818111156107d9576107d96115f5565b60008261173657611736611685565b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361176c5761176c6115f5565b5060010190565b808201808211156107d9576107d96115f5565b80820281158282048414176107d9576107d96115f5565b6000602082840312156117af57600080fd5b5051919050565b80516dffffffffffffffffffffffffffff811681146115ab57600080fd5b6000806000606084860312156117e957600080fd5b6117f2846117b6565b9250611800602085016117b6565b9150604084015163ffffffff8116811461181957600080fd5b809150509250925092565b60008261183357611833611685565b500690565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83168061186657611866611685565b807bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8416049150509291505056fea2646970667358221220c5378ad9ab9e039d2a2a849b57a11efcd03d3df7d9228e4c1fc7a240f825e88c64736f6c634300081c00330000000000000000000000009f3e35fc18c93314a8d74bbc6c648d8ebdffa8cf000000000000000000000000d1f4414c66e5e046635a179143820f4cbf0d3d3b00000000000000000000000000000000000000000000000000000000000070800000000000000000000000000000000000000000000000000000000067beca00

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101ae5760003560e01c8063715018a6116100ee578063b97dd9e211610097578063c828371e11610071578063c828371e14610416578063d21220a71461041e578063f2f1e1321461043e578063f2fde38b1461045e57600080fd5b8063b97dd9e2146103fe578063ba52245814610406578063c5967c261461040e57600080fd5b8063a2e62045116100c8578063a2e62045146103ae578063a6bb4539146103b6578063a8aa1b31146103de57600080fd5b8063715018a6146103805780638a27f103146103885780638da5cb5b1461039057600080fd5b80634456eda21161015b5780635909c0d5116101355780635909c0d5146103065780635a3d54931461030f5780635e6aaf2c146103185780636808a1281461036d57600080fd5b80634456eda214610280578063570ca735146102ab57806358aee3c1146102c957600080fd5b80631ed241951161018c5780631ed241951461022557806329605e77146102375780633ddac9531461024a57600080fd5b80630ceb2cef146101b35780630dfe1681146101c85780630f3a9f6514610212575b600080fd5b6101c66101c136600461156e565b610471565b005b6006546101e89073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101c661022036600461156e565b610521565b6002545b604051908152602001610209565b6101c66102453660046115b0565b610647565b61025d6102583660046115cb565b61065b565b60405171ffffffffffffffffffffffffffffffffffff9091168152602001610209565b60015473ffffffffffffffffffffffffffffffffffffffff1633146040519015158152602001610209565b60015473ffffffffffffffffffffffffffffffffffffffff166101e8565b6009546102f19074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610209565b610229600a5481565b610229600b5481565b600d54610340907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681565b6040517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091168152602001610209565b61025d61037b3660046115cb565b6107df565b6101c6610966565b6101c661097a565b60005473ffffffffffffffffffffffffffffffffffffffff166101e8565b6101c66109f1565b600c54610340907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681565b6008546101e89073ffffffffffffffffffffffffffffffffffffffff1681565b600554610229565b600454610229565b610229610edd565b600354610229565b6007546101e89073ffffffffffffffffffffffffffffffffffffffff1681565b6009546101e89073ffffffffffffffffffffffffffffffffffffffff1681565b6101c661046c3660046115b0565b610ef4565b60015473ffffffffffffffffffffffffffffffffffffffff16331461051c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260448201527f61746f720000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600555565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260448201527f61746f72000000000000000000000000000000000000000000000000000000006064820152608401610513565b610e1081101580156105dc57506202a3008111155b610642576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5f706572696f643a206f7574206f662072616e676500000000000000000000006044820152606401610513565b600255565b61064f610f55565b61065881610fa8565b50565b60065460009073ffffffffffffffffffffffffffffffffffffffff908116908416036106cb576040805160208101909152600c547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681526106c4906106bd90846110d9565b5160701c90565b905061078e565b60075473ffffffffffffffffffffffffffffffffffffffff84811691161461074f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f477265656e4f7261636c653a20494e56414c49445f544f4b454e0000000000006044820152606401610513565b6040805160208101909152600d547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815261078b906106bd90846110d9565b90505b60095473ffffffffffffffffffffffffffffffffffffffff908116908416036107c7576107c064e8d4a5100082611624565b90506107d9565b6107d664e8d4a51000826116b4565b90505b92915050565b60085460009081908190819061080a9073ffffffffffffffffffffffffffffffffffffffff166111cc565b60095492955090935091506000906108409074010000000000000000000000000000000000000000900463ffffffff16836116f8565b60065490915073ffffffffffffffffffffffffffffffffffffffff908116908816036108c4576108bd6106bd8760405180602001604052808563ffffffff16600a548a61088d9190611714565b6108979190611727565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169052906110d9565b9450610911565b60075473ffffffffffffffffffffffffffffffffffffffff908116908816036109115761090e6106bd8760405180602001604052808563ffffffff16600b548961088d9190611714565b94505b60095473ffffffffffffffffffffffffffffffffffffffff9081169088160361094a5761094364e8d4a5100086611624565b945061095c565b61095964e8d4a51000866116b4565b94505b5050505092915050565b61096e610f55565b61097860006113f0565b565b610982610f55565b60015460405160009173ffffffffffffffffffffffffffffffffffffffff16907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908390a3600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60006109fb610edd565b905080421015610cad5760015473ffffffffffffffffffffffffffffffffffffffff163314610aac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f45706f63683a206f6e6c79206f70657261746f7220616c6c6f77656420666f7260448201527f207072652d65706f6368000000000000000000000000000000000000000000006064820152608401610513565b60085460009081908190610ad59073ffffffffffffffffffffffffffffffffffffffff166111cc565b6009549295509093509150600090610b0b9074010000000000000000000000000000000000000000900463ffffffff16836116f8565b90508063ffffffff16600003610b22575050505050565b60405180602001604052808263ffffffff16600a5487610b429190611714565b610b4c9190611727565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600c80547fffffffff0000000000000000000000000000000000000000000000000000000016919092161790556040805160208101909152600b54819063ffffffff841690610bc09087611714565b610bca9190611727565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600d80547fffffffff000000000000000000000000000000000000000000000000000000001691909216179055600a849055600b839055600980547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff85160217905560408051858152602081018590527fd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902910160405180910390a15050505050565b60085460009081908190610cd69073ffffffffffffffffffffffffffffffffffffffff166111cc565b6009549295509093509150600090610d0c9074010000000000000000000000000000000000000000900463ffffffff16836116f8565b90508063ffffffff16600003610d255750505050610eae565b60405180602001604052808263ffffffff16600a5487610d459190611714565b610d4f9190611727565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600c80547fffffffff0000000000000000000000000000000000000000000000000000000016919092161790556040805160208101909152600b54819063ffffffff841690610dc39087611714565b610dcd9190611727565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169091529051600d80547fffffffff000000000000000000000000000000000000000000000000000000001691909216179055600a849055600b839055600980547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff85160217905560408051858152602081018590527fd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902910160405180910390a1505050505b600481905560058054600090610ec39061173b565b90915550610ecf610edd565b905080421061065857610eae565b6000600254600454610eef9190611773565b905090565b610efc610f55565b73ffffffffffffffffffffffffffffffffffffffff8116610f4c576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610513565b610658816113f0565b60005473ffffffffffffffffffffffffffffffffffffffff163314610978576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610513565b73ffffffffffffffffffffffffffffffffffffffff811661104b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201527f206e6577206f70657261746f72000000000000000000000000000000000000006064820152608401610513565b60015460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed90600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b604080516020810190915260008152600082158061112b575083517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168361111d8183611786565b92506111299083611727565b145b6111b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4669786564506f696e743a204d554c5449504c49434154494f4e5f4f5645524660448201527f4c4f5700000000000000000000000000000000000000000000000000000000006064820152608401610513565b60408051602081019091529081529392505050565b60008060006111d9611465565b90508373ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611226573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124a919061179d565b92508373ffffffffffffffffffffffffffffffffffffffff16635a3d54936040518163ffffffff1660e01b8152600401602060405180830381865afa158015611297573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112bb919061179d565b915060008060008673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561130d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133191906117d4565b9250925092508363ffffffff168163ffffffff16146113e657600061135682866116f8565b90508063ffffffff166113698486611476565b5161139291907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16611786565b61139c9088611773565b96508063ffffffff166113af8585611476565b516113d891907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16611786565b6113e29087611773565b9550505b5050509193909250565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610eef64010000000042611824565b6040805160208101909152600081526000826dffffffffffffffffffffffffffff16116114ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f0000000000000000006044820152606401610513565b6040805160208101909152806115476dffffffffffffffffffffffffffff85167bffffffffffffffffffffffffffff0000000000000000000000000000607088901b16611838565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690529392505050565b60006020828403121561158057600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146115ab57600080fd5b919050565b6000602082840312156115c257600080fd5b6107d682611587565b600080604083850312156115de57600080fd5b6115e783611587565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600071ffffffffffffffffffffffffffffffffffff821671ffffffffffffffffffffffffffffffffffff841671ffffffffffffffffffffffffffffffffffff818302169250818304811482151761167d5761167d6115f5565b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600071ffffffffffffffffffffffffffffffffffff8316806116d8576116d8611685565b8071ffffffffffffffffffffffffffffffffffff84160491505092915050565b63ffffffff82811682821603908111156107d9576107d96115f5565b818103818111156107d9576107d96115f5565b60008261173657611736611685565b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361176c5761176c6115f5565b5060010190565b808201808211156107d9576107d96115f5565b80820281158282048414176107d9576107d96115f5565b6000602082840312156117af57600080fd5b5051919050565b80516dffffffffffffffffffffffffffff811681146115ab57600080fd5b6000806000606084860312156117e957600080fd5b6117f2846117b6565b9250611800602085016117b6565b9150604084015163ffffffff8116811461181957600080fd5b809150509250925092565b60008261183357611833611685565b500690565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83168061186657611866611685565b807bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8416049150509291505056fea2646970667358221220c5378ad9ab9e039d2a2a849b57a11efcd03d3df7d9228e4c1fc7a240f825e88c64736f6c634300081c0033

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

0000000000000000000000009f3e35fc18c93314a8d74bbc6c648d8ebdffa8cf000000000000000000000000d1f4414c66e5e046635a179143820f4cbf0d3d3b00000000000000000000000000000000000000000000000000000000000070800000000000000000000000000000000000000000000000000000000067beca00

-----Decoded View---------------
Arg [0] : _pair (address): 0x9F3e35fC18C93314A8D74bBC6c648d8EBDFFa8Cf
Arg [1] : _green (address): 0xd1F4414c66E5e046635A179143820f4CBf0D3D3b
Arg [2] : _period (uint256): 28800
Arg [3] : _startTime (uint256): 1740556800

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000009f3e35fc18c93314a8d74bbc6c648d8ebdffa8cf
Arg [1] : 000000000000000000000000d1f4414c66e5e046635a179143820f4cbf0d3d3b
Arg [2] : 0000000000000000000000000000000000000000000000000000000000007080
Arg [3] : 0000000000000000000000000000000000000000000000000000000067beca00


Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

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

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