EOPendleLPFeed

Description:

Proxy contract enabling upgradeable smart contract patterns. Delegates calls to an implementation contract.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "src/EOPendleLPFeed.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

import { IPTOracle } from "./interfaces/pendle/IPTOracle.sol";
import { IPendleMarketV3 } from "./interfaces/pendle/IPendleMarketV3.sol";
import { EOBase } from "./EOBase.sol";
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { IDecimals } from "./interfaces/IDecimals.sol";
import { IEOPendleLPFeed } from "./interfaces/IEOPendleLPFeed.sol";
import { DecimalConverter } from "./libraries/DecimalsConverter.sol";

/**
 * @title EOPendleLPFeed
 * @author EO
 * @notice Pendle LP feed oracle that provides price feeds for Pendle LP tokens
 * and provides TWAP-based price calculations for Pendle LP tokens
 */
contract EOPendleLPFeed is IEOPendleLPFeed, EOBase, Initializable {
    using DecimalConverter for uint256;

    /**
     * @notice The minimum duration of the TWAP
     */
    uint32 internal constant _MIN_TWAP_DURATION = 300;

    /**
     * @notice The default decimals used in rate calculations
     * @dev used in calculation decimals of getLPToSYRate and getPTToSYRate
     */
    uint8 internal constant _DEFAULT_DECIMALS = 18;

    /**
     * @notice The decimals precision of the price feed.
     */
    // solhint-disable-next-line const-name-snakecase
    uint8 public constant decimals = 18;

    /**
     * @notice The upper bound percentage for LP rate validation
     * @dev Used to prevent extreme price deviations
     */
    uint256 public constant UPPER_BOUND_PERCENTAGE = 110;

    /**
     * @notice The lower bound percentage for LP rate validation
     * @dev Used to prevent extreme price deviations
     */
    uint256 public constant LOWER_BOUND_PERCENTAGE = 90;

    /**
     * @notice The base scale for percentage calculations
     * @dev Used as a denominator for percentage calculations
     */
    uint256 public constant PERCENTAGE_SCALE = 100;

    /**
     * @notice The address of Pendle PT oracle
     */
    address public ptOracle;

    /**
     * @notice The address of the Pendle PT market
     */
    address public ptMarket;

    /**
     * @notice The duration of the TWAP
     */
    uint32 public twapDuration;

    /**
     * @notice The description of the price feed.
     */
    string public description;

    /**
     * @notice The decimals of the SY token
     */
    uint8 internal _syTokenDecimals;

    /**
     * @notice The decimals of the LP token
     */
    uint8 internal _lpDecimals;

    /**
     * @notice The decimals of the LP to SY rate
     */
    uint8 internal _lpToSYRateDecimals;

    /**
     * @notice The gap for the upgradeable contract.
     */
    uint256[50] private _gap;

    /**
     * @custom:oz-upgrades-unsafe-allow constructor
     */
    constructor() {
        _disableInitializers();
    }

    /**
     * @notice Initializes the contract with the required parameters
     * @param ptOracle_ The address of Pendle PT oracle
     * @param ptMarket_ The address of the Pendle PT market
     * @param description_ The description of the price feed
     * @param twapDuration_ The duration of the TWAP
     */
    function initialize(
        address ptOracle_,
        address ptMarket_,
        string memory description_,
        uint32 twapDuration_
    )
        external
        initializer
    {
        if (ptOracle_ == address(0)) revert PTOracleAddressIsZero();
        if (ptMarket_ == address(0)) revert PTMarketAddressIsZero();
        if (twapDuration_ == 0) revert TwapDurationIsZero();
        if (twapDuration_ < _MIN_TWAP_DURATION) revert TwapDurationIsLessThanMin();
        ptOracle = ptOracle_;
        ptMarket = ptMarket_;
        twapDuration = twapDuration_;
        description = description_;

        (bool increaseCardinalityRequired, uint16 cardinalityRequired, bool oldestObservationSatisfied) =
            IPTOracle(ptOracle).getOracleState(ptMarket, twapDuration);
        if (!oldestObservationSatisfied) revert PendleMarketOldestObservationIsNotSatisfied();
        if (increaseCardinalityRequired) revert PendleMarketCardinalityIsLow(cardinalityRequired);

        (address syToken,,) = IPendleMarketV3(ptMarket).readTokens();

        uint8 syTokenDecimals = IDecimals(syToken).decimals();
        uint8 lpDecimals = IDecimals(ptMarket).decimals();

        _syTokenDecimals = syTokenDecimals;
        _lpDecimals = lpDecimals;
        _lpToSYRateDecimals = _DEFAULT_DECIMALS + syTokenDecimals - lpDecimals;

        if (_getLPToSYRate() == 0) {
            revert PendleMarketLPToSYRateIsZero();
        }
    }

    /**
     * @notice Returns the LP to SY rate
     * @dev This rate is adjusted to 18 decimals, uses getLPToSYRate from pendle oracle
     * @return The rate
     */
    function getLPToSYRate() external view returns (uint256) {
        return _getLPToSYRate();
    }

    /**
     * @notice Returns latest round data
     * @dev Returns zero for roundId, startedAt and answeredInRound.
     * @return roundId The round id, returns 0
     * @return answer The answer, returns the LP to SY TWAP rate
     * @return startedAt The started at, returns 0
     * @return updatedAt The updated at, returns current block timestamp
     * @return answeredInRound The answered in round, returns 0
     */
    function latestRoundData() public view override returns (uint80, int256, uint256, uint256, uint80) {
        uint256 lpToSYRate = _getLPToSYRate();

        return (0, int256(lpToSYRate), 0, block.timestamp, 0);
    }

    /**
     * @notice Internal wrapper for getLPToSYRate
     * @dev This rate is adjusted to 18 decimals, uses getLPToSYRate from pendle oracle
     * @return The rate
     */
    function _getLPToSYRate() internal view virtual returns (uint256) {
        return IPTOracle(ptOracle).getLpToSyRate(ptMarket, twapDuration).to18Decimals(_lpToSYRateDecimals);
    }
}
"
    },
    "src/interfaces/pendle/IPTOracle.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

interface IPTOracle {
    function getLpToSyRate(address market, uint32 duration) external view returns (uint256);

    function getPtToAssetRate(address market, uint32 duration) external view returns (uint256);

    function getPtToSyRate(address market, uint32 duration) external view returns (uint256);

    function getOracleState(
        address market,
        uint32 duration
    )
        external
        view
        returns (bool increaseCardinalityRequired, uint16 cardinalityRequired, bool oldestObservationSatisfied);
}
"
    },
    "src/interfaces/pendle/IPendleMarketV3.sol": {
      "content": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE
pragma solidity 0.8.25;

interface IPendleMarketV3 {
    struct MarketStorage {
        int128 totalPt;
        int128 totalSy;
        uint96 lastLnImpliedRate;
        uint16 observationIndex;
        uint16 observationCardinality;
        uint16 observationCardinalityNext;
    }

    /**
     * @notice Returns the storage of the market
     * @return The storage of the market
     */
    function _storage() external view returns (MarketStorage memory);

    /**
     * @notice Returns the address of the SY token, PT token, and YT token
     * @return syToken The address of the SY token
     * @return ptToken The address of the PT token
     * @return ytToken The address of the YT token
     */
    function readTokens() external view returns (address, address, address);

    /**
     * @notice Returns the total supply of the market
     * @return The total supply of the market
     */
    function totalSupply() external view returns (uint256);
}
"
    },
    "src/EOBase.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

import { AggregatorV2V3Interface } from "./interfaces/AggregatorV2V3Interface.sol";

/**
 * @title EOBase
 * @author EO
 * @notice Base contract for EO contracts
 */
abstract contract EOBase is AggregatorV2V3Interface {
    /**
     * @notice Returns the latest answer
     * @return The latest answer
     */
    function latestAnswer() external view returns (int256) {
        (, int256 answer,,,) = latestRoundData();
        return answer;
    }

    /**
     * @notice Returns the latest update timestamp
     * @return The latest update timestamp
     */
    function latestTimestamp() external view returns (uint256) {
        (,,, uint256 updatedAt,) = latestRoundData();
        return updatedAt;
    }

    /**
     * @notice Returns the latest round ID
     * @return The latest round ID
     */
    function latestRound() external view returns (uint256) {
        (uint80 roundId,,,,) = latestRoundData();
        return uint256(roundId);
    }

    /**
     * @notice Returns the answer of the latest round
     * @param roundId The round ID (ignored)
     * @return The answer of the latest round
     */
    function getAnswer(uint256 roundId) external view returns (int256) {
        (, int256 answer,,,) = getRoundData(uint80(roundId));
        return answer;
    }

    /**
     * @notice Returns the update timestamp of the latest round
     * @param roundId The round ID (ignored)
     * @return The update timestamp of the latest round
     */
    function getTimestamp(uint256 roundId) external view returns (uint256) {
        (,,, uint256 updatedAt,) = getRoundData(uint80(roundId));
        return updatedAt;
    }

    /**
     * @notice Returns the minimum updated at, default to updatedAt in latestRoundData
     * @dev This method is valuable for complex feeds, where other feeds rates are involved into computation
     * and since updatedAt in latestRoundData is the latest updatedAt among the feeds, it may not reflect the data
     * freshness, so this method shows the earliest updatedAt among the feeds, and reflects the data freshness
     * @return The minimum updated at among the feeds used to compute the final rate
     */
    function minUpdatedAt() external view virtual returns (uint256) {
        (,,, uint256 updatedAt,) = latestRoundData();
        return updatedAt;
    }

    /**
     * @notice Returns the latest round data
     * @return roundId The latest round ID, optional
     * @return answer The latest answer
     * @return startedAt The timestamp when the round started, optional
     * @return updatedAt The timestamp of the latest update
     * @return answeredInRound The round ID in which the answer was computed, optional
     */
    function latestRoundData()
        public
        view
        virtual
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

    /**
     * @notice Returns the latest round data
     * @param roundId The round ID, is ignored
     * @return roundId The round ID of   the latest round data
     * @return answer The answer of the latest round data
     * @return startedAt The started at of the latest round data
     * @return updatedAt The updated at of the latest round data
     * @return answeredInRound The round ID in which the answer was computed of the latest round data
     */
    function getRoundData(uint80)
        public
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
    {
        return latestRoundData();
    }
}
"
    },
    "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol": {
      "content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.20;

/**
 * @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 Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 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 in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reinitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._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 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._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() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @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 {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

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

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

    /**
     * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.
     *
     * NOTE: Consider following the ERC-7201 formula to derive storage locations.
     */
    function _initializableStorageSlot() internal pure virtual returns (bytes32) {
        return INITIALIZABLE_STORAGE;
    }

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        bytes32 slot = _initializableStorageSlot();
        assembly {
            $.slot := slot
        }
    }
}
"
    },
    "src/interfaces/IDecimals.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

/**
 * @title IDecimals
 * @author EO
 * @notice Interface for the contract with decimals method.
 */
interface IDecimals {
    /**
     * @notice The function to get the decimals.
     * @return The decimals.
     */
    function decimals() external view returns (uint8);
}
"
    },
    "src/interfaces/IEOPendleLPFeed.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

/**
 * @title IEOPendleLPFeed
 * @author EO
 * @notice Interface for Pendle LP feed oracle
 */
interface IEOPendleLPFeed {
    /**
     * @notice Error thrown when the PT market address is zero.
     */
    error PTMarketAddressIsZero();

    /**
     * @notice Error thrown when the PT oracle address is zero.
     */
    error PTOracleAddressIsZero();

    /**
     * @notice Error thrown when the TWAP duration is zero.
     */
    error TwapDurationIsZero();

    /**
     * @notice Error thrown when the TWAP duration is less than the minimum duration.
     */
    error TwapDurationIsLessThanMin();

    /**
     * @notice Error thrown when the Pendle market oldest observation is not satisfied.
     */
    error PendleMarketOldestObservationIsNotSatisfied();

    /**
     * @notice Error thrown when the Pendle market cardinality is low and needs to be increased.
     * @param cardinalityRequired The required cardinality
     */
    error PendleMarketCardinalityIsLow(uint16 cardinalityRequired);

    /**
     * @notice Error thrown when the Pendle market LP to SY rate returns 0.
     */
    error PendleMarketLPToSYRateIsZero();

    function initialize(
        address ptOracle_,
        address ptMarket_,
        string memory description_,
        uint32 twapDuration_
    )
        external;
}
"
    },
    "src/libraries/DecimalsConverter.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

/**
 * @title DecimalConverter
 * @author EO
 * @notice Library to convert amount from/to exact decimals
 */
library DecimalConverter {
    /**
     * @notice Converts a value from fromDecimals decimals to toDecimals decimals
     * @param amount The value to convert
     * @param fromDecimals Original number of decimals
     * @param toDecimals Target number of decimals
     * @return The converted value
     */
    function convertDecimals(uint256 amount, uint8 fromDecimals, uint8 toDecimals) internal pure returns (uint256) {
        if (fromDecimals == toDecimals) {
            return amount;
        } else if (fromDecimals < toDecimals) {
            return amount * (10 ** (toDecimals - fromDecimals));
        } else {
            return amount / (10 ** (fromDecimals - toDecimals));
        }
    }

    /**
     * @notice Converts to 18 decimals from a given decimal
     * @param amount The value to convert
     * @param fromDecimals Original number of decimals
     * @return The converted value
     */
    function to18Decimals(uint256 amount, uint8 fromDecimals) internal pure returns (uint256) {
        return convertDecimals(amount, fromDecimals, 18);
    }

    /**
     * @notice Returns the multipliers for the conversion
     * @param fromDecimals Original number of decimals
     * @param toDecimals Target number of decimals
     * @return numerator The numerator multiplier
     * @return denominator The denominator multiplier
     */
    function getMultipliers(
        uint8 fromDecimals,
        uint8 toDecimals
    )
        internal
        pure
        returns (uint256 numerator, uint256 denominator)
    {
        if (fromDecimals == toDecimals) {
            return (1, 1);
        } else if (fromDecimals < toDecimals) {
            return (10 ** (toDecimals - fromDecimals), 1);
        } else {
            return (1, 10 ** (fromDecimals - toDecimals));
        }
    }
}
"
    },
    "src/interfaces/AggregatorV2V3Interface.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

import { MinimalAggregatorV3Interface } from "./MinimalAggregatorV3Interface.sol";

/**
 * @title AggregatorV2V3Interface
 * @author EO
 * @notice Interface for the AggregatorV2V3 contract
 */
interface AggregatorV2V3Interface is MinimalAggregatorV3Interface {
    /**
     * @notice Returns the latest answer
     * @return The latest answer
     */
    function latestAnswer() external view returns (int256);

    /**
     * @notice Returns the latest update timestamp
     * @return The latest update timestamp
     */
    function latestTimestamp() external view returns (uint256);

    /**
     * @notice Returns the latest round ID
     * @return The latest round ID
     */
    function latestRound() external view returns (uint256);

    /**
     * @notice Returns the answer of the latest round
     * @param roundId The round ID (ignored)
     * @return The answer of the latest round
     */
    function getAnswer(uint256 roundId) external view returns (int256);

    /**
     * @notice Returns the update timestamp of the latest round
     * @param roundId The round ID (ignored)
     * @return The update timestamp of the latest round
     */
    function getTimestamp(uint256 roundId) external view returns (uint256);

    /**
     * @notice Returns the latest round data
     * @return roundId The latest round ID, optional
     * @return answer The latest answer
     * @return startedAt The timestamp when the round started, optional
     * @return updatedAt The timestamp of the latest update
     * @return answeredInRound The round ID in which the answer was computed, optional
     */
    function latestRoundData()
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

    /**
     * @notice Returns the latest round data
     * @param roundId The round ID, is ignored
     * @return roundId The round ID of   the latest round data
     * @return answer The answer of the latest round data
     * @return startedAt The started at of the latest round data
     * @return updatedAt The updated at of the latest round data
     * @return answeredInRound The round ID in which the answer was computed of the latest round data
     */
    function getRoundData(uint80)
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}
"
    },
    "src/interfaces/MinimalAggregatorV3Interface.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

/**
 * @title MinimalAggregatorV3Interface
 * @author EO
 * @notice Interface for price feed oracle
 */
interface MinimalAggregatorV3Interface {
    /**
     * @notice Returns feed decimals
     * @return The decimals of the feed.
     */
    function decimals() external view returns (uint8);

    /**
     * @notice Returns the latest round data
     * @return roundId The latest round ID, optional
     * @return answer The latest answer
     * @return startedAt The timestamp when the round started, optional
     * @return updatedAt The timestamp of the latest update
     * @return answeredInRound The round ID in which the answer was computed, optional
     */
    function latestRoundData()
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}
"
    }
  },
  "settings": {
    "remappings": [
      "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
      "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
      "@openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",
      "@maverick/v2-common/=lib/maverickprotocol-v2-common/",
      "forge-std/=lib/forge-std/src/",
      "@eoracle/=lib/target-contracts/src/",
      "@spectra-core/=lib/spectra-core/",
      "lib/spectra-core/:openzeppelin-contracts-upgradeable/=lib/spectra-core/lib/openzeppelin-contracts-upgradeable/contracts/",
      "lib/spectra-core/:openzeppelin-contracts/=lib/spectra-core/lib/openzeppelin-contracts/contracts/",
      "ds-test/=lib/spectra-core/lib/forge-std/lib/ds-test/src/",
      "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
      "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
      "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
      "openzeppelin-contracts/=lib/openzeppelin-contracts/",
      "openzeppelin-erc20-basic/=lib/spectra-core/lib/openzeppelin-contracts/contracts/token/ERC20/",
      "openzeppelin-erc20-extensions/=lib/spectra-core/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/",
      "openzeppelin-erc20/=lib/spectra-core/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/",
      "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",
      "openzeppelin-math/=lib/spectra-core/lib/openzeppelin-contracts/contracts/utils/math/",
      "openzeppelin-proxy/=lib/spectra-core/lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/",
      "openzeppelin-utils/=lib/spectra-core/lib/openzeppelin-contracts/contracts/utils/",
      "spectra-core/=lib/spectra-core/"
    ],
    "optimizer": {
      "enabled": true,
      "runs": 100
    },
    "metadata": {
      "useLiteralContent": false,
      "bytecodeHash": "none",
      "appendCBOR": true
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "evmVersion": "cancun",
    "viaIR": true
  }
}}

Tags:
Proxy, Upgradeable, Factory, Oracle|addr:0x7a075dc6694a13969b0fb7537234dfd23303b044|verified:true|block:23675958|tx:0xe8e73c5d1da26c6107e7f6ebf2c95196d02a2819b5b678701f4e5f1662e5c134|first_check:1761658569

Submitted on: 2025-10-28 14:36:11

Comments

Log in to comment.

No comments yet.