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

Structs§

BlockWithLogs
Structure containing filtered logs that all belong to the same block.
HttpPostRequestorConfig
Common configuration for all native HttpPostRequestors
Log
A type containing selected fields from the eth_getLogs RPC calls.
LogFilter
Represents a filter to extract logs containing specific contract events from a block.
NodeSafeModuleStatus
Represents the on-chain status for the Node Safe module.
PendingTransaction
Represents a pending transaction that can be eventually resolved until confirmation, which is done by polling the respective RPC provider.
TransactionReceipt
Contains some selected fields of a receipt for a transaction that has been already included in the blockchain.
ZeroRetryPolicy
Performs no retries.

Enums§

RetryAction
Indicates what retry action should be taken, as result of a RetryPolicy implementation.
TypedTransaction
The TypedTransaction enum represents all Ethereum transaction types.

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.
HttpPostRequestor
Abstraction for an HTTP client that performs HTTP POST with serializable request data.
RetryPolicy
Simple retry policy trait

Functions§

create_eip1559_transaction
Shorthand for creating a new EIP1559 transaction object.