Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Add support for standard-json. #200

Open
MicahZoltu opened this issue Oct 3, 2017 · 6 comments
Open

Add support for standard-json. #200

MicahZoltu opened this issue Oct 3, 2017 · 6 comments

Comments

@MicahZoltu
Copy link

MicahZoltu commented Oct 3, 2017

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).

@joeykrug
Copy link

joeykrug commented Oct 3, 2017

Yes please +1

@luongnt95
Copy link
Contributor

luongnt95 commented Oct 7, 2017

Thanks @MicahZoltu Will consider this

@beaugunderson
Copy link
Contributor

@luongnt95 looks like support was added here--does it work? :)

@luongnt95
Copy link
Contributor

luongnt95 commented Dec 1, 2017

@beaugunderson it's not fully supported. Could you help me test this feature? Just report any problems you have with this feature. Thanks

@joeykrug
Copy link

joeykrug commented Jan 1, 2018

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

contracts.json.zip

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

@luongnt95
Copy link
Contributor

luongnt95 commented Jan 3, 2018

@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>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants