{"file_path":"contracts/rwaf/ChainlinkOracleAdapter.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.19;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {AggregatorV3Interface} from \"@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol\";\n\n/**\n * @title IChainlinkOracleAdapter\n * @notice Interface for Chainlink oracle adapter\n */\ninterface IRWACoordinator {\n    function getPrice() external view returns (bool isValid, uint256 price, uint256 minUnsafePrice, uint256 maxUnsafePrice);\n    function getSharePrice() external view returns (bool isValid, uint256 sharePrice);\n}\n\n/**\n * @title ChainlinkOracleAdapter\n * @author RAAC Protocol Team\n * @notice Adapter contract that wraps Chainlink price to match Insruxi RWA Coordinator Interface for the rwF(x) \n * @dev Validates price freshness and provides safety bounds for price usage\n * @dev This contract will be replaced later by the RWACoordintator contract by Instruxi that implements the IRWACoodinator interface.\n */\ncontract ChainlinkOracleAdapter is IRWACoordinator, Ownable {\n    /// @notice The Chainlink aggregator price feed\n    AggregatorV3Interface public priceFeed;\n\n    /// @notice Maximum staleness time for the price (in seconds)\n    /// @dev If the price is older than this, it's considered invalid\n    uint256 public maxStaleTime;\n\n    /// @notice Emergency price to use when Chainlink returns invalid answer (8 decimals)\n    /// @dev If 0, will revert when answer is invalid\n    uint256 public emergencyPrice;\n\n    /// @notice Price tolerance to use when Chainlink returns invalid answer (in BPS)\n    uint256 public priceTolerance;\n\n    /// @notice Decimals of the price (normalized to 8)\n    uint8 public constant DECIMALS = 8;\n\n    /// @notice BPS precision\n    uint256 public constant BPS_PRECISION = 100_00;\n\n    /// @notice Emitted when the price feed is updated\n    event PriceFeedUpdated(address indexed newPriceFeed);\n\n    /// @notice Emitted when the max stale time is updated\n    event MaxStaleTimeUpdated(uint256 newMaxStaleTime);\n\n    /// @notice Emitted when the emergency price is updated\n    event EmergencyPriceUpdated(uint256 newEmergencyPrice);\n\n    /// @notice Emitted when the price tolerance is updated\n    event PriceToleranceUpdated(uint256 newPriceTolerance);\n\n    /// @notice Emitted when an invalid address is provided\n    error InvalidAddress();\n\n    /// @notice Emitted when emergency price is not set and answer is invalid\n    error EmergencyPriceNotSet();\n\n    /// @notice Emitted when a zero value is provided\n    error ZeroValue();\n\n    /// @notice Emitted when a price tolerance is greater than BPS precision\n    error InvalidPriceTolerance();\n\n    /**\n     * @notice Constructor\n     * @param _priceFeed The address of the Chainlink aggregator price feed\n     * @param _maxStaleTime Maximum staleness time in seconds\n     * @param _emergencyPrice Emergency price to use when Chainlink returns invalid answer (8 decimals)\n     * @param _initialOwner The initial owner of the contract\n     */\n    constructor(address _priceFeed, uint256 _maxStaleTime, uint256 _emergencyPrice, uint256 _priceTolerance, address _initialOwner) Ownable(_initialOwner) {\n        if (_priceFeed == address(0)) revert InvalidAddress();\n        if (_maxStaleTime == 0 || _priceTolerance == 0 || _emergencyPrice == 0) revert ZeroValue();\n        priceFeed = AggregatorV3Interface(_priceFeed);\n        maxStaleTime = _maxStaleTime;\n        emergencyPrice = _emergencyPrice;\n        priceTolerance = _priceTolerance;\n    }\n\n    /**\n     * @notice Returns the price with validity and safety bounds\n     * @return isValid Whether the price is valid based on factors like staleness, emergency price, and price tolerance\n     * @return price The current price from Chainlink (8 decimals)\n     * @return minUnsafePrice The minimum unsafe price threshold (8 decimals)\n     * @return maxUnsafePrice The maximum unsafe price threshold (8 decimals)\n     */\n    function getPrice() external view override returns (bool isValid, uint256 price, uint256 minUnsafePrice, uint256 maxUnsafePrice) {\n        uint256 safePrice;\n\n        try priceFeed.latestRoundData() returns (uint80, int256 answer, uint256, uint256 updatedAt, uint80) {\n            if (answer <= 0) {\n                if (emergencyPrice == 0) revert EmergencyPriceNotSet();\n                safePrice = emergencyPrice;\n                isValid = false;\n            } else {\n                uint8 feedDecimals = priceFeed.decimals();\n                uint256 chainlinkPrice = _normalizeTo8Decimals(uint256(answer), feedDecimals);\n\n                uint256 age = block.timestamp > updatedAt ? block.timestamp - updatedAt : 0;\n                if (age > maxStaleTime) {\n                    if (emergencyPrice == 0) revert EmergencyPriceNotSet();\n                    safePrice = emergencyPrice;\n                    isValid = false;\n                } else {\n                    safePrice = chainlinkPrice;\n                    isValid = true;\n                }\n            }\n        } catch {\n            if (emergencyPrice == 0) revert EmergencyPriceNotSet();\n            safePrice = emergencyPrice;\n            isValid = false;\n        }\n\n        price = safePrice;\n\n        uint256 priceToleranceValue = safePrice * priceTolerance / BPS_PRECISION;\n        minUnsafePrice = safePrice > priceToleranceValue ? safePrice - priceToleranceValue : 0;\n        maxUnsafePrice = safePrice + priceToleranceValue;\n    }\n\n    /**\n     * @notice Returns the share price with validity check\n     * @return isValid Whether the price is valid based on staleness\n     * @return sharePrice The share price (8 decimals)\n     */\n    function getSharePrice() external view override returns (bool isValid, uint256 sharePrice) {\n        (isValid, sharePrice,,) = this.getPrice();\n    }\n\n    /**\n     * @notice Normalizes the price to 8 decimals\n     * @param price The price to normalize\n     * @param _decimals The decimals of the price\n     * @return The price normalized to 8 decimals\n     */\n    function _normalizeTo8Decimals(uint256 price, uint8 _decimals) internal pure returns (uint256) {\n        if (_decimals == DECIMALS) return price;\n        if (_decimals > DECIMALS) return price / (10 ** (_decimals - DECIMALS));\n        return price * (10 ** (DECIMALS - _decimals));\n    }\n\n    /**\n     * @notice Sets the price feed address\n     * @param _priceFeed The address of the Chainlink aggregator price feed\n     */\n    function setPriceFeed(address _priceFeed) external onlyOwner {\n        if (_priceFeed == address(0) || address(priceFeed) == _priceFeed) revert InvalidAddress();\n        priceFeed = AggregatorV3Interface(_priceFeed);\n        emit PriceFeedUpdated(_priceFeed);\n    }\n\n    /**\n     * @notice Sets the maximum staleness time\n     * @param _maxStaleTime Maximum staleness time in seconds\n     */\n    function setMaxStaleTime(uint256 _maxStaleTime) external onlyOwner {\n        if (_maxStaleTime == 0) revert ZeroValue();\n        maxStaleTime = _maxStaleTime;\n        emit MaxStaleTimeUpdated(_maxStaleTime);\n    }\n\n    /**\n     * @notice Sets the price tolerance\n     * @param _priceTolerance Price tolerance in BPS\n     */\n    function setPriceTolerance(uint256 _priceTolerance) external onlyOwner {\n        if (_priceTolerance == 0) revert ZeroValue();\n        if (_priceTolerance > BPS_PRECISION) revert InvalidPriceTolerance();\n        priceTolerance = _priceTolerance;\n        emit PriceToleranceUpdated(_priceTolerance);\n    }\n\n    /**\n     * @notice Sets the emergency price\n     * @param _emergencyPrice Emergency price to use when Chainlink returns invalid answer (8 decimals)\n     */\n    function setEmergencyPrice(uint256 _emergencyPrice) external onlyOwner {\n        if (_emergencyPrice == 0) revert ZeroValue();\n        emergencyPrice = _emergencyPrice;\n        emit EmergencyPriceUpdated(_emergencyPrice);\n    }\n}\n\n","deployed_bytecode":"0x6080604052600436101561001257600080fd5b60003560e01c80630aa45dc0146106555780630f276686146106375780632e0f26251461061b57806359011cd1146105fd5780635a5e6a8a146105aa5780635b1dac601461050f578063715018a6146104c8578063724e78da1461042f578063741bef1a146104065780637f4e8ee8146103e85780638da5cb5b146103bf57806398d5fdca146101c2578063e41de313146101a5578063f2fde38b1461012a5763f3038e74146100c157600080fd5b34610125576020366003190112610125576004356100dd61072f565b8015610114576020817fe1ed595154939e5d696ac1660c2a7ca1a1ecdcbf908a44cb941bf024b0b6a82d92600355604051908152a1005b637c946ed760e01b60005260046000fd5b600080fd5b34610125576020366003190112610125576004356001600160a01b038116908190036101255761015861072f565b801561018f57600080546001600160a01b03198116831782556001600160a01b0316906000805160206107d98339815191529080a3005b631e4fbdf760e01b600052600060045260246000fd5b346101255760003660031901126101255760206040516127108152f35b3461012557600036600319011261012557600154604051633fabe5a360e21b81526001600160a01b039091169060009060a081600481865afa928383928495610369575b50610294575050505060035480156102835760005b61271061022a6004548461071c565b048083111561027b5761023d818461070f565b905b830190818411610265576080936040519315158452602084015260408301526060820152f35b634e487b7160e01b600052601160045260246000fd5b60009061023f565b638c29ee9960e01b60005260046000fd5b8282136102af5750505050600354801561028357600061021b565b60206004916040519283809263313ce56760e01b82525afa90811561035e57839161031c575b506102df91610769565b91804211600014610316576102f591504261070f565b600254101561030f5750600354801561028357600061021b565b600161021b565b506102f5565b90506020813d602011610356575b81610337602093836106c2565b81010312610352575160ff81168103610352576102df6102d5565b8280fd5b3d915061032a565b6040513d85823e3d90fd5b9250935060a0823d60a0116103b7575b8161038660a093836106c2565b8101031261035257610397826106fb565b5060208201516103ae6080606085015194016106fb565b50919385610206565b3d9150610379565b34610125576000366003190112610125576000546040516001600160a01b039091168152602090f35b34610125576000366003190112610125576020600354604051908152f35b34610125576000366003190112610125576001546040516001600160a01b039091168152602090f35b34610125576020366003190112610125576004356001600160a01b038116908190036101255761045d61072f565b801580156104b4575b6104a357600180546001600160a01b031916821790557fe5b20b8497e4f3e2435ef9c20e2e26b47497ee13745ce1c681ad6640653119e6600080a2005b63e6c4247b60e01b60005260046000fd5b506001546001600160a01b03168114610466565b34610125576000366003190112610125576104e161072f565b600080546001600160a01b0319811682556001600160a01b03166000805160206107d98339815191528280a3005b3461012557600036600319011261012557604051634c6afee560e11b8152608081600481305afa801561059e576000908190610558575b60408093505191151582526020820152f35b506080823d608011610596575b81610572608093836106c2565b81010312610593578151908115158203610593575060206040920151610546565b80fd5b3d9150610565565b6040513d6000823e3d90fd5b34610125576020366003190112610125576004356105c661072f565b8015610114576020817fe5e297ba104a01d62b20964f2c23b95f7ac295d28f66340d33b824c10fe6d57e92600255604051908152a1005b34610125576000366003190112610125576020600454604051908152f35b3461012557600036600319011261012557602060405160088152f35b34610125576000366003190112610125576020600254604051908152f35b346101255760203660031901126101255760043561067161072f565b80156101145761271081116106b1576020817f0a123773ce61173ff2f5e20d422b4b6a2d4f03569100d46dd8af4d242eee405692600455604051908152a1005b63508f393f60e01b60005260046000fd5b601f909101601f19168101906001600160401b038211908210176106e557604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160501b038216820361012557565b9190820391821161026557565b8181029291811591840414171561026557565b6000546001600160a01b0316330361074357565b63118cdaa760e01b6000523360045260246000fd5b60ff16604d811161026557600a0a90565b9060ff16600881146107d4576008811161079e576008039060ff82116102655761079561079b92610758565b9061071c565b90565b6007190160ff8111610265576107b390610758565b9081156107be570490565b634e487b7160e01b600052601260045260246000fd5b509056fe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220a8d6d208b92f54e02da4cd3ceb75de0eb90bec1c1efd71b4343ec3c5d08d18a264736f6c634300081e0033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"paris","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":1},"outputSelection":{"*":{"":["*"],"*":["*"]}},"viaIR":true},"optimization_runs":1,"sourcify_repo_url":null,"decoded_constructor_args":[["0x214eD9Da11D2fbe465a6fc601a91E62EbEc1a0D6",{"internalType":"address","name":"_priceFeed","type":"address"}],["87000",{"internalType":"uint256","name":"_maxStaleTime","type":"uint256"}],["400000000000",{"internalType":"uint256","name":"_emergencyPrice","type":"uint256"}],["1000",{"internalType":"uint256","name":"_priceTolerance","type":"uint256"}],["0x13c92482626E805e58c4814F69421Aacb3226ED8",{"internalType":"address","name":"_initialOwner","type":"address"}]],"compiler_version":"v0.8.30+commit.73712a01","is_verified_via_verifier_alliance":false,"verified_at":"2025-12-11T02:20:48.401753Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x60803461015457601f6109b238819003918201601f19168301916001600160401b038311848410176101595780849260a094604052833981010312610154576100478161016f565b60208201516040830151606084015192939091906001600160a01b03906100709060800161016f565b1693841561013e57600080546001600160a01b031981168717825560405196916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a01b0316801561012d5781158015610125575b801561011d575b61010c57600180546001600160a01b03191691909117905560025560035560045561082e90816101848239f35b637c946ed760e01b60005260046000fd5b5082156100df565b5083156100d8565b63e6c4247b60e01b60005260046000fd5b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101545756fe6080604052600436101561001257600080fd5b60003560e01c80630aa45dc0146106555780630f276686146106375780632e0f26251461061b57806359011cd1146105fd5780635a5e6a8a146105aa5780635b1dac601461050f578063715018a6146104c8578063724e78da1461042f578063741bef1a146104065780637f4e8ee8146103e85780638da5cb5b146103bf57806398d5fdca146101c2578063e41de313146101a5578063f2fde38b1461012a5763f3038e74146100c157600080fd5b34610125576020366003190112610125576004356100dd61072f565b8015610114576020817fe1ed595154939e5d696ac1660c2a7ca1a1ecdcbf908a44cb941bf024b0b6a82d92600355604051908152a1005b637c946ed760e01b60005260046000fd5b600080fd5b34610125576020366003190112610125576004356001600160a01b038116908190036101255761015861072f565b801561018f57600080546001600160a01b03198116831782556001600160a01b0316906000805160206107d98339815191529080a3005b631e4fbdf760e01b600052600060045260246000fd5b346101255760003660031901126101255760206040516127108152f35b3461012557600036600319011261012557600154604051633fabe5a360e21b81526001600160a01b039091169060009060a081600481865afa928383928495610369575b50610294575050505060035480156102835760005b61271061022a6004548461071c565b048083111561027b5761023d818461070f565b905b830190818411610265576080936040519315158452602084015260408301526060820152f35b634e487b7160e01b600052601160045260246000fd5b60009061023f565b638c29ee9960e01b60005260046000fd5b8282136102af5750505050600354801561028357600061021b565b60206004916040519283809263313ce56760e01b82525afa90811561035e57839161031c575b506102df91610769565b91804211600014610316576102f591504261070f565b600254101561030f5750600354801561028357600061021b565b600161021b565b506102f5565b90506020813d602011610356575b81610337602093836106c2565b81010312610352575160ff81168103610352576102df6102d5565b8280fd5b3d915061032a565b6040513d85823e3d90fd5b9250935060a0823d60a0116103b7575b8161038660a093836106c2565b8101031261035257610397826106fb565b5060208201516103ae6080606085015194016106fb565b50919385610206565b3d9150610379565b34610125576000366003190112610125576000546040516001600160a01b039091168152602090f35b34610125576000366003190112610125576020600354604051908152f35b34610125576000366003190112610125576001546040516001600160a01b039091168152602090f35b34610125576020366003190112610125576004356001600160a01b038116908190036101255761045d61072f565b801580156104b4575b6104a357600180546001600160a01b031916821790557fe5b20b8497e4f3e2435ef9c20e2e26b47497ee13745ce1c681ad6640653119e6600080a2005b63e6c4247b60e01b60005260046000fd5b506001546001600160a01b03168114610466565b34610125576000366003190112610125576104e161072f565b600080546001600160a01b0319811682556001600160a01b03166000805160206107d98339815191528280a3005b3461012557600036600319011261012557604051634c6afee560e11b8152608081600481305afa801561059e576000908190610558575b60408093505191151582526020820152f35b506080823d608011610596575b81610572608093836106c2565b81010312610593578151908115158203610593575060206040920151610546565b80fd5b3d9150610565565b6040513d6000823e3d90fd5b34610125576020366003190112610125576004356105c661072f565b8015610114576020817fe5e297ba104a01d62b20964f2c23b95f7ac295d28f66340d33b824c10fe6d57e92600255604051908152a1005b34610125576000366003190112610125576020600454604051908152f35b3461012557600036600319011261012557602060405160088152f35b34610125576000366003190112610125576020600254604051908152f35b346101255760203660031901126101255760043561067161072f565b80156101145761271081116106b1576020817f0a123773ce61173ff2f5e20d422b4b6a2d4f03569100d46dd8af4d242eee405692600455604051908152a1005b63508f393f60e01b60005260046000fd5b601f909101601f19168101906001600160401b038211908210176106e557604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160501b038216820361012557565b9190820391821161026557565b8181029291811591840414171561026557565b6000546001600160a01b0316330361074357565b63118cdaa760e01b6000523360045260246000fd5b60ff16604d811161026557600a0a90565b9060ff16600881146107d4576008811161079e576008039060ff82116102655761079561079b92610758565b9061071c565b90565b6007190160ff8111610265576107b390610758565b9081156107be570490565b634e487b7160e01b600052601260045260246000fd5b509056fe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220a8d6d208b92f54e02da4cd3ceb75de0eb90bec1c1efd71b4343ec3c5d08d18a264736f6c634300081e0033000000000000000000000000214ed9da11d2fbe465a6fc601a91e62ebec1a0d600000000000000000000000000000000000000000000000000000000000153d80000000000000000000000000000000000000000000000000000005d21dba00000000000000000000000000000000000000000000000000000000000000003e800000000000000000000000013c92482626e805e58c4814f69421aacb3226ed8","name":"ChainlinkOracleAdapter","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":false,"language":"solidity","evm_version":"paris","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// solhint-disable-next-line interface-starts-with-i\ninterface AggregatorV3Interface {\n  function decimals() external view returns (uint8);\n\n  function description() external view returns (string memory);\n\n  function version() external view returns (uint256);\n\n  function getRoundData(\n    uint80 _roundId\n  ) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\n\n  function latestRoundData()\n    external\n    view\n    returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\n}\n"},{"file_path":"@openzeppelin/contracts/access/Ownable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    constructor(address initialOwner) {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},{"file_path":"@openzeppelin/contracts/utils/Context.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"address","name":"_priceFeed","type":"address"},{"internalType":"uint256","name":"_maxStaleTime","type":"uint256"},{"internalType":"uint256","name":"_emergencyPrice","type":"uint256"},{"internalType":"uint256","name":"_priceTolerance","type":"uint256"},{"internalType":"address","name":"_initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EmergencyPriceNotSet","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidPriceTolerance","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ZeroValue","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newEmergencyPrice","type":"uint256"}],"name":"EmergencyPriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMaxStaleTime","type":"uint256"}],"name":"MaxStaleTimeUpdated","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":true,"internalType":"address","name":"newPriceFeed","type":"address"}],"name":"PriceFeedUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPriceTolerance","type":"uint256"}],"name":"PriceToleranceUpdated","type":"event"},{"inputs":[],"name":"BPS_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice","outputs":[{"internalType":"bool","name":"isValid","type":"bool"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"minUnsafePrice","type":"uint256"},{"internalType":"uint256","name":"maxUnsafePrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSharePrice","outputs":[{"internalType":"bool","name":"isValid","type":"bool"},{"internalType":"uint256","name":"sharePrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxStaleTime","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":"priceFeed","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceTolerance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_emergencyPrice","type":"uint256"}],"name":"setEmergencyPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxStaleTime","type":"uint256"}],"name":"setMaxStaleTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_priceFeed","type":"address"}],"name":"setPriceFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceTolerance","type":"uint256"}],"name":"setPriceTolerance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":"0x000000000000000000000000214ed9da11d2fbe465a6fc601a91e62ebec1a0d600000000000000000000000000000000000000000000000000000000000153d80000000000000000000000000000000000000000000000000000005d21dba00000000000000000000000000000000000000000000000000000000000000003e800000000000000000000000013c92482626e805e58c4814f69421aacb3226ed8"}