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. - pubsub
serde
- 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§
- Access
List - AccessList as defined in EIP-2930
- Access
List Item - A list of addresses and storage keys that the transaction plans to access. Accesses outside the list are possible, but become more expensive.
- Access
List Result AccessListResult
for handling errors frometh_createAccessList
- Account
- Represents an TrieAccount in the account trie.
- Account
Info - Account information.
- AnyReceipt
Envelope - Receipt envelope, as defined in EIP-2718.
- Authorization
- An unsigned EIP-7702 authorization.
- BadBlock
- Bad block representation.
- Blob
Transaction Sidecar - This represents a set of blobs, and its corresponding commitments and proofs.
- Block
- Block representation for RPC.
- Block
Overrides - BlockOverrides is a set of header fields to override.
- Block
Transaction Hashes - An iterator over the transaction hashes of a block.
- Bloom
Filter - Helper type to represent a bloom filter used for matching logs.
- Bundle
- Bundle of transactions
- Chain
Status - Chain status.
- EIP1186
Account Proof Response serde
- Response for EIP-1186 account proof
eth_getProof
- EIP1186
Storage Proof serde
- Data structure with proof for one single storage-entry
- EthCall
Response - CallResponse for eth_callMany
- ExtAccount
Info - Extended account information (used by
parity_allAccountInfo
). - FeeHistory
- Response type for
eth_feeHistory
- Filter
- Filter for logs.
- Filter
Set - FilterSet is a set of values that will be used to filter logs.
- Filtered
Params - 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
- Packed
User Operation PackedUserOperation
in the spec: Entry Point V0.7- Peer
EthProtocol Info - Peer Ethereum protocol information
- Peer
Info - Peer connection information
- Peer
Network Info - Peer network information
- Peer
Protocols Info - Peer protocols information
- Peers
- Peers info
- PipProtocol
Info - Peer PIP protocol information
- RawLog
- Ethereum Log
- Receipt
- Receipt containing result of transaction execution.
- Receipt
With Bloom Receipt
with calculated bloom filter.- Recovered
Account - account derived from a signature as well as information that tells if it is valid for the current chain
- RpcBlock
Hash - A block hash which may have a boolean
requireCanonical
field. - Send
User Operation Response - Response to sending a user operation.
- Stage
- The detail of the sync stages.
- State
Context - State context for callMany
- Sync
Info - Syncing info
- Transaction
- Transaction object used in RPC.
- Transaction
Info - Additional fields in the context of a (maybe) pending block that contains this transaction.
- Transaction
Input - Helper type that supports both
data
andinput
fields that map to transaction input data. - Transaction
Receipt - Transaction receipt
- Transaction
Request - Represents all transaction requests to/from RPC.
- Transaction
Stats - Propagation statistics for pending transaction.
- TxGas
AndReward - Internal struct to calculate reward percentiles
- User
Operation UserOperation
in the spec: Entry Point V0.6- User
Operation GasEstimation - Represents the gas estimation for a user operation.
- User
Operation Receipt - 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§
- Block
Error - 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
- Block
Number OrTag - A block Number (or tag - “latest”, “earliest”, “pending”)
- Block
Transactions - Block Transactions depending on the boolean attribute of
eth_getBlockBy*
, or if used byeth_getUncle*
- Block
Transactions Kind - Determines how the
transactions
field of block should be filled. - Conversion
Error - Error variants when converting from crate::Transaction to [alloy_consensus::Signed] transaction.
- Filter
Block Error - Represents errors that can occur when setting block filters in
FilterBlockOption
. - Filter
Block Option - Represents the target range of blocks for the filter
- Filter
Changes - Response of the
eth_getFilterChanges
RPC. - Filter
Id - Owned equivalent of a
SubscriptionId
- Pending
Transaction Filter Kind - Specifies the kind of information you wish to receive from the
eth_newPendingTransactionFilter
RPC endpoint. - Receipt
Envelope - Receipt envelope, as defined in EIP-2718.
- Send
User Operation - Send User Operation
- Sync
Status - Sync status
- Transaction
Index - Represents a transaction index where -1 means all transactions
- Value
OrArray - Union type for representing a single value or a vector of values inside a filter
Traits§
- Transaction
Trait - 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’sblob_gas_used
andexcess_blob_gas
. - logs_
bloom - Calculate receipt logs bloom.
Type Aliases§
- Block
Hash OrNumber - A block hash or a block number
- Block
NumHash - A block number and a hash
- Fork
Block - Block number and hash of the forked block.
- Topic
- A single topic