Fails for contracts on solc 0.4.23
elenadimitrova opened this issue · comments
Fails for contracts on solidity ^0.4.23
with the following error:
Error: Expected identifier, got 'LParen'
constructor(address _token, address _colonyMultiSig) public
^
lib/dappsys/auth.sol:31:16: Error: Expected identifier, got 'LParen'
constructor() public {
^
Traceback (most recent call last):
File "/usr/local/bin/solidity_flattener", line 4, in <module>
flattener.core.main()
File "/usr/local/lib/python3.6/site-packages/flattener/core.py", line 97, in main
solc_proc.check_returncode()
File "/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 369, in check_returncode
self.stderr)
subprocess.CalledProcessError: Command '['solc', 'lib/dappsys/auth.sol', '--ast', 'contracts/Vesting.sol']' returned non-zero exit status 1.
@elenadimitrova for me it was failing because I was using solc installed with node. I installed solc version 0.4.24 via Homebrew and it fixed the issue you mentioned for me. solidity-flattener mentions a related point in the README. Hopefully this helps you.
Thanks @aquabu
We ended up rolling our own flattener https://github.com/JoinColony/solidity-steamroller
I ran into the same issue but installing specific version via brew and also from source failed. I then decided to upgrade to solc v0.5 and now I'm not sure if this flattener is compatible with the new compiler and if it's worth investigating
I love the truffle-flattener but the code doesn't always verify and everyone (truffle-flattener, etherscan, ...) point to this solidity-flattener here