I'm trying to understand how to use solidity's JSON input-output API. Here's my json file;
{
"language": "Solidity",
"sources": {
"StandardToken.sol": {
"urls": [
"file:///home/myuser/myproject/contracts/vendor/StandardToken.sol"
]
}
}
}
My best guess as to the "correct" command is;
cat input.json | solc --allow-paths /home/myuser/myproject/contracts --standard-json
I've tried lots of different relative paths, ending with or without a trailing slash, running the command in different directories, etc. But no matter what combination I try, I get back a json object with this error message;
"Cannot import url (\"file:///home/myuser/myproject/contracts/vendor/StandardToken.sol\"): File import callback not supported"
I was getting this on solc
version 0.4.24, but I upgraded to 0.5.1+commit.c8a2cb62.Linux.g++
and get the same issue.
Strangely, I get a similar message with solcjs
;
$ cat input.json | solcjs --standard-json
Cannot import url (\"file:///home/myuser/myproject/contracts/vendor/StandardToken.sol\"): File import callback not supported
There seem to be a lot of github issues mentioning these error messages, but I can't make use of any of them.