Python wrapper and version management tool for the solc Solidity compiler.
77
Evaluation — 77%
↑ 1.05xAgent success when using this tile
Utility for compiling Solidity sources through the official standard JSON input/output interface while optionally persisting the compiler output.
Counter contract targeting 0.8.x with outputSelection requesting ABI and bytecode, the returned output contains a non-empty ABI and deployed bytecode for Counter. @testallow_paths includes that library location, compilation succeeds and the output contains entries for both the main contract and the imported library. @testoutput_dir is provided, the full standard JSON compiler output is written to output_dir/standard-output.json; overwriting an existing file only occurs when overwrite is true, and the function still returns the parsed output. @test@generates
def compile_with_standard_json(
standard_input: dict,
*,
allow_paths: list[str] | None = None,
output_dir: str | None = None,
overwrite: bool = False
) -> dict:
"""
Compiles Solidity contracts using the standard JSON input/output format.
Applies allow_paths for imports, optionally writes the compiler output to output_dir,
and returns the parsed compiler output dictionary.
Raises an exception containing compiler error messages when compilation fails.
"""Provides managed solc installation/selection and helpers for compiling via the standard JSON interface.
Install with Tessl CLI
npx tessl i tessl/pypi-py-solc-xevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10