Contract 0xf2876d49fbf723631a3cf73773da3c72721d3e9c

  Note: Our ETH balance display is temporarily unavailable. Please check back later.
Txn Hash Method
Block
From
To
Value
0xd11094d6cb220e0a4bcd12e1b0b5ad7255bdccab3a1957dff0d81cac0084cd19Set Prices With ...211857662024-02-13 4:46:40101 days 8 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000711032650.300000252
0xa13874302639d8d242daf7ab214d7d355edd59d9315236228296e8c0cecb6262Set Prices With ...211856222024-02-13 4:41:52101 days 8 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000718019650.300000252
0xe6fb7fcccefdc434009dfbf85104f2232d999194adc49c8c3ba74ecac4bd31ffSet Prices With ...211853542024-02-13 4:32:56101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.000070507060.300000252
0x651b5b5c5138b1b5556d74a3d7512452aeef8a4311c95a1006e4b3f2cd735133Set Prices With ...211852122024-02-13 4:28:12101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000710144880.300000252
0x77c7c4d63e3a571df4daf32c6b53c630cebc45d5386c66a66edfbb44db3becf3Set Prices With ...211850702024-02-13 4:23:28101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.000072014230.300000252
0xf0988ac92c602e6c8ff3303c94bc0cd1682c8c253c50a43e70934f6068c49d53Set Prices With ...211849302024-02-13 4:18:48101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000722460240.300000252
0x5c8cf1f1617f3af0a9df37f29336ea98feb409c6e6d080a20ae93cc5ed9f7eb7Set Prices With ...211847882024-02-13 4:14:04101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000721076170.300000252
0x38ba68846a4951f5a4cc1bd944c305490aa0d9a435ec51d664247c14bfc7a7c1Set Prices With ...211846462024-02-13 4:09:20101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000719044610.300000252
0xe6be245839af10752fff8ee5180ffa46e0bc46bba057bd0f28398ecedbf2ac25Set Prices With ...211845052024-02-13 4:04:38101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000719224610.300000252
0xeb4ffc60509f0c56883604cacb08bf07bb3417938a8422095d1b693135ea0047Set Prices With ...211843652024-02-13 3:59:58101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000726104450.300000252
0x06ad8163aba3210da16152f0276c8548dc00744e59973c245660bc665851aac2Set Prices With ...211842232024-02-13 3:55:14101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000720977170.300000252
0x00f99501b600a52c5150b37e54740b06b526bd1e94460447de6c596535038a9fSet Prices With ...211840812024-02-13 3:50:30101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000719044610.300000252
0x38c0001309db91826188d32f87f288177c6cf1ab3f79c34d96e3651b301f0775Set Prices With ...211839402024-02-13 3:45:48101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000714195280.300000252
0x66d36bdd348b5d789dd055c86ffbd9515764d7501e72d6c45e4ec0f6000a068aSet Prices With ...211837982024-02-13 3:41:04101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000703091870.300000252
0x207d859c476606a257917fd4d482943a8fcedadfcaecfefffc33e81a5cdeff4fSet Prices With ...211836572024-02-13 3:36:22101 days 9 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000720977170.300000252
0x90b1106bfaf254ec5f7b64fb0b66f22158b89641a43a09e8c51b8615fa46b81aSet Prices With ...211835162024-02-13 3:31:40101 days 10 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.000072014230.300000252
0xa4319a646a50b4ec7c01f458ca41e0d11c49edeb916b8c70132e8cf4d81203a0Set Prices With ...211833752024-02-13 3:26:58101 days 10 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000707432290.300000252
0x3b18ce0f1c0321623c199a9ca7e9cd89bdf3860f0bf30ba804dcdae3d7febdf9Set Prices With ...211832342024-02-13 3:22:16101 days 10 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000700445280.300000252
0x5789bb047b0630ac8e4cd21579fc45acd2891e446a9790a0a1d8051a1cb5ca35Set Prices With ...211830922024-02-13 3:17:32101 days 10 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000707175280.300000252
0x9605b7c3f1e226df5abd78f1eb0e1b3b27ffdaa76406183e428fa64f588a0695Set Prices With ...211829502024-02-13 3:12:48101 days 10 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000703091870.300000252
0x99440a7d2521f3d30e8f60addd8e388aae0ed99f098ace3ce7268f55331f6deaSet Prices With ...211828072024-02-13 3:08:02101 days 10 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000711694910.300000252
0x6de714a1d4f3ea8c51095fb80c411671076cab9d7b7364cdf6fd16de4a00d162Set Prices With ...211826662024-02-13 3:03:20101 days 10 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.00007189490.300000252
0x1a16ffabbcd0b3839139eac4fd8dc06bdec8edc9fd83d4fa758a6a4e4d1bed13Set Prices With ...211825252024-02-13 2:58:38101 days 10 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000707036160.300000252
0x45edb208add480da457b77d131c7596efab2d7ea75481f62fbdb39417b853db5Set Prices With ...211823852024-02-13 2:53:58101 days 10 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000721149290.300000252
0x06879918dd0f8afa5426c7fb98199dd55c87f5aae7caaae9e6ba56336740a0a2Set Prices With ...211822432024-02-13 2:49:14101 days 10 hrs ago0xc94e7813a30d91c2af7d3c3c7150a93c512d3fc6 IN  0xf2876d49fbf723631a3cf73773da3c72721d3e9c0 ETH0.0000720937050.300000252
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

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

Contract Name:
FastPriceFeed

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion
File 1 of 10 : Governable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

contract Governable {
    address public gov;

    constructor() public {
        gov = msg.sender;
    }

    modifier onlyGov() {
        require(msg.sender == gov, "Governable: forbidden");
        _;
    }

    function setGov(address _gov) external onlyGov {
        gov = _gov;
    }
}

File 2 of 10 : ILiquidityRouter.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface ILiquidityRouter {
    function addLiquidityRequestKeysStart() external view returns (uint256);
    function removeLiquidityRequestKeysStart() external view returns (uint256);

    function executeAddLiquidities(uint256 _count, address payable _executionFeeReceiver) external;
    function executeRemoveLiquidities(uint256 _count, address payable _executionFeeReceiver) external;
}

File 3 of 10 : IPositionRouter.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IPositionRouter {
    function increasePositionRequestKeysStart() external returns (uint256);
    function decreasePositionRequestKeysStart() external returns (uint256);
    function executeIncreasePositions(uint256 _count, address payable _executionFeeReceiver) external;
    function executeDecreasePositions(uint256 _count, address payable _executionFeeReceiver) external;
}

File 4 of 10 : ISwapRouter.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface ISwapRouter {
    function swapRequestKeysStart() external returns (uint256);

    function executeSwaps(uint256 _count, address payable _executionFeeReceiver) external;
}

File 5 of 10 : IVaultPriceFeed.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IVaultPriceFeed {
    function adjustmentBasisPoints(address _token) external view returns (uint256);
    function isAdjustmentAdditive(address _token) external view returns (bool);
    function spreadBasisPoints(address _token) external view returns (uint256);
    function setAdjustment(address _token, bool _isAdditive, uint256 _adjustmentBps) external;
    function setUseV2Pricing(bool _useV2Pricing) external;
    function setIsAmmEnabled(bool _isEnabled) external;
    function setIsSecondaryPriceEnabled(bool _isEnabled) external;
    function setSpreadBasisPoints(address _token, uint256 _spreadBasisPoints) external;
    function setSpreadThresholdBasisPoints(uint256 _spreadThresholdBasisPoints) external;
    function setFavorPrimaryPrice(bool _favorPrimaryPrice) external;
    function setPriceSampleSpace(uint256 _priceSampleSpace) external;
    function setMaxStrictPriceDeviation(uint256 _maxStrictPriceDeviation) external;
    function getPriceForReaders(address _token, bool _maximise, bool _includeAmmPrice) external view returns (uint256);
    function getPrice(address _token, bool _maximise, bool _includeAmmPrice, bool _useSwapPricing) external view returns (uint256);
    function getAmmPrice(address _token) external view returns (uint256);
    function getLatestPrimaryPrice(address _token) external view returns (uint256);
    function getPrimaryPrice(address _token, bool _maximise) external view returns (uint256);
    function setTokenConfig(
        address _token,
        address _priceFeed,
        uint256 _priceDecimals,
        bool _isStrictStable
    ) external;
}

File 6 of 10 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

File 7 of 10 : FastPriceFeed.sol
// SPDX-License-Identifier: MIT

import "../libraries/math/SafeMath.sol";

import "./interfaces/ISecondaryPriceFeed.sol";
import "./interfaces/IFastPriceFeed.sol";
import "./interfaces/IFastPriceEvents.sol";
import "../core/interfaces/IVaultPriceFeed.sol";
import "../core/interfaces/IPositionRouter.sol";
import "../core/interfaces/ISwapRouter.sol";
import "../core/interfaces/ILiquidityRouter.sol";
import "../access/Governable.sol";

pragma solidity 0.6.12;

contract FastPriceFeed is ISecondaryPriceFeed, IFastPriceFeed, Governable {
    using SafeMath for uint256;

    // fit data in a uint256 slot to save gas costs
    struct PriceDataItem {
        uint160 refPrice; // Chainlink price
        uint32 refTime; // last updated at time
        uint32 cumulativeRefDelta; // cumulative Chainlink price delta
        uint32 cumulativeFastDelta; // cumulative fast price delta
    }

    uint256 public constant PRICE_PRECISION = 10 ** 30;

    uint256 public constant CUMULATIVE_DELTA_PRECISION = 10 * 1000 * 1000;

    uint256 public constant MAX_REF_PRICE = type(uint160).max;
    uint256 public constant MAX_CUMULATIVE_REF_DELTA = type(uint32).max;
    uint256 public constant MAX_CUMULATIVE_FAST_DELTA = type(uint32).max;

    // uint256(~0) is 256 bits of 1s
    // shift the 1s by (256 - 32) to get (256 - 32) 0s followed by 32 1s
    uint256 constant public BITMASK_32 = uint256(~0) >> (256 - 32);

    uint256 public constant BASIS_POINTS_DIVISOR = 10000;

    uint256 public constant MAX_PRICE_DURATION = 24 hours;

    bool public isInitialized;
    bool public isSpreadEnabled = false;

    address public vaultPriceFeed;
    address public fastPriceEvents;

    address public tokenManager;

    address public positionRouter;
    address public swapRouter;
    address public liquidityRouter;

    uint256 public override lastUpdatedAt;
    uint256 public override lastUpdatedBlock;

    uint256 public priceDuration;
    uint256 public maxPriceUpdateDelay;
    uint256 public spreadBasisPointsIfInactive;
    uint256 public spreadBasisPointsIfChainError;
    uint256 public minBlockInterval;
    uint256 public maxTimeDeviation;

    uint256 public priceDataInterval;

    // allowed deviation from primary price
    uint256 public maxDeviationBasisPoints;

    uint256 public minAuthorizations;
    uint256 public disableFastPriceVoteCount = 0;

    mapping (address => bool) public isUpdater;

    mapping (address => uint256) public prices;
    mapping (address => PriceDataItem) public priceData;
    mapping (address => uint256) public maxCumulativeDeltaDiffs;

    mapping (address => bool) public isSigner;
    mapping (address => bool) public disableFastPriceVotes;

    // array of tokens used in setCompactedPrices, saves L1 calldata gas costs
    address[] public tokens;
    // array of tokenPrecisions used in setCompactedPrices, saves L1 calldata gas costs
    // if the token price will be sent with 3 decimals, then tokenPrecision for that token
    // should be 10 ** 3
    uint256[] public tokenPrecisions;

    event DisableFastPrice(address signer);
    event EnableFastPrice(address signer);
    event PriceData(address token, uint256 refPrice, uint256 fastPrice, uint256 cumulativeRefDelta, uint256 cumulativeFastDelta);
    event MaxCumulativeDeltaDiffExceeded(address token, uint256 refPrice, uint256 fastPrice, uint256 cumulativeRefDelta, uint256 cumulativeFastDelta);

    modifier onlySigner() {
        require(isSigner[msg.sender], "FastPriceFeed: forbidden");
        _;
    }

    modifier onlyUpdater() {
        require(isUpdater[msg.sender], "FastPriceFeed: forbidden");
        _;
    }

    modifier onlyTokenManager() {
        require(msg.sender == tokenManager, "FastPriceFeed: forbidden");
        _;
    }

    constructor(
      uint256 _priceDuration,
      uint256 _maxPriceUpdateDelay,
      uint256 _minBlockInterval,
      uint256 _maxDeviationBasisPoints,
      address _fastPriceEvents,
      address _tokenManager,
      address _positionRouter,
      address _swapRouter,
      address _liquidityRouter
    ) public {
        require(_priceDuration <= MAX_PRICE_DURATION, "FastPriceFeed: invalid _priceDuration");
        priceDuration = _priceDuration;
        maxPriceUpdateDelay = _maxPriceUpdateDelay;
        minBlockInterval = _minBlockInterval;
        maxDeviationBasisPoints = _maxDeviationBasisPoints;
        fastPriceEvents = _fastPriceEvents;
        tokenManager = _tokenManager;
        positionRouter = _positionRouter;
        swapRouter = _swapRouter;
        liquidityRouter = _liquidityRouter;
    }

    function initialize(uint256 _minAuthorizations, address[] memory _signers, address[] memory _updaters) public onlyGov {
        require(!isInitialized, "FastPriceFeed: already initialized");
        isInitialized = true;

        minAuthorizations = _minAuthorizations;

        for (uint256 i = 0; i < _signers.length; i++) {
            address signer = _signers[i];
            isSigner[signer] = true;
        }

        for (uint256 i = 0; i < _updaters.length; i++) {
            address updater = _updaters[i];
            isUpdater[updater] = true;
        }
    }

    function setTokenManager(address _tokenManager) external override onlyGov {
        tokenManager = _tokenManager;
    }

    function setPositionRouter(address _positionRouter) external override onlyGov {
        positionRouter = _positionRouter;
    }

    function setSwapRouter(address _swapRouter) external override onlyGov {
        swapRouter = _swapRouter;
    }

    function setLiquidityRouter(address _liquidityRouter) external override onlyGov {
        liquidityRouter = _liquidityRouter;
    }

    function setSigner(address _account, bool _isActive) external override onlyGov {
        isSigner[_account] = _isActive;
    }

    function setUpdater(address _account, bool _isActive) external override onlyGov {
        isUpdater[_account] = _isActive;
    }

    function setFastPriceEvents(address _fastPriceEvents) external onlyGov {
      fastPriceEvents = _fastPriceEvents;
    }

    function setVaultPriceFeed(address _vaultPriceFeed) external override onlyGov {
      vaultPriceFeed = _vaultPriceFeed;
    }

    function setMaxTimeDeviation(uint256 _maxTimeDeviation) external onlyGov {
        maxTimeDeviation = _maxTimeDeviation;
    }

    function setPriceDuration(uint256 _priceDuration) external override onlyGov {
        require(_priceDuration <= MAX_PRICE_DURATION, "FastPriceFeed: invalid _priceDuration");
        priceDuration = _priceDuration;
    }

    function setMaxPriceUpdateDelay(uint256 _maxPriceUpdateDelay) external override onlyGov {
        maxPriceUpdateDelay = _maxPriceUpdateDelay;
    }

    function setSpreadBasisPointsIfInactive(uint256 _spreadBasisPointsIfInactive) external override onlyGov {
        spreadBasisPointsIfInactive = _spreadBasisPointsIfInactive;
    }

    function setSpreadBasisPointsIfChainError(uint256 _spreadBasisPointsIfChainError) external override onlyGov {
        spreadBasisPointsIfChainError = _spreadBasisPointsIfChainError;
    }

    function setMinBlockInterval(uint256 _minBlockInterval) external override onlyGov {
        minBlockInterval = _minBlockInterval;
    }

    function setIsSpreadEnabled(bool _isSpreadEnabled) external override onlyGov {
        isSpreadEnabled = _isSpreadEnabled;
    }

    function setMaxDeviationBasisPoints(uint256 _maxDeviationBasisPoints) external override onlyGov {
        maxDeviationBasisPoints = _maxDeviationBasisPoints;
    }

    function setMaxCumulativeDeltaDiffs(address[] memory _tokens,  uint256[] memory _maxCumulativeDeltaDiffs) external override onlyGov {
        for (uint256 i = 0; i < _tokens.length; i++) {
            address token = _tokens[i];
            maxCumulativeDeltaDiffs[token] = _maxCumulativeDeltaDiffs[i];
        }
    }

    function setPriceDataInterval(uint256 _priceDataInterval) external override onlyGov {
        priceDataInterval = _priceDataInterval;
    }

    function setLastUpdatedAt(uint256 _lastUpdatedAt) external onlyGov {
        lastUpdatedAt = _lastUpdatedAt;
    }

    function setMinAuthorizations(uint256 _minAuthorizations) external override onlyTokenManager {
        minAuthorizations = _minAuthorizations;
    }

    function setTokens(address[] memory _tokens, uint256[] memory _tokenPrecisions) external onlyGov {
        require(_tokens.length == _tokenPrecisions.length, "FastPriceFeed: invalid lengths");
        tokens = _tokens;
        tokenPrecisions = _tokenPrecisions;
    }

    function setPrices(address[] memory _tokens, uint256[] memory _prices, uint256 _timestamp) external onlyUpdater {
        bool shouldUpdate = _setLastUpdatedValues(_timestamp);

        if (shouldUpdate) {
            address _fastPriceEvents = fastPriceEvents;
            address _vaultPriceFeed = vaultPriceFeed;

            for (uint256 i = 0; i < _tokens.length; i++) {
                address token = _tokens[i];
                _setPrice(token, _prices[i], _vaultPriceFeed, _fastPriceEvents);
            }
        }
    }

    function setCompactedPrices(uint256[] memory _priceBitArray, uint256 _timestamp) external onlyUpdater {
        bool shouldUpdate = _setLastUpdatedValues(_timestamp);

        if (shouldUpdate) {
            address _fastPriceEvents = fastPriceEvents;
            address _vaultPriceFeed = vaultPriceFeed;

            for (uint256 i = 0; i < _priceBitArray.length; i++) {
                uint256 priceBits = _priceBitArray[i];

                for (uint256 j = 0; j < 8; j++) {
                    uint256 index = i * 8 + j;
                    if (index >= tokens.length) { return; }

                    uint256 startBit = 32 * j;
                    uint256 price = (priceBits >> startBit) & BITMASK_32;

                    address token = tokens[i * 8 + j];
                    uint256 tokenPrecision = tokenPrecisions[i * 8 + j];
                    uint256 adjustedPrice = price.mul(PRICE_PRECISION).div(tokenPrecision);

                    _setPrice(token, adjustedPrice, _vaultPriceFeed, _fastPriceEvents);
                }
            }
        }
    }

    function setPricesWithBits(uint256 _priceBits, uint256 _timestamp) external override onlyUpdater {
        _setPricesWithBits(_priceBits, _timestamp);
    }

    function setPricesWithBitsAndExecute(
        uint256 _priceBits,
        uint256 _timestamp,
        uint256 _endIndexForIncreasePositions,
        uint256 _endIndexForDecreasePositions,
        uint256 _endIndexForSwaps,
        uint256 _endIndexForAddLiquidities,
        uint256 _endIndexForRemoveLiquidities
    ) external onlyUpdater {
        _setPricesWithBits(_priceBits, _timestamp);

        IPositionRouter _positionRouter = IPositionRouter(positionRouter);
        ISwapRouter _swapRouter = ISwapRouter(swapRouter);
        ILiquidityRouter _liquidityRouter = ILiquidityRouter(liquidityRouter);

        _positionRouter.executeIncreasePositions(_endIndexForIncreasePositions, payable(msg.sender));
        _positionRouter.executeDecreasePositions(_endIndexForDecreasePositions, payable(msg.sender));
        _swapRouter.executeSwaps(_endIndexForSwaps, payable(msg.sender));
        _liquidityRouter.executeAddLiquidities(_endIndexForAddLiquidities, payable(msg.sender));
        _liquidityRouter.executeRemoveLiquidities(_endIndexForRemoveLiquidities, payable(msg.sender));
    }

    function disableFastPrice() external onlySigner {
        require(!disableFastPriceVotes[msg.sender], "FastPriceFeed: already voted");
        disableFastPriceVotes[msg.sender] = true;
        disableFastPriceVoteCount = disableFastPriceVoteCount.add(1);

        emit DisableFastPrice(msg.sender);
    }

    function enableFastPrice() external onlySigner {
        require(disableFastPriceVotes[msg.sender], "FastPriceFeed: already enabled");
        disableFastPriceVotes[msg.sender] = false;
        disableFastPriceVoteCount = disableFastPriceVoteCount.sub(1);

        emit EnableFastPrice(msg.sender);
    }

    // under regular operation, the fastPrice (prices[token]) is returned and there is no spread returned from this function,
    // though VaultPriceFeed might apply its own spread
    //
    // if the fastPrice has not been updated within priceDuration then it is ignored and only _refPrice with a spread is used (spread: spreadBasisPointsIfInactive)
    // in case the fastPrice has not been updated for maxPriceUpdateDelay then the _refPrice with a larger spread is used (spread: spreadBasisPointsIfChainError)
    //
    // there will be a spread from the _refPrice to the fastPrice in the following cases:
    // - in case isSpreadEnabled is set to true
    // - in case the maxDeviationBasisPoints between _refPrice and fastPrice is exceeded
    // - in case watchers flag an issue
    // - in case the cumulativeFastDelta exceeds the cumulativeRefDelta by the maxCumulativeDeltaDiff
    function getPrice(address _token, uint256 _refPrice, bool _maximise) external override view returns (uint256) {
        if (block.timestamp > lastUpdatedAt.add(maxPriceUpdateDelay)) {
            if (_maximise) {
                return _refPrice.mul(BASIS_POINTS_DIVISOR.add(spreadBasisPointsIfChainError)).div(BASIS_POINTS_DIVISOR);
            }

            return _refPrice.mul(BASIS_POINTS_DIVISOR.sub(spreadBasisPointsIfChainError)).div(BASIS_POINTS_DIVISOR);
        }

        if (block.timestamp > lastUpdatedAt.add(priceDuration)) {
            if (_maximise) {
                return _refPrice.mul(BASIS_POINTS_DIVISOR.add(spreadBasisPointsIfInactive)).div(BASIS_POINTS_DIVISOR);
            }

            return _refPrice.mul(BASIS_POINTS_DIVISOR.sub(spreadBasisPointsIfInactive)).div(BASIS_POINTS_DIVISOR);
        }

        uint256 fastPrice = prices[_token];
        if (fastPrice == 0) { return _refPrice; }

        if (_refPrice == 0) {
            return fastPrice;
        }

        uint256 diffBasisPoints = _refPrice > fastPrice ? _refPrice.sub(fastPrice) : fastPrice.sub(_refPrice);
        diffBasisPoints = diffBasisPoints.mul(BASIS_POINTS_DIVISOR).div(_refPrice);

        // create a spread between the _refPrice and the fastPrice if the maxDeviationBasisPoints is exceeded
        // or if watchers have flagged an issue with the fast price
        bool hasSpread = !favorFastPrice(_token) || diffBasisPoints > maxDeviationBasisPoints;

        if (hasSpread) {
            // return the higher of the two prices
            if (_maximise) {
                return _refPrice > fastPrice ? _refPrice : fastPrice;
            }

            // return the lower of the two prices
            return _refPrice < fastPrice ? _refPrice : fastPrice;
        }

        return fastPrice;
    }

    function favorFastPrice(address _token) public view returns (bool) {
        if (isSpreadEnabled) {
            return false;
        }

        if (disableFastPriceVoteCount >= minAuthorizations) {
            // force a spread if watchers have flagged an issue with the fast price
            return false;
        }

        (/* uint256 prevRefPrice */, /* uint256 refTime */, uint256 cumulativeRefDelta, uint256 cumulativeFastDelta) = getPriceData(_token);
        if (cumulativeFastDelta > cumulativeRefDelta && cumulativeFastDelta.sub(cumulativeRefDelta) > maxCumulativeDeltaDiffs[_token]) {
            // force a spread if the cumulative delta for the fast price feed exceeds the cumulative delta
            // for the Chainlink price feed by the maxCumulativeDeltaDiff allowed
            return false;
        }

        return true;
    }

    function getPriceData(address _token) public view returns (uint256, uint256, uint256, uint256) {
        PriceDataItem memory data = priceData[_token];
        return (uint256(data.refPrice), uint256(data.refTime), uint256(data.cumulativeRefDelta), uint256(data.cumulativeFastDelta));
    }

    function _setPricesWithBits(uint256 _priceBits, uint256 _timestamp) private {
        bool shouldUpdate = _setLastUpdatedValues(_timestamp);

        if (shouldUpdate) {
            address _fastPriceEvents = fastPriceEvents;
            address _vaultPriceFeed = vaultPriceFeed;

            for (uint256 j = 0; j < 8; j++) {
                uint256 index = j;
                if (index >= tokens.length) { return; }

                uint256 startBit = 32 * j;
                uint256 price = (_priceBits >> startBit) & BITMASK_32;

                address token = tokens[j];
                uint256 tokenPrecision = tokenPrecisions[j];
                uint256 adjustedPrice = price.mul(PRICE_PRECISION).div(tokenPrecision);

                _setPrice(token, adjustedPrice, _vaultPriceFeed, _fastPriceEvents);
            }
        }
    }

    function _setPrice(address _token, uint256 _price, address _vaultPriceFeed, address _fastPriceEvents) private {
        if (_vaultPriceFeed != address(0)) {
            uint256 refPrice = IVaultPriceFeed(_vaultPriceFeed).getLatestPrimaryPrice(_token);
            uint256 fastPrice = prices[_token];

            (uint256 prevRefPrice, uint256 refTime, uint256 cumulativeRefDelta, uint256 cumulativeFastDelta) = getPriceData(_token);

            if (prevRefPrice > 0) {
                uint256 refDeltaAmount = refPrice > prevRefPrice ? refPrice.sub(prevRefPrice) : prevRefPrice.sub(refPrice);
                uint256 fastDeltaAmount = fastPrice > _price ? fastPrice.sub(_price) : _price.sub(fastPrice);

                // reset cumulative delta values if it is a new time window
                if (refTime.div(priceDataInterval) != block.timestamp.div(priceDataInterval)) {
                    cumulativeRefDelta = 0;
                    cumulativeFastDelta = 0;
                }

                cumulativeRefDelta = cumulativeRefDelta.add(refDeltaAmount.mul(CUMULATIVE_DELTA_PRECISION).div(prevRefPrice));
                cumulativeFastDelta = cumulativeFastDelta.add(fastDeltaAmount.mul(CUMULATIVE_DELTA_PRECISION).div(fastPrice));
            }

            if (cumulativeFastDelta > cumulativeRefDelta && cumulativeFastDelta.sub(cumulativeRefDelta) > maxCumulativeDeltaDiffs[_token]) {
                emit MaxCumulativeDeltaDiffExceeded(_token, refPrice, fastPrice, cumulativeRefDelta, cumulativeFastDelta);
            }

            _setPriceData(_token, refPrice, cumulativeRefDelta, cumulativeFastDelta);
            emit PriceData(_token, refPrice, fastPrice, cumulativeRefDelta, cumulativeFastDelta);
        }

        prices[_token] = _price;
        _emitPriceEvent(_fastPriceEvents, _token, _price);
    }

    function _setPriceData(address _token, uint256 _refPrice, uint256 _cumulativeRefDelta, uint256 _cumulativeFastDelta) private {
        require(_refPrice < MAX_REF_PRICE, "FastPriceFeed: invalid refPrice");
        // skip validation of block.timestamp, it should only be out of range after the year 2100
        require(_cumulativeRefDelta < MAX_CUMULATIVE_REF_DELTA, "FastPriceFeed: invalid cumulativeRefDelta");
        require(_cumulativeFastDelta < MAX_CUMULATIVE_FAST_DELTA, "FastPriceFeed: invalid cumulativeFastDelta");

        priceData[_token] = PriceDataItem(
            uint160(_refPrice),
            uint32(block.timestamp),
            uint32(_cumulativeRefDelta),
            uint32(_cumulativeFastDelta)
        );
    }

    function _emitPriceEvent(address _fastPriceEvents, address _token, uint256 _price) private {
        if (_fastPriceEvents == address(0)) {
            return;
        }

        IFastPriceEvents(_fastPriceEvents).emitPriceEvent(_token, _price);
    }

    function _setLastUpdatedValues(uint256 _timestamp) private returns (bool) {
        if (minBlockInterval > 0) {
            require(block.number.sub(lastUpdatedBlock) >= minBlockInterval, "FastPriceFeed: minBlockInterval not yet passed");
        }

        uint256 _maxTimeDeviation = maxTimeDeviation;
        require(_timestamp > block.timestamp.sub(_maxTimeDeviation), "FastPriceFeed: _timestamp below allowed range");
        require(_timestamp < block.timestamp.add(_maxTimeDeviation), "FastPriceFeed: _timestamp exceeds allowed range");

        // do not update prices if _timestamp is before the current lastUpdatedAt value
        if (_timestamp < lastUpdatedAt) {
            return false;
        }

        lastUpdatedAt = _timestamp;
        lastUpdatedBlock = block.number;

        return true;
    }

    function getStates(address[] memory _tokens) public view returns (
        address[] memory,
        uint256[] memory,
        bool[] memory
    ) {
        address[] memory addressValues = new address[](1);
        uint256[] memory intValues = new uint256[](7 + _tokens.length);
        bool[] memory boolValues = new bool[](1);

        addressValues[0] = gov;

        boolValues[0] = isSpreadEnabled;

        intValues[0] = maxPriceUpdateDelay;
        intValues[1] = spreadBasisPointsIfInactive;
        intValues[2] = spreadBasisPointsIfChainError;
        intValues[3] = minBlockInterval;
        intValues[4] = maxDeviationBasisPoints;
        intValues[5] = priceDataInterval;
        intValues[6] = priceDuration;

        for (uint256 i = 0; i < _tokens.length; i++) {
            address token = _tokens[i];

            intValues[i + 7] = maxCumulativeDeltaDiffs[token];
        }

        return (
            addressValues,
            intValues,
            boolValues
        );
    }
}

File 8 of 10 : IFastPriceEvents.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IFastPriceEvents {
    function emitPriceEvent(address _token, uint256 _price) external;
}

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

pragma solidity 0.6.12;

interface IFastPriceFeed {
    function lastUpdatedAt() external view returns (uint256);
    function lastUpdatedBlock() external view returns (uint256);
    function setMinAuthorizations(uint256 _minAuthorizations) external;
    function setTokenManager(address _tokenManager) external;
    function setPositionRouter(address _positionRouter) external;
    function setSwapRouter(address _swapRouter) external;
    function setLiquidityRouter(address _liquidityRouter) external;
    function setSigner(address _account, bool _isActive) external;
    function setUpdater(address _account, bool _isActive) external;
    function setPriceDuration(uint256 _priceDuration) external;
    function setMaxPriceUpdateDelay(uint256 _maxPriceUpdateDelay) external;
    function setSpreadBasisPointsIfInactive(uint256 _spreadBasisPointsIfInactive) external;
    function setSpreadBasisPointsIfChainError(uint256 _spreadBasisPointsIfChainError) external;
    function setMinBlockInterval(uint256 _minBlockInterval) external;
    function setIsSpreadEnabled(bool _isSpreadEnabled) external;
    function setMaxDeviationBasisPoints(uint256 _maxDeviationBasisPoints) external;
    function setMaxCumulativeDeltaDiffs(address[] memory _tokens,  uint256[] memory _maxCumulativeDeltaDiffs) external;
    function setPriceDataInterval(uint256 _priceDataInterval) external;
    function setVaultPriceFeed(address _vaultPriceFeed) external;
    function setPricesWithBits(uint256 _priceBits, uint256 _timestamp) external;
}

File 10 of 10 : ISecondaryPriceFeed.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface ISecondaryPriceFeed {
    function getPrice(address _token, uint256 _referencePrice, bool _maximise) external view returns (uint256);
}

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

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_priceDuration","type":"uint256"},{"internalType":"uint256","name":"_maxPriceUpdateDelay","type":"uint256"},{"internalType":"uint256","name":"_minBlockInterval","type":"uint256"},{"internalType":"uint256","name":"_maxDeviationBasisPoints","type":"uint256"},{"internalType":"address","name":"_fastPriceEvents","type":"address"},{"internalType":"address","name":"_tokenManager","type":"address"},{"internalType":"address","name":"_positionRouter","type":"address"},{"internalType":"address","name":"_swapRouter","type":"address"},{"internalType":"address","name":"_liquidityRouter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"signer","type":"address"}],"name":"DisableFastPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"signer","type":"address"}],"name":"EnableFastPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"refPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fastPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cumulativeRefDelta","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cumulativeFastDelta","type":"uint256"}],"name":"MaxCumulativeDeltaDiffExceeded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"refPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fastPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cumulativeRefDelta","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cumulativeFastDelta","type":"uint256"}],"name":"PriceData","type":"event"},{"inputs":[],"name":"BASIS_POINTS_DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BITMASK_32","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CUMULATIVE_DELTA_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_CUMULATIVE_FAST_DELTA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_CUMULATIVE_REF_DELTA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PRICE_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_REF_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableFastPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableFastPriceVoteCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"disableFastPriceVotes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableFastPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fastPriceEvents","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"favorFastPrice","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_refPrice","type":"uint256"},{"internalType":"bool","name":"_maximise","type":"bool"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getPriceData","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"getStates","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minAuthorizations","type":"uint256"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"address[]","name":"_updaters","type":"address[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSpreadEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isUpdater","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdatedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdatedBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxCumulativeDeltaDiffs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxDeviationBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPriceUpdateDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTimeDeviation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAuthorizations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBlockInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"positionRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"priceData","outputs":[{"internalType":"uint160","name":"refPrice","type":"uint160"},{"internalType":"uint32","name":"refTime","type":"uint32"},{"internalType":"uint32","name":"cumulativeRefDelta","type":"uint32"},{"internalType":"uint32","name":"cumulativeFastDelta","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceDataInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"prices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_priceBitArray","type":"uint256[]"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setCompactedPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fastPriceEvents","type":"address"}],"name":"setFastPriceEvents","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isSpreadEnabled","type":"bool"}],"name":"setIsSpreadEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lastUpdatedAt","type":"uint256"}],"name":"setLastUpdatedAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_liquidityRouter","type":"address"}],"name":"setLiquidityRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_maxCumulativeDeltaDiffs","type":"uint256[]"}],"name":"setMaxCumulativeDeltaDiffs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxDeviationBasisPoints","type":"uint256"}],"name":"setMaxDeviationBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPriceUpdateDelay","type":"uint256"}],"name":"setMaxPriceUpdateDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTimeDeviation","type":"uint256"}],"name":"setMaxTimeDeviation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minAuthorizations","type":"uint256"}],"name":"setMinAuthorizations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBlockInterval","type":"uint256"}],"name":"setMinBlockInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_positionRouter","type":"address"}],"name":"setPositionRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceDataInterval","type":"uint256"}],"name":"setPriceDataInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceDuration","type":"uint256"}],"name":"setPriceDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceBits","type":"uint256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setPricesWithBits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceBits","type":"uint256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"},{"internalType":"uint256","name":"_endIndexForIncreasePositions","type":"uint256"},{"internalType":"uint256","name":"_endIndexForDecreasePositions","type":"uint256"},{"internalType":"uint256","name":"_endIndexForSwaps","type":"uint256"},{"internalType":"uint256","name":"_endIndexForAddLiquidities","type":"uint256"},{"internalType":"uint256","name":"_endIndexForRemoveLiquidities","type":"uint256"}],"name":"setPricesWithBitsAndExecute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_spreadBasisPointsIfChainError","type":"uint256"}],"name":"setSpreadBasisPointsIfChainError","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_spreadBasisPointsIfInactive","type":"uint256"}],"name":"setSpreadBasisPointsIfInactive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_swapRouter","type":"address"}],"name":"setSwapRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenManager","type":"address"}],"name":"setTokenManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_tokenPrecisions","type":"uint256[]"}],"name":"setTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setUpdater","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vaultPriceFeed","type":"address"}],"name":"setVaultPriceFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"spreadBasisPointsIfChainError","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"spreadBasisPointsIfInactive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenPrecisions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultPriceFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103225760003560e01c806303b049361461032757806303cd25711461036157806303f4d7dc1461037b5780630604ddea146104205780630e9272ea14610428578063126082cf1461044c57806312d43a511461045457806314dd2dce1461045c578063162ac4e01461047957806317835d1c1461049f5780631a153391146104c2578063238aafb7146104f05780632470294414610516578063287800c91461051e5780632a709b14146105265780632e9cd94b1461052e57806331cb61051461054b578063392e53cd146105795780633aa08f8614610581578063412736571461058957806344c23193146105af5780634bd66c1c146104205780634c0e31c8146105cc5780634d11fb4a146106ef5780634f64b2be1461070c5780634fdfb0861461072957806354aea1271461074f57806361ef161f14610757578063668d3d651461075f578063695d4184146107675780636c56fd051461076f5780636ccd47c4146107955780636e5052631461079d578063715c75361461091c57806372279ba11461092457806374bfed8914610970578063776d16c114610978578063782661bc146109955780637cb2b79c14610aba5780637df73e2714610ae05780637fbc79c614610b065780637fece36814610c30578063807c97821461042057806382553aad14610c645780638b7677f414610c8157806395082d2514610c9e5780639c8a18c114610ca6578063a2b47c1614610ce7578063a374242514610cef578063a6eca89614610d15578063b0a2566614610d1d578063b3606b5614610d25578063b70c7b7014610d2d578063c31c9c0714610d4a578063c8390a4814610d52578063c84a912414610e75578063cab44b7614610e7d578063cd6e18f114610edb578063ce98dfa814610f01578063cfaa55eb14610f20578063cfad57a214610f46578063cfed246b14610f6c578063d6a153f114610f92578063d925351a14610faf578063de0d1b9414610fcc578063dfb481c914610fe9578063e64559ad14610ff1578063e68a22c014610ff9578063eeaa783a14611001578063f90ce5ba14611009575b600080fd5b61034d6004803603602081101561033d57600080fd5b50356001600160a01b0316611011565b604080519115158252519081900360200190f35b610369611026565b60408051918252519081900360200190f35b61041e6004803603604081101561039157600080fd5b810190602081018135600160201b8111156103ab57600080fd5b8201836020820111156103bd57600080fd5b803590602001918460208302840111600160201b831117156103de57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550509135925061102c915050565b005b6103696111a3565b6104306111ab565b604080516001600160a01b039092168252519081900360200190f35b6103696111ba565b6104306111c0565b61041e6004803603602081101561047257600080fd5b50356111cf565b61041e6004803603602081101561048f57600080fd5b50356001600160a01b0316611221565b61041e600480360360408110156104b557600080fd5b5080359060200135611290565b61041e600480360360408110156104d857600080fd5b506001600160a01b03813516906020013515156112ec565b61041e6004803603602081101561050657600080fd5b50356001600160a01b0316611364565b6104306113d3565b6103696113e2565b6104306113e8565b61041e6004803603602081101561054457600080fd5b50356113f7565b61041e6004803603604081101561056157600080fd5b506001600160a01b0381351690602001351515611449565b61034d6114c1565b6103696114d1565b61041e6004803603602081101561059f57600080fd5b50356001600160a01b03166114d7565b61041e600480360360208110156105c557600080fd5b5035611546565b61041e600480360360408110156105e257600080fd5b810190602081018135600160201b8111156105fc57600080fd5b82018360208201111561060e57600080fd5b803590602001918460208302840111600160201b8311171561062f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561067e57600080fd5b82018360208201111561069057600080fd5b803590602001918460208302840111600160201b831117156106b157600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506115da945050505050565b6103696004803603602081101561070557600080fd5b5035611685565b6104306004803603602081101561072257600080fd5b50356116a3565b61034d6004803603602081101561073f57600080fd5b50356001600160a01b03166116ca565b6103696116df565b6104306116e5565b6103696116f4565b61034d6116fb565b61034d6004803603602081101561078557600080fd5b50356001600160a01b031661170b565b61041e611796565b61083e600480360360208110156107b357600080fd5b810190602081018135600160201b8111156107cd57600080fd5b8201836020820111156107df57600080fd5b803590602001918460208302840111600160201b8311171561080057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506118a9945050505050565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561088657818101518382015260200161086e565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156108c55781810151838201526020016108ad565b50505050905001848103825285818151815260200191508051906020019060200280838360005b838110156109045781810151838201526020016108ec565b50505050905001965050505050505060405180910390f35b610369611ae5565b61094a6004803603602081101561093a57600080fd5b50356001600160a01b0316611aeb565b604080519485526020850193909352838301919091526060830152519081900360800190f35b610369611b69565b61041e6004803603602081101561098e57600080fd5b5035611b6f565b61041e600480360360608110156109ab57600080fd5b810190602081018135600160201b8111156109c557600080fd5b8201836020820111156109d757600080fd5b803590602001918460208302840111600160201b831117156109f857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610a4757600080fd5b820183602082011115610a5957600080fd5b803590602001918460208302840111600160201b83111715610a7a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250611bc1915050565b61041e60048036036020811015610ad057600080fd5b50356001600160a01b0316611c8f565b61034d60048036036020811015610af657600080fd5b50356001600160a01b0316611cfe565b61041e60048036036060811015610b1c57600080fd5b81359190810190604081016020820135600160201b811115610b3d57600080fd5b820183602082011115610b4f57600080fd5b803590602001918460208302840111600160201b83111715610b7057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610bbf57600080fd5b820183602082011115610bd157600080fd5b803590602001918460208302840111600160201b83111715610bf257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611d13945050505050565b61036960048036036060811015610c4657600080fd5b506001600160a01b0381351690602081013590604001351515611e6c565b61041e60048036036020811015610c7a57600080fd5b5035611ffe565b61041e60048036036020811015610c9757600080fd5b5035612050565b6103696120a2565b61041e600480360360e0811015610cbc57600080fd5b5080359060208101359060408101359060608101359060808101359060a08101359060c001356120b2565b61036961232b565b61036960048036036020811015610d0557600080fd5b50356001600160a01b0316612332565b610369612344565b61036961234a565b610369612350565b61041e60048036036020811015610d4357600080fd5b5035612356565b6104306123a8565b61041e60048036036040811015610d6857600080fd5b810190602081018135600160201b811115610d8257600080fd5b820183602082011115610d9457600080fd5b803590602001918460208302840111600160201b83111715610db557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610e0457600080fd5b820183602082011115610e1657600080fd5b803590602001918460208302840111600160201b83111715610e3757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506123b7945050505050565b61041e612481565b610ea360048036036020811015610e9357600080fd5b50356001600160a01b0316612598565b604080516001600160a01b03909516855263ffffffff9384166020860152918316848301529091166060830152519081900360800190f35b61041e60048036036020811015610ef157600080fd5b50356001600160a01b03166125d7565b61041e60048036036020811015610f1757600080fd5b50351515612646565b61041e60048036036020811015610f3657600080fd5b50356001600160a01b03166126b1565b61041e60048036036020811015610f5c57600080fd5b50356001600160a01b0316612720565b61036960048036036020811015610f8257600080fd5b50356001600160a01b031661278f565b61041e60048036036020811015610fa857600080fd5b50356127a1565b61041e60048036036020811015610fc557600080fd5b50356127f3565b61041e60048036036020811015610fe257600080fd5b5035612845565b610369612897565b61036961289d565b6103696128a3565b6104306128ae565b6103696128bd565b60186020526000908152604090205460ff1681565b60095481565b3360009081526013602052604090205460ff1661107e576040805162461bcd60e51b815260206004820152601860248201526000805160206132fc833981519152604482015290519081900360640190fd5b6000611089826128c3565b9050801561119d576002546001546001600160a01b03918216911660005b85518110156111995760008682815181106110be57fe5b6020026020010151905060005b600881101561118f576019546008840282019081106110f0575050505050505061119f565b60198054602084029185831c63ffffffff16916000919060088902870190811061111657fe5b6000918252602082200154601a80546001600160a01b0390921693509060088a02880190811061114257fe5b6000918252602082200154915061116f826111698668327cb2734119d3b7a9601e1b6129cf565b90612a31565b905061117d83828c8e612a70565b5050600190940193506110cb92505050565b50506001016110a7565b5050505b505b5050565b63ffffffff81565b6002546001600160a01b031681565b61271081565b6000546001600160a01b031681565b6000546001600160a01b0316331461121c576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600755565b6000546001600160a01b0316331461126e576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526013602052604090205460ff166112e2576040805162461bcd60e51b815260206004820152601860248201526000805160206132fc833981519152604482015290519081900360640190fd5b61119f8282612d05565b6000546001600160a01b03163314611339576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152601360205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146113b1576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b60115481565b6003546001600160a01b031681565b6000546001600160a01b03163314611444576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600f55565b6000546001600160a01b03163314611496576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152601760205260409020805460ff1916911515919091179055565b600054600160a01b900460ff1681565b600e5481565b6000546001600160a01b03163314611524576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611593576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b620151808111156115d55760405162461bcd60e51b815260040180806020018281038252602581526020018061328d6025913960400191505060405180910390fd5b600955565b6000546001600160a01b03163314611627576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b60005b825181101561119d57600083828151811061164157fe5b6020026020010151905082828151811061165757fe5b6020908102919091018101516001600160a01b0390921660009081526016909152604090205560010161162a565b601a818154811061169257fe5b600091825260209091200154905081565b601981815481106116b057fe5b6000918252602090912001546001600160a01b0316905081565b60136020526000908152604090205460ff1681565b60075481565b6004546001600160a01b031681565b6201518081565b600054600160a81b900460ff1681565b60008054600160a81b900460ff161561172657506000611791565b6011546012541061173957506000611791565b60008061174584611aeb565b935093505050818111801561177a57506001600160a01b0384166000908152601660205260409020546117788284612ddb565b115b1561178a57600092505050611791565b6001925050505b919050565b3360009081526017602052604090205460ff166117e8576040805162461bcd60e51b815260206004820152601860248201526000805160206132fc833981519152604482015290519081900360640190fd5b3360009081526018602052604090205460ff1661184c576040805162461bcd60e51b815260206004820152601e60248201527f466173745072696365466565643a20616c726561647920656e61626c65640000604482015290519081900360640190fd5b336000908152601860205260409020805460ff19169055601254611871906001612ddb565b6012556040805133815290517f9fe0c305c33aa92757a537936872a60be0d91549a4303cc99fd8b7fce8a002759181900360200190a1565b6040805160018082528183019092526060918291829182919060208083019080368337019050509050606085516007016001600160401b03811180156118ee57600080fd5b50604051908082528060200260200182016040528015611918578160200160208202803683370190505b50604080516001808252818301909252919250606091906020808301908036833750506000805486519394506001600160a01b03169286925061195757fe5b60200260200101906001600160a01b031690816001600160a01b031681525050600060159054906101000a900460ff168160008151811061199457fe5b602002602001019015159081151581525050600a54826000815181106119b657fe5b602002602001018181525050600b54826001815181106119d257fe5b602002602001018181525050600c54826002815181106119ee57fe5b602002602001018181525050600d5482600381518110611a0a57fe5b60200260200101818152505060105482600481518110611a2657fe5b602002602001018181525050600f5482600581518110611a4257fe5b60200260200101818152505060095482600681518110611a5e57fe5b60200260200101818152505060005b8751811015611ad7576000888281518110611a8457fe5b6020026020010151905060166000826001600160a01b03166001600160a01b0316815260200190815260200160002054848360070181518110611ac357fe5b602090810291909101015250600101611a6d565b509196909550909350915050565b60105481565b600080600080611af9613185565b505050506001600160a01b039182166000908152601560209081526040918290208251608081018452905494851680825263ffffffff600160a01b87048116938301849052600160c01b87048116948301859052600160e01b909604909516606090910181905293949093919250565b600b5481565b6000546001600160a01b03163314611bbc576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600e55565b3360009081526013602052604090205460ff16611c13576040805162461bcd60e51b815260206004820152601860248201526000805160206132fc833981519152604482015290519081900360640190fd5b6000611c1e826128c3565b90508015611c89576002546001546001600160a01b03918216911660005b8651811015611c85576000878281518110611c5357fe5b60200260200101519050611c7c81888481518110611c6d57fe5b60200260200101518587612a70565b50600101611c3c565b5050505b50505050565b6000546001600160a01b03163314611cdc576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60176020526000908152604090205460ff1681565b6000546001600160a01b03163314611d60576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1615611da95760405162461bcd60e51b81526004018080602001828103825260228152602001806133f06022913960400191505060405180910390fd5b6000805460ff60a01b1916600160a01b17815560118490555b8251811015611e15576000838281518110611dd957fe5b6020908102919091018101516001600160a01b03166000908152601790915260409020805460ff19166001908117909155919091019050611dc2565b5060005b8151811015611c89576000828281518110611e3057fe5b6020908102919091018101516001600160a01b03166000908152601390915260409020805460ff19166001908117909155919091019050611e19565b6000611e85600a54600754612e1d90919063ffffffff16565b421115611ee0578115611ec057611eb9612710611169611eb2600c54612710612e1d90919063ffffffff16565b86906129cf565b9050611ff7565b611eb9612710611169611eb2600c54612710612ddb90919063ffffffff16565b600954600754611eef91612e1d565b421115611f3c578115611f1c57611eb9612710611169611eb2600b54612710612e1d90919063ffffffff16565b611eb9612710611169611eb2600b54612710612ddb90919063ffffffff16565b6001600160a01b03841660009081526014602052604090205480611f635783915050611ff7565b83611f6f579050611ff7565b6000818511611f8757611f828286612ddb565b611f91565b611f918583612ddb565b9050611fa385611169836127106129cf565b90506000611fb08761170b565b1580611fbd575060105482115b90508015611ff1578415611fe457828611611fd85782611fda565b855b9350505050611ff7565b828610611fd85782611fda565b50909150505b9392505050565b6000546001600160a01b0316331461204b576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b601055565b6000546001600160a01b0316331461209d576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600a55565b68327cb2734119d3b7a9601e1b81565b3360009081526013602052604090205460ff16612104576040805162461bcd60e51b815260206004820152601860248201526000805160206132fc833981519152604482015290519081900360640190fd5b61210e8787612d05565b6004805460055460065460408051629a208160e81b81529485018a9052336024860152516001600160a01b039384169492841693909116918491639a2081009160448082019260009290919082900301818387803b15801561216f57600080fd5b505af1158015612183573d6000803e3d6000fd5b50506040805163f3883d8b60e01b8152600481018b905233602482015290516001600160a01b038716935063f3883d8b9250604480830192600092919082900301818387803b1580156121d557600080fd5b505af11580156121e9573d6000803e3d6000fd5b505060408051631206252d60e01b8152600481018a905233602482015290516001600160a01b0386169350631206252d9250604480830192600092919082900301818387803b15801561223b57600080fd5b505af115801561224f573d6000803e3d6000fd5b5050604080516349a653ff60e01b81526004810189905233602482015290516001600160a01b03851693506349a653ff9250604480830192600092919082900301818387803b1580156122a157600080fd5b505af11580156122b5573d6000803e3d6000fd5b505060408051633758f9eb60e11b81526004810188905233602482015290516001600160a01b0385169350636eb1f3d69250604480830192600092919082900301818387803b15801561230757600080fd5b505af115801561231b573d6000803e3d6000fd5b5050505050505050505050505050565b6298968081565b60166020526000908152604090205481565b600c5481565b60125481565b600d5481565b6000546001600160a01b031633146123a3576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600b55565b6005546001600160a01b031681565b6000546001600160a01b03163314612404576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b805182511461245a576040805162461bcd60e51b815260206004820152601e60248201527f466173745072696365466565643a20696e76616c6964206c656e677468730000604482015290519081900360640190fd5b815161246d9060199060208501906131ac565b50805161119d90601a906020840190613211565b3360009081526017602052604090205460ff166124d3576040805162461bcd60e51b815260206004820152601860248201526000805160206132fc833981519152604482015290519081900360640190fd5b3360009081526018602052604090205460ff1615612537576040805162461bcd60e51b815260206004820152601c60248201527b11985cdd141c9a58d9519959590e88185b1c9958591e481d9bdd195960221b604482015290519081900360640190fd5b336000908152601860205260409020805460ff1916600190811790915560125461256091612e1d565b6012556040805133815290517f4c0c5fabf50e808e3bc8d19577d305e3a7163eea7e8a74a50caa8896694cd44b9181900360200190a1565b6015602052600090815260409020546001600160a01b0381169063ffffffff600160a01b8204811691600160c01b8104821691600160e01b9091041684565b6000546001600160a01b03163314612624576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612693576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b60008054911515600160a81b0260ff60a81b19909216919091179055565b6000546001600160a01b031633146126fe576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461276d576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60146020526000908152604090205481565b6000546001600160a01b031633146127ee576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600d55565b6003546001600160a01b03163314612840576040805162461bcd60e51b815260206004820152601860248201526000805160206132fc833981519152604482015290519081900360640190fd5b601155565b6000546001600160a01b03163314612892576040805162461bcd60e51b815260206004820152601560248201526000805160206132dc833981519152604482015290519081900360640190fd5b600c55565b600f5481565b600a5481565b6001600160a01b0381565b6001546001600160a01b031681565b60085481565b600d546000901561291c57600d546008546128df904390612ddb565b101561291c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613399602e913960400191505060405180910390fd5b600e546129294282612ddb565b83116129665760405162461bcd60e51b815260040180806020018281038252602d81526020018061336c602d913960400191505060405180910390fd5b6129704282612e1d565b83106129ad5760405162461bcd60e51b815260040180806020018281038252602f81526020018061331c602f913960400191505060405180910390fd5b6007548310156129c1576000915050611791565b505060075543600855600190565b6000826129de57506000612a2b565b828202828482816129eb57fe5b0414612a285760405162461bcd60e51b815260040180806020018281038252602181526020018061334b6021913960400191505060405180910390fd5b90505b92915050565b6000612a2883836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b815250612e75565b6001600160a01b03821615612cdf576000826001600160a01b03166356bf9de4866040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612ace57600080fd5b505afa158015612ae2573d6000803e3d6000fd5b505050506040513d6020811015612af857600080fd5b50516001600160a01b038616600090815260146020526040812054919250808080612b228a611aeb565b93509350935093506000841115612be9576000848711612b4b57612b468588612ddb565b612b55565b612b558786612ddb565b905060008a8711612b6f57612b6a8b88612ddb565b612b79565b612b79878c612ddb565b9050612b90600f5442612a3190919063ffffffff16565b600f54612b9e908790612a31565b14612bac5760009350600092505b612bc7612bc08761116985629896806129cf565b8590612e1d565b9350612be4612bdd8861116984629896806129cf565b8490612e1d565b925050505b8181118015612c1857506001600160a01b038a16600090815260166020526040902054612c168284612ddb565b115b15612c7557604080516001600160a01b038c16815260208101889052808201879052606081018490526080810183905290517fe582322b389ad06b2bbf619cd6da3f16a288ec873ea0fa6df4d72f3d9480b4479181900360a00190a15b612c818a878484612f17565b604080516001600160a01b038c16815260208101889052808201879052606081018490526080810183905290517f23b9387f81fca646aac1dc4487ede045c65f5f7445482906565f01e05afdb3a89181900360a00190a15050505050505b6001600160a01b0384166000908152601460205260409020839055611c898185856130ad565b6000612d10826128c3565b9050801561119d576002546001546001600160a01b03918216911660005b60088110156111995760195481908110612d4c57505050505061119f565b60198054602084029189831c63ffffffff16916000919086908110612d6d57fe5b6000918252602082200154601a80546001600160a01b0390921693509087908110612d9457fe5b60009182526020822001549150612dbb826111698668327cb2734119d3b7a9601e1b6129cf565b9050612dc983828a8c612a70565b505060019094019350612d2e92505050565b6000612a2883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061312b565b600082820183811015612a28576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b60008183612f015760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612ec6578181015183820152602001612eae565b50505050905090810190601f168015612ef35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612f0d57fe5b0495945050505050565b6001600160a01b038310612f72576040805162461bcd60e51b815260206004820152601f60248201527f466173745072696365466565643a20696e76616c696420726566507269636500604482015290519081900360640190fd5b63ffffffff8210612fb45760405162461bcd60e51b81526004018080602001828103825260298152602001806133c76029913960400191505060405180910390fd5b63ffffffff8110612ff65760405162461bcd60e51b815260040180806020018281038252602a8152602001806132b2602a913960400191505060405180910390fd5b604080516080810182526001600160a01b03948516815263ffffffff4281166020808401918252958216838501908152948216606084019081529787166000908152601590965292909420905181549251935196518516600160e01b026001600160e01b03978616600160c01b0263ffffffff60c01b1995909616600160a01b0263ffffffff60a01b19929097166001600160a01b0319909416939093171694909417919091169190911792909216919091179055565b6001600160a01b0383166130c05761119d565b826001600160a01b031663e0409c7183836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561311757600080fd5b505af1158015611c85573d6000803e3d6000fd5b6000818484111561317d5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612ec6578181015183820152602001612eae565b505050900390565b60408051608081018252600080825260208201819052918101829052606081019190915290565b828054828255906000526020600020908101928215613201579160200282015b8281111561320157825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906131cc565b5061320d929150613258565b5090565b82805482825590600052602060002090810192821561324c579160200282015b8281111561324c578251825591602001919060010190613231565b5061320d929150613277565b5b8082111561320d5780546001600160a01b0319168155600101613259565b5b8082111561320d576000815560010161327856fe466173745072696365466565643a20696e76616c6964205f70726963654475726174696f6e466173745072696365466565643a20696e76616c69642063756d756c61746976654661737444656c7461476f7665726e61626c653a20666f7262696464656e0000000000000000000000466173745072696365466565643a20666f7262696464656e0000000000000000466173745072696365466565643a205f74696d657374616d70206578636565647320616c6c6f7765642072616e6765536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77466173745072696365466565643a205f74696d657374616d702062656c6f7720616c6c6f7765642072616e6765466173745072696365466565643a206d696e426c6f636b496e74657276616c206e6f742079657420706173736564466173745072696365466565643a20696e76616c69642063756d756c617469766552656644656c7461466173745072696365466565643a20616c726561647920696e697469616c697a6564a26469706673582212202b77f09d475bcc4bcbfc9992557eb77e548af93d68ce850099f3b33b44bdce7b64736f6c634300060c0033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading