I am trying to import files from a relative path outside of my Truffle-project folder:
import '../../../common/solidity/contracts/token/ERC20/BurnableToken.sol';
import '../../../common/solidity/contracts/token/ERC20/MintableToken.sol';
But when I compile with solc.exe
, I get the error File outside of allowed directories
.
BTW, I have no idea how come solc.exe
has any knowledge of my Truffle-project folder.
In any case, checking the docs, I found the following related information:
Note that solc only allows you to include files from certain directories: They have to be in the directory (or subdirectory) of one of the explicitly specified source files or in the directory (or subdirectory) of a remapping target. If you want to allow direct absolute includes, just add the remapping =/.
But I fail to understand the meaning of just add the remapping =/
.
Can anybody please shed some light on this statement?
How exactly can I import those two files correctly?
Thank you!!!
contracts
folder, all tests undertest
folder, etc.solc
from a path which is a parent of all the source files in your project.