Python wrapper and version management tool for the solc Solidity compiler.
77
Evaluation — 77%
↑ 1.05xAgent success when using this tile
Compile Solidity entry files from disk while resolving imported libraries through explicit remapping rules, returning ABI and bytecode details and writing compiler outputs to disk.
@lib/Math.sol remapped to a local vendor folder, compilation succeeds and returns ABI and bytecode entries for the entry contract and the remapped library. @test@lib/Util.sol cannot be resolved by the supplied remappings and allow paths, the compile step raises a clear error that mentions the unresolved import path. @test@generates
from pathlib import Path
from typing import Any, Dict, Iterable, List
def compile_with_remappings(
sources: List[Path],
import_remappings: Dict[str, str],
allow_paths: Iterable[Path],
output_dir: Path,
overwrite: bool = False,
) -> Dict[str, Any]:
"""
Compiles Solidity source files on disk using the provided import remappings and allow paths.
Writes compiler output (including ABI and bytecode) into output_dir, optionally overwriting existing files.
Returns contract metadata keyed by fully qualified contract identifiers.
Raises a compilation error when imports cannot be resolved.
"""Python wrapper for the Solidity compiler that supports on-disk compilation with import remappings.
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