Reputation: 1384
How to generate the standard-JSON solc Input file with truffle?
I searched all internet (of course Truffle docs), found nothing.
I need this standard-JSON input file for contract source verification (do not want to flatten files).
Upvotes: 0
Views: 2797
Reputation: 11
Thanks for this plugin. I used truffle-plugin-verify to get the json, which is a bit more cumbersome, but works, too. Specify the --debug option when calling "truffle verify" and it will output the POST parameters that it is sending to etherscan, including the JSON you are looking for. Run it through php stripcslashes($str) to get the unescaped json that can be uploaded to etherscan directly.
Remark: truffle-plugin-verify should do the verification process itself, but it always failed. On the other hand, uploading the JSON to etherscan worked fine.
Upvotes: 0
Reputation: 1384
I wrote a Truffle plugin for this porpuse:
https://github.com/mhrsalehi/truffle-plugin-stdjsonin
Upvotes: 1