degenbot.provider.async_provider ================================ .. py:module:: degenbot.provider.async_provider .. autoapi-nested-parse:: Async Alloy provider: the mixin trees and :class:`AsyncAlloyProvider`. The sync twin lives in :mod:`degenbot.provider.sync`. The two trees are deliberately parallel: 20 of the 22 methods they share are logic-identical modulo ``await``, and nearly all of those are single-line pass-throughs to the wrapped Rust pyclass -- the sync/await duality IS the code. The multi-line logic both trees need (block-tag resolution, block-timestamp extraction) lives once in :mod:`degenbot.provider.block_helpers`. ``get_logs`` genuinely differs: the sync surface accepts a ``LogFilter`` or individual keyword arguments with range validation; this surface takes keyword arguments only. The sync tree also carries the context-manager and scalar-property surface this tree exposes as awaited methods. Module Contents --------------- .. py:class:: AsyncAlloyProvider(rust_provider: degenbot.provider._rust.RustAsyncAlloyProvider) Bases: :py:obj:`_AsyncAlloyEndpointMixin`, :py:obj:`_AsyncAlloyQueryMixin`, :py:obj:`_AsyncAlloyIntrospectionMixin` High-performance async Ethereum RPC provider using Alloy. A thin Python wrapper around the Rust ``AsyncAlloyProvider`` pyclass. Adds string block-identifier resolution (``'latest'``, ``'earliest'``, ``'pending'``) and exposes the inner Rust pyclass via :meth:`as_async_alloy` for Rust-side call seams. The public surface is assembled from the async query mixins. :param rust_provider: The underlying Rust ``AsyncAlloyProvider`` pyclass. Prefer :meth:`create` to construct an instance from an RPC URL. .. py:method:: create(rpc_url: str, max_retries: int = 10, max_blocks_per_request: int = 5000, *, requests_per_second: int | None = None, burst: int | None = None, chain_id: int | None = None) -> AsyncAlloyProvider :staticmethod: :async: Create an ``AsyncAlloyProvider`` asynchronously. :param rpc_url: HTTP/HTTPS/WS/IPC endpoint URL. :param max_retries: Maximum retry attempts. :param max_blocks_per_request: Maximum blocks per log request. :param requests_per_second: Optional rate limit. :param burst: Optional burst size for rate limiting. :param chain_id: Chain to bind the endpoint to; the Rust core raises :class:`ValueError` when the endpoint serves another chain. :returns: An ``AsyncAlloyProvider`` instance.