MaastrichtU-IDS / DecentralizedHealthcareBackend

Other
0 stars 2 forks source link

Could not find ERC721 solidity file #60

Open klifish opened 5 months ago

klifish commented 5 months ago

At present, the smart contracts used in LUCE are compiled locally and then the outputs of the compilation are copied into docker images, leading to a file-not-found-error: FileNotFoundError: [Errno 2] No such file or directory: '/Users/xxxxxxx/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.0/contracts/token/ERC721/ERC721.sol'

klifish commented 5 months ago

To address this issue, two potential solutions come to mind:

  1. Compiling smart contracts in such a manner that the compilation output is self-contained and does not reference any external or local paths.
  2. Utilizing online compilation, which would require ensuring the compatibility between the Docker image and the Solidity compiler.
vemonet commented 5 months ago

I already pushed the fix to master: https://github.com/MaastrichtU-IDS/DecentralizedHealthcareBackend/commit/26b32bebaa8bbbf0eb455e61614e8525235f0144

I just installed the missing package in the Dockerfile

RUN brownie pm install OpenZeppelin/openzeppelin-contracts@4.8.0