tessl install tessl/pypi-web3@7.13.0A 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%
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.
True when the connected network's chain ID matches the expected chain ID @testFalse when the connected network's chain ID does not match the expected chain ID @test@generates
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
"""
passProvides Ethereum blockchain interaction capabilities.