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-8/

Solc Binary Provisioner

A utility that ensures a specific Solidity compiler binary is present locally, installing it when necessary with optional progress reporting and configurable install roots.

Capabilities

Install to default location

  • When asked for version 0.8.20 and it is not present, the utility downloads the binary to the default install location and returns a filesystem path that exists and includes the requested version. @test

Install to custom root

  • When provided a writable install directory, the utility downloads the requested version into that directory (creating it if needed) and returns a path within that root. @test

Reuse existing install

  • When the requested version already exists in the target install location, the utility returns the existing path without triggering a new download and leaves the binary contents unchanged. @test

Optional progress reporting

  • When a progress handler is supplied and progress reporting is enabled during a download, the handler receives multiple updates showing the byte counts for the transfer and at least one update contains the total size. @test

Implementation

@generates

API

from pathlib import Path
from typing import Callable, Optional

def ensure_solc(
    version: str,
    install_root: Optional[Path] = None,
    show_progress: bool = False,
    progress_handler: Optional[Callable[[str, int, int], None]] = None,
) -> Path:
    """
    Return a path to the requested compiler binary, downloading it if missing.
    - install_root: optional directory under which to place and look up the binary.
    - show_progress: when True, progress_handler (if provided) receives updates like (label, bytes_downloaded, total_bytes or -1 while unknown).
    """

Dependencies { .dependencies }

py-solc-x { .dependency }

Used to discover, download, and validate specific Solidity compiler binaries with optional progress hooks and configurable install roots.

Install with Tessl CLI

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

tile.json