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-3/

Ethereum Data Hasher

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.

Capabilities

Hash text strings

  • Given a plain text string "Hello, Ethereum!", the hash function returns its cryptographic hash as a hexadecimal string @test
  • Hashing an empty string "" returns the hash of the empty input @test

Hash byte data

  • Given raw bytes data, the hash function returns its cryptographic hash as a hexadecimal string @test
  • Hashing bytes representing a function signature produces the expected hash @test

Compute domain name hashes

  • Given a domain name "example.eth", the compute_namehash function returns its namehash as a hexadecimal string @test
  • The namehash for an empty domain ("") should return the zero hash @test

Implementation

@generates

API

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)
    """
    pass

Dependencies { .dependencies }

web3 { .dependency }

Provides Ethereum blockchain interaction capabilities including cryptographic hashing functions.