diff --git a/public/samples/DataFeeds/MVR/MVRDataConsumer.sol b/public/samples/DataFeeds/MVR/MVRDataConsumer.sol index 9f817173e48..3dd154f82ff 100644 --- a/public/samples/DataFeeds/MVR/MVRDataConsumer.sol +++ b/public/samples/DataFeeds/MVR/MVRDataConsumer.sol @@ -1,27 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -// NOTE: The required interfaces will soon be available in the Chainlink package for you to import. - -interface IBundleAggregatorProxy { - /** - * @notice Returns the latest bundle data - * @return bundle The latest bundle as raw bytes - */ - function latestBundle() external view returns (bytes memory); - - /** - * @notice Returns the timestamp of the latest bundle - * @return timestamp The timestamp of the latest bundle - */ - function latestBundleTimestamp() external view returns (uint256); - - /** - * @notice Returns the decimals for each field in the bundle - * @return decimalsArray Array of decimals for each value in the bundle - */ - function bundleDecimals() external view returns (uint8[] memory); -} +import {IBundleAggregatorProxy} from "@chainlink/contracts/src/v0.8/data-feeds/interfaces/IBundleAggregatorProxy.sol"; /** * @notice This struct defines the exact data structure of the MVR feed diff --git a/src/content/data-feeds/mvr-feeds/guides/evm-solidity.mdx b/src/content/data-feeds/mvr-feeds/guides/evm-solidity.mdx index 6a5f39b6ea5..44ef55b73ff 100644 --- a/src/content/data-feeds/mvr-feeds/guides/evm-solidity.mdx +++ b/src/content/data-feeds/mvr-feeds/guides/evm-solidity.mdx @@ -62,25 +62,21 @@ struct Data { Your consumer contract must replicate this structure in the **exact same order** and with the same data types to decode the feed data correctly. -### 2. Set Up the BundleAggregatorProxy +### 2. Import the IBundleAggregatorProxy Interface -Your contract will need a reference to the [`IBundleAggregatorProxy`](/data-feeds/mvr-feeds/api-reference#ibundleaggregatorproxy) interface so it can: +Your contract will need to interact with the MVR feed's proxy contract. The [`IBundleAggregatorProxy`](/data-feeds/mvr-feeds/api-reference#ibundleaggregatorproxy) interface provides the necessary functions: -- Retrieve the raw bytes via [`latestBundle()`](/data-feeds/mvr-feeds/api-reference#latestbundle). -- Retrieve decimals via [`bundleDecimals()`](/data-feeds/mvr-feeds/api-reference#bundledecimals) if the feed includes numeric fields. -- Check the timestamp of the last update via [`latestBundleTimestamp()`](/data-feeds/mvr-feeds/api-reference#latestbundletimestamp). +- [`latestBundle()`](/data-feeds/mvr-feeds/api-reference#latestbundle): Retrieves the raw data bundle. +- [`bundleDecimals()`](/data-feeds/mvr-feeds/api-reference#bundledecimals): Retrieves the decimal places for numeric fields. +- [`latestBundleTimestamp()`](/data-feeds/mvr-feeds/api-reference#latestbundletimestamp): Retrieves the timestamp of the last update. -```solidity -interface IBundleAggregatorProxy { - function latestBundle() external view returns (bytes memory); - function bundleDecimals() external view returns (uint8[] memory); - function latestBundleTimestamp() external view returns (uint256); +Import it directly from the `@chainlink/contracts` library: - // Additional inherited functions omitted for brevity -} +```solidity +import {IBundleAggregatorProxy} from "@chainlink/contracts/src/v0.8/data-feeds/interfaces/IBundleAggregatorProxy.sol"; ``` -You will set the correct proxy address in your consumer contract. +You will then use this interface to create an instance of the proxy in your consumer contract. ### 3. Validate Data Staleness