py-solc icon indicating copy to clipboard operation
py-solc copied to clipboard

Add support for solc 0.5.0

Open dmuhs opened this issue 5 years ago • 3 comments

  • py-solc Version: 3.2.0
  • solc Version: 0.5.0
  • Python Version: 3.6.7
  • OS: linux

To keep up to date with the latest changes, it would be nice to have support for the latest solc version. On my machine that'd be 0.5.0+commit.1d4f565a.Linux.g++ - installed from the Ethereum PPA: deb http://ppa.launchpad.net/ethereum/ethereum/ubuntu bionic main

Background: Mythril is using py-solc as a wrapper to provide various solc versions as the contracts to scan require it. Having an up-to-date wrapper greatly helps us to keep our code clean from hacky workarounds. :slightly_smiling_face:

What was wrong?

Traceback (most recent call last):
  File "/home/spoons/diligence/mythril-classic/myth", line 9, in <module>
    mythril.interfaces.cli.main()
  File "/home/spoons/diligence/mythril-classic/mythril/interfaces/cli.py", line 282, in main
    enable_online_lookup=args.query_signature,
  File "/home/spoons/diligence/mythril-classic/mythril/mythril.py", line 120, in __init__
    self.solc_binary = self._init_solc_binary(solv)
  File "/home/spoons/diligence/mythril-classic/mythril/mythril.py", line 245, in _init_solc_binary
    solc.install_solc("v" + version)
  File "/home/spoons/diligence/mythril-classic/.tox/py36/lib/python3.6/site-packages/solc/install.py", line 508, in install_solc
    ', '.join(sorted(INSTALL_FUNCTIONS[platform].keys())),
ValueError: Installation of solidity==v0.5.0 is not supported.  Must be one of v0.4.1, v0.4.11, v0.4.12, v0.4.13, v0.4.14, v0.4.15, v0.4.16, v0.4.17, v0.4.18, v0.4.19, v0.4.2, v0.4.20, v0.4.21, v0.4.22, v0.4.23, v0.4.24, v0.4.25, v0.4.6, v0.4.7, v0.4.8, v0.4.9

Cute Animal Picture

image

dmuhs avatar Nov 26 '18 14:11 dmuhs

I think it would be fair to update README and specify which versions are supported by this library, information about >=0.4.2 seems to be very outdated

jwitos avatar Jan 09 '20 05:01 jwitos

Per https://github.com/ethereum/py-solc/pull/65#issuecomment-448729689, this library has been deprecated. I am maintaining a fork, py-solc-x, that supports newer versions of the solc compiler.

iamdefinitelyahuman avatar Jan 09 '20 10:01 iamdefinitelyahuman

@iamdefinitelyahuman thank you for the update!

jwitos avatar Jan 09 '20 13:01 jwitos