Closed qnnnnez closed 1 year ago
Make _compile_combined_json use the correct version of solc. Currently it will always use default version of solc.
_compile_combined_json
Make _compile_combined_json accept an argument solc_binary.
Test script:
import solcx solcx.install_solc('latest') solcx.install_solc('0.6.6') solcx.compile_source('', solc_version='0.6.6')
Running the test script with current master:
solcx.exceptions.UnknownValue: solc 0.6.6 does not accept 'function-debug ' as an option for the '--combined-json' flag
Running the test script with the fix:
> command: `/Users/wushuang/.solcx/solc-v0.6.6 --combined-json abi,asm,ast,bin,bin-runtime,compact-format,devdoc,hashes,interface,metadata,opcodes,srcmap,srcmap-runtime,storage-layout,userdoc -` > return code: `0` > stdout: {"sourceList":["<stdin>"],"sources":{"<stdin>":{"AST":{"absolutePath":"<stdin>","exportedSymbols":{},"id":1,"nodeType":"SourceUnit","nodes":[],"src":"1:0:0"}}},"version":"0.6.6+commit.6c089d02.Darwin.appleclang"} > stderr: Warning: Source file does not specify required compiler version! Consider adding "pragma solidity ^0.6.6;" --> <stdin>
It looks like this got done somewhere else
What I did
Make
_compile_combined_json
use the correct version of solc. Currently it will always use default version of solc.How I did it
Make
_compile_combined_json
accept an argument solc_binary.How to verify it
Test script:
Running the test script with current master:
Running the test script with the fix:
Checklist