Crate hopr_chain_rpc

Source
Expand description

This crate contains types and traits that ensure correct interfacing with Ethereum RPC providers.

The most important trait is HoprRpcOperations which allows to send arbitrary on-chain transactions and also to perform the selection of HOPR-related smart contract operations. Secondly, the HoprIndexerRpcOperations is a trait that contains all operations required by the Indexer to subscribe to the block with logs from the chain.

Both of these traits implemented and realized via the RpcOperations type, so this represents the main entry point to all RPC related operations.

Modules§

client
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.
errors
indexer
Extends the RpcOperations type with functionality needed by the Indexer component.
rpc
General purpose high-level RPC operations implementation (HoprRpcOperations).
transport

Structs§

BlockWithLogs
Structure containing filtered logs that all belong to the same block.
FilterSet
Represents a set of categorized blockchain log filters for optimized indexer performance.
HttpPostRequestorConfig
Common configuration for all native HttpPostRequestors
Log
A type containing selected fields from the eth_getLogs RPC calls.
NodeSafeModuleStatus
Represents the on-chain status for the Node Safe module.
ReqwestClient
An asynchronous Client to make Requests with.

Enums§

RetryAction
Indicates what retry action should be taken, as result of a RetryPolicy implementation.

Traits§

HoprIndexerRpcOperations
Trait with RPC provider functionality required by the Indexer.
HoprRpcOperations
Trait defining a general set of operations an RPC provider must provide to the HOPR node.
RetryPolicy
Simple retry policy trait