CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-py-solc-x

Python wrapper and version management tool for the solc Solidity compiler.

77

1.05x

Evaluation77%

1.05x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-6/

Solc Import Manager

Create a helper that imports an existing system installation of the Solidity compiler into the managed solc folder so it can be used like downloaded versions.

Capabilities

Imports system solc into managed folder

  • When given an explicit path to a system-installed compiler binary or relying on PATH lookup, copy it into the managed install directory and return the managed binary path. @test

Skips duplicate versions

  • If a compiler version is already available in the managed install directory, detect and reuse it instead of copying a second time, still returning the managed path. @test

Rejects incompatible binaries

  • If the binary is older than version 0.4.11 or its version output cannot be parsed, raise a descriptive error and do not add it to the managed directory. @test

Honors custom install root

  • When a custom install root is provided (argument or the SOLCX_BINARY_PATH environment variable), import into that directory while leaving the default install root untouched. @test

Implementation

@generates

API

from pathlib import Path
from typing import Optional

def import_system_solc(binary_path: Optional[Path | str] = None, install_root: Optional[Path | str] = None) -> Path:
    """
    Locate a system-installed solc binary (from binary_path or PATH), import it into the managed install folder,
    and return the full path to the managed binary.
    Raises an exception when no usable binary is found or the version is unsupported.
    """

Dependencies { .dependencies }

py-solc-x { .dependency }

Python wrapper for installing and managing solc compiler binaries. Must be used for version detection, validating compatibility, and registering the imported binary within the managed install folder. @satisfied-by

Install with Tessl CLI

npx tessl i tessl/pypi-py-solc-x

tile.json