Expand description
Due to the migration of the RPC client to the alloy
crate, this module contains implementation
and parameters of client layers. The underlying HTTP transport layer is defined in transport.rs
.
Extended layers of RPC clients:
- Replace the legacy retry backoff layer with the default [
RetryBackoffService
]. However the backoff calculation still needs to be improved, as the number of retries is not passed to thebackoff_hint
method. - Add Metrics Layer
- Add Snapshot Layer
- Use tokio runtime for most of the tests
This module contains defalut gas estimation constants for EIP-1559 for Gnosis chain,
Structs§
- Default
Retry Policy - Defines a default retry policy suitable for
RpcClient
. This is a reimplementation of the legacy “retry policy suitable forJsonRpcProviderClient
” - GasOracle
Filler - Use the underlying gas tracker API of GnosisScan to populate the gas price.
It returns gas price in gwei.
It implements the
GasOracle
trait. If no Oracle URL is given, it returns no values. - GasOracle
Response - GasOracle
Response Result - Metrics
Layer - Metrics
Service - Requestor
Response Snapshot - Snapshot of a response cached by the
SnapshotRequestorLayer
. - Snapshot
Requestor - Replays an RPC response to a request if it is found in the snapshot YAML file.
If no such request has been seen before,
it captures the new request/response pair obtained from the inner
HttpRequestor
and stores it into the snapshot file. - Snapshot
Requestor Layer - Snapshot
Requestor Service - Zero
Retry Policy
Enums§
- GasCategory
- Generic [
GasOracle
] gas price categories.
Constants§
- EIP1559_
FEE_ ESTIMATION_ DEFAULT_ MAX_ FEE_ GNOSIS - Gas estimation constants for EIP-1559 for Gnosis chain. These values are used to estimate the gas price for transactions. As GasOracleMiddleware is migrated to GasFiller, they are replaced with default values.
- EIP1559_
FEE_ ESTIMATION_ DEFAULT_ PRIORITY_ FEE_ GNOSIS
Functions§
- create_
rpc_ client_ to_ anvil - Used for testing. Creates RPC client to the local Anvil instance.