oyente
oyente copied to clipboard
Add support for standard-json.
In a complex project like Augur, the contracts don't compile by just passing them to solc
because the system is made up of dozens of contracts that have intertwining references and a non-trivial build system. "Standard JSON" seems to be the recommended mechanism for defining complex builds for solc, so it would be nice if Oyente supported building from a "Standard JSON" file as well so large projects can leverage Oyente (arguably, large projects need Oyente more than small projects).
Yes please +1
Thanks @MicahZoltu Will consider this
@luongnt95 looks like support was added here--does it work? :)
@beaugunderson it's not fully supported. Could you help me test this feature? Just report any problems you have with this feature. Thanks
Below is a standard JSON output file for solidity, trying it with:
oyente/oyente.py --standard-json --source contracts.json
Traceback (most recent call last):
File "oyente/oyente.py", line 209, in <module>
main()
File "oyente/oyente.py", line 202, in main
exit_code = analyze_solidity(input_type='standard_json')
File "oyente/oyente.py", line 105, in analyze_solidity
helper = InputHelper(InputHelper.STANDARD_JSON, source=args.source, allow_paths=args.allow_paths)
File "/home/ubuntu/workspace/oyente/input_helper.py", line 44, in __init__
raise Exception("'%s' attribute can't be None" % attr)
Exception: 'allow_paths' attribute can't be None
It'd be simplest if we could use the solidity json output as then we'd never run into path or build issues w/ oyente.
From above, perhaps it takes the solidity json input instead? I tried that and got the same error though
@joeykrug Currently, Oyente only gets json input as the input. In order to run json input with Oyente, you also have to use --alow-paths parameter as in solc
oyente/oyente.py --standard-json --source input_json.json --allow-paths <absolute paht>