middleware
Documentation for eth_defi.middleware Python module.
Web3 middleware.
Most for dealing with JSON-RPC unreliability issues with retries.
Taken from exception_retry_request.py from Web3.py
Modified to support sleep and throttling
Logs warnings to Python logging subsystem in the case there is need to retry
Module Attributes
List of Web3 exceptions we know we should retry after some timeout |
|
List of HTTP status codes we know we might want to retry after a timeout |
|
List of ValueError status codes we know we might want to retry after a timeout |
Functions
Capture transactions sign and send as raw transactions |
|
|
Creates middleware that retries failed HTTP requests. |
A HTTP retry middleware with sleep and backoff. |
|
|
Helper to check retryable errors from JSON-RPC calls. |
|
Automatically show the transaction revert reason in Python traceback. |