ETH Price: $2,967.49 (-1.51%)
Gas: 5 Gwei

Contract

0xB58cbCb1e98c7F3771847cc2D730bF9589b534e4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Update125821262021-06-06 16:56:271127 days ago1622998587IN
0xB58cbCb1...589b534e4
0 ETH0.0007340912.76
Update125819572021-06-06 16:13:571127 days ago1622996037IN
0xB58cbCb1...589b534e4
0 ETH0.0007910513.75
Update125817832021-06-06 15:32:451127 days ago1622993565IN
0xB58cbCb1...589b534e4
0 ETH0.0007530813.09
Update125816262021-06-06 14:54:551127 days ago1622991295IN
0xB58cbCb1...589b534e4
0 ETH0.0006644811.55
Update125814882021-06-06 14:28:001127 days ago1622989680IN
0xB58cbCb1...589b534e4
0 ETH0.0005115612.1
Update125814032021-06-06 14:07:311127 days ago1622988451IN
0xB58cbCb1...589b534e4
0 ETH0.0006328411
Update125811902021-06-06 13:22:461127 days ago1622985766IN
0xB58cbCb1...589b534e4
0 ETH0.0006644811.55
Update125810122021-06-06 12:43:411127 days ago1622983421IN
0xB58cbCb1...589b534e4
0 ETH0.0006328411
Update125808172021-06-06 12:00:001127 days ago1622980800IN
0xB58cbCb1...589b534e4
0 ETH0.0005868110.2
Update125806612021-06-06 11:22:401127 days ago1622978560IN
0xB58cbCb1...589b534e4
0 ETH0.0006328411
Update125804702021-06-06 10:42:571127 days ago1622976177IN
0xB58cbCb1...589b534e4
0 ETH0.0006328411
Update125803022021-06-06 10:06:131127 days ago1622973973IN
0xB58cbCb1...589b534e4
0 ETH0.0006328411
Update125801122021-06-06 9:23:551127 days ago1622971435IN
0xB58cbCb1...589b534e4
0 ETH0.0006328411
Update125799272021-06-06 8:43:161127 days ago1622968996IN
0xB58cbCb1...589b534e4
0 ETH0.0006328411
Update125797552021-06-06 8:03:061128 days ago1622966586IN
0xB58cbCb1...589b534e4
0 ETH0.0006328411
Update125795542021-06-06 7:22:481128 days ago1622964168IN
0xB58cbCb1...589b534e4
0 ETH0.0004650511
Update125795262021-06-06 7:17:311128 days ago1622963851IN
0xB58cbCb1...589b534e4
0 ETH0.0004650511
Update125795262021-06-06 7:17:311128 days ago1622963851IN
0xB58cbCb1...589b534e4
0 ETH0.0006961212.1
Update125792712021-06-06 6:22:491128 days ago1622960569IN
0xB58cbCb1...589b534e4
0 ETH0.0006328411
Update125790902021-06-06 5:45:251128 days ago1622958325IN
0xB58cbCb1...589b534e4
0 ETH0.0006644811.55
Update125789152021-06-06 5:03:291128 days ago1622955809IN
0xB58cbCb1...589b534e4
0 ETH0.0006708111.66
Update125787412021-06-06 4:24:101128 days ago1622953450IN
0xB58cbCb1...589b534e4
0 ETH0.0006328411
Update125785332021-06-06 3:37:401128 days ago1622950660IN
0xB58cbCb1...589b534e4
0 ETH0.0005925610.3
Update125783632021-06-06 2:57:181128 days ago1622948238IN
0xB58cbCb1...589b534e4
0 ETH0.0006098210.6
Update125782002021-06-06 2:22:431128 days ago1622946163IN
0xB58cbCb1...589b534e4
0 ETH0.0006961212.1
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UniswapOracle

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU AGPLv3 license
File 1 of 18 : UniswapOracle.sol
pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

// Referencing Uniswap Example Simple Oracle
// https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/examples/ExampleOracleSimple.sol

import "./IUniswapOracle.sol";
import "../refs/CoreRef.sol";
import "../external/SafeMathCopy.sol";
import "../external/UniswapV2OracleLibrary.sol";

/// @title Uniswap Oracle for ETH/FEI
/// @author Fei Protocol
/// @notice maintains the TWAP of a uniswap pair contract over a specified duration
contract UniswapOracle is IUniswapOracle, CoreRef {
    using Decimal for Decimal.D256;
    using SafeMathCopy for uint256;

    /// @notice the referenced uniswap pair contract
    IUniswapV2Pair public override pair;
    bool private isPrice0;

    /// @notice the previous cumulative price of the oracle snapshot
    uint256 public override priorCumulative;

    /// @notice the previous timestamp of the oracle snapshot
    uint32 public override priorTimestamp;

    Decimal.D256 private twap = Decimal.zero();

    /// @notice the window over which the initial price will "thaw" to the true peg price
    uint256 public override duration;

    uint256 private constant FIXED_POINT_GRANULARITY = 2**112;

    /// @notice UniswapOracle constructor
    /// @param _core Fei Core for reference
    /// @param _pair Uniswap Pair to provide TWAP
    /// @param _duration TWAP duration
    /// @param _isPrice0 flag for using token0 or token1 for cumulative on Uniswap
    constructor(
        address _core,
        address _pair,
        uint256 _duration,
        bool _isPrice0
    ) public CoreRef(_core) {
        pair = IUniswapV2Pair(_pair);
        // Relative to USD per ETH price
        isPrice0 = _isPrice0;

        duration = _duration;

        _init();
    }

    /// @notice updates the oracle price
    /// @return true if oracle is updated and false if unchanged
    function update() external override whenNotPaused returns (bool) {
        (
            uint256 price0Cumulative,
            uint256 price1Cumulative,
            uint32 currentTimestamp
        ) = UniswapV2OracleLibrary.currentCumulativePrices(address(pair));

        uint32 deltaTimestamp = currentTimestamp - priorTimestamp; // allowing underflow per Uniswap Oracle spec
        if (deltaTimestamp < duration) {
            return false;
        }

        uint256 currentCumulative = _getCumulative(price0Cumulative, price1Cumulative);
        uint256 deltaCumulative =
            (currentCumulative - priorCumulative); // allowing underflow per Uniswap Oracle spec

        // Uniswap stores cumulative price variables as a fixed point 112x112 so we need to divide out the granularity
        Decimal.D256 memory _twap =
            Decimal.ratio(
                deltaCumulative / deltaTimestamp,
                FIXED_POINT_GRANULARITY
            );
        twap = _twap;

        priorTimestamp = currentTimestamp;
        priorCumulative = currentCumulative;

        emit Update(_twap.asUint256());

        return true;
    }

    /// @notice determine if read value is stale
    /// @return true if read value is stale
    function isOutdated() external view override returns (bool) {
        (, , uint32 currentTimestamp) =
            UniswapV2OracleLibrary.currentCumulativePrices(address(pair));
        uint32 deltaTimestamp = currentTimestamp - priorTimestamp; // allowing underflow per Uniswap Oracle spec
        return deltaTimestamp >= duration;
    }

    /// @notice read the oracle price
    /// @return oracle price
    /// @return true if price is valid
    /// @dev price is to be denominated in USD per X where X can be ETH, etc.
    /// @dev Can be innacurate if outdated, need to call `isOutdated()` to check
    function read() external view override returns (Decimal.D256 memory, bool) {
        bool valid = !(paused() || twap.isZero());
        return (twap, valid);
    }

    /// @notice set a new duration for the TWAP window
    function setDuration(uint256 _duration) external override onlyGovernor {
        duration = _duration;
        emit DurationUpdate(_duration);
    }

    function _init() internal {
        (
            uint256 price0Cumulative,
            uint256 price1Cumulative,
            uint32 currentTimestamp
        ) = UniswapV2OracleLibrary.currentCumulativePrices(address(pair));

        priorTimestamp = currentTimestamp;
        priorCumulative = _getCumulative(price0Cumulative, price1Cumulative);
    }

    function _getCumulative(uint256 price0Cumulative, uint256 price1Cumulative)
        internal
        view
        returns (uint256)
    {
        return isPrice0 ? price0Cumulative : price1Cumulative;
    }
}

File 2 of 18 : IUniswapOracle.sol
pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "./IOracle.sol";

/// @title Uniswap oracle interface
/// @author Fei Protocol
interface IUniswapOracle is IOracle {
    // ----------- Events -----------
    event DurationUpdate(uint256 _duration);

    // ----------- Governor only state changing API -----------

    function setDuration(uint256 _duration) external;

    // ----------- Getters -----------

    function priorTimestamp() external returns (uint32);

    function priorCumulative() external returns (uint256);

    function duration() external returns (uint256);

    function pair() external returns (IUniswapV2Pair);
}

File 3 of 18 : IOracle.sol
pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

import "../external/Decimal.sol";

/// @title generic oracle interface for Fei Protocol
/// @author Fei Protocol
interface IOracle {
    // ----------- Events -----------

    event Update(uint256 _peg);

    // ----------- State changing API -----------

    function update() external returns (bool);

    // ----------- Getters -----------

    function read() external view returns (Decimal.D256 memory, bool);

    function isOutdated() external view returns (bool);
    
}

File 4 of 18 : Decimal.sol
/*
    Copyright 2019 dYdX Trading Inc.
    Copyright 2020 Empty Set Squad <[email protected]>
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

import "./SafeMathCopy.sol";

/**
 * @title Decimal
 * @author dYdX
 *
 * Library that defines a fixed-point number with 18 decimal places.
 */
library Decimal {
    using SafeMathCopy for uint256;

    // ============ Constants ============

    uint256 private constant BASE = 10**18;

    // ============ Structs ============


    struct D256 {
        uint256 value;
    }

    // ============ Static Functions ============

    function zero()
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: 0 });
    }

    function one()
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: BASE });
    }

    function from(
        uint256 a
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: a.mul(BASE) });
    }

    function ratio(
        uint256 a,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: getPartial(a, BASE, b) });
    }

    // ============ Self Functions ============

    function add(
        D256 memory self,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.add(b.mul(BASE)) });
    }

    function sub(
        D256 memory self,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.sub(b.mul(BASE)) });
    }

    function sub(
        D256 memory self,
        uint256 b,
        string memory reason
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.sub(b.mul(BASE), reason) });
    }

    function mul(
        D256 memory self,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.mul(b) });
    }

    function div(
        D256 memory self,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.div(b) });
    }

    function pow(
        D256 memory self,
        uint256 b
    )
    internal
    pure
    returns (D256 memory)
    {
        if (b == 0) {
            return from(1);
        }

        D256 memory temp = D256({ value: self.value });
        for (uint256 i = 1; i < b; i++) {
            temp = mul(temp, self);
        }

        return temp;
    }

    function add(
        D256 memory self,
        D256 memory b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.add(b.value) });
    }

    function sub(
        D256 memory self,
        D256 memory b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.sub(b.value) });
    }

    function sub(
        D256 memory self,
        D256 memory b,
        string memory reason
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: self.value.sub(b.value, reason) });
    }

    function mul(
        D256 memory self,
        D256 memory b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: getPartial(self.value, b.value, BASE) });
    }

    function div(
        D256 memory self,
        D256 memory b
    )
    internal
    pure
    returns (D256 memory)
    {
        return D256({ value: getPartial(self.value, BASE, b.value) });
    }

    function equals(D256 memory self, D256 memory b) internal pure returns (bool) {
        return self.value == b.value;
    }

    function greaterThan(D256 memory self, D256 memory b) internal pure returns (bool) {
        return compareTo(self, b) == 2;
    }

    function lessThan(D256 memory self, D256 memory b) internal pure returns (bool) {
        return compareTo(self, b) == 0;
    }

    function greaterThanOrEqualTo(D256 memory self, D256 memory b) internal pure returns (bool) {
        return compareTo(self, b) > 0;
    }

    function lessThanOrEqualTo(D256 memory self, D256 memory b) internal pure returns (bool) {
        return compareTo(self, b) < 2;
    }

    function isZero(D256 memory self) internal pure returns (bool) {
        return self.value == 0;
    }

    function asUint256(D256 memory self) internal pure returns (uint256) {
        return self.value.div(BASE);
    }

    // ============ Core Methods ============

    function getPartial(
        uint256 target,
        uint256 numerator,
        uint256 denominator
    )
    private
    pure
    returns (uint256)
    {
        return target.mul(numerator).div(denominator);
    }

    function compareTo(
        D256 memory a,
        D256 memory b
    )
    private
    pure
    returns (uint256)
    {
        if (a.value == b.value) {
            return 1;
        }
        return a.value > b.value ? 2 : 0;
    }
}

File 5 of 18 : SafeMathCopy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMathCopy { // To avoid namespace collision between openzeppelin safemath and uniswap safemath
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

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

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

        return c;
    }

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

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

File 6 of 18 : CoreRef.sol
pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

import "./ICoreRef.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/// @title A Reference to Core
/// @author Fei Protocol
/// @notice defines some modifiers and utilities around interacting with Core
abstract contract CoreRef is ICoreRef, Pausable {
    ICore private _core;

    /// @notice CoreRef constructor
    /// @param core Fei Core to reference
    constructor(address core) public {
        _core = ICore(core);
    }

    modifier ifMinterSelf() {
        if (_core.isMinter(address(this))) {
            _;
        }
    }

    modifier ifBurnerSelf() {
        if (_core.isBurner(address(this))) {
            _;
        }
    }

    modifier onlyMinter() {
        require(_core.isMinter(msg.sender), "CoreRef: Caller is not a minter");
        _;
    }

    modifier onlyBurner() {
        require(_core.isBurner(msg.sender), "CoreRef: Caller is not a burner");
        _;
    }

    modifier onlyPCVController() {
        require(
            _core.isPCVController(msg.sender),
            "CoreRef: Caller is not a PCV controller"
        );
        _;
    }

    modifier onlyGovernor() {
        require(
            _core.isGovernor(msg.sender),
            "CoreRef: Caller is not a governor"
        );
        _;
    }

    modifier onlyGuardianOrGovernor() {
        require(
            _core.isGovernor(msg.sender) ||
            _core.isGuardian(msg.sender),
            "CoreRef: Caller is not a guardian or governor"
        );
        _;
    }

    modifier onlyFei() {
        require(msg.sender == address(fei()), "CoreRef: Caller is not FEI");
        _;
    }

    modifier onlyGenesisGroup() {
        require(
            msg.sender == _core.genesisGroup(),
            "CoreRef: Caller is not GenesisGroup"
        );
        _;
    }

    modifier postGenesis() {
        require(
            _core.hasGenesisGroupCompleted(),
            "CoreRef: Still in Genesis Period"
        );
        _;
    }

    modifier nonContract() {
        require(!Address.isContract(msg.sender), "CoreRef: Caller is a contract");
        _;
    }

    /// @notice set new Core reference address
    /// @param core the new core address
    function setCore(address core) external override onlyGovernor {
        _core = ICore(core);
        emit CoreUpdate(core);
    }

    /// @notice set pausable methods to paused
    function pause() public override onlyGuardianOrGovernor {
        _pause();
    }

    /// @notice set pausable methods to unpaused
    function unpause() public override onlyGuardianOrGovernor {
        _unpause();
    }

    /// @notice address of the Core contract referenced
    /// @return ICore implementation address
    function core() public view override returns (ICore) {
        return _core;
    }

    /// @notice address of the Fei contract referenced by Core
    /// @return IFei implementation address
    function fei() public view override returns (IFei) {
        return _core.fei();
    }

    /// @notice address of the Tribe contract referenced by Core
    /// @return IERC20 implementation address
    function tribe() public view override returns (IERC20) {
        return _core.tribe();
    }

    /// @notice fei balance of contract
    /// @return fei amount held
    function feiBalance() public view override returns (uint256) {
        return fei().balanceOf(address(this));
    }

    /// @notice tribe balance of contract
    /// @return tribe amount held
    function tribeBalance() public view override returns (uint256) {
        return tribe().balanceOf(address(this));
    }

    function _burnFeiHeld() internal {
        fei().burn(feiBalance());
    }

    function _mintFei(uint256 amount) internal {
        fei().mint(address(this), amount);
    }
}

File 7 of 18 : ICoreRef.sol
pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

import "../core/ICore.sol";

/// @title CoreRef interface
/// @author Fei Protocol
interface ICoreRef {
    // ----------- Events -----------

    event CoreUpdate(address indexed _core);

    // ----------- Governor only state changing api -----------

    function setCore(address core) external;

    function pause() external;

    function unpause() external;

    // ----------- Getters -----------

    function core() external view returns (ICore);

    function fei() external view returns (IFei);

    function tribe() external view returns (IERC20);

    function feiBalance() external view returns (uint256);

    function tribeBalance() external view returns (uint256);
}

File 8 of 18 : ICore.sol
pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

import "./IPermissions.sol";
import "../token/IFei.sol";

/// @title Core Interface
/// @author Fei Protocol
interface ICore is IPermissions {
    // ----------- Events -----------

    event FeiUpdate(address indexed _fei);
    event TribeUpdate(address indexed _tribe);
    event GenesisGroupUpdate(address indexed _genesisGroup);
    event TribeAllocation(address indexed _to, uint256 _amount);
    event GenesisPeriodComplete(uint256 _timestamp);

    // ----------- Governor only state changing api -----------

    function init() external;

    // ----------- Governor only state changing api -----------

    function setFei(address token) external;

    function setTribe(address token) external;

    function setGenesisGroup(address _genesisGroup) external;

    function allocateTribe(address to, uint256 amount) external;

    // ----------- Genesis Group only state changing api -----------

    function completeGenesisGroup() external;

    // ----------- Getters -----------

    function fei() external view returns (IFei);

    function tribe() external view returns (IERC20);

    function genesisGroup() external view returns (address);

    function hasGenesisGroupCompleted() external view returns (bool);
}

File 9 of 18 : IPermissions.sol
pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

/// @title Permissions interface
/// @author Fei Protocol
interface IPermissions {
    // ----------- Governor only state changing api -----------

    function createRole(bytes32 role, bytes32 adminRole) external;

    function grantMinter(address minter) external;

    function grantBurner(address burner) external;

    function grantPCVController(address pcvController) external;

    function grantGovernor(address governor) external;

    function grantGuardian(address guardian) external;

    function revokeMinter(address minter) external;

    function revokeBurner(address burner) external;

    function revokePCVController(address pcvController) external;

    function revokeGovernor(address governor) external;

    function revokeGuardian(address guardian) external;

    // ----------- Revoker only state changing api -----------

    function revokeOverride(bytes32 role, address account) external;

    // ----------- Getters -----------

    function isBurner(address _address) external view returns (bool);

    function isMinter(address _address) external view returns (bool);

    function isGovernor(address _address) external view returns (bool);

    function isGuardian(address _address) external view returns (bool);

    function isPCVController(address _address) external view returns (bool);
}

File 10 of 18 : IFei.sol
pragma solidity ^0.6.2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/// @title FEI stablecoin interface
/// @author Fei Protocol
interface IFei is IERC20 {
    // ----------- Events -----------

    event Minting(
        address indexed _to,
        address indexed _minter,
        uint256 _amount
    );

    event Burning(
        address indexed _to,
        address indexed _burner,
        uint256 _amount
    );

    event IncentiveContractUpdate(
        address indexed _incentivized,
        address indexed _incentiveContract
    );

    // ----------- State changing api -----------

    function burn(uint256 amount) external;

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

    // ----------- Burner only state changing api -----------

    function burnFrom(address account, uint256 amount) external;

    // ----------- Minter only state changing api -----------

    function mint(address account, uint256 amount) external;

    // ----------- Governor only state changing api -----------

    function setIncentiveContract(address account, address incentive) external;

    // ----------- Getters -----------

    function incentiveContract(address account) external view returns (address);
}

File 11 of 18 : UniswapV2OracleLibrary.sol
pragma solidity >=0.6.0;

import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/lib/contracts/libraries/FixedPoint.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 (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) {
        blockTimestamp = currentBlockTimestamp();
        price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast();
        price1Cumulative = IUniswapV2Pair(pair).price1CumulativeLast();

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

File 12 of 18 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

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

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

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

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

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

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

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

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

    function initialize(address, address) external;
}

File 13 of 18 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () internal {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 14 of 18 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

File 15 of 18 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

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

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

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

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

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

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

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

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

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

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 16 of 18 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 17 of 18 : FixedPoint.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

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

    uint8 private constant RESOLUTION = 112;
    uint private constant Q112 = uint(1) << RESOLUTION;
    uint 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, uint y) internal pure returns (uq144x112 memory) {
        uint z;
        require(y == 0 || (z = uint(self._x) * y) / y == uint(self._x), "FixedPoint: MULTIPLICATION_OVERFLOW");
        return uq144x112(z);
    }

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

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

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

    // 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 18 of 18 : Babylonian.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

// computes square roots using the babylonian method
// https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
library Babylonian {
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
        // else z = 0
    }
}

Settings
{
  "metadata": {
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_core","type":"address"},{"internalType":"address","name":"_pair","type":"address"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"bool","name":"_isPrice0","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_core","type":"address"}],"name":"CoreUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"DurationUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_peg","type":"uint256"}],"name":"Update","type":"event"},{"inputs":[],"name":"core","outputs":[{"internalType":"contract ICore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fei","outputs":[{"internalType":"contract IFei","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feiBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOutdated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priorCumulative","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priorTimestamp","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"read","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"","type":"tuple"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"core","type":"address"}],"name":"setCore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"setDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tribe","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tribeBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"update","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

608060405262000019620000b560201b620011271760201c565b516004553480156200002a57600080fd5b50604051620016d4380380620016d48339810160408190526200004d916200042f565b600080546001600160a81b0319166101006001600160a01b038781169190910291909117909155600180546001600160a01b0319169185169190911760ff60a01b1916600160a01b831515021790556005829055620000ab620000d2565b505050506200054c565b620000bf620003f2565b5060408051602081019091526000815290565b600080600062000102600160009054906101000a90046001600160a01b03166200013260201b620009f71760201c565b6003805463ffffffff191663ffffffff8316179055919450925090506200012a83836200033e565b600255505050565b60008080620001496001600160e01b036200036516565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018557600080fd5b505afa1580156200019a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c09190620004e3565b9250836001600160a01b0316635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b158015620001fc57600080fd5b505afa15801562000211573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002379190620004e3565b91506000806000866001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156200027857600080fd5b505afa1580156200028d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002b3919062000489565b9250925092508363ffffffff168163ffffffff16146200033457600081850390508063ffffffff16620002f284866200036f60201b62000ca61760201c565b600001516001600160e01b031602870196508063ffffffff166200032285856200036f60201b62000ca61760201c565b516001600160e01b0316029590950194505b5050509193909250565b600154600090600160a01b900460ff166200035a57816200035c565b825b90505b92915050565b63ffffffff421690565b6200037962000405565b6000826001600160701b031611620003ae5760405162461bcd60e51b8152600401620003a590620004fc565b60405180910390fd5b6040805160208101909152806001600160701b038416600160701b600160e01b03607087901b1681620003dd57fe5b046001600160e01b0316815250905092915050565b6040518060200160405280600081525090565b60408051602081019091526000815290565b80516001600160a01b03811681146200035f57600080fd5b6000806000806080858703121562000445578384fd5b62000451868662000417565b935062000462866020870162000417565b925060408501519150606085015180151581146200047e578182fd5b939692955090935050565b6000806000606084860312156200049e578283fd5b8351620004ab8162000533565b6020850151909350620004be8162000533565b604085015190925063ffffffff81168114620004d8578182fd5b809150509250925092565b600060208284031215620004f5578081fd5b5051919050565b60208082526017908201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604082015260600190565b6001600160701b03811681146200054957600080fd5b50565b611178806200055c6000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c806380009630116100a2578063a8aa1b3111610071578063a8aa1b31146101c8578063b4905897146101d0578063b86677fe146101d8578063f2f4eb26146101e0578063f6be71d1146101e85761010b565b806380009630146101905780638456cb59146101a35780639a9ba4da146101ab578063a2e62045146101c05761010b565b80635c975abb116100de5780635c975abb14610156578063667a2a3b1461016b5780636b6dff0a1461018057806374d3bae5146101885761010b565b80630fb5a6b4146101105780633f4ba83a1461012e578063455e95f61461013857806357de26a414610140575b600080fd5b6101186101fb565b60405161012591906110e0565b60405180910390f35b610136610201565b005b61011861033e565b610148610344565b6040516101259291906110cf565b61015e610390565b6040516101259190610f13565b61017361039a565b60405161012591906110e9565b6101186103a6565b61015e610430565b61013661019e366004610e23565b610466565b610136610556565b6101b3610688565b6040516101259190610eff565b61015e61070f565b6101b3610828565b610118610837565b6101b3610841565b6101b3610890565b6101366101f6366004610ecf565b6108a4565b60055481565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b890610235903390600401610eff565b60206040518083038186803b15801561024d57600080fd5b505afa158015610261573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102859190610e3f565b8061030f5750600054604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba21906102bf903390600401610eff565b60206040518083038186803b1580156102d757600080fd5b505afa1580156102eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030f9190610e3f565b6103345760405162461bcd60e51b815260040161032b90610f9f565b60405180910390fd5b61033c610984565b565b60025481565b61034c610dfe565b600080610357610390565b80610376575060408051602081019091526004548152610376906109f2565b604080516020810190915260045481529350159150509091565b60005460ff165b90565b60035463ffffffff1681565b60006103b0610841565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016103db9190610eff565b60206040518083038186803b1580156103f357600080fd5b505afa158015610407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042b9190610ee7565b905090565b600154600090819061044a906001600160a01b03166109f7565b60035460055463ffffffff918216909203161015935050505090565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b89061049a903390600401610eff565b60206040518083038186803b1580156104b257600080fd5b505afa1580156104c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ea9190610e3f565b6105065760405162461bcd60e51b815260040161032b90611057565b60008054610100600160a81b0319166101006001600160a01b03841690810291909117825560405190917fad9400e618eb1344fde53db22397a1b82c765527ecbba3a5c86bcac15090828b91a250565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b89061058a903390600401610eff565b60206040518083038186803b1580156105a257600080fd5b505afa1580156105b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105da9190610e3f565b806106645750600054604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba2190610614903390600401610eff565b60206040518083038186803b15801561062c57600080fd5b505afa158015610640573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106649190610e3f565b6106805760405162461bcd60e51b815260040161032b90610f9f565b61033c610bcc565b60008060019054906101000a90046001600160a01b03166001600160a01b0316639a9ba4da6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106d757600080fd5b505afa1580156106eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042b9190610e5f565b6000610719610390565b156107365760405162461bcd60e51b815260040161032b90610fec565b60015460009081908190610752906001600160a01b03166109f7565b600354600554939650919450925063ffffffff9081168303919082161015610781576000945050505050610397565b600061078d8585610c27565b600254909150810361079d610dfe565b6107ba8463ffffffff1683816107af57fe5b04600160701b610c4c565b80516004556003805463ffffffff191663ffffffff8816179055600284905590507f164f7b2ab803097dab5e39f06d2e4f3c3ddc5d4171abbdcc3e76443b8359c7f561080582610c7b565b60405161081291906110e0565b60405180910390a1600197505050505050505090565b6001546001600160a01b031681565b60006103b0610688565b60008060019054906101000a90046001600160a01b03166001600160a01b031663b86677fe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106d757600080fd5b60005461010090046001600160a01b031690565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b8906108d8903390600401610eff565b60206040518083038186803b1580156108f057600080fd5b505afa158015610904573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109289190610e3f565b6109445760405162461bcd60e51b815260040161032b90611057565b60058190556040517fef01a748b5b8a4f1d48b88861f6d361d7391ad2bbed27ff97d762889ca80d737906109799083906110e0565b60405180910390a150565b61098c610390565b6109a85760405162461bcd60e51b815260040161032b90610f71565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6109db610c98565b6040516109e89190610eff565b60405180910390a1565b511590565b6000806000610a04610c9c565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015610a3f57600080fd5b505afa158015610a53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a779190610ee7565b9250836001600160a01b0316635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b158015610ab257600080fd5b505afa158015610ac6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aea9190610ee7565b91506000806000866001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610b2a57600080fd5b505afa158015610b3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b629190610e7b565b9250925092508363ffffffff168163ffffffff1614610bc25780840363ffffffff8116610b8f8486610ca6565b516001600160e01b031602969096019563ffffffff8116610bb08585610ca6565b516001600160e01b0316029590950194505b5050509193909250565b610bd4610390565b15610bf15760405162461bcd60e51b815260040161032b90610fec565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586109db610c98565b600154600090600160a01b900460ff16610c415781610c43565b825b90505b92915050565b610c54610dfe565b6040518060200160405280610c7285670de0b6b3a764000086610d21565b90529392505050565b8051600090610c4690670de0b6b3a764000063ffffffff610d4b16565b3390565b63ffffffff421690565b610cae610e11565b6000826001600160701b031611610cd75760405162461bcd60e51b815260040161032b90611098565b6040805160208101909152806001600160701b0384166dffffffffffffffffffffffffffff60701b607087901b1681610d0c57fe5b046001600160e01b0316815250905092915050565b6000610d4382610d37868663ffffffff610d8d16565b9063ffffffff610d4b16565b949350505050565b6000610c4383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610dc7565b600082610d9c57506000610c46565b82820282848281610da957fe5b0414610c435760405162461bcd60e51b815260040161032b90611016565b60008183610de85760405162461bcd60e51b815260040161032b9190610f1e565b506000838581610df457fe5b0495945050505050565b6040518060200160405280600081525090565b60408051602081019091526000815290565b600060208284031215610e34578081fd5b8135610c43816110fa565b600060208284031215610e50578081fd5b81518015158114610c43578182fd5b600060208284031215610e70578081fd5b8151610c43816110fa565b600080600060608486031215610e8f578182fd5b8351610e9a81611112565b6020850151909350610eab81611112565b604085015190925063ffffffff81168114610ec4578182fd5b809150509250925092565b600060208284031215610ee0578081fd5b5035919050565b600060208284031215610ef8578081fd5b5051919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b81811015610f4a57858101830151858201604001528201610f2e565b81811115610f5b5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252602d908201527f436f72655265663a2043616c6c6572206973206e6f742061206775617264696160408201526c371037b91033b7bb32b93737b960991b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f436f72655265663a2043616c6c6572206973206e6f74206120676f7665726e6f6040820152603960f91b606082015260800190565b60208082526017908201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604082015260600190565b915182521515602082015260400190565b90815260200190565b63ffffffff91909116815260200190565b6001600160a01b038116811461110f57600080fd5b50565b6001600160701b038116811461110f57600080fd5b61112f610dfe565b506040805160208101909152600081529056fea2646970667358221220246fcdeb0aba8431832835f931e835573ec84dd50059bad8c6e3a5edad123a5064736f6c634300060600330000000000000000000000008d5ed43dca8c2f7dfb20cf7b53cc7e593635d7b900000000000000000000000094b0a3d511b6ecdb17ebf877278ab030acb0a87800000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806380009630116100a2578063a8aa1b3111610071578063a8aa1b31146101c8578063b4905897146101d0578063b86677fe146101d8578063f2f4eb26146101e0578063f6be71d1146101e85761010b565b806380009630146101905780638456cb59146101a35780639a9ba4da146101ab578063a2e62045146101c05761010b565b80635c975abb116100de5780635c975abb14610156578063667a2a3b1461016b5780636b6dff0a1461018057806374d3bae5146101885761010b565b80630fb5a6b4146101105780633f4ba83a1461012e578063455e95f61461013857806357de26a414610140575b600080fd5b6101186101fb565b60405161012591906110e0565b60405180910390f35b610136610201565b005b61011861033e565b610148610344565b6040516101259291906110cf565b61015e610390565b6040516101259190610f13565b61017361039a565b60405161012591906110e9565b6101186103a6565b61015e610430565b61013661019e366004610e23565b610466565b610136610556565b6101b3610688565b6040516101259190610eff565b61015e61070f565b6101b3610828565b610118610837565b6101b3610841565b6101b3610890565b6101366101f6366004610ecf565b6108a4565b60055481565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b890610235903390600401610eff565b60206040518083038186803b15801561024d57600080fd5b505afa158015610261573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102859190610e3f565b8061030f5750600054604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba21906102bf903390600401610eff565b60206040518083038186803b1580156102d757600080fd5b505afa1580156102eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030f9190610e3f565b6103345760405162461bcd60e51b815260040161032b90610f9f565b60405180910390fd5b61033c610984565b565b60025481565b61034c610dfe565b600080610357610390565b80610376575060408051602081019091526004548152610376906109f2565b604080516020810190915260045481529350159150509091565b60005460ff165b90565b60035463ffffffff1681565b60006103b0610841565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016103db9190610eff565b60206040518083038186803b1580156103f357600080fd5b505afa158015610407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042b9190610ee7565b905090565b600154600090819061044a906001600160a01b03166109f7565b60035460055463ffffffff918216909203161015935050505090565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b89061049a903390600401610eff565b60206040518083038186803b1580156104b257600080fd5b505afa1580156104c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ea9190610e3f565b6105065760405162461bcd60e51b815260040161032b90611057565b60008054610100600160a81b0319166101006001600160a01b03841690810291909117825560405190917fad9400e618eb1344fde53db22397a1b82c765527ecbba3a5c86bcac15090828b91a250565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b89061058a903390600401610eff565b60206040518083038186803b1580156105a257600080fd5b505afa1580156105b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105da9190610e3f565b806106645750600054604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba2190610614903390600401610eff565b60206040518083038186803b15801561062c57600080fd5b505afa158015610640573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106649190610e3f565b6106805760405162461bcd60e51b815260040161032b90610f9f565b61033c610bcc565b60008060019054906101000a90046001600160a01b03166001600160a01b0316639a9ba4da6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106d757600080fd5b505afa1580156106eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042b9190610e5f565b6000610719610390565b156107365760405162461bcd60e51b815260040161032b90610fec565b60015460009081908190610752906001600160a01b03166109f7565b600354600554939650919450925063ffffffff9081168303919082161015610781576000945050505050610397565b600061078d8585610c27565b600254909150810361079d610dfe565b6107ba8463ffffffff1683816107af57fe5b04600160701b610c4c565b80516004556003805463ffffffff191663ffffffff8816179055600284905590507f164f7b2ab803097dab5e39f06d2e4f3c3ddc5d4171abbdcc3e76443b8359c7f561080582610c7b565b60405161081291906110e0565b60405180910390a1600197505050505050505090565b6001546001600160a01b031681565b60006103b0610688565b60008060019054906101000a90046001600160a01b03166001600160a01b031663b86677fe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106d757600080fd5b60005461010090046001600160a01b031690565b600054604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b8906108d8903390600401610eff565b60206040518083038186803b1580156108f057600080fd5b505afa158015610904573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109289190610e3f565b6109445760405162461bcd60e51b815260040161032b90611057565b60058190556040517fef01a748b5b8a4f1d48b88861f6d361d7391ad2bbed27ff97d762889ca80d737906109799083906110e0565b60405180910390a150565b61098c610390565b6109a85760405162461bcd60e51b815260040161032b90610f71565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6109db610c98565b6040516109e89190610eff565b60405180910390a1565b511590565b6000806000610a04610c9c565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015610a3f57600080fd5b505afa158015610a53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a779190610ee7565b9250836001600160a01b0316635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b158015610ab257600080fd5b505afa158015610ac6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aea9190610ee7565b91506000806000866001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610b2a57600080fd5b505afa158015610b3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b629190610e7b565b9250925092508363ffffffff168163ffffffff1614610bc25780840363ffffffff8116610b8f8486610ca6565b516001600160e01b031602969096019563ffffffff8116610bb08585610ca6565b516001600160e01b0316029590950194505b5050509193909250565b610bd4610390565b15610bf15760405162461bcd60e51b815260040161032b90610fec565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586109db610c98565b600154600090600160a01b900460ff16610c415781610c43565b825b90505b92915050565b610c54610dfe565b6040518060200160405280610c7285670de0b6b3a764000086610d21565b90529392505050565b8051600090610c4690670de0b6b3a764000063ffffffff610d4b16565b3390565b63ffffffff421690565b610cae610e11565b6000826001600160701b031611610cd75760405162461bcd60e51b815260040161032b90611098565b6040805160208101909152806001600160701b0384166dffffffffffffffffffffffffffff60701b607087901b1681610d0c57fe5b046001600160e01b0316815250905092915050565b6000610d4382610d37868663ffffffff610d8d16565b9063ffffffff610d4b16565b949350505050565b6000610c4383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610dc7565b600082610d9c57506000610c46565b82820282848281610da957fe5b0414610c435760405162461bcd60e51b815260040161032b90611016565b60008183610de85760405162461bcd60e51b815260040161032b9190610f1e565b506000838581610df457fe5b0495945050505050565b6040518060200160405280600081525090565b60408051602081019091526000815290565b600060208284031215610e34578081fd5b8135610c43816110fa565b600060208284031215610e50578081fd5b81518015158114610c43578182fd5b600060208284031215610e70578081fd5b8151610c43816110fa565b600080600060608486031215610e8f578182fd5b8351610e9a81611112565b6020850151909350610eab81611112565b604085015190925063ffffffff81168114610ec4578182fd5b809150509250925092565b600060208284031215610ee0578081fd5b5035919050565b600060208284031215610ef8578081fd5b5051919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b81811015610f4a57858101830151858201604001528201610f2e565b81811115610f5b5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252602d908201527f436f72655265663a2043616c6c6572206973206e6f742061206775617264696160408201526c371037b91033b7bb32b93737b960991b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f436f72655265663a2043616c6c6572206973206e6f74206120676f7665726e6f6040820152603960f91b606082015260800190565b60208082526017908201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604082015260600190565b915182521515602082015260400190565b90815260200190565b63ffffffff91909116815260200190565b6001600160a01b038116811461110f57600080fd5b50565b6001600160701b038116811461110f57600080fd5b61112f610dfe565b506040805160208101909152600081529056fea2646970667358221220246fcdeb0aba8431832835f931e835573ec84dd50059bad8c6e3a5edad123a5064736f6c63430006060033

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

0000000000000000000000008d5ed43dca8c2f7dfb20cf7b53cc7e593635d7b900000000000000000000000094b0a3d511b6ecdb17ebf877278ab030acb0a87800000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _core (address): 0x8d5ED43dCa8C2F7dFB20CF7b53CC7E593635d7b9
Arg [1] : _pair (address): 0x94B0A3d511b6EcDb17eBF877278Ab030acb0A878
Arg [2] : _duration (uint256): 1800
Arg [3] : _isPrice0 (bool): False

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000008d5ed43dca8c2f7dfb20cf7b53cc7e593635d7b9
Arg [1] : 00000000000000000000000094b0a3d511b6ecdb17ebf877278ab030acb0a878
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000708
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000


Deployed Bytecode Sourcemap

508:4180:7:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;508:4180:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;1119:32:7;;;:::i;:::-;;;;;;;;;;;;;;;;2605:85:8;;;:::i;:::-;;828:39:7;;;:::i;3744:163::-;;;:::i;:::-;;;;;;;;;1052:84:14;;;:::i;:::-;;;;;;;;936:37:7;;;:::i;:::-;;;;;;;;3562:119:8;;;:::i;3135:338:7:-;;;:::i;2287:129:8:-;;;;;;;;;:::i;2469:81::-;;;:::i;2992:86::-;;;:::i;:::-;;;;;;;;1894:1142:7;;;:::i;690:35::-;;;:::i;3365:115:8:-;;;:::i;3195:92::-;;;:::i;2797:82::-;;;:::i;3968:148:7:-;;;;;;;;;:::i;1119:32::-;;;;:::o;2605:85:8:-;1436:5;;:28;;-1:-1:-1;;;1436:28:8;;:5;;;;-1:-1:-1;;;;;1436:5:8;;:16;;:28;;1453:10;;1436:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1436:28:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1436:28:8;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1436:28:8;;;;;;;;;:72;;;-1:-1:-1;1480:5:8;;:28;;-1:-1:-1;;;1480:28:8;;:5;;;;-1:-1:-1;;;;;1480:5:8;;:16;;:28;;1497:10;;1480:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1480:28:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1480:28:8;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1480:28:8;;;;;;;;;1415:164;;;;-1:-1:-1;;;1415:164:8;;;;;;;;;;;;;;;;;2673:10:::1;:8;:10::i;:::-;2605:85::o:0;828:39:7:-;;;;:::o;3744:163::-;3792:19;;:::i;:::-;3813:4;3829:10;3844:8;:6;:8::i;:::-;:25;;;-1:-1:-1;3856:11:7;;;;;;;;;:4;:11;;;:13;;:11;:13::i;:::-;3880:20;;;;;;;;;3888:4;3880:20;;;;-1:-1:-1;3842:28:7;;-1:-1:-1;;3744:163:7;;:::o;1052:84:14:-;1099:4;1122:7;;;1052:84;;:::o;936:37:7:-;;;;;;:::o;3562:119:8:-;3616:7;3642;:5;:7::i;:::-;-1:-1:-1;;;;;3642:17:8;;3668:4;3642:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3642:32:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3642:32:8;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;3642:32:8;;;;;;;;;3635:39;;3562:119;:::o;3135:338:7:-;3304:4;;3189;;;;3249:61;;-1:-1:-1;;;;;3304:4:7;3249:46;:61::i;:::-;3363:14;;3458:8;;3363:14;;;;3344:33;;;3440:26;;;;-1:-1:-1;;;;3135:338:7;:::o;2287:129:8:-;1260:5;;:28;;-1:-1:-1;;;1260:28:8;;:5;;;;-1:-1:-1;;;;;1260:5:8;;:16;;:28;;1277:10;;1260:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1260:28:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1260:28:8;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1260:28:8;;;;;;;;;1239:108;;;;-1:-1:-1;;;1239:108:8;;;;;;;;;2359:5:::1;:19:::0;;-1:-1:-1;;;;;;2359:19:8::1;;-1:-1:-1::0;;;;;2359:19:8;::::1;::::0;;::::1;::::0;;;::::1;::::0;;2393:16:::1;::::0;2359:19;;2393:16:::1;::::0;::::1;2287:129:::0;:::o;2469:81::-;1436:5;;:28;;-1:-1:-1;;;1436:28:8;;:5;;;;-1:-1:-1;;;;;1436:5:8;;:16;;:28;;1453:10;;1436:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1436:28:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1436:28:8;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1436:28:8;;;;;;;;;:72;;;-1:-1:-1;1480:5:8;;:28;;-1:-1:-1;;;1480:28:8;;:5;;;;-1:-1:-1;;;;;1480:5:8;;:16;;:28;;1497:10;;1480:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1480:28:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1480:28:8;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1480:28:8;;;;;;;;;1415:164;;;;-1:-1:-1;;;1415:164:8;;;;;;;;;2535:8:::1;:6;:8::i;2992:86::-:0;3037:4;3060:5;;;;;;;;;-1:-1:-1;;;;;3060:5:8;-1:-1:-1;;;;;3060:9:8;;:11;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3060:11:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3060:11:8;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;3060:11:8;;;;;;;;1894:1142:7;1953:4;1366:8:14;:6;:8::i;:::-;1365:9;1357:38;;;;-1:-1:-1;;;1357:38:14;;;;;;;;;2150:4:7::1;::::0;1983:24:::1;::::0;;;;;2095:61:::1;::::0;-1:-1:-1;;;;;2150:4:7::1;2095:46;:61::i;:::-;2210:14;::::0;2301:8:::1;::::0;1969:187;;-1:-1:-1;1969:187:7;;-1:-1:-1;1969:187:7;-1:-1:-1;2210:14:7::1;::::0;;::::1;2191:33:::0;::::1;::::0;2284:25;;::::1;;2280:68;;;2332:5;2325:12;;;;;;;;2280:68;2358:25;2386:50;2401:16;2419;2386:14;:50::i;:::-;2505:15;::::0;2358:78;;-1:-1:-1;2485:35:7;::::1;2697:25;;:::i;:::-;2737:118;2786:14;2768:32;;:15;:32;;;;;;-1:-1:-1::0;;;2737:13:7::1;:118::i;:::-;2865:12:::0;;:4:::1;:12:::0;2888:14:::1;:33:::0;;-1:-1:-1;;2888:33:7::1;;::::0;::::1;;::::0;;2931:15:::1;:35:::0;;;2865:12;-1:-1:-1;2982:25:7::1;2989:17;2865:12:::0;2989:15:::1;:17::i;:::-;2982:25;;;;;;;;;;;;;;;3025:4;3018:11;;;;;;;;;1894:1142:::0;:::o;690:35::-;;;-1:-1:-1;;;;;690:35:7;;:::o;3365:115:8:-;3417:7;3443:5;:3;:5::i;3195:92::-;3242:6;3267:5;;;;;;;;;-1:-1:-1;;;;;3267:5:8;-1:-1:-1;;;;;3267:11:8;;:13;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2797:82:8;2843:5;2867;;;;-1:-1:-1;;;;;2867:5:8;;2797:82::o;3968:148:7:-;1260:5:8;;:28;;-1:-1:-1;;;1260:28:8;;:5;;;;-1:-1:-1;;;;;1260:5:8;;:16;;:28;;1277:10;;1260:28;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1260:28:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1260:28:8;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1260:28:8;;;;;;;;;1239:108;;;;-1:-1:-1;;;1239:108:8;;;;;;;;;4049:8:7::1;:20:::0;;;4084:25:::1;::::0;::::1;::::0;::::1;::::0;4060:9;;4084:25:::1;;;;;;;;;;3968:148:::0;:::o;2064:117:14:-;1631:8;:6;:8::i;:::-;1623:41;;;;-1:-1:-1;;;1623:41:14;;;;;;;;;2132:5:::1;2122:15:::0;;-1:-1:-1;;2122:15:14::1;::::0;;2152:22:::1;2161:12;:10;:12::i;:::-;2152:22;;;;;;;;;;;;;;;2064:117::o:0;4792:102:2:-;4872:10;:15;;4792:102::o;646:1040:4:-;730:21;753;776;826:23;:21;:23::i;:::-;809:40;;893:4;-1:-1:-1;;;;;878:41:4;;:43;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;878:43:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;878:43:4;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;878:43:4;;;;;;;;;859:62;;965:4;-1:-1:-1;;;;;950:41:4;;:43;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;950:43:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;950:43:4;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;950:43:4;;;;;;;;;931:62;;1105:16;1123;1141:25;1185:4;-1:-1:-1;;;;;1170:32:4;;:34;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1170:34:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1170:34:4;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1170:34:4;;;;;;;;;1104:100;;;;;;1240:14;1218:36;;:18;:36;;;1214:466;;1338:35;;;1481:62;;;1486:39;1506:8;1516;1486:19;:39::i;:::-;:42;-1:-1:-1;;;;;1481:48:4;:62;1461:82;;;;;1607:62;;;1612:39;1632:8;1642;1612:19;:39::i;:::-;:42;-1:-1:-1;;;;;1607:48:4;:62;1587:82;;;;;-1:-1:-1;1214:466:4;646:1040;;;;;;;;:::o;1817:115:14:-;1366:8;:6;:8::i;:::-;1365:9;1357:38;;;;-1:-1:-1;;;1357:38:14;;;;;;;;;1876:7:::1;:14:::0;;-1:-1:-1;;1876:14:14::1;1886:4;1876:14;::::0;;1905:20:::1;1912:12;:10;:12::i;4480:206:7:-:0;4633:8;;4603:7;;-1:-1:-1;;;4633:8:7;;;;:46;;4663:16;4633:46;;;4644:16;4633:46;4626:53;;4480:206;;;;;:::o;1540:174:2:-;1634:11;;:::i;:::-;1668:39;;;;;;;;1682:22;1693:1;1002:6;1702:1;1682:10;:22::i;:::-;1668:39;;1661:46;1540:174;-1:-1:-1;;;1540:174:2:o;4900:113::-;4986:10;;4960:7;;4986:20;;1002:6;4986:20;:14;:20;:::i;598:104:13:-;685:10;598:104;:::o;422:121:4:-;510:25;:15;:25;;422:121::o;1700:243:16:-;1781:16;;:::i;:::-;1831:1;1817:11;-1:-1:-1;;;;;1817:15:16;;1809:51;;;;-1:-1:-1;;;1809:51:16;;;;;;;;;1877:59;;;;;;;;;;-1:-1:-1;;;;;1887:48:16;;-1:-1:-1;;;481:3:16;1888:32;;;;1887:48;;;;;;-1:-1:-1;;;;;1877:59:16;;;;1870:66;;1700:243;;;;:::o;5066:215:2:-;5206:7;5236:38;5262:11;5236:21;:6;5247:9;5236:21;:10;:21;:::i;:::-;:25;:38;:25;:38;:::i;:::-;5229:45;5066:215;-1:-1:-1;;;;5066:215:2:o;3188:130:3:-;3246:7;3272:39;3276:1;3279;3272:39;;;;;;;;;;;;;;;;;:3;:39::i;2267:459::-;2325:7;2566:6;2562:45;;-1:-1:-1;2595:1:3;2588:8;;2562:45;2629:5;;;2633:1;2629;:5;:1;2652:5;;;;;:10;2644:56;;;;-1:-1:-1;;;2644:56:3;;;;;;;;3800:272;3886:7;3920:12;3913:5;3905:28;;;;-1:-1:-1;;;3905:28:3;;;;;;;;;;;3943:9;3959:1;3955;:5;;;;;;;3800:272;-1:-1:-1;;;;;3800:272:3:o;508:4180:7:-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;-1:-1:-1;508:4180:7;;;:::o;1173:241:-1:-;;1277:2;1265:9;1256:7;1252:23;1248:32;1245:2;;;-1:-1;;1283:12;1245:2;85:6;72:20;97:33;124:5;97:33;;1421:257;;1533:2;1521:9;1512:7;1508:23;1504:32;1501:2;;;-1:-1;;1539:12;1501:2;223:6;217:13;16145:5;13350:13;13343:21;16123:5;16120:32;16110:2;;-1:-1;;16156:12;1685:293;;1815:2;1803:9;1794:7;1790:23;1786:32;1783:2;;;-1:-1;;1821:12;1783:2;376:6;370:13;388:48;430:5;388:48;;2281:533;;;;2429:2;2417:9;2408:7;2404:23;2400:32;2397:2;;;-1:-1;;2435:12;2397:2;699:6;693:13;711:33;738:5;711:33;;;2598:2;2648:22;;693:13;2487:74;;-1:-1;711:33;693:13;711:33;;;2717:2;2766:22;;1111:13;2606:74;;-1:-1;13995:10;13984:22;;16792:34;;16782:2;;-1:-1;;16830:12;16782:2;2725:73;;;;2391:423;;;;;;2821:241;;2925:2;2913:9;2904:7;2900:23;2896:32;2893:2;;;-1:-1;;2931:12;2893:2;-1:-1;823:20;;2887:175;-1:-1;2887:175;3069:263;;3184:2;3172:9;3163:7;3159:23;3155:32;3152:2;;;-1:-1;;3190:12;3152:2;-1:-1;971:13;;3146:186;-1:-1;3146:186;7584:213;-1:-1;;;;;13778:54;;;;3559:37;;7702:2;7687:18;;7673:124;8040:201;13350:13;;13343:21;3673:34;;8152:2;8137:18;;8123:118;9254:301;;9392:2;;9413:17;9406:47;4522:5;12973:12;13130:6;9392:2;9381:9;9377:18;13118:19;-1:-1;15631:101;15645:6;15642:1;15639:13;15631:101;;;15712:11;;;;;15706:18;15693:11;;;13158:14;15693:11;15686:39;15660:10;;15631:101;;;15747:6;15744:1;15741:13;15738:2;;;-1:-1;13158:14;15803:6;9381:9;15794:16;;15787:27;15738:2;-1:-1;15919:7;15903:14;-1:-1;;15899:28;4680:39;;;;13158:14;4680:39;;9363:192;-1:-1;;;9363:192;9562:407;9753:2;9767:47;;;4956:2;9738:18;;;13118:19;-1:-1;;;13158:14;;;4972:43;5034:12;;;9724:245;9976:407;10167:2;10181:47;;;5285:2;10152:18;;;13118:19;5321:34;13158:14;;;5301:55;-1:-1;;;5376:12;;;5369:37;5425:12;;;10138:245;10390:407;10581:2;10595:47;;;5676:2;10566:18;;;13118:19;-1:-1;;;13158:14;;;5692:39;5750:12;;;10552:245;10804:407;10995:2;11009:47;;;6001:2;10980:18;;;13118:19;6037:34;13158:14;;;6017:55;-1:-1;;;6092:12;;;6085:25;6129:12;;;10966:245;11218:407;11409:2;11423:47;;;6380:2;11394:18;;;13118:19;6416:34;13158:14;;;6396:55;-1:-1;;;6471:12;;;6464:25;6508:12;;;11380:245;11632:407;11823:2;11837:47;;;6759:2;11808:18;;;13118:19;6795:25;13158:14;;;6775:46;6840:12;;;11794:245;12046:396;7117:23;;7298:37;;13350:13;13343:21;12428:2;12413:18;;3673:34;12228:2;12213:18;;12199:243;12449:213;7298:37;;;12567:2;12552:18;;12538:124;12669:209;13995:10;13984:22;;;;7536:36;;12785:2;12770:18;;12756:122;15940:117;-1:-1;;;;;13778:54;;15999:35;;15989:2;;16048:1;;16038:12;15989:2;15983:74;;16486:117;-1:-1;;;;;16573:5;13662:42;16548:5;16545:35;16535:2;;16594:1;;16584:12;16529:74;1208:11:2;;:::i;:::-;-1:-1:-1;1242:18:2;;;;;;;;;-1:-1:-1;1242:18:2;;1157:110;:::o

Swarm Source

ipfs://246fcdeb0aba8431832835f931e835573ec84dd50059bad8c6e3a5edad123a50

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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