Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using py-solc #1036

Closed
offlinemark opened this issue Aug 8, 2018 · 5 comments
Closed

Consider using py-solc #1036

offlinemark opened this issue Aug 8, 2018 · 5 comments

Comments

@offlinemark
Copy link
Contributor

offlinemark commented Aug 8, 2018

It's been brought up for discussion that maybe we should use py-solc, instead of our own wrapper. Let's discuss this here.

https://github.com/ethereum/py-solc

#110 (comment)

@offlinemark
Copy link
Contributor Author

So it seems py-solc still requires an out of band installation of the solc binary.

@defunctio
Copy link
Contributor

defunctio commented Aug 8, 2018

Yeah it is also just a wrapper but they do provide this though;

>>> from solc import install_solc
>>> install_solc('v0.4.24')

with support for both osx/linux

@defunctio defunctio added the idea label Aug 13, 2018
@defunctio defunctio modified the milestone: 0.2.2 Aug 14, 2018
@ESultanik
Copy link
Contributor

py-solc has a couple issues related to its install_solc function:

  1. Its support for installation of new versions of solc lags behind. Currently, the latest version it supports is v0.4.25.
  2. On macOS, py-solc installs solc from source. This is a problem because solc versions 0.4.* no longer build on macOS from source, and the developers have decided not to fix that issue.

Another option—which would regrettably add a dependency on npm—would be to dynamically install the Emscripten-generated solc-js version specific to the code being analyzed. This can be done locally per Manticore run without requiring a globally installed solc binary. That's what Truffle does. Chances are if someone is running Manticore, they already have Truffle (and thereby npm and solc-js) installed.

@ESultanik
Copy link
Contributor

Another option would be to make Manticore Truffle-aware. See Issue #768. The idea would be for Manticore to auto-detect whether a project it is analyzing is a Truffle project. If so, run truffle compile and then read the compiled contracts directly from Truffle. That would remove the dependency on solc completely for Truffle projects (of which the vast majority are nowadays).

@ehennenfent
Copy link
Contributor

#1406

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants