Lesson 4: can't find AggregatorV3Interface.sol #6444
Replies: 10 comments 1 reply
-
i find it in v0.7 and change my solidity version, then i successfully run the contract, but i still want to find AggregatorV3Interface.sol |
Beta Was this translation helpful? Give feedback.
-
try import with this @chainlink/blob/develop/contracts/src/v0.7/interfaces/AggregatorV3Interface.sol the contract is here. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
I followed Patrick's example in here: https://github.com/PatrickAlphaC/fund-me-fcc/blob/main/PriceConverter.sol If you want to check the inner code in AggregatorV3Interface.sol, you can go directly to the Chainlink repo: Hope this helps! 🦾 |
Beta Was this translation helpful? Give feedback.
-
Hey guys the updated link now is the following:
as mentioned by @jujuvideogirlai This works with solidity version Link to the contract: https://github.com/smartcontractkit/chainlink/tree/develop/contracts/src/v0.8/shared/interfaces |
Beta Was this translation helpful? Give feedback.
-
The whole problem is with your chainlink package version, just use same as it is in course repo (check |
Beta Was this translation helpful? Give feedback.
-
I run "yarn add @chainlink/contracts@v0.8" and AggregatorV3Interface.sol came up. |
Beta Was this translation helpful? Give feedback.
-
@Bellatlich Its here |
Beta Was this translation helpful? Give feedback.
-
The correct import path for AggregatorV3Interface.sol in Chainlink v0.8+ is: import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; If you can't find it in GitHub, ensure you have installed the correct Chainlink dependency: npm install @chainlink/contracts You can also check older versions on GitHub: https://github.com/smartcontractkit/chainlink. |
Beta Was this translation helpful? Give feedback.
-
If you're facing same issue right now, it's probably because foundry cannot locate the chainlink contract interface (AggregatorV3Interface.sol) at the path specified in your solidity import statement and foundry.toml remappings. The easy solution is: go to your
Ensure your Solidity contract files (FundMe.sol, PriceConverter.sol, etc.) use the standard import path for Chainlink contracts: import {AggregatorV3Interface} from "@chainlink-brownie-contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol"; Open your terminal, run |
Beta Was this translation helpful? Give feedback.
-
I had the same error where the AggregatorV3Interface.sol file was not being recognized. What I did was the following: First, I ran this command to install the Chainlink contracts repository:
This installed the contracts inside the After that, I created a file called
This tells Foundry how to find the Chainlink contract files when I use imports in my code. Finally, in my Solidity contract, I imported the interface using: import "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol"; |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In docs.chain.link i find the example data feed contract, but in chainlink github i can't find the ABI contract. i find its path written in contract didnt change but in that path i cant find it(@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol)
so what can i import?
Beta Was this translation helpful? Give feedback.
All reactions