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%
Create a Python service that monitors and reports current Ethereum gas prices in multiple units.
Your service should provide functionality to:
Create a Python module that exports a function get_gas_report() which:
gas_price_wei: The current gas price in Wei (as an integer)gas_price_gwei: The current gas price in Gwei (as a float)gas_price_ether: The current gas price in Ether (as a float)priority_fee_gwei: The recommended priority fee in Gwei (as a float, or None if not available)The function should handle connection to an Ethereum node provider (you may use any provider configuration that works for testing).
get_gas_report() returns a dictionary with all required keys @testgas_price_wei value is a positive integer @testgas_price_gwei and gas_price_ether conversions are mathematically correct relative to gas_price_wei @test@generates
def get_gas_report() -> dict:
"""
Retrieve current gas pricing information from the Ethereum network.
Returns:
dict: A dictionary containing:
- gas_price_wei (int): Current gas price in Wei
- gas_price_gwei (float): Current gas price in Gwei
- gas_price_ether (float): Current gas price in Ether
- priority_fee_gwei (float or None): Recommended priority fee in Gwei
"""
passProvides Ethereum blockchain interaction capabilities.