CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-web3

A Python library for interacting with Ethereum blockchain

Overall
score

88%

Evaluation88%

1.01x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-7/

Network Configuration Validator

A tool that validates whether a connection to an Ethereum node is configured correctly by verifying the network's chain identifier matches the expected value.

Capabilities

Retrieve Network Chain Identifier

  • Returns the chain ID from a connected Ethereum node @test
  • Returns 1 for Ethereum mainnet connection @test

Validate Network Configuration

  • Returns True when the connected network's chain ID matches the expected chain ID @test
  • Returns False when the connected network's chain ID does not match the expected chain ID @test

Implementation

@generates

API

from typing import Any

def get_chain_id(provider_url: str) -> int:
    """
    Retrieve the chain ID from an Ethereum node.

    Args:
        provider_url: The URL of the Ethereum node provider (e.g., "http://localhost:8545")

    Returns:
        The chain ID as an integer
    """
    pass

def validate_network(provider_url: str, expected_chain_id: int) -> bool:
    """
    Validate that the connected network matches the expected chain ID.

    Args:
        provider_url: The URL of the Ethereum node provider
        expected_chain_id: The expected chain ID to validate against

    Returns:
        True if the network's chain ID matches expected_chain_id, False otherwise
    """
    pass

Dependencies { .dependencies }

web3 { .dependency }

Provides Ethereum blockchain interaction capabilities.

Install with Tessl CLI

npx tessl i tessl/pypi-web3

tile.json