ETH Price: $1,598.50 (+0.74%)

Contract

0x4E11C45163ce5Ab3b504021C858E09A034c1A904

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

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

Contract Source Code Verified (Exact Match)

Contract Name:
SettingsManagerV2

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.8.12;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol";

import "./interfaces/ISettingsManagerV2.sol";
import "./interfaces/IPositionKeeperV2.sol";
import "./interfaces/IVaultV2.sol";
import "./interfaces/IDelegatorManager.sol";
import {Constants} from "../constants/Constants.sol";

contract SettingsManagerV2 is ISettingsManagerV2, Constants, Initializable, UUPSUpgradeable, OwnableUpgradeable {
    address public RUSD;
    IPositionKeeperV2 public positionKeeper;
    address public positionHandler;
    IVaultV2 public vault;

    address public referralSystem;
    address public override feeManager;

    bool public override isEnableNonStableCollateral;
    bool public override marketOrderEnabled;
    bool public override referEnabled;
    bool public override pauseForexForCloseTime;
    bool public override isEnableConvertRUSD;
    bool public override isEnableUnstaking;
    bool public override isEmergencyStop;

    uint256 public maxOpenInterestPerUser;
    uint256 public priceMovementPercent;

    uint256 public override closeDeltaTime;
    uint256 public override cooldownDuration;
    uint256 public override delayDeltaTime;
    uint256 public override depositFee;
    uint256 public override feeRewardBasisPoints;
    uint256 public override liquidationFeeUsd;
    uint256 public override stakingFee;
    uint256 public override unstakingFee;
    uint256 public override triggerGasFee;
    uint256 public override positionDefaultSlippage;
    uint256 public override maxProfitPercent;
    uint256 public override basisFundingRateFactor;
    uint256 public override maxFundingRate;
    uint256 public override defaultBorrowFeeFactor; // 0.01% per hour

    mapping(address => bool) public override isCollateral;
    mapping(address => bool) public override isTradable;
    mapping(address => bool) public override isStable;
    mapping(address => bool) public override isStaking;

    mapping(address => mapping(bool => uint256)) public maxOpenInterestPerAssetPerSide;
    mapping(address => mapping(bool => uint256)) public openInterestPerAssetPerSide;

    mapping(address => mapping(bool => uint256)) public override cumulativeFundingRates;
    mapping(address => mapping(bool => uint256)) public override marginFeeBasisPoints; // = 100; // 0.1%
    mapping(address => uint256) public override lastFundingTimes;
    mapping(address => uint256) public override fundingRateFactor;
    mapping(address => uint256) public override borrowFeeFactor;
    mapping(address => int256) public override fundingIndex;

    mapping(bool => uint256) public maxOpenInterestPerSide;
    mapping(bool => uint256) public override openInterestPerSide;

    //Max price updated delay time vs block.timestamp
    uint256 public override maxPriceUpdatedDelay;
    mapping(address => uint256) public liquidateThreshold;
    mapping(address => uint256) public maxOpenInterestPerAsset;
    mapping(address => uint256) public override openInterestPerAsset;
    mapping(address => uint256) public override openInterestPerUser;

    mapping(address => EnumerableSetUpgradeable.AddressSet) private _delegatesByMaster; //Deprecated
    uint256 public override maxTriggerPriceLength;
    mapping(address => uint256) public override minimumVaultReserves;
    mapping(address => bool) public executors;

    bool public override disableFastExecuteForClosePosition;
    uint256 public override minimumOpenCollateral;
    bool public override notAllowContractCall;
    bool public override requiredValidateMarketSlippage;
    mapping(address => bool) public override isBlacklist;
    address public delegatorManager;
    uint256[44] private __gap;

    event FinalInitialized(
        address RUSD,
        address positionHandler,
        address positionKeeper,
        address vault
    );
    event SetReferralSystem(address indexed referralSystem);
    event SetEnableNonStableCollateral(bool isEnabled);
    event SetReferEnabled(bool referEnabled);
    event EnableForexMarket(bool _enabled);
    event EnableMarketOrder(bool _enabled);
    event SetDepositFee(uint256 indexed fee);
    event SetEnableCollateral(address indexed token, bool isEnabled);
    event SetEnableTradable(address indexed token, bool isEnabled);
    event SetEnableStable(address indexed token, bool isEnabled);
    event SetEnableStaking(address indexed token, bool isEnabled);
    event SetEnableUnstaking(bool isEnabled);
    event SetFundingRateFactor(address indexed token, uint256 fundingRateFactor);
    event SetLiquidationFeeUsd(uint256 indexed _liquidationFeeUsd);
    event SetMarginFeeBasisPoints(address indexed token, bool isLong, uint256 marginFeeBasisPoints);
    event SetMaxOpenInterestPerAsset(address indexed token, uint256 maxOIAmount);
    event SetMaxOpenInterestPerSide(bool isLong, uint256 maxOIAmount);
    event SetMaxOpenInterestPerUser(uint256 maxOIAmount);
    event SetStakingFee(uint256 indexed fee);
    event SetUnstakingFee(uint256 indexed fee);
    event SetTriggerGasFee(uint256 indexed fee);
    event SetVaultSettings(uint256 indexed cooldownDuration, uint256 feeRewardBasisPoints);
    event UpdateFundingRate(address indexed token, bool isLong, uint256 fundingRate, uint256 lastFundingTime);
    event UpdateTotalOpenInterest(address indexed token, bool isLong, uint256 amount, bool isIncrease);
    event UpdateCloseDeltaTime(uint256 deltaTime);
    event UpdateDelayDeltaTime(uint256 deltaTime);
    event UpdateFeeManager(address indexed feeManager);
    event UpdateThreshold(uint256 oldThreshold, uint256 newThredhold);
    event SetDefaultPositionSlippage(uint256 positionDefaultSlippage);
    event SetMaxPriceUpdatedDelay(uint256 maxPriceUpdatedDelay);
    event SetEnableConvertRUSD(bool enableConvertRUSD);
    event SetEmergencyStop(bool isEmergencyStop);
    event SetPriceMovementPercent(uint256 priceMovementPercent);
    event UpdateMaxProfitPercent(uint256 maxProfitPercent);
    event UpdateFunding(address indexed token, int256 fundingIndex);
    event SetMaxFundingRate(uint256 maxFundingRate);
    event SetMaxOpenInterestPerAssetPerSide(address indexed token, bool isLong, uint256 maxOIAmount);
    event SetBorrowFeeFactor(address indexToken, uint256 feeFactor);
    event SetMaxTriggerPriceLength(uint256 maxTriggerPriceLength);
    event SetMinimumVaultReserves(address token, uint256 minimumVaultReserve);
    event SetExecutor(address executor, bool isExecutor);
    event SetDisableFastExecuteForClosePosition(bool isDisabled);

    modifier hasPermission() {
        require(msg.sender == address(positionHandler), "Only position handler has access");
        _;
    }

    function initialize(address _RUSD) public reinitializer(5) {
        require(AddressUpgradeable.isContract(_RUSD), "RUSD invalid");
        __Ownable_init();
        RUSD = _RUSD;
        //_initSettings();
    }

    function _initSettings() internal {
        _setMaxFundingRate(MAX_FUNDING_RATE);
        marketOrderEnabled = true;
        isEnableNonStableCollateral = false;
        maxPriceUpdatedDelay = 5 minutes;
        defaultBorrowFeeFactor = 10;
        basisFundingRateFactor = 10000;
        maxProfitPercent = 10000; //10%
        positionDefaultSlippage = BASIS_POINTS_DIVISOR / 200; // 0.5%
        stakingFee = 300; // 0.3%
        depositFee = 300; // 0.3%
        delayDeltaTime = 1 minutes;
        priceMovementPercent = 500; // 0.5%
        // feeRewardBasisPoints = 50000; // 50%
        // cooldownDuration = 3 hours;
    }

    function finalInitialize(
        address _positionHandler,
        address _positionKeeper,
        address _vault
    ) public onlyOwner {
        require(AddressUpgradeable.isContract(_positionHandler), "Invalid positionHandler");
        positionHandler = _positionHandler;

        require(AddressUpgradeable.isContract(_positionKeeper), "Invalid positionKeeper");
        positionKeeper = IPositionKeeperV2(_positionKeeper);

        require(AddressUpgradeable.isContract(_vault), "Invalid vault");
        vault = IVaultV2(_vault);
        emit FinalInitialized(
            RUSD,
            _positionHandler,
            _positionKeeper,
            _vault
        );
    }

    function _authorizeUpgrade(address) internal override onlyOwner {}

    //Config functions
    function setReferralSystem(address _referralSystem) external onlyOwner {
        require(AddressUpgradeable.isContract(_referralSystem), "ReferralSystem invalid");
        referralSystem = _referralSystem;
        emit SetReferralSystem(_referralSystem);
    }

    function setEnableNonStableCollateral(bool _isEnabled) external onlyOwner {
        isEnableNonStableCollateral = _isEnabled;
        emit SetEnableNonStableCollateral(_isEnabled);
    }

    function setPositionDefaultSlippage(uint256 _slippage) external onlyOwner {
        require(_slippage >= 0 && _slippage < BASIS_POINTS_DIVISOR, "Invalid slippage");
        positionDefaultSlippage = _slippage;
        emit SetDefaultPositionSlippage(_slippage);
    }

    function setMaxPriceUpdatedDelay(uint256 _maxPriceUpdatedDelay) external onlyOwner {
        maxPriceUpdatedDelay = _maxPriceUpdatedDelay;
        emit SetMaxPriceUpdatedDelay(_maxPriceUpdatedDelay);
    }

    function setEnableUnstaking(bool _isEnable) external onlyOwner {
        isEnableUnstaking = _isEnable;
        emit SetEnableUnstaking(_isEnable);
    }

    function setStakingFee(uint256 _fee) external onlyOwner {
        require(_fee <= MAX_STAKING_FEE, "Staking fee is bigger than max");
        stakingFee = _fee;
        emit SetStakingFee(_fee);
    }

    function setUnstakingFee(uint256 _fee) external onlyOwner {
        require(_fee <= MAX_STAKING_FEE, "Unstaking fee is bigger than max");
        unstakingFee = _fee;
        emit SetUnstakingFee(_fee);
    }

    function setEmergencyStop(bool _isEmergencyStop) external onlyOwner {
        isEmergencyStop = _isEmergencyStop;
    }

    function setMaxProfitPercent(uint256 _maxProfitPercent) external onlyOwner {
        maxProfitPercent = _maxProfitPercent;
        emit UpdateMaxProfitPercent(_maxProfitPercent);
    }

    function setMaxFundingRate(uint256 _maxFundingRate) external onlyOwner {
        _setMaxFundingRate(_maxFundingRate);
    }

    function setMaxOpenInterestPerAssetPerSide(
        address _token,
        bool _isLong,
        uint256 _maxAmount
    ) external onlyOwner {
        maxOpenInterestPerAssetPerSide[_token][_isLong] = _maxAmount;
        emit SetMaxOpenInterestPerAssetPerSide(_token, _isLong, _maxAmount);
    }
    //End config functions

    function decreaseOpenInterest(
        address _token,
        address _sender,
        bool _isLong,
        uint256 _amount
    ) external override hasPermission {
        if (openInterestPerUser[_sender] < _amount) {
            openInterestPerUser[_sender] = 0;
        } else {
            openInterestPerUser[_sender] -= _amount;
        }

        if (openInterestPerAsset[_token] < _amount) {
            openInterestPerAsset[_token] = 0;
        } else {
            openInterestPerAsset[_token] -= _amount;
        }
        
        if (openInterestPerSide[_isLong] < _amount) {
            openInterestPerSide[_isLong] = 0;
        } else {
            openInterestPerSide[_isLong] -= _amount;
        }

        if (openInterestPerAssetPerSide[_token][_isLong] < _amount) {
            openInterestPerAssetPerSide[_token][_isLong] = 0;
        } else {
            openInterestPerAssetPerSide[_token][_isLong] -= _amount;
        }

        emit UpdateTotalOpenInterest(_token, _isLong, _amount, false);
    }

    function enableMarketOrder(bool _enable) external onlyOwner {
        marketOrderEnabled = _enable;
        emit EnableMarketOrder(_enable);
    }

    function enableForexMarket(bool _enable) external onlyOwner {
        pauseForexForCloseTime = _enable;
        emit EnableForexMarket(_enable);
    }

    function increaseOpenInterest(
        address _token,
        address _sender,
        bool _isLong,
        uint256 _amount
    ) external override hasPermission {
        openInterestPerUser[_sender] += _amount;
        openInterestPerAsset[_token] += _amount;
        openInterestPerSide[_isLong] += _amount;
        openInterestPerAssetPerSide[_token][_isLong] += _amount;
        emit UpdateTotalOpenInterest(_token, _isLong, _amount, true);
    }

    function setFeeManager(address _feeManager) external onlyOwner {
        feeManager = _feeManager;
        emit UpdateFeeManager(_feeManager);
    }

    function setVaultSettings(uint256 _cooldownDuration, uint256 _feeRewardsBasisPoints) external onlyOwner {
        require(_feeRewardsBasisPoints >= 0 && _feeRewardsBasisPoints <= MAX_FEE_REWARD_BASIS_POINTS, "Invalid feeRewardsBasisPoints");
        cooldownDuration = _cooldownDuration;
        feeRewardBasisPoints = _feeRewardsBasisPoints;
        emit SetVaultSettings(cooldownDuration, feeRewardBasisPoints);
    }

    function setCloseDeltaTime(uint256 _deltaTime) external onlyOwner {
        require(_deltaTime <= MAX_DELTA_TIME, "CloseDeltaTime is bigger than max");
        closeDeltaTime = _deltaTime;
        emit UpdateCloseDeltaTime(_deltaTime);
    }

    function setDelayDeltaTime(uint256 _deltaTime) external onlyOwner {
        require(_deltaTime <= MAX_DELTA_TIME, "DelayDeltaTime is bigger than max");
        delayDeltaTime = _deltaTime;
        emit UpdateDelayDeltaTime(_deltaTime);
    }

    function setDepositFee(uint256 _fee) external onlyOwner {
        require(_fee <= MAX_DEPOSIT_FEE, "Deposit fee is bigger than max");
        depositFee = _fee;
        emit SetDepositFee(_fee);
    }

    function setEnableCollateral(address _token, bool _isEnabled) external onlyOwner {
        isCollateral[_token] = _isEnabled;
        emit SetEnableCollateral(_token, _isEnabled);
    }

    function setEnableTradable(address _token, bool _isEnabled) external onlyOwner {
        isTradable[_token] = _isEnabled;
        emit SetEnableTradable(_token, _isEnabled);
    }

    function setEnableStable(address _token, bool _isEnabled) external onlyOwner {
        isStable[_token] = _isEnabled;
        emit SetEnableStable(_token, _isEnabled);
    }

    function setEnableStaking(address _token, bool _isEnabled) external onlyOwner {
        isStaking[_token] = _isEnabled;
        emit SetEnableStaking(_token, _isEnabled);
    }

    function setFundingRateFactor(address _token, uint256 _fundingRateFactor) external onlyOwner {
        require(_fundingRateFactor <= MAX_FUNDING_RATE_FACTOR, "FundingRateFactor should be smaller than MAX");
        fundingRateFactor[_token] = _fundingRateFactor;
        emit SetFundingRateFactor(_token, _fundingRateFactor);
    }

    function setLiquidateThreshold(uint256 _newThreshold, address _token) external onlyOwner {
        emit UpdateThreshold(liquidateThreshold[_token], _newThreshold);
        require(_newThreshold < BASIS_POINTS_DIVISOR, "Threshold should be smaller than MAX");
        liquidateThreshold[_token] = _newThreshold;
    }

    function setLiquidationFeeUsd(uint256 _liquidationFeeUsd) external onlyOwner {
        require(_liquidationFeeUsd <= MAX_LIQUIDATION_FEE_USD, "LiquidationFeeUsd should be smaller than MAX");
        liquidationFeeUsd = _liquidationFeeUsd;
        emit SetLiquidationFeeUsd(_liquidationFeeUsd);
    }

    function setMarginFeeBasisPoints(address _token, bool _isLong, uint256 _marginFeeBasisPoints) external onlyOwner {
        require(_marginFeeBasisPoints <= MAX_FEE_BASIS_POINTS, "MarginFeeBasisPoints should be smaller than MAX");
        marginFeeBasisPoints[_token][_isLong] = _marginFeeBasisPoints;
        emit SetMarginFeeBasisPoints(_token, _isLong, _marginFeeBasisPoints);
    }

    function setMaxOpenInterestPerAsset(address _token, uint256 _maxAmount) external onlyOwner {
        maxOpenInterestPerAsset[_token] = _maxAmount;
        emit SetMaxOpenInterestPerAsset(_token, _maxAmount);
    }

    function setMaxOpenInterestPerSide(bool _isLong, uint256 _maxAmount) external onlyOwner {
        maxOpenInterestPerSide[_isLong] = _maxAmount;
        emit SetMaxOpenInterestPerSide(_isLong, _maxAmount);
    }

    function setMaxOpenInterestPerUser(uint256 _maxAmount) external onlyOwner {
        maxOpenInterestPerUser = _maxAmount;
        emit SetMaxOpenInterestPerUser(_maxAmount);
    }

    function setReferEnabled(bool _referEnabled) external onlyOwner {
        referEnabled = _referEnabled;
        emit SetReferEnabled(referEnabled);
    }

    function setTriggerGasFee(uint256 _fee) external onlyOwner {
        require(_fee <= MAX_TRIGGER_GAS_FEE, "TriggerGasFee exceeded max");
        triggerGasFee = _fee;
        emit SetTriggerGasFee(_fee);
    }

    function setEnableConvertRUSD(bool _isEnableConvertRUSD) external onlyOwner {
        isEnableConvertRUSD = _isEnableConvertRUSD;
        emit SetEnableConvertRUSD(_isEnableConvertRUSD);
    }

    function getFeesV2(
        bytes32 _key,
        uint256 _sizeDelta,
        uint256 _loanDelta,
        bool _isApplyTradingFee,
        bool _isApplyBorrowFee,
        bool _isApplyFundingFee
    ) external view override returns (uint256, int256) {
        require(address(positionKeeper) != address(0), "PositionKeeper not initialized");
        Position memory position = positionKeeper.getPosition(_key);
        require(position.owner != address(0) && position.size > 0, "Position notExist");

        return getFees(
            _sizeDelta,
            _loanDelta,
            _isApplyTradingFee,
            _isApplyBorrowFee,
            _isApplyFundingFee,
            position
        );
    }

    function getFees(
        uint256 _sizeDelta,
        uint256 _loanDelta,
        bool _isApplyTradingFee,
        bool _isApplyBorrowFee,
        bool _isApplyFundingFee,
        Position memory _position
    ) public view returns (uint256, int256) {
        uint256 tradingFee = 0;

        if (_isApplyTradingFee) {
            tradingFee = _sizeDelta == 0 ? 0
                : getPositionFee(
                    _position.indexToken,
                    _position.isLong,
                    _sizeDelta
            );
        }

        if (_isApplyBorrowFee && _loanDelta > 0) {
            tradingFee += getBorrowFee(_position.indexToken, _loanDelta, _position.lastIncreasedTime);
        }

        if (_position.previousFee > 0) {
            tradingFee += _position.previousFee;
        }

        int256 fundingFee = 0;
        
        if (_isApplyFundingFee) {
           fundingFee = getFundingFee(_position.indexToken, _position.isLong, _position.size, _position.entryFunding);
        }

        return (tradingFee, fundingFee);
    }

    function validatePosition(
        address _account,
        address _indexToken,
        bool _isLong,
        uint256 _size,
        uint256 _collateral
    ) external view override {
        if (_size == 0) {
            require(_collateral == 0, "Collateral must not zero");
            return;
        }

        require(_size >= _collateral, "Position size should be greater than collateral");
        require(
            openInterestPerSide[_isLong] + _size <=
                (
                    maxOpenInterestPerSide[_isLong] > 0
                        ? maxOpenInterestPerSide[_isLong]
                        : DEFAULT_MAX_OPEN_INTEREST
                ),
            "MAX OI per side exceeded"
        );
        require(
            openInterestPerAsset[_indexToken] + _size <=
                (
                    maxOpenInterestPerAsset[_indexToken] > 0
                        ? maxOpenInterestPerAsset[_indexToken]
                        : DEFAULT_MAX_OPEN_INTEREST
                ),
            "MAX OI per asset exceeded"
        );
        require(
            openInterestPerUser[_account] + _size <=
                (maxOpenInterestPerUser > 0 ? maxOpenInterestPerUser : DEFAULT_MAX_OPEN_INTEREST),
            "Max OI per user exceeded"
        );
        require(
            openInterestPerAssetPerSide[_indexToken][_isLong] + _size <=
                maxOpenInterestPerAssetPerSide[_indexToken][_isLong],
            "Max OI per asset/size exceeded"
        );
    }

    function getPositionFee(
        address _indexToken,
        bool _isLong,
        uint256 _sizeDelta
    ) public view override returns (uint256) {
        if (_sizeDelta == 0) {
            return 0;
        }

        return (_sizeDelta * marginFeeBasisPoints[_indexToken][_isLong]) / BASIS_POINTS_DIVISOR;
    }

    function isApprovalCollateralToken(address _token) external view override returns (bool) {
        return _isApprovalCollateralToken(_token, false);
    }

    function isApprovalCollateralToken(address _token, bool _raise) external view override returns (bool) {
        return _isApprovalCollateralToken(_token, _raise);
    }

    function _isApprovalCollateralToken(address _token, bool _raise) internal view returns (bool) {
        bool isStableToken = isStable[_token];
        bool isCollateralToken = isCollateral[_token];
        
        if (isStableToken && isCollateralToken) {
            revert("Invalid config, token should only belong to stable or collateral");
        }

        bool isApproval = isStableToken || isCollateralToken;

        if (_raise && !isApproval) {
            revert("Invalid approval token");
        }

        return isApproval;
    }

    function getFeeManager() external override view returns (address) {
        require(feeManager != address(0), "Fee manager not initialized");
        return feeManager;
    }

    function setPriceMovementPercent(uint256 _priceMovementPercent) external onlyOwner {
        priceMovementPercent = _priceMovementPercent;
        emit SetPriceMovementPercent(_priceMovementPercent);
    }

    function getFundingRate(address _indexToken, address _collateralToken) public view override returns (int256) {
        uint256 vaultPoolAmount = vault.poolAmounts(_collateralToken);

        if (vaultPoolAmount == 0) {
            return 0;
        }

        uint256 totalLong = positionKeeper.globalAmounts(_indexToken, true);
        uint256 totalShort = positionKeeper.globalAmounts(_indexToken, false);
        bool isLongOverShort = totalLong >= totalShort;
        uint256 diff = isLongOverShort ? totalLong - totalShort : totalShort - totalLong;
        int256 multiplier = isLongOverShort ? int256(1) : int256(-1);

        uint256 fundingRate = (diff * fundingRateFactor[_indexToken] * basisFundingRateFactor * BASIS_POINTS_DIVISOR) 
            / vaultPoolAmount;

        if (fundingRate > maxFundingRate) {
            fundingRate = maxFundingRate;
        }
        
        return multiplier * int256(fundingRate);
    }

    function getBorrowFee(
        address _indexToken,
        uint256 _loanDelta,
        uint256 _lastIncreasedTime
    ) public view override returns (uint256) {
        if (_loanDelta == 0) {
            return 0;
        }

        uint256 feeFactor = borrowFeeFactor[_indexToken];

        if (feeFactor == 0) {
            feeFactor = defaultBorrowFeeFactor;
        }

        return feeFactor == 0 ? 0 
            : ((block.timestamp - _lastIncreasedTime) * _loanDelta * feeFactor) /
                BASIS_POINTS_DIVISOR /
                1 hours;
    }

    function getFundingFee(
        address _indexToken,
        bool _isLong,
        uint256 _size,
        int256 _fundingIndex
    ) public view override returns (int256) {
        if (_fundingIndex == 0) {
            return 0;
        }

        return
            _isLong
                ? (int256(_size) * (fundingIndex[_indexToken] - _fundingIndex)) / int256(FUNDING_RATE_PRECISION)
                : (int256(_size) * (_fundingIndex - fundingIndex[_indexToken])) / int256(FUNDING_RATE_PRECISION);
    }

    function updateFunding(address _indexToken, address _collateralToken) external override {
        require(msg.sender == address(positionHandler), "Forbidden");

        if (lastFundingTimes[_indexToken] != 0) {
            fundingIndex[_indexToken] += (getFundingRate(_indexToken, _collateralToken) 
                * int256(block.timestamp - lastFundingTimes[_indexToken])) / int256(1 hours);

            emit UpdateFunding(_indexToken, fundingIndex[_indexToken]);
        }

        lastFundingTimes[_indexToken] = block.timestamp;
    }

    function setBorrowFeeFactor(address _indexToken, uint256 _borrowFeeFactor) external onlyOwner {
        borrowFeeFactor[_indexToken] = _borrowFeeFactor;
        emit SetBorrowFeeFactor(_indexToken, _borrowFeeFactor);
    }

    /*
    @dev: Validate collateral path and return shouldSwap
    */
    function validateCollateralPathAndCheckSwap(address[] memory _path) external override view returns (bool) {
        require(_path.length > 1, "Invalid path length");
        //Trading token index start from 1
        address[] memory collateralPath = _extractCollateralPath(_path, 1);
        uint256 collateralPathLength = collateralPath.length;

        if (isEnableNonStableCollateral) {
            require(collateralPathLength == 1, "Invalid collateral path length, must be 1");
            _isApprovalCollateralToken(collateralPath[0], true);
            return false;
        } else {
            require(collateralPathLength >= 1, "Invalid collateral path length");
            require(isStable[collateralPath[collateralPathLength - 1]], "Last collateral path must be stable");

            if (collateralPathLength > 1 && !isCollateral[collateralPath[0]]) {
                revert("First collateral path must be collateral");
            }

            return collateralPath.length > 1;
        }
    }

    function _extractCollateralPath(address[] memory _path, uint256 _startIndex) internal pure returns (address[] memory) {
        require(_path.length > 1 && _path.length <= 3, "Invalid path length");
        address[] memory newPath;

        if (_path.length == 2 && _startIndex == 1) {
            newPath = new address[](1);
            newPath[0] = _path[1];
            return newPath;
        }

        require(_startIndex < _path.length - 1, "Invalid start index");
        newPath = new address[](_path.length - _startIndex);
        uint256 count = 0;

        for (uint256 i = _startIndex; i < _path.length; i++) {
            newPath[count] = _path[i];
            count++;
        }

        return newPath;
    }

    function _setMaxFundingRate(uint256 _maxFundingRate) internal {
        require(_maxFundingRate < FUNDING_RATE_PRECISION, "Invalid maxFundingRate");
        maxFundingRate = _maxFundingRate;
        emit SetMaxFundingRate(_maxFundingRate);
    }

    function setMaxTriggerPriceLength(uint256 _maxTriggerPriceLength) external onlyOwner {
        require(_maxTriggerPriceLength > 0, "Invalid maxTriggerPriceLength");
        maxTriggerPriceLength = _maxTriggerPriceLength;
        emit SetMaxTriggerPriceLength(_maxTriggerPriceLength);
    }

    /*
    @dev: Set minimum reserve token for vault, called by executor
    */
    function setMinimumVaultReserve(address _token, uint256 _minReserve) external {
        require(executors[msg.sender], "FBD");
        minimumVaultReserves[_token] = _minReserve;
        emit SetMinimumVaultReserves(_token, _minReserve);
    }

    function getMinimumReserve(address _token) external view returns (uint256) {
        return minimumVaultReserves[_token];
    }

    function setExecutor(address _executor, bool _isExecutor) external onlyOwner {
        executors[_executor] = _isExecutor;
        emit SetExecutor(_executor, _isExecutor);
    }

    function setDisableFastExecuteForClosePosition(bool _isDisabled) external onlyOwner {
        disableFastExecuteForClosePosition = _isDisabled;
        emit SetDisableFastExecuteForClosePosition(_isDisabled);
    }

    function setMinimumOpenCollateral(uint256 _minimumOpenCollateral) external onlyOwner {
        minimumOpenCollateral = _minimumOpenCollateral;
    }

    function setNotAllowContractCall(bool _isNotAllow) external onlyOwner {
        notAllowContractCall = _isNotAllow;
    }

    function setBlacklist(address _account, bool _isBlacklist) external onlyOwner {
        isBlacklist[_account] = _isBlacklist;
    }

    function setRequiredValidateMarketSlippage(bool _requiredValidate) external onlyOwner {
        requiredValidateMarketSlippage = _requiredValidate;
    }

    function validateCaller(address _account) override external view {
        if (notAllowContractCall) {
            require(!AddressUpgradeable.isContract(_account), "FBD");
        }

        require(!isBlacklist[_account], "Blacklist");
    }

    /*
    @dev: Fix openInterestPerAssetPerSide wrong
    */
    function setOpenInterestPerAssetPerSide(address _token, bool _isLong, uint256 _amount) external onlyOwner {
        openInterestPerAssetPerSide[_token][_isLong] = _amount;
    }
    
    function setDelegatorManager(address _delegatorManager) external onlyOwner {
        delegatorManager = _delegatorManager;
    }

    function checkDelegation(
        address _account,
        address _delegatee,
        bool _raise
    ) external view returns (bool) {
        require(!AddressUpgradeable.isContract(_account) 
            && !AddressUpgradeable.isContract(_delegatee), "FBD");

        if (_account == _delegatee) {
            return true;
        }

        bool res = IDelegatorManager(delegatorManager).checkDelegation(_account, _delegatee);

        if (_raise && !res) {
            revert("Not delegatee");
        }

        return res;
    }
}

File 2 of 21 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 3 of 21 : draft-IERC1822Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)

pragma solidity ^0.8.0;

/**
 * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
 * proxy whose upgrades are fully controlled by the current implementation.
 */
interface IERC1822ProxiableUpgradeable {
    /**
     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
     * address.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy.
     */
    function proxiableUUID() external view returns (bytes32);
}

File 4 of 21 : IERC1967Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)

pragma solidity ^0.8.0;

/**
 * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
 *
 * _Available since v4.8.3._
 */
interface IERC1967Upgradeable {
    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Emitted when the beacon is changed.
     */
    event BeaconUpgraded(address indexed beacon);
}

File 5 of 21 : IBeaconUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeaconUpgradeable {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {BeaconProxy} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}

File 6 of 21 : ERC1967UpgradeUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)

pragma solidity ^0.8.2;

import "../beacon/IBeaconUpgradeable.sol";
import "../../interfaces/IERC1967Upgradeable.sol";
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/StorageSlotUpgradeable.sol";
import "../utils/Initializable.sol";

/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 *
 * _Available since v4.1._
 */
abstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {
    function __ERC1967Upgrade_init() internal onlyInitializing {
    }

    function __ERC1967Upgrade_init_unchained() internal onlyInitializing {
    }
    // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Returns the current implementation address.
     */
    function _getImplementation() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
        StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Perform implementation upgrade
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Perform implementation upgrade with additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {
        _upgradeTo(newImplementation);
        if (data.length > 0 || forceCall) {
            AddressUpgradeable.functionDelegateCall(newImplementation, data);
        }
    }

    /**
     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {
        // Upgrades from old implementations will perform a rollback test. This test requires the new
        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
        // this special case will break upgrade paths from old UUPS implementation to new ones.
        if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
            _setImplementation(newImplementation);
        } else {
            try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
                require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
            } catch {
                revert("ERC1967Upgrade: new implementation is not UUPS");
            }
            _upgradeToAndCall(newImplementation, data, forceCall);
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Returns the current admin.
     */
    function _getAdmin() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        require(newAdmin != address(0), "ERC1967: new admin is the zero address");
        StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {AdminChanged} event.
     */
    function _changeAdmin(address newAdmin) internal {
        emit AdminChanged(_getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
     */
    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Returns the current beacon.
     */
    function _getBeacon() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
        require(
            AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
            "ERC1967: beacon implementation is not a contract"
        );
        StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
    }

    /**
     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
     *
     * Emits a {BeaconUpgraded} event.
     */
    function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);
        if (data.length > 0 || forceCall) {
            AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
        }
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 7 of 21 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized != type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 8 of 21 : UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol)

pragma solidity ^0.8.0;

import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../ERC1967/ERC1967UpgradeUpgradeable.sol";
import "./Initializable.sol";

/**
 * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
 * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
 *
 * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
 * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
 * `UUPSUpgradeable` with a custom implementation of upgrades.
 *
 * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
 *
 * _Available since v4.1._
 */
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
    function __UUPSUpgradeable_init() internal onlyInitializing {
    }

    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
    }
    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
    address private immutable __self = address(this);

    /**
     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is
     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
     * fail.
     */
    modifier onlyProxy() {
        require(address(this) != __self, "Function must be called through delegatecall");
        require(_getImplementation() == __self, "Function must be called through active proxy");
        _;
    }

    /**
     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be
     * callable on the implementing contract but not through proxies.
     */
    modifier notDelegated() {
        require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
        _;
    }

    /**
     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
     */
    function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
        return _IMPLEMENTATION_SLOT;
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     *
     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall
     */
    function upgradeTo(address newImplementation) public virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
     * encoded in `data`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     *
     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, data, true);
    }

    /**
     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
     * {upgradeTo} and {upgradeToAndCall}.
     *
     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
     *
     * ```solidity
     * function _authorizeUpgrade(address) internal override onlyOwner {}
     * ```
     */
    function _authorizeUpgrade(address newImplementation) internal virtual;

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 9 of 21 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 10 of 21 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 11 of 21 : StorageSlotUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
 * _Available since v4.9 for `string`, `bytes`._
 */
library StorageSlotUpgradeable {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}

File 12 of 21 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSetUpgradeable {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 13 of 21 : BaseConstants.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;

contract BaseConstants {
    uint256 public constant BASIS_POINTS_DIVISOR = 100000;

    uint256 public constant PRICE_PRECISION = 10 ** 18; //Base on RUSD decimals

    uint256 public constant DEFAULT_ROLP_PRICE = 100000; //1 USDC

    uint256 public constant ROLP_DECIMALS = 18;
}

File 14 of 21 : BasePositionConstants.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;

contract BasePositionConstants {
    //Constant params
    // uint256 public constant PRICE_PRECISION = 10 ** 18; //Base on RUSD decimals
    // uint256 public constant BASIS_POINTS_DIVISOR = 100000;

    uint256 public constant POSITION_MARKET = 0;
    uint256 public constant POSITION_LIMIT = 1;
    uint256 public constant POSITION_STOP_MARKET = 2;
    uint256 public constant POSITION_STOP_LIMIT = 3;
    uint256 public constant POSITION_TRAILING_STOP = 4;

    //Change these constants or must notice on login of PositionRouter
    uint256 public constant CREATE_POSITION_MARKET = 1;
    uint256 public constant CREATE_POSITION_LIMIT = 2;
    uint256 public constant CREATE_POSITION_STOP_MARKET = 3;
    uint256 public constant CREATE_POSITION_STOP_LIMIT = 4;

    uint256 public constant ADD_COLLATERAL = 5;
    uint256 public constant REMOVE_COLLATERAL = 6;
    uint256 public constant ADD_POSITION = 7;
    uint256 public constant CONFIRM_POSITION = 8;
    uint256 public constant ADD_TRAILING_STOP = 9;
    uint256 public constant UPDATE_TRAILING_STOP = 10;
    uint256 public constant TRIGGER_POSITION = 11;
    uint256 public constant UPDATE_TRIGGER_POSITION = 12;
    uint256 public constant CANCEL_PENDING_ORDER = 13;
    uint256 public constant CLOSE_POSITION = 14;
    uint256 public constant LIQUIDATE_POSITION = 15;
    uint256 public constant REVERT_EXECUTE = 16;
    //uint public constant STORAGE_PATH = 99; //Internal usage for router only

    uint256 public constant TRANSACTION_STATUS_NONE = 0;
    uint256 public constant TRANSACTION_STATUS_PENDING = 1;
    uint256 public constant TRANSACTION_STATUS_EXECUTED = 2;
    uint256 public constant TRANSACTION_STATUS_EXECUTE_REVERTED = 3;
    //End constant params

    function _getPositionKey(
        address _account,
        address _indexToken,
        bool _isLong,
        uint256 _posId
    ) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked(_account, _indexToken, _isLong, _posId));
    }

    function _getTxTypeFromPositionType(uint256 _positionType) internal pure returns (uint256) {
        if (_positionType == POSITION_LIMIT) {
            return CREATE_POSITION_LIMIT;
        } else if (_positionType == POSITION_STOP_MARKET) {
            return CREATE_POSITION_STOP_MARKET;
        } else if (_positionType == POSITION_STOP_LIMIT) {
            return CREATE_POSITION_STOP_LIMIT;
        } else {
            revert("IVLPST"); //Invalid positionType
        }
    } 

    function _isDelayPosition(uint256 _txType) internal pure returns (bool) {
        return _txType == CREATE_POSITION_STOP_LIMIT
            || _txType == CREATE_POSITION_STOP_MARKET
            || _txType == CREATE_POSITION_LIMIT;
    }

    function _isOpenPosition(uint256 _txType) internal pure returns (bool) {
        return _txType == CREATE_POSITION_MARKET 
            || _isDelayPosition(_txType);
    }
}

File 15 of 21 : Constants.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;

import "./BaseConstants.sol";
import "./BasePositionConstants.sol";

contract Constants is BaseConstants, BasePositionConstants {
    address public constant ZERO_ADDRESS = address(0);

    uint8 public constant ORDER_FILLED = 1;

    uint8 public constant ORDER_NOT_FILLED = 0;

    uint8 public constant STAKING_PID_FOR_CHARGE_FEE = 1;

    uint256 public constant DEFAULT_FUNDING_RATE_FACTOR = 100;
    
    uint256 public constant DEFAULT_MAX_OPEN_INTEREST = 10000000000 * PRICE_PRECISION;

    uint256 public constant FUNDING_RATE_PRECISION = BASIS_POINTS_DIVISOR ** 3; // 1e15
    uint256 public constant MAX_FUNDING_RATE = FUNDING_RATE_PRECISION / 10; // 10% per hour

    uint256 public constant LIQUIDATE_NONE_EXCEED = 0;
    uint256 public constant LIQUIDATE_FEE_EXCEED = 1;
    uint256 public constant LIQUIDATE_THRESHOLD_EXCEED = 2;
    
    uint256 public constant MAX_DEPOSIT_FEE = 10000; // 10%
    uint256 public constant MAX_DELTA_TIME = 24 hours;
    uint256 public constant MAX_FEE_BASIS_POINTS = 5000; // 5%
    uint256 public constant MAX_FEE_REWARD_BASIS_POINTS = BASIS_POINTS_DIVISOR; // 100%
    uint256 public constant MAX_FUNDING_RATE_FACTOR = 10000; // 1%
    uint256 public constant MAX_FUNDING_RATE_INTERVAL = 48 hours;
    uint256 public constant MAX_LIQUIDATION_FEE_USD = 100 * PRICE_PRECISION; // 100 USD
    uint256 public constant MAX_STAKING_FEE = 10000; // 10%
    uint256 public constant MAX_TOKENFARM_COOLDOWN_DURATION = 4 weeks;
    uint256 public constant MAX_TRIGGER_GAS_FEE = 1e8 gwei;
    uint256 public constant MAX_VESTING_DURATION = 700 days;
    uint256 public constant MIN_FUNDING_RATE_INTERVAL = 1 hours;
    uint256 public constant MIN_LEVERAGE = 10000; // 1x
    uint256 public constant MIN_FEE_REWARD_BASIS_POINTS = 0;

    uint256 public constant TRAILING_STOP_TYPE_AMOUNT = 0;
    uint256 public constant TRAILING_STOP_TYPE_PERCENT = 1;

    function checkSlippage(
        bool isLong,
        uint256 expectedMarketPrice,
        uint256 slippageBasisPoints,
        uint256 actualMarketPrice
    ) internal pure {
        if (isLong) {
            require(
                actualMarketPrice <=
                    (expectedMarketPrice * (BASIS_POINTS_DIVISOR + slippageBasisPoints)) / BASIS_POINTS_DIVISOR,
                "Long position: Check slippage exceeded"
            );
        } else {
            require(
                (expectedMarketPrice * (BASIS_POINTS_DIVISOR - slippageBasisPoints)) / BASIS_POINTS_DIVISOR <=
                    actualMarketPrice,
                "Short position: Check slippage exceeded"
            );
        }
    }
}

File 16 of 21 : Structs.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;

enum OrderType {
    MARKET,
    LIMIT,
    STOP,
    STOP_LIMIT,
    TRAILING_STOP
}

enum OrderStatus {
    PENDING,
    FILLED,
    CANCELED
}

enum TriggerStatus {
    OPEN,
    TRIGGERED,
    CANCELLED
}

enum DataType {
    POSITION,
    ORDER
}

struct OrderInfo {
    OrderStatus status;
    uint256 lmtPrice;
    uint256 pendingSize;
    uint256 pendingCollateral;
    uint256 positionType;
    uint256 stepAmount;
    uint256 stepType;
    uint256 stpPrice;
    address collateralToken;
}

struct Position {
    address owner;
    address indexToken;
    bool isLong;
    int256 realisedPnl;
    uint256 averagePrice;
    uint256 collateral;
    int256 entryFunding;
    uint256 lastIncreasedTime;
    uint256 lastPrice;
    uint256 reserveAmount;
    uint256 size;
    uint256 posId;
    uint256 previousFee;
}

struct TriggerOrder {
    bytes32 key;
    bool isLong;
    uint256[] slPrices;
    uint256[] slAmountPercents;
    uint256[] slTriggeredAmounts;
    uint256[] tpPrices;
    uint256[] tpAmountPercents;
    uint256[] tpTriggeredAmounts;
    TriggerStatus status;
}

struct ConvertOrder {
    uint256 index;
    address indexToken;
    address sender;
    address recipient;
    uint256 amountIn;
    uint256 amountOut;
    uint256 state;
}

struct SwapPath {
    address pairAddress;
    uint256 fee;
}

struct SwapRequest {
    bytes32 orderKey;
    address tokenIn;
    address pool;
    uint256 amountIn;
}

struct PrepareTransaction {
    uint256 txType;
    uint256 startTime;

    /*
    uint256 public constant TRANSACTION_STATUS_NONE = 0;
    uint256 public constant TRANSACTION_STATUS_PENDING = 1;
    uint256 public constant TRANSACTION_STATUS_EXECUTED = 2;
    uint256 public constant TRANSACTION_STATUS_EXECUTE_REVERTED = 3;
    */
    uint256 status;
}

struct TxDetail {
    uint256[] params;
    address[] path;
}

struct VaultBond {
    address owner;
    address token; //Collateral token
    uint256 amount; //Collateral amount
}

File 17 of 21 : IBlacklistManager.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;


interface IBlacklistManager {
    function isBlacklist(address _account) external view returns (bool);

    function validateCaller(address _account) external view;
}

File 18 of 21 : IDelegatorManager.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;

interface IDelegatorManager {
    function getDelegates(address _account) external view returns (address[] memory);

    function checkDelegation(address _account, address _delegatee) external view returns (bool);
}

File 19 of 21 : IPositionKeeperV2.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;

import {
    Position, 
    OrderInfo, 
    OrderType, 
    DataType, 
    OrderStatus
} from "../../constants/Structs.sol";

interface IPositionKeeperV2 {
    function leverages(bytes32 _key) external returns (uint256);

    function globalAmounts(address _token, bool _isLong) external view returns (uint256);

    function openNewPosition(
        bytes32 _key,
        bool _isLong, 
        uint256 _posId,
        address[] memory _path,
        uint256[] memory _params,
        bytes memory _data
    ) external;

    function unpackAndStorage(bytes32 _key, bytes memory _data, DataType _dataType) external;

    function deletePosition(bytes32 _key) external;

    function deleteOrder(bytes32 _key) external;

    function deletePositions(bytes32 _key) external;

    //Emit event functions
    function emitAddPositionEvent(
        bytes32 key, 
        bool confirmDelayStatus, 
        uint256 collateral, 
        uint256 size
    ) external;

    function emitAddOrRemoveCollateralEvent(
        bytes32 _key,
        bool _isPlus,
        uint256 _amount,
        uint256 _amountInUSD,
        uint256 _reserveAmount,
        uint256 _collateral,
        uint256 _size
    ) external;

    function emitAddTrailingStopEvent(bytes32 _key, uint256[] memory data) external;

    function emitUpdateTrailingStopEvent(bytes32 _key, uint256 _stpPrice) external;

    function emitUpdateOrderEvent(bytes32 _key, uint256 _positionType, OrderStatus _orderStatus) external;

    function emitConfirmDelayTransactionEvent(
        bytes32 _key,
        bool _confirmDelayStatus,
        uint256 _collateral,
        uint256 _size,
        uint256 _feeUsd
    ) external;

    function emitPositionExecutedEvent(
        bytes32 _key,
        address _account,
        address _indexToken,
        bool _isLong,
        uint256 _posId,
        uint256[] memory _prices
    ) external;

    function emitIncreasePositionEvent(
        bytes32 _key,
        uint256 _indexPrice,
        uint256 _collateralDelta,
        uint256 _sizeDelta,
        uint256 _fee
    ) external;

    function emitDecreasePositionEvent(
        bytes32 _key,
        uint256 _indexPrice,
        uint256 _collateralDelta,
        uint256 _sizeDelta,
        uint256 tradingFee,
        int256 _fundingFee,
        bool _isPartialClose
    ) external ;

    function emitLiquidatePositionEvent(
        bytes32 _key,
        uint256 _indexPrice,
        uint256 _fee
    ) external;

    function updateGlobalShortData(
        uint256 _sizeDelta,
        uint256 _indexPrice,
        bool _isIncrease,
        bytes memory _data
    ) external;

    //View functions
    function getPositions(
        address _account,
        address _indexToken,
        bool _isLong,
        uint256 _posId
    ) external view returns (Position memory, OrderInfo memory);

    function getPositions(bytes32 _key) external view returns (Position memory, OrderInfo memory);

    function getPosition(
        address _account,
        address _indexToken,
        bool _isLong,
        uint256 _posId
    ) external view returns (Position memory);

    function getPosition(bytes32 _key) external view returns (Position memory);

    function getOrder(bytes32 _key) external view returns (OrderInfo memory);

    function getPositionPreviousFee(bytes32 _key) external view returns (uint256);

    function getPositionSize(bytes32 _key) external view returns (uint256);

    function getPositionOwner(bytes32 _key) external view returns (address);

    function getPositionIndexToken(bytes32 _key) external view returns (address);

    function getPositionCollateralToken(bytes32 _key) external view returns (address);

    function getPositionFinalPath(bytes32 _key) external view returns (address[] memory);

    function lastPositionIndex(address _account) external view returns (uint256);

    function getBasePosition(bytes32 _key) external view returns (address, address, bool, uint256);

    function getPositionType(bytes32 _key) external view returns (bool);

    function getGlobalShortDelta(address _token) external view returns (bool, uint256);
}

File 20 of 21 : ISettingsManagerV2.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;

import "./IBlacklistManager.sol";
import {Position} from "../../constants/Structs.sol";

interface ISettingsManagerV2 is IBlacklistManager {
    function decreaseOpenInterest(address _token, address _sender, bool _isLong, uint256 _amount) external;

    function increaseOpenInterest(address _token, address _sender, bool _isLong, uint256 _amount) external;

    function openInterestPerAsset(address _token) external view returns (uint256);

    function openInterestPerSide(bool _isLong) external view returns (uint256);

    function openInterestPerUser(address _sender) external view returns (uint256);

    function closeDeltaTime() external view returns (uint256);

    function cooldownDuration() external view returns (uint256);

    function cumulativeFundingRates(address _token, bool _isLong) external view returns (uint256);

    function delayDeltaTime() external view returns (uint256);

    function depositFee() external view returns (uint256);

    function feeManager() external view returns (address);

    function getFeeManager() external view returns (address);

    function feeRewardBasisPoints() external view returns (uint256);

    function getPositionFee(address _indexToken, bool _isLong, uint256 _sizeDelta) external view returns (uint256);

    function isCollateral(address _token) external view returns (bool);

    function isTradable(address _token) external view returns (bool);

    function isStable(address _token) external view returns (bool);

    function isStaking(address _token) external view returns (bool);

    function lastFundingTimes(address _token) external view returns (uint256);

    function maxPriceUpdatedDelay() external view returns (uint256);

    function liquidationFeeUsd() external view returns (uint256);

    function liquidateThreshold(address) external view returns (uint256);

    function marginFeeBasisPoints(address _token, bool _isLong) external view returns (uint256);

    function marketOrderEnabled() external view returns (bool);
    
    function pauseForexForCloseTime() external view returns (bool);

    function priceMovementPercent() external view returns (uint256);

    function referEnabled() external view returns (bool);

    function stakingFee() external view returns (uint256);

    function unstakingFee() external view returns (uint256);

    function triggerGasFee() external view returns (uint256);

    function positionDefaultSlippage() external view returns (uint256);

    function setPositionDefaultSlippage(uint256 _slippage) external;

    function isEnableNonStableCollateral() external view returns (bool);

    function isEnableConvertRUSD() external view returns (bool);

    function isEnableUnstaking() external view returns (bool);

    function validatePosition(
        address _account,
        address _indexToken,
        bool _isLong,
        uint256 _size,
        uint256 _collateral
    ) external view;

    function isApprovalCollateralToken(address _token) external view returns (bool);

    function isApprovalCollateralToken(address _token, bool _raise) external view returns (bool);

    function isEmergencyStop() external view returns (bool);

    function validateCollateralPathAndCheckSwap(address[] memory _collateralPath) external view returns (bool);

    function maxProfitPercent() external view returns (uint256);

    function basisFundingRateFactor() external view returns (uint256);

    function maxFundingRate() external view returns (uint256);

    function fundingRateFactor(address _token) external view returns (uint256);

    function fundingIndex(address _token) external view returns (int256);

    function getFundingRate(address _indexToken, address _collateralToken) external view returns (int256);

    function defaultBorrowFeeFactor() external view returns (uint256);

    function borrowFeeFactor(address token) external view returns (uint256);

    function getFundingFee(
        address _indexToken,
        bool _isLong,
        uint256 _size,
        int256 _fundingIndex
    ) external view returns (int256);

    function getBorrowFee(
        address _indexToken,
        uint256 _borrowedSize,
        uint256 _lastIncreasedTime
    ) external view returns (uint256);

    function getFeesV2(
        bytes32 _key,
        uint256 _sizeDelta,
        uint256 _loanDelta,
        bool _isApplyTradingFee,
        bool _isApplyBorrowFee,
        bool _isApplyFundingFee
    ) external view returns (uint256, int256);

    function getFees(
        uint256 _sizeDelta,
        uint256 _loanDelta,
        bool _isApplyTradingFee,
        bool _isApplyBorrowFee,
        bool _isApplyFundingFee,
        Position memory _position
    ) external view returns (uint256, int256);

    function updateFunding(address _indexToken, address _collateralToken) external;

    function maxTriggerPriceLength() external view returns (uint256);

    function minimumVaultReserves(address _token) external view returns (uint256);

    function disableFastExecuteForClosePosition() external view returns (bool);

    function minimumOpenCollateral() external view returns (uint256);

    function notAllowContractCall() external view returns (bool);

    function requiredValidateMarketSlippage() external view returns (bool);

    function checkDelegation(
        address _account,
        address _delegatee,
        bool _raise
    ) external returns (bool);
}

File 21 of 21 : IVaultV2.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.12;

import {VaultBond} from "../../constants/Structs.sol";

interface IVaultV2 {
    function stakeAmounts(address _token) external view returns (uint256);
    function poolAmounts(address _token) external view returns (uint256);
    function increasePoolAmount(address _indexToken, uint256 _amount) external;
    function decreasePoolAmount(address _indexToken, uint256 _amount) external;

    function reservedAmounts(address _token) external view returns (uint256);
    function increaseReservedAmount(address _token, uint256 _amount) external;
    function decreaseReservedAmount(address _token, uint256 _amount) external;

    function guaranteedAmounts(address _token) external view returns (uint256);
    function increaseGuaranteedAmount(address _indexToken, uint256 _amount) external;
    function decreaseGuaranteedAmount(address _indexToken, uint256 _amount) external;

    function distributeFee(
        bytes32 _key, 
        uint256 _fee,
        address _account, 
        bool _isApplyDiscountFee,
        bool _isApplyRebate
    ) external;

    function takeAssetIn(
        address _account, 
        uint256 _amount, 
        address _token,
        bytes32 _key,
        uint256 _txType
    ) external;

    function takeAssetOut(
        bytes32 _key,
        address _account, 
        uint256 _fee, 
        uint256 _usdOut, 
        address _token, 
        uint256 _tokenPrice
    ) external;

    function takeAssetBack(
        address _account, 
        bytes32 _key,
        uint256 _txType
    ) external;

    function decreaseBond(
        bytes32 _key,
        address _account,
        uint256 _txType
    ) external;

    function ROLP() external view returns(address);

    function RUSD() external view returns(address);

    function totalROLP() external view returns(uint256);

    function updateBalance(address _token) external;

    //function updateBalances() external;

    function getTokenBalance(address _token) external view returns (uint256);

    //function getTokenBalances() external view returns (address[] memory, uint256[] memory);

    function stake(address _account, address _token, uint256 _amount) external;

    function unstake(address _tokenOut, uint256 _rolpAmount, address _receiver) external;

    function getBond(bytes32 _key, uint256 _txType) external view returns (VaultBond memory);

    // function getBondOwner(bytes32 _key, uint256 _txType) external view returns (address);

    // function getBondToken(bytes32 _key, uint256 _txType) external view returns (address);

    // function getBondAmount(bytes32 _key, uint256 _txType) external view returns (uint256);

    function getTotalUSD() external view returns (uint256);

    // function convertRUSD(
    //     address _account,
    //     address _recipient, 
    //     address _tokenOut, 
    //     uint256 _amount
    // ) external;
}

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

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_enabled","type":"bool"}],"name":"EnableForexMarket","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_enabled","type":"bool"}],"name":"EnableMarketOrder","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"RUSD","type":"address"},{"indexed":false,"internalType":"address","name":"positionHandler","type":"address"},{"indexed":false,"internalType":"address","name":"positionKeeper","type":"address"},{"indexed":false,"internalType":"address","name":"vault","type":"address"}],"name":"FinalInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"indexToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"feeFactor","type":"uint256"}],"name":"SetBorrowFeeFactor","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"positionDefaultSlippage","type":"uint256"}],"name":"SetDefaultPositionSlippage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetDepositFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isDisabled","type":"bool"}],"name":"SetDisableFastExecuteForClosePosition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isEmergencyStop","type":"bool"}],"name":"SetEmergencyStop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"SetEnableCollateral","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enableConvertRUSD","type":"bool"}],"name":"SetEnableConvertRUSD","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"SetEnableNonStableCollateral","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"SetEnableStable","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"SetEnableStaking","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"SetEnableTradable","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"SetEnableUnstaking","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"bool","name":"isExecutor","type":"bool"}],"name":"SetExecutor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"fundingRateFactor","type":"uint256"}],"name":"SetFundingRateFactor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_liquidationFeeUsd","type":"uint256"}],"name":"SetLiquidationFeeUsd","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"isLong","type":"bool"},{"indexed":false,"internalType":"uint256","name":"marginFeeBasisPoints","type":"uint256"}],"name":"SetMarginFeeBasisPoints","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxFundingRate","type":"uint256"}],"name":"SetMaxFundingRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"maxOIAmount","type":"uint256"}],"name":"SetMaxOpenInterestPerAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"isLong","type":"bool"},{"indexed":false,"internalType":"uint256","name":"maxOIAmount","type":"uint256"}],"name":"SetMaxOpenInterestPerAssetPerSide","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isLong","type":"bool"},{"indexed":false,"internalType":"uint256","name":"maxOIAmount","type":"uint256"}],"name":"SetMaxOpenInterestPerSide","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxOIAmount","type":"uint256"}],"name":"SetMaxOpenInterestPerUser","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxPriceUpdatedDelay","type":"uint256"}],"name":"SetMaxPriceUpdatedDelay","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxTriggerPriceLength","type":"uint256"}],"name":"SetMaxTriggerPriceLength","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"minimumVaultReserve","type":"uint256"}],"name":"SetMinimumVaultReserves","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"priceMovementPercent","type":"uint256"}],"name":"SetPriceMovementPercent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"referEnabled","type":"bool"}],"name":"SetReferEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"referralSystem","type":"address"}],"name":"SetReferralSystem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetStakingFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetTriggerGasFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetUnstakingFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"cooldownDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeRewardBasisPoints","type":"uint256"}],"name":"SetVaultSettings","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"deltaTime","type":"uint256"}],"name":"UpdateCloseDeltaTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"deltaTime","type":"uint256"}],"name":"UpdateDelayDeltaTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeManager","type":"address"}],"name":"UpdateFeeManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"int256","name":"fundingIndex","type":"int256"}],"name":"UpdateFunding","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"isLong","type":"bool"},{"indexed":false,"internalType":"uint256","name":"fundingRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastFundingTime","type":"uint256"}],"name":"UpdateFundingRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxProfitPercent","type":"uint256"}],"name":"UpdateMaxProfitPercent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldThreshold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newThredhold","type":"uint256"}],"name":"UpdateThreshold","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"isLong","type":"bool"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isIncrease","type":"bool"}],"name":"UpdateTotalOpenInterest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"ADD_COLLATERAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ADD_POSITION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ADD_TRAILING_STOP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASIS_POINTS_DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CANCEL_PENDING_ORDER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CLOSE_POSITION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONFIRM_POSITION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CREATE_POSITION_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CREATE_POSITION_MARKET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CREATE_POSITION_STOP_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CREATE_POSITION_STOP_MARKET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_FUNDING_RATE_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_MAX_OPEN_INTEREST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ROLP_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FUNDING_RATE_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIQUIDATE_FEE_EXCEED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIQUIDATE_NONE_EXCEED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIQUIDATE_POSITION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIQUIDATE_THRESHOLD_EXCEED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_DELTA_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_DEPOSIT_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE_BASIS_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE_REWARD_BASIS_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FUNDING_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FUNDING_RATE_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FUNDING_RATE_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_LIQUIDATION_FEE_USD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_STAKING_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOKENFARM_COOLDOWN_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TRIGGER_GAS_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_VESTING_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_FEE_REWARD_BASIS_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_FUNDING_RATE_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_LEVERAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ORDER_FILLED","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ORDER_NOT_FILLED","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POSITION_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POSITION_MARKET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POSITION_STOP_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POSITION_STOP_MARKET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POSITION_TRAILING_STOP","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":"REMOVE_COLLATERAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REVERT_EXECUTE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLP_DECIMALS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RUSD","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKING_PID_FOR_CHARGE_FEE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAILING_STOP_TYPE_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAILING_STOP_TYPE_PERCENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSACTION_STATUS_EXECUTED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSACTION_STATUS_EXECUTE_REVERTED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSACTION_STATUS_NONE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSACTION_STATUS_PENDING","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRIGGER_POSITION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPDATE_TRAILING_STOP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPDATE_TRIGGER_POSITION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ZERO_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"basisFundingRateFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"borrowFeeFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_delegatee","type":"address"},{"internalType":"bool","name":"_raise","type":"bool"}],"name":"checkDelegation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"closeDeltaTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cooldownDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"cumulativeFundingRates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_sender","type":"address"},{"internalType":"bool","name":"_isLong","type":"bool"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"decreaseOpenInterest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultBorrowFeeFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delayDeltaTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delegatorManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableFastExecuteForClosePosition","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_enable","type":"bool"}],"name":"enableForexMarket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enable","type":"bool"}],"name":"enableMarketOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"executors","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRewardBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_positionHandler","type":"address"},{"internalType":"address","name":"_positionKeeper","type":"address"},{"internalType":"address","name":"_vault","type":"address"}],"name":"finalInitialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"fundingIndex","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"fundingRateFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_indexToken","type":"address"},{"internalType":"uint256","name":"_loanDelta","type":"uint256"},{"internalType":"uint256","name":"_lastIncreasedTime","type":"uint256"}],"name":"getBorrowFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sizeDelta","type":"uint256"},{"internalType":"uint256","name":"_loanDelta","type":"uint256"},{"internalType":"bool","name":"_isApplyTradingFee","type":"bool"},{"internalType":"bool","name":"_isApplyBorrowFee","type":"bool"},{"internalType":"bool","name":"_isApplyFundingFee","type":"bool"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"int256","name":"realisedPnl","type":"int256"},{"internalType":"uint256","name":"averagePrice","type":"uint256"},{"internalType":"uint256","name":"collateral","type":"uint256"},{"internalType":"int256","name":"entryFunding","type":"int256"},{"internalType":"uint256","name":"lastIncreasedTime","type":"uint256"},{"internalType":"uint256","name":"lastPrice","type":"uint256"},{"internalType":"uint256","name":"reserveAmount","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"posId","type":"uint256"},{"internalType":"uint256","name":"previousFee","type":"uint256"}],"internalType":"struct Position","name":"_position","type":"tuple"}],"name":"getFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"uint256","name":"_sizeDelta","type":"uint256"},{"internalType":"uint256","name":"_loanDelta","type":"uint256"},{"internalType":"bool","name":"_isApplyTradingFee","type":"bool"},{"internalType":"bool","name":"_isApplyBorrowFee","type":"bool"},{"internalType":"bool","name":"_isApplyFundingFee","type":"bool"}],"name":"getFeesV2","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_indexToken","type":"address"},{"internalType":"bool","name":"_isLong","type":"bool"},{"internalType":"uint256","name":"_size","type":"uint256"},{"internalType":"int256","name":"_fundingIndex","type":"int256"}],"name":"getFundingFee","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_indexToken","type":"address"},{"internalType":"address","name":"_collateralToken","type":"address"}],"name":"getFundingRate","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getMinimumReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_indexToken","type":"address"},{"internalType":"bool","name":"_isLong","type":"bool"},{"internalType":"uint256","name":"_sizeDelta","type":"uint256"}],"name":"getPositionFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_sender","type":"address"},{"internalType":"bool","name":"_isLong","type":"bool"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseOpenInterest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_RUSD","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_raise","type":"bool"}],"name":"isApprovalCollateralToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"isApprovalCollateralToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isBlacklist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isCollateral","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEmergencyStop","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEnableConvertRUSD","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEnableNonStableCollateral","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEnableUnstaking","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isStable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isStaking","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isTradable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastFundingTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"liquidateThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidationFeeUsd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"marginFeeBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketOrderEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxFundingRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxOpenInterestPerAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"maxOpenInterestPerAssetPerSide","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"","type":"bool"}],"name":"maxOpenInterestPerSide","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxOpenInterestPerUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPriceUpdatedDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxProfitPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTriggerPriceLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumOpenCollateral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minimumVaultReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notAllowContractCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"openInterestPerAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"openInterestPerAssetPerSide","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"","type":"bool"}],"name":"openInterestPerSide","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"openInterestPerUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseForexForCloseTime","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"positionDefaultSlippage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"positionHandler","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"positionKeeper","outputs":[{"internalType":"contract IPositionKeeperV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceMovementPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referralSystem","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requiredValidateMarketSlippage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_isBlacklist","type":"bool"}],"name":"setBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_indexToken","type":"address"},{"internalType":"uint256","name":"_borrowFeeFactor","type":"uint256"}],"name":"setBorrowFeeFactor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_deltaTime","type":"uint256"}],"name":"setCloseDeltaTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_deltaTime","type":"uint256"}],"name":"setDelayDeltaTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegatorManager","type":"address"}],"name":"setDelegatorManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setDepositFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isDisabled","type":"bool"}],"name":"setDisableFastExecuteForClosePosition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isEmergencyStop","type":"bool"}],"name":"setEmergencyStop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setEnableCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isEnableConvertRUSD","type":"bool"}],"name":"setEnableConvertRUSD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setEnableNonStableCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setEnableStable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setEnableStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setEnableTradable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isEnable","type":"bool"}],"name":"setEnableUnstaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_executor","type":"address"},{"internalType":"bool","name":"_isExecutor","type":"bool"}],"name":"setExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeManager","type":"address"}],"name":"setFeeManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_fundingRateFactor","type":"uint256"}],"name":"setFundingRateFactor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newThreshold","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"setLiquidateThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_liquidationFeeUsd","type":"uint256"}],"name":"setLiquidationFeeUsd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_isLong","type":"bool"},{"internalType":"uint256","name":"_marginFeeBasisPoints","type":"uint256"}],"name":"setMarginFeeBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxFundingRate","type":"uint256"}],"name":"setMaxFundingRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_maxAmount","type":"uint256"}],"name":"setMaxOpenInterestPerAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_isLong","type":"bool"},{"internalType":"uint256","name":"_maxAmount","type":"uint256"}],"name":"setMaxOpenInterestPerAssetPerSide","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isLong","type":"bool"},{"internalType":"uint256","name":"_maxAmount","type":"uint256"}],"name":"setMaxOpenInterestPerSide","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxAmount","type":"uint256"}],"name":"setMaxOpenInterestPerUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPriceUpdatedDelay","type":"uint256"}],"name":"setMaxPriceUpdatedDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxProfitPercent","type":"uint256"}],"name":"setMaxProfitPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTriggerPriceLength","type":"uint256"}],"name":"setMaxTriggerPriceLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumOpenCollateral","type":"uint256"}],"name":"setMinimumOpenCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_minReserve","type":"uint256"}],"name":"setMinimumVaultReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isNotAllow","type":"bool"}],"name":"setNotAllowContractCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_isLong","type":"bool"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setOpenInterestPerAssetPerSide","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_slippage","type":"uint256"}],"name":"setPositionDefaultSlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceMovementPercent","type":"uint256"}],"name":"setPriceMovementPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_referEnabled","type":"bool"}],"name":"setReferEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_referralSystem","type":"address"}],"name":"setReferralSystem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_requiredValidate","type":"bool"}],"name":"setRequiredValidateMarketSlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setStakingFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setTriggerGasFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setUnstakingFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cooldownDuration","type":"uint256"},{"internalType":"uint256","name":"_feeRewardsBasisPoints","type":"uint256"}],"name":"setVaultSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"triggerGasFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unstakingFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_indexToken","type":"address"},{"internalType":"address","name":"_collateralToken","type":"address"}],"name":"updateFunding","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"validateCaller","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_path","type":"address[]"}],"name":"validateCollateralPathAndCheckSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_indexToken","type":"address"},{"internalType":"bool","name":"_isLong","type":"bool"},{"internalType":"uint256","name":"_size","type":"uint256"},{"internalType":"uint256","name":"_collateral","type":"uint256"}],"name":"validatePosition","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract IVaultV2","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a06040523060805234801561001457600080fd5b50608051615d206200004d600039600081816127e00152818161282001528181612b7e01528181612bbe0152612caa0152615d206000f3fe6080604052600436106109d55760003560e01c8063829c1c57116104fb578063caa0b2fc11610297578063eeffe46911610165578063f4988279116100d7578063fbd2048c11610090578063fbd2048c14611cbc578063fbfa77cf14611cdc578063fce28c1014611cfc578063fd05552614611d12578063fd3abb6b14611d32578063fd3c79ac14611d5257600080fd5b8063f498827914610be3578063f79280fc14611c26578063f849918f14611c47578063fa5dc29114611c67578063fb2a8ef414611c87578063fbb5d08114611c9c57600080fd5b8063f04ad31b11610129578063f04ad31b14611ba7578063f0b6eff414611664578063f20b44d214611bbc578063f2d6382614611bdc578063f2fde38b14611bf1578063f40f2a7914611c1157600080fd5b8063eeffe46914610ffa578063ef1a61d614611b24578063ef580fec14611b44578063efb0d2f214611b64578063eff9884314611b9157600080fd5b8063db16e98911610209578063e7554f03116101c2578063e7554f0314610ffa578063e8a020d614611a8f578063e95d21c814611aa4578063ebb1b4b914611ac4578063ec04fabc14611ae4578063ec3f5bb814611b0457600080fd5b8063db16e989146119bf578063de22ba43146119d5578063de8f5a11146119f5578063dede51e614611a22578063e2cc387c14611a42578063e508e31414611a6257600080fd5b8063d1636ae71161025b578063d1636ae714611941578063d1e6a272146112b1578063d2e808e31461195d578063d8f897c31461197d578063dac05497146112b1578063daf16f57146119aa57600080fd5b8063caa0b2fc1461155f578063ccff53e0146118cb578063cd8dd99b146118eb578063cfa119f514611901578063d0fb02031461192157600080fd5b8063afe87567116103d4578063beeccee611610346578063c4d60b58116102ff578063c4d60b5814611833578063c4d66de81461186b578063c6d87dd514610d35578063c73d7c7b1461188b578063c7d4f952146118ab578063c8cbdd3414610b3f57600080fd5b8063beeccee61461176f578063bf352bd71461178f578063c06959d5146117bc578063c0e0f46b146117f4578063c201cf1914611809578063c2133f2f1461181e57600080fd5b8063b780ef9b11610398578063b780ef9b14611710578063b918b254146112b1578063b9465d2114611725578063ba6b92bc14611745578063babc92f01461175a578063be202b1414610be357600080fd5b8063afe8756714610b3f578063b194d13d14610d6b578063b23eda0d146116b8578063b3887911146116e5578063b50cf256146116fb57600080fd5b806397dff11d1161046d578063a51cdec311610431578063a51cdec314611624578063a68ab21f14611644578063a6b4f2ce14611664578063a71b68dd14611679578063ab2801ba14611698578063abd7813914610ffa57600080fd5b806397dff11d1461157457806398929be7146115945780639a01126c146115b45780639ac2a011146115d4578063a04e876c1461160457600080fd5b80638da5cb5b116104bf5780638da5cb5b146114d457806390d6c192146114f25780639185f6ec1461151357806395082d251461154357806395f8f40b1461155f57806396279aba1461155f57600080fd5b8063829c1c571461145157806382ff8192146114715780638777e41e1461148757806387a0c404146114b45780638a39735a14610d3557600080fd5b806344e4f2b71161077557806367a52793116106435780637619bc57116105b55780637cd0814b1161056e5780637cd0814b146113a25780637e1dd2ef146113ba5780637e581025146113da5780637f374fbe146113f05780638041470f146114105780638106fc5a1461143157600080fd5b80637619bc57146112dc578063762036b714611309578063774561f51461133657806378073dd31461134c57806379a8dff7146113615780637bbc45e81461138157600080fd5b80636c348b53116106075780636c348b53146112425780636e8ffe62146112575780636f49712b1461126c578063715018a61461129c578063730e8283146112b157806375e98da4146112c657600080fd5b806367a52793146111d75780636892a325146111ed57806368d538a31461120d5780636be2325514610be35780636be6026b1461122d57600080fd5b8063538ba4f9116106e75780635bbf2c29116106a05780635bbf2c29146111345780635dceb8d3146111545780635e8f0a571461116b57806361695ebe1461118b57806362f3edb7146111a157806364c8bb7e146111c157600080fd5b8063538ba4f91461109257806353b2d7b5146110a7578063558e0476146110c7578063559e2f1f146110fd57806356d70f6c146111145780635962e8af14610ffa57600080fd5b80634e41f064116107395780634e41f06414610ffa5780634f1ef2861461100f57806350d70d3d1461102257806351c037001461103c57806352d1902d1461105c5780635377c56f1461107157600080fd5b806344e4f2b714610f79578063472d35b914610f8f57806347ad220214610faf578063490ae21014610fc45780634befe2ca14610fe457600080fd5b806320ba5698116108b257806334f32e25116108245780633d8b9595116107dd5780633d8b959514610ebe5780633ea479ae14610ed35780633ff9fd3514610ee9578063410dbf7e14610f0957806341ed96bc14610f29578063447b4a4714610f4957600080fd5b806334f32e2514610de257806335139e0b14610e1a5780633526931514610e3a5780633659cfe614610e50578063365f9ef114610e7057806338faf85114610e9157600080fd5b80632aad3a4b116108765780632aad3a4b14610d4b5780632ab1287214610d6b5780632b32ae6c14610be35780632c28dc3114610d92578063333e99db14610db257806334c1557d14610d3557600080fd5b806320ba569814610cad578063238af9a414610cc357806327acb3ac14610cdd578063297ee99414610cfd5780632a62b52d14610d3557600080fd5b806312743c801161094b5780631a465e861161090f5780631a465e8614610be35780631c0618c814610bf85780631d0a1ab914610c2d5780631e1bff3f14610c4d578063209da5b914610c6d57806320ab950214610c8d57600080fd5b806312743c8014610b565780631287687b14610b76578063153b0d1e14610b8c5780631645f94214610bac578063174d269414610bcd57600080fd5b8063090360c11161099d578063090360c114610a715780630af1c25114610aa95780630c55fe6f14610abf5780630ee21e5414610adf5780630f3290d414610b1f578063126082cf14610b3f57600080fd5b8063018f2d82146109da578063021c197c14610a0357806304799c9914610a255780630741b28214610a3c57806307c5875214610a5c575b600080fd5b3480156109e657600080fd5b506109f060d55481565b6040519081526020015b60405180910390f35b348015610a0f57600080fd5b50610a23610a1e366004615090565b611d7f565b005b348015610a3157600080fd5b506109f06202a30081565b348015610a4857600080fd5b50610a23610a573660046150d5565b611de0565b348015610a6857600080fd5b506109f0611e40565b348015610a7d57600080fd5b506109f0610a8c3660046150d5565b60e460209081526000928352604080842090915290825290205481565b348015610ab557600080fd5b506109f060de5481565b348015610acb57600080fd5b50610a23610ada36600461510e565b611e56565b348015610aeb57600080fd5b50610b0f610afa366004615127565b60df6020526000908152604090205460ff1681565b60405190151581526020016109fa565b348015610b2b57600080fd5b50610b0f610b3a366004615144565b611efc565b348015610b4b57600080fd5b506109f0620186a081565b348015610b6257600080fd5b50610a23610b7136600461518f565b612027565b348015610b8257600080fd5b506109f060cf5481565b348015610b9857600080fd5b50610a23610ba73660046150d5565b6121db565b348015610bb857600080fd5b5060ce54610b0f90600160b81b900460ff1681565b348015610bd957600080fd5b506109f060d65481565b348015610bef57600080fd5b506109f0600181565b348015610c0457600080fd5b50610c18610c13366004615240565b61220e565b604080519283526020830191909152016109fa565b348015610c3957600080fd5b50610a23610c4836600461510e565b6122c4565b348015610c5957600080fd5b50610a23610c683660046150d5565b612301565b348015610c7957600080fd5b50610a23610c8836600461510e565b61236d565b348015610c9957600080fd5b50610b0f610ca8366004615364565b61241f565b348015610cb957600080fd5b506109f060d85481565b348015610ccf57600080fd5b5060f654610b0f9060ff1681565b348015610ce957600080fd5b50610a23610cf8366004615416565b6126c3565b348015610d0957600080fd5b5060c954610d1d906001600160a01b031681565b6040516001600160a01b0390911681526020016109fa565b348015610d4157600080fd5b506109f061271081565b348015610d5757600080fd5b506109f0610d66366004615433565b61270c565b348015610d7757600080fd5b50610d80600181565b60405160ff90911681526020016109fa565b348015610d9e57600080fd5b50610a23610dad3660046150d5565b61275a565b348015610dbe57600080fd5b50610b0f610dcd366004615127565b60f96020526000908152604090205460ff1681565b348015610dee57600080fd5b506109f0610dfd3660046150d5565b60e560209081526000928352604080842090915290825290205481565b348015610e2657600080fd5b50610a23610e35366004615416565b6127ba565b348015610e4657600080fd5b506109f060d25481565b348015610e5c57600080fd5b50610a23610e6b366004615127565b6127d5565b348015610e7c57600080fd5b5060ce54610b0f90600160a81b900460ff1681565b348015610e9d57600080fd5b506109f0610eac366004615127565b60f46020526000908152604090205481565b348015610eca57600080fd5b50610d80600081565b348015610edf57600080fd5b506109f060d35481565b348015610ef557600080fd5b50610a23610f0436600461510e565b6128b5565b348015610f1557600080fd5b50610a23610f2436600461510e565b6128c6565b348015610f3557600080fd5b50610a23610f44366004615474565b612953565b348015610f5557600080fd5b50610b0f610f64366004615127565b60e06020526000908152604090205460ff1681565b348015610f8557600080fd5b506109f060f35481565b348015610f9b57600080fd5b50610a23610faa366004615127565b612a94565b348015610fbb57600080fd5b506109f0600b81565b348015610fd057600080fd5b50610a23610fdf36600461510e565b612ae6565b348015610ff057600080fd5b506109f061138881565b34801561100657600080fd5b506109f0600081565b610a2361101d3660046154a2565b612b73565b34801561102e57600080fd5b5060f854610b0f9060ff1681565b34801561104857600080fd5b50610a23611057366004615090565b612c44565b34801561106857600080fd5b506109f0612c9d565b34801561107d57600080fd5b5060ce54610b0f90600160c01b900460ff1681565b34801561109e57600080fd5b50610d1d600081565b3480156110b357600080fd5b50610a236110c2366004615416565b612d50565b3480156110d357600080fd5b506109f06110e2366004615127565b6001600160a01b0316600090815260f4602052604090205490565b34801561110957600080fd5b506109f06224ea0081565b34801561112057600080fd5b50610a2361112f36600461554a565b612da5565b34801561114057600080fd5b50610a2361114f36600461510e565b613019565b34801561116057600080fd5b506109f06201518081565b34801561117757600080fd5b50610a2361118636600461554a565b613056565b34801561119757600080fd5b506109f060d05481565b3480156111ad57600080fd5b506109f06111bc36600461559b565b6131b8565b3480156111cd57600080fd5b506109f060d95481565b3480156111e357600080fd5b506109f060d45481565b3480156111f957600080fd5b50610a2361120836600461510e565b61323c565b34801561121957600080fd5b50610a2361122836600461510e565b613279565b34801561123957600080fd5b506109f06132b6565b34801561124e57600080fd5b506109f0600a81565b34801561126357600080fd5b506109f0606481565b34801561127857600080fd5b50610b0f611287366004615127565b60e26020526000908152604090205460ff1681565b3480156112a857600080fd5b50610a236132c4565b3480156112bd57600080fd5b506109f0600281565b3480156112d257600080fd5b506109f060db5481565b3480156112e857600080fd5b506109f06112f7366004615127565b60e86020526000908152604090205481565b34801561131557600080fd5b506109f0611324366004615127565b60ef6020526000908152604090205481565b34801561134257600080fd5b506109f060ed5481565b34801561135857600080fd5b506109f0600681565b34801561136d57600080fd5b50610a2361137c366004615090565b6132d8565b34801561138d57600080fd5b5060ce54610b0f90600160d01b900460ff1681565b3480156113ae57600080fd5b506109f063039ada0081565b3480156113c657600080fd5b50610a236113d5366004615127565b613394565b3480156113e657600080fd5b506109f060f75481565b3480156113fc57600080fd5b50610a2361140b366004615416565b6133be565b34801561141c57600080fd5b5060ce54610b0f90600160b01b900460ff1681565b34801561143d57600080fd5b506109f061144c366004615474565b613413565b34801561145d57600080fd5b50610a2361146c36600461510e565b61363a565b34801561147d57600080fd5b506109f060dc5481565b34801561149357600080fd5b506109f06114a2366004615127565b60ee6020526000908152604090205481565b3480156114c057600080fd5b50610a236114cf3660046155d0565b6136c7565b3480156114e057600080fd5b506097546001600160a01b0316610d1d565b3480156114fe57600080fd5b5060ce54610b0f90600160c81b900460ff1681565b34801561151f57600080fd5b50610b0f61152e366004615127565b60e16020526000908152604090205460ff1681565b34801561154f57600080fd5b506109f0670de0b6b3a764000081565b34801561156b57600080fd5b506109f0600381565b34801561158057600080fd5b50610a2361158f366004615416565b613a33565b3480156115a057600080fd5b50610a236115af36600461562b565b613a88565b3480156115c057600080fd5b50610a236115cf366004615127565b613ada565b3480156115e057600080fd5b50610b0f6115ef366004615127565b60f56020526000908152604090205460ff1681565b34801561161057600080fd5b5060cd54610d1d906001600160a01b031681565b34801561163057600080fd5b50610a2361163f366004615127565b613b7c565b34801561165057600080fd5b5060ca54610d1d906001600160a01b031681565b34801561167057600080fd5b506109f0600481565b34801561168557600080fd5b5060f854610b0f90610100900460ff1681565b3480156116a457600080fd5b5060fa54610d1d906001600160a01b031681565b3480156116c457600080fd5b506109f06116d3366004615127565b60f06020526000908152604090205481565b3480156116f157600080fd5b506109f060da5481565b34801561170757600080fd5b506109f0601281565b34801561171c57600080fd5b506109f0600781565b34801561173157600080fd5b50610a236117403660046150d5565b613c04565b34801561175157600080fd5b506109f0600981565b34801561176657600080fd5b506109f0600881565b34801561177b57600080fd5b50610a2361178a36600461510e565b613c64565b34801561179b57600080fd5b506109f06117aa366004615416565b60eb6020526000908152604090205481565b3480156117c857600080fd5b506109f06117d73660046150d5565b60e660209081526000928352604080842090915290825290205481565b34801561180057600080fd5b506109f0600c81565b34801561181557600080fd5b506109f0613cf7565b34801561182a57600080fd5b506109f0600e81565b34801561183f57600080fd5b506109f061184e3660046150d5565b60e360209081526000928352604080842090915290825290205481565b34801561187757600080fd5b50610a23611886366004615127565b613d0e565b34801561189757600080fd5b50610a236118a6366004615416565b613e56565b3480156118b757600080fd5b50610a236118c6366004615649565b613e7c565b3480156118d757600080fd5b50610a236118e6366004615433565b613f13565b3480156118f757600080fd5b506109f060d15481565b34801561190d57600080fd5b50610b0f61191c3660046150d5565b613f82565b34801561192d57600080fd5b5060ce54610d1d906001600160a01b031681565b34801561194d57600080fd5b506109f067016345785d8a000081565b34801561196957600080fd5b50610a23611978366004615416565b613f8e565b34801561198957600080fd5b506109f0611998366004615127565b60e76020526000908152604090205481565b3480156119b657600080fd5b506109f0600f81565b3480156119cb57600080fd5b506109f060dd5481565b3480156119e157600080fd5b5060cb54610d1d906001600160a01b031681565b348015611a0157600080fd5b506109f0611a10366004615127565b60f16020526000908152604090205481565b348015611a2e57600080fd5b50610a23611a3d36600461510e565b613fe3565b348015611a4e57600080fd5b50610a23611a5d366004615416565b614070565b348015611a6e57600080fd5b506109f0611a7d366004615416565b60ec6020526000908152604090205481565b348015611a9b57600080fd5b506109f0601081565b348015611ab057600080fd5b50610a23611abf366004615416565b6140c5565b348015611ad057600080fd5b50610a23611adf36600461510e565b614122565b348015611af057600080fd5b50610a23611aff366004615416565b61412f565b348015611b1057600080fd5b50610b0f611b1f366004615127565b614151565b348015611b3057600080fd5b50610a23611b3f366004615090565b61415e565b348015611b5057600080fd5b50610a23611b5f36600461510e565b6141de565b348015611b7057600080fd5b506109f0611b7f366004615127565b60e96020526000908152604090205481565b348015611b9d57600080fd5b506109f060d75481565b348015611bb357600080fd5b506109f0600581565b348015611bc857600080fd5b50610a23611bd7366004615433565b614260565b348015611be857600080fd5b50610d1d614290565b348015611bfd57600080fd5b50610a23611c0c366004615127565b6142fb565b348015611c1d57600080fd5b506109f0614371565b348015611c3257600080fd5b5060ce54610b0f90600160a01b900460ff1681565b348015611c5357600080fd5b50610a23611c6236600461510e565b61438b565b348015611c7357600080fd5b50610a23611c823660046150d5565b614425565b348015611c9357600080fd5b506109f0600d81565b348015611ca857600080fd5b50610a23611cb7366004615433565b614485565b348015611cc857600080fd5b506109f0611cd736600461566b565b614555565b348015611ce857600080fd5b5060cc54610d1d906001600160a01b031681565b348015611d0857600080fd5b506109f0610e1081565b348015611d1e57600080fd5b50610c18611d2d3660046156b1565b614604565b348015611d3e57600080fd5b50610a23611d4d366004615718565b61474f565b348015611d5e57600080fd5b506109f0611d6d366004615127565b60ea6020526000908152604090205481565b611d87614822565b6001600160a01b038216600081815260ef602052604090819020839055517f218e8b6cee175021e646f1437799a87d14d7aeeacbfd9e0fbda3fc61cf0aa6e990611dd49084815260200190565b60405180910390a25050565b611de8614822565b6001600160a01b038216600081815260e16020908152604091829020805460ff191685151590811790915591519182527fd50854e6bdda54e27ca6c587316f15ef3c12e29456bb61067de70d3dea8cbe459101611dd4565b611e53670de0b6b3a76400006064615753565b81565b611e5e614822565b62015180811115611ec05760405162461bcd60e51b815260206004820152602160248201527f436c6f736544656c746154696d6520697320626967676572207468616e206d616044820152600f60fb1b60648201526084015b60405180910390fd5b60d18190556040518181527f47eda403efad01d5c4d75ebc312d20e5a8e6e8fecb2a557791a696105183709c906020015b60405180910390a150565b60006001600160a01b0384163b158015611f1e57506001600160a01b0383163b155b611f3a5760405162461bcd60e51b8152600401611eb790615772565b826001600160a01b0316846001600160a01b03161415611f5c57506001612020565b60fa54604051630519e01b60e41b81526001600160a01b0386811660048301528581166024830152600092169063519e01b090604401602060405180830381865afa158015611faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd3919061579a565b9050828015611fe0575080155b1561201d5760405162461bcd60e51b815260206004820152600d60248201526c4e6f742064656c65676174656560981b6044820152606401611eb7565b90505b9392505050565b61202f614822565b6001600160a01b0383163b6120865760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420706f736974696f6e48616e646c65720000000000000000006044820152606401611eb7565b60cb80546001600160a01b0385166001600160a01b03199091161790556120b6826001600160a01b03163b151590565b6120fb5760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103837b9b4ba34b7b725b2b2b832b960511b6044820152606401611eb7565b60ca80546001600160a01b0384166001600160a01b031990911617905561212b816001600160a01b03163b151590565b6121675760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081d985d5b1d609a1b6044820152606401611eb7565b60cc80546001600160a01b0319166001600160a01b0383811691821790925560c95460408051918416825286841660208301529285169281019290925260608201527f8112328d4831426daec69d853c715b8d7ea9a1b1e7449916ecce529f4f6d34db9060800160405180910390a1505050565b6121e3614822565b6001600160a01b0391909116600090815260f960205260409020805460ff1916911515919091179055565b6000806000861561223d57881561223757612232846020015185604001518b61270c565b61223a565b60005b90505b85801561224a5750600088115b1561226f576122628460200151898660e001516131b8565b61226c90826157b7565b90505b6101808401511561228d5761018084015161228a90826157b7565b90505b600085156122b5576122b2856020015186604001518761014001518860c00151614555565b90505b90999098509650505050505050565b6122cc614822565b60cf8190556040518181527fcb74cdf974f823ac31cd922bf056d88fbe5994fa3016245032720a6e3c3bb78b90602001611ef1565b612309614822565b6001600160a01b038216600081815260f56020908152604091829020805460ff19168515159081179091558251938452908301527f827c394aebf0fcbf2d4f5c0107a0031a3860ec0d5e06756e03aacccfb8d2836e91015b60405180910390a15050565b612375614822565b612388670de0b6b3a76400006064615753565b8111156123ec5760405162461bcd60e51b815260206004820152602c60248201527f4c69717569646174696f6e4665655573642073686f756c6420626520736d616c60448201526b0d8cae440e8d0c2dc409a82b60a31b6064820152608401611eb7565b60d681905560405181907fa1f7b5b39f880b6d687f45fbbb92abbf73efcc039c6629da904dad26a938c97b90600090a250565b600060018251116124685760405162461bcd60e51b8152602060048201526013602482015272092dcecc2d8d2c840e0c2e8d040d8cadccee8d606b1b6044820152606401611eb7565b600061247583600161487c565b805160ce5491925090600160a01b900460ff161561251f57806001146124ef5760405162461bcd60e51b815260206004820152602960248201527f496e76616c696420636f6c6c61746572616c2070617468206c656e6774682c206044820152686d757374206265203160b81b6064820152608401611eb7565b61251482600081518110612505576125056157cf565b60200260200101516001614a76565b506000949350505050565b60018110156125705760405162461bcd60e51b815260206004820152601e60248201527f496e76616c696420636f6c6c61746572616c2070617468206c656e67746800006044820152606401611eb7565b60e16000836125806001856157e5565b81518110612590576125906157cf565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1661260f5760405162461bcd60e51b815260206004820152602360248201527f4c61737420636f6c6c61746572616c2070617468206d75737420626520737461604482015262626c6560e81b6064820152608401611eb7565b60018111801561265a575060df600083600081518110612631576126316157cf565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16155b156126b85760405162461bcd60e51b815260206004820152602860248201527f466972737420636f6c6c61746572616c2070617468206d75737420626520636f6044820152671b1b185d195c985b60c21b6064820152608401611eb7565b505160011092915050565b6126cb614822565b60f6805460ff19168215159081179091556040519081527f794b147668d62b62bc9837c64f31d81ac77dde86ced09cb9f709620f0c676bf790602001611ef1565b60008161271b57506000612020565b6001600160a01b038416600090815260e6602090815260408083208615158452909152902054620186a0906127509084615753565b61201d9190615812565b612762614822565b6001600160a01b038216600081815260e06020908152604091829020805460ff191685151590811790915591519182527f443fc42adaca5b8aea024248df39b6b71abdeb8774cdd1cf86ddb721213d63499101611dd4565b6127c2614822565b60f8805460ff1916911515919091179055565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016141561281e5760405162461bcd60e51b8152600401611eb790615826565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612867600080516020615ca4833981519152546001600160a01b031690565b6001600160a01b03161461288d5760405162461bcd60e51b8152600401611eb790615872565b61289681614b7e565b604080516000808252602082019092526128b291839190614b86565b50565b6128bd614822565b6128b281614cf6565b6128ce614822565b6127108111156129205760405162461bcd60e51b815260206004820152601e60248201527f5374616b696e672066656520697320626967676572207468616e206d617800006044820152606401611eb7565b60d781905560405181907fdc9e04a344059be7277ef90803b1b6a131b38ab5591d7f7030fb59671ccc766490600090a250565b60cb546001600160a01b031633146129995760405162461bcd60e51b81526020600482015260096024820152682337b93134b23232b760b91b6044820152606401611eb7565b6001600160a01b038216600090815260e7602052604090205415612a77576001600160a01b038216600090815260e76020526040902054610e10906129de90426157e5565b6129e88484613413565b6129f291906158be565b6129fc9190615943565b6001600160a01b038316600090815260ea602052604081208054909190612a24908490615971565b90915550506001600160a01b038216600081815260ea60209081526040918290205491519182527f3cb3638f3b31ab1b2eac4293baf999af8fa0020bbcc532f347a1fcc1b0df9d0a910160405180910390a25b506001600160a01b0316600090815260e760205260409020429055565b612a9c614822565b60ce80546001600160a01b0319166001600160a01b0383169081179091556040517f98a0dc993512fd2ddd1a4ee28a53d1275ec3c174565e996b03d4718909237bf890600090a250565b612aee614822565b612710811115612b405760405162461bcd60e51b815260206004820152601e60248201527f4465706f7369742066656520697320626967676572207468616e206d617800006044820152606401611eb7565b60d481905560405181907f974fd3c1fcb4653dfc4fb740c4c692cd212d55c28f163f310128cb64d830067590600090a250565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415612bbc5760405162461bcd60e51b8152600401611eb790615826565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612c05600080516020615ca4833981519152546001600160a01b031690565b6001600160a01b031614612c2b5760405162461bcd60e51b8152600401611eb790615872565b612c3482614b7e565b612c4082826001614b86565b5050565b612c4c614822565b6001600160a01b038216600081815260e96020908152604091829020849055815192835282018390527fa239eb04fc7cc972e57abbece54319301bb24ffa3e6b29eb3252a449da7348179101612361565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614612d3d5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401611eb7565b50600080516020615ca483398151915290565b612d58614822565b60ce8054821515600160b81b0260ff60b81b199091161790556040517f653d38c0b962b51375cc5ff6894f74d8cd4c459cb1c2652f58ac1e1aa98879d190611ef190831515815260200190565b60cb546001600160a01b03163314612dff5760405162461bcd60e51b815260206004820181905260248201527f4f6e6c7920706f736974696f6e2068616e646c657220686173206163636573736044820152606401611eb7565b6001600160a01b038316600090815260f16020526040902054811115612e3d576001600160a01b038316600090815260f16020526040812055612e6b565b6001600160a01b038316600090815260f1602052604081208054839290612e659084906157e5565b90915550505b6001600160a01b038416600090815260f06020526040902054811115612ea9576001600160a01b038416600090815260f06020526040812055612ed7565b6001600160a01b038416600090815260f0602052604081208054839290612ed19084906157e5565b90915550505b811515600090815260ec6020526040902054811115612f0757811515600090815260ec6020526040812055612f2e565b811515600090815260ec602052604081208054839290612f289084906157e5565b90915550505b6001600160a01b038416600090815260e4602090815260408083208515158452909152902054811115612f86576001600160a01b038416600090815260e4602090815260408083208515158452909152812055612fc1565b6001600160a01b038416600090815260e460209081526040808320851515845290915281208054839290612fbb9084906157e5565b90915550505b604080518315158152602081018390526000918101919091526001600160a01b038516907fec9b2116b85c48acc85d9b2d3c13936f413582c5865801f8d798799ab7424747906060015b60405180910390a250505050565b613021614822565b60ed8190556040518181527ff2053e8a9adc30c78304596fca53e134bcc7bc04422573b5ccefc73fb1785a8190602001611ef1565b60cb546001600160a01b031633146130b05760405162461bcd60e51b815260206004820181905260248201527f4f6e6c7920706f736974696f6e2068616e646c657220686173206163636573736044820152606401611eb7565b6001600160a01b038316600090815260f16020526040812080548392906130d89084906157b7565b90915550506001600160a01b038416600090815260f06020526040812080548392906131059084906157b7565b9091555050811515600090815260ec60205260408120805483929061312b9084906157b7565b90915550506001600160a01b038416600090815260e4602090815260408083208515158452909152812080548392906131659084906157b7565b9091555050604080518315158152602081018390526001918101919091526001600160a01b038516907fec9b2116b85c48acc85d9b2d3c13936f413582c5865801f8d798799ab74247479060600161300b565b6000826131c757506000612020565b6001600160a01b038416600090815260e96020526040902054806131ea575060de545b801561323057610e10620186a0828661320387426157e5565b61320d9190615753565b6132179190615753565b6132219190615812565b61322b9190615812565b613233565b60005b95945050505050565b613244614822565b60db8190556040518181527fa73a083a58d5566ab16c4ee15caec96da6e5656287ee3ff62141a34a89007cdd90602001611ef1565b613281614822565b60d08190556040518181527f66ace67844373113db2f9037189f4ba7ba184f2d8a6e9cf5f986167246b8829590602001611ef1565b611e536003620186a0615a96565b6132cc614822565b6132d66000614d80565b565b6132e0614822565b6127108111156133475760405162461bcd60e51b815260206004820152602c60248201527f46756e64696e6752617465466163746f722073686f756c6420626520736d616c60448201526b0d8cae440e8d0c2dc409a82b60a31b6064820152608401611eb7565b6001600160a01b038216600081815260e8602052604090819020839055517fb964c9b37c6fd487e98f487952667b2734563004641f71694c3b288dbe96ee8790611dd49084815260200190565b61339c614822565b60fa80546001600160a01b0319166001600160a01b0392909216919091179055565b6133c6614822565b60ce8054821515600160c81b0260ff60c81b199091161790556040517f332e216478a944c679557e8d7fa72749ea5df970d585f591cc4d0da9e8ffbc9290611ef190831515815260200190565b60cc546040516352f55eed60e01b81526001600160a01b03838116600483015260009283929116906352f55eed90602401602060405180830381865afa158015613461573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134859190615aa5565b905080613496576000915050613634565b60ca54604051631cb5c89560e31b81526001600160a01b03868116600483015260016024830152600092169063e5ae44a890604401602060405180830381865afa1580156134e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061350c9190615aa5565b60ca54604051631cb5c89560e31b81526001600160a01b0388811660048301526000602483018190529394509091169063e5ae44a890604401602060405180830381865afa158015613562573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135869190615aa5565b9050808210156000816135a25761359d84846157e5565b6135ac565b6135ac83856157e5565b90506000826135bd576000196135c0565b60015b60dc546001600160a01b038b16600090815260e86020526040812054929350918891620186a0916135f19087615753565b6135fb9190615753565b6136059190615753565b61360f9190615812565b905060dd54811115613620575060dd545b61362a81836158be565b9750505050505050505b92915050565b613642614822565b6127108111156136945760405162461bcd60e51b815260206004820181905260248201527f556e7374616b696e672066656520697320626967676572207468616e206d61786044820152606401611eb7565b60d881905560405181907fb5134279d6ac77b3b8d844fea07bbe26a4301c3dd600ad7ed3296d54cdee0f0d90600090a250565b8161371f57801561371a5760405162461bcd60e51b815260206004820152601860248201527f436f6c6c61746572616c206d757374206e6f74207a65726f00000000000000006044820152606401611eb7565b613a2c565b808210156137875760405162461bcd60e51b815260206004820152602f60248201527f506f736974696f6e2073697a652073686f756c6420626520677265617465722060448201526e1d1a185b8818dbdb1b185d195c985b608a1b6064820152608401611eb7565b821515600090815260eb60205260409020546137b9576137b4670de0b6b3a76400006402540be400615753565b6137cc565b821515600090815260eb60205260409020545b831515600090815260ec60205260409020546137e99084906157b7565b11156138375760405162461bcd60e51b815260206004820152601860248201527f4d4158204f4920706572207369646520657863656564656400000000000000006044820152606401611eb7565b6001600160a01b038416600090815260ef60205260409020546138705761386b670de0b6b3a76400006402540be400615753565b61388a565b6001600160a01b038416600090815260ef60205260409020545b6001600160a01b038516600090815260f060205260409020546138ae9084906157b7565b11156138fc5760405162461bcd60e51b815260206004820152601960248201527f4d4158204f4920706572206173736574206578636565646564000000000000006044820152606401611eb7565b600060cf54116139225761391d670de0b6b3a76400006402540be400615753565b613926565b60cf545b6001600160a01b038616600090815260f1602052604090205461394a9084906157b7565b11156139985760405162461bcd60e51b815260206004820152601860248201527f4d6178204f4920706572207573657220657863656564656400000000000000006044820152606401611eb7565b6001600160a01b038416600081815260e3602090815260408083208715158085529083528184205494845260e483528184209084529091529020546139de9084906157b7565b1115613a2c5760405162461bcd60e51b815260206004820152601e60248201527f4d6178204f49207065722061737365742f73697a6520657863656564656400006044820152606401611eb7565b5050505050565b613a3b614822565b60ce8054821515600160c01b0260ff60c01b199091161790556040517f8fac644f106e383c944b6a26fd6a4fdbda220c68a65cd42a06cf3699022bb47b90611ef190831515815260200190565b613a90614822565b811515600081815260eb6020908152604091829020849055815192835282018390527fce12cb532d796514f88ad248b8edb839c370fc26ca605fc11c4d270f244a4efc9101612361565b613ae2614822565b6001600160a01b0381163b613b325760405162461bcd60e51b8152602060048201526016602482015275149959995c9c985b14de5cdd195b481a5b9d985b1a5960521b6044820152606401611eb7565b60cd80546001600160a01b0319166001600160a01b0383169081179091556040517fb7e6dd30172a1404b2860792ff460f894294f39836c7ad6289e84606d40673ea90600090a250565b60f85460ff1615613baf576001600160a01b0381163b15613baf5760405162461bcd60e51b8152600401611eb790615772565b6001600160a01b038116600090815260f9602052604090205460ff16156128b25760405162461bcd60e51b8152602060048201526009602482015268109b1858dadb1a5cdd60ba1b6044820152606401611eb7565b613c0c614822565b6001600160a01b038216600081815260df6020908152604091829020805460ff191685151590811790915591519182527f84dc9f3d55b660a87c439ab6606fbf55fb4279c9f608f4e70eaccab713359e179101611dd4565b613c6c614822565b67016345785d8a0000811115613cc45760405162461bcd60e51b815260206004820152601a60248201527f54726967676572476173466565206578636565646564206d61780000000000006044820152606401611eb7565b60d981905560405181907fc33d0cce64cda1b6e98bb9430fc2e5f2ec44c5670fa9ba7863263f80bef4228890600090a250565b611e53670de0b6b3a76400006402540be400615753565b600054600590610100900460ff16158015613d30575060005460ff8083169116105b613d935760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401611eb7565b6000805461ffff191660ff831617610100179055613dba826001600160a01b03163b151590565b613df55760405162461bcd60e51b815260206004820152600c60248201526b149554d1081a5b9d985b1a5960a21b6044820152606401611eb7565b613dfd614dd2565b60c980546001600160a01b0319166001600160a01b0384161790556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001612361565b613e5e614822565b60ce8054911515600160d01b0260ff60d01b19909216919091179055565b613e84614822565b620186a0811115613ed75760405162461bcd60e51b815260206004820152601d60248201527f496e76616c696420666565526577617264734261736973506f696e74730000006044820152606401611eb7565b60d282905560d581905560405181815282907fe4eb90010a45146e0040231e09a665af7f9a9c72199ced9aefcb269e7ed58bf090602001611dd4565b613f1b614822565b6001600160a01b038316600081815260e3602090815260408083208615158085529083529281902085905580519283529082018490527ffd731b4f1bc923efa351fbfe2e980416f1e133e36f61cb03c757f803024fe75291015b60405180910390a2505050565b60006120208383614a76565b613f96614822565b60ce8054821515600160a01b0260ff60a01b199091161790556040517f8cbbf67ba0ec8d1a6e84876b5099c1bb932a153e9b96bbb93abbb1535d4aca0890611ef190831515815260200190565b613feb614822565b6000811161403b5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206d61785472696767657250726963654c656e6774680000006044820152606401611eb7565b60f38190556040518181527fc7a4cb79639ece02fd53d5ca877ae625d4f81c42557fe746c1b750ffa958eebf90602001611ef1565b614078614822565b60ce8054821515600160a81b0260ff60a81b199091161790556040517f2b63851b7422cf9395e3c039e5e8810d823b855eac4eb54b06e02256da324b4a90611ef190831515815260200190565b6140cd614822565b60ce805460ff60b01b1916600160b01b8315158102919091179182905560405160ff9190920416151581527f23d118a93537db6835486a73a369108ba4a4e642eb19211a77153a833cb347c190602001611ef1565b61412a614822565b60f755565b614137614822565b60f880549115156101000261ff0019909216919091179055565b6000613634826000614a76565b33600090815260f5602052604090205460ff1661418d5760405162461bcd60e51b8152600401611eb790615772565b6001600160a01b038216600081815260f46020908152604091829020849055815192835282018390527f3d7fe7f100ffcfc0ea2eb6f9b55d18de291e748d17da9df23f75832aa13932139101612361565b6141e6614822565b620186a0811061422b5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420736c69707061676560801b6044820152606401611eb7565b60da8190556040518181527fbc2b59e103f3881938141bb7c9d2ec3c038ea4464e2f2e93d377539e61cf9b7090602001611ef1565b614268614822565b6001600160a01b03909216600090815260e46020908152604080832093151583529290522055565b60ce546000906001600160a01b03166142eb5760405162461bcd60e51b815260206004820152601b60248201527f466565206d616e61676572206e6f7420696e697469616c697a656400000000006044820152606401611eb7565b5060ce546001600160a01b031690565b614303614822565b6001600160a01b0381166143685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611eb7565b6128b281614d80565b600a6143816003620186a0615a96565b611e539190615812565b614393614822565b620151808111156143f05760405162461bcd60e51b815260206004820152602160248201527f44656c617944656c746154696d6520697320626967676572207468616e206d616044820152600f60fb1b6064820152608401611eb7565b60d38190556040518181527f5d9dff9d616a4759c276ec59463f7af071a5c3757e6755cf6e9f1f0b7525710590602001611ef1565b61442d614822565b6001600160a01b038216600081815260e26020908152604091829020805460ff191685151590811790915591519182527fefdb9a6fddb509d0a50837b2af22d8a3cb2676a5bdee7ce6c28d729d097ca1599101611dd4565b61448d614822565b6113888111156144f75760405162461bcd60e51b815260206004820152602f60248201527f4d617267696e4665654261736973506f696e74732073686f756c64206265207360448201526e0dac2d8d8cae440e8d0c2dc409a82b608b1b6064820152608401611eb7565b6001600160a01b038316600081815260e6602090815260408083208615158085529083529281902085905580519283529082018490527f5a5a1aa43c254ed4ca0525409249b8e06e1354dc051df695c081088df2d026719101613f75565b600081614564575060006145fc565b836145b3576145776003620186a0615a96565b6001600160a01b038616600090815260ea602052604090205461459a9084615abe565b6145a490856158be565b6145ae9190615943565b6145f9565b6145c16003620186a0615a96565b6001600160a01b038616600090815260ea60205260409020546145e5908490615abe565b6145ef90856158be565b6145f99190615943565b90505b949350505050565b60ca5460009081906001600160a01b03166146615760405162461bcd60e51b815260206004820152601e60248201527f506f736974696f6e4b6565706572206e6f7420696e697469616c697a656400006044820152606401611eb7565b60ca54604051631928b3cb60e01b8152600481018a90526000916001600160a01b031690631928b3cb906024016101a060405180830381865afa1580156146ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146d09190615b08565b80519091506001600160a01b0316158015906146f157506000816101400151115b6147315760405162461bcd60e51b8152602060048201526011602482015270141bdcda5d1a5bdb881b9bdd115e1a5cdd607a1b6044820152606401611eb7565b61473f88888888888661220e565b9250925050965096945050505050565b614757614822565b6001600160a01b038116600090815260ee60209081526040918290205482519081529081018490527fe2f0d2b9bd62fe4d997e442d96308c2084de77174fc94e18e14bf473b030f4dd910160405180910390a1620186a082106148085760405162461bcd60e51b8152602060048201526024808201527f5468726573686f6c642073686f756c6420626520736d616c6c6572207468616e6044820152630409a82b60e31b6064820152608401611eb7565b6001600160a01b0316600090815260ee6020526040902055565b6097546001600160a01b031633146132d65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611eb7565b60606001835111801561489157506003835111155b6148d35760405162461bcd60e51b8152602060048201526013602482015272092dcecc2d8d2c840e0c2e8d040d8cadccee8d606b1b6044820152606401611eb7565b6060835160021480156148e65750826001145b156149585760408051600180825281830190925290602080830190803683370190505090508360018151811061491e5761491e6157cf565b602002602001015181600081518110614939576149396157cf565b6001600160a01b03909216602092830291909101909101529050613634565b6001845161496691906157e5565b83106149aa5760405162461bcd60e51b8152602060048201526013602482015272092dcecc2d8d2c840e6e8c2e4e840d2dcc8caf606b1b6044820152606401611eb7565b8284516149b791906157e5565b67ffffffffffffffff8111156149cf576149cf6151cf565b6040519080825280602002602001820160405280156149f8578160200160208202803683370190505b5090506000835b8551811015614a6c57858181518110614a1a57614a1a6157cf565b6020026020010151838381518110614a3457614a346157cf565b6001600160a01b039092166020928302919091019091015281614a5681615bc2565b9250508080614a6490615bc2565b9150506149ff565b5090949350505050565b6001600160a01b038216600090815260e1602090815260408083205460df90925282205460ff9182169116818015614aab5750805b15614b20576040805162461bcd60e51b81526020600482015260248101919091527f496e76616c696420636f6e6669672c20746f6b656e2073686f756c64206f6e6c60448201527f792062656c6f6e6720746f20737461626c65206f7220636f6c6c61746572616c6064820152608401611eb7565b60008280614b2b5750815b9050848015614b38575080155b156132335760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b21030b8383937bb30b6103a37b5b2b760511b6044820152606401611eb7565b6128b2614822565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615614bbe57614bb983614e01565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015614c18575060408051601f3d908101601f19168201909252614c1591810190615aa5565b60015b614c7b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401611eb7565b600080516020615ca48339815191528114614cea5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401611eb7565b50614bb9838383614e9d565b614d046003620186a0615a96565b8110614d4b5760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206d617846756e64696e675261746560501b6044820152606401611eb7565b60dd8190556040518181527f3511a46416611db647471465fa49e5676f017dc030bfcbeb0dc856a3fb514ce890602001611ef1565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16614df95760405162461bcd60e51b8152600401611eb790615bdd565b6132d6614ec8565b6001600160a01b0381163b614e6e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401611eb7565b600080516020615ca483398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b614ea683614ef8565b600082511180614eb35750805b15614bb957614ec28383614f38565b50505050565b600054610100900460ff16614eef5760405162461bcd60e51b8152600401611eb790615bdd565b6132d633614d80565b614f0181614e01565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606120208383604051806060016040528060278152602001615cc4602791396060600080856001600160a01b031685604051614f759190615c54565b600060405180830381855af49150503d8060008114614fb0576040519150601f19603f3d011682016040523d82523d6000602084013e614fb5565b606091505b5091509150614fc686838387614fd0565b9695505050505050565b6060831561503c578251615035576001600160a01b0385163b6150355760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611eb7565b50816145fc565b6145fc83838151156150515781518083602001fd5b8060405162461bcd60e51b8152600401611eb79190615c70565b6001600160a01b03811681146128b257600080fd5b803561508b8161506b565b919050565b600080604083850312156150a357600080fd5b82356150ae8161506b565b946020939093013593505050565b80151581146128b257600080fd5b803561508b816150bc565b600080604083850312156150e857600080fd5b82356150f38161506b565b91506020830135615103816150bc565b809150509250929050565b60006020828403121561512057600080fd5b5035919050565b60006020828403121561513957600080fd5b81356120208161506b565b60008060006060848603121561515957600080fd5b83356151648161506b565b925060208401356151748161506b565b91506040840135615184816150bc565b809150509250925092565b6000806000606084860312156151a457600080fd5b83356151af8161506b565b925060208401356151bf8161506b565b915060408401356151848161506b565b634e487b7160e01b600052604160045260246000fd5b6040516101a0810167ffffffffffffffff81118282101715615209576152096151cf565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715615238576152386151cf565b604052919050565b60008060008060008086880361024081121561525b57600080fd5b87359650602088013595506040880135615274816150bc565b94506060880135615284816150bc565b93506080880135615294816150bc565b92506101a0609f1982018113156152aa57600080fd5b6152b26151e5565b91506152c060a08a01615080565b82526152ce60c08a01615080565b60208301526152df60e08a016150ca565b6040830152610100808a01356060840152610120808b01356080850152610140808c013560a0860152610160808d013560c0870152610180808e013560e0880152858e0135858801526101c08e0135848801526101e08e0135838801526102008e0135828801526102208e013581880152505050505050809150509295509295509295565b6000602080838503121561537757600080fd5b823567ffffffffffffffff8082111561538f57600080fd5b818501915085601f8301126153a357600080fd5b8135818111156153b5576153b56151cf565b8060051b91506153c684830161520f565b81815291830184019184810190888411156153e057600080fd5b938501935b8385101561540a57843592506153fa8361506b565b82825293850193908501906153e5565b98975050505050505050565b60006020828403121561542857600080fd5b8135612020816150bc565b60008060006060848603121561544857600080fd5b83356154538161506b565b92506020840135615463816150bc565b929592945050506040919091013590565b6000806040838503121561548757600080fd5b82356154928161506b565b915060208301356151038161506b565b600080604083850312156154b557600080fd5b82356154c08161506b565b915060208381013567ffffffffffffffff808211156154de57600080fd5b818601915086601f8301126154f257600080fd5b813581811115615504576155046151cf565b615516601f8201601f1916850161520f565b9150808252878482850101111561552c57600080fd5b80848401858401376000848284010152508093505050509250929050565b6000806000806080858703121561556057600080fd5b843561556b8161506b565b9350602085013561557b8161506b565b9250604085013561558b816150bc565b9396929550929360600135925050565b6000806000606084860312156155b057600080fd5b83356155bb8161506b565b95602085013595506040909401359392505050565b600080600080600060a086880312156155e857600080fd5b85356155f38161506b565b945060208601356156038161506b565b93506040860135615613816150bc565b94979396509394606081013594506080013592915050565b6000806040838503121561563e57600080fd5b82356150ae816150bc565b6000806040838503121561565c57600080fd5b50508035926020909101359150565b6000806000806080858703121561568157600080fd5b843561568c8161506b565b9350602085013561569c816150bc565b93969395505050506040820135916060013590565b60008060008060008060c087890312156156ca57600080fd5b86359550602087013594506040870135935060608701356156ea816150bc565b925060808701356156fa816150bc565b915060a087013561570a816150bc565b809150509295509295509295565b6000806040838503121561572b57600080fd5b8235915060208301356151038161506b565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561576d5761576d61573d565b500290565b60208082526003908201526211909160ea1b604082015260600190565b805161508b816150bc565b6000602082840312156157ac57600080fd5b8151612020816150bc565b600082198211156157ca576157ca61573d565b500190565b634e487b7160e01b600052603260045260246000fd5b6000828210156157f7576157f761573d565b500390565b634e487b7160e01b600052601260045260246000fd5b600082615821576158216157fc565b500490565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60006001600160ff1b03818413828413808216868404861116156158e4576158e461573d565b600160ff1b60008712828116878305891216156159035761590361573d565b6000871292508782058712848416161561591f5761591f61573d565b878505871281841616156159355761593561573d565b505050929093029392505050565b600082615952576159526157fc565b600160ff1b82146000198414161561596c5761596c61573d565b500590565b600080821280156001600160ff1b03849003851316156159935761599361573d565b600160ff1b83900384128116156159ac576159ac61573d565b50500190565b600181815b808511156159ed5781600019048211156159d3576159d361573d565b808516156159e057918102915b93841c93908002906159b7565b509250929050565b600082615a0457506001613634565b81615a1157506000613634565b8160018114615a275760028114615a3157615a4d565b6001915050613634565b60ff841115615a4257615a4261573d565b50506001821b613634565b5060208310610133831016604e8410600b8410161715615a70575081810a613634565b615a7a83836159b2565b8060001904821115615a8e57615a8e61573d565b029392505050565b600061202060ff8416836159f5565b600060208284031215615ab757600080fd5b5051919050565b60008083128015600160ff1b850184121615615adc57615adc61573d565b6001600160ff1b0384018313811615615af757615af761573d565b50500390565b805161508b8161506b565b60006101a08284031215615b1b57600080fd5b615b236151e5565b615b2c83615afd565b8152615b3a60208401615afd565b6020820152615b4b6040840161578f565b6040820152606083810151908201526080808401519082015260a0808401519082015260c0808401519082015260e080840151908201526101008084015190820152610120808401519082015261014080840151908201526101608084015190820152610180928301519281019290925250919050565b6000600019821415615bd657615bd661573d565b5060010190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015615c43578181015183820152602001615c2b565b83811115614ec25750506000910152565b60008251615c66818460208701615c28565b9190910192915050565b6020815260008251806020840152615c8f816040850160208701615c28565b601f01601f1916919091016040019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203df58d686a733753d682b24e421943709a73237c663ee4d40bbca3e8ad3e8a1c64736f6c634300080c0033

Deployed Bytecode

0x6080604052600436106109d55760003560e01c8063829c1c57116104fb578063caa0b2fc11610297578063eeffe46911610165578063f4988279116100d7578063fbd2048c11610090578063fbd2048c14611cbc578063fbfa77cf14611cdc578063fce28c1014611cfc578063fd05552614611d12578063fd3abb6b14611d32578063fd3c79ac14611d5257600080fd5b8063f498827914610be3578063f79280fc14611c26578063f849918f14611c47578063fa5dc29114611c67578063fb2a8ef414611c87578063fbb5d08114611c9c57600080fd5b8063f04ad31b11610129578063f04ad31b14611ba7578063f0b6eff414611664578063f20b44d214611bbc578063f2d6382614611bdc578063f2fde38b14611bf1578063f40f2a7914611c1157600080fd5b8063eeffe46914610ffa578063ef1a61d614611b24578063ef580fec14611b44578063efb0d2f214611b64578063eff9884314611b9157600080fd5b8063db16e98911610209578063e7554f03116101c2578063e7554f0314610ffa578063e8a020d614611a8f578063e95d21c814611aa4578063ebb1b4b914611ac4578063ec04fabc14611ae4578063ec3f5bb814611b0457600080fd5b8063db16e989146119bf578063de22ba43146119d5578063de8f5a11146119f5578063dede51e614611a22578063e2cc387c14611a42578063e508e31414611a6257600080fd5b8063d1636ae71161025b578063d1636ae714611941578063d1e6a272146112b1578063d2e808e31461195d578063d8f897c31461197d578063dac05497146112b1578063daf16f57146119aa57600080fd5b8063caa0b2fc1461155f578063ccff53e0146118cb578063cd8dd99b146118eb578063cfa119f514611901578063d0fb02031461192157600080fd5b8063afe87567116103d4578063beeccee611610346578063c4d60b58116102ff578063c4d60b5814611833578063c4d66de81461186b578063c6d87dd514610d35578063c73d7c7b1461188b578063c7d4f952146118ab578063c8cbdd3414610b3f57600080fd5b8063beeccee61461176f578063bf352bd71461178f578063c06959d5146117bc578063c0e0f46b146117f4578063c201cf1914611809578063c2133f2f1461181e57600080fd5b8063b780ef9b11610398578063b780ef9b14611710578063b918b254146112b1578063b9465d2114611725578063ba6b92bc14611745578063babc92f01461175a578063be202b1414610be357600080fd5b8063afe8756714610b3f578063b194d13d14610d6b578063b23eda0d146116b8578063b3887911146116e5578063b50cf256146116fb57600080fd5b806397dff11d1161046d578063a51cdec311610431578063a51cdec314611624578063a68ab21f14611644578063a6b4f2ce14611664578063a71b68dd14611679578063ab2801ba14611698578063abd7813914610ffa57600080fd5b806397dff11d1461157457806398929be7146115945780639a01126c146115b45780639ac2a011146115d4578063a04e876c1461160457600080fd5b80638da5cb5b116104bf5780638da5cb5b146114d457806390d6c192146114f25780639185f6ec1461151357806395082d251461154357806395f8f40b1461155f57806396279aba1461155f57600080fd5b8063829c1c571461145157806382ff8192146114715780638777e41e1461148757806387a0c404146114b45780638a39735a14610d3557600080fd5b806344e4f2b71161077557806367a52793116106435780637619bc57116105b55780637cd0814b1161056e5780637cd0814b146113a25780637e1dd2ef146113ba5780637e581025146113da5780637f374fbe146113f05780638041470f146114105780638106fc5a1461143157600080fd5b80637619bc57146112dc578063762036b714611309578063774561f51461133657806378073dd31461134c57806379a8dff7146113615780637bbc45e81461138157600080fd5b80636c348b53116106075780636c348b53146112425780636e8ffe62146112575780636f49712b1461126c578063715018a61461129c578063730e8283146112b157806375e98da4146112c657600080fd5b806367a52793146111d75780636892a325146111ed57806368d538a31461120d5780636be2325514610be35780636be6026b1461122d57600080fd5b8063538ba4f9116106e75780635bbf2c29116106a05780635bbf2c29146111345780635dceb8d3146111545780635e8f0a571461116b57806361695ebe1461118b57806362f3edb7146111a157806364c8bb7e146111c157600080fd5b8063538ba4f91461109257806353b2d7b5146110a7578063558e0476146110c7578063559e2f1f146110fd57806356d70f6c146111145780635962e8af14610ffa57600080fd5b80634e41f064116107395780634e41f06414610ffa5780634f1ef2861461100f57806350d70d3d1461102257806351c037001461103c57806352d1902d1461105c5780635377c56f1461107157600080fd5b806344e4f2b714610f79578063472d35b914610f8f57806347ad220214610faf578063490ae21014610fc45780634befe2ca14610fe457600080fd5b806320ba5698116108b257806334f32e25116108245780633d8b9595116107dd5780633d8b959514610ebe5780633ea479ae14610ed35780633ff9fd3514610ee9578063410dbf7e14610f0957806341ed96bc14610f29578063447b4a4714610f4957600080fd5b806334f32e2514610de257806335139e0b14610e1a5780633526931514610e3a5780633659cfe614610e50578063365f9ef114610e7057806338faf85114610e9157600080fd5b80632aad3a4b116108765780632aad3a4b14610d4b5780632ab1287214610d6b5780632b32ae6c14610be35780632c28dc3114610d92578063333e99db14610db257806334c1557d14610d3557600080fd5b806320ba569814610cad578063238af9a414610cc357806327acb3ac14610cdd578063297ee99414610cfd5780632a62b52d14610d3557600080fd5b806312743c801161094b5780631a465e861161090f5780631a465e8614610be35780631c0618c814610bf85780631d0a1ab914610c2d5780631e1bff3f14610c4d578063209da5b914610c6d57806320ab950214610c8d57600080fd5b806312743c8014610b565780631287687b14610b76578063153b0d1e14610b8c5780631645f94214610bac578063174d269414610bcd57600080fd5b8063090360c11161099d578063090360c114610a715780630af1c25114610aa95780630c55fe6f14610abf5780630ee21e5414610adf5780630f3290d414610b1f578063126082cf14610b3f57600080fd5b8063018f2d82146109da578063021c197c14610a0357806304799c9914610a255780630741b28214610a3c57806307c5875214610a5c575b600080fd5b3480156109e657600080fd5b506109f060d55481565b6040519081526020015b60405180910390f35b348015610a0f57600080fd5b50610a23610a1e366004615090565b611d7f565b005b348015610a3157600080fd5b506109f06202a30081565b348015610a4857600080fd5b50610a23610a573660046150d5565b611de0565b348015610a6857600080fd5b506109f0611e40565b348015610a7d57600080fd5b506109f0610a8c3660046150d5565b60e460209081526000928352604080842090915290825290205481565b348015610ab557600080fd5b506109f060de5481565b348015610acb57600080fd5b50610a23610ada36600461510e565b611e56565b348015610aeb57600080fd5b50610b0f610afa366004615127565b60df6020526000908152604090205460ff1681565b60405190151581526020016109fa565b348015610b2b57600080fd5b50610b0f610b3a366004615144565b611efc565b348015610b4b57600080fd5b506109f0620186a081565b348015610b6257600080fd5b50610a23610b7136600461518f565b612027565b348015610b8257600080fd5b506109f060cf5481565b348015610b9857600080fd5b50610a23610ba73660046150d5565b6121db565b348015610bb857600080fd5b5060ce54610b0f90600160b81b900460ff1681565b348015610bd957600080fd5b506109f060d65481565b348015610bef57600080fd5b506109f0600181565b348015610c0457600080fd5b50610c18610c13366004615240565b61220e565b604080519283526020830191909152016109fa565b348015610c3957600080fd5b50610a23610c4836600461510e565b6122c4565b348015610c5957600080fd5b50610a23610c683660046150d5565b612301565b348015610c7957600080fd5b50610a23610c8836600461510e565b61236d565b348015610c9957600080fd5b50610b0f610ca8366004615364565b61241f565b348015610cb957600080fd5b506109f060d85481565b348015610ccf57600080fd5b5060f654610b0f9060ff1681565b348015610ce957600080fd5b50610a23610cf8366004615416565b6126c3565b348015610d0957600080fd5b5060c954610d1d906001600160a01b031681565b6040516001600160a01b0390911681526020016109fa565b348015610d4157600080fd5b506109f061271081565b348015610d5757600080fd5b506109f0610d66366004615433565b61270c565b348015610d7757600080fd5b50610d80600181565b60405160ff90911681526020016109fa565b348015610d9e57600080fd5b50610a23610dad3660046150d5565b61275a565b348015610dbe57600080fd5b50610b0f610dcd366004615127565b60f96020526000908152604090205460ff1681565b348015610dee57600080fd5b506109f0610dfd3660046150d5565b60e560209081526000928352604080842090915290825290205481565b348015610e2657600080fd5b50610a23610e35366004615416565b6127ba565b348015610e4657600080fd5b506109f060d25481565b348015610e5c57600080fd5b50610a23610e6b366004615127565b6127d5565b348015610e7c57600080fd5b5060ce54610b0f90600160a81b900460ff1681565b348015610e9d57600080fd5b506109f0610eac366004615127565b60f46020526000908152604090205481565b348015610eca57600080fd5b50610d80600081565b348015610edf57600080fd5b506109f060d35481565b348015610ef557600080fd5b50610a23610f0436600461510e565b6128b5565b348015610f1557600080fd5b50610a23610f2436600461510e565b6128c6565b348015610f3557600080fd5b50610a23610f44366004615474565b612953565b348015610f5557600080fd5b50610b0f610f64366004615127565b60e06020526000908152604090205460ff1681565b348015610f8557600080fd5b506109f060f35481565b348015610f9b57600080fd5b50610a23610faa366004615127565b612a94565b348015610fbb57600080fd5b506109f0600b81565b348015610fd057600080fd5b50610a23610fdf36600461510e565b612ae6565b348015610ff057600080fd5b506109f061138881565b34801561100657600080fd5b506109f0600081565b610a2361101d3660046154a2565b612b73565b34801561102e57600080fd5b5060f854610b0f9060ff1681565b34801561104857600080fd5b50610a23611057366004615090565b612c44565b34801561106857600080fd5b506109f0612c9d565b34801561107d57600080fd5b5060ce54610b0f90600160c01b900460ff1681565b34801561109e57600080fd5b50610d1d600081565b3480156110b357600080fd5b50610a236110c2366004615416565b612d50565b3480156110d357600080fd5b506109f06110e2366004615127565b6001600160a01b0316600090815260f4602052604090205490565b34801561110957600080fd5b506109f06224ea0081565b34801561112057600080fd5b50610a2361112f36600461554a565b612da5565b34801561114057600080fd5b50610a2361114f36600461510e565b613019565b34801561116057600080fd5b506109f06201518081565b34801561117757600080fd5b50610a2361118636600461554a565b613056565b34801561119757600080fd5b506109f060d05481565b3480156111ad57600080fd5b506109f06111bc36600461559b565b6131b8565b3480156111cd57600080fd5b506109f060d95481565b3480156111e357600080fd5b506109f060d45481565b3480156111f957600080fd5b50610a2361120836600461510e565b61323c565b34801561121957600080fd5b50610a2361122836600461510e565b613279565b34801561123957600080fd5b506109f06132b6565b34801561124e57600080fd5b506109f0600a81565b34801561126357600080fd5b506109f0606481565b34801561127857600080fd5b50610b0f611287366004615127565b60e26020526000908152604090205460ff1681565b3480156112a857600080fd5b50610a236132c4565b3480156112bd57600080fd5b506109f0600281565b3480156112d257600080fd5b506109f060db5481565b3480156112e857600080fd5b506109f06112f7366004615127565b60e86020526000908152604090205481565b34801561131557600080fd5b506109f0611324366004615127565b60ef6020526000908152604090205481565b34801561134257600080fd5b506109f060ed5481565b34801561135857600080fd5b506109f0600681565b34801561136d57600080fd5b50610a2361137c366004615090565b6132d8565b34801561138d57600080fd5b5060ce54610b0f90600160d01b900460ff1681565b3480156113ae57600080fd5b506109f063039ada0081565b3480156113c657600080fd5b50610a236113d5366004615127565b613394565b3480156113e657600080fd5b506109f060f75481565b3480156113fc57600080fd5b50610a2361140b366004615416565b6133be565b34801561141c57600080fd5b5060ce54610b0f90600160b01b900460ff1681565b34801561143d57600080fd5b506109f061144c366004615474565b613413565b34801561145d57600080fd5b50610a2361146c36600461510e565b61363a565b34801561147d57600080fd5b506109f060dc5481565b34801561149357600080fd5b506109f06114a2366004615127565b60ee6020526000908152604090205481565b3480156114c057600080fd5b50610a236114cf3660046155d0565b6136c7565b3480156114e057600080fd5b506097546001600160a01b0316610d1d565b3480156114fe57600080fd5b5060ce54610b0f90600160c81b900460ff1681565b34801561151f57600080fd5b50610b0f61152e366004615127565b60e16020526000908152604090205460ff1681565b34801561154f57600080fd5b506109f0670de0b6b3a764000081565b34801561156b57600080fd5b506109f0600381565b34801561158057600080fd5b50610a2361158f366004615416565b613a33565b3480156115a057600080fd5b50610a236115af36600461562b565b613a88565b3480156115c057600080fd5b50610a236115cf366004615127565b613ada565b3480156115e057600080fd5b50610b0f6115ef366004615127565b60f56020526000908152604090205460ff1681565b34801561161057600080fd5b5060cd54610d1d906001600160a01b031681565b34801561163057600080fd5b50610a2361163f366004615127565b613b7c565b34801561165057600080fd5b5060ca54610d1d906001600160a01b031681565b34801561167057600080fd5b506109f0600481565b34801561168557600080fd5b5060f854610b0f90610100900460ff1681565b3480156116a457600080fd5b5060fa54610d1d906001600160a01b031681565b3480156116c457600080fd5b506109f06116d3366004615127565b60f06020526000908152604090205481565b3480156116f157600080fd5b506109f060da5481565b34801561170757600080fd5b506109f0601281565b34801561171c57600080fd5b506109f0600781565b34801561173157600080fd5b50610a236117403660046150d5565b613c04565b34801561175157600080fd5b506109f0600981565b34801561176657600080fd5b506109f0600881565b34801561177b57600080fd5b50610a2361178a36600461510e565b613c64565b34801561179b57600080fd5b506109f06117aa366004615416565b60eb6020526000908152604090205481565b3480156117c857600080fd5b506109f06117d73660046150d5565b60e660209081526000928352604080842090915290825290205481565b34801561180057600080fd5b506109f0600c81565b34801561181557600080fd5b506109f0613cf7565b34801561182a57600080fd5b506109f0600e81565b34801561183f57600080fd5b506109f061184e3660046150d5565b60e360209081526000928352604080842090915290825290205481565b34801561187757600080fd5b50610a23611886366004615127565b613d0e565b34801561189757600080fd5b50610a236118a6366004615416565b613e56565b3480156118b757600080fd5b50610a236118c6366004615649565b613e7c565b3480156118d757600080fd5b50610a236118e6366004615433565b613f13565b3480156118f757600080fd5b506109f060d15481565b34801561190d57600080fd5b50610b0f61191c3660046150d5565b613f82565b34801561192d57600080fd5b5060ce54610d1d906001600160a01b031681565b34801561194d57600080fd5b506109f067016345785d8a000081565b34801561196957600080fd5b50610a23611978366004615416565b613f8e565b34801561198957600080fd5b506109f0611998366004615127565b60e76020526000908152604090205481565b3480156119b657600080fd5b506109f0600f81565b3480156119cb57600080fd5b506109f060dd5481565b3480156119e157600080fd5b5060cb54610d1d906001600160a01b031681565b348015611a0157600080fd5b506109f0611a10366004615127565b60f16020526000908152604090205481565b348015611a2e57600080fd5b50610a23611a3d36600461510e565b613fe3565b348015611a4e57600080fd5b50610a23611a5d366004615416565b614070565b348015611a6e57600080fd5b506109f0611a7d366004615416565b60ec6020526000908152604090205481565b348015611a9b57600080fd5b506109f0601081565b348015611ab057600080fd5b50610a23611abf366004615416565b6140c5565b348015611ad057600080fd5b50610a23611adf36600461510e565b614122565b348015611af057600080fd5b50610a23611aff366004615416565b61412f565b348015611b1057600080fd5b50610b0f611b1f366004615127565b614151565b348015611b3057600080fd5b50610a23611b3f366004615090565b61415e565b348015611b5057600080fd5b50610a23611b5f36600461510e565b6141de565b348015611b7057600080fd5b506109f0611b7f366004615127565b60e96020526000908152604090205481565b348015611b9d57600080fd5b506109f060d75481565b348015611bb357600080fd5b506109f0600581565b348015611bc857600080fd5b50610a23611bd7366004615433565b614260565b348015611be857600080fd5b50610d1d614290565b348015611bfd57600080fd5b50610a23611c0c366004615127565b6142fb565b348015611c1d57600080fd5b506109f0614371565b348015611c3257600080fd5b5060ce54610b0f90600160a01b900460ff1681565b348015611c5357600080fd5b50610a23611c6236600461510e565b61438b565b348015611c7357600080fd5b50610a23611c823660046150d5565b614425565b348015611c9357600080fd5b506109f0600d81565b348015611ca857600080fd5b50610a23611cb7366004615433565b614485565b348015611cc857600080fd5b506109f0611cd736600461566b565b614555565b348015611ce857600080fd5b5060cc54610d1d906001600160a01b031681565b348015611d0857600080fd5b506109f0610e1081565b348015611d1e57600080fd5b50610c18611d2d3660046156b1565b614604565b348015611d3e57600080fd5b50610a23611d4d366004615718565b61474f565b348015611d5e57600080fd5b506109f0611d6d366004615127565b60ea6020526000908152604090205481565b611d87614822565b6001600160a01b038216600081815260ef602052604090819020839055517f218e8b6cee175021e646f1437799a87d14d7aeeacbfd9e0fbda3fc61cf0aa6e990611dd49084815260200190565b60405180910390a25050565b611de8614822565b6001600160a01b038216600081815260e16020908152604091829020805460ff191685151590811790915591519182527fd50854e6bdda54e27ca6c587316f15ef3c12e29456bb61067de70d3dea8cbe459101611dd4565b611e53670de0b6b3a76400006064615753565b81565b611e5e614822565b62015180811115611ec05760405162461bcd60e51b815260206004820152602160248201527f436c6f736544656c746154696d6520697320626967676572207468616e206d616044820152600f60fb1b60648201526084015b60405180910390fd5b60d18190556040518181527f47eda403efad01d5c4d75ebc312d20e5a8e6e8fecb2a557791a696105183709c906020015b60405180910390a150565b60006001600160a01b0384163b158015611f1e57506001600160a01b0383163b155b611f3a5760405162461bcd60e51b8152600401611eb790615772565b826001600160a01b0316846001600160a01b03161415611f5c57506001612020565b60fa54604051630519e01b60e41b81526001600160a01b0386811660048301528581166024830152600092169063519e01b090604401602060405180830381865afa158015611faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd3919061579a565b9050828015611fe0575080155b1561201d5760405162461bcd60e51b815260206004820152600d60248201526c4e6f742064656c65676174656560981b6044820152606401611eb7565b90505b9392505050565b61202f614822565b6001600160a01b0383163b6120865760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420706f736974696f6e48616e646c65720000000000000000006044820152606401611eb7565b60cb80546001600160a01b0385166001600160a01b03199091161790556120b6826001600160a01b03163b151590565b6120fb5760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103837b9b4ba34b7b725b2b2b832b960511b6044820152606401611eb7565b60ca80546001600160a01b0384166001600160a01b031990911617905561212b816001600160a01b03163b151590565b6121675760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081d985d5b1d609a1b6044820152606401611eb7565b60cc80546001600160a01b0319166001600160a01b0383811691821790925560c95460408051918416825286841660208301529285169281019290925260608201527f8112328d4831426daec69d853c715b8d7ea9a1b1e7449916ecce529f4f6d34db9060800160405180910390a1505050565b6121e3614822565b6001600160a01b0391909116600090815260f960205260409020805460ff1916911515919091179055565b6000806000861561223d57881561223757612232846020015185604001518b61270c565b61223a565b60005b90505b85801561224a5750600088115b1561226f576122628460200151898660e001516131b8565b61226c90826157b7565b90505b6101808401511561228d5761018084015161228a90826157b7565b90505b600085156122b5576122b2856020015186604001518761014001518860c00151614555565b90505b90999098509650505050505050565b6122cc614822565b60cf8190556040518181527fcb74cdf974f823ac31cd922bf056d88fbe5994fa3016245032720a6e3c3bb78b90602001611ef1565b612309614822565b6001600160a01b038216600081815260f56020908152604091829020805460ff19168515159081179091558251938452908301527f827c394aebf0fcbf2d4f5c0107a0031a3860ec0d5e06756e03aacccfb8d2836e91015b60405180910390a15050565b612375614822565b612388670de0b6b3a76400006064615753565b8111156123ec5760405162461bcd60e51b815260206004820152602c60248201527f4c69717569646174696f6e4665655573642073686f756c6420626520736d616c60448201526b0d8cae440e8d0c2dc409a82b60a31b6064820152608401611eb7565b60d681905560405181907fa1f7b5b39f880b6d687f45fbbb92abbf73efcc039c6629da904dad26a938c97b90600090a250565b600060018251116124685760405162461bcd60e51b8152602060048201526013602482015272092dcecc2d8d2c840e0c2e8d040d8cadccee8d606b1b6044820152606401611eb7565b600061247583600161487c565b805160ce5491925090600160a01b900460ff161561251f57806001146124ef5760405162461bcd60e51b815260206004820152602960248201527f496e76616c696420636f6c6c61746572616c2070617468206c656e6774682c206044820152686d757374206265203160b81b6064820152608401611eb7565b61251482600081518110612505576125056157cf565b60200260200101516001614a76565b506000949350505050565b60018110156125705760405162461bcd60e51b815260206004820152601e60248201527f496e76616c696420636f6c6c61746572616c2070617468206c656e67746800006044820152606401611eb7565b60e16000836125806001856157e5565b81518110612590576125906157cf565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1661260f5760405162461bcd60e51b815260206004820152602360248201527f4c61737420636f6c6c61746572616c2070617468206d75737420626520737461604482015262626c6560e81b6064820152608401611eb7565b60018111801561265a575060df600083600081518110612631576126316157cf565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16155b156126b85760405162461bcd60e51b815260206004820152602860248201527f466972737420636f6c6c61746572616c2070617468206d75737420626520636f6044820152671b1b185d195c985b60c21b6064820152608401611eb7565b505160011092915050565b6126cb614822565b60f6805460ff19168215159081179091556040519081527f794b147668d62b62bc9837c64f31d81ac77dde86ced09cb9f709620f0c676bf790602001611ef1565b60008161271b57506000612020565b6001600160a01b038416600090815260e6602090815260408083208615158452909152902054620186a0906127509084615753565b61201d9190615812565b612762614822565b6001600160a01b038216600081815260e06020908152604091829020805460ff191685151590811790915591519182527f443fc42adaca5b8aea024248df39b6b71abdeb8774cdd1cf86ddb721213d63499101611dd4565b6127c2614822565b60f8805460ff1916911515919091179055565b306001600160a01b037f0000000000000000000000004e11c45163ce5ab3b504021c858e09a034c1a90416141561281e5760405162461bcd60e51b8152600401611eb790615826565b7f0000000000000000000000004e11c45163ce5ab3b504021c858e09a034c1a9046001600160a01b0316612867600080516020615ca4833981519152546001600160a01b031690565b6001600160a01b03161461288d5760405162461bcd60e51b8152600401611eb790615872565b61289681614b7e565b604080516000808252602082019092526128b291839190614b86565b50565b6128bd614822565b6128b281614cf6565b6128ce614822565b6127108111156129205760405162461bcd60e51b815260206004820152601e60248201527f5374616b696e672066656520697320626967676572207468616e206d617800006044820152606401611eb7565b60d781905560405181907fdc9e04a344059be7277ef90803b1b6a131b38ab5591d7f7030fb59671ccc766490600090a250565b60cb546001600160a01b031633146129995760405162461bcd60e51b81526020600482015260096024820152682337b93134b23232b760b91b6044820152606401611eb7565b6001600160a01b038216600090815260e7602052604090205415612a77576001600160a01b038216600090815260e76020526040902054610e10906129de90426157e5565b6129e88484613413565b6129f291906158be565b6129fc9190615943565b6001600160a01b038316600090815260ea602052604081208054909190612a24908490615971565b90915550506001600160a01b038216600081815260ea60209081526040918290205491519182527f3cb3638f3b31ab1b2eac4293baf999af8fa0020bbcc532f347a1fcc1b0df9d0a910160405180910390a25b506001600160a01b0316600090815260e760205260409020429055565b612a9c614822565b60ce80546001600160a01b0319166001600160a01b0383169081179091556040517f98a0dc993512fd2ddd1a4ee28a53d1275ec3c174565e996b03d4718909237bf890600090a250565b612aee614822565b612710811115612b405760405162461bcd60e51b815260206004820152601e60248201527f4465706f7369742066656520697320626967676572207468616e206d617800006044820152606401611eb7565b60d481905560405181907f974fd3c1fcb4653dfc4fb740c4c692cd212d55c28f163f310128cb64d830067590600090a250565b306001600160a01b037f0000000000000000000000004e11c45163ce5ab3b504021c858e09a034c1a904161415612bbc5760405162461bcd60e51b8152600401611eb790615826565b7f0000000000000000000000004e11c45163ce5ab3b504021c858e09a034c1a9046001600160a01b0316612c05600080516020615ca4833981519152546001600160a01b031690565b6001600160a01b031614612c2b5760405162461bcd60e51b8152600401611eb790615872565b612c3482614b7e565b612c4082826001614b86565b5050565b612c4c614822565b6001600160a01b038216600081815260e96020908152604091829020849055815192835282018390527fa239eb04fc7cc972e57abbece54319301bb24ffa3e6b29eb3252a449da7348179101612361565b6000306001600160a01b037f0000000000000000000000004e11c45163ce5ab3b504021c858e09a034c1a9041614612d3d5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401611eb7565b50600080516020615ca483398151915290565b612d58614822565b60ce8054821515600160b81b0260ff60b81b199091161790556040517f653d38c0b962b51375cc5ff6894f74d8cd4c459cb1c2652f58ac1e1aa98879d190611ef190831515815260200190565b60cb546001600160a01b03163314612dff5760405162461bcd60e51b815260206004820181905260248201527f4f6e6c7920706f736974696f6e2068616e646c657220686173206163636573736044820152606401611eb7565b6001600160a01b038316600090815260f16020526040902054811115612e3d576001600160a01b038316600090815260f16020526040812055612e6b565b6001600160a01b038316600090815260f1602052604081208054839290612e659084906157e5565b90915550505b6001600160a01b038416600090815260f06020526040902054811115612ea9576001600160a01b038416600090815260f06020526040812055612ed7565b6001600160a01b038416600090815260f0602052604081208054839290612ed19084906157e5565b90915550505b811515600090815260ec6020526040902054811115612f0757811515600090815260ec6020526040812055612f2e565b811515600090815260ec602052604081208054839290612f289084906157e5565b90915550505b6001600160a01b038416600090815260e4602090815260408083208515158452909152902054811115612f86576001600160a01b038416600090815260e4602090815260408083208515158452909152812055612fc1565b6001600160a01b038416600090815260e460209081526040808320851515845290915281208054839290612fbb9084906157e5565b90915550505b604080518315158152602081018390526000918101919091526001600160a01b038516907fec9b2116b85c48acc85d9b2d3c13936f413582c5865801f8d798799ab7424747906060015b60405180910390a250505050565b613021614822565b60ed8190556040518181527ff2053e8a9adc30c78304596fca53e134bcc7bc04422573b5ccefc73fb1785a8190602001611ef1565b60cb546001600160a01b031633146130b05760405162461bcd60e51b815260206004820181905260248201527f4f6e6c7920706f736974696f6e2068616e646c657220686173206163636573736044820152606401611eb7565b6001600160a01b038316600090815260f16020526040812080548392906130d89084906157b7565b90915550506001600160a01b038416600090815260f06020526040812080548392906131059084906157b7565b9091555050811515600090815260ec60205260408120805483929061312b9084906157b7565b90915550506001600160a01b038416600090815260e4602090815260408083208515158452909152812080548392906131659084906157b7565b9091555050604080518315158152602081018390526001918101919091526001600160a01b038516907fec9b2116b85c48acc85d9b2d3c13936f413582c5865801f8d798799ab74247479060600161300b565b6000826131c757506000612020565b6001600160a01b038416600090815260e96020526040902054806131ea575060de545b801561323057610e10620186a0828661320387426157e5565b61320d9190615753565b6132179190615753565b6132219190615812565b61322b9190615812565b613233565b60005b95945050505050565b613244614822565b60db8190556040518181527fa73a083a58d5566ab16c4ee15caec96da6e5656287ee3ff62141a34a89007cdd90602001611ef1565b613281614822565b60d08190556040518181527f66ace67844373113db2f9037189f4ba7ba184f2d8a6e9cf5f986167246b8829590602001611ef1565b611e536003620186a0615a96565b6132cc614822565b6132d66000614d80565b565b6132e0614822565b6127108111156133475760405162461bcd60e51b815260206004820152602c60248201527f46756e64696e6752617465466163746f722073686f756c6420626520736d616c60448201526b0d8cae440e8d0c2dc409a82b60a31b6064820152608401611eb7565b6001600160a01b038216600081815260e8602052604090819020839055517fb964c9b37c6fd487e98f487952667b2734563004641f71694c3b288dbe96ee8790611dd49084815260200190565b61339c614822565b60fa80546001600160a01b0319166001600160a01b0392909216919091179055565b6133c6614822565b60ce8054821515600160c81b0260ff60c81b199091161790556040517f332e216478a944c679557e8d7fa72749ea5df970d585f591cc4d0da9e8ffbc9290611ef190831515815260200190565b60cc546040516352f55eed60e01b81526001600160a01b03838116600483015260009283929116906352f55eed90602401602060405180830381865afa158015613461573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134859190615aa5565b905080613496576000915050613634565b60ca54604051631cb5c89560e31b81526001600160a01b03868116600483015260016024830152600092169063e5ae44a890604401602060405180830381865afa1580156134e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061350c9190615aa5565b60ca54604051631cb5c89560e31b81526001600160a01b0388811660048301526000602483018190529394509091169063e5ae44a890604401602060405180830381865afa158015613562573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135869190615aa5565b9050808210156000816135a25761359d84846157e5565b6135ac565b6135ac83856157e5565b90506000826135bd576000196135c0565b60015b60dc546001600160a01b038b16600090815260e86020526040812054929350918891620186a0916135f19087615753565b6135fb9190615753565b6136059190615753565b61360f9190615812565b905060dd54811115613620575060dd545b61362a81836158be565b9750505050505050505b92915050565b613642614822565b6127108111156136945760405162461bcd60e51b815260206004820181905260248201527f556e7374616b696e672066656520697320626967676572207468616e206d61786044820152606401611eb7565b60d881905560405181907fb5134279d6ac77b3b8d844fea07bbe26a4301c3dd600ad7ed3296d54cdee0f0d90600090a250565b8161371f57801561371a5760405162461bcd60e51b815260206004820152601860248201527f436f6c6c61746572616c206d757374206e6f74207a65726f00000000000000006044820152606401611eb7565b613a2c565b808210156137875760405162461bcd60e51b815260206004820152602f60248201527f506f736974696f6e2073697a652073686f756c6420626520677265617465722060448201526e1d1a185b8818dbdb1b185d195c985b608a1b6064820152608401611eb7565b821515600090815260eb60205260409020546137b9576137b4670de0b6b3a76400006402540be400615753565b6137cc565b821515600090815260eb60205260409020545b831515600090815260ec60205260409020546137e99084906157b7565b11156138375760405162461bcd60e51b815260206004820152601860248201527f4d4158204f4920706572207369646520657863656564656400000000000000006044820152606401611eb7565b6001600160a01b038416600090815260ef60205260409020546138705761386b670de0b6b3a76400006402540be400615753565b61388a565b6001600160a01b038416600090815260ef60205260409020545b6001600160a01b038516600090815260f060205260409020546138ae9084906157b7565b11156138fc5760405162461bcd60e51b815260206004820152601960248201527f4d4158204f4920706572206173736574206578636565646564000000000000006044820152606401611eb7565b600060cf54116139225761391d670de0b6b3a76400006402540be400615753565b613926565b60cf545b6001600160a01b038616600090815260f1602052604090205461394a9084906157b7565b11156139985760405162461bcd60e51b815260206004820152601860248201527f4d6178204f4920706572207573657220657863656564656400000000000000006044820152606401611eb7565b6001600160a01b038416600081815260e3602090815260408083208715158085529083528184205494845260e483528184209084529091529020546139de9084906157b7565b1115613a2c5760405162461bcd60e51b815260206004820152601e60248201527f4d6178204f49207065722061737365742f73697a6520657863656564656400006044820152606401611eb7565b5050505050565b613a3b614822565b60ce8054821515600160c01b0260ff60c01b199091161790556040517f8fac644f106e383c944b6a26fd6a4fdbda220c68a65cd42a06cf3699022bb47b90611ef190831515815260200190565b613a90614822565b811515600081815260eb6020908152604091829020849055815192835282018390527fce12cb532d796514f88ad248b8edb839c370fc26ca605fc11c4d270f244a4efc9101612361565b613ae2614822565b6001600160a01b0381163b613b325760405162461bcd60e51b8152602060048201526016602482015275149959995c9c985b14de5cdd195b481a5b9d985b1a5960521b6044820152606401611eb7565b60cd80546001600160a01b0319166001600160a01b0383169081179091556040517fb7e6dd30172a1404b2860792ff460f894294f39836c7ad6289e84606d40673ea90600090a250565b60f85460ff1615613baf576001600160a01b0381163b15613baf5760405162461bcd60e51b8152600401611eb790615772565b6001600160a01b038116600090815260f9602052604090205460ff16156128b25760405162461bcd60e51b8152602060048201526009602482015268109b1858dadb1a5cdd60ba1b6044820152606401611eb7565b613c0c614822565b6001600160a01b038216600081815260df6020908152604091829020805460ff191685151590811790915591519182527f84dc9f3d55b660a87c439ab6606fbf55fb4279c9f608f4e70eaccab713359e179101611dd4565b613c6c614822565b67016345785d8a0000811115613cc45760405162461bcd60e51b815260206004820152601a60248201527f54726967676572476173466565206578636565646564206d61780000000000006044820152606401611eb7565b60d981905560405181907fc33d0cce64cda1b6e98bb9430fc2e5f2ec44c5670fa9ba7863263f80bef4228890600090a250565b611e53670de0b6b3a76400006402540be400615753565b600054600590610100900460ff16158015613d30575060005460ff8083169116105b613d935760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401611eb7565b6000805461ffff191660ff831617610100179055613dba826001600160a01b03163b151590565b613df55760405162461bcd60e51b815260206004820152600c60248201526b149554d1081a5b9d985b1a5960a21b6044820152606401611eb7565b613dfd614dd2565b60c980546001600160a01b0319166001600160a01b0384161790556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001612361565b613e5e614822565b60ce8054911515600160d01b0260ff60d01b19909216919091179055565b613e84614822565b620186a0811115613ed75760405162461bcd60e51b815260206004820152601d60248201527f496e76616c696420666565526577617264734261736973506f696e74730000006044820152606401611eb7565b60d282905560d581905560405181815282907fe4eb90010a45146e0040231e09a665af7f9a9c72199ced9aefcb269e7ed58bf090602001611dd4565b613f1b614822565b6001600160a01b038316600081815260e3602090815260408083208615158085529083529281902085905580519283529082018490527ffd731b4f1bc923efa351fbfe2e980416f1e133e36f61cb03c757f803024fe75291015b60405180910390a2505050565b60006120208383614a76565b613f96614822565b60ce8054821515600160a01b0260ff60a01b199091161790556040517f8cbbf67ba0ec8d1a6e84876b5099c1bb932a153e9b96bbb93abbb1535d4aca0890611ef190831515815260200190565b613feb614822565b6000811161403b5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206d61785472696767657250726963654c656e6774680000006044820152606401611eb7565b60f38190556040518181527fc7a4cb79639ece02fd53d5ca877ae625d4f81c42557fe746c1b750ffa958eebf90602001611ef1565b614078614822565b60ce8054821515600160a81b0260ff60a81b199091161790556040517f2b63851b7422cf9395e3c039e5e8810d823b855eac4eb54b06e02256da324b4a90611ef190831515815260200190565b6140cd614822565b60ce805460ff60b01b1916600160b01b8315158102919091179182905560405160ff9190920416151581527f23d118a93537db6835486a73a369108ba4a4e642eb19211a77153a833cb347c190602001611ef1565b61412a614822565b60f755565b614137614822565b60f880549115156101000261ff0019909216919091179055565b6000613634826000614a76565b33600090815260f5602052604090205460ff1661418d5760405162461bcd60e51b8152600401611eb790615772565b6001600160a01b038216600081815260f46020908152604091829020849055815192835282018390527f3d7fe7f100ffcfc0ea2eb6f9b55d18de291e748d17da9df23f75832aa13932139101612361565b6141e6614822565b620186a0811061422b5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420736c69707061676560801b6044820152606401611eb7565b60da8190556040518181527fbc2b59e103f3881938141bb7c9d2ec3c038ea4464e2f2e93d377539e61cf9b7090602001611ef1565b614268614822565b6001600160a01b03909216600090815260e46020908152604080832093151583529290522055565b60ce546000906001600160a01b03166142eb5760405162461bcd60e51b815260206004820152601b60248201527f466565206d616e61676572206e6f7420696e697469616c697a656400000000006044820152606401611eb7565b5060ce546001600160a01b031690565b614303614822565b6001600160a01b0381166143685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611eb7565b6128b281614d80565b600a6143816003620186a0615a96565b611e539190615812565b614393614822565b620151808111156143f05760405162461bcd60e51b815260206004820152602160248201527f44656c617944656c746154696d6520697320626967676572207468616e206d616044820152600f60fb1b6064820152608401611eb7565b60d38190556040518181527f5d9dff9d616a4759c276ec59463f7af071a5c3757e6755cf6e9f1f0b7525710590602001611ef1565b61442d614822565b6001600160a01b038216600081815260e26020908152604091829020805460ff191685151590811790915591519182527fefdb9a6fddb509d0a50837b2af22d8a3cb2676a5bdee7ce6c28d729d097ca1599101611dd4565b61448d614822565b6113888111156144f75760405162461bcd60e51b815260206004820152602f60248201527f4d617267696e4665654261736973506f696e74732073686f756c64206265207360448201526e0dac2d8d8cae440e8d0c2dc409a82b608b1b6064820152608401611eb7565b6001600160a01b038316600081815260e6602090815260408083208615158085529083529281902085905580519283529082018490527f5a5a1aa43c254ed4ca0525409249b8e06e1354dc051df695c081088df2d026719101613f75565b600081614564575060006145fc565b836145b3576145776003620186a0615a96565b6001600160a01b038616600090815260ea602052604090205461459a9084615abe565b6145a490856158be565b6145ae9190615943565b6145f9565b6145c16003620186a0615a96565b6001600160a01b038616600090815260ea60205260409020546145e5908490615abe565b6145ef90856158be565b6145f99190615943565b90505b949350505050565b60ca5460009081906001600160a01b03166146615760405162461bcd60e51b815260206004820152601e60248201527f506f736974696f6e4b6565706572206e6f7420696e697469616c697a656400006044820152606401611eb7565b60ca54604051631928b3cb60e01b8152600481018a90526000916001600160a01b031690631928b3cb906024016101a060405180830381865afa1580156146ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146d09190615b08565b80519091506001600160a01b0316158015906146f157506000816101400151115b6147315760405162461bcd60e51b8152602060048201526011602482015270141bdcda5d1a5bdb881b9bdd115e1a5cdd607a1b6044820152606401611eb7565b61473f88888888888661220e565b9250925050965096945050505050565b614757614822565b6001600160a01b038116600090815260ee60209081526040918290205482519081529081018490527fe2f0d2b9bd62fe4d997e442d96308c2084de77174fc94e18e14bf473b030f4dd910160405180910390a1620186a082106148085760405162461bcd60e51b8152602060048201526024808201527f5468726573686f6c642073686f756c6420626520736d616c6c6572207468616e6044820152630409a82b60e31b6064820152608401611eb7565b6001600160a01b0316600090815260ee6020526040902055565b6097546001600160a01b031633146132d65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611eb7565b60606001835111801561489157506003835111155b6148d35760405162461bcd60e51b8152602060048201526013602482015272092dcecc2d8d2c840e0c2e8d040d8cadccee8d606b1b6044820152606401611eb7565b6060835160021480156148e65750826001145b156149585760408051600180825281830190925290602080830190803683370190505090508360018151811061491e5761491e6157cf565b602002602001015181600081518110614939576149396157cf565b6001600160a01b03909216602092830291909101909101529050613634565b6001845161496691906157e5565b83106149aa5760405162461bcd60e51b8152602060048201526013602482015272092dcecc2d8d2c840e6e8c2e4e840d2dcc8caf606b1b6044820152606401611eb7565b8284516149b791906157e5565b67ffffffffffffffff8111156149cf576149cf6151cf565b6040519080825280602002602001820160405280156149f8578160200160208202803683370190505b5090506000835b8551811015614a6c57858181518110614a1a57614a1a6157cf565b6020026020010151838381518110614a3457614a346157cf565b6001600160a01b039092166020928302919091019091015281614a5681615bc2565b9250508080614a6490615bc2565b9150506149ff565b5090949350505050565b6001600160a01b038216600090815260e1602090815260408083205460df90925282205460ff9182169116818015614aab5750805b15614b20576040805162461bcd60e51b81526020600482015260248101919091527f496e76616c696420636f6e6669672c20746f6b656e2073686f756c64206f6e6c60448201527f792062656c6f6e6720746f20737461626c65206f7220636f6c6c61746572616c6064820152608401611eb7565b60008280614b2b5750815b9050848015614b38575080155b156132335760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b21030b8383937bb30b6103a37b5b2b760511b6044820152606401611eb7565b6128b2614822565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615614bbe57614bb983614e01565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015614c18575060408051601f3d908101601f19168201909252614c1591810190615aa5565b60015b614c7b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401611eb7565b600080516020615ca48339815191528114614cea5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401611eb7565b50614bb9838383614e9d565b614d046003620186a0615a96565b8110614d4b5760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206d617846756e64696e675261746560501b6044820152606401611eb7565b60dd8190556040518181527f3511a46416611db647471465fa49e5676f017dc030bfcbeb0dc856a3fb514ce890602001611ef1565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16614df95760405162461bcd60e51b8152600401611eb790615bdd565b6132d6614ec8565b6001600160a01b0381163b614e6e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401611eb7565b600080516020615ca483398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b614ea683614ef8565b600082511180614eb35750805b15614bb957614ec28383614f38565b50505050565b600054610100900460ff16614eef5760405162461bcd60e51b8152600401611eb790615bdd565b6132d633614d80565b614f0181614e01565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606120208383604051806060016040528060278152602001615cc4602791396060600080856001600160a01b031685604051614f759190615c54565b600060405180830381855af49150503d8060008114614fb0576040519150601f19603f3d011682016040523d82523d6000602084013e614fb5565b606091505b5091509150614fc686838387614fd0565b9695505050505050565b6060831561503c578251615035576001600160a01b0385163b6150355760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611eb7565b50816145fc565b6145fc83838151156150515781518083602001fd5b8060405162461bcd60e51b8152600401611eb79190615c70565b6001600160a01b03811681146128b257600080fd5b803561508b8161506b565b919050565b600080604083850312156150a357600080fd5b82356150ae8161506b565b946020939093013593505050565b80151581146128b257600080fd5b803561508b816150bc565b600080604083850312156150e857600080fd5b82356150f38161506b565b91506020830135615103816150bc565b809150509250929050565b60006020828403121561512057600080fd5b5035919050565b60006020828403121561513957600080fd5b81356120208161506b565b60008060006060848603121561515957600080fd5b83356151648161506b565b925060208401356151748161506b565b91506040840135615184816150bc565b809150509250925092565b6000806000606084860312156151a457600080fd5b83356151af8161506b565b925060208401356151bf8161506b565b915060408401356151848161506b565b634e487b7160e01b600052604160045260246000fd5b6040516101a0810167ffffffffffffffff81118282101715615209576152096151cf565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715615238576152386151cf565b604052919050565b60008060008060008086880361024081121561525b57600080fd5b87359650602088013595506040880135615274816150bc565b94506060880135615284816150bc565b93506080880135615294816150bc565b92506101a0609f1982018113156152aa57600080fd5b6152b26151e5565b91506152c060a08a01615080565b82526152ce60c08a01615080565b60208301526152df60e08a016150ca565b6040830152610100808a01356060840152610120808b01356080850152610140808c013560a0860152610160808d013560c0870152610180808e013560e0880152858e0135858801526101c08e0135848801526101e08e0135838801526102008e0135828801526102208e013581880152505050505050809150509295509295509295565b6000602080838503121561537757600080fd5b823567ffffffffffffffff8082111561538f57600080fd5b818501915085601f8301126153a357600080fd5b8135818111156153b5576153b56151cf565b8060051b91506153c684830161520f565b81815291830184019184810190888411156153e057600080fd5b938501935b8385101561540a57843592506153fa8361506b565b82825293850193908501906153e5565b98975050505050505050565b60006020828403121561542857600080fd5b8135612020816150bc565b60008060006060848603121561544857600080fd5b83356154538161506b565b92506020840135615463816150bc565b929592945050506040919091013590565b6000806040838503121561548757600080fd5b82356154928161506b565b915060208301356151038161506b565b600080604083850312156154b557600080fd5b82356154c08161506b565b915060208381013567ffffffffffffffff808211156154de57600080fd5b818601915086601f8301126154f257600080fd5b813581811115615504576155046151cf565b615516601f8201601f1916850161520f565b9150808252878482850101111561552c57600080fd5b80848401858401376000848284010152508093505050509250929050565b6000806000806080858703121561556057600080fd5b843561556b8161506b565b9350602085013561557b8161506b565b9250604085013561558b816150bc565b9396929550929360600135925050565b6000806000606084860312156155b057600080fd5b83356155bb8161506b565b95602085013595506040909401359392505050565b600080600080600060a086880312156155e857600080fd5b85356155f38161506b565b945060208601356156038161506b565b93506040860135615613816150bc565b94979396509394606081013594506080013592915050565b6000806040838503121561563e57600080fd5b82356150ae816150bc565b6000806040838503121561565c57600080fd5b50508035926020909101359150565b6000806000806080858703121561568157600080fd5b843561568c8161506b565b9350602085013561569c816150bc565b93969395505050506040820135916060013590565b60008060008060008060c087890312156156ca57600080fd5b86359550602087013594506040870135935060608701356156ea816150bc565b925060808701356156fa816150bc565b915060a087013561570a816150bc565b809150509295509295509295565b6000806040838503121561572b57600080fd5b8235915060208301356151038161506b565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561576d5761576d61573d565b500290565b60208082526003908201526211909160ea1b604082015260600190565b805161508b816150bc565b6000602082840312156157ac57600080fd5b8151612020816150bc565b600082198211156157ca576157ca61573d565b500190565b634e487b7160e01b600052603260045260246000fd5b6000828210156157f7576157f761573d565b500390565b634e487b7160e01b600052601260045260246000fd5b600082615821576158216157fc565b500490565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60006001600160ff1b03818413828413808216868404861116156158e4576158e461573d565b600160ff1b60008712828116878305891216156159035761590361573d565b6000871292508782058712848416161561591f5761591f61573d565b878505871281841616156159355761593561573d565b505050929093029392505050565b600082615952576159526157fc565b600160ff1b82146000198414161561596c5761596c61573d565b500590565b600080821280156001600160ff1b03849003851316156159935761599361573d565b600160ff1b83900384128116156159ac576159ac61573d565b50500190565b600181815b808511156159ed5781600019048211156159d3576159d361573d565b808516156159e057918102915b93841c93908002906159b7565b509250929050565b600082615a0457506001613634565b81615a1157506000613634565b8160018114615a275760028114615a3157615a4d565b6001915050613634565b60ff841115615a4257615a4261573d565b50506001821b613634565b5060208310610133831016604e8410600b8410161715615a70575081810a613634565b615a7a83836159b2565b8060001904821115615a8e57615a8e61573d565b029392505050565b600061202060ff8416836159f5565b600060208284031215615ab757600080fd5b5051919050565b60008083128015600160ff1b850184121615615adc57615adc61573d565b6001600160ff1b0384018313811615615af757615af761573d565b50500390565b805161508b8161506b565b60006101a08284031215615b1b57600080fd5b615b236151e5565b615b2c83615afd565b8152615b3a60208401615afd565b6020820152615b4b6040840161578f565b6040820152606083810151908201526080808401519082015260a0808401519082015260c0808401519082015260e080840151908201526101008084015190820152610120808401519082015261014080840151908201526101608084015190820152610180928301519281019290925250919050565b6000600019821415615bd657615bd661573d565b5060010190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015615c43578181015183820152602001615c2b565b83811115614ec25750506000910152565b60008251615c66818460208701615c28565b9190910192915050565b6020815260008251806020840152615c8f816040850160208701615c28565b601f01601f1916919091016040019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203df58d686a733753d682b24e421943709a73237c663ee4d40bbca3e8ad3e8a1c64736f6c634300080c0033

Block Transaction Gas Used Reward
view all blocks sequenced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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.