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

Scaffold-Safe Solidity Compilation

A small utility that compiles Solidity sources while allowing scaffold phases to run without contract definitions.

Capabilities

Compile provided Solidity files

  • With a valid contract file, returns compiled artifact data for that contract keyed by contract name. @test

Allow empty scaffolds

  • When provided files contain no contract definitions and allow_empty is true, returns an empty contracts map, includes a note about the empty result, and does not raise exceptions. @test
  • When allow_empty is false and no contracts exist, surfaces an error to the caller instead of silently succeeding. @test

Implementation

@generates

API

from typing import Any, Dict, List, TypedDict

class CompilationResult(TypedDict):
    contracts: Dict[str, Any]
    sources: List[str]
    notes: List[str]

def compile_solidity_paths(paths: List[str], *, allow_empty: bool = False) -> CompilationResult:
    """
    Compiles the given Solidity source files.
    When allow_empty is True, the function must succeed even if no contracts are found,
    returning an empty contracts map and a note about the empty result.
    When allow_empty is False, attempting to compile sources with zero contracts raises an error.
    """

Dependencies { .dependencies }

py-solc-x { .dependency }

Provides Solidity compiler access with optional tolerance for empty outputs.

Install with Tessl CLI

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

tile.json