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%
Build a Python utility that hashes various Ethereum-related data types using cryptographic hashing functions. The utility should handle text strings, byte data, and compute domain-specific hashes for Ethereum name resolution.
@generates
def hash_text(text: str) -> str:
"""
Hash a text string using Ethereum's standard cryptographic hash function.
Args:
text: The text string to hash
Returns:
Hexadecimal string representation of the hash (with '0x' prefix)
"""
pass
def hash_bytes(data: bytes) -> str:
"""
Hash raw bytes data using Ethereum's standard cryptographic hash function.
Args:
data: The bytes data to hash
Returns:
Hexadecimal string representation of the hash (with '0x' prefix)
"""
pass
def compute_namehash(domain: str) -> str:
"""
Compute the namehash for an Ethereum domain name.
Args:
domain: The domain name (e.g., "example.eth")
Returns:
Hexadecimal string representation of the namehash (with '0x' prefix)
"""
passProvides Ethereum blockchain interaction capabilities including cryptographic hashing functions.