0

I do not know what the issue is as I am on version 0.6.6 Solidity both in my compiler and in my code, and I am using all of the same versions of the packages that Patrick used. I find it even more peculiar that my code compiles and downloads correctly. Is this just something that I should ignore and move on from?

Error: Source "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol" not found: File import callback not supported So this is an error message that everyone gets when they follow the Lesson 6 tutorial, however, mine did not go away after I added my remapping to brownie-config.yaml

    dependencies:
  - smartcontractkit/chainlink-brownie-contracts@1.1.1
compiler:
  solc:
    remappings:
      - "@chainlink=smartcontractkit/chainlink-brownie-contracts@1.1.1"

1 Answer 1

1

Linting issues If you see something along the lines of:

ParserError: Source "OpenZeppelin/openzeppelin-contracts@3.4.0/contracts/access/Ownable.sol" not found: File not found.
import "@openzeppelin/contracts/access/Ownable.sol";

In your vscode, these and be safely ignored. However you can also add to your settings to ignore these.

  1. Create a .vscode folder at the root of your project.
  2. Create a file called settings.json Add the following code:
{
  "solidity.remappings": [
    "@chainlink/=/Users/patrick/.brownie/packages/smartcontractkit/chainlink-brownie-contracts@0.2.2",
    "@openzeppelin/=/Users/patrick/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.3.2"
  ]
}

Or whatever version your @chainlink and @openzeppelin contracts need. For example: enter image description here

For more information see here

1
  • Thank you Patrick, this seemed to work for me. I had it in my .yaml file only. Mar 19 at 3:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.