Python wrapper and version management tool for the solc Solidity compiler.
77
Evaluation — 77%
↑ 1.05xAgent success when using this tile
Design and implement a helper that compiles Solidity sources while exposing fine-grained compiler controls for optimization, metadata hashing, revert-string handling, output selection, and optional on-disk emission.
build/combined.json) and replaces any existing file. @test@generates
from pathlib import Path
from typing import Dict, Iterable, Mapping, Optional
def compile_with_flags(
sources: Mapping[str, str],
enable_optimization: bool,
optimizer_runs: int,
metadata_hash_mode: str,
revert_string_mode: str,
output_selection: Iterable[str],
output_directory: Optional[Path],
overwrite: bool = False,
) -> Dict:
"""
Compile the provided Solidity sources with the given compiler flag configuration.
Supports metadata hash modes like 'ipfs', 'bzzr1', or 'none', and revert string modes
'default', 'strip', or 'debug'.
Returns the compilation artifacts requested by the output selection.
"""Solidity compiler wrapper used to configure optimizer, metadata, revert-string, output selection, and output directory settings.
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