2
votes

So, I'm trying to compile in truffle some open zeppelin ERC20 contracts, but I get the following error:

Error: Error: Could not find import from any sources; imported from C:/Users/Angel/Documents/blockchain course/ethereum game/solidity/contracts/GameToken.sol at Object.compile (C:\Users\Angel\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\workflow-compile\legacy\index.js:72:1)

Token file:enter image description here

Migration file: enter image description here

Any ideas? Thanks!

2

2 Answers

1
votes

Regarding the documentation, the correct imports are

import "@openzeppelin/contracts/token/ERC721/ERC721Full.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721Mintable.sol";
0
votes

For those interested, asked the question on the openzeppelin forums and found a solution:

https://forum.openzeppelin.com/t/could-not-find-import-from-any-sources-error/2656/5