Skip to content

Migrate to ruff - #2524

Draft
Uxio0 wants to merge 3 commits into
mainfrom
chore/align-python-tooling
Draft

Migrate to ruff#2524
Uxio0 wants to merge 3 commits into
mainfrom
chore/align-python-tooling

Conversation

@Uxio0

@Uxio0 Uxio0 commented Jun 5, 2026

Copy link
Copy Markdown
Member
  • Align tooling with other services

Draft: pending to merge other PRs to apply formatting

Uxio0 added 3 commits June 5, 2026 13:13
Add an asyncio-based AsyncEthereumClient that mirrors EthereumClient using
AsyncWeb3/AsyncHTTPProvider + aiohttp, subclassing the sync client and managers
and overriding only I/O so no business logic is duplicated. AsyncMulticall keeps
batch_call at full parity with the sync Multicall path (raw revert bytes included).

Refactor EthereumClient to extract I/O-free helpers shared by both clients
(payload builders, batch-response processing, eth_call decode, tx error mapping,
trace selectors, manager builders/formatters).

Reuse the sync test suites against the async client via a sync-facade proxy.

Fix bugs found during the refactor:
- get_total_transfer_history double-counted transfers matching both from/to filters
- send_unsigned_transaction returned an empty hash on exhausted retries (now raises)
- functools.cache on instance methods leaked instances (per-instance cache + clear_cache)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant