smartcontractkit / chainlink-brownie-contracts

A repository for automatically using the latest chainlink repo from the core chainlink repo.
251 stars 58 forks source link

ParserError: Source "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol" not found: File not found. Searched the following locations: "". #20

Open ujwanviera opened 1 year ago

ujwanviera commented 1 year ago

I am taking @PatrickAlphaC tutorial but I am stack at one point. Brownie Fund Me course. I tried to compile it but it does not work. here are my file (as the one provided by @PatrickAlphaC in the course repo). Error: image

brownie-config.yaml: image

FundMe.sol (a part of it as I copied it from the course repo and made no modifications):

image

Any idea of why I am having this error? I have been browsing on google trying to figure it out but with no success. In my attempts I created a setting.json file as in some posts some one suggested that it works with it but for me the error kept coming up setting.json: image

Thank you.

Tatendaz commented 1 year ago

Hi @ujwanviera,

I faced a similar issue and I ended up just using the same version as in the videos provided and that solved it. For example in your contract use pragma solidity 0.6.6; And then import version 0.6 of the aggregatorV3Interface.sol

import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";

in you brownie-config/yaml file use 1.1.1

dependencies:
  # - <organization/repo>@version>
  - smartcontractkit/chainlink-brownie-contracts@1.1.1
compiler:
  solc:
    remappings:
      - '@chainlink=smartcontractkit/chainlink-brownie-contracts@1.1.1' 

If you still facing an issue let me know

DiMiTriFrog commented 1 year ago

Hi @ujwanviera,

I faced a similar issue and I ended up just using the same version as in the videos provided and that solved it. For example in your contract use pragma solidity 0.6.6; And then import version 0.6 of the aggregatorV3Interface.sol

import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";

in you brownie-config/yaml file use 1.1.1

dependencies:
  # - <organization/repo>@version>
  - smartcontractkit/chainlink-brownie-contracts@1.1.1
compiler:
  solc:
    remappings:
      - '@chainlink=smartcontractkit/chainlink-brownie-contracts@1.1.1' 

If you still facing an issue let me know

But isn't a solution for DEC 2022.. I mean that we cant continue using old versions for fixing..

practicalPanda7325 commented 4 months ago

Just use file path "@chainlink/contracts/src/v0.8/factories/interfaces/AggregatorV3Interface.sol" instead of the one mentioned in Patrick's video