or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/web3@7.13.x
tile.json

tessl/pypi-web3

tessl install tessl/pypi-web3@7.13.0

A Python library for interacting with Ethereum blockchain

Agent Success

Agent success rate when using this tile

88%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.01x

Baseline

Agent success rate without this tile

87%

task.mdevals/scenario-6/

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.