{"constructor_args":null,"is_partially_verified":false,"is_changed_bytecode":false,"abi":[{"inputs":[{"internalType":"uint256","name":"blockTimestamp","type":"uint256"}],"name":"BlockTimestampTooLarge","type":"error"},{"inputs":[],"name":"CalldataMustHaveValidPayload","type":"error"},{"inputs":[],"name":"CalldataOverOrUnderFlow","type":"error"},{"inputs":[],"name":"CanNotPickMedianOfEmptyArray","type":"error"},{"inputs":[],"name":"DataPackageTimestampMustNotBeZero","type":"error"},{"inputs":[],"name":"DataPackageTimestampsMustBeEqual","type":"error"},{"inputs":[],"name":"DataTimestampCannotBeZero","type":"error"},{"inputs":[{"internalType":"uint256","name":"dataTimestamp","type":"uint256"}],"name":"DataTimestampTooLarge","type":"error"},{"inputs":[],"name":"EachSignerMustProvideTheSameValue","type":"error"},{"inputs":[],"name":"EmptyCalldataPointersArr","type":"error"},{"inputs":[],"name":"GetDataServiceIdNotImplemented","type":"error"},{"inputs":[],"name":"IncorrectUnsignedMetadataSize","type":"error"},{"inputs":[{"internalType":"uint256","name":"receivedSignersCount","type":"uint256"},{"internalType":"uint256","name":"requiredSignersCount","type":"uint256"}],"name":"InsufficientNumberOfUniqueSigners","type":"error"},{"inputs":[],"name":"InvalidCalldataPointer","type":"error"},{"inputs":[{"internalType":"bytes32","name":"dataFeedId","type":"bytes32"},{"internalType":"uint256","name":"lastDataTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastBlockTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastValue","type":"uint256"}],"name":"InvalidLastUpdateDetails","type":"error"},{"inputs":[{"internalType":"bytes32","name":"signedHash","type":"bytes32"}],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"RedstonePayloadMustHaveAtLeastOneDataPackage","type":"error"},{"inputs":[{"internalType":"address","name":"receivedSigner","type":"address"}],"name":"SignerNotAuthorised","type":"error"},{"inputs":[{"internalType":"uint256","name":"receivedTimestampSeconds","type":"uint256"},{"internalType":"uint256","name":"blockTimestamp","type":"uint256"}],"name":"TimestampFromTooLongFuture","type":"error"},{"inputs":[{"internalType":"uint256","name":"receivedTimestampSeconds","type":"uint256"},{"internalType":"uint256","name":"blockTimestamp","type":"uint256"}],"name":"TimestampIsTooOld","type":"error"},{"inputs":[],"name":"TimestampsMustBeEqual","type":"error"},{"inputs":[{"internalType":"uint256","name":"valueByteSize","type":"uint256"}],"name":"TooLargeValueByteSize","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"dataFeedId","type":"bytes32"}],"name":"UpdateSkipDueToBlockTimestamp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"dataFeedId","type":"bytes32"}],"name":"UpdateSkipDueToDataTimestamp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"dataFeedId","type":"bytes32"}],"name":"UpdateSkipDueToInvalidValue","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"dataFeedId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"ValueUpdate","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"aggregateValues","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"valueFromRedstonePayload","type":"uint256"}],"name":"convertDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extractTimestampsAndAssertAllAreEqual","outputs":[{"internalType":"uint256","name":"extractedTimestamp","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"signerAddress","type":"address"}],"name":"getAuthorisedSignerIndex","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dataFeedId","type":"bytes32"}],"name":"getBlockTimestampFromLatestUpdate","outputs":[{"internalType":"uint256","name":"blockTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getDataFeedIdForAsset","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDataServiceId","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dataFeedId","type":"bytes32"}],"name":"getDataTimestampFromLatestUpdate","outputs":[{"internalType":"uint256","name":"lastDataTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dataFeedId","type":"bytes32"}],"name":"getLastUpdateDetails","outputs":[{"internalType":"uint256","name":"lastDataTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastBlockTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastValue","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dataFeedId","type":"bytes32"}],"name":"getLastUpdateDetailsUnsafe","outputs":[{"internalType":"uint256","name":"lastDataTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastBlockTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastValue","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"dataFeedIds","type":"bytes32[]"}],"name":"getLastUpdateDetailsUnsafeForMany","outputs":[{"components":[{"internalType":"uint256","name":"dataTimestamp","type":"uint256"},{"internalType":"uint256","name":"blockTimestamp","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct MultiFeedAdapterWithoutRounds.LastUpdateDetails[]","name":"detailsForFeeds","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"gToken","type":"address"}],"name":"getUnderlyingAsset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"gToken","type":"address"}],"name":"getUnderlyingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"gTokens","type":"address[]"}],"name":"getUnderlyingPrices","outputs":[{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUniqueSignersThreshold","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dataFeedId","type":"bytes32"}],"name":"getValueForDataFeed","outputs":[{"internalType":"uint256","name":"dataFeedValue","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"requestedDataFeedIds","type":"bytes32[]"}],"name":"getValuesForDataFeeds","outputs":[{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"priceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceOfETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"}],"name":"pricesOf","outputs":[{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"dataFeedsIds","type":"bytes32[]"}],"name":"updateDataFeedsValuesPartial","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"receivedTimestampMilliseconds","type":"uint256"}],"name":"validateTimestamp","outputs":[],"stateMutability":"view","type":"function"}],"conflicting_implementations":null,"certified":false,"additional_sources":[{"file_path":"contracts/__C7/@redstone-finance/evm-connector/contracts/core/CalldataExtractor.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.17;\n\nimport \"./RedstoneConstants.sol\";\n\n/**\n * @title The base contract with the main logic of data extraction from calldata\n * @author The Redstone Oracles team\n * @dev This contract was created to reuse the same logic in the RedstoneConsumerBase\n * and the ProxyConnector contracts\n */\ncontract CalldataExtractor is RedstoneConstants {\n\n  error DataPackageTimestampMustNotBeZero();\n  error DataPackageTimestampsMustBeEqual();\n  error RedstonePayloadMustHaveAtLeastOneDataPackage();\n  error TooLargeValueByteSize(uint256 valueByteSize);\n\n  function extractTimestampsAndAssertAllAreEqual() public pure returns (uint256 extractedTimestamp) {\n    uint256 calldataNegativeOffset = _extractByteSizeOfUnsignedMetadata();\n    uint256 dataPackagesCount;\n    (dataPackagesCount, calldataNegativeOffset) = _extractDataPackagesCountFromCalldata(calldataNegativeOffset);\n\n    if (dataPackagesCount == 0) {\n      revert RedstonePayloadMustHaveAtLeastOneDataPackage();\n    }\n\n    for (uint256 dataPackageIndex = 0; dataPackageIndex < dataPackagesCount; dataPackageIndex++) {\n      uint256 dataPackageByteSize = _getDataPackageByteSize(calldataNegativeOffset);\n\n      // Extracting timestamp for the current data package\n      uint48 dataPackageTimestamp; // uint48, because timestamp uses 6 bytes\n      uint256 timestampNegativeOffset = (calldataNegativeOffset + TIMESTAMP_NEGATIVE_OFFSET_IN_DATA_PACKAGE_WITH_STANDARD_SLOT_BS);\n      uint256 timestampOffset = msg.data.length - timestampNegativeOffset;\n      assembly {\n        dataPackageTimestamp := calldataload(timestampOffset)\n      }\n\n      if (dataPackageTimestamp == 0) {\n        revert DataPackageTimestampMustNotBeZero();\n      }\n\n      if (extractedTimestamp == 0) {\n        extractedTimestamp = dataPackageTimestamp;\n      } else if (dataPackageTimestamp != extractedTimestamp) {\n        revert DataPackageTimestampsMustBeEqual();\n      }\n\n      calldataNegativeOffset += dataPackageByteSize;\n    }\n  }\n\n  function _getDataPackageByteSize(uint256 calldataNegativeOffset) internal pure returns (uint256) {\n    (\n      uint256 dataPointsCount,\n      uint256 eachDataPointValueByteSize\n    ) = _extractDataPointsDetailsForDataPackage(calldataNegativeOffset);\n\n    return\n      dataPointsCount *\n      (DATA_POINT_SYMBOL_BS + eachDataPointValueByteSize) +\n      DATA_PACKAGE_WITHOUT_DATA_POINTS_BS;\n  }\n\n  function _extractByteSizeOfUnsignedMetadata() internal pure returns (uint256) {\n    // Checking if the calldata ends with the RedStone marker\n    bool hasValidRedstoneMarker;\n    assembly {\n      let calldataLast32Bytes := calldataload(sub(calldatasize(), STANDARD_SLOT_BS))\n      hasValidRedstoneMarker := eq(\n        REDSTONE_MARKER_MASK,\n        and(calldataLast32Bytes, REDSTONE_MARKER_MASK)\n      )\n    }\n    if (!hasValidRedstoneMarker) {\n      revert CalldataMustHaveValidPayload();\n    }\n\n    // Using uint24, because unsigned metadata byte size number has 3 bytes\n    uint24 unsignedMetadataByteSize;\n    if (REDSTONE_MARKER_BS_PLUS_STANDARD_SLOT_BS > msg.data.length) {\n      revert CalldataOverOrUnderFlow();\n    }\n    assembly {\n      unsignedMetadataByteSize := calldataload(\n        sub(calldatasize(), REDSTONE_MARKER_BS_PLUS_STANDARD_SLOT_BS)\n      )\n    }\n    uint256 calldataNegativeOffset = unsignedMetadataByteSize\n      + UNSIGNED_METADATA_BYTE_SIZE_BS\n      + REDSTONE_MARKER_BS;\n    if (calldataNegativeOffset + DATA_PACKAGES_COUNT_BS > msg.data.length) {\n      revert IncorrectUnsignedMetadataSize();\n    }\n    return calldataNegativeOffset;\n  }\n\n  // We return uint16, because unsigned metadata byte size number has 2 bytes\n  function _extractDataPackagesCountFromCalldata(uint256 calldataNegativeOffset)\n    internal\n    pure\n    returns (uint16 dataPackagesCount, uint256 nextCalldataNegativeOffset)\n  {\n    uint256 calldataNegativeOffsetWithStandardSlot = calldataNegativeOffset + STANDARD_SLOT_BS;\n    if (calldataNegativeOffsetWithStandardSlot > msg.data.length) {\n      revert CalldataOverOrUnderFlow();\n    }\n    assembly {\n      dataPackagesCount := calldataload(\n        sub(calldatasize(), calldataNegativeOffsetWithStandardSlot)\n      )\n    }\n    return (dataPackagesCount, calldataNegativeOffset + DATA_PACKAGES_COUNT_BS);\n  }\n\n  function _extractDataPointValueAndDataFeedId(\n    uint256 dataPointNegativeOffset,\n    uint256 dataPointValueByteSize\n  ) internal pure virtual returns (bytes32 dataPointDataFeedId, uint256 dataPointValue) {\n    uint256 dataPointCalldataOffset = msg.data.length - dataPointNegativeOffset;\n    assembly {\n      dataPointDataFeedId := calldataload(dataPointCalldataOffset)\n      dataPointValue := calldataload(add(dataPointCalldataOffset, DATA_POINT_SYMBOL_BS))\n    }\n    if (dataPointValueByteSize >= 33) {\n      revert TooLargeValueByteSize(dataPointValueByteSize);\n    }\n    unchecked {\n      dataPointValue = dataPointValue >> (32 - dataPointValueByteSize) * 8; \n    }\n  }\n\n  function _extractDataPointsDetailsForDataPackage(uint256 calldataNegativeOffsetForDataPackage)\n    internal\n    pure\n    returns (uint256 dataPointsCount, uint256 eachDataPointValueByteSize)\n  {\n    // Using uint24, because data points count byte size number has 3 bytes\n    uint24 dataPointsCount_;\n\n    // Using uint32, because data point value byte size has 4 bytes\n    uint32 eachDataPointValueByteSize_;\n\n    // Extract data points count\n    uint256 calldataOffset = msg.data.length - (calldataNegativeOffsetForDataPackage + SIG_BS + STANDARD_SLOT_BS);\n    assembly {\n      dataPointsCount_ := calldataload(calldataOffset)\n    }\n\n    // Extract each data point value size\n    calldataOffset = calldataOffset - DATA_POINTS_COUNT_BS;\n    assembly {\n      eachDataPointValueByteSize_ := calldataload(calldataOffset)\n    }\n\n    // Prepare returned values\n    dataPointsCount = dataPointsCount_;\n    eachDataPointValueByteSize = eachDataPointValueByteSize_;\n  }\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/evm-connector/contracts/core/RedstoneConstants.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.17;\n\n/**\n * @title The base contract with helpful constants\n * @author The Redstone Oracles team\n * @dev It mainly contains redstone-related values, which improve readability\n * of other contracts (e.g. CalldataExtractor and RedstoneConsumerBase)\n */\ncontract RedstoneConstants {\n  // === Abbreviations ===\n  // BS - Bytes size\n  // PTR - Pointer (memory location)\n  // SIG - Signature\n\n  // Solidity and YUL constants\n  uint256 internal constant STANDARD_SLOT_BS = 32;\n  uint256 internal constant FREE_MEMORY_PTR = 0x40;\n  uint256 internal constant BYTES_ARR_LEN_VAR_BS = 32;\n  uint256 internal constant REVERT_MSG_OFFSET = 68; // Revert message structure described here: https://ethereum.stackexchange.com/a/66173/106364\n  uint256 internal constant STRING_ERR_MESSAGE_MASK = 0x08c379a000000000000000000000000000000000000000000000000000000000;\n\n  // RedStone protocol consts\n  uint256 internal constant SIG_BS = 65;\n  uint256 internal constant TIMESTAMP_BS = 6;\n  uint256 internal constant DATA_PACKAGES_COUNT_BS = 2;\n  uint256 internal constant DATA_POINTS_COUNT_BS = 3;\n  uint256 internal constant DATA_POINT_VALUE_BYTE_SIZE_BS = 4;\n  uint256 internal constant DATA_POINT_SYMBOL_BS = 32;\n  uint256 internal constant DEFAULT_DATA_POINT_VALUE_BS = 32;\n  uint256 internal constant UNSIGNED_METADATA_BYTE_SIZE_BS = 3;\n  uint256 internal constant REDSTONE_MARKER_BS = 9; // byte size of 0x000002ed57011e0000\n  uint256 internal constant REDSTONE_MARKER_MASK = 0x0000000000000000000000000000000000000000000000000002ed57011e0000;\n\n  // Derived values (based on consts)\n  uint256 internal constant TIMESTAMP_NEGATIVE_OFFSET_IN_DATA_PACKAGE_WITH_STANDARD_SLOT_BS = 104; // SIG_BS + DATA_POINTS_COUNT_BS + DATA_POINT_VALUE_BYTE_SIZE_BS + STANDARD_SLOT_BS\n  uint256 internal constant DATA_PACKAGE_WITHOUT_DATA_POINTS_BS = 78; // DATA_POINT_VALUE_BYTE_SIZE_BS + TIMESTAMP_BS + DATA_POINTS_COUNT_BS + SIG_BS\n  uint256 internal constant DATA_PACKAGE_WITHOUT_DATA_POINTS_AND_SIG_BS = 13; // DATA_POINT_VALUE_BYTE_SIZE_BS + TIMESTAMP_BS + DATA_POINTS_COUNT_BS\n  uint256 internal constant REDSTONE_MARKER_BS_PLUS_STANDARD_SLOT_BS = 41; // REDSTONE_MARKER_BS + STANDARD_SLOT_BS\n\n  // Error messages\n  error CalldataOverOrUnderFlow();\n  error IncorrectUnsignedMetadataSize();\n  error InsufficientNumberOfUniqueSigners(uint256 receivedSignersCount, uint256 requiredSignersCount);\n  error EachSignerMustProvideTheSameValue();\n  error EmptyCalldataPointersArr();\n  error InvalidCalldataPointer();\n  error CalldataMustHaveValidPayload();\n  error SignerNotAuthorised(address receivedSigner);\n  error DataTimestampCannotBeZero();\n  error TimestampsMustBeEqual();\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/evm-connector/contracts/core/RedstoneConsumerBase.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.17;\n\nimport \"./RedstoneConstants.sol\";\nimport \"./RedstoneDefaultsLib.sol\";\nimport \"./CalldataExtractor.sol\";\nimport \"../libs/BitmapLib.sol\";\nimport \"../libs/SignatureLib.sol\";\n\n/**\n * @title The base contract with the main Redstone logic\n * @author The Redstone Oracles team\n * @dev Do not use this contract directly in consumer contracts, take a\n * look at `RedstoneConsumerNumericBase` and `RedstoneConsumerBytesBase` instead\n */\nabstract contract RedstoneConsumerBase is CalldataExtractor {\n\n  error GetDataServiceIdNotImplemented();\n\n  /* ========== VIRTUAL FUNCTIONS (MAY BE OVERRIDDEN IN CHILD CONTRACTS) ========== */\n\n  /**\n   * @dev This function must be implemented by the child consumer contract.\n   * It should return dataServiceId which DataServiceWrapper will use if not provided explicitly .\n   * If not overridden, value will always have to be provided explicitly in DataServiceWrapper.\n   * @return dataServiceId being consumed by contract\n   */\n  function getDataServiceId() public view virtual returns (string memory) {\n    revert GetDataServiceIdNotImplemented();\n  }\n\n  /**\n   * @dev This function must be implemented by the child consumer contract.\n   * It should return a unique index for a given signer address if the signer\n   * is authorised, otherwise it should revert\n   * @param receivedSigner The address of a signer, recovered from ECDSA signature\n   * @return Unique index for a signer in the range [0..255]\n   */\n  function getAuthorisedSignerIndex(address receivedSigner) public view virtual returns (uint8);\n\n  /**\n   * @dev This function may be overridden by the child consumer contract.\n   * It should validate the timestamp against the current time (block.timestamp)\n   * It should revert with a helpful message if the timestamp is not valid\n   * @param receivedTimestampMilliseconds Timestamp extracted from calldata\n   */\n  function validateTimestamp(uint256 receivedTimestampMilliseconds) public view virtual {\n    RedstoneDefaultsLib.validateTimestamp(receivedTimestampMilliseconds);\n  }\n\n  /**\n   * @dev This function must be implemented by the child consumer contract.\n   * @return The minimum required value of unique authorised signers\n   */\n  function getUniqueSignersThreshold() public view virtual returns (uint8);\n\n  /**\n   * @dev This function may be overridden by the child consumer contract.\n   * It should aggregate values from different signers to a single uint value.\n   * By default, it calculates the median value\n   * @param values An array of uint256 values from different signers\n   * @return Result of the aggregation in the form of a single number\n   */\n  function aggregateValues(uint256[] memory values) public view virtual returns (uint256) {\n    return RedstoneDefaultsLib.aggregateValues(values);\n  }\n\n  /* ========== FUNCTIONS WITH IMPLEMENTATION (CAN NOT BE OVERRIDDEN) ========== */\n\n  /**\n   * @dev This is an internal helpful function for secure extraction oracle values\n   * from the tx calldata. Security is achieved by signatures verification, timestamp\n   * validation, and aggregating values from different authorised signers into a\n   * single numeric value. If any of the required conditions (e.g. packages with different \n   * timestamps or insufficient number of authorised signers) do not match, the function \n   * will revert.\n   *\n   * Note! You should not call this function in a consumer contract. You can use\n   * `getOracleNumericValuesFromTxMsg` or `getOracleNumericValueFromTxMsg` instead.\n   *\n   * @param dataFeedIds An array of unique data feed identifiers\n   * @return An array of the extracted and verified oracle values in the same order\n   * as they are requested in dataFeedIds array\n   * @return dataPackagesTimestamp timestamp equal for all data packages\n   */\n  function _securelyExtractOracleValuesAndTimestampFromTxMsg(bytes32[] memory dataFeedIds)\n    internal\n    view\n    returns (uint256[] memory, uint256 dataPackagesTimestamp)\n  {\n    // Initializing helpful variables and allocating memory\n    uint256[] memory uniqueSignerCountForDataFeedIds = new uint256[](dataFeedIds.length);\n    uint256[] memory signersBitmapForDataFeedIds = new uint256[](dataFeedIds.length);\n    uint256[][] memory valuesForDataFeeds = new uint256[][](dataFeedIds.length);\n    for (uint256 i = 0; i < dataFeedIds.length;) {\n      // The line below is commented because newly allocated arrays are filled with zeros\n      // But we left it for better readability\n      // signersBitmapForDataFeedIds[i] = 0; // <- setting to an empty bitmap\n      valuesForDataFeeds[i] = new uint256[](getUniqueSignersThreshold());\n      unchecked {\n        i++;\n      }\n    }\n\n    // Extracting the number of data packages from calldata\n    uint256 calldataNegativeOffset = _extractByteSizeOfUnsignedMetadata();\n    uint256 dataPackagesCount;\n    (dataPackagesCount, calldataNegativeOffset) = _extractDataPackagesCountFromCalldata(calldataNegativeOffset);\n\n    // Saving current free memory pointer\n    uint256 freeMemPtr;\n    assembly {\n      freeMemPtr := mload(FREE_MEMORY_PTR)\n    }\n\n    // Data packages extraction in a loop\n    for (uint256 dataPackageIndex = 0; dataPackageIndex < dataPackagesCount;) {\n      // Extract data package details and update calldata offset\n      uint256 dataPackageTimestamp;\n      (calldataNegativeOffset, dataPackageTimestamp) = _extractDataPackage(\n        dataFeedIds,\n        uniqueSignerCountForDataFeedIds,\n        signersBitmapForDataFeedIds,\n        valuesForDataFeeds,\n        calldataNegativeOffset\n      );\n\n      if (dataPackageTimestamp == 0) {\n        revert DataTimestampCannotBeZero();\n      }\n\n      if (dataPackageTimestamp != dataPackagesTimestamp) {\n        if (dataPackagesTimestamp == 0) {\n          // Setting dataPackagesTimestamp first time\n          dataPackagesTimestamp = dataPackageTimestamp;    \n        } else {\n          revert TimestampsMustBeEqual();\n        }\n      }\n\n      // Resetting the memory pointer to the initial \"safe\" value\n      // We add STANDARD_SLOT_BS (32 bytes) to account for potential allocation\n      // of the dataPackageIndex variable, which may or may not be stored in memory\n      assembly {\n        mstore(FREE_MEMORY_PTR, add(freeMemPtr, STANDARD_SLOT_BS))\n      }\n      unchecked {\n        dataPackageIndex++;\n      }\n    }\n\n    // Validating numbers of unique signers and calculating aggregated values for each dataFeedId\n    return (_getAggregatedValues(valuesForDataFeeds, uniqueSignerCountForDataFeedIds), dataPackagesTimestamp);\n  }\n\n  /**\n   * @dev This is a private helpful function, which extracts data for a data package based\n   * on the given negative calldata offset, verifies them, and in the case of successful\n   * verification updates the corresponding data package values in memory\n   *\n   * @param dataFeedIds an array of unique data feed identifiers\n   * @param uniqueSignerCountForDataFeedIds an array with the numbers of unique signers\n   * for each data feed\n   * @param signersBitmapForDataFeedIds an array of signer bitmaps for data feeds\n   * @param valuesForDataFeeds 2-dimensional array, valuesForDataFeeds[i][j] contains\n   * j-th value for the i-th data feed\n   * @param calldataNegativeOffset negative calldata offset for the given data package\n   *\n   * @return nextCalldataNegativeOffset negative calldata offset for the next data package\n   * @return dataPackageTimestamp data package timestamp\n   */\n  function _extractDataPackage(\n    bytes32[] memory dataFeedIds,\n    uint256[] memory uniqueSignerCountForDataFeedIds,\n    uint256[] memory signersBitmapForDataFeedIds,\n    uint256[][] memory valuesForDataFeeds,\n    uint256 calldataNegativeOffset\n  ) private view returns (uint256 nextCalldataNegativeOffset, uint256 dataPackageTimestamp) {\n    uint256 signerIndex;\n\n    (\n      uint256 dataPointsCount,\n      uint256 eachDataPointValueByteSize\n    ) = _extractDataPointsDetailsForDataPackage(calldataNegativeOffset);\n\n    // We use scopes to resolve problem with too deep stack\n    {\n      address signerAddress;\n      bytes32 signedHash;\n      bytes memory signedMessage;\n      uint256 signedMessageBytesCount;\n      uint48 extractedTimestamp;\n\n      signedMessageBytesCount = dataPointsCount * (eachDataPointValueByteSize + DATA_POINT_SYMBOL_BS)\n        + DATA_PACKAGE_WITHOUT_DATA_POINTS_AND_SIG_BS; //DATA_POINT_VALUE_BYTE_SIZE_BS + TIMESTAMP_BS + DATA_POINTS_COUNT_BS\n\n      uint256 timestampCalldataOffset = msg.data.length - \n        (calldataNegativeOffset + TIMESTAMP_NEGATIVE_OFFSET_IN_DATA_PACKAGE_WITH_STANDARD_SLOT_BS);\n\n      uint256 signedMessageCalldataOffset = msg.data.length - \n        (calldataNegativeOffset + SIG_BS + signedMessageBytesCount);\n\n      assembly {\n        // Extracting the signed message\n        signedMessage := extractBytesFromCalldata(\n          signedMessageCalldataOffset,\n          signedMessageBytesCount\n        )\n\n        // Hashing the signed message\n        signedHash := keccak256(add(signedMessage, BYTES_ARR_LEN_VAR_BS), signedMessageBytesCount)\n\n        // Extracting timestamp\n        extractedTimestamp := calldataload(timestampCalldataOffset)\n\n        function initByteArray(bytesCount) -> ptr {\n          ptr := mload(FREE_MEMORY_PTR)\n          mstore(ptr, bytesCount)\n          ptr := add(ptr, BYTES_ARR_LEN_VAR_BS)\n          mstore(FREE_MEMORY_PTR, add(ptr, bytesCount))\n        }\n\n        function extractBytesFromCalldata(offset, bytesCount) -> extractedBytes {\n          let extractedBytesStartPtr := initByteArray(bytesCount)\n          calldatacopy(\n            extractedBytesStartPtr,\n            offset,\n            bytesCount\n          )\n          extractedBytes := sub(extractedBytesStartPtr, BYTES_ARR_LEN_VAR_BS)\n        }\n      }\n\n      dataPackageTimestamp = extractedTimestamp;\n\n      // Verifying the off-chain signature against on-chain hashed data\n      signerAddress = SignatureLib.recoverSignerAddress(\n        signedHash,\n        calldataNegativeOffset + SIG_BS\n      );\n      signerIndex = getAuthorisedSignerIndex(signerAddress);\n    }\n\n    // Updating helpful arrays\n    {\n      calldataNegativeOffset = calldataNegativeOffset + DATA_PACKAGE_WITHOUT_DATA_POINTS_BS;\n      bytes32 dataPointDataFeedId;\n      uint256 dataPointValue;\n      for (uint256 dataPointIndex = 0; dataPointIndex < dataPointsCount;) {\n        calldataNegativeOffset = calldataNegativeOffset + eachDataPointValueByteSize + DATA_POINT_SYMBOL_BS;\n        // Extracting data feed id and value for the current data point\n        (dataPointDataFeedId, dataPointValue) = _extractDataPointValueAndDataFeedId(\n          calldataNegativeOffset,\n          eachDataPointValueByteSize\n        );\n\n        for (\n          uint256 dataFeedIdIndex = 0;\n          dataFeedIdIndex < dataFeedIds.length;\n        ) {\n          if (dataPointDataFeedId == dataFeedIds[dataFeedIdIndex]) {\n            uint256 bitmapSignersForDataFeedId = signersBitmapForDataFeedIds[dataFeedIdIndex];\n\n            if (\n              !BitmapLib.getBitFromBitmap(bitmapSignersForDataFeedId, signerIndex) && /* current signer was not counted for current dataFeedId */\n              uniqueSignerCountForDataFeedIds[dataFeedIdIndex] < getUniqueSignersThreshold()\n            ) {\n              // Add new value\n              valuesForDataFeeds[dataFeedIdIndex][uniqueSignerCountForDataFeedIds[dataFeedIdIndex]] = dataPointValue;\n\n              // Increase unique signer counter\n              uniqueSignerCountForDataFeedIds[dataFeedIdIndex]++;\n\n              // Update signers bitmap\n              signersBitmapForDataFeedIds[dataFeedIdIndex] = BitmapLib.setBitInBitmap(\n                bitmapSignersForDataFeedId,\n                signerIndex\n              );\n            }\n\n            // Breaking, as there couldn't be several indexes for the same feed ID\n            break;\n          }\n          unchecked {\n            dataFeedIdIndex++;\n          }\n        }\n        unchecked {\n           dataPointIndex++;\n        }\n      }\n    }\n\n    return (calldataNegativeOffset, dataPackageTimestamp);\n  }\n\n  /**\n   * @dev This is a private helpful function, which aggregates values from different\n   * authorised signers for the given arrays of values for each data feed\n   *\n   * @param valuesForDataFeeds 2-dimensional array, valuesForDataFeeds[i][j] contains\n   * j-th value for the i-th data feed\n   * @param uniqueSignerCountForDataFeedIds an array with the numbers of unique signers\n   * for each data feed\n   *\n   * @return An array of the aggregated values\n   */\n  function _getAggregatedValues(\n    uint256[][] memory valuesForDataFeeds,\n    uint256[] memory uniqueSignerCountForDataFeedIds\n  ) private view returns (uint256[] memory) {\n    uint256[] memory aggregatedValues = new uint256[](valuesForDataFeeds.length);\n    uint256 uniqueSignersThreshold = getUniqueSignersThreshold();\n\n    for (uint256 dataFeedIndex = 0; dataFeedIndex < valuesForDataFeeds.length; dataFeedIndex++) {\n      if (uniqueSignerCountForDataFeedIds[dataFeedIndex] < uniqueSignersThreshold) {\n        revert InsufficientNumberOfUniqueSigners(\n          uniqueSignerCountForDataFeedIds[dataFeedIndex],\n          uniqueSignersThreshold);\n      }\n      uint256 aggregatedValueForDataFeedId = aggregateValues(valuesForDataFeeds[dataFeedIndex]);\n      aggregatedValues[dataFeedIndex] = aggregatedValueForDataFeedId;\n    }\n\n    return aggregatedValues;\n  }\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/evm-connector/contracts/core/RedstoneConsumerNumericBase.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.17;\n\nimport \"./RedstoneConsumerBase.sol\";\n\n/**\n * @title The base contract for Redstone consumers' contracts that allows to\n * securely calculate numeric redstone oracle values\n * @author The Redstone Oracles team\n * @dev This contract can extend other contracts to allow them\n * securely fetch Redstone oracle data from transactions calldata\n */\nabstract contract RedstoneConsumerNumericBase is RedstoneConsumerBase {\n  /**\n   * @dev This function can be used in a consumer contract to securely extract an\n   * oracle value for a given data feed id. Security is achieved by\n   * signatures verification, timestamp validation, and aggregating values\n   * from different authorised signers into a single numeric value. If any of the\n   * required conditions do not match, the function will revert.\n   * Note! This function expects that tx calldata contains redstone payload in the end\n   * Learn more about redstone payload here: https://github.com/redstone-finance/redstone-oracles-monorepo/tree/main/packages/evm-connector#readme\n   * @param dataFeedId bytes32 value that uniquely identifies the data feed\n   * @return Extracted and verified numeric oracle value for the given data feed id\n   */\n  function getOracleNumericValueFromTxMsg(bytes32 dataFeedId)\n    internal\n    view\n    virtual\n    returns (uint256)\n  {\n    bytes32[] memory dataFeedIds = new bytes32[](1);\n    dataFeedIds[0] = dataFeedId;\n    return getOracleNumericValuesFromTxMsg(dataFeedIds)[0];\n  }\n\n  /**\n   * @dev This function can be used in a consumer contract to securely extract several\n   * numeric oracle values for a given array of data feed ids. Security is achieved by\n   * signatures verification, timestamp validation, and aggregating values\n   * from different authorised signers into a single numeric value. If any of the\n   * required conditions do not match, the function will revert.\n   * Note! This function expects that tx calldata contains redstone payload in the end\n   * Learn more about redstone payload here: https://github.com/redstone-finance/redstone-oracles-monorepo/tree/main/packages/evm-connector#readme\n   * @param dataFeedIds An array of unique data feed identifiers\n   * @return An array of the extracted and verified oracle values in the same order\n   * as they are requested in the dataFeedIds array\n   */\n  function getOracleNumericValuesFromTxMsg(bytes32[] memory dataFeedIds)\n    internal\n    view\n    virtual\n    returns (uint256[] memory)\n  {\n    (uint256[] memory values, uint256 timestamp) = _securelyExtractOracleValuesAndTimestampFromTxMsg(dataFeedIds);\n    validateTimestamp(timestamp);\n    return values;\n  }\n\n  /**\n   * @dev This function can be used in a consumer contract to securely extract several\n   * numeric oracle values for a given array of data feed ids. Security is achieved by\n   * signatures verification and aggregating values from different authorised signers \n   * into a single numeric value. If any of the required conditions do not match, \n   * the function will revert.\n   * Note! This function returns the timestamp of the packages (it requires it to be \n   * the same for all), but does not validate this timestamp.\n   * Note! This function expects that tx calldata contains redstone payload in the end\n   * Learn more about redstone payload here: https://github.com/redstone-finance/redstone-oracles-monorepo/tree/main/packages/evm-connector#readme\n   * @param dataFeedIds An array of unique data feed identifiers\n   * @return An array of the extracted and verified oracle values in the same order\n   * as they are requested in the dataFeedIds array and data packages timestamp\n   */\n   function getOracleNumericValuesAndTimestampFromTxMsg(bytes32[] memory dataFeedIds)\n    internal\n    view\n    virtual\n    returns (uint256[] memory, uint256)\n  {\n    return _securelyExtractOracleValuesAndTimestampFromTxMsg(dataFeedIds);\n  }\n\n  /**\n   * @dev This function works similarly to the `getOracleNumericValuesFromTxMsg` with the\n   * only difference that it allows to request oracle data for an array of data feeds\n   * that may contain duplicates\n   * \n   * @param dataFeedIdsWithDuplicates An array of data feed identifiers (duplicates are allowed)\n   * @return An array of the extracted and verified oracle values in the same order\n   * as they are requested in the dataFeedIdsWithDuplicates array\n   */\n  function getOracleNumericValuesWithDuplicatesFromTxMsg(bytes32[] memory dataFeedIdsWithDuplicates) internal view returns (uint256[] memory) {\n    // Building an array without duplicates\n    bytes32[] memory dataFeedIdsWithoutDuplicates = new bytes32[](dataFeedIdsWithDuplicates.length);\n    bool alreadyIncluded;\n    uint256 uniqueDataFeedIdsCount = 0;\n\n    for (uint256 indexWithDup = 0; indexWithDup < dataFeedIdsWithDuplicates.length; indexWithDup++) {\n      // Checking if current element is already included in `dataFeedIdsWithoutDuplicates`\n      alreadyIncluded = false;\n      for (uint256 indexWithoutDup = 0; indexWithoutDup < uniqueDataFeedIdsCount; indexWithoutDup++) {\n        if (dataFeedIdsWithoutDuplicates[indexWithoutDup] == dataFeedIdsWithDuplicates[indexWithDup]) {\n          alreadyIncluded = true;\n          break;\n        }\n      }\n\n      // Adding if not included\n      if (!alreadyIncluded) {\n        dataFeedIdsWithoutDuplicates[uniqueDataFeedIdsCount] = dataFeedIdsWithDuplicates[indexWithDup];\n        uniqueDataFeedIdsCount++;\n      }\n    }\n\n    // Overriding dataFeedIdsWithoutDuplicates.length\n    // Equivalent to: dataFeedIdsWithoutDuplicates.length = uniqueDataFeedIdsCount;\n    assembly {\n      mstore(dataFeedIdsWithoutDuplicates, uniqueDataFeedIdsCount)\n    }\n\n    // Requesting oracle values (without duplicates)\n    (uint256[] memory valuesWithoutDuplicates, uint256 timestamp) = _securelyExtractOracleValuesAndTimestampFromTxMsg(dataFeedIdsWithoutDuplicates);\n    validateTimestamp(timestamp);\n\n    // Preparing result values array\n    uint256[] memory valuesWithDuplicates = new uint256[](dataFeedIdsWithDuplicates.length);\n    for (uint256 indexWithDup = 0; indexWithDup < dataFeedIdsWithDuplicates.length; indexWithDup++) {\n      for (uint256 indexWithoutDup = 0; indexWithoutDup < dataFeedIdsWithoutDuplicates.length; indexWithoutDup++) {\n        if (dataFeedIdsWithDuplicates[indexWithDup] == dataFeedIdsWithoutDuplicates[indexWithoutDup]) {\n          valuesWithDuplicates[indexWithDup] = valuesWithoutDuplicates[indexWithoutDup];\n          break;\n        }\n      }\n    }\n\n    return valuesWithDuplicates;\n  }\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/evm-connector/contracts/core/RedstoneDefaultsLib.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.17;\n\nimport \"../libs/NumericArrayLib.sol\";\n\n/**\n * @title Default implementations of virtual redstone consumer base functions\n * @author The Redstone Oracles team\n */\nlibrary RedstoneDefaultsLib {\n  uint256 constant DEFAULT_MAX_DATA_TIMESTAMP_DELAY_SECONDS = 3 minutes;\n  uint256 constant DEFAULT_MAX_DATA_TIMESTAMP_AHEAD_SECONDS = 1 minutes;\n\n  error TimestampFromTooLongFuture(uint256 receivedTimestampSeconds, uint256 blockTimestamp);\n  error TimestampIsTooOld(uint256 receivedTimestampSeconds, uint256 blockTimestamp);\n\n  function validateTimestamp(uint256 receivedTimestampMilliseconds) internal view {\n    // Getting data timestamp from future seems quite unlikely\n    // But we've already spent too much time with different cases\n    // Where block.timestamp was less than dataPackage.timestamp.\n    // Some blockchains may case this problem as well.\n    // That's why we add MAX_BLOCK_TIMESTAMP_DELAY\n    // and allow data \"from future\" but with a small delay\n    uint256 receivedTimestampSeconds = receivedTimestampMilliseconds / 1000;\n\n    if (block.timestamp < receivedTimestampSeconds) {\n      if ((receivedTimestampSeconds - block.timestamp) > DEFAULT_MAX_DATA_TIMESTAMP_AHEAD_SECONDS) {\n        revert TimestampFromTooLongFuture(receivedTimestampSeconds, block.timestamp);\n      }\n    } else if ((block.timestamp - receivedTimestampSeconds) > DEFAULT_MAX_DATA_TIMESTAMP_DELAY_SECONDS) {\n      revert TimestampIsTooOld(receivedTimestampSeconds, block.timestamp);\n    }\n  }\n\n  function aggregateValues(uint256[] memory values) internal pure returns (uint256) {\n    return NumericArrayLib.pickMedian(values);\n  }\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/evm-connector/contracts/libs/BitmapLib.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.17;\n\nlibrary BitmapLib {\n  function setBitInBitmap(uint256 bitmap, uint256 bitIndex) internal pure returns (uint256) {\n    return bitmap | (1 << bitIndex);\n  }\n\n  function getBitFromBitmap(uint256 bitmap, uint256 bitIndex) internal pure returns (bool) {\n    uint256 bitAtIndex = bitmap & (1 << bitIndex);\n    return bitAtIndex > 0;\n  }\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/evm-connector/contracts/libs/NumericArrayLib.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.17;\n\nlibrary NumericArrayLib {\n  // This function sort array in memory using bubble sort algorithm,\n  // which performs even better than quick sort for small arrays\n\n  uint256 constant BYTES_ARR_LEN_VAR_BS = 32;\n  uint256 constant UINT256_VALUE_BS = 32;\n\n  error CanNotPickMedianOfEmptyArray();\n\n  // This function modifies the array\n  function pickMedian(uint256[] memory arr) internal pure returns (uint256) {\n    if (arr.length == 2) {\n      return (arr[0] + arr[1]) / 2;\n    }\n    if (arr.length == 0) {\n      revert CanNotPickMedianOfEmptyArray();\n    }\n    sort(arr);\n    uint256 middleIndex = arr.length / 2;\n    if (arr.length % 2 == 0) {\n      uint256 sum = arr[middleIndex - 1] + arr[middleIndex];\n      return sum / 2;\n    } else {\n      return arr[middleIndex];\n    }\n  }\n\n  function sort(uint256[] memory arr) internal pure {\n    assembly {\n      let arrLength := mload(arr)\n      let valuesPtr := add(arr, BYTES_ARR_LEN_VAR_BS)\n      let endPtr := add(valuesPtr, mul(arrLength, UINT256_VALUE_BS))\n      for {\n        let arrIPtr := valuesPtr\n      } lt(arrIPtr, endPtr) {\n        arrIPtr := add(arrIPtr, UINT256_VALUE_BS) // arrIPtr += 32\n      } {\n        for {\n          let arrJPtr := valuesPtr\n        } lt(arrJPtr, arrIPtr) {\n          arrJPtr := add(arrJPtr, UINT256_VALUE_BS) // arrJPtr += 32\n        } {\n          let arrI := mload(arrIPtr)\n          let arrJ := mload(arrJPtr)\n          if lt(arrI, arrJ) {\n            mstore(arrIPtr, arrJ)\n            mstore(arrJPtr, arrI)\n          }\n        }\n      }\n    }\n  }\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/evm-connector/contracts/libs/SignatureLib.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.17;\n\nlibrary SignatureLib {\n  uint256 constant ECDSA_SIG_R_BS = 32;\n  uint256 constant ECDSA_SIG_S_BS = 32;\n\n  error InvalidSignature(bytes32 signedHash);\n\n  function recoverSignerAddress(bytes32 signedHash, uint256 signatureCalldataNegativeOffset)\n    internal\n    pure\n    returns (address signerAddress)\n  {\n    bytes32 r;\n    bytes32 s;\n    uint8 v;\n    assembly {\n      let signatureCalldataStartPos := sub(calldatasize(), signatureCalldataNegativeOffset)\n      r := calldataload(signatureCalldataStartPos)\n      signatureCalldataStartPos := add(signatureCalldataStartPos, ECDSA_SIG_R_BS)\n      s := calldataload(signatureCalldataStartPos)\n      signatureCalldataStartPos := add(signatureCalldataStartPos, ECDSA_SIG_S_BS)\n      v := byte(0, calldataload(signatureCalldataStartPos)) // last byte of the signature memory array\n    }\n    signerAddress = ecrecover(signedHash, v, r, s);\n    if (signerAddress == address(0)) {\n      revert InvalidSignature(signedHash);\n    }\n  }\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/on-chain-relayer/contracts/custom-integrations/layerbank/ILToken.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.17;\n\ninterface ILToken {\n  function underlying() external view returns (address);\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/on-chain-relayer/contracts/custom-integrations/layerbank/IPriceCalculator.sol","source_code":"// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.17;\n\ninterface IPriceCalculator {\n  struct ReferenceData {\n    uint256 lastData;\n    uint256 lastUpdated;\n  }\n\n  function priceOf(address asset) external view returns (uint256);\n\n  function pricesOf(\n    address[] memory assets\n  ) external view returns (uint256[] memory);\n\n  function priceOfETH() external view returns (uint256);\n\n  function getUnderlyingPrice(address gToken) external view returns (uint256);\n\n  function getUnderlyingPrices(\n    address[] memory gTokens\n  ) external view returns (uint256[] memory);\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/on-chain-relayer/contracts/price-feeds/data-services/MultiFeedAdapterWithoutRoundsPrimaryProd.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.17;\n\nimport {MultiFeedAdapterWithoutRounds} from \"../without-rounds/MultiFeedAdapterWithoutRounds.sol\";\n\nabstract contract MultiFeedAdapterWithoutRoundsPrimaryProd is MultiFeedAdapterWithoutRounds {\n  function getUniqueSignersThreshold() public view virtual override returns (uint8) {\n    return 3;\n  }\n\n  function getAuthorisedSignerIndex(\n    address signerAddress\n  ) public view virtual override returns (uint8) {\n    if (signerAddress == 0x8BB8F32Df04c8b654987DAaeD53D6B6091e3B774) { return 0; }\n    else if (signerAddress == 0xdEB22f54738d54976C4c0fe5ce6d408E40d88499) { return 1; }\n    else if (signerAddress == 0x51Ce04Be4b3E32572C4Ec9135221d0691Ba7d202) { return 2; }\n    else if (signerAddress == 0xDD682daEC5A90dD295d14DA4b0bec9281017b5bE) { return 3; }\n    else if (signerAddress == 0x9c5AE89C4Af6aA32cE58588DBaF90d18a855B6de) { return 4; }\n    else {\n      revert SignerNotAuthorised(signerAddress);\n    }\n  }\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/on-chain-relayer/contracts/price-feeds/interfaces/IMultiFeedAdapter.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.17;\n\ninterface IMultiFeedAdapter {\n  function updateDataFeedsValuesPartial(bytes32[] memory dataFeedsIds) external;\n\n  function getLastUpdateDetails(bytes32 dataFeedId) external view returns (uint256 lastDataTimestamp, uint256 lastBlockTimestamp, uint256 lastValue);\n\n  function getLastUpdateDetailsUnsafe(bytes32 dataFeedId) external view returns (uint256 lastDataTimestamp, uint256 lastBlockTimestamp, uint256 lastValue);\n\n  function getValuesForDataFeeds(bytes32[] memory requestedDataFeedIds) external view returns (uint256[] memory values);\n\n  function getValueForDataFeed(bytes32 dataFeedId) external view returns (uint256 dataFeedValue);\n\n  function getDataTimestampFromLatestUpdate(bytes32 dataFeedId) external view returns (uint256 lastDataTimestamp);\n\n  function getBlockTimestampFromLatestUpdate(bytes32 dataFeedId) external view returns (uint256 blockTimestamp);\n}\n"},{"file_path":"contracts/__C7/@redstone-finance/on-chain-relayer/contracts/price-feeds/without-rounds/MultiFeedAdapterWithoutRounds.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.17;\n\nimport {RedstoneConsumerNumericBase, RedstoneDefaultsLib} from \"../../../../../@redstone-finance/evm-connector/contracts/core/RedstoneConsumerNumericBase.sol\";\nimport {IMultiFeedAdapter} from \"../interfaces/IMultiFeedAdapter.sol\";\nimport {IPriceCalculator} from \"../../custom-integrations/layerbank/IPriceCalculator.sol\";\nimport {ILToken} from \"../../custom-integrations/layerbank/ILToken.sol\";\n\n/**\n * @title MultiFeedAdapterWithoutRounds\n * @author The Redstone Oracles team\n * @dev This abstract contract serves as an adapter for multiple data feeds, facilitating\n * the updating and retrieval of oracle data values independently.\n *\n * Key details about the contract:\n * - Values for data feeds can be updated using the `updateDataFeedsValuesPartial` function\n * - Unlike the previous version (RedstoneAdapterBase), this adapter allows updating any set of data feeds,\n *   with each update being made independently.\n * - Updates are highly independent. Each data feed update is attempted separately, ensuring maximum possible\n *   updates without reverting the entire transaction if some of them fail. Both successful value updates and\n *   update skips due to failed validation are represented in corresponding events.\n * - Efficient storage usage: Related timestamps and values are packed into a single 32-byte slot when possible.\n *   If a value exceeds the slot capacity, it is stored in the next slot, with one bool prop (isValueBigger) indicating the storage method used.\n * - All data packages in the Redstone payload must have the same timestamp. Invalid timestamps (too old or too new) will cause transaction reversion.\n * - The contract includes a built-in IPriceCalculator interface used by LayerBank and other projects\n */\nabstract contract MultiFeedAdapterWithoutRounds is RedstoneConsumerNumericBase, IMultiFeedAdapter, IPriceCalculator {\n  bytes32 internal constant DATA_FEEDS_STORAGE_LOCATION = 0x5e9fb4cb0eb3c2583734d3394f30bb14b241acb9b3a034f7e7ba1a62db4370f1; // keccak256(\"RedStone.MultiFeedAdapterWithoutRounds.dataFeeds\");\n  bytes32 internal constant ETH_DATA_FEED_ID = bytes32(\"ETH\");\n  uint256 internal constant MAX_DATA_STALENESS = 30 hours;\n  uint256 internal constant DEFAULT_DECIMAL_SCALER_LAYERBANK = 1e10;\n\n  error DataTimestampTooLarge(uint256 dataTimestamp);\n  error BlockTimestampTooLarge(uint256 blockTimestamp);\n  error InvalidLastUpdateDetails(bytes32 dataFeedId, uint256 lastDataTimestamp, uint256 lastBlockTimestamp, uint256 lastValue);\n\n  event ValueUpdate(uint256 value, bytes32 dataFeedId, uint256 updatedAt);\n  event UpdateSkipDueToBlockTimestamp(bytes32 dataFeedId);\n  event UpdateSkipDueToDataTimestamp(bytes32 dataFeedId);\n  event UpdateSkipDueToInvalidValue(bytes32 dataFeedId);\n\n  // This struct uses exactly one storage slot (32 bytes)\n  struct DataFeedDetails {\n    uint48 dataTimestamp;\n    uint48 blockTimestamp;\n    uint152 value;\n    bool isValueBigger;\n  }\n\n  struct DataFeedDetailsWithOptionalBigValue {\n    DataFeedDetails details;\n    uint256 biggerValue;\n  }\n\n  // This struct is used only for returning values\n  struct LastUpdateDetails {\n    uint256 dataTimestamp;\n    uint256 blockTimestamp;\n    uint256 value;\n  }\n\n  struct DataFeedsStorage {\n    mapping(bytes32 => DataFeedDetailsWithOptionalBigValue) _dataFeeds;\n  }\n\n  /// This function allows to update any set of data feeds\n  function updateDataFeedsValuesPartial(bytes32[] memory dataFeedsIds) public {\n    (uint256[] memory oracleValues, uint256 extractedDataTimestamp) = getOracleNumericValuesAndTimestampFromTxMsg(dataFeedsIds);\n\n    // Revert if data timestamp doesn't fit within the allowed block timestamp window\n    validateTimestamp(extractedDataTimestamp);\n\n    // Revert if data or block timestamp do not fit into 48 bits reserved in storage for timestamps\n    if (extractedDataTimestamp > type(uint48).max) {\n      revert DataTimestampTooLarge(extractedDataTimestamp);\n    }\n    if (block.timestamp > type(uint48).max) {\n      revert BlockTimestampTooLarge(block.timestamp);\n    }\n\n    // The logic below can fail only in the case when gas limit reached\n    for (uint256 i = 0; i < dataFeedsIds.length;) {\n      // Note, each update is independent. It means that we are trying to update everything we can.\n      // And skip the rest (emitting corresponding events)\n      _tryToUpdateDataFeed(dataFeedsIds[i], oracleValues[i], extractedDataTimestamp);\n      unchecked { i++; } // reduces gas costs\n    }\n  }\n\n  function _tryToUpdateDataFeed(bytes32 dataFeedId, uint256 value, uint256 dataTimestamp) internal virtual {\n    (uint256 lastDataTimestamp, uint256 lastBlockTimestamp, uint256 lastValue) = getLastUpdateDetailsUnsafe(dataFeedId);\n\n    if (!_validateBlockTimestamp(lastBlockTimestamp)) {\n      emit UpdateSkipDueToBlockTimestamp(dataFeedId);\n      return;\n    }\n\n    if (!_validateDataTimestamp(dataTimestamp, lastDataTimestamp)) {\n      emit UpdateSkipDueToDataTimestamp(dataFeedId);\n      return;\n    }\n\n    if (!_validateValueBeforeSave(dataFeedId, value, lastValue)) {\n      emit UpdateSkipDueToInvalidValue(dataFeedId);\n      return;\n    }\n\n    _saveNewUpdateDetails(dataFeedId, value, dataTimestamp);\n    _emitEventAfterValueUpdate(dataFeedId, value);\n  }\n\n  function _saveNewUpdateDetails(bytes32 dataFeedId, uint256 newValue, uint256 dataTimestamp) internal {\n    DataFeedDetailsWithOptionalBigValue storage dataFeed = _getDataFeedsStorage()._dataFeeds[dataFeedId];\n\n    bool isValueBigger = newValue > type(uint152).max;\n\n    // We can safely cast timestamps here, because we checked timestamp values in the `updateDataFeedsValuesPartial` function\n    dataFeed.details = DataFeedDetails({\n      dataTimestamp: uint48(dataTimestamp),\n      blockTimestamp: uint48(block.timestamp),\n      value: uint152(newValue), // we can store anything here is isValueBigger == true, but it's slightly cheaper to always store the same value\n      isValueBigger: isValueBigger\n    });\n\n    if (isValueBigger) {\n      dataFeed.biggerValue = newValue;\n    }\n  }\n\n  function getLastUpdateDetails(bytes32 dataFeedId) public view virtual returns (uint256 lastDataTimestamp, uint256 lastBlockTimestamp, uint256 lastValue) {\n    (lastDataTimestamp, lastBlockTimestamp, lastValue) = getLastUpdateDetailsUnsafe(dataFeedId);\n    if (!_validateLastUpdateDetailsOnRead(dataFeedId, lastDataTimestamp, lastBlockTimestamp, lastValue)) {\n      revert InvalidLastUpdateDetails(dataFeedId, lastDataTimestamp, lastBlockTimestamp, lastValue);\n    }\n  }\n\n  function getLastUpdateDetailsUnsafe(bytes32 dataFeedId) public view virtual returns (uint256 lastDataTimestamp, uint256 lastBlockTimestamp, uint256 lastValue) {\n    DataFeedDetailsWithOptionalBigValue storage dataFeed = _getDataFeedsStorage()._dataFeeds[dataFeedId];\n\n    lastDataTimestamp = dataFeed.details.dataTimestamp;\n    lastBlockTimestamp = dataFeed.details.blockTimestamp;\n\n    if (dataFeed.details.isValueBigger) {\n      lastValue = dataFeed.biggerValue;\n    } else {\n      lastValue = dataFeed.details.value;\n    }\n  }\n\n  function _getDataFeedsStorage() private pure returns (DataFeedsStorage storage $) {\n    assembly {\n      $.slot := DATA_FEEDS_STORAGE_LOCATION\n    }\n  }\n\n  /// This function can be used to implement time-based whitelisting (e.g. whitelisting for only X seconds after the latest update)\n  /// Important! This function should not revert, it should only return bool result of the validation\n  function _validateBlockTimestamp(uint256 lastBlockTimestamp) internal view virtual returns (bool) {\n    // In the default implementation we just check if the block number is higher\n    // To ensure max 1 update for a given data feed in a block\n    return block.timestamp > lastBlockTimestamp;\n  }\n\n  /// Important! This function should not revert, it should only return bool result of the validation\n  function _validateDataTimestamp(uint256 proposedDataTimestamp, uint256 lastDataTimestamp) internal view virtual returns (bool) {\n    return proposedDataTimestamp > lastDataTimestamp;\n  }\n\n  /// Important! This function should not revert, it should only return bool result of the validation\n  /// It can be overridden to handle more specific logic in future\n  function _validateValueBeforeSave(bytes32 /* dataFeedId */, uint256 proposedValue, uint256 /* lastValue */) internal view virtual returns (bool) {\n    return proposedValue > 0;\n  }\n\n  /// This function can be overridden (e.g. value validation and staleness check)\n  /// We've added dataFeedId for being able to implement custom validation per feed\n  function _validateLastUpdateDetailsOnRead(bytes32 /* dataFeedId */, uint256 /* lastDataTimestamp */, uint256 lastBlockTimestamp, uint256 lastValue) internal view virtual returns (bool) {\n    return lastValue > 0 && lastBlockTimestamp + MAX_DATA_STALENESS > block.timestamp;\n  }\n\n  /// Important! This function should not revert, it should only emit an event\n  /// It is a separate function, so that we can specify custom events for specific data feeds\n  function _emitEventAfterValueUpdate(bytes32 dataFeedId, uint256 newValue) internal virtual {\n    emit ValueUpdate(newValue, dataFeedId, block.timestamp);\n  }\n\n\n  ////////////////////////////////////////////////////\n  /////////// Functions for relayers below ///////////\n  ////////////////////////////////////////////////////\n\n  function getLastUpdateDetailsUnsafeForMany(bytes32[] memory dataFeedIds) external view returns (LastUpdateDetails[] memory detailsForFeeds) {\n    detailsForFeeds = new LastUpdateDetails[](dataFeedIds.length);\n    for (uint256 i = 0; i < dataFeedIds.length;) {\n      (detailsForFeeds[i].dataTimestamp, detailsForFeeds[i].blockTimestamp, detailsForFeeds[i].value) = getLastUpdateDetailsUnsafe(dataFeedIds[i]);\n      unchecked { i++; } // reduces gas costs\n    }\n  }\n\n  function getValuesForDataFeeds(bytes32[] memory requestedDataFeedIds) external view returns (uint256[] memory values) {\n    values = new uint256[](requestedDataFeedIds.length);\n    for (uint256 i = 0; i < requestedDataFeedIds.length;) {\n      values[i] = getValueForDataFeed(requestedDataFeedIds[i]);\n      unchecked { i++; } // reduces gas costs\n    }\n  }\n\n  function getValueForDataFeed(bytes32 dataFeedId) public view virtual returns (uint256 dataFeedValue) {\n    (,, dataFeedValue) = getLastUpdateDetails(dataFeedId);\n  }\n\n  function getDataTimestampFromLatestUpdate(bytes32 dataFeedId) external view virtual returns (uint256 lastDataTimestamp) {\n    (lastDataTimestamp, ,) = getLastUpdateDetails(dataFeedId);\n  }\n\n  function getBlockTimestampFromLatestUpdate(bytes32 dataFeedId) external view virtual returns (uint256 blockTimestamp) {\n    (, blockTimestamp, ) = getLastUpdateDetails(dataFeedId);\n  }\n\n  ///////////////////////////////////////////////////////\n  //////////// LayerBank interface functions ////////////\n  ///////////////////////////////////////////////////////\n\n  /// We can connect manager contract here or implement it directly here\n  /// By default, users will be able to use data feed identifiers (casted to addresses) in layerbank functions\n  function getDataFeedIdForAsset(address asset) public view virtual returns(bytes32) {\n    return bytes32(uint256(uint160(asset)));\n  }\n\n  function convertDecimals(bytes32 /* dataFeedId */, uint256 valueFromRedstonePayload) public view virtual returns (uint256) {\n    return valueFromRedstonePayload * DEFAULT_DECIMAL_SCALER_LAYERBANK;\n  }\n\n  function getUnderlyingAsset(address gToken) public view virtual returns(address) {\n    return ILToken(gToken).underlying();\n  }\n\n  function priceOf(address asset) public view virtual returns (uint256) {\n    bytes32 dataFeedId = getDataFeedIdForAsset(asset);\n    uint256 latestValue = getValueForDataFeed(dataFeedId);\n    return convertDecimals(dataFeedId, latestValue);\n  }\n\n  function priceOfETH() public view virtual returns (uint256) {\n    return convertDecimals(ETH_DATA_FEED_ID, getValueForDataFeed(ETH_DATA_FEED_ID));\n  }\n\n  function pricesOf(\n    address[] memory assets\n  ) external view returns (uint256[] memory values) {\n    values = new uint256[](assets.length);\n    for (uint256 i = 0; i < assets.length;) {\n      values[i] = priceOf(assets[i]);\n      unchecked { i++; } // reduces gas costs\n    }\n  }\n\n  function getUnderlyingPrice(address gToken) public view returns (uint256) {\n    return priceOf(getUnderlyingAsset(gToken));\n  }\n\n  function getUnderlyingPrices(\n    address[] memory gTokens\n  ) public view returns (uint256[] memory values) {\n    values = new uint256[](gTokens.length);\n    for (uint256 i = 0; i < gTokens.length;) {\n      values[i] = getUnderlyingPrice(gTokens[i]);\n      unchecked { i++; } // reduces gas costs\n    }\n  }\n}\n"},{"file_path":"contracts/__addresses/Addresses.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.4;\n\nlibrary OldGelatoAddress {\n  address constant public ADDR = 0xc4D1AE5E796E6d7561cdc8335F85e6B57a36e097;\n}\n\nlibrary GelatoAddress {\n  address constant public ADDR = 0xCD6BfDA4D95d5C0f3f2882dC221D792392c99714;\n}\n"},{"file_path":"contracts/ethereumMultiFeed/EthereumMultiFeedAdapterWithoutRoundsV2.sol","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.17;\n\nimport {OldGelatoAddress, GelatoAddress} from \"../__addresses/Addresses.sol\";\nimport {MultiFeedAdapterWithoutRoundsPrimaryProd} from \"../__C7/@redstone-finance/on-chain-relayer/contracts/price-feeds/data-services/MultiFeedAdapterWithoutRoundsPrimaryProd.sol\";\n\ncontract EthereumMultiFeedAdapterWithoutRoundsV2 is\n  MultiFeedAdapterWithoutRoundsPrimaryProd\n{\n  address internal constant MAIN_UPDATER_ADDRESS =\n    0x6809b95622B2dcC53d2F3Fb2301B36F6a8c5B584;\n  address internal constant FALLBACK_UPDATER_ADDRESS =\n    0x12c88f64e5E35393D38255aB42858010Cbd72eBd;\n  address internal constant MANUAL_UPDATER_ADDRESS =\n    0x9E7CaAb1924A7e5Bb4305dFd843194B5E19480D3;\n\n  function _validateBlockTimestamp(\n    uint256 lastBlockTimestamp\n  ) internal view virtual override returns (bool) {\n    if (\n      msg.sender == MAIN_UPDATER_ADDRESS ||\n      msg.sender == FALLBACK_UPDATER_ADDRESS ||\n      msg.sender == MANUAL_UPDATER_ADDRESS ||\n      msg.sender == GelatoAddress.ADDR ||\n      msg.sender == OldGelatoAddress.ADDR\n    ) {\n      // For whitelisted addresses we only require a newer block\n      return block.timestamp > lastBlockTimestamp;\n    } else {\n      // For non-whitelisted addresses we require some time to pass after the latest update\n      return block.timestamp > lastBlockTimestamp + 40 seconds;\n    }\n  }\n}\n"}],"is_verified_via_sourcify":true,"can_be_visualized_via_sol2uml":true,"evm_version":"london","language":"solidity","is_verified_via_eth_bytecode_db":true,"is_fully_verified":true,"license_type":"none","is_blueprint":false,"name":"EthereumMultiFeedAdapterWithoutRoundsV3","creation_bytecode":"0x608060405234801561001057600080fd5b506120c2806100206000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c80639037ecae116100d8578063c274583a1161008c578063f90c492411610066578063f90c492414610371578063fb2eeb3b14610378578063fc57d4df1461038b57600080fd5b8063c274583a14610311578063e8689daa14610326578063f50b2efe1461035e57600080fd5b8063b24ebfcc116100bd578063b24ebfcc146102d6578063b7a16251146102e9578063b95ed06f146102fe57600080fd5b80639037ecae146102b0578063971b9c03146102c357600080fd5b806355a547d51161013a5780637de92016116101145780637de9201614610275578063858b033d1461028857806386a8a7221461029057600080fd5b806355a547d51461022c578063612f56bb14610234578063729bfda41461024757600080fd5b806343ba8cad1161016b57806343ba8cad146101e657806344e02982146101f957806348a1371b1461020c57600080fd5b806302b9c828146101875780633ce142f5146101c1575b600080fd5b6101ae610195366004611c1d565b73ffffffffffffffffffffffffffffffffffffffff1690565b6040519081526020015b60405180910390f35b6101d46101cf366004611c1d565b61039e565b60405160ff90911681526020016101b8565b6101ae6101f4366004611c3a565b61050c565b6101ae610207366004611c3a565b61051f565b61021f61021a366004611cf5565b610532565b6040516101b89190611d94565b6101ae6105d3565b6101ae610242366004611dd8565b61072c565b61025a610255366004611c3a565b610746565b604080519384526020840192909252908201526060016101b8565b61021f610283366004611cf5565b6107f9565b6101ae610894565b6102a361029e366004611dfa565b6108e8565b6040516101b89190611e80565b6101ae6102be366004611c3a565b6109f4565b61021f6102d1366004611dfa565b610a08565b6101ae6102e4366004611dfa565b610aa3565b6102fc6102f7366004611dfa565b610aae565b005b6101ae61030c366004611c1d565b610ba3565b610319610bd2565b6040516101b89190611ed9565b610339610334366004611c1d565b610c06565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b8565b6102fc61036c366004611c3a565b610c77565b60036101d4565b61025a610386366004611c3a565b610c83565b6101ae610399366004611c1d565b610cf9565b600073ffffffffffffffffffffffffffffffffffffffff8216738bb8f32df04c8b654987daaed53d6b6091e3b774036103d957506000919050565b73ffffffffffffffffffffffffffffffffffffffff821673deb22f54738d54976c4c0fe5ce6d408e40d884990361041257506001919050565b73ffffffffffffffffffffffffffffffffffffffff82167351ce04be4b3e32572c4ec9135221d0691ba7d2020361044b57506002919050565b73ffffffffffffffffffffffffffffffffffffffff821673dd682daec5a90dd295d14da4b0bec9281017b5be0361048457506003919050565b73ffffffffffffffffffffffffffffffffffffffff8216739c5ae89c4af6aa32ce58588dbaf90d18a855b6de036104bd57506004919050565b6040517fec459bc000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831660048201526024015b60405180910390fd5b600061051782610c83565b509392505050565b600061052a82610c83565b949350505050565b6060815167ffffffffffffffff81111561054e5761054e611c53565b604051908082528060200260200182016040528015610577578160200160208202803683370190505b50905060005b82518110156105cd576105a883828151811061059b5761059b611f45565b6020026020010151610cf9565b8282815181106105ba576105ba611f45565b602090810291909101015260010161057d565b50919050565b6000806105de610d07565b905060006105eb82610e3c565b925061ffff169050600081900361062e576040517f8552ff3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561072657600061064484610ea4565b9050600080610654606887611fa3565b905060006106628236611fb6565b9050803592508265ffffffffffff166000036106aa576040517f336dc9d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b876000036106c2578265ffffffffffff169750610703565b878365ffffffffffff1614610703576040517fd9d1f46500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61070d8488611fa3565b965050505050808061071e90611fc9565b915050610631565b50505090565b600061073d6402540be40083612001565b90505b92915050565b60008181527f5e9fb4cb0eb3c2583734d3394f30bb14b241acb9b3a034f7e7ba1a62db4370f160205260408120805465ffffffffffff80821693660100000000000083049091169290917f0100000000000000000000000000000000000000000000000000000000000000900460ff16156107c757806001015491506107f1565b80546c01000000000000000000000000900472ffffffffffffffffffffffffffffffffffffff1691505b509193909250565b6060815167ffffffffffffffff81111561081557610815611c53565b60405190808252806020026020018201604052801561083e578160200160208202803683370190505b50905060005b82518110156105cd5761086f83828151811061086257610862611f45565b6020026020010151610ba3565b82828151811061088157610881611f45565b6020908102919091010152600101610844565b60006108e37f45544800000000000000000000000000000000000000000000000000000000006102427f455448000000000000000000000000000000000000000000000000000000000061051f565b905090565b6060815167ffffffffffffffff81111561090457610904611c53565b60405190808252806020026020018201604052801561095957816020015b61094660405180606001604052806000815260200160008152602001600081525090565b8152602001906001900390816109225790505b50905060005b82518110156105cd5761098a83828151811061097d5761097d611f45565b6020026020010151610746565b84848151811061099c5761099c611f45565b60200260200101516000018585815181106109b9576109b9611f45565b60200260200101516020018686815181106109d6576109d6611f45565b6020908102919091010151604001929092529190525260010161095f565b60006109ff82610c83565b50909392505050565b6060815167ffffffffffffffff811115610a2457610a24611c53565b604051908082528060200260200182016040528015610a4d578160200160208202803683370190505b50905060005b82518110156105cd57610a7e838281518110610a7157610a71611f45565b602002602001015161051f565b828281518110610a9057610a90611f45565b6020908102919091010152600101610a53565b600061074082610ed8565b600080610aba83610ee3565b91509150610ac781610c77565b65ffffffffffff811115610b0a576040517f48f06f0800000000000000000000000000000000000000000000000000000000815260048101829052602401610503565b65ffffffffffff421115610b4c576040517f5cf61159000000000000000000000000000000000000000000000000000000008152426004820152602401610503565b60005b8351811015610b9d57610b95848281518110610b6d57610b6d611f45565b6020026020010151848381518110610b8757610b87611f45565b602002602001015184610ef9565b600101610b4f565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff821681610bc68261051f565b905061052a828261072c565b60606040517f608b530700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c53573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107409190612018565b610c8081610fdf565b50565b6000806000610c9184610746565b91945092509050610ca484848484611095565b610cf2576040517f4f319ffe00000000000000000000000000000000000000000000000000000000815260048101859052602481018490526044810183905260648101829052608401610503565b9193909250565b600061074061030c83610c06565b60006602ed57011e00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe036013581161480610d6f576040517fe7764c9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003660291115610dac576040517f5796f78a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd736013560006009610de5600362ffffff8516611fa3565b610def9190611fa3565b905036610dfd600283611fa3565b1115610e35576040517fc30a7bd700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60008080610e4b602085611fa3565b905036811115610e87576040517f5796f78a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3681900335925082610e9a600286611fa3565b9250925050915091565b6000806000610eb2846110ba565b9092509050604e610ec4826020611fa3565b610ece9084612001565b61052a9190611fa3565b60006107408261110d565b60606000610ef08361124a565b91509150915091565b6000806000610f0786610746565b925092509250610f1682611470565b610f56576040518681527fd2fed36e637cb43fd01b51ddf3b0ca9d9966df112183894d5699cd9a16f85eb5906020015b60405180910390a1505050505050565b838310610f8d576040518681527ff34a55619bad9bd385340bece69770212d10a808ac72a95e6454acf05462ac1b90602001610f46565b84610fc2576040518681527fad6ebdc3909f212583bf7e8a0f31338c8c92f403f2fd37d23014fb3fd34e310290602001610f46565b610fcd868686611514565b610fd78686611642565b505050505050565b6000610fed6103e883612064565b90508042101561104857603c6110034283611fb6565b1115611044576040517fb6b0916d00000000000000000000000000000000000000000000000000000000815260048101829052426024820152604401610503565b5050565b60b46110548242611fb6565b1115611044576040517f0321d0b500000000000000000000000000000000000000000000000000000000815260048101829052426024820152604401610503565b600080821180156110b15750426110af6201a5e085611fa3565b115b95945050505050565b60008080808060206110cd604188611fa3565b6110d79190611fa3565b6110e19036611fb6565b8035935090506110f2600382611fb6565b62ffffff9390931696923563ffffffff169550919350505050565b600081516002036111645760028260018151811061112d5761112d611f45565b60200260200101518360008151811061114857611148611f45565b602002602001015161115a9190611fa3565b6107409190612064565b815160000361119f576040517f9e198af900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111a882611685565b6000600283516111b89190612064565b9050600283516111c89190612078565b6000036112285760008382815181106111e3576111e3611f45565b6020026020010151846001846111f99190611fb6565b8151811061120957611209611f45565b602002602001015161121b9190611fa3565b905061052a600282612064565b82818151811061123a5761123a611f45565b6020026020010151915050919050565b6060600080835167ffffffffffffffff81111561126957611269611c53565b604051908082528060200260200182016040528015611292578160200160208202803683370190505b5090506000845167ffffffffffffffff8111156112b1576112b1611c53565b6040519080825280602002602001820160405280156112da578160200160208202803683370190505b5090506000855167ffffffffffffffff8111156112f9576112f9611c53565b60405190808252806020026020018201604052801561132c57816020015b60608152602001906001900390816113175790505b50905060005b865181101561137f576040805160038082526080820190925290602082016060803683370190505082828151811061136c5761136c611f45565b6020908102919091010152600101611332565b50600061138a610d07565b9050600061139782610e3c565b60405190935061ffff909116915060005b828110156114585760006113bf8b898989896116cd565b909550905060008190036113ff576040517fdfb25a7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b888114611448578860000361141657809850611448565b6040517f4cbc474200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50602082016040526001016113a8565b506114638487611976565b9750505050505050915091565b600033736809b95622b2dcc53d2f3fb2301b36f6a8c5b58414806114a75750337312c88f64e5e35393d38255ab42858010cbd72ebd145b806114c5575033739e7caab1924a7e5bb4305dfd843194b5e19480d3145b806114e357503373cd6bfda4d95d5c0f3f2882dc221d792392c99714145b8061150157503373c4d1ae5e796e6d7561cdc8335f85e6b57a36e097145b1561150c5750421190565b506000919050565b60007f5e9fb4cb0eb3c2583734d3394f30bb14b241acb9b3a034f7e7ba1a62db4370f160008581526020918252604090819020815160808101835265ffffffffffff8681168083524290911694820185905272ffffffffffffffffffffffffffffffffffffff8881169483018590528811606090920182905282547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016176601000000000000909402939093176bffffffffffffffffffffffff166c010000000000000000000000009092027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919091177f010000000000000000000000000000000000000000000000000000000000000083021781559150801561163b57600182018490555b5050505050565b6040805182815260208101849052428183015290517ff36866d965ee70c8632ff558f5cf8d41ee9ca1d0d0bc7700786e57be607473909181900360600190a15050565b8051602082016020820281019150805b82811015610b9d57815b818110156116c45781518151808210156116ba578084528183525b505060200161169f565b50602001611695565b60008060008060006116de866110ba565b909250905060008060608180600d6116f7602088611fa3565b6117019089612001565b61170b9190611fa3565b9150600061171a60688d611fa3565b6117249036611fb6565b905060008361173460418f611fa3565b61173e9190611fa3565b6117489036611fb6565b90506117548482611767565b94508360208601209550813592506117a9565b604080518381526020818501810190925260009101838382377fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0019392505050565b8265ffffffffffff169a506117ca8660418f6117c59190611fa3565b611aa8565b96506117d58761039e565b60ff16995050505050505050604e866117ee9190611fa3565b955060008060005b8481101561196357602061180a858b611fa3565b6118149190611fa3565b98506118208985611b8f565b909350915060005b8d5181101561195a578d818151811061184357611843611f45565b602002602001015184036119525760008c828151811061186557611865611f45565b6020026020010151905061187e81896001901b16151590565b1580156118a75750600360ff168e838151811061189d5761189d611f45565b6020026020010151105b1561194c57838c83815181106118bf576118bf611f45565b60200260200101518f84815181106118d9576118d9611f45565b6020026020010151815181106118f1576118f1611f45565b6020026020010181815250508d828151811061190f5761190f611f45565b60200260200101805180919061192490611fc9565b9052506001881b81178d838151811061193f5761193f611f45565b6020026020010181815250505b5061195a565b600101611828565b506001016117f6565b5050508594505050509550959350505050565b60606000835167ffffffffffffffff81111561199457611994611c53565b6040519080825280602002602001820160405280156119bd578160200160208202803683370190505b509050600360005b8551811015611a9e57818582815181106119e1576119e1611f45565b60200260200101511015611a4757848181518110611a0157611a01611f45565b6020026020010151826040517f2b13aef5000000000000000000000000000000000000000000000000000000008152600401610503929190918252602082015260400190565b6000611a6b878381518110611a5e57611a5e611f45565b6020026020010151610aa3565b905080848381518110611a8057611a80611f45565b60209081029190910101525080611a9681611fc9565b9150506119c5565b5090949350505050565b60408051600080825260208083018085528690523685900380850135831a948401859052803560608501819052910135608084018190529193909260019060a0016020604051602081039080840390855afa158015611b0b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015194505073ffffffffffffffffffffffffffffffffffffffff8416611b86576040517f666b7cba00000000000000000000000000000000000000000000000000000000815260048101879052602401610503565b50505092915050565b60008080611b9d8536611fb6565b9050803592506020810135915060218410611be7576040517fc000fc4200000000000000000000000000000000000000000000000000000000815260048101859052602401610503565b8360200360080282901c9150509250929050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c8057600080fd5b600060208284031215611c2f57600080fd5b8135610e3581611bfb565b600060208284031215611c4c57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611cc957611cc9611c53565b604052919050565b600067ffffffffffffffff821115611ceb57611ceb611c53565b5060051b60200190565b60006020808385031215611d0857600080fd5b823567ffffffffffffffff811115611d1f57600080fd5b8301601f81018513611d3057600080fd5b8035611d43611d3e82611cd1565b611c82565b81815260059190911b82018301908381019087831115611d6257600080fd5b928401925b82841015611d89578335611d7a81611bfb565b82529284019290840190611d67565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611dcc57835183529284019291840191600101611db0565b50909695505050505050565b60008060408385031215611deb57600080fd5b50508035926020909101359150565b60006020808385031215611e0d57600080fd5b823567ffffffffffffffff811115611e2457600080fd5b8301601f81018513611e3557600080fd5b8035611e43611d3e82611cd1565b81815260059190911b82018301908381019087831115611e6257600080fd5b928401925b82841015611d8957833582529284019290840190611e67565b602080825282518282018190526000919060409081850190868401855b82811015611ecc5781518051855286810151878601528501518585015260609093019290850190600101611e9d565b5091979650505050505050565b600060208083528351808285015260005b81811015611f0657858101830151858201604001528201611eea565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561074057610740611f74565b8181038181111561074057610740611f74565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611ffa57611ffa611f74565b5060010190565b808202811582820484141761074057610740611f74565b60006020828403121561202a57600080fd5b8151610e3581611bfb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261207357612073612035565b500490565b60008261208757612087612035565b50069056fea2646970667358221220a5dd68747259ccb711fa61924a282721e49d5f651d17f6fe89a80c503e7140c964736f6c63430008110033","external_libraries":[],"proxy_type":null,"implementations":[],"verified_at":"2025-09-18T05:04:15.924573Z","is_verified_via_verifier_alliance":false,"compiler_version":"0.8.17+commit.8df45f5f","decoded_constructor_args":null,"sourcify_repo_url":"https://repo.sourcify.dev/1/0x0C6C73865429e1D87b7B817B95bB1f38F2136529","optimization_runs":10000,"compiler_settings":{"evmVersion":"london","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":10000},"remappings":[]},"is_verified":true,"verified_twin_address_hash":null,"optimization_enabled":true,"deployed_bytecode":"0x608060405234801561001057600080fd5b50600436106101825760003560e01c80639037ecae116100d8578063c274583a1161008c578063f90c492411610066578063f90c492414610371578063fb2eeb3b14610378578063fc57d4df1461038b57600080fd5b8063c274583a14610311578063e8689daa14610326578063f50b2efe1461035e57600080fd5b8063b24ebfcc116100bd578063b24ebfcc146102d6578063b7a16251146102e9578063b95ed06f146102fe57600080fd5b80639037ecae146102b0578063971b9c03146102c357600080fd5b806355a547d51161013a5780637de92016116101145780637de9201614610275578063858b033d1461028857806386a8a7221461029057600080fd5b806355a547d51461022c578063612f56bb14610234578063729bfda41461024757600080fd5b806343ba8cad1161016b57806343ba8cad146101e657806344e02982146101f957806348a1371b1461020c57600080fd5b806302b9c828146101875780633ce142f5146101c1575b600080fd5b6101ae610195366004611c1d565b73ffffffffffffffffffffffffffffffffffffffff1690565b6040519081526020015b60405180910390f35b6101d46101cf366004611c1d565b61039e565b60405160ff90911681526020016101b8565b6101ae6101f4366004611c3a565b61050c565b6101ae610207366004611c3a565b61051f565b61021f61021a366004611cf5565b610532565b6040516101b89190611d94565b6101ae6105d3565b6101ae610242366004611dd8565b61072c565b61025a610255366004611c3a565b610746565b604080519384526020840192909252908201526060016101b8565b61021f610283366004611cf5565b6107f9565b6101ae610894565b6102a361029e366004611dfa565b6108e8565b6040516101b89190611e80565b6101ae6102be366004611c3a565b6109f4565b61021f6102d1366004611dfa565b610a08565b6101ae6102e4366004611dfa565b610aa3565b6102fc6102f7366004611dfa565b610aae565b005b6101ae61030c366004611c1d565b610ba3565b610319610bd2565b6040516101b89190611ed9565b610339610334366004611c1d565b610c06565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b8565b6102fc61036c366004611c3a565b610c77565b60036101d4565b61025a610386366004611c3a565b610c83565b6101ae610399366004611c1d565b610cf9565b600073ffffffffffffffffffffffffffffffffffffffff8216738bb8f32df04c8b654987daaed53d6b6091e3b774036103d957506000919050565b73ffffffffffffffffffffffffffffffffffffffff821673deb22f54738d54976c4c0fe5ce6d408e40d884990361041257506001919050565b73ffffffffffffffffffffffffffffffffffffffff82167351ce04be4b3e32572c4ec9135221d0691ba7d2020361044b57506002919050565b73ffffffffffffffffffffffffffffffffffffffff821673dd682daec5a90dd295d14da4b0bec9281017b5be0361048457506003919050565b73ffffffffffffffffffffffffffffffffffffffff8216739c5ae89c4af6aa32ce58588dbaf90d18a855b6de036104bd57506004919050565b6040517fec459bc000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831660048201526024015b60405180910390fd5b600061051782610c83565b509392505050565b600061052a82610c83565b949350505050565b6060815167ffffffffffffffff81111561054e5761054e611c53565b604051908082528060200260200182016040528015610577578160200160208202803683370190505b50905060005b82518110156105cd576105a883828151811061059b5761059b611f45565b6020026020010151610cf9565b8282815181106105ba576105ba611f45565b602090810291909101015260010161057d565b50919050565b6000806105de610d07565b905060006105eb82610e3c565b925061ffff169050600081900361062e576040517f8552ff3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561072657600061064484610ea4565b9050600080610654606887611fa3565b905060006106628236611fb6565b9050803592508265ffffffffffff166000036106aa576040517f336dc9d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b876000036106c2578265ffffffffffff169750610703565b878365ffffffffffff1614610703576040517fd9d1f46500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61070d8488611fa3565b965050505050808061071e90611fc9565b915050610631565b50505090565b600061073d6402540be40083612001565b90505b92915050565b60008181527f5e9fb4cb0eb3c2583734d3394f30bb14b241acb9b3a034f7e7ba1a62db4370f160205260408120805465ffffffffffff80821693660100000000000083049091169290917f0100000000000000000000000000000000000000000000000000000000000000900460ff16156107c757806001015491506107f1565b80546c01000000000000000000000000900472ffffffffffffffffffffffffffffffffffffff1691505b509193909250565b6060815167ffffffffffffffff81111561081557610815611c53565b60405190808252806020026020018201604052801561083e578160200160208202803683370190505b50905060005b82518110156105cd5761086f83828151811061086257610862611f45565b6020026020010151610ba3565b82828151811061088157610881611f45565b6020908102919091010152600101610844565b60006108e37f45544800000000000000000000000000000000000000000000000000000000006102427f455448000000000000000000000000000000000000000000000000000000000061051f565b905090565b6060815167ffffffffffffffff81111561090457610904611c53565b60405190808252806020026020018201604052801561095957816020015b61094660405180606001604052806000815260200160008152602001600081525090565b8152602001906001900390816109225790505b50905060005b82518110156105cd5761098a83828151811061097d5761097d611f45565b6020026020010151610746565b84848151811061099c5761099c611f45565b60200260200101516000018585815181106109b9576109b9611f45565b60200260200101516020018686815181106109d6576109d6611f45565b6020908102919091010151604001929092529190525260010161095f565b60006109ff82610c83565b50909392505050565b6060815167ffffffffffffffff811115610a2457610a24611c53565b604051908082528060200260200182016040528015610a4d578160200160208202803683370190505b50905060005b82518110156105cd57610a7e838281518110610a7157610a71611f45565b602002602001015161051f565b828281518110610a9057610a90611f45565b6020908102919091010152600101610a53565b600061074082610ed8565b600080610aba83610ee3565b91509150610ac781610c77565b65ffffffffffff811115610b0a576040517f48f06f0800000000000000000000000000000000000000000000000000000000815260048101829052602401610503565b65ffffffffffff421115610b4c576040517f5cf61159000000000000000000000000000000000000000000000000000000008152426004820152602401610503565b60005b8351811015610b9d57610b95848281518110610b6d57610b6d611f45565b6020026020010151848381518110610b8757610b87611f45565b602002602001015184610ef9565b600101610b4f565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff821681610bc68261051f565b905061052a828261072c565b60606040517f608b530700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c53573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107409190612018565b610c8081610fdf565b50565b6000806000610c9184610746565b91945092509050610ca484848484611095565b610cf2576040517f4f319ffe00000000000000000000000000000000000000000000000000000000815260048101859052602481018490526044810183905260648101829052608401610503565b9193909250565b600061074061030c83610c06565b60006602ed57011e00007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe036013581161480610d6f576040517fe7764c9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003660291115610dac576040517f5796f78a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd736013560006009610de5600362ffffff8516611fa3565b610def9190611fa3565b905036610dfd600283611fa3565b1115610e35576040517fc30a7bd700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60008080610e4b602085611fa3565b905036811115610e87576040517f5796f78a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3681900335925082610e9a600286611fa3565b9250925050915091565b6000806000610eb2846110ba565b9092509050604e610ec4826020611fa3565b610ece9084612001565b61052a9190611fa3565b60006107408261110d565b60606000610ef08361124a565b91509150915091565b6000806000610f0786610746565b925092509250610f1682611470565b610f56576040518681527fd2fed36e637cb43fd01b51ddf3b0ca9d9966df112183894d5699cd9a16f85eb5906020015b60405180910390a1505050505050565b838310610f8d576040518681527ff34a55619bad9bd385340bece69770212d10a808ac72a95e6454acf05462ac1b90602001610f46565b84610fc2576040518681527fad6ebdc3909f212583bf7e8a0f31338c8c92f403f2fd37d23014fb3fd34e310290602001610f46565b610fcd868686611514565b610fd78686611642565b505050505050565b6000610fed6103e883612064565b90508042101561104857603c6110034283611fb6565b1115611044576040517fb6b0916d00000000000000000000000000000000000000000000000000000000815260048101829052426024820152604401610503565b5050565b60b46110548242611fb6565b1115611044576040517f0321d0b500000000000000000000000000000000000000000000000000000000815260048101829052426024820152604401610503565b600080821180156110b15750426110af6201a5e085611fa3565b115b95945050505050565b60008080808060206110cd604188611fa3565b6110d79190611fa3565b6110e19036611fb6565b8035935090506110f2600382611fb6565b62ffffff9390931696923563ffffffff169550919350505050565b600081516002036111645760028260018151811061112d5761112d611f45565b60200260200101518360008151811061114857611148611f45565b602002602001015161115a9190611fa3565b6107409190612064565b815160000361119f576040517f9e198af900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111a882611685565b6000600283516111b89190612064565b9050600283516111c89190612078565b6000036112285760008382815181106111e3576111e3611f45565b6020026020010151846001846111f99190611fb6565b8151811061120957611209611f45565b602002602001015161121b9190611fa3565b905061052a600282612064565b82818151811061123a5761123a611f45565b6020026020010151915050919050565b6060600080835167ffffffffffffffff81111561126957611269611c53565b604051908082528060200260200182016040528015611292578160200160208202803683370190505b5090506000845167ffffffffffffffff8111156112b1576112b1611c53565b6040519080825280602002602001820160405280156112da578160200160208202803683370190505b5090506000855167ffffffffffffffff8111156112f9576112f9611c53565b60405190808252806020026020018201604052801561132c57816020015b60608152602001906001900390816113175790505b50905060005b865181101561137f576040805160038082526080820190925290602082016060803683370190505082828151811061136c5761136c611f45565b6020908102919091010152600101611332565b50600061138a610d07565b9050600061139782610e3c565b60405190935061ffff909116915060005b828110156114585760006113bf8b898989896116cd565b909550905060008190036113ff576040517fdfb25a7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b888114611448578860000361141657809850611448565b6040517f4cbc474200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50602082016040526001016113a8565b506114638487611976565b9750505050505050915091565b600033736809b95622b2dcc53d2f3fb2301b36f6a8c5b58414806114a75750337312c88f64e5e35393d38255ab42858010cbd72ebd145b806114c5575033739e7caab1924a7e5bb4305dfd843194b5e19480d3145b806114e357503373cd6bfda4d95d5c0f3f2882dc221d792392c99714145b8061150157503373c4d1ae5e796e6d7561cdc8335f85e6b57a36e097145b1561150c5750421190565b506000919050565b60007f5e9fb4cb0eb3c2583734d3394f30bb14b241acb9b3a034f7e7ba1a62db4370f160008581526020918252604090819020815160808101835265ffffffffffff8681168083524290911694820185905272ffffffffffffffffffffffffffffffffffffff8881169483018590528811606090920182905282547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016176601000000000000909402939093176bffffffffffffffffffffffff166c010000000000000000000000009092027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919091177f010000000000000000000000000000000000000000000000000000000000000083021781559150801561163b57600182018490555b5050505050565b6040805182815260208101849052428183015290517ff36866d965ee70c8632ff558f5cf8d41ee9ca1d0d0bc7700786e57be607473909181900360600190a15050565b8051602082016020820281019150805b82811015610b9d57815b818110156116c45781518151808210156116ba578084528183525b505060200161169f565b50602001611695565b60008060008060006116de866110ba565b909250905060008060608180600d6116f7602088611fa3565b6117019089612001565b61170b9190611fa3565b9150600061171a60688d611fa3565b6117249036611fb6565b905060008361173460418f611fa3565b61173e9190611fa3565b6117489036611fb6565b90506117548482611767565b94508360208601209550813592506117a9565b604080518381526020818501810190925260009101838382377fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0019392505050565b8265ffffffffffff169a506117ca8660418f6117c59190611fa3565b611aa8565b96506117d58761039e565b60ff16995050505050505050604e866117ee9190611fa3565b955060008060005b8481101561196357602061180a858b611fa3565b6118149190611fa3565b98506118208985611b8f565b909350915060005b8d5181101561195a578d818151811061184357611843611f45565b602002602001015184036119525760008c828151811061186557611865611f45565b6020026020010151905061187e81896001901b16151590565b1580156118a75750600360ff168e838151811061189d5761189d611f45565b6020026020010151105b1561194c57838c83815181106118bf576118bf611f45565b60200260200101518f84815181106118d9576118d9611f45565b6020026020010151815181106118f1576118f1611f45565b6020026020010181815250508d828151811061190f5761190f611f45565b60200260200101805180919061192490611fc9565b9052506001881b81178d838151811061193f5761193f611f45565b6020026020010181815250505b5061195a565b600101611828565b506001016117f6565b5050508594505050509550959350505050565b60606000835167ffffffffffffffff81111561199457611994611c53565b6040519080825280602002602001820160405280156119bd578160200160208202803683370190505b509050600360005b8551811015611a9e57818582815181106119e1576119e1611f45565b60200260200101511015611a4757848181518110611a0157611a01611f45565b6020026020010151826040517f2b13aef5000000000000000000000000000000000000000000000000000000008152600401610503929190918252602082015260400190565b6000611a6b878381518110611a5e57611a5e611f45565b6020026020010151610aa3565b905080848381518110611a8057611a80611f45565b60209081029190910101525080611a9681611fc9565b9150506119c5565b5090949350505050565b60408051600080825260208083018085528690523685900380850135831a948401859052803560608501819052910135608084018190529193909260019060a0016020604051602081039080840390855afa158015611b0b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015194505073ffffffffffffffffffffffffffffffffffffffff8416611b86576040517f666b7cba00000000000000000000000000000000000000000000000000000000815260048101879052602401610503565b50505092915050565b60008080611b9d8536611fb6565b9050803592506020810135915060218410611be7576040517fc000fc4200000000000000000000000000000000000000000000000000000000815260048101859052602401610503565b8360200360080282901c9150509250929050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c8057600080fd5b600060208284031215611c2f57600080fd5b8135610e3581611bfb565b600060208284031215611c4c57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611cc957611cc9611c53565b604052919050565b600067ffffffffffffffff821115611ceb57611ceb611c53565b5060051b60200190565b60006020808385031215611d0857600080fd5b823567ffffffffffffffff811115611d1f57600080fd5b8301601f81018513611d3057600080fd5b8035611d43611d3e82611cd1565b611c82565b81815260059190911b82018301908381019087831115611d6257600080fd5b928401925b82841015611d89578335611d7a81611bfb565b82529284019290840190611d67565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611dcc57835183529284019291840191600101611db0565b50909695505050505050565b60008060408385031215611deb57600080fd5b50508035926020909101359150565b60006020808385031215611e0d57600080fd5b823567ffffffffffffffff811115611e2457600080fd5b8301601f81018513611e3557600080fd5b8035611e43611d3e82611cd1565b81815260059190911b82018301908381019087831115611e6257600080fd5b928401925b82841015611d8957833582529284019290840190611e67565b602080825282518282018190526000919060409081850190868401855b82811015611ecc5781518051855286810151878601528501518585015260609093019290850190600101611e9d565b5091979650505050505050565b600060208083528351808285015260005b81811015611f0657858101830151858201604001528201611eea565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561074057610740611f74565b8181038181111561074057610740611f74565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611ffa57611ffa611f74565b5060010190565b808202811582820484141761074057610740611f74565b60006020828403121561202a57600080fd5b8151610e3581611bfb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261207357612073612035565b500490565b60008261208757612087612035565b50069056fea2646970667358221220a5dd68747259ccb711fa61924a282721e49d5f651d17f6fe89a80c503e7140c964736f6c63430008110033","source_code":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.17;\n\nimport {OldGelatoAddress, GelatoAddress} from \"../__addresses/Addresses.sol\";\nimport {EthereumMultiFeedAdapterWithoutRoundsV2} from \"./EthereumMultiFeedAdapterWithoutRoundsV2.sol\";\n\ncontract EthereumMultiFeedAdapterWithoutRoundsV3 is EthereumMultiFeedAdapterWithoutRoundsV2 {\n  function _validateBlockTimestamp(uint256 lastBlockTimestamp) internal view virtual override returns (bool) {\n    if (\n      msg.sender == MAIN_UPDATER_ADDRESS ||\n      msg.sender == FALLBACK_UPDATER_ADDRESS ||\n      msg.sender == MANUAL_UPDATER_ADDRESS ||\n      msg.sender == GelatoAddress.ADDR ||\n      msg.sender == OldGelatoAddress.ADDR\n    ) {\n      return block.timestamp > lastBlockTimestamp;\n    }\n    return false;\n  }\n}\n","creation_status":"success","file_path":"contracts/ethereumMultiFeed/EthereumMultiFeedAdapterWithoutRoundsV3.sol"}