1

I can't import openzeppelin's ERC721 contract. I have installed it using brownie pm install and also added it to brownie-config.yaml
I appreciate any help

Test.sol

brownie-config.sol

  • hi, perhaps might be of interest https://stackoverflow.com/questions/72013828/source-openzeppelin-contracts-token-erc721-erc721-sol-not-found-file-import – jspcal May 07 '22 at 02:17

1 Answers1

1

It seems this is just the solidity extension on vs code. It can't read the remapping so it throws an error when trying to import. However, when I compile the contract using bronwie compile it works.

  • I am experiencing the same thing. I downgraded the Solidity extension from 0.0.139 to 0.0.135 and the issue disappeared. It appears to be an extension issue. Did you resolved this problem? – user2120188 Jun 10 '22 at 08:22
  • Follow up to my earlier comment above: I discovered the issue. I upgraded to the latest version of Solidity extension (0.0.139) and added in remapping (workspace settings.json) the FULL filesystem path to the Openzeppelin contracts directory. This resolved the issue in Solidity. But I do not like this pattern. I do not like to expose my user/home directory on my machine. – user2120188 Jun 10 '22 at 08:43