Crate eth

Expand description

§alloy-rpc-types-eth

Types for the eth Ethereum JSON-RPC namespace.

Modules§

erc4337
This module provides implementations for EIP-4337.
error
Commonly used errors for the eth_ namespace.
pubsubserde
Ethereum types for pub-sub
simulate
‘eth_simulateV1’ Request / Response types: https://github.com/ethereum/execution-apis/pull/484
state
bindings for state overrides in eth_call
transaction
RPC types for transactions

Structs§

AccessList
AccessList as defined in EIP-2930
AccessListItem
A list of addresses and storage keys that the transaction plans to access. Accesses outside the list are possible, but become more expensive.
AccessListResult
AccessListResult for handling errors from eth_createAccessList
Account
Represents an TrieAccount in the account trie.
AccountInfo
Account information.
AnyReceiptEnvelope
Receipt envelope, as defined in EIP-2718.
Authorization
An unsigned EIP-7702 authorization.
BadBlock
Bad block representation.
BlobTransactionSidecar
This represents a set of blobs, and its corresponding commitments and proofs.
Block
Block representation for RPC.
BlockOverrides
BlockOverrides is a set of header fields to override.
BlockTransactionHashes
An iterator over the transaction hashes of a block.
BloomFilter
Helper type to represent a bloom filter used for matching logs.
Bundle
Bundle of transactions
ChainStatus
Chain status.
EIP1186AccountProofResponseserde
Response for EIP-1186 account proof eth_getProof
EIP1186StorageProofserde
Data structure with proof for one single storage-entry
EthCallResponse
CallResponse for eth_callMany
ExtAccountInfo
Extended account information (used by parity_allAccountInfo).
FeeHistory
Response type for eth_feeHistory
Filter
Filter for logs.
FilterSet
FilterSet is a set of values that will be used to filter logs.
FilteredParams
Support for matching Filters
Header
RPC representation of block header, wrapping a consensus header.
Index
A hex encoded or decimal index that’s intended to be used as a rust index, hence it’s deserialized into a usize.
Log
Ethereum Log emitted by a transaction
PackedUserOperation
PackedUserOperation in the spec: Entry Point V0.7
PeerEthProtocolInfo
Peer Ethereum protocol information
PeerInfo
Peer connection information
PeerNetworkInfo
Peer network information
PeerProtocolsInfo
Peer protocols information
Peers
Peers info
PipProtocolInfo
Peer PIP protocol information
RawLog
Ethereum Log
Receipt
Receipt containing result of transaction execution.
ReceiptWithBloom
Receipt with calculated bloom filter.
RecoveredAccount
account derived from a signature as well as information that tells if it is valid for the current chain
RpcBlockHash
A block hash which may have a boolean requireCanonical field.
SendUserOperationResponse
Response to sending a user operation.
Stage
The detail of the sync stages.
StateContext
State context for callMany
SyncInfo
Syncing info
Transaction
Transaction object used in RPC.
TransactionInfo
Additional fields in the context of a (maybe) pending block that contains this transaction.
TransactionInput
Helper type that supports both data and input fields that map to transaction input data.
TransactionReceipt
Transaction receipt
TransactionRequest
Represents all transaction requests to/from RPC.
TransactionStats
Propagation statistics for pending transaction.
TxGasAndReward
Internal struct to calculate reward percentiles
UserOperation
UserOperation in the spec: Entry Point V0.6
UserOperationGasEstimation
Represents the gas estimation for a user operation.
UserOperationReceipt
Represents the receipt of a user operation.
Withdrawal
Withdrawal represents a validator withdrawal from the consensus layer.
Withdrawals
Represents a collection of Withdrawals.
Work
The result of an eth_getWork request

Enums§

BlockError
Error that can occur when converting other types to blocks
BlockId
A Block Identifier. https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1898.md
BlockNumberOrTag
A block Number (or tag - “latest”, “earliest”, “pending”)
BlockTransactions
Block Transactions depending on the boolean attribute of eth_getBlockBy*, or if used by eth_getUncle*
BlockTransactionsKind
Determines how the transactions field of block should be filled.
ConversionError
Error variants when converting from crate::Transaction to [alloy_consensus::Signed] transaction.
FilterBlockError
Represents errors that can occur when setting block filters in FilterBlockOption.
FilterBlockOption
Represents the target range of blocks for the filter
FilterChanges
Response of the eth_getFilterChanges RPC.
FilterId
Owned equivalent of a SubscriptionId
PendingTransactionFilterKind
Specifies the kind of information you wish to receive from the eth_newPendingTransactionFilter RPC endpoint.
ReceiptEnvelope
Receipt envelope, as defined in EIP-2718.
SendUserOperation
Send User Operation
SyncStatus
Sync status
TransactionIndex
Represents a transaction index where -1 means all transactions
ValueOrArray
Union type for representing a single value or a vector of values inside a filter

Traits§

TransactionTrait
Represents a minimal EVM transaction.

Functions§

calc_blob_gasprice
Calculates the blob gas price from the header’s excess blob gas field.
calc_excess_blob_gas
Calculates the excess_blob_gas from the parent header’s blob_gas_used and excess_blob_gas.
logs_bloom
Calculate receipt logs bloom.

Type Aliases§

BlockHashOrNumber
A block hash or a block number
BlockNumHash
A block number and a hash
ForkBlock
Block number and hash of the forked block.
Topic
A single topic