Solidity importing problem on VSCode (WSL2) and Brownie
Brownie stores library contract data (Chainlink, OpenZeppelin, other dependencies) inside of Users/$yourUsername/.brownie/packages
. That's on Mac at least. If you're on Windows, look for a .brownie
directory.
To point the Ethereum VS Code extension to these files, you can add a Solidity remapping. This can be done by adding the following:
"solidity.remappings": [
"@openzeppelin/=/Users/rafi/.brownie/packages/OpenZeppelin/[email protected]"
]
to your settings.json
file in VS Code. After restarting VS Code, the warning/error should disappear!
Check out the readme for the Ethereum VS Code extension for more info.