A Python library for interacting with Ethereum blockchain
Overall
score
88%
Evaluation — 88%
↑ 1.01xAgent success when using this tile
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.
Install with Tessl CLI
npx tessl i tessl/pypi-web3docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10