ETH Price: $3,570.30 (+1.84%)
Gas: 32 Gwei

Contract

0xB783c0E21763bEf9F2d04E6499abFbe23AdB7e1F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Allocate139778412022-01-10 12:45:26808 days ago1641818726IN
0xB783c0E2...23AdB7e1F
0 ETH0.14486835292.93259757
Allocate139472802022-01-05 19:15:14813 days ago1641410114IN
0xB783c0E2...23AdB7e1F
0 ETH0.12581526254.40610995
Allocate139352282022-01-03 22:30:01814 days ago1641249001IN
0xB783c0E2...23AdB7e1F
0 ETH0.1267683256.33320149
Allocate139031792021-12-29 23:22:52819 days ago1640820172IN
0xB783c0E2...23AdB7e1F
0 ETH0.12138066245.43906786
Allocate138883952021-12-27 16:38:50822 days ago1640623130IN
0xB783c0E2...23AdB7e1F
0 ETH0.11364052229.78804627
Allocate138551242021-12-22 12:54:57827 days ago1640177697IN
0xB783c0E2...23AdB7e1F
0 ETH0.11745664237.50445845
Allocate137725272021-12-09 18:05:05840 days ago1639073105IN
0xB783c0E2...23AdB7e1F
0 ETH0.10844219219.27670774
Allocate137719722021-12-09 16:05:45840 days ago1639065945IN
0xB783c0E2...23AdB7e1F
0 ETH0.04862169105.80421369
Purchase136466132021-11-19 16:31:09860 days ago1637339469IN
0xB783c0E2...23AdB7e1F
1,000 ETH0.01466667118.89812561
Allocate135701642021-11-07 15:28:46872 days ago1636298926IN
0xB783c0E2...23AdB7e1F
0 ETH0.1018518205.95053292
Allocate134930352021-10-26 12:35:07884 days ago1635251707IN
0xB783c0E2...23AdB7e1F
0 ETH0.07241542146.4283783
Allocate134658292021-10-22 6:26:03888 days ago1634883963IN
0xB783c0E2...23AdB7e1F
0 ETH0.07090733154.2993479
Allocate134592572021-10-21 5:51:41889 days ago1634795501IN
0xB783c0E2...23AdB7e1F
0 ETH0.07253264157.8361245
Allocate134497872021-10-19 18:26:33891 days ago1634667993IN
0xB783c0E2...23AdB7e1F
0 ETH0.09026465196.42222984
Allocate134433932021-10-18 18:28:07892 days ago1634581687IN
0xB783c0E2...23AdB7e1F
0 ETH0.09769907197.55346126
Allocate134370312021-10-17 18:27:35893 days ago1634495255IN
0xB783c0E2...23AdB7e1F
0 ETH0.0049347475.978827
Allocate134306412021-10-16 18:26:41894 days ago1634408801IN
0xB783c0E2...23AdB7e1F
0 ETH0.05758731112.5532605
Allocate134242282021-10-15 18:25:06895 days ago1634322306IN
0xB783c0E2...23AdB7e1F
0 ETH0.07452674145.66103976
Allocate134178792021-10-14 18:22:39896 days ago1634235759IN
0xB783c0E2...23AdB7e1F
0 ETH0.08200842165.82600422
Allocate134115182021-10-13 18:21:35897 days ago1634149295IN
0xB783c0E2...23AdB7e1F
0 ETH0.05339154104.35271158
Allocate134114982021-10-13 18:17:34897 days ago1634149054IN
0xB783c0E2...23AdB7e1F
0 ETH0.0650178130.03560087
Allocate134052012021-10-12 18:15:58898 days ago1634062558IN
0xB783c0E2...23AdB7e1F
0 ETH0.06346484124.04077439
Allocate133984972021-10-11 16:53:45899 days ago1633971225IN
0xB783c0E2...23AdB7e1F
0 ETH0.05011671101.33903107
Purchase133947092021-10-11 2:37:59899 days ago1633919879IN
0xB783c0E2...23AdB7e1F
0.1 ETH0.01910113150.5211792
0x60a06040133692552021-10-07 2:47:25903 days ago1633574845IN
 Create: EthBondingCurve
0 ETH0.5039113145.62791067

Latest 25 internal transactions (View All)

Advanced mode:
Parent Txn Hash Block From To Value
139802802022-01-10 21:56:53807 days ago1641851813
0xB783c0E2...23AdB7e1F
9,127.98390285 ETH
139802802022-01-10 21:56:53807 days ago1641851813
0xB783c0E2...23AdB7e1F
9,127.98390285 ETH
139801342022-01-10 21:26:14808 days ago1641849974
0xB783c0E2...23AdB7e1F
9,127.98390285 ETH
139801342022-01-10 21:26:14808 days ago1641849974
0xB783c0E2...23AdB7e1F
9,127.98390285 ETH
139796442022-01-10 19:30:29808 days ago1641843029
0xB783c0E2...23AdB7e1F
0.90750055 ETH
139791162022-01-10 17:29:17808 days ago1641835757
0xB783c0E2...23AdB7e1F
174.33211769 ETH
139791162022-01-10 17:29:17808 days ago1641835757
0xB783c0E2...23AdB7e1F
751 ETH
139791152022-01-10 17:29:12808 days ago1641835752
0xB783c0E2...23AdB7e1F
54.05067145 ETH
139791132022-01-10 17:28:43808 days ago1641835723
0xB783c0E2...23AdB7e1F
60.13032888 ETH
139791132022-01-10 17:28:43808 days ago1641835723
0xB783c0E2...23AdB7e1F
107.63812445 ETH
139791102022-01-10 17:28:34808 days ago1641835714
0xB783c0E2...23AdB7e1F
511 ETH
139791092022-01-10 17:28:13808 days ago1641835693
0xB783c0E2...23AdB7e1F
421.91183969 ETH
139791092022-01-10 17:28:13808 days ago1641835693
0xB783c0E2...23AdB7e1F
73.24180611 ETH
139791092022-01-10 17:28:13808 days ago1641835693
0xB783c0E2...23AdB7e1F
112.45485656 ETH
139791092022-01-10 17:28:13808 days ago1641835693
0xB783c0E2...23AdB7e1F
498.046875 ETH
139791092022-01-10 17:28:13808 days ago1641835693
0xB783c0E2...23AdB7e1F
257.94608155 ETH
139791072022-01-10 17:27:54808 days ago1641835674
0xB783c0E2...23AdB7e1F
68.19990376 ETH
139791072022-01-10 17:27:54808 days ago1641835674
0xB783c0E2...23AdB7e1F
841 ETH
139791062022-01-10 17:27:30808 days ago1641835650
0xB783c0E2...23AdB7e1F
164.12852038 ETH
139791062022-01-10 17:27:30808 days ago1641835650
0xB783c0E2...23AdB7e1F
424.8046875 ETH
139791052022-01-10 17:27:19808 days ago1641835639
0xB783c0E2...23AdB7e1F
264.35272212 ETH
139791052022-01-10 17:27:19808 days ago1641835639
0xB783c0E2...23AdB7e1F
82.43683212 ETH
139791052022-01-10 17:27:19808 days ago1641835639
0xB783c0E2...23AdB7e1F
1,141 ETH
139791042022-01-10 17:27:05808 days ago1641835625
0xB783c0E2...23AdB7e1F
34.80566784 ETH
139791042022-01-10 17:27:05808 days ago1641835625
0xB783c0E2...23AdB7e1F
2,173.52895241 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EthBondingCurve

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU AGPLv3 license
File 1 of 32 : EthBondingCurve.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "./BondingCurve.sol";
import "../Constants.sol";

/// @title a bonding curve for purchasing FEI with ETH
/// @author Fei Protocol
contract EthBondingCurve is BondingCurve {

    struct BondingCurveParams {
        uint256 scale;
        uint256 buffer;
        uint256 discount;
        uint256 duration;
        uint256 incentive;
        address[] pcvDeposits;
        uint256[] ratios;
    }

    constructor(
        address core,
        address oracle,
        address backupOracle,
        BondingCurveParams memory params
    )
        BondingCurve(
            core,
            oracle,
            backupOracle,
            params.scale,
            params.pcvDeposits,
            params.ratios,
            params.duration,
            params.incentive,
            IERC20(address(Constants.WETH)),
            params.discount,
            params.buffer
        )
    {}

    /// @notice purchase FEI for underlying tokens
    /// @param to address to receive FEI
    /// @param amountIn amount of underlying tokens input
    /// @return amountOut amount of FEI received
    function purchase(address to, uint256 amountIn)
        external
        payable
        override
        whenNotPaused
        returns (uint256 amountOut)
    {
        require(
            msg.value == amountIn,
            "Bonding Curve: Sent value does not equal input"
        );
        return _purchase(amountIn, to);
    }

    /// @notice get the balance of ETH held by the contract and ready to be allocated
    function balance() public view override returns (uint256) {
        return address(this).balance;
    }

    function _allocateSingle(uint256 amount, address pcvDeposit)
        internal
        override
    {
        Address.sendValue(payable(pcvDeposit), amount);
        IPCVDeposit(pcvDeposit).deposit();
    }
}

File 2 of 32 : BondingCurve.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./IBondingCurve.sol";
import "../refs/OracleRef.sol";
import "../pcv/utils/PCVSplitter.sol";
import "../utils/Incentivized.sol";
import "../pcv/IPCVDeposit.sol";
import "../utils/Timed.sol";
import "../Constants.sol";

/**
 * @title a bonding curve for purchasing FEI with ERC-20 tokens
 * @author Fei Protocol
 * 
 */ 
contract BondingCurve is IPCVDepositBalances, IBondingCurve, OracleRef, PCVSplitter, Timed, Incentivized {
    using Decimal for Decimal.D256;

    /// @notice the Scale target at which bonding curve price fixes
    uint256 public override scale;

    /// @notice the ERC20 token for this bonding curve
    IERC20 public immutable override token;

    /// @notice the total amount of FEI purchased on bonding curve
    uint256 public override totalPurchased;

    /// @notice the buffer applied on top of the peg purchase price once at Scale
    uint256 public override buffer;
    
    /// @notice the discount applied on top of peg before at Scale
    uint256 public override discount;

    /// @notice the cap on how much FEI can be minted by the bonding curve
    uint256 public override mintCap;

    /// @notice constructor
    /// @param _core Fei Core to reference
    /// @param _oracle the price oracle to reference
    /// @param _backupOracle the backup oracle to reference
    /// @param _scale the Scale target where peg fixes
    /// @param _pcvDeposits the PCV Deposits for the PCVSplitter
    /// @param _ratios the ratios for the PCVSplitter
    /// @param _duration the duration between incentivizing allocations
    /// @param _incentive the amount rewarded to the caller of an allocation
    /// @param _token the ERC20 token associated with this curve, null if ETH
    /// @param _discount the discount applied to FEI purchases before reaching scale in basis points (1/10000)
    /// @param _buffer the buffer applied to FEI purchases after reaching scale in basis points (1/10000)
    constructor(
        address _core,
        address _oracle,
        address _backupOracle,
        uint256 _scale,
        address[] memory _pcvDeposits,
        uint256[] memory _ratios,
        uint256 _duration,
        uint256 _incentive,
        IERC20 _token,
        uint256 _discount,
        uint256 _buffer
    )
        OracleRef(_core, _oracle, _backupOracle, 0, false)
        PCVSplitter(_pcvDeposits, _ratios)
        Timed(_duration)
        Incentivized(_incentive)
    {
        _setMintCap(_scale); // default mint cap is scale
        _setScale(_scale);
        token = _token;

        discount = _discount;
        emit DiscountUpdate(0, _discount);

        buffer = _buffer;
        emit BufferUpdate(0, _buffer);

        _initTimed();

        if (address(_token) != address(0)) {
            _setDecimalsNormalizerFromToken(address(_token));
        }
    }

    /// @notice purchase FEI for underlying tokens
    /// @param to address to receive FEI
    /// @param amountIn amount of underlying tokens input
    /// @return amountOut amount of FEI received
    function purchase(address to, uint256 amountIn)
        external
        payable
        virtual
        override
        whenNotPaused
        returns (uint256 amountOut)
    {
        require(msg.value == 0, "BondingCurve: unexpected ETH input");
        SafeERC20.safeTransferFrom(token, msg.sender, address(this), amountIn);
        return _purchase(amountIn, to);
    }

    /// @notice balance of the bonding curve
    /// @return the amount of PCV held in contract and ready to be allocated
    function balance() public view virtual override returns (uint256) {
        return token.balanceOf(address(this));
    }

    /// @notice display the related token of the balance reported
    function balanceReportedIn() public view override returns (address) {
        return address(token);
    }

    /// @notice returns a manipulation resistant account of both the balance of underlying and protocol owned FEI
    function resistantBalanceAndFei() public view override returns(uint256, uint256) {
      return (balance(), 0);
    }

    /// @notice sets the bonding curve Scale target
    function setScale(uint256 newScale) external override onlyGovernorOrAdmin {
        _setScale(newScale);
    }

    /// @notice resets the totalPurchased
    function reset() external override onlyGovernorOrAdmin {
        uint256 oldTotalPurchased = totalPurchased;
        totalPurchased = 0;
        emit Reset(oldTotalPurchased);
    }

    /// @notice sets the bonding curve price buffer
    function setBuffer(uint256 newBuffer) external override onlyGovernorOrAdmin {
        require(
            newBuffer < Constants.BASIS_POINTS_GRANULARITY,
            "BondingCurve: Buffer exceeds or matches granularity"
        );
        uint256 oldBuffer = buffer;
        buffer = newBuffer;
        emit BufferUpdate(oldBuffer, newBuffer);
    }

    /// @notice sets the bonding curve price discount
    function setDiscount(uint256 newDiscount) external override onlyGovernorOrAdmin {
        require(
            newDiscount < Constants.BASIS_POINTS_GRANULARITY,
            "BondingCurve: Buffer exceeds or matches granularity"
        );
        uint256 oldDiscount = discount;
        discount = newDiscount;
        emit DiscountUpdate(oldDiscount, newDiscount);
    }

    /// @notice sets the allocate incentive frequency
    function setIncentiveFrequency(uint256 _frequency) external override onlyGovernorOrAdmin {
        _setDuration(_frequency);
    }

    /// @notice sets the mint cap for the bonding curve
    function setMintCap(uint256 _mintCap) external override onlyGovernorOrAdmin {
        _setMintCap(_mintCap);
    }

    /// @notice batch allocate held PCV
    function allocate() external override whenNotPaused {
        uint256 amount = balance();
        uint256 usdValueHeld = readOracle().mul(amount).asUint256();
        // the premium is the USD value held multiplied by the buffer that a user would pay to get FEI assuming FEI is $1
        uint256 premium = usdValueHeld * buffer / Constants.BASIS_POINTS_GRANULARITY;

        // this requirement mitigates gaming the allocate function and ensures it is only called when sufficient demand has been met
        require(premium >= incentiveAmount, "BondingCurve: Not enough PCV held");

        _allocate(amount);

        // if window has passed, reward caller and reset window
        if (isTimeEnded()) {
            _initTimed(); // reset window
            _incentivize();
        }
    }

    /// @notice a boolean signalling whether Scale has been reached
    function atScale() public view override returns (bool) {
        return totalPurchased >= scale;
    }

    /// @notice returns how close to the minting cap we are
    function availableToMint() public view override returns (uint256) {
        return mintCap - totalPurchased;
    }

    /// @notice return current instantaneous bonding curve price
    /// @return price reported as FEI per USD
    /// @dev Can be inaccurate if outdated, need to call `oracle().isOutdated()` to check
    function getCurrentPrice()
        public
        view
        override
        returns (Decimal.D256 memory)
    {
        if (atScale()) {
            return _getBufferMultiplier();
        }
        return _getBondingCurvePriceMultiplier();
    }

    /// @notice return amount of FEI received after a bonding curve purchase
    /// @param amountIn the amount of underlying used to purchase
    /// @return amountOut the amount of FEI received
    /// @dev Can be innacurate if outdated, need to call `oracle().isOutdated()` to check
    function getAmountOut(uint256 amountIn)
        public
        view
        override
        returns (uint256 amountOut)
    {
        // the FEI value of the input amount
        uint256 feiValueOfAmountIn = readOracle().mul(amountIn).asUint256();

        Decimal.D256 memory price = getCurrentPrice();

        if (!atScale()) {
            uint256 preScaleAmount = scale - totalPurchased;

            // crossing scale
            if (feiValueOfAmountIn > preScaleAmount) {
                uint256 postScaleAmount = feiValueOfAmountIn - preScaleAmount;
                // combined pricing of pre-scale price times the amount to reach scale and post-scale price times remainder
                return price.mul(preScaleAmount).add(_getBufferMultiplier().mul(postScaleAmount)).asUint256();
            }
        }

        amountOut = price.mul(feiValueOfAmountIn).asUint256();
    }

    /// @notice mint FEI and send to buyer destination
    function _purchase(uint256 amountIn, address to)
        internal
        returns (uint256 amountOut)
    {
        updateOracle();

        amountOut = getAmountOut(amountIn);

        require(availableToMint() >= amountOut, "BondingCurve: exceeds mint cap");

        _incrementTotalPurchased(amountOut);
        _mintFei(to, amountOut);

        emit Purchase(to, amountIn, amountOut);

        return amountOut;
    }

    function _incrementTotalPurchased(uint256 amount) internal {
        totalPurchased = totalPurchased + amount;
    }

    function _setScale(uint256 newScale) internal {
        require(newScale != 0, "BondingCurve: zero scale");

        uint256 oldScale = scale;
        scale = newScale;
        emit ScaleUpdate(oldScale, newScale);
    }

    function _setMintCap(uint256 newMintCap) internal {
        require(newMintCap != 0, "BondingCurve: zero mint cap");

        uint256 oldMintCap = mintCap;
        mintCap = newMintCap;

        emit MintCapUpdate(oldMintCap, newMintCap);
    }

    /// @notice the bonding curve price multiplier used before Scale
    function _getBondingCurvePriceMultiplier()
        internal
        view
        virtual
        returns (Decimal.D256 memory)
    {
        uint256 granularity = Constants.BASIS_POINTS_GRANULARITY;
        // uses 1/1-b because the oracle price is inverted
        return Decimal.ratio(granularity, granularity - discount);
    }

    /// @notice returns the buffer on the post-scale bonding curve price
    function _getBufferMultiplier() internal view returns (Decimal.D256 memory) {
        uint256 granularity = Constants.BASIS_POINTS_GRANULARITY;
        // uses 1/1+b because the oracle price is inverted
        return Decimal.ratio(granularity, granularity + buffer);
    }

    // Allocates a portion of escrowed PCV to a target PCV deposit
    function _allocateSingle(uint256 amount, address pcvDeposit)
        internal
        virtual
        override
    {
        SafeERC20.safeTransfer(token, pcvDeposit, amount);
        IPCVDeposit(pcvDeposit).deposit();
    }
}

File 3 of 32 : IBondingCurve.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

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

interface IBondingCurve {
    // ----------- Events -----------

    event ScaleUpdate(uint256 oldScale, uint256 newScale);

    event MintCapUpdate(uint256 oldMint, uint256 newMint);

    event BufferUpdate(uint256 oldBuffer, uint256 newBuffer);

    event DiscountUpdate(uint256 oldDiscount, uint256 newDiscount);

    event Purchase(address indexed to, uint256 amountIn, uint256 amountOut);

    event Reset(uint256 oldTotalPurchased);
    
    // ----------- State changing Api -----------

    function purchase(address to, uint256 amountIn)
        external
        payable
        returns (uint256 amountOut);

    function allocate() external;

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

    function reset() external;

    function setBuffer(uint256 newBuffer) external;

    function setDiscount(uint256 newDiscount) external;

    function setScale(uint256 newScale) external;

    function setIncentiveFrequency(uint256 newFrequency) external;

    function setMintCap(uint256 newMintCap) external;

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

    function getCurrentPrice() external view returns (Decimal.D256 memory);

    function getAmountOut(uint256 amountIn)
        external
        view
        returns (uint256 amountOut);

    function scale() external view returns (uint256);

    function atScale() external view returns (bool);

    function buffer() external view returns (uint256);

    function discount() external view returns (uint256);

    function totalPurchased() external view returns (uint256);

    function token() external view returns (IERC20);

    function mintCap() external view returns (uint256);

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

File 4 of 32 : 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.8.4;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

/**
 * @title Decimal
 * @author dYdX
 *
 * Library that defines a fixed-point number with 18 decimal places.
 */
library Decimal {
    using SafeMath 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 32 : OracleRef.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "./IOracleRef.sol";
import "./CoreRef.sol";
import "@openzeppelin/contracts/utils/math/SafeCast.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";

/// @title Reference to an Oracle
/// @author Fei Protocol
/// @notice defines some utilities around interacting with the referenced oracle
abstract contract OracleRef is IOracleRef, CoreRef {
    using Decimal for Decimal.D256;
    using SafeCast for int256;

    /// @notice the oracle reference by the contract
    IOracle public override oracle;

    /// @notice the backup oracle reference by the contract
    IOracle public override backupOracle;

    /// @notice number of decimals to scale oracle price by, i.e. multiplying by 10^(decimalsNormalizer)
    int256 public override decimalsNormalizer;

    bool public override doInvert;

    /// @notice OracleRef constructor
    /// @param _core Fei Core to reference
    /// @param _oracle oracle to reference
    /// @param _backupOracle backup oracle to reference
    /// @param _decimalsNormalizer number of decimals to normalize the oracle feed if necessary
    /// @param _doInvert invert the oracle price if this flag is on
    constructor(address _core, address _oracle, address _backupOracle, int256 _decimalsNormalizer, bool _doInvert) CoreRef(_core) {
        _setOracle(_oracle);
        if (_backupOracle != address(0) && _backupOracle != _oracle) {
            _setBackupOracle(_backupOracle);
        }
        _setDoInvert(_doInvert);
        _setDecimalsNormalizer(_decimalsNormalizer);
    }

    /// @notice sets the referenced oracle
    /// @param newOracle the new oracle to reference
    function setOracle(address newOracle) external override onlyGovernor {
        _setOracle(newOracle);
    }

    /// @notice sets the flag for whether to invert or not
    /// @param newDoInvert the new flag for whether to invert
    function setDoInvert(bool newDoInvert) external override onlyGovernor {
        _setDoInvert(newDoInvert);
    }

    /// @notice sets the new decimalsNormalizer
    /// @param newDecimalsNormalizer the new decimalsNormalizer
    function setDecimalsNormalizer(int256 newDecimalsNormalizer) external override onlyGovernor {
        _setDecimalsNormalizer(newDecimalsNormalizer);
    }
    /// @notice sets the referenced backup oracle
    /// @param newBackupOracle the new backup oracle to reference
    function setBackupOracle(address newBackupOracle) external override onlyGovernorOrAdmin {
        _setBackupOracle(newBackupOracle);
    }

    /// @notice invert a peg price
    /// @param price the peg price to invert
    /// @return the inverted peg as a Decimal
    /// @dev the inverted peg would be X per FEI
    function invert(Decimal.D256 memory price)
        public
        pure
        override
        returns (Decimal.D256 memory)
    {
        return Decimal.one().div(price);
    }

    /// @notice updates the referenced oracle
    function updateOracle() public override {
        oracle.update();
    }

    /// @notice the peg price of the referenced oracle
    /// @return the peg as a Decimal
    /// @dev the peg is defined as FEI per X with X being ETH, dollars, etc
    function readOracle() public view override returns (Decimal.D256 memory) {
        (Decimal.D256 memory _peg, bool valid) = oracle.read();
        if (!valid && address(backupOracle) != address(0)) {
            (_peg, valid) = backupOracle.read();
        }
        require(valid, "OracleRef: oracle invalid");

        // Scale the oracle price by token decimals delta if necessary
        uint256 scalingFactor;
        if (decimalsNormalizer < 0) {
            scalingFactor = 10 ** (-1 * decimalsNormalizer).toUint256();
            _peg = _peg.div(scalingFactor);
        } else {
            scalingFactor = 10 ** decimalsNormalizer.toUint256();
            _peg = _peg.mul(scalingFactor);
        }

        // Invert the oracle price if necessary
        if (doInvert) {
            _peg = invert(_peg);
        }
        return _peg;
    }

    function _setOracle(address newOracle) internal {
        require(newOracle != address(0), "OracleRef: zero address");
        address oldOracle = address(oracle);
        oracle = IOracle(newOracle);
        emit OracleUpdate(oldOracle, newOracle);
    }

    // Supports zero address if no backup
    function _setBackupOracle(address newBackupOracle) internal {
        address oldBackupOracle = address(backupOracle);
        backupOracle = IOracle(newBackupOracle);
        emit BackupOracleUpdate(oldBackupOracle, newBackupOracle);
    }

    function _setDoInvert(bool newDoInvert) internal {
        bool oldDoInvert = doInvert;
        doInvert = newDoInvert;
        
        if (oldDoInvert != newDoInvert) {
            _setDecimalsNormalizer( -1 * decimalsNormalizer);
        }

        emit InvertUpdate(oldDoInvert, newDoInvert);
    }

    function _setDecimalsNormalizer(int256 newDecimalsNormalizer) internal {
        int256 oldDecimalsNormalizer = decimalsNormalizer;
        decimalsNormalizer = newDecimalsNormalizer;
        emit DecimalsNormalizerUpdate(oldDecimalsNormalizer, newDecimalsNormalizer);
    }

    function _setDecimalsNormalizerFromToken(address token) internal {
        int256 feiDecimals = 18;
        int256 _decimalsNormalizer = feiDecimals - int256(uint256(IERC20Metadata(token).decimals()));
        
        if (doInvert) {
            _decimalsNormalizer = -1 * _decimalsNormalizer;
        }
        
        _setDecimalsNormalizer(_decimalsNormalizer);
    }
}

File 6 of 32 : IOracleRef.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "../oracle/IOracle.sol";

/// @title OracleRef interface
/// @author Fei Protocol
interface IOracleRef {
    // ----------- Events -----------

    event OracleUpdate(address indexed oldOracle, address indexed newOracle);

    event InvertUpdate(bool oldDoInvert, bool newDoInvert);

    event DecimalsNormalizerUpdate(int256 oldDecimalsNormalizer, int256 newDecimalsNormalizer);

    event BackupOracleUpdate(address indexed oldBackupOracle, address indexed newBackupOracle);


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

    function updateOracle() external;

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

    function setOracle(address newOracle) external;

    function setBackupOracle(address newBackupOracle) external;

    function setDecimalsNormalizer(int256 newDecimalsNormalizer) external;

    function setDoInvert(bool newDoInvert) external;

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

    function oracle() external view returns (IOracle);

    function backupOracle() external view returns (IOracle);

    function doInvert() external view returns (bool);

    function decimalsNormalizer() external view returns (int256);

    function readOracle() external view returns (Decimal.D256 memory);

    function invert(Decimal.D256 calldata price)
        external
        pure
        returns (Decimal.D256 memory);
}

File 7 of 32 : IOracle.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

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;

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

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

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

File 8 of 32 : CoreRef.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "./ICoreRef.sol";
import "@openzeppelin/contracts/security/Pausable.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 a role used with a subset of governor permissions for this contract only
    bytes32 public override CONTRACT_ADMIN_ROLE;

    /// @notice boolean to check whether or not the contract has been initialized.
    /// cannot be initialized twice.
    bool private _initialized;

    constructor(address coreAddress) {
        _initialize(coreAddress);
    }

    /// @notice CoreRef constructor
    /// @param coreAddress Fei Core to reference
    function _initialize(address coreAddress) internal {
        require(!_initialized, "CoreRef: already initialized");
        _initialized = true;

        _core = ICore(coreAddress);
        _setContractAdminRole(_core.GOVERN_ROLE());
    }

    modifier ifMinterSelf() {
        if (_core.isMinter(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 onlyGovernorOrAdmin() {
        require(
            _core.isGovernor(msg.sender) ||
            isContractAdmin(msg.sender),
            "CoreRef: Caller is not a governor or contract admin"
        );
        _;
    }

    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");
        _;
    }

    /// @notice set new Core reference address
    /// @param newCore the new core address
    function setCore(address newCore) external override onlyGovernor {
        require(newCore != address(0), "CoreRef: zero address");
        address oldCore = address(_core);
        _core = ICore(newCore);
        emit CoreUpdate(oldCore, newCore);
    }

    /// @notice sets a new admin role for this contract
    function setContractAdminRole(bytes32 newContractAdminRole) external override onlyGovernor {
        _setContractAdminRole(newContractAdminRole);
    }

    /// @notice returns whether a given address has the admin role for this contract
    function isContractAdmin(address _admin) public view override returns (bool) {
        return _core.hasRole(CONTRACT_ADMIN_ROLE, _admin);
    }

    /// @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(address to, uint256 amount) internal virtual {
        if (amount != 0) {
            fei().mint(to, amount);
        }
    }

    function _setContractAdminRole(bytes32 newContractAdminRole) internal {
        bytes32 oldContractAdminRole = CONTRACT_ADMIN_ROLE;
        CONTRACT_ADMIN_ROLE = newContractAdminRole;
        emit ContractAdminRoleUpdate(oldContractAdminRole, newContractAdminRole);
    }
}

File 9 of 32 : ICoreRef.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

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

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

    event CoreUpdate(address indexed oldCore, address indexed newCore);

    event ContractAdminRoleUpdate(bytes32 indexed oldContractAdminRole, bytes32 indexed newContractAdminRole);

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

    function setCore(address newCore) external;

    function setContractAdminRole(bytes32 newContractAdminRole) external;

    // ----------- Governor or Guardian only state changing api -----------

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

    function CONTRACT_ADMIN_ROLE() external view returns (bytes32);

    function isContractAdmin(address admin) external view returns (bool);
}

File 10 of 32 : ICore.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

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 allocateTribe(address to, uint256 amount) external;

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

    function fei() external view returns (IFei);

    function tribe() external view returns (IERC20);
}

File 11 of 32 : IPermissions.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/AccessControl.sol";

/// @title Permissions interface
/// @author Fei Protocol
interface IPermissions is IAccessControl {
    // ----------- 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);

    function GUARDIAN_ROLE() external view returns (bytes32);

    function GOVERN_ROLE() external view returns (bytes32);

    function BURNER_ROLE() external view returns (bytes32);

    function MINTER_ROLE() external view returns (bytes32);

    function PCV_CONTROLLER_ROLE() external view returns (bytes32);

}

File 12 of 32 : IFei.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

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 13 of 32 : PCVSplitter.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "../../refs/CoreRef.sol";
import "../../Constants.sol";

/// @title abstract contract for splitting PCV into different deposits
/// @author Fei Protocol
abstract contract PCVSplitter is CoreRef {

    uint256[] private ratios;
    address[] private pcvDeposits;

    event AllocationUpdate(address[] oldPCVDeposits, uint256[] oldRatios, address[] newPCVDeposits, uint256[] newRatios);
    event Allocate(address indexed caller, uint256 amount);

    /// @notice PCVSplitter constructor
    /// @param _pcvDeposits list of PCV Deposits to split to
    /// @param _ratios ratios for splitting PCV Deposit allocations
    constructor(address[] memory _pcvDeposits, uint256[] memory _ratios) {
        _setAllocation(_pcvDeposits, _ratios);
    }

    /// @notice make sure an allocation has matching lengths and totals the ALLOCATION_GRANULARITY
    /// @param _pcvDeposits new list of pcv deposits to send to
    /// @param _ratios new ratios corresponding to the PCV deposits
    function checkAllocation(
        address[] memory _pcvDeposits,
        uint256[] memory _ratios
    ) public pure {
        require(
            _pcvDeposits.length == _ratios.length,
            "PCVSplitter: PCV Deposits and ratios are different lengths"
        );

        uint256 total;
        for (uint256 i; i < _ratios.length; i++) {
            total = total + _ratios[i];
        }

        require(
            total == Constants.BASIS_POINTS_GRANULARITY,
            "PCVSplitter: ratios do not total 100%"
        );
    }

    /// @notice gets the pcvDeposits and ratios of the splitter
    function getAllocation()
        public
        view
        returns (address[] memory, uint256[] memory)
    {
        return (pcvDeposits, ratios);
    }

    /// @notice sets the allocation of held PCV
    function setAllocation(
        address[] calldata _allocations,
        uint256[] calldata _ratios
    ) external onlyGovernorOrAdmin {
        _setAllocation(_allocations, _ratios);
    }

    /// @notice distribute funds to single PCV deposit
    /// @param amount amount of funds to send
    /// @param pcvDeposit the pcv deposit to send funds
    function _allocateSingle(uint256 amount, address pcvDeposit)
        internal
        virtual;

    /// @notice sets a new allocation for the splitter
    /// @param _pcvDeposits new list of pcv deposits to send to
    /// @param _ratios new ratios corresponding to the PCV deposits. Must total ALLOCATION_GRANULARITY
    function _setAllocation(
        address[] memory _pcvDeposits,
        uint256[] memory _ratios
    ) internal {
        address[] memory _oldPCVDeposits = pcvDeposits;
        uint256[] memory _oldRatios = ratios;

        checkAllocation(_pcvDeposits, _ratios);

        pcvDeposits = _pcvDeposits;
        ratios = _ratios;

        emit AllocationUpdate(_oldPCVDeposits, _oldRatios, _pcvDeposits, _ratios);
    }

    /// @notice distribute funds to all pcv deposits at specified allocation ratios
    /// @param total amount of funds to send
    function _allocate(uint256 total) internal {
        uint256 granularity = Constants.BASIS_POINTS_GRANULARITY;
        for (uint256 i; i < ratios.length; i++) {
            uint256 amount = total * ratios[i] / granularity;
            _allocateSingle(amount, pcvDeposits[i]);
        }
        emit Allocate(msg.sender, total);
    }
}

File 14 of 32 : Constants.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;

import "@uniswap/v2-periphery/contracts/interfaces/IWETH.sol";

library Constants {
    /// @notice the denominator for basis points granularity (10,000)
    uint256 public constant BASIS_POINTS_GRANULARITY = 10_000;
    
    /// @notice WETH9 address
    IWETH public constant WETH = IWETH(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);

    /// @notice USD stand-in address
    address public constant USD = 0x1111111111111111111111111111111111111111;
}

File 15 of 32 : Incentivized.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "../refs/CoreRef.sol";

/// @title abstract contract for incentivizing keepers
/// @author Fei Protocol
abstract contract Incentivized is CoreRef {

    /// @notice FEI incentive for calling keeper functions
    uint256 public incentiveAmount;

    event IncentiveUpdate(uint256 oldIncentiveAmount, uint256 newIncentiveAmount);

    constructor(uint256 _incentiveAmount) {
        incentiveAmount = _incentiveAmount;
        emit IncentiveUpdate(0, _incentiveAmount);
    }

    /// @notice set the incentiveAmount
    function setIncentiveAmount(uint256 newIncentiveAmount) public onlyGovernor {
        uint256 oldIncentiveAmount = incentiveAmount;
        incentiveAmount = newIncentiveAmount;
        emit IncentiveUpdate(oldIncentiveAmount, newIncentiveAmount);
    }

    /// @notice incentivize a call with incentiveAmount FEI rewards
    /// @dev no-op if the contract does not have Minter role
    function _incentivize() internal ifMinterSelf {
        _mintFei(msg.sender, incentiveAmount);
    }
}

File 16 of 32 : IPCVDeposit.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "./IPCVDepositBalances.sol";

/// @title a PCV Deposit interface
/// @author Fei Protocol
interface IPCVDeposit is IPCVDepositBalances {
    // ----------- Events -----------
    event Deposit(address indexed _from, uint256 _amount);

    event Withdrawal(
        address indexed _caller,
        address indexed _to,
        uint256 _amount
    );

    event WithdrawERC20(
        address indexed _caller,
        address indexed _token,
        address indexed _to,
        uint256 _amount
    );

    event WithdrawETH(
        address indexed _caller,
        address indexed _to,
        uint256 _amount
    );

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

    function deposit() external;

    // ----------- PCV Controller only state changing api -----------

    function withdraw(address to, uint256 amount) external;

    function withdrawERC20(address token, address to, uint256 amount) external;

    function withdrawETH(address payable to, uint256 amount) external;
}

File 17 of 32 : IPCVDepositBalances.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

/// @title a PCV Deposit interface for only balance getters
/// @author Fei Protocol
interface IPCVDepositBalances {
    
    // ----------- Getters -----------
    
    /// @notice gets the effective balance of "balanceReportedIn" token if the deposit were fully withdrawn
    function balance() external view returns (uint256);

    /// @notice gets the token address in which this deposit returns its balance
    function balanceReportedIn() external view returns (address);

    /// @notice gets the resistant token balance and protocol owned fei of this deposit
    function resistantBalanceAndFei() external view returns (uint256, uint256);
}

File 18 of 32 : Timed.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

/// @title an abstract contract for timed events
/// @author Fei Protocol
abstract contract Timed {

    /// @notice the start timestamp of the timed period
    uint256 public startTime;

    /// @notice the duration of the timed period
    uint256 public duration;

    event DurationUpdate(uint256 oldDuration, uint256 newDuration);

    event TimerReset(uint256 startTime);

    constructor(uint256 _duration) {
        _setDuration(_duration);
    }

    modifier duringTime() {
        require(isTimeStarted(), "Timed: time not started");
        require(!isTimeEnded(), "Timed: time ended");
        _;
    }

    modifier afterTime() {
        require(isTimeEnded(), "Timed: time not ended");
        _;
    }

    /// @notice return true if time period has ended
    function isTimeEnded() public view returns (bool) {
        return remainingTime() == 0;
    }

    /// @notice number of seconds remaining until time is up
    /// @return remaining
    function remainingTime() public view returns (uint256) {
        return duration - timeSinceStart(); // duration always >= timeSinceStart which is on [0,d]
    }

    /// @notice number of seconds since contract was initialized
    /// @return timestamp
    /// @dev will be less than or equal to duration
    function timeSinceStart() public view returns (uint256) {
        if (!isTimeStarted()) {
            return 0; // uninitialized
        }
        uint256 _duration = duration;
        uint256 timePassed = block.timestamp - startTime; // block timestamp always >= startTime
        return timePassed > _duration ? _duration : timePassed;
    }

    function isTimeStarted() public view returns (bool) {
        return startTime != 0;
    }

    function _initTimed() internal {
        startTime = block.timestamp;
        
        emit TimerReset(block.timestamp);
    }

    function _setDuration(uint256 newDuration) internal {
        require(newDuration != 0, "Timed: zero duration");

        uint256 oldDuration = duration;
        duration = newDuration;
        emit DurationUpdate(oldDuration, newDuration);
    }
}

File 19 of 32 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 20 of 32 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^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 21 of 32 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^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;
        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");

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

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 22 of 32 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 23 of 32 : SafeCast.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such 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.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */
library SafeCast {
    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        require(value >= 0, "SafeCast: value must be positive");
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v3.1._
     */
    function toInt128(int256 value) internal pure returns (int128) {
        require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits");
        return int128(value);
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v3.1._
     */
    function toInt64(int256 value) internal pure returns (int64) {
        require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits");
        return int64(value);
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v3.1._
     */
    function toInt32(int256 value) internal pure returns (int32) {
        require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits");
        return int32(value);
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v3.1._
     */
    function toInt16(int256 value) internal pure returns (int16) {
        require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits");
        return int16(value);
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     *
     * _Available since v3.1._
     */
    function toInt8(int256 value) internal pure returns (int8) {
        require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits");
        return int8(value);
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
        return int256(value);
    }
}

File 24 of 32 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 25 of 32 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/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() {
        _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 26 of 32 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 27 of 32 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 28 of 32 : IAccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 29 of 32 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 30 of 32 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 31 of 32 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 32 of 32 : IWETH.sol
pragma solidity >=0.5.0;

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

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":"oracle","type":"address"},{"internalType":"address","name":"backupOracle","type":"address"},{"components":[{"internalType":"uint256","name":"scale","type":"uint256"},{"internalType":"uint256","name":"buffer","type":"uint256"},{"internalType":"uint256","name":"discount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"incentive","type":"uint256"},{"internalType":"address[]","name":"pcvDeposits","type":"address[]"},{"internalType":"uint256[]","name":"ratios","type":"uint256[]"}],"internalType":"struct EthBondingCurve.BondingCurveParams","name":"params","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Allocate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"oldPCVDeposits","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"oldRatios","type":"uint256[]"},{"indexed":false,"internalType":"address[]","name":"newPCVDeposits","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"newRatios","type":"uint256[]"}],"name":"AllocationUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldBackupOracle","type":"address"},{"indexed":true,"internalType":"address","name":"newBackupOracle","type":"address"}],"name":"BackupOracleUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldBuffer","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBuffer","type":"uint256"}],"name":"BufferUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"oldContractAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newContractAdminRole","type":"bytes32"}],"name":"ContractAdminRoleUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldCore","type":"address"},{"indexed":true,"internalType":"address","name":"newCore","type":"address"}],"name":"CoreUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"int256","name":"oldDecimalsNormalizer","type":"int256"},{"indexed":false,"internalType":"int256","name":"newDecimalsNormalizer","type":"int256"}],"name":"DecimalsNormalizerUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldDiscount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDiscount","type":"uint256"}],"name":"DiscountUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"DurationUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldIncentiveAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newIncentiveAmount","type":"uint256"}],"name":"IncentiveUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"oldDoInvert","type":"bool"},{"indexed":false,"internalType":"bool","name":"newDoInvert","type":"bool"}],"name":"InvertUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMint","type":"uint256"}],"name":"MintCapUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOracle","type":"address"},{"indexed":true,"internalType":"address","name":"newOracle","type":"address"}],"name":"OracleUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"Purchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldTotalPurchased","type":"uint256"}],"name":"Reset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldScale","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newScale","type":"uint256"}],"name":"ScaleUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"TimerReset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"CONTRACT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"atScale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableToMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"backupOracle","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceReportedIn","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buffer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_pcvDeposits","type":"address[]"},{"internalType":"uint256[]","name":"_ratios","type":"uint256[]"}],"name":"checkAllocation","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"core","outputs":[{"internalType":"contract ICore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimalsNormalizer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"discount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"doInvert","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"getAllocation","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentPrice","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"incentiveAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"price","type":"tuple"}],"name":"invert","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"isContractAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTimeEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTimeStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"contract IOracle","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":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"purchase","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"readOracle","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"remainingTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resistantBalanceAndFei","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"scale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_allocations","type":"address[]"},{"internalType":"uint256[]","name":"_ratios","type":"uint256[]"}],"name":"setAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newBackupOracle","type":"address"}],"name":"setBackupOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newBuffer","type":"uint256"}],"name":"setBuffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newContractAdminRole","type":"bytes32"}],"name":"setContractAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newCore","type":"address"}],"name":"setCore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"newDecimalsNormalizer","type":"int256"}],"name":"setDecimalsNormalizer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDiscount","type":"uint256"}],"name":"setDiscount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"newDoInvert","type":"bool"}],"name":"setDoInvert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newIncentiveAmount","type":"uint256"}],"name":"setIncentiveAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_frequency","type":"uint256"}],"name":"setIncentiveFrequency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintCap","type":"uint256"}],"name":"setMintCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOracle","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newScale","type":"uint256"}],"name":"setScale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeSinceStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPurchased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"updateOracle","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040523480156200001157600080fd5b50604051620045d7380380620045d7833981016040819052620000349162000c28565b83838383600001518460a001518560c001518660600151876080015173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc289604001518a60200151838588888e8e8e6000808460008060006101000a81548160ff021916908315150217905550620000a5816200024960201b60201c565b50620000b1846200035f565b6001600160a01b03831615801590620000dc5750836001600160a01b0316836001600160a01b031614155b15620000ed57620000ed8362000411565b620000f88162000463565b6200010382620004de565b50505050506200011a82826200051d60201b60201c565b506200012890508162000658565b50600a8190556040805160008152602081018390527f4a758599c8c3e7177b789a73842b398999af813d771bc71436fb5a6485e2ff56910160405180910390a1506200017488620006e6565b6200017f8862000774565b606083901b6001600160601b031916608052600e8290556040805160008152602081018490527f8d6399dba354121c67302f1aec49781f433fee03625ebeab8a41dd4629623e6c910160405180910390a1600d8190556040805160008152602081018390527f5b7f5a981059c5b7203ad1e4e44a9dead0cb9e32211e9a716b14f0dd25c58a63910160405180910390a16200021962000802565b6001600160a01b03831615620002345762000234836200083d565b50505050505050505050505050505062000fff565b60025460ff1615620002a25760405162461bcd60e51b815260206004820152601c60248201527f436f72655265663a20616c726561647920696e697469616c697a65640000000060448201526064015b60405180910390fd5b60028054600160ff1990911617905560008054610100600160a81b0319166101006001600160a01b038481168202929092179283905560408051631c5bfa2360e11b815290516200035c9492909204909216916338b7f446916004808301926020929190829003018186803b1580156200031b57600080fd5b505afa15801562000330573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000356919062000d29565b620008f9565b50565b6001600160a01b038116620003b75760405162461bcd60e51b815260206004820152601760248201527f4f7261636c655265663a207a65726f2061646472657373000000000000000000604482015260640162000299565b600280546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f93450534569bdbb3109b44eef77c9b236897f4caa4f201be10252d6462a5693790600090a35050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f492cc1f8400b642b4e56de46ed10d314a49bf3e0594c43e2e5947c1e1733645b90600090a35050565b6005805482151560ff198216811790925560ff1690811515146200049d576200049d60045460001962000497919062000ee1565b620004de565b60408051821515815283151560208201527f16b9ae7ca814a6dfd3357b20f33bcc7c194676988d5da46846628da394df8ab391015b60405180910390a15050565b600480549082905560408051828152602081018490527fc45ec9015c033bb1ee553a67346dd851062dddce070a6dddb7616e5d7595bcc29101620004d2565b600060078054806020026020016040519081016040528092919081815260200182805480156200057757602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000558575b5050505050905060006006805480602002602001604051908101604052809291908181526020018280548015620005ce57602002820191906000526020600020905b815481526020019060010190808311620005b9575b50505050509050620005e784846200093260201b60201c565b8351620005fc90600790602087019062000a68565b5082516200061290600690602086019062000ad2565b507fd19942fa2b63bf146274fb044e6814608b1a12a9470874520516c155bbb63606828286866040516200064a949392919062000de2565b60405180910390a150505050565b80620006a75760405162461bcd60e51b815260206004820152601460248201527f54696d65643a207a65726f206475726174696f6e000000000000000000000000604482015260640162000299565b600980549082905560408051828152602081018490527f53356ce8408d6a56b0e61bcd41861e12eb5772987856f889e38e4aba4ffa104c9101620004d2565b80620007355760405162461bcd60e51b815260206004820152601b60248201527f426f6e64696e6743757276653a207a65726f206d696e74206361700000000000604482015260640162000299565b600f80549082905560408051828152602081018490527f5dd7f8cf1549f54d6ce48041bbb9179089b5a74c3c600fcc3610abe72d2dc5549101620004d2565b80620007c35760405162461bcd60e51b815260206004820152601860248201527f426f6e64696e6743757276653a207a65726f207363616c650000000000000000604482015260640162000299565b600b80549082905560408051828152602081018490527f5d8fb83dfef1d60f4e331d65f09d4e8c8bc92cc69fbbfed7c227cb82b378d8369101620004d2565b4260088190556040519081527fd1dbb2ce8081405078443ef34dae718285114121a39370b14ef01b9d2b0a20839060200160405180910390a1565b6000601290506000826001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200087f57600080fd5b505afa15801562000894573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008ba919062000d42565b620008c99060ff168362000f70565b60055490915060ff1615620008e957620008e68160001962000ee1565b90505b620008f481620004de565b505050565b6001805490829055604051829082907f29ddd278ef9169e35aa84e424b39048b89af9c0b50f85497e40f97dff6946cf590600090a35050565b8051825114620009ab5760405162461bcd60e51b815260206004820152603a60248201527f50435653706c69747465723a20504356204465706f7369747320616e6420726160448201527f74696f732061726520646966666572656e74206c656e67746873000000000000606482015260840162000299565b6000805b825181101562000a0657828181518110620009da57634e487b7160e01b600052603260045260246000fd5b602002602001015182620009ef919062000ec6565b915080620009fd8162000fb5565b915050620009af565b506127108114620008f45760405162461bcd60e51b815260206004820152602560248201527f50435653706c69747465723a20726174696f7320646f206e6f7420746f74616c604482015264203130302560d81b606482015260840162000299565b82805482825590600052602060002090810192821562000ac0579160200282015b8281111562000ac057825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000a89565b5062000ace92915062000b10565b5090565b82805482825590600052602060002090810192821562000ac0579160200282015b8281111562000ac057825182559160200191906001019062000af3565b5b8082111562000ace576000815560010162000b11565b80516001600160a01b038116811462000b3f57600080fd5b919050565b600082601f83011262000b55578081fd5b8151602062000b6e62000b688362000ea0565b62000e6d565b80838252828201915082860187848660051b890101111562000b8e578586fd5b855b8581101562000bb75762000ba48262000b27565b8452928401929084019060010162000b90565b5090979650505050505050565b600082601f83011262000bd5578081fd5b8151602062000be862000b688362000ea0565b80838252828201915082860187848660051b890101111562000c08578586fd5b855b8581101562000bb75781518452928401929084019060010162000c0a565b6000806000806080858703121562000c3e578384fd5b62000c498562000b27565b935062000c596020860162000b27565b925062000c696040860162000b27565b60608601519092506001600160401b038082111562000c86578283fd5b9086019060e0828903121562000c9a578283fd5b62000ca462000e42565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a08301518281111562000ce2578485fd5b62000cf08a82860162000b44565b60a08301525060c08301518281111562000d08578485fd5b62000d168a82860162000bc4565b60c0830152509598949750929550505050565b60006020828403121562000d3b578081fd5b5051919050565b60006020828403121562000d54578081fd5b815160ff8116811462000d65578182fd5b9392505050565b6000815180845260208085019450808401835b8381101562000da65781516001600160a01b03168752958201959082019060010162000d7f565b509495945050505050565b6000815180845260208085019450808401835b8381101562000da65781518752958201959082019060010162000dc4565b60808152600062000df7608083018762000d6c565b828103602084015262000e0b818762000db1565b9050828103604084015262000e21818662000d6c565b9050828103606084015262000e37818562000db1565b979650505050505050565b60405160e081016001600160401b038111828210171562000e675762000e6762000fe9565b60405290565b604051601f8201601f191681016001600160401b038111828210171562000e985762000e9862000fe9565b604052919050565b60006001600160401b0382111562000ebc5762000ebc62000fe9565b5060051b60200190565b6000821982111562000edc5762000edc62000fd3565b500190565b60006001600160ff1b038184138284138082168684048611161562000f0a5762000f0a62000fd3565b600160ff1b8487128281168783058912161562000f2b5762000f2b62000fd3565b85871292508782058712848416161562000f495762000f4962000fd3565b8785058712818416161562000f625762000f6262000fd3565b505050929093029392505050565b60008083128015600160ff1b85018412161562000f915762000f9162000fd3565b6001600160ff1b038401831381161562000faf5762000faf62000fd3565b50500390565b600060001982141562000fcc5762000fcc62000fd3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60805160601c6135b262001025600039600081816103ad015261090f01526135b26000f3fe60806040526004361061034f5760003560e01c8063836efd31116101c6578063d29caa0b116100f7578063eb91d37e11610095578063f51e181a1161006f578063f51e181a146108e7578063fc0c546a146108fd578063fc81a12a14610931578063ff2ca34c1461095157600080fd5b8063eb91d37e14610899578063edaafe20146108ae578063f2f4eb26146108c457600080fd5b8063d826f88f116100d1578063d826f88f1461082e578063dabd271914610843578063e1d92bf814610863578063e632c2f31461088357600080fd5b8063d29caa0b146107d9578063d3488442146107f9578063d6f124f01461081957600080fd5b8063acc4bd0811610164578063b49058971161013e578063b490589714610786578063b69ef8a81461079b578063b86677fe146107ae578063cae5d73b146107c357600080fd5b8063acc4bd081461073c578063adc7ea3714610751578063ae951b2e1461077157600080fd5b80638de93222116101a05780638de93222146106e55780639a9ba4da146106f8578063a36832a51461070d578063abaa99161461072757600080fd5b8063836efd31146106905780638456cb59146106b057806386b117b1146106c557600080fd5b80635936b637116102a057806373ab1ddd1161023e57806378e979251161021857806378e97925146106155780637adbf9731461062b5780637dc0d1d01461064b578063800096301461067057600080fd5b806373ab1ddd146105d457806374601c3c146105ea57806376c71ca1146105ff57600080fd5b806367fc6dea1161027a57806367fc6dea146105745780636b6dff0a146105895780636b6f4a9d1461059e5780636e791c83146105b457600080fd5b80635936b6371461051c5780635c1952171461053c5780635c975abb1461055c57600080fd5b8063254984011161030d5780633edc3519116102e75780633edc3519146104a65780633f4ba83a146104c65780634070a0c9146104db5780634951fcd4146104fb57600080fd5b806325498401146104425780633102b21a146104625780633be8261b1461048257600080fd5b8062d89b331461035457806303bd9edd1461037c5780630c68f63b1461039e5780630c9e1e8e146103e55780630fb5a6b4146104085780631da033121461042c575b600080fd5b34801561036057600080fd5b5060085415155b60405190151581526020015b60405180910390f35b34801561038857600080fd5b5061039c610397366004612f97565b61096b565b005b3480156103aa57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610373565b3480156103f157600080fd5b506103fa610a1b565b6040516103739291906130fd565b34801561041457600080fd5b5061041e60095481565b604051908152602001610373565b34801561043857600080fd5b5061041e60015481565b34801561044e57600080fd5b5061039c61045d366004612dec565b610ad8565b34801561046e57600080fd5b5061039c61047d366004612e33565b610b8b565b34801561048e57600080fd5b50610497610ca8565b60405190518152602001610373565b3480156104b257600080fd5b5061039c6104c1366004612f97565b610eb3565b3480156104d257600080fd5b5061039c610f66565b3480156104e757600080fd5b5061039c6104f6366004612f97565b611090565b34801561050757600080fd5b50604080514781526000602082015201610373565b34801561052857600080fd5b5061039c610537366004612f5f565b611143565b34801561054857600080fd5b5061041e610557366004612f97565b6111e7565b34801561056857600080fd5b5060005460ff16610367565b34801561058057600080fd5b5061041e611291565b34801561059557600080fd5b5061041e6112d3565b3480156105aa57600080fd5b5061041e600e5481565b3480156105c057600080fd5b506104976105cf366004612fcb565b61135b565b3480156105e057600080fd5b5061041e60045481565b3480156105f657600080fd5b5061041e611397565b34801561060b57600080fd5b5061041e600f5481565b34801561062157600080fd5b5061041e60085481565b34801561063757600080fd5b5061039c610646366004612dec565b6113a9565b34801561065757600080fd5b506002546103cd9061010090046001600160a01b031681565b34801561067c57600080fd5b5061039c61068b366004612dec565b61144d565b34801561069c57600080fd5b506003546103cd906001600160a01b031681565b3480156106bc57600080fd5b5061039c61158f565b3480156106d157600080fd5b5061039c6106e0366004612e9c565b6116b7565b61041e6106f3366004612e08565b6117e7565b34801561070457600080fd5b506103cd611882565b34801561071957600080fd5b50600b54600c541015610367565b34801561073357600080fd5b5061039c611909565b34801561074857600080fd5b5061041e6119e1565b34801561075d57600080fd5b5061039c61076c366004612f97565b6119f8565b34801561077d57600080fd5b50610367611b09565b34801561079257600080fd5b5061041e611b19565b3480156107a757600080fd5b504761041e565b3480156107ba57600080fd5b506103cd611b23565b3480156107cf57600080fd5b5061041e600a5481565b3480156107e557600080fd5b5061039c6107f4366004612f97565b611b72565b34801561080557600080fd5b5061039c610814366004612f97565b611c4b565b34801561082557600080fd5b5061039c611cef565b34801561083a57600080fd5b5061039c611d53565b34801561084f57600080fd5b5061039c61085e366004612f97565b611e3c565b34801561086f57600080fd5b5061039c61087e366004612f97565b611f45565b34801561088f57600080fd5b5061041e600c5481565b3480156108a557600080fd5b50610497611ff8565b3480156108ba57600080fd5b5061041e600d5481565b3480156108d057600080fd5b5060005461010090046001600160a01b03166103cd565b3480156108f357600080fd5b5061041e600b5481565b34801561090957600080fd5b506103cd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561093d57600080fd5b5061036761094c366004612dec565b612022565b34801561095d57600080fd5b506005546103679060ff1681565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea9190612f7b565b610a0f5760405162461bcd60e51b8152600401610a06906132a0565b60405180910390fd5b610a18816120b1565b50565b6060806007600681805480602002602001604051908101604052809291908181526020018280548015610a7757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a59575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015610ac957602002820191906000526020600020905b815481526020019060010190808311610ab5575b50505050509050915091509091565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015610b1f57600080fd5b505afa158015610b33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b579190612f7b565b80610b665750610b6633612022565b610b825760405162461bcd60e51b8152600401610a0690613223565b610a18816120ef565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015610bd257600080fd5b505afa158015610be6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0a9190612f7b565b80610c195750610c1933612022565b610c355760405162461bcd60e51b8152600401610a0690613223565b610ca28484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080880282810182019093528782529093508792508691829185019084908082843760009201919091525061214192505050565b50505050565b604080516020810190915260008152600080600260019054906101000a90046001600160a01b03166001600160a01b03166357de26a46040518163ffffffff1660e01b8152600401604080518083038186803b158015610d0757600080fd5b505afa158015610d1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3f919061300c565b9150915080158015610d5b57506003546001600160a01b031615155b15610de057600354604080516315f789a960e21b815281516001600160a01b03909316926357de26a492600480840193919291829003018186803b158015610da257600080fd5b505afa158015610db6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dda919061300c565b90925090505b80610e2d5760405162461bcd60e51b815260206004820152601960248201527f4f7261636c655265663a206f7261636c6520696e76616c6964000000000000006044820152606401610a06565b6000806004541215610e6f57610e51600454600019610e4c9190613459565b61226a565b610e5c90600a6133b1565b9050610e6883826122c0565b9250610e94565b610e7a60045461226a565b610e8590600a6133b1565b9050610e9183826122f1565b92505b60055460ff1615610eab57610ea88361135b565b92505b509092915050565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015610efa57600080fd5b505afa158015610f0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f329190612f7b565b80610f415750610f4133612022565b610f5d5760405162461bcd60e51b8152600401610a0690613223565b610a1881612319565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015610fad57600080fd5b505afa158015610fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe59190612f7b565b8061106a5750600054604051630c68ba2160e01b81523360048201526101009091046001600160a01b031690630c68ba219060240160206040518083038186803b15801561103257600080fd5b505afa158015611046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106a9190612f7b565b6110865760405162461bcd60e51b8152600401610a06906131d6565b61108e6123a4565b565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b1580156110d757600080fd5b505afa1580156110eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110f9190612f7b565b8061111e575061111e33612022565b61113a5760405162461bcd60e51b8152600401610a0690613223565b610a1881612438565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b15801561118a57600080fd5b505afa15801561119e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c29190612f7b565b6111de5760405162461bcd60e51b8152600401610a06906132a0565b610a18816124c3565b6000806112046111ff846111f9610ca8565b906122f1565b612531565b90506000611210611ff8565b9050611220600b54600c54101590565b61127c576000600c54600b5461123691906134fb565b90508083111561127a57600061124c82856134fb565b90506112706111ff611260836111f9612548565b61126a86866122f1565b90612579565b9695505050505050565b505b6112896111ff82846122f1565b949350505050565b600061129e600854151590565b6112a85750600090565b6009546008546000906112bb90426134fb565b90508181116112ca57806112cc565b815b9250505090565b60006112dd611b23565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b15801561131e57600080fd5b505afa158015611332573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113569190613073565b905090565b6040805160208082018352600080835283518083018552528251908101909252670de0b6b3a764000082529061139190836125a3565b92915050565b6000600c54600f5461135691906134fb565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b1580156113f057600080fd5b505afa158015611404573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114289190612f7b565b6114445760405162461bcd60e51b8152600401610a06906132a0565b610a18816125d8565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b15801561149457600080fd5b505afa1580156114a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114cc9190612f7b565b6114e85760405162461bcd60e51b8152600401610a06906132a0565b6001600160a01b0381166115365760405162461bcd60e51b8152602060048201526015602482015274436f72655265663a207a65726f206164647265737360581b6044820152606401610a06565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f9209b7c8c06dcfd261686a663e7c55989337b18d59da5433c6f2835fb697092091a35050565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b1580156115d657600080fd5b505afa1580156115ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160e9190612f7b565b806116935750600054604051630c68ba2160e01b81523360048201526101009091046001600160a01b031690630c68ba219060240160206040518083038186803b15801561165b57600080fd5b505afa15801561166f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116939190612f7b565b6116af5760405162461bcd60e51b8152600401610a06906131d6565b61108e612688565b805182511461172e5760405162461bcd60e51b815260206004820152603a60248201527f50435653706c69747465723a20504356204465706f7369747320616e6420726160448201527f74696f732061726520646966666572656e74206c656e677468730000000000006064820152608401610a06565b6000805b82518110156117825782818151811061175b57634e487b7160e01b600052603260045260246000fd5b60200260200101518261176e9190613336565b91508061177a81613512565b915050611732565b5061271081146117e25760405162461bcd60e51b815260206004820152602560248201527f50435653706c69747465723a20726174696f7320646f206e6f7420746f74616c604482015264203130302560d81b6064820152608401610a06565b505050565b6000805460ff161561180b5760405162461bcd60e51b8152600401610a0690613276565b8134146118715760405162461bcd60e51b815260206004820152602e60248201527f426f6e64696e672043757276653a2053656e742076616c756520646f6573206e60448201526d1bdd08195c5d585b081a5b9c1d5d60921b6064820152608401610a06565b61187b82846126e0565b9392505050565b60008060019054906101000a90046001600160a01b03166001600160a01b0316639a9ba4da6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118d157600080fd5b505afa1580156118e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113569190612faf565b60005460ff161561192c5760405162461bcd60e51b8152600401610a0690613276565b47600061193e6111ff836111f9610ca8565b90506000612710600d548361195391906134dc565b61195d919061334e565b9050600a548110156119bb5760405162461bcd60e51b815260206004820152602160248201527f426f6e64696e6743757276653a204e6f7420656e6f756768205043562068656c6044820152601960fa1b6064820152608401610a06565b6119c4836127a9565b6119cc611b09565b156117e2576119d961288b565b6117e26128c1565b60006119eb611291565b60095461135691906134fb565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611a3f57600080fd5b505afa158015611a53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a779190612f7b565b80611a865750611a8633612022565b611aa25760405162461bcd60e51b8152600401610a0690613223565b6127108110611ac35760405162461bcd60e51b8152600401610a0690613183565b600d80549082905560408051828152602081018490527f5b7f5a981059c5b7203ad1e4e44a9dead0cb9e32211e9a716b14f0dd25c58a6391015b60405180910390a15050565b6000611b136119e1565b15919050565b60006112dd611882565b60008060019054906101000a90046001600160a01b03166001600160a01b031663b86677fe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118d157600080fd5b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611bb957600080fd5b505afa158015611bcd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf19190612f7b565b611c0d5760405162461bcd60e51b8152600401610a06906132a0565b600a80549082905560408051828152602081018490527f4a758599c8c3e7177b789a73842b398999af813d771bc71436fb5a6485e2ff569101611afd565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611c9257600080fd5b505afa158015611ca6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cca9190612f7b565b611ce65760405162461bcd60e51b8152600401610a06906132a0565b610a1881612951565b600260019054906101000a90046001600160a01b03166001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611d3f57600080fd5b505af1158015610ca2573d6000803e3d6000fd5b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611d9a57600080fd5b505afa158015611dae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd29190612f7b565b80611de15750611de133612022565b611dfd5760405162461bcd60e51b8152600401610a0690613223565b600c805460009091556040518181527f01c3cbb0d62726ab09d163873ebf9aed99dd8dc08e57bc938f458132fd178cf69060200160405180910390a150565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611e8357600080fd5b505afa158015611e97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebb9190612f7b565b80611eca5750611eca33612022565b611ee65760405162461bcd60e51b8152600401610a0690613223565b6127108110611f075760405162461bcd60e51b8152600401610a0690613183565b600e80549082905560408051828152602081018490527f8d6399dba354121c67302f1aec49781f433fee03625ebeab8a41dd4629623e6c9101611afd565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611f8c57600080fd5b505afa158015611fa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc49190612f7b565b80611fd35750611fd333612022565b611fef5760405162461bcd60e51b8152600401610a0690613223565b610a188161298a565b604080516020810190915260008152600b54600c541061201a57611356612548565b611356612a0c565b60008054600154604051632474521560e21b815260048101919091526001600160a01b038481166024830152610100909204909116906391d148549060440160206040518083038186803b15801561207957600080fd5b505afa15801561208d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113919190612f7b565b600480549082905560408051828152602081018490527fc45ec9015c033bb1ee553a67346dd851062dddce070a6dddb7616e5d7595bcc29101611afd565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f492cc1f8400b642b4e56de46ed10d314a49bf3e0594c43e2e5947c1e1733645b90600090a35050565b6000600780548060200260200160405190810160405280929190818152602001828054801561219957602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161217b575b50505050509050600060068054806020026020016040519081016040528092919081815260200182805480156121ee57602002820191906000526020600020905b8154815260200190600101908083116121da575b505050505090506121ff84846116b7565b8351612212906007906020870190612c82565b508251612226906006906020860190612ce3565b507fd19942fa2b63bf146274fb044e6814608b1a12a9470874520516c155bbb636068282868660405161225c949392919061312b565b60405180910390a150505050565b6000808212156122bc5760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610a06565b5090565b6040805160208101909152600081526040805160208101909152835181906122e89085612a32565b90529392505050565b6040805160208101909152600081526040805160208101909152835181906122e89085612a3e565b806123665760405162461bcd60e51b815260206004820152601860248201527f426f6e64696e6743757276653a207a65726f207363616c6500000000000000006044820152606401610a06565b600b80549082905560408051828152602081018490527f5d8fb83dfef1d60f4e331d65f09d4e8c8bc92cc69fbbfed7c227cb82b378d8369101611afd565b60005460ff166123ed5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a06565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b0390911681526020015b60405180910390a1565b806124855760405162461bcd60e51b815260206004820152601b60248201527f426f6e64696e6743757276653a207a65726f206d696e742063617000000000006044820152606401610a06565b600f80549082905560408051828152602081018490527f5dd7f8cf1549f54d6ce48041bbb9179089b5a74c3c600fcc3610abe72d2dc5549101611afd565b6005805482151560ff198216811790925560ff1690811515146124f8576124f86004546000196124f39190613459565b6120b1565b60408051821515815283151560208201527f16b9ae7ca814a6dfd3357b20f33bcc7c194676988d5da46846628da394df8ab39101611afd565b805160009061139190670de0b6b3a7640000612a32565b604080516020810190915260008152600d546127109061257390829061256e9082613336565b612a4a565b91505090565b60408051602081019091526000815260408051602081019091528251845182916122e89190612a77565b60408051602081019091526000815260405180602001604052806122e88560000151670de0b6b3a76400008660000151612a83565b6001600160a01b03811661262e5760405162461bcd60e51b815260206004820152601760248201527f4f7261636c655265663a207a65726f20616464726573730000000000000000006044820152606401610a06565b600280546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f93450534569bdbb3109b44eef77c9b236897f4caa4f201be10252d6462a5693790600090a35050565b60005460ff16156126ab5760405162461bcd60e51b8152600401610a0690613276565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861241a3390565b60006126ea611cef565b6126f3836111e7565b9050806126fe611397565b101561274c5760405162461bcd60e51b815260206004820152601e60248201527f426f6e64696e6743757276653a2065786365656473206d696e742063617000006044820152606401610a06565b61275581612a99565b61275f8282612aad565b60408051848152602081018390526001600160a01b038416917f12cb4648cf3058b17ceeb33e579f8b0bc269fe0843f3900b8e24b6c54871703c910160405180910390a292915050565b61271060005b60065481101561285157600082600683815481106127dd57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154856127f391906134dc565b6127fd919061334e565b905061283e816007848154811061282457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316612b24565b508061284981613512565b9150506127af565b5060405182815233907f249d8eb76d5a22983620d741de2470148d1a9a26ab923aec4262770690d11ebc9060200160405180910390a25050565b4260088190556040519081527fd1dbb2ce8081405078443ef34dae718285114121a39370b14ef01b9d2b0a20839060200161242e565b6000546040516355138f0d60e11b81523060048201526101009091046001600160a01b03169063aa271e1a9060240160206040518083038186803b15801561290857600080fd5b505afa15801561291c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129409190612f7b565b1561108e5761108e33600a54612aad565b6001805490829055604051829082907f29ddd278ef9169e35aa84e424b39048b89af9c0b50f85497e40f97dff6946cf590600090a35050565b806129ce5760405162461bcd60e51b81526020600482015260146024820152732a34b6b2b21d103d32b93790323ab930ba34b7b760611b6044820152606401610a06565b600980549082905560408051828152602081018490527f53356ce8408d6a56b0e61bcd41861e12eb5772987856f889e38e4aba4ffa104c9101611afd565b604080516020810190915260008152600e546127109061257390829061256e90826134fb565b600061187b828461334e565b600061187b82846134dc565b60408051602081019091526000815260405180602001604052806122e885670de0b6b3a764000086612a83565b600061187b8284613336565b600061128982612a938686612a3e565b90612a32565b80600c54612aa79190613336565b600c5550565b8015612b2057612abb611882565b6040516340c10f1960e01b81526001600160a01b0384811660048301526024820184905291909116906340c10f1990604401600060405180830381600087803b158015612b0757600080fd5b505af1158015612b1b573d6000803e3d6000fd5b505050505b5050565b612b2e8183612b69565b806001600160a01b031663d0e30db06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612b0757600080fd5b80471015612bb95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a06565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612c06576040519150601f19603f3d011682016040523d82523d6000602084013e612c0b565b606091505b50509050806117e25760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a06565b828054828255906000526020600020908101928215612cd7579160200282015b82811115612cd757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612ca2565b506122bc929150612d1e565b828054828255906000526020600020908101928215612cd7579160200282015b82811115612cd7578251825591602001919060010190612d03565b5b808211156122bc5760008155600101612d1f565b60008083601f840112612d44578182fd5b50813567ffffffffffffffff811115612d5b578182fd5b6020830191508360208260051b8501011115612d7657600080fd5b9250929050565b600082601f830112612d8d578081fd5b81356020612da2612d9d83613312565b6132e1565b80838252828201915082860187848660051b8901011115612dc1578586fd5b855b85811015612ddf57813584529284019290840190600101612dc3565b5090979650505050505050565b600060208284031215612dfd578081fd5b813561187b81613559565b60008060408385031215612e1a578081fd5b8235612e2581613559565b946020939093013593505050565b60008060008060408587031215612e48578182fd5b843567ffffffffffffffff80821115612e5f578384fd5b612e6b88838901612d33565b90965094506020870135915080821115612e83578384fd5b50612e9087828801612d33565b95989497509550505050565b60008060408385031215612eae578182fd5b823567ffffffffffffffff80821115612ec5578384fd5b818501915085601f830112612ed8578384fd5b81356020612ee8612d9d83613312565b8083825282820191508286018a848660051b8901011115612f07578889fd5b8896505b84871015612f32578035612f1e81613559565b835260019690960195918301918301612f0b565b5096505086013592505080821115612f48578283fd5b50612f5585828601612d7d565b9150509250929050565b600060208284031215612f70578081fd5b813561187b8161356e565b600060208284031215612f8c578081fd5b815161187b8161356e565b600060208284031215612fa8578081fd5b5035919050565b600060208284031215612fc0578081fd5b815161187b81613559565b600060208284031215612fdc578081fd5b6040516020810181811067ffffffffffffffff82111715612fff57612fff613543565b6040529135825250919050565b600080828403604081121561301f578283fd5b602081121561302c578283fd5b506040516020810181811067ffffffffffffffff8211171561305057613050613543565b6040528351815260208401519092506130688161356e565b809150509250929050565b600060208284031215613084578081fd5b5051919050565b6000815180845260208085019450808401835b838110156130c35781516001600160a01b03168752958201959082019060010161309e565b509495945050505050565b6000815180845260208085019450808401835b838110156130c3578151875295820195908201906001016130e1565b604081526000613110604083018561308b565b828103602084015261312281856130ce565b95945050505050565b60808152600061313e608083018761308b565b828103602084015261315081876130ce565b90508281036040840152613164818661308b565b9050828103606084015261317881856130ce565b979650505050505050565b60208082526033908201527f426f6e64696e6743757276653a204275666665722065786365656473206f72206040820152726d617463686573206772616e756c617269747960681b606082015260800190565b6020808252602d908201527f436f72655265663a2043616c6c6572206973206e6f742061206775617264696160408201526c371037b91033b7bb32b93737b960991b606082015260800190565b60208082526033908201527f436f72655265663a2043616c6c6572206973206e6f74206120676f7665726e6f604082015272391037b91031b7b73a3930b1ba1030b236b4b760691b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526021908201527f436f72655265663a2043616c6c6572206973206e6f74206120676f7665726e6f6040820152603960f91b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561330a5761330a613543565b604052919050565b600067ffffffffffffffff82111561332c5761332c613543565b5060051b60200190565b600082198211156133495761334961352d565b500190565b60008261336957634e487b7160e01b81526012600452602481fd5b500490565b600181815b808511156133a957816000190482111561338f5761338f61352d565b8085161561339c57918102915b93841c9390800290613373565b509250929050565b600061187b83836000826133c757506001611391565b816133d457506000611391565b81600181146133ea57600281146133f457613410565b6001915050611391565b60ff8411156134055761340561352d565b50506001821b611391565b5060208310610133831016604e8410600b8410161715613433575081810a611391565b61343d838361336e565b80600019048211156134515761345161352d565b029392505050565b60006001600160ff1b038184138284138082168684048611161561347f5761347f61352d565b600160ff1b8487128281168783058912161561349d5761349d61352d565b8587129250878205871284841616156134b8576134b861352d565b878505871281841616156134ce576134ce61352d565b505050929093029392505050565b60008160001904831182151516156134f6576134f661352d565b500290565b60008282101561350d5761350d61352d565b500390565b60006000198214156135265761352661352d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a1857600080fd5b8015158114610a1857600080fdfea2646970667358221220121e79bca45f4094ba01ec95fc446f55cbd225ee76aa3455bfab05f913721a9f64736f6c634300080400330000000000000000000000008d5ed43dca8c2f7dfb20cf7b53cc7e593635d7b9000000000000000000000000cd3c40ae1256922ba16c7872229385e20bc8351e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001518000000000000000000000000000000000000000000000001b1ae4d6e2ef50000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000020000000000000000000000005b86887e171bae0c2c826e87e34df8d558c079b90000000000000000000000004fcb1435fd42ce7ce7af3cb2e98289f79d2962b3000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000013880000000000000000000000000000000000000000000000000000000000001388

Deployed Bytecode

0x60806040526004361061034f5760003560e01c8063836efd31116101c6578063d29caa0b116100f7578063eb91d37e11610095578063f51e181a1161006f578063f51e181a146108e7578063fc0c546a146108fd578063fc81a12a14610931578063ff2ca34c1461095157600080fd5b8063eb91d37e14610899578063edaafe20146108ae578063f2f4eb26146108c457600080fd5b8063d826f88f116100d1578063d826f88f1461082e578063dabd271914610843578063e1d92bf814610863578063e632c2f31461088357600080fd5b8063d29caa0b146107d9578063d3488442146107f9578063d6f124f01461081957600080fd5b8063acc4bd0811610164578063b49058971161013e578063b490589714610786578063b69ef8a81461079b578063b86677fe146107ae578063cae5d73b146107c357600080fd5b8063acc4bd081461073c578063adc7ea3714610751578063ae951b2e1461077157600080fd5b80638de93222116101a05780638de93222146106e55780639a9ba4da146106f8578063a36832a51461070d578063abaa99161461072757600080fd5b8063836efd31146106905780638456cb59146106b057806386b117b1146106c557600080fd5b80635936b637116102a057806373ab1ddd1161023e57806378e979251161021857806378e97925146106155780637adbf9731461062b5780637dc0d1d01461064b578063800096301461067057600080fd5b806373ab1ddd146105d457806374601c3c146105ea57806376c71ca1146105ff57600080fd5b806367fc6dea1161027a57806367fc6dea146105745780636b6dff0a146105895780636b6f4a9d1461059e5780636e791c83146105b457600080fd5b80635936b6371461051c5780635c1952171461053c5780635c975abb1461055c57600080fd5b8063254984011161030d5780633edc3519116102e75780633edc3519146104a65780633f4ba83a146104c65780634070a0c9146104db5780634951fcd4146104fb57600080fd5b806325498401146104425780633102b21a146104625780633be8261b1461048257600080fd5b8062d89b331461035457806303bd9edd1461037c5780630c68f63b1461039e5780630c9e1e8e146103e55780630fb5a6b4146104085780631da033121461042c575b600080fd5b34801561036057600080fd5b5060085415155b60405190151581526020015b60405180910390f35b34801561038857600080fd5b5061039c610397366004612f97565b61096b565b005b3480156103aa57600080fd5b507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b6040516001600160a01b039091168152602001610373565b3480156103f157600080fd5b506103fa610a1b565b6040516103739291906130fd565b34801561041457600080fd5b5061041e60095481565b604051908152602001610373565b34801561043857600080fd5b5061041e60015481565b34801561044e57600080fd5b5061039c61045d366004612dec565b610ad8565b34801561046e57600080fd5b5061039c61047d366004612e33565b610b8b565b34801561048e57600080fd5b50610497610ca8565b60405190518152602001610373565b3480156104b257600080fd5b5061039c6104c1366004612f97565b610eb3565b3480156104d257600080fd5b5061039c610f66565b3480156104e757600080fd5b5061039c6104f6366004612f97565b611090565b34801561050757600080fd5b50604080514781526000602082015201610373565b34801561052857600080fd5b5061039c610537366004612f5f565b611143565b34801561054857600080fd5b5061041e610557366004612f97565b6111e7565b34801561056857600080fd5b5060005460ff16610367565b34801561058057600080fd5b5061041e611291565b34801561059557600080fd5b5061041e6112d3565b3480156105aa57600080fd5b5061041e600e5481565b3480156105c057600080fd5b506104976105cf366004612fcb565b61135b565b3480156105e057600080fd5b5061041e60045481565b3480156105f657600080fd5b5061041e611397565b34801561060b57600080fd5b5061041e600f5481565b34801561062157600080fd5b5061041e60085481565b34801561063757600080fd5b5061039c610646366004612dec565b6113a9565b34801561065757600080fd5b506002546103cd9061010090046001600160a01b031681565b34801561067c57600080fd5b5061039c61068b366004612dec565b61144d565b34801561069c57600080fd5b506003546103cd906001600160a01b031681565b3480156106bc57600080fd5b5061039c61158f565b3480156106d157600080fd5b5061039c6106e0366004612e9c565b6116b7565b61041e6106f3366004612e08565b6117e7565b34801561070457600080fd5b506103cd611882565b34801561071957600080fd5b50600b54600c541015610367565b34801561073357600080fd5b5061039c611909565b34801561074857600080fd5b5061041e6119e1565b34801561075d57600080fd5b5061039c61076c366004612f97565b6119f8565b34801561077d57600080fd5b50610367611b09565b34801561079257600080fd5b5061041e611b19565b3480156107a757600080fd5b504761041e565b3480156107ba57600080fd5b506103cd611b23565b3480156107cf57600080fd5b5061041e600a5481565b3480156107e557600080fd5b5061039c6107f4366004612f97565b611b72565b34801561080557600080fd5b5061039c610814366004612f97565b611c4b565b34801561082557600080fd5b5061039c611cef565b34801561083a57600080fd5b5061039c611d53565b34801561084f57600080fd5b5061039c61085e366004612f97565b611e3c565b34801561086f57600080fd5b5061039c61087e366004612f97565b611f45565b34801561088f57600080fd5b5061041e600c5481565b3480156108a557600080fd5b50610497611ff8565b3480156108ba57600080fd5b5061041e600d5481565b3480156108d057600080fd5b5060005461010090046001600160a01b03166103cd565b3480156108f357600080fd5b5061041e600b5481565b34801561090957600080fd5b506103cd7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561093d57600080fd5b5061036761094c366004612dec565b612022565b34801561095d57600080fd5b506005546103679060ff1681565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea9190612f7b565b610a0f5760405162461bcd60e51b8152600401610a06906132a0565b60405180910390fd5b610a18816120b1565b50565b6060806007600681805480602002602001604051908101604052809291908181526020018280548015610a7757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a59575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015610ac957602002820191906000526020600020905b815481526020019060010190808311610ab5575b50505050509050915091509091565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015610b1f57600080fd5b505afa158015610b33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b579190612f7b565b80610b665750610b6633612022565b610b825760405162461bcd60e51b8152600401610a0690613223565b610a18816120ef565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015610bd257600080fd5b505afa158015610be6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0a9190612f7b565b80610c195750610c1933612022565b610c355760405162461bcd60e51b8152600401610a0690613223565b610ca28484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080880282810182019093528782529093508792508691829185019084908082843760009201919091525061214192505050565b50505050565b604080516020810190915260008152600080600260019054906101000a90046001600160a01b03166001600160a01b03166357de26a46040518163ffffffff1660e01b8152600401604080518083038186803b158015610d0757600080fd5b505afa158015610d1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3f919061300c565b9150915080158015610d5b57506003546001600160a01b031615155b15610de057600354604080516315f789a960e21b815281516001600160a01b03909316926357de26a492600480840193919291829003018186803b158015610da257600080fd5b505afa158015610db6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dda919061300c565b90925090505b80610e2d5760405162461bcd60e51b815260206004820152601960248201527f4f7261636c655265663a206f7261636c6520696e76616c6964000000000000006044820152606401610a06565b6000806004541215610e6f57610e51600454600019610e4c9190613459565b61226a565b610e5c90600a6133b1565b9050610e6883826122c0565b9250610e94565b610e7a60045461226a565b610e8590600a6133b1565b9050610e9183826122f1565b92505b60055460ff1615610eab57610ea88361135b565b92505b509092915050565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015610efa57600080fd5b505afa158015610f0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f329190612f7b565b80610f415750610f4133612022565b610f5d5760405162461bcd60e51b8152600401610a0690613223565b610a1881612319565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015610fad57600080fd5b505afa158015610fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe59190612f7b565b8061106a5750600054604051630c68ba2160e01b81523360048201526101009091046001600160a01b031690630c68ba219060240160206040518083038186803b15801561103257600080fd5b505afa158015611046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106a9190612f7b565b6110865760405162461bcd60e51b8152600401610a06906131d6565b61108e6123a4565b565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b1580156110d757600080fd5b505afa1580156110eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110f9190612f7b565b8061111e575061111e33612022565b61113a5760405162461bcd60e51b8152600401610a0690613223565b610a1881612438565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b15801561118a57600080fd5b505afa15801561119e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c29190612f7b565b6111de5760405162461bcd60e51b8152600401610a06906132a0565b610a18816124c3565b6000806112046111ff846111f9610ca8565b906122f1565b612531565b90506000611210611ff8565b9050611220600b54600c54101590565b61127c576000600c54600b5461123691906134fb565b90508083111561127a57600061124c82856134fb565b90506112706111ff611260836111f9612548565b61126a86866122f1565b90612579565b9695505050505050565b505b6112896111ff82846122f1565b949350505050565b600061129e600854151590565b6112a85750600090565b6009546008546000906112bb90426134fb565b90508181116112ca57806112cc565b815b9250505090565b60006112dd611b23565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b15801561131e57600080fd5b505afa158015611332573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113569190613073565b905090565b6040805160208082018352600080835283518083018552528251908101909252670de0b6b3a764000082529061139190836125a3565b92915050565b6000600c54600f5461135691906134fb565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b1580156113f057600080fd5b505afa158015611404573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114289190612f7b565b6114445760405162461bcd60e51b8152600401610a06906132a0565b610a18816125d8565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b15801561149457600080fd5b505afa1580156114a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114cc9190612f7b565b6114e85760405162461bcd60e51b8152600401610a06906132a0565b6001600160a01b0381166115365760405162461bcd60e51b8152602060048201526015602482015274436f72655265663a207a65726f206164647265737360581b6044820152606401610a06565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f9209b7c8c06dcfd261686a663e7c55989337b18d59da5433c6f2835fb697092091a35050565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b1580156115d657600080fd5b505afa1580156115ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160e9190612f7b565b806116935750600054604051630c68ba2160e01b81523360048201526101009091046001600160a01b031690630c68ba219060240160206040518083038186803b15801561165b57600080fd5b505afa15801561166f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116939190612f7b565b6116af5760405162461bcd60e51b8152600401610a06906131d6565b61108e612688565b805182511461172e5760405162461bcd60e51b815260206004820152603a60248201527f50435653706c69747465723a20504356204465706f7369747320616e6420726160448201527f74696f732061726520646966666572656e74206c656e677468730000000000006064820152608401610a06565b6000805b82518110156117825782818151811061175b57634e487b7160e01b600052603260045260246000fd5b60200260200101518261176e9190613336565b91508061177a81613512565b915050611732565b5061271081146117e25760405162461bcd60e51b815260206004820152602560248201527f50435653706c69747465723a20726174696f7320646f206e6f7420746f74616c604482015264203130302560d81b6064820152608401610a06565b505050565b6000805460ff161561180b5760405162461bcd60e51b8152600401610a0690613276565b8134146118715760405162461bcd60e51b815260206004820152602e60248201527f426f6e64696e672043757276653a2053656e742076616c756520646f6573206e60448201526d1bdd08195c5d585b081a5b9c1d5d60921b6064820152608401610a06565b61187b82846126e0565b9392505050565b60008060019054906101000a90046001600160a01b03166001600160a01b0316639a9ba4da6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118d157600080fd5b505afa1580156118e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113569190612faf565b60005460ff161561192c5760405162461bcd60e51b8152600401610a0690613276565b47600061193e6111ff836111f9610ca8565b90506000612710600d548361195391906134dc565b61195d919061334e565b9050600a548110156119bb5760405162461bcd60e51b815260206004820152602160248201527f426f6e64696e6743757276653a204e6f7420656e6f756768205043562068656c6044820152601960fa1b6064820152608401610a06565b6119c4836127a9565b6119cc611b09565b156117e2576119d961288b565b6117e26128c1565b60006119eb611291565b60095461135691906134fb565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611a3f57600080fd5b505afa158015611a53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a779190612f7b565b80611a865750611a8633612022565b611aa25760405162461bcd60e51b8152600401610a0690613223565b6127108110611ac35760405162461bcd60e51b8152600401610a0690613183565b600d80549082905560408051828152602081018490527f5b7f5a981059c5b7203ad1e4e44a9dead0cb9e32211e9a716b14f0dd25c58a6391015b60405180910390a15050565b6000611b136119e1565b15919050565b60006112dd611882565b60008060019054906101000a90046001600160a01b03166001600160a01b031663b86677fe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118d157600080fd5b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611bb957600080fd5b505afa158015611bcd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf19190612f7b565b611c0d5760405162461bcd60e51b8152600401610a06906132a0565b600a80549082905560408051828152602081018490527f4a758599c8c3e7177b789a73842b398999af813d771bc71436fb5a6485e2ff569101611afd565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611c9257600080fd5b505afa158015611ca6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cca9190612f7b565b611ce65760405162461bcd60e51b8152600401610a06906132a0565b610a1881612951565b600260019054906101000a90046001600160a01b03166001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611d3f57600080fd5b505af1158015610ca2573d6000803e3d6000fd5b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611d9a57600080fd5b505afa158015611dae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd29190612f7b565b80611de15750611de133612022565b611dfd5760405162461bcd60e51b8152600401610a0690613223565b600c805460009091556040518181527f01c3cbb0d62726ab09d163873ebf9aed99dd8dc08e57bc938f458132fd178cf69060200160405180910390a150565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611e8357600080fd5b505afa158015611e97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebb9190612f7b565b80611eca5750611eca33612022565b611ee65760405162461bcd60e51b8152600401610a0690613223565b6127108110611f075760405162461bcd60e51b8152600401610a0690613183565b600e80549082905560408051828152602081018490527f8d6399dba354121c67302f1aec49781f433fee03625ebeab8a41dd4629623e6c9101611afd565b600054604051631c86b03760e31b81523360048201526101009091046001600160a01b03169063e43581b89060240160206040518083038186803b158015611f8c57600080fd5b505afa158015611fa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc49190612f7b565b80611fd35750611fd333612022565b611fef5760405162461bcd60e51b8152600401610a0690613223565b610a188161298a565b604080516020810190915260008152600b54600c541061201a57611356612548565b611356612a0c565b60008054600154604051632474521560e21b815260048101919091526001600160a01b038481166024830152610100909204909116906391d148549060440160206040518083038186803b15801561207957600080fd5b505afa15801561208d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113919190612f7b565b600480549082905560408051828152602081018490527fc45ec9015c033bb1ee553a67346dd851062dddce070a6dddb7616e5d7595bcc29101611afd565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f492cc1f8400b642b4e56de46ed10d314a49bf3e0594c43e2e5947c1e1733645b90600090a35050565b6000600780548060200260200160405190810160405280929190818152602001828054801561219957602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161217b575b50505050509050600060068054806020026020016040519081016040528092919081815260200182805480156121ee57602002820191906000526020600020905b8154815260200190600101908083116121da575b505050505090506121ff84846116b7565b8351612212906007906020870190612c82565b508251612226906006906020860190612ce3565b507fd19942fa2b63bf146274fb044e6814608b1a12a9470874520516c155bbb636068282868660405161225c949392919061312b565b60405180910390a150505050565b6000808212156122bc5760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610a06565b5090565b6040805160208101909152600081526040805160208101909152835181906122e89085612a32565b90529392505050565b6040805160208101909152600081526040805160208101909152835181906122e89085612a3e565b806123665760405162461bcd60e51b815260206004820152601860248201527f426f6e64696e6743757276653a207a65726f207363616c6500000000000000006044820152606401610a06565b600b80549082905560408051828152602081018490527f5d8fb83dfef1d60f4e331d65f09d4e8c8bc92cc69fbbfed7c227cb82b378d8369101611afd565b60005460ff166123ed5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a06565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b0390911681526020015b60405180910390a1565b806124855760405162461bcd60e51b815260206004820152601b60248201527f426f6e64696e6743757276653a207a65726f206d696e742063617000000000006044820152606401610a06565b600f80549082905560408051828152602081018490527f5dd7f8cf1549f54d6ce48041bbb9179089b5a74c3c600fcc3610abe72d2dc5549101611afd565b6005805482151560ff198216811790925560ff1690811515146124f8576124f86004546000196124f39190613459565b6120b1565b60408051821515815283151560208201527f16b9ae7ca814a6dfd3357b20f33bcc7c194676988d5da46846628da394df8ab39101611afd565b805160009061139190670de0b6b3a7640000612a32565b604080516020810190915260008152600d546127109061257390829061256e9082613336565b612a4a565b91505090565b60408051602081019091526000815260408051602081019091528251845182916122e89190612a77565b60408051602081019091526000815260405180602001604052806122e88560000151670de0b6b3a76400008660000151612a83565b6001600160a01b03811661262e5760405162461bcd60e51b815260206004820152601760248201527f4f7261636c655265663a207a65726f20616464726573730000000000000000006044820152606401610a06565b600280546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f93450534569bdbb3109b44eef77c9b236897f4caa4f201be10252d6462a5693790600090a35050565b60005460ff16156126ab5760405162461bcd60e51b8152600401610a0690613276565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861241a3390565b60006126ea611cef565b6126f3836111e7565b9050806126fe611397565b101561274c5760405162461bcd60e51b815260206004820152601e60248201527f426f6e64696e6743757276653a2065786365656473206d696e742063617000006044820152606401610a06565b61275581612a99565b61275f8282612aad565b60408051848152602081018390526001600160a01b038416917f12cb4648cf3058b17ceeb33e579f8b0bc269fe0843f3900b8e24b6c54871703c910160405180910390a292915050565b61271060005b60065481101561285157600082600683815481106127dd57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154856127f391906134dc565b6127fd919061334e565b905061283e816007848154811061282457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316612b24565b508061284981613512565b9150506127af565b5060405182815233907f249d8eb76d5a22983620d741de2470148d1a9a26ab923aec4262770690d11ebc9060200160405180910390a25050565b4260088190556040519081527fd1dbb2ce8081405078443ef34dae718285114121a39370b14ef01b9d2b0a20839060200161242e565b6000546040516355138f0d60e11b81523060048201526101009091046001600160a01b03169063aa271e1a9060240160206040518083038186803b15801561290857600080fd5b505afa15801561291c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129409190612f7b565b1561108e5761108e33600a54612aad565b6001805490829055604051829082907f29ddd278ef9169e35aa84e424b39048b89af9c0b50f85497e40f97dff6946cf590600090a35050565b806129ce5760405162461bcd60e51b81526020600482015260146024820152732a34b6b2b21d103d32b93790323ab930ba34b7b760611b6044820152606401610a06565b600980549082905560408051828152602081018490527f53356ce8408d6a56b0e61bcd41861e12eb5772987856f889e38e4aba4ffa104c9101611afd565b604080516020810190915260008152600e546127109061257390829061256e90826134fb565b600061187b828461334e565b600061187b82846134dc565b60408051602081019091526000815260405180602001604052806122e885670de0b6b3a764000086612a83565b600061187b8284613336565b600061128982612a938686612a3e565b90612a32565b80600c54612aa79190613336565b600c5550565b8015612b2057612abb611882565b6040516340c10f1960e01b81526001600160a01b0384811660048301526024820184905291909116906340c10f1990604401600060405180830381600087803b158015612b0757600080fd5b505af1158015612b1b573d6000803e3d6000fd5b505050505b5050565b612b2e8183612b69565b806001600160a01b031663d0e30db06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612b0757600080fd5b80471015612bb95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a06565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612c06576040519150601f19603f3d011682016040523d82523d6000602084013e612c0b565b606091505b50509050806117e25760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a06565b828054828255906000526020600020908101928215612cd7579160200282015b82811115612cd757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612ca2565b506122bc929150612d1e565b828054828255906000526020600020908101928215612cd7579160200282015b82811115612cd7578251825591602001919060010190612d03565b5b808211156122bc5760008155600101612d1f565b60008083601f840112612d44578182fd5b50813567ffffffffffffffff811115612d5b578182fd5b6020830191508360208260051b8501011115612d7657600080fd5b9250929050565b600082601f830112612d8d578081fd5b81356020612da2612d9d83613312565b6132e1565b80838252828201915082860187848660051b8901011115612dc1578586fd5b855b85811015612ddf57813584529284019290840190600101612dc3565b5090979650505050505050565b600060208284031215612dfd578081fd5b813561187b81613559565b60008060408385031215612e1a578081fd5b8235612e2581613559565b946020939093013593505050565b60008060008060408587031215612e48578182fd5b843567ffffffffffffffff80821115612e5f578384fd5b612e6b88838901612d33565b90965094506020870135915080821115612e83578384fd5b50612e9087828801612d33565b95989497509550505050565b60008060408385031215612eae578182fd5b823567ffffffffffffffff80821115612ec5578384fd5b818501915085601f830112612ed8578384fd5b81356020612ee8612d9d83613312565b8083825282820191508286018a848660051b8901011115612f07578889fd5b8896505b84871015612f32578035612f1e81613559565b835260019690960195918301918301612f0b565b5096505086013592505080821115612f48578283fd5b50612f5585828601612d7d565b9150509250929050565b600060208284031215612f70578081fd5b813561187b8161356e565b600060208284031215612f8c578081fd5b815161187b8161356e565b600060208284031215612fa8578081fd5b5035919050565b600060208284031215612fc0578081fd5b815161187b81613559565b600060208284031215612fdc578081fd5b6040516020810181811067ffffffffffffffff82111715612fff57612fff613543565b6040529135825250919050565b600080828403604081121561301f578283fd5b602081121561302c578283fd5b506040516020810181811067ffffffffffffffff8211171561305057613050613543565b6040528351815260208401519092506130688161356e565b809150509250929050565b600060208284031215613084578081fd5b5051919050565b6000815180845260208085019450808401835b838110156130c35781516001600160a01b03168752958201959082019060010161309e565b509495945050505050565b6000815180845260208085019450808401835b838110156130c3578151875295820195908201906001016130e1565b604081526000613110604083018561308b565b828103602084015261312281856130ce565b95945050505050565b60808152600061313e608083018761308b565b828103602084015261315081876130ce565b90508281036040840152613164818661308b565b9050828103606084015261317881856130ce565b979650505050505050565b60208082526033908201527f426f6e64696e6743757276653a204275666665722065786365656473206f72206040820152726d617463686573206772616e756c617269747960681b606082015260800190565b6020808252602d908201527f436f72655265663a2043616c6c6572206973206e6f742061206775617264696160408201526c371037b91033b7bb32b93737b960991b606082015260800190565b60208082526033908201527f436f72655265663a2043616c6c6572206973206e6f74206120676f7665726e6f604082015272391037b91031b7b73a3930b1ba1030b236b4b760691b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526021908201527f436f72655265663a2043616c6c6572206973206e6f74206120676f7665726e6f6040820152603960f91b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561330a5761330a613543565b604052919050565b600067ffffffffffffffff82111561332c5761332c613543565b5060051b60200190565b600082198211156133495761334961352d565b500190565b60008261336957634e487b7160e01b81526012600452602481fd5b500490565b600181815b808511156133a957816000190482111561338f5761338f61352d565b8085161561339c57918102915b93841c9390800290613373565b509250929050565b600061187b83836000826133c757506001611391565b816133d457506000611391565b81600181146133ea57600281146133f457613410565b6001915050611391565b60ff8411156134055761340561352d565b50506001821b611391565b5060208310610133831016604e8410600b8410161715613433575081810a611391565b61343d838361336e565b80600019048211156134515761345161352d565b029392505050565b60006001600160ff1b038184138284138082168684048611161561347f5761347f61352d565b600160ff1b8487128281168783058912161561349d5761349d61352d565b8587129250878205871284841616156134b8576134b861352d565b878505871281841616156134ce576134ce61352d565b505050929093029392505050565b60008160001904831182151516156134f6576134f661352d565b500290565b60008282101561350d5761350d61352d565b500390565b60006000198214156135265761352661352d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a1857600080fd5b8015158114610a1857600080fdfea2646970667358221220121e79bca45f4094ba01ec95fc446f55cbd225ee76aa3455bfab05f913721a9f64736f6c63430008040033

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

0000000000000000000000008d5ed43dca8c2f7dfb20cf7b53cc7e593635d7b9000000000000000000000000cd3c40ae1256922ba16c7872229385e20bc8351e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001518000000000000000000000000000000000000000000000001b1ae4d6e2ef50000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000020000000000000000000000005b86887e171bae0c2c826e87e34df8d558c079b90000000000000000000000004fcb1435fd42ce7ce7af3cb2e98289f79d2962b3000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000013880000000000000000000000000000000000000000000000000000000000001388

-----Decoded View---------------
Arg [0] : core (address): 0x8d5ED43dCa8C2F7dFB20CF7b53CC7E593635d7b9
Arg [1] : oracle (address): 0xCd3c40AE1256922BA16C7872229385E20Bc8351e
Arg [2] : backupOracle (address): 0x0000000000000000000000000000000000000000
Arg [3] : params (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
17 Constructor Arguments found :
Arg [0] : 0000000000000000000000008d5ed43dca8c2f7dfb20cf7b53cc7e593635d7b9
Arg [1] : 000000000000000000000000cd3c40ae1256922ba16c7872229385e20bc8351e
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [4] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000015180
Arg [8] : 00000000000000000000000000000000000000000000001b1ae4d6e2ef500000
Arg [9] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [12] : 0000000000000000000000005b86887e171bae0c2c826e87e34df8d558c079b9
Arg [13] : 0000000000000000000000004fcb1435fd42ce7ce7af3cb2e98289f79d2962b3
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [15] : 0000000000000000000000000000000000000000000000000000000000001388
Arg [16] : 0000000000000000000000000000000000000000000000000000000000001388


Deployed Bytecode Sourcemap

207:1696:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1691:90:17;;;;;;;;;;-1:-1:-1;1760:9:17;;:14;;1691:90;;;9882:14:32;;9875:22;9857:41;;9845:2;9830:18;1691:90:17;;;;;;;;2187:154:14;;;;;;;;;;-1:-1:-1;2187:154:14;;;;;:::i;:::-;;:::i;:::-;;3856:106:1;;;;;;;;;;-1:-1:-1;3949:5:1;3856:106;;;-1:-1:-1;;;;;8044:32:32;;;8026:51;;8014:2;7999:18;3856:106:1;7981:102:32;1664:155:10;;;;;;;;;;;;;:::i;:::-;;;;;;;;:::i;311:23:17:-;;;;;;;;;;;;;;;;;;;10328:25:32;;;10316:2;10301:18;311:23:17;10283:76:32;455:43:11;;;;;;;;;;;;;;;;2462:138:14;;;;;;;;;;-1:-1:-1;2462:138:14;;;;;:::i;:::-;;:::i;1873:189:10:-;;;;;;;;;;-1:-1:-1;1873:189:10;;;;;:::i;:::-;;:::i;3257:849:14:-;;;;;;;;;;;;;:::i;:::-;;;19789:13:32;;19771:32;;19759:2;19744:18;3257:849:14;19726:83:32;4257:110:1;;;;;;;;;;-1:-1:-1;4257:110:1;;;;;:::i;:::-;;:::i;3343:85:11:-;;;;;;;;;;;;;:::i;5686:114:1:-;;;;;;;;;;-1:-1:-1;5686:114:1;;;;;:::i;:::-;;:::i;4082:117::-;;;;;;;;;;-1:-1:-1;4082:117:1;;;1662:21:2;11883:25:32;;4145:7:1;11939:2:32;11924:18;;11917:34;11856:18;4082:117:1;11838:119:32;1957:112:14;;;;;;;;;;-1:-1:-1;1957:112:14;;;;;:::i;:::-;;:::i;7740:886:1:-;;;;;;;;;;-1:-1:-1;7740:886:1;;;;;:::i;:::-;;:::i;1041:84:20:-;;;;;;;;;;-1:-1:-1;1088:4:20;1111:7;;;1041:84;;1342:343:17;;;;;;;;;;;;;:::i;4300:119:11:-;;;;;;;;;;;;;:::i;1118:32:1:-;;;;;;;;;;;;;;;;2781:178:14;;;;;;;;;;-1:-1:-1;2781:178:14;;;;;:::i;:::-;;:::i;819:41::-;;;;;;;;;;;;;;;;6878:114:1;;;;;;;;;;;;;:::i;1232:31::-;;;;;;;;;;;;;;;;231:24:17;;;;;;;;;;;;;;;;1723:107:14;;;;;;;;;;-1:-1:-1;1723:107:14;;;;;:::i;:::-;;:::i;574:30::-;;;;;;;;;;-1:-1:-1;574:30:14;;;;;;;-1:-1:-1;;;;;574:30:14;;;2453:254:11;;;;;;;;;;-1:-1:-1;2453:254:11;;;;;:::i;:::-;;:::i;671:36:14:-;;;;;;;;;;-1:-1:-1;671:36:14;;;;-1:-1:-1;;;;;671:36:14;;;3207:81:11;;;;;;;;;;;;;:::i;1056:538:10:-;;;;;;;;;;-1:-1:-1;1056:538:10;;;;;:::i;:::-;;:::i;1164:331:2:-;;;;;;:::i;:::-;;:::i;3730:86:11:-;;;;;;;;;;;;;:::i;6710:102:1:-;;;;;;;;;;-1:-1:-1;6800:5:1;;6782:14;;:23;;6710:102;;5846:790;;;;;;;;;;;;;:::i;1032:161:17:-;;;;;;;;;;;;;:::i;4654:350:1:-;;;;;;;;;;-1:-1:-1;4654:350:1;;;;;:::i;:::-;;:::i;845:94:17:-;;;;;;;;;;;;;:::i;4103:115:11:-;;;;;;;;;;;;;:::i;1587:103:2:-;;;;;;;;;;-1:-1:-1;1662:21:2;1587:103;;3933:92:11;;;;;;;;;;;;;:::i;289:30:16:-;;;;;;;;;;;;;;;;596:253;;;;;;;;;;-1:-1:-1;596:253:16;;;;;:::i;:::-;;:::i;2769:151:11:-;;;;;;;;;;-1:-1:-1;2769:151:11;;;;;:::i;:::-;;:::i;3011:72:14:-;;;;;;;;;;;;;:::i;4415:181:1:-;;;;;;;;;;;;;:::i;5064:370::-;;;;;;;;;;-1:-1:-1;5064:370:1;;;;;:::i;:::-;;:::i;5494:130::-;;;;;;;;;;-1:-1:-1;5494:130:1;;;;;:::i;:::-;;:::i;883:38::-;;;;;;;;;;;;;;;;7199:249;;;;;;;;;;;;;:::i;1010:30::-;;;;;;;;;;;;;;;;3535:82:11;;;;;;;;;;-1:-1:-1;3581:5:11;3605;;;;-1:-1:-1;;;;;3605:5:11;3535:82;;680:29:1;;;;;;;;;;;;;;;;771:38;;;;;;;;;;;;;;;3011:143:11;;;;;;;;;;-1:-1:-1;3011:143:11;;;;;:::i;:::-;;:::i;867:29:14:-;;;;;;;;;;-1:-1:-1;867:29:14;;;;;;;;2187:154;1898:5:11;;:28;;-1:-1:-1;;;1898:28:11;;1915:10;1898:28;;;8026:51:32;1898:5:11;;;;-1:-1:-1;;;;;1898:5:11;;:16;;7999:18:32;;1898:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1877:108;;;;-1:-1:-1;;;1877:108:11;;;;;;;:::i;:::-;;;;;;;;;2289:45:14::1;2312:21;2289:22;:45::i;:::-;2187:154:::0;:::o;1664:155:10:-;1734:16;1752;1792:11;1805:6;1784:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1784:28:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1664:155;;:::o;2462:138:14:-;1671:5:11;;:28;;-1:-1:-1;;;1671:28:11;;1688:10;1671:28;;;8026:51:32;1671:5:11;;;;-1:-1:-1;;;;;1671:5:11;;:16;;7999:18:32;;1671:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;;;;1715:27;1731:10;1715:15;:27::i;:::-;1650:169;;;;-1:-1:-1;;;1650:169:11;;;;;;;:::i;:::-;2560:33:14::1;2577:15;2560:16;:33::i;1873:189:10:-:0;1671:5:11;;:28;;-1:-1:-1;;;1671:28:11;;1688:10;1671:28;;;8026:51:32;1671:5:11;;;;-1:-1:-1;;;;;1671:5:11;;:16;;7999:18:32;;1671:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;;;;1715:27;1731:10;1715:15;:27::i;:::-;1650:169;;;;-1:-1:-1;;;1650:169:11;;;;;;;:::i;:::-;2018:37:10::1;2033:12;;2018:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;;2018:37:10::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;;;;;;;;-1:-1:-1;2047:7:10;;-1:-1:-1;2047:7:10;;;;2018:37;::::1;::::0;2047:7;;2018:37;2047:7;2018:37;::::1;;::::0;::::1;::::0;;;;-1:-1:-1;2018:14:10::1;::::0;-1:-1:-1;;;2018:37:10:i:1;:::-;1873:189:::0;;;;:::o;3257:849:14:-;-1:-1:-1;;;;;;;;;;;;3341:24:14;3367:10;3381:6;;;;;;;;;-1:-1:-1;;;;;3381:6:14;-1:-1:-1;;;;;3381:11:14;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3340:54;;;;3409:5;3408:6;:45;;;;-1:-1:-1;3426:12:14;;-1:-1:-1;;;;;3426:12:14;3418:35;;3408:45;3404:111;;;3485:12;;:19;;;-1:-1:-1;;;3485:19:14;;;;-1:-1:-1;;;;;3485:12:14;;;;:17;;:19;;;;;;;;;;;;;:12;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3469:35;;-1:-1:-1;3469:35:14;-1:-1:-1;3404:111:14;3532:5;3524:43;;;;-1:-1:-1;;;3524:43:14;;16373:2:32;3524:43:14;;;16355:21:32;16412:2;16392:18;;;16385:30;16451:27;16431:18;;;16424:55;16496:18;;3524:43:14;16345:175:32;3524:43:14;3649:21;3705:1;3684:18;;:22;3680:283;;;3744:37;3750:18;;-1:-1:-1;;3745:23:14;;;;:::i;:::-;3744:35;:37::i;:::-;3738:43;;:2;:43;:::i;:::-;3722:59;-1:-1:-1;3802:23:14;:4;3722:59;3802:8;:23::i;:::-;3795:30;;3680:283;;;3878:30;:18;;:28;:30::i;:::-;3872:36;;:2;:36;:::i;:::-;3856:52;-1:-1:-1;3929:23:14;:4;3856:52;3929:8;:23::i;:::-;3922:30;;3680:283;4025:8;;;;4021:58;;;4056:12;4063:4;4056:6;:12::i;:::-;4049:19;;4021:58;-1:-1:-1;4095:4:14;;3257:849;-1:-1:-1;;3257:849:14:o;4257:110:1:-;1671:5:11;;:28;;-1:-1:-1;;;1671:28:11;;1688:10;1671:28;;;8026:51:32;1671:5:11;;;;-1:-1:-1;;;;;1671:5:11;;:16;;7999:18:32;;1671:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;;;;1715:27;1731:10;1715:15;:27::i;:::-;1650:169;;;;-1:-1:-1;;;1650:169:11;;;;;;;:::i;:::-;4341:19:1::1;4351:8;4341:9;:19::i;3343:85:11:-:0;2074:5;;:28;;-1:-1:-1;;;2074:28:11;;2091:10;2074:28;;;8026:51:32;2074:5:11;;;;-1:-1:-1;;;;;2074:5:11;;:16;;7999:18:32;;2074:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:73;;;-1:-1:-1;2119:5:11;;:28;;-1:-1:-1;;;2119:28:11;;2136:10;2119:28;;;8026:51:32;2119:5:11;;;;-1:-1:-1;;;;;2119:5:11;;:16;;7999:18:32;;2119:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2053:165;;;;-1:-1:-1;;;2053:165:11;;;;;;;:::i;:::-;3411:10:::1;:8;:10::i;:::-;3343:85::o:0;5686:114:1:-;1671:5:11;;:28;;-1:-1:-1;;;1671:28:11;;1688:10;1671:28;;;8026:51:32;1671:5:11;;;;-1:-1:-1;;;;;1671:5:11;;:16;;7999:18:32;;1671:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;;;;1715:27;1731:10;1715:15;:27::i;:::-;1650:169;;;;-1:-1:-1;;;1650:169:11;;;;;;;:::i;:::-;5772:21:1::1;5784:8;5772:11;:21::i;1957:112:14:-:0;1898:5:11;;:28;;-1:-1:-1;;;1898:28:11;;1915:10;1898:28;;;8026:51:32;1898:5:11;;;;-1:-1:-1;;;;;1898:5:11;;:16;;7999:18:32;;1898:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1877:108;;;;-1:-1:-1;;;1877:108:11;;;;;;;:::i;:::-;2037:25:14::1;2050:11;2037:12;:25::i;7740:886:1:-:0;7842:17;7920:26;7949:38;:26;7966:8;7949:12;:10;:12::i;:::-;:16;;:26::i;:::-;:36;:38::i;:::-;7920:67;;7998:25;8026:17;:15;:17::i;:::-;7998:45;;8059:9;6800:5;;6782:14;;:23;;;6710:102;8059:9;8054:502;;8084:22;8117:14;;8109:5;;:22;;;;:::i;:::-;8084:47;;8201:14;8180:18;:35;8176:370;;;8235:23;8261:35;8282:14;8261:18;:35;:::i;:::-;8235:61;;8445:86;:74;8475:43;8502:15;8475:22;:20;:22::i;:43::-;8445:25;:5;8455:14;8445:9;:25::i;:::-;:29;;:74::i;:86::-;8438:93;7740:886;-1:-1:-1;;;;;;7740:886:1:o;8176:370::-;8054:502;;8578:41;:29;:5;8588:18;8578:9;:29::i;:41::-;8566:53;7740:886;-1:-1:-1;;;;7740:886:1:o;1342:343:17:-;1389:7;1413:15;1760:9;;:14;;;1691:90;1413:15;1408:72;;-1:-1:-1;1451:1:17;;1342:343::o;1408:72::-;1509:8;;1566:9;;1489:17;;1548:27;;:15;:27;:::i;:::-;1527:48;;1644:9;1631:10;:22;:47;;1668:10;1631:47;;;1656:9;1631:47;1624:54;;;;1342:343;:::o;4300:119:11:-;4354:7;4380;:5;:7::i;:::-;:32;;-1:-1:-1;;;4380:32:11;;4406:4;4380:32;;;8026:51:32;-1:-1:-1;;;;;4380:17:11;;;;;;;7999:18:32;;4380:32:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4373:39;;4300:119;:::o;2781:178:14:-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;1348:21:6;;;;;;;;993:6;1348:21;;-1:-1:-1;2928:24:14;;2946:5;2928:17;:24::i;:::-;2921:31;2781:178;-1:-1:-1;;2781:178:14:o;6878:114:1:-;6935:7;6971:14;;6961:7;;:24;;;;:::i;1723:107:14:-;1898:5:11;;:28;;-1:-1:-1;;;1898:28:11;;1915:10;1898:28;;;8026:51:32;1898:5:11;;;;-1:-1:-1;;;;;1898:5:11;;:16;;7999:18:32;;1898:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1877:108;;;;-1:-1:-1;;;1877:108:11;;;;;;;:::i;:::-;1802:21:14::1;1813:9;1802:10;:21::i;2453:254:11:-:0;1898:5;;:28;;-1:-1:-1;;;1898:28:11;;1915:10;1898:28;;;8026:51:32;1898:5:11;;;;-1:-1:-1;;;;;1898:5:11;;:16;;7999:18:32;;1898:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1877:108;;;;-1:-1:-1;;;1877:108:11;;;;;;;:::i;:::-;-1:-1:-1;;;;;2536:21:11;::::1;2528:55;;;::::0;-1:-1:-1;;;2528:55:11;;17544:2:32;2528:55:11::1;::::0;::::1;17526:21:32::0;17583:2;17563:18;;;17556:30;-1:-1:-1;;;17602:18:32;;;17595:51;17663:18;;2528:55:11::1;17516:171:32::0;2528:55:11::1;2593:15;2619:5:::0;;-1:-1:-1;;;;;2635:22:11;;::::1;2619:5;2635:22:::0;;::::1;-1:-1:-1::0;;;;;;2635:22:11;::::1;;::::0;;2672:28:::1;::::0;2619:5;::::1;::::0;;;::::1;::::0;2635:22;;2619:5;;2672:28:::1;::::0;::::1;1995:1;2453:254:::0;:::o;3207:81::-;2074:5;;:28;;-1:-1:-1;;;2074:28:11;;2091:10;2074:28;;;8026:51:32;2074:5:11;;;;-1:-1:-1;;;;;2074:5:11;;:16;;7999:18:32;;2074:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:73;;;-1:-1:-1;2119:5:11;;:28;;-1:-1:-1;;;2119:28:11;;2136:10;2119:28;;;8026:51:32;2119:5:11;;;;-1:-1:-1;;;;;2119:5:11;;:16;;7999:18:32;;2119:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2053:165;;;;-1:-1:-1;;;2053:165:11;;;;;;;:::i;:::-;3273:8:::1;:6;:8::i;1056:538:10:-:0;1226:7;:14;1203:12;:19;:37;1182:142;;;;-1:-1:-1;;;1182:142:10;;19356:2:32;1182:142:10;;;19338:21:32;19395:2;19375:18;;;19368:30;19434:34;19414:18;;;19407:62;19505:28;19485:18;;;19478:56;19551:19;;1182:142:10;19328:248:32;1182:142:10;1335:13;1363:9;1358:92;1378:7;:14;1374:1;:18;1358:92;;;1429:7;1437:1;1429:10;;;;;;-1:-1:-1;;;1429:10:10;;;;;;;;;;;;;;;1421:5;:18;;;;:::i;:::-;1413:26;-1:-1:-1;1394:3:10;;;;:::i;:::-;;;;1358:92;;;;279:6:0;1481:5:10;:43;1460:127;;;;-1:-1:-1;;;1460:127:10;;12513:2:32;1460:127:10;;;12495:21:32;12552:2;12532:18;;;12525:30;12591:34;12571:18;;;12564:62;-1:-1:-1;;;12642:18:32;;;12635:35;12687:19;;1460:127:10;12485:227:32;1460:127:10;1056:538;;;:::o;1164:331:2:-;1301:17;1111:7:20;;;;1354:9;1346:38;;;;-1:-1:-1;;;1346:38:20;;;;;;;:::i;:::-;1368:8:2::1;1355:9;:21;1334:114;;;::::0;-1:-1:-1;;;1334:114:2;;17129:2:32;1334:114:2::1;::::0;::::1;17111:21:32::0;17168:2;17148:18;;;17141:30;17207:34;17187:18;;;17180:62;-1:-1:-1;;;17258:18:32;;;17251:44;17312:19;;1334:114:2::1;17101:236:32::0;1334:114:2::1;1465:23;1475:8;1485:2;1465:9;:23::i;:::-;1458:30:::0;1164:331;-1:-1:-1;;;1164:331:2:o;3730:86:11:-;3775:4;3798:5;;;;;;;;;-1:-1:-1;;;;;3798:5:11;-1:-1:-1;;;;;3798:9:11;;:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;5846:790:1:-;1088:4:20;1111:7;;;1354:9;1346:38;;;;-1:-1:-1;;;1346:38:20;;;;;;;:::i;:::-;1662:21:2;5908:14:1::1;5967:36;:24;1662:21:2::0;5967:12:1::1;:10;:12::i;:36::-;5944:59;;6135:15;279:6:0;6168::1;;6153:12;:21;;;;:::i;:::-;:58;;;;:::i;:::-;6135:76;;6374:15;;6363:7;:26;;6355:72;;;::::0;-1:-1:-1;;;6355:72:1;;16727:2:32;6355:72:1::1;::::0;::::1;16709:21:32::0;16766:2;16746:18;;;16739:30;16805:34;16785:18;;;16778:62;-1:-1:-1;;;16856:18:32;;;16849:31;16897:19;;6355:72:1::1;16699:223:32::0;6355:72:1::1;6438:17;6448:6;6438:9;:17::i;:::-;6534:13;:11;:13::i;:::-;6530:100;;;6563:12;:10;:12::i;:::-;6605:14;:12;:14::i;1032:161:17:-:0;1078:7;1115:16;:14;:16::i;:::-;1104:8;;:27;;;;:::i;4654:350:1:-;1671:5:11;;:28;;-1:-1:-1;;;1671:28:11;;1688:10;1671:28;;;8026:51:32;1671:5:11;;;;-1:-1:-1;;;;;1671:5:11;;:16;;7999:18:32;;1671:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;;;;1715:27;1731:10;1715:15;:27::i;:::-;1650:169;;;;-1:-1:-1;;;1650:169:11;;;;;;;:::i;:::-;279:6:0::1;4761:9:1;:46;4740:144;;;;-1:-1:-1::0;;;4740:144:1::1;;;;;;;:::i;:::-;4914:6;::::0;;4930:18;;;;4963:34:::1;::::0;;11883:25:32;;;11939:2;11924:18;;11917:34;;;4963::1::1;::::0;11856:18:32;4963:34:1::1;;;;;;;;1829:1:11;4654:350:1::0;:::o;845:94:17:-;889:4;912:15;:13;:15::i;:::-;:20;;845:94;-1:-1:-1;845:94:17:o;4103:115:11:-;4155:7;4181:5;:3;:5::i;3933:92::-;3980:6;4005:5;;;;;;;;;-1:-1:-1;;;;;4005:5:11;-1:-1:-1;;;;;4005:11:11;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;596:253:16;1898:5:11;;:28;;-1:-1:-1;;;1898:28:11;;1915:10;1898:28;;;8026:51:32;1898:5:11;;;;-1:-1:-1;;;;;1898:5:11;;:16;;7999:18:32;;1898:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1877:108;;;;-1:-1:-1;;;1877:108:11;;;;;;;:::i;:::-;711:15:16::1;::::0;;736:36;;;;787:55:::1;::::0;;11883:25:32;;;11939:2;11924:18;;11917:34;;;787:55:16::1;::::0;11856:18:32;787:55:16::1;11838:119:32::0;2769:151:11;1898:5;;:28;;-1:-1:-1;;;1898:28:11;;1915:10;1898:28;;;8026:51:32;1898:5:11;;;;-1:-1:-1;;;;;1898:5:11;;:16;;7999:18:32;;1898:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1877:108;;;;-1:-1:-1;;;1877:108:11;;;;;;;:::i;:::-;2870:43:::1;2892:20;2870:21;:43::i;3011:72:14:-:0;3061:6;;;;;;;;;-1:-1:-1;;;;;3061:6:14;-1:-1:-1;;;;;3061:13:14;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4415:181:1;1671:5:11;;:28;;-1:-1:-1;;;1671:28:11;;1688:10;1671:28;;;8026:51:32;1671:5:11;;;;-1:-1:-1;;;;;1671:5:11;;:16;;7999:18:32;;1671:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;;;;1715:27;1731:10;1715:15;:27::i;:::-;1650:169;;;;-1:-1:-1;;;1650:169:11;;;;;;;:::i;:::-;4508:14:1::1;::::0;;4480:25:::1;4532:18:::0;;;4565:24:::1;::::0;10328:25:32;;;4565:24:1::1;::::0;10316:2:32;10301:18;4565:24:1::1;;;;;;;1829:1:11;4415:181:1:o:0;5064:370::-;1671:5:11;;:28;;-1:-1:-1;;;1671:28:11;;1688:10;1671:28;;;8026:51:32;1671:5:11;;;;-1:-1:-1;;;;;1671:5:11;;:16;;7999:18:32;;1671:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;;;;1715:27;1731:10;1715:15;:27::i;:::-;1650:169;;;;-1:-1:-1;;;1650:169:11;;;;;;;:::i;:::-;279:6:0::1;5175:11:1;:48;5154:146;;;;-1:-1:-1::0;;;5154:146:1::1;;;;;;;:::i;:::-;5332:8;::::0;;5350:22;;;;5387:40:::1;::::0;;11883:25:32;;;11939:2;11924:18;;11917:34;;;5387:40:1::1;::::0;11856:18:32;5387:40:1::1;11838:119:32::0;5494:130:1;1671:5:11;;:28;;-1:-1:-1;;;1671:28:11;;1688:10;1671:28;;;8026:51:32;1671:5:11;;;;-1:-1:-1;;;;;1671:5:11;;:16;;7999:18:32;;1671:28:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;;;;1715:27;1731:10;1715:15;:27::i;:::-;1650:169;;;;-1:-1:-1;;;1650:169:11;;;;;;;:::i;:::-;5593:24:1::1;5606:10;5593:12;:24::i;7199:249::-:0;-1:-1:-1;;;;;;;;;;;;6800:5:1;;6782:14;;:23;7323:69;;7359:22;:20;:22::i;7323:69::-;7408:33;:31;:33::i;3011:143:11:-;3082:4;3105:5;;;3119:19;3105:42;;-1:-1:-1;;;3105:42:11;;;;;10538:25:32;;;;-1:-1:-1;;;;;10599:32:32;;;10579:18;;;10572:60;3105:5:11;;;;;;;;:13;;10511:18:32;;3105:42:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;4969:274:14:-;5081:18;;;5109:42;;;;5166:70;;;11883:25:32;;;11939:2;11924:18;;11917:34;;;5166:70:14;;11856:18:32;5166:70:14;11838:119:32;4415:240:14;4519:12;;;-1:-1:-1;;;;;4542:39:14;;;-1:-1:-1;;;;;;4542:39:14;;;;;;;4596:52;;4519:12;;;4542:39;4519:12;;4596:52;;4485:23;;4596:52;4415:240;;:::o;2547:417:10:-;2669:32;2704:11;2669:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2669:46:10;;;;;;;;;;;;;;;;;;;;;;;2725:27;2755:6;2725:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2772:38;2788:12;2802:7;2772:15;:38::i;:::-;2821:26;;;;:11;;:26;;;;;:::i;:::-;-1:-1:-1;2857:16:10;;;;:6;;:16;;;;;:::i;:::-;;2889:68;2906:15;2923:10;2935:12;2949:7;2889:68;;;;;;;;;:::i;:::-;;;;;;;;2547:417;;;;:::o;4284:168:29:-;4340:7;4376:1;4367:5;:10;;4359:55;;;;-1:-1:-1;;;4359:55:29;;16012:2:32;4359:55:29;;;15994:21:32;;;16031:18;;;16024:30;16090:34;16070:18;;;16063:62;16142:18;;4359:55:29;15984:182:32;4359:55:29;-1:-1:-1;4439:5:29;4284:168::o;2548:174:6:-;-1:-1:-1;;;;;;;;;;;;2681:34:6;;;;;;;;;2695:10;;2681:34;;2695:17;;2710:1;2695:14;:17::i;:::-;2681:34;;2674:41;2548:174;-1:-1:-1;;;2548:174:6:o;2368:::-;-1:-1:-1;;;;;;;;;;;;2501:34:6;;;;;;;;;2515:10;;2501:34;;2515:17;;2530:1;2515:14;:17::i;9236:220:1:-;9300:13;9292:50;;;;-1:-1:-1;;;9292:50:1;;14529:2:32;9292:50:1;;;14511:21:32;14568:2;14548:18;;;14541:30;14607:26;14587:18;;;14580:54;14651:18;;9292:50:1;14501:174:32;9292:50:1;9372:5;;;9387:16;;;;9418:31;;;11883:25:32;;;11939:2;11924:18;;11917:34;;;9418:31:1;;11856:18:32;9418:31:1;11838:119:32;2053:117:20;1088:4;1111:7;;;1612:41;;;;-1:-1:-1;;;1612:41:20;;12164:2:32;1612:41:20;;;12146:21:32;12203:2;12183:18;;;12176:30;-1:-1:-1;;;12222:18:32;;;12215:50;12282:18;;1612:41:20;12136:170:32;1612:41:20;2121:5:::1;2111:15:::0;;-1:-1:-1;;2111:15:20::1;::::0;;2141:22:::1;666:10:25::0;2150:12:20::1;2141:22;::::0;-1:-1:-1;;;;;8044:32:32;;;8026:51;;8014:2;7999:18;2141:22:20::1;;;;;;;;2053:117::o:0;9462:244:1:-;9530:15;9522:55;;;;-1:-1:-1;;;9522:55:1;;14173:2:32;9522:55:1;;;14155:21:32;14212:2;14192:18;;;14185:30;14251:29;14231:18;;;14224:57;14298:18;;9522:55:1;14145:177:32;9522:55:1;9609:7;;;9626:20;;;;9662:37;;;11883:25:32;;;11939:2;11924:18;;11917:34;;;9662:37:1;;11856:18:32;9662:37:1;11838:119:32;4661:302:14;4739:8;;;4757:22;;;-1:-1:-1;;4757:22:14;;;;;;;4739:8;;;4802:26;;;;4798:105;;4844:48;4873:18;;-1:-1:-1;;4868:23:14;;;;:::i;:::-;4844:22;:48::i;:::-;4918:38;;;10096:14:32;;10089:22;10071:41;;10155:14;;10148:22;10143:2;10128:18;;10121:50;4918:38:14;;10044:18:32;4918:38:14;10026:151:32;4891:113:6;4977:10;;4951:7;;4977:20;;993:6;4977:14;:20::i;10190:273:1:-;-1:-1:-1;;;;;;;;;;;;10449:6:1;;279::0;;10408:48:1;;279:6:0;;10435:20:1;;279:6:0;10435:20:1;:::i;:::-;10408:13;:48::i;:::-;10401:55;;;10190:273;:::o;3084:184:6:-;-1:-1:-1;;;;;;;;;;;;3221:40:6;;;;;;;;;3250:7;;3235:10;;3221:40;;3235:23;;:10;:14;:23::i;3896:198::-;-1:-1:-1;;;;;;;;;;;;4033:54:6;;;;;;;;4047:37;4058:4;:10;;;993:6;4076:1;:7;;;4047:10;:37::i;4112:255:14:-;-1:-1:-1;;;;;4178:23:14;;4170:59;;;;-1:-1:-1;;;4170:59:14;;18296:2:32;4170:59:14;;;18278:21:32;18335:2;18315:18;;;18308:30;18374:25;18354:18;;;18347:53;18417:18;;4170:59:14;18268:173:32;4170:59:14;4267:6;;;-1:-1:-1;;;;;4284:27:14;;;4267:6;4284:27;;;-1:-1:-1;;;;;;4284:27:14;;;;;;4326:34;;4267:6;;;;;;;;4326:34;;4239:17;;4326:34;4112:255;;:::o;1806:115:20:-;1088:4;1111:7;;;1354:9;1346:38;;;;-1:-1:-1;;;1346:38:20;;;;;;;:::i;:::-;1865:7:::1;:14:::0;;-1:-1:-1;;1865:14:20::1;1875:4;1865:14;::::0;;1894:20:::1;1901:12;666:10:25::0;;587:96;8687:421:1;8770:17;8803:14;:12;:14::i;:::-;8840:22;8853:8;8840:12;:22::i;:::-;8828:34;;8902:9;8881:17;:15;:17::i;:::-;:30;;8873:73;;;;-1:-1:-1;;;8873:73:1;;18648:2:32;8873:73:1;;;18630:21:32;18687:2;18667:18;;;18660:30;18726:32;18706:18;;;18699:60;18776:18;;8873:73:1;18620:180:32;8873:73:1;8957:35;8982:9;8957:24;:35::i;:::-;9002:23;9011:2;9015:9;9002:8;:23::i;:::-;9041:33;;;11883:25:32;;;11939:2;11924:18;;11917:34;;;-1:-1:-1;;;;;9041:33:1;;;;;11856:18:32;9041:33:1;;;;;;;8687:421;;;;:::o;3099:333:10:-;279:6:0;3152:19:10;3218:166;3238:6;:13;3234:17;;3218:166;;;3272:14;3309:11;3297:6;3304:1;3297:9;;;;;;-1:-1:-1;;;3297:9:10;;;;;;;;;;;;;;;;;3289:5;:17;;;;:::i;:::-;:31;;;;:::i;:::-;3272:48;;3334:39;3350:6;3358:11;3370:1;3358:14;;;;;;-1:-1:-1;;;3358:14:10;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3358:14:10;3334:15;:39::i;:::-;-1:-1:-1;3253:3:10;;;;:::i;:::-;;;;3218:166;;;-1:-1:-1;3398:27:10;;10328:25:32;;;3407:10:10;;3398:27;;10316:2:32;10301:18;3398:27:10;;;;;;;3099:333;;:::o;1787:126:17:-;1840:15;1828:9;:27;;;1879;;10328:25:32;;;1879:27:17;;10316:2:32;10301:18;1879:27:17;10283:76:32;984:100:16;1106:5:11;;:29;;-1:-1:-1;;;1106:29:11;;1129:4;1106:29;;;8026:51:32;1106:5:11;;;;-1:-1:-1;;;;;1106:5:11;;:14;;7999:18:32;;1106:29:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1102:61;;;1040:37:16::1;1049:10;1061:15;;1040:8;:37::i;4654:271:11:-:0;4765:19;;;4794:42;;;;4851:67;;4816:20;;4765:19;;4851:67;;4734:28;;4851:67;4654:271;;:::o;1919:246:17:-;1989:16;1981:49;;;;-1:-1:-1;;;1981:49:17;;19007:2:32;1981:49:17;;;18989:21:32;19046:2;19026:18;;;19019:30;-1:-1:-1;;;19065:18:32;;;19058:50;19125:18;;1981:49:17;18979:170:32;1981:49:17;2063:8;;;2081:22;;;;2118:40;;;11883:25:32;;;11939:2;11924:18;;11917:34;;;2118:40:17;;11856:18:32;2118:40:17;11838:119:32;9781:330:1;-1:-1:-1;;;;;;;;;;;;10095:8:1;;279:6:0;;10054:50:1;;279:6:0;;10081:22:1;;279:6:0;10081:22:1;:::i;3767:96:30:-;3825:7;3851:5;3855:1;3851;:5;:::i;3382:96::-;3440:7;3466:5;3470:1;3466;:5;:::i;1531:174:6:-;-1:-1:-1;;;;;;;;;;;;1659:39:6;;;;;;;;1673:22;1684:1;993:6;1693:1;1673:10;:22::i;2672:96:30:-;2730:7;2756:5;2760:1;2756;:5;:::i;5057:215:6:-;5197:7;5227:38;5253:11;5227:21;:6;5238:9;5227:10;:21::i;:::-;:25;;:38::i;9114:116:1:-;9217:6;9200:14;;:23;;;;:::i;:::-;9183:14;:40;-1:-1:-1;9114:116:1:o;4505:143:11:-;4582:11;;4578:64;;4609:5;:3;:5::i;:::-;:22;;-1:-1:-1;;;4609:22:11;;-1:-1:-1;;;;;8280:32:32;;;4609:22:11;;;8262:51:32;8329:18;;;8322:34;;;4609:10:11;;;;;;;8235:18:32;;4609:22:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4578:64;4505:143;;:::o;1696:205:2:-;1805:46;1831:10;1844:6;1805:17;:46::i;:::-;1873:10;-1:-1:-1;;;;;1861:31:2;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2012:312:24;2126:6;2101:21;:31;;2093:73;;;;-1:-1:-1;;;2093:73:24;;15309:2:32;2093:73:24;;;15291:21:32;15348:2;15328:18;;;15321:30;15387:31;15367:18;;;15360:59;15436:18;;2093:73:24;15281:179:32;2093:73:24;2178:12;2196:9;-1:-1:-1;;;;;2196:14:24;2218:6;2196:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2177:52;;;2247:7;2239:78;;;;-1:-1:-1;;;2239:78:24;;14882:2:32;2239:78:24;;;14864:21:32;14921:2;14901:18;;;14894:30;14960:34;14940:18;;;14933:62;15031:28;15011:18;;;15004:56;15077:19;;2239:78:24;14854:248:32;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14:395:32;77:8;87:6;141:3;134:4;126:6;122:17;118:27;108:2;;166:8;156;149:26;108:2;-1:-1:-1;196:20:32;;239:18;228:30;;225:2;;;278:8;268;261:26;225:2;322:4;314:6;310:17;298:29;;382:3;375:4;365:6;362:1;358:14;350:6;346:27;342:38;339:47;336:2;;;399:1;396;389:12;336:2;98:311;;;;;:::o;414:693::-;468:5;521:3;514:4;506:6;502:17;498:27;488:2;;543:5;536;529:20;488:2;583:6;570:20;609:4;633:60;649:43;689:2;649:43;:::i;:::-;633:60;:::i;:::-;715:3;739:2;734:3;727:15;767:2;762:3;758:12;751:19;;802:2;794:6;790:15;854:3;849:2;843;840:1;836:10;828:6;824:23;820:32;817:41;814:2;;;875:5;868;861:20;814:2;901:5;915:163;929:2;926:1;923:9;915:163;;;986:17;;974:30;;1024:12;;;;1056;;;;947:1;940:9;915:163;;;-1:-1:-1;1096:5:32;;478:629;-1:-1:-1;;;;;;;478:629:32:o;1112:257::-;1171:6;1224:2;1212:9;1203:7;1199:23;1195:32;1192:2;;;1245:6;1237;1230:22;1192:2;1289:9;1276:23;1308:31;1333:5;1308:31;:::i;1374:325::-;1442:6;1450;1503:2;1491:9;1482:7;1478:23;1474:32;1471:2;;;1524:6;1516;1509:22;1471:2;1568:9;1555:23;1587:31;1612:5;1587:31;:::i;:::-;1637:5;1689:2;1674:18;;;;1661:32;;-1:-1:-1;;;1461:238:32:o;1704:803::-;1826:6;1834;1842;1850;1903:2;1891:9;1882:7;1878:23;1874:32;1871:2;;;1924:6;1916;1909:22;1871:2;1969:9;1956:23;1998:18;2039:2;2031:6;2028:14;2025:2;;;2060:6;2052;2045:22;2025:2;2104:70;2166:7;2157:6;2146:9;2142:22;2104:70;:::i;:::-;2193:8;;-1:-1:-1;2078:96:32;-1:-1:-1;2281:2:32;2266:18;;2253:32;;-1:-1:-1;2297:16:32;;;2294:2;;;2331:6;2323;2316:22;2294:2;;2375:72;2439:7;2428:8;2417:9;2413:24;2375:72;:::i;:::-;1861:646;;;;-1:-1:-1;2466:8:32;-1:-1:-1;;;;1861:646:32:o;2512:1281::-;2630:6;2638;2691:2;2679:9;2670:7;2666:23;2662:32;2659:2;;;2712:6;2704;2697:22;2659:2;2757:9;2744:23;2786:18;2827:2;2819:6;2816:14;2813:2;;;2848:6;2840;2833:22;2813:2;2891:6;2880:9;2876:22;2866:32;;2936:7;2929:4;2925:2;2921:13;2917:27;2907:2;;2963:6;2955;2948:22;2907:2;3004;2991:16;3026:4;3050:60;3066:43;3106:2;3066:43;:::i;3050:60::-;3132:3;3156:2;3151:3;3144:15;3184:2;3179:3;3175:12;3168:19;;3215:2;3211;3207:11;3263:7;3258:2;3252;3249:1;3245:10;3241:2;3237:19;3233:28;3230:41;3227:2;;;3289:6;3281;3274:22;3227:2;3316:6;3307:15;;3331:238;3345:2;3342:1;3339:9;3331:238;;;3416:3;3403:17;3433:31;3458:5;3433:31;:::i;:::-;3477:18;;3363:1;3356:9;;;;;3515:12;;;;3547;;3331:238;;;-1:-1:-1;3588:5:32;-1:-1:-1;;3631:18:32;;3618:32;;-1:-1:-1;;3662:16:32;;;3659:2;;;3696:6;3688;3681:22;3659:2;;3724:63;3779:7;3768:8;3757:9;3753:24;3724:63;:::i;:::-;3714:73;;;2649:1144;;;;;:::o;3798:251::-;3854:6;3907:2;3895:9;3886:7;3882:23;3878:32;3875:2;;;3928:6;3920;3913:22;3875:2;3972:9;3959:23;3991:28;4013:5;3991:28;:::i;4054:255::-;4121:6;4174:2;4162:9;4153:7;4149:23;4145:32;4142:2;;;4195:6;4187;4180:22;4142:2;4232:9;4226:16;4251:28;4273:5;4251:28;:::i;4314:190::-;4373:6;4426:2;4414:9;4405:7;4401:23;4397:32;4394:2;;;4447:6;4439;4432:22;4394:2;-1:-1:-1;4475:23:32;;4384:120;-1:-1:-1;4384:120:32:o;4509:276::-;4594:6;4647:2;4635:9;4626:7;4622:23;4618:32;4615:2;;;4668:6;4660;4653:22;4615:2;4705:9;4699:16;4724:31;4749:5;4724:31;:::i;5263:445::-;5344:6;5397:2;5385:9;5376:7;5372:23;5368:32;5365:2;;;5418:6;5410;5403:22;5365:2;5456;5450:9;5498:2;5490:6;5486:15;5567:6;5555:10;5552:22;5531:18;5519:10;5516:34;5513:62;5510:2;;;5578:18;;:::i;:::-;5614:2;5607:22;5653:23;;5638:39;;-1:-1:-1;5645:6:32;5355:353;-1:-1:-1;5355:353:32:o;5713:648::-;5811:6;5819;5863:9;5854:7;5850:23;5893:2;5889;5885:11;5882:2;;;5914:6;5906;5899:22;5882:2;5943:4;5939:2;5935:13;5932:2;;;5966:6;5958;5951:22;5932:2;;6004;5998:9;6046:4;6038:6;6034:17;6117:6;6105:10;6102:22;6081:18;6069:10;6066:34;6063:62;6060:2;;;6128:18;;:::i;:::-;6164:2;6157:22;6203:16;;6188:32;;6288:4;6273:20;;6267:27;6195:6;;-1:-1:-1;6303:28:32;6267:27;6303:28;:::i;:::-;6350:5;6340:15;;;5830:531;;;;;:::o;6561:194::-;6631:6;6684:2;6672:9;6663:7;6659:23;6655:32;6652:2;;;6705:6;6697;6690:22;6652:2;-1:-1:-1;6733:16:32;;6642:113;-1:-1:-1;6642:113:32:o;6760:463::-;6813:3;6851:5;6845:12;6878:6;6873:3;6866:19;6904:4;6933:2;6928:3;6924:12;6917:19;;6970:2;6963:5;6959:14;6991:3;7003:195;7017:6;7014:1;7011:13;7003:195;;;7082:13;;-1:-1:-1;;;;;7078:39:32;7066:52;;7138:12;;;;7173:15;;;;7114:1;7032:9;7003:195;;;-1:-1:-1;7214:3:32;;6821:402;-1:-1:-1;;;;;6821:402:32:o;7228:437::-;7281:3;7319:5;7313:12;7346:6;7341:3;7334:19;7372:4;7401:2;7396:3;7392:12;7385:19;;7438:2;7431:5;7427:14;7459:3;7471:169;7485:6;7482:1;7479:13;7471:169;;;7546:13;;7534:26;;7580:12;;;;7615:15;;;;7507:1;7500:9;7471:169;;8367:465;8624:2;8613:9;8606:21;8587:4;8650:56;8702:2;8691:9;8687:18;8679:6;8650:56;:::i;:::-;8754:9;8746:6;8742:22;8737:2;8726:9;8722:18;8715:50;8782:44;8819:6;8811;8782:44;:::i;:::-;8774:52;8596:236;-1:-1:-1;;;;;8596:236:32:o;8837:875::-;9250:3;9239:9;9232:22;9213:4;9277:57;9329:3;9318:9;9314:19;9306:6;9277:57;:::i;:::-;9382:9;9374:6;9370:22;9365:2;9354:9;9350:18;9343:50;9416:44;9453:6;9445;9416:44;:::i;:::-;9402:58;;9508:9;9500:6;9496:22;9491:2;9480:9;9476:18;9469:50;9542:44;9579:6;9571;9542:44;:::i;:::-;9528:58;;9634:9;9626:6;9622:22;9617:2;9606:9;9602:18;9595:50;9662:44;9699:6;9691;9662:44;:::i;:::-;9654:52;9222:490;-1:-1:-1;;;;;;;9222:490:32:o;12717:415::-;12919:2;12901:21;;;12958:2;12938:18;;;12931:30;12997:34;12992:2;12977:18;;12970:62;-1:-1:-1;;;13063:2:32;13048:18;;13041:49;13122:3;13107:19;;12891:241::o;13137:409::-;13339:2;13321:21;;;13378:2;13358:18;;;13351:30;13417:34;13412:2;13397:18;;13390:62;-1:-1:-1;;;13483:2:32;13468:18;;13461:43;13536:3;13521:19;;13311:235::o;13551:415::-;13753:2;13735:21;;;13792:2;13772:18;;;13765:30;13831:34;13826:2;13811:18;;13804:62;-1:-1:-1;;;13897:2:32;13882:18;;13875:49;13956:3;13941:19;;13725:241::o;15465:340::-;15667:2;15649:21;;;15706:2;15686:18;;;15679:30;-1:-1:-1;;;15740:2:32;15725:18;;15718:46;15796:2;15781:18;;15639:166::o;17692:397::-;17894:2;17876:21;;;17933:2;17913:18;;;17906:30;17972:34;17967:2;17952:18;;17945:62;-1:-1:-1;;;18038:2:32;18023:18;;18016:31;18079:3;18064:19;;17866:223::o;20249:275::-;20320:2;20314:9;20385:2;20366:13;;-1:-1:-1;;20362:27:32;20350:40;;20420:18;20405:34;;20441:22;;;20402:62;20399:2;;;20467:18;;:::i;:::-;20503:2;20496:22;20294:230;;-1:-1:-1;20294:230:32:o;20529:183::-;20589:4;20622:18;20614:6;20611:30;20608:2;;;20644:18;;:::i;:::-;-1:-1:-1;20689:1:32;20685:14;20701:4;20681:25;;20598:114::o;20717:128::-;20757:3;20788:1;20784:6;20781:1;20778:13;20775:2;;;20794:18;;:::i;:::-;-1:-1:-1;20830:9:32;;20765:80::o;20850:217::-;20890:1;20916;20906:2;;-1:-1:-1;;;20941:31:32;;20995:4;20992:1;20985:15;21023:4;20948:1;21013:15;20906:2;-1:-1:-1;21052:9:32;;20896:171::o;21072:422::-;21161:1;21204:5;21161:1;21218:270;21239:7;21229:8;21226:21;21218:270;;;21298:4;21294:1;21290:6;21286:17;21280:4;21277:27;21274:2;;;21307:18;;:::i;:::-;21357:7;21347:8;21343:22;21340:2;;;21377:16;;;;21340:2;21456:22;;;;21416:15;;;;21218:270;;;21222:3;21136:358;;;;;:::o;21499:131::-;21559:5;21588:36;21615:8;21609:4;21684:5;21714:8;21704:2;;-1:-1:-1;21755:1:32;21769:5;;21704:2;21803:4;21793:2;;-1:-1:-1;21840:1:32;21854:5;;21793:2;21885:4;21903:1;21898:59;;;;21971:1;21966:130;;;;21878:218;;21898:59;21928:1;21919:10;;21942:5;;;21966:130;22003:3;21993:8;21990:17;21987:2;;;22010:18;;:::i;:::-;-1:-1:-1;;22066:1:32;22052:16;;22081:5;;21878:218;;22180:2;22170:8;22167:16;22161:3;22155:4;22152:13;22148:36;22142:2;22132:8;22129:16;22124:2;22118:4;22115:12;22111:35;22108:77;22105:2;;;-1:-1:-1;22217:19:32;;;22249:5;;22105:2;22296:34;22321:8;22315:4;22296:34;:::i;:::-;22366:6;22362:1;22358:6;22354:19;22345:7;22342:32;22339:2;;;22377:18;;:::i;:::-;22415:20;;21694:747;-1:-1:-1;;;21694:747:32:o;22446:577::-;22485:7;-1:-1:-1;;;;;22555:15:32;;;22589;;;22620:11;;;22639:10;;;22633:17;;22616:35;22613:2;;;22654:18;;:::i;:::-;-1:-1:-1;;;22723:15:32;;;22754:11;;;22774;;;22767:19;;22750:37;22747:2;;;22790:18;;:::i;:::-;22836:7;22833:1;22829:15;22819:25;;22889:1;22885:2;22880:11;22877:1;22873:19;22868:2;22864;22860:11;22856:37;22853:2;;;22896:18;;:::i;:::-;22961:1;22957:2;22952:11;22949:1;22945:19;22940:2;22936;22932:11;22928:37;22925:2;;;22968:18;;:::i;:::-;-1:-1:-1;;;23008:9:32;;;;;22497:526;-1:-1:-1;;;22497:526:32:o;23028:168::-;23068:7;23134:1;23130;23126:6;23122:14;23119:1;23116:21;23111:1;23104:9;23097:17;23093:45;23090:2;;;23141:18;;:::i;:::-;-1:-1:-1;23181:9:32;;23080:116::o;23201:125::-;23241:4;23269:1;23266;23263:8;23260:2;;;23274:18;;:::i;:::-;-1:-1:-1;23311:9:32;;23250:76::o;23331:135::-;23370:3;-1:-1:-1;;23391:17:32;;23388:2;;;23411:18;;:::i;:::-;-1:-1:-1;23458:1:32;23447:13;;23378:88::o;23471:127::-;23532:10;23527:3;23523:20;23520:1;23513:31;23563:4;23560:1;23553:15;23587:4;23584:1;23577:15;23603:127;23664:10;23659:3;23655:20;23652:1;23645:31;23695:4;23692:1;23685:15;23719:4;23716:1;23709:15;23735:131;-1:-1:-1;;;;;23810:31:32;;23800:42;;23790:2;;23856:1;23853;23846:12;23871:118;23957:5;23950:13;23943:21;23936:5;23933:32;23923:2;;23979:1;23976;23969:12

Swarm Source

ipfs://121e79bca45f4094ba01ec95fc446f55cbd225ee76aa3455bfab05f913721a9f

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

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.