ethereum/ethereum library

Library for Ethereum-related functionality and utilities.

Classes

AccessListEntry
Represents an entry in the access list, specifying addresses and storage keys.
BlockDetails
Represents details about an Ethereum block.
BlockTag
Represents block tag used in Ethereum JSON-RPC requests.
BlockTagOrNumber
Represents a block number or tag in Ethereum JSON-RPC requests.
ETHAddress
Class representing an Ethereum address, implementing the BaseHexAddress interface.
EthereumMethods
Represents Ethereum JSON-RPC methods.
ETHHelper
Helper class for Ethereum-related operations.
ETHPrivateKey
Class representing an Ethereum private key, allowing for cryptographic operations and key-related functionality.
ETHPublicKey
Class representing an Ethereum public key, providing methods for conversion, verification, and address generation.
ETHRequestDetails
Represents the details of an Ethereum JSON-RPC request.
ETHRequestParams
An abstract class representing Ethereum RPC request parameters.
ETHRPCRequest<T>
An abstract class representing Ethereum JSON-RPC requests with generic response types.
ETHTransaction
Represents an Ethereum transaction with EIP-1559 support.
ETHTransactionBuilder
Builder class for creating Ethereum transactions.
ETHTransactionType
Represents the type of an Ethereum transaction.
EVMRPC
Represents an interface to interact with Ethereum Virtual Machine (EVM) nodes using JSON-RPC requests.
FeeHistorical
Represents the historical fee levels with slow, normal, high, and base fee details.
FeeHistory
Represents the fee history in the context of Ethereum, including base fee per gas, gas used ratio, oldest block, and reward details.
Filter
Represents a filter configuration for Ethereum event logs.
LogEntry
Represents an entry in Ethereum transaction logs.
LookupBlockRequest
An abstract class representing Ethereum lookup block requests.
RLPDecoder
Class for decoding data encoded using the Recursive Length Prefix (RLP) encoding scheme.
RLPEncoder
Class for encoding data using the Recursive Length Prefix (RLP) encoding scheme.
RPCCall
Executes a new message call immediately, without creating a transaction on the block chain. The eth_call method can be used to query internal contract state, to execute validations coded into a contract or even to test what the effect of a transaction would be without running it live. geth.ethereum.org
RPCCompileSerpent
RPCCompileSolidity
RPCCreateAccessList
This method creates an EIP2930 type accessList based on a given Transaction. The accessList contains all storage slots and addresses read and written by the transaction, except for the sender account and the precompiles. This method uses the same transaction call object and blockNumberOrTag object as eth_call. An accessList can be used to unstuck contracts that became inaccessible due to gas cost increases. geth.ethereum.org
RPCEstimateGas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance. ethereum.org
RPCGetAccounts
Returns a list of addresses owned by client. ethereum.org
RPCGetBalance
Returns the balance of the account of given address. ethereum.org
RPCGetBlockByHash
Returns information about a block by hash. ethereum.org
RPCGetBlockByNumber
Returns information about a block by block number. ethereum.org
RPCGetBlockNumber
Returns the number of most recent block.. ethereum.org
RPCGetBlockTransactionCountByNumber
Returns the number of transactions in a block matching the given block number. ethereum.org
RPCGetChainId
Returns the chain ID used for signing replay-protected transactions. ethereum.org
RPCGetCode
Returns code at a given address. ethereum.org
RPCGetCoinbase
Returns the client coinbase address. ethereum.org
RPCGetCompilers
RPCGetFeeHistory
RPCGetFilterChanges
Polling method for a filter, which returns an array of logs which occurred since last poll. ethereum.org
RPCGetFilterLogs
Returns an array of all logs matching filter with given id. ethereum.org
RPCGetGasPrice
Returns an estimate of the current price per gas in wei. For example, the Besu client examines the last 100 blocks and returns the median gas unit price by default. ethereum.org
RPCGetGetBlockTransactionCountByHash
Returns the number of transactions in a block from a block matching the given block hash. ethereum.org
RPCGetGetUncleCountByBlockHash
Returns the number of uncles in a block from a block matching the given block hash. ethereum.org
RPCGetHashRate
Returns the number of hashes per second that the node is mining with. This can only return true for proof-of-work networks and may not be available in some clients since The Merge. ethereum.org
RPCGetMining
Returns true if client is actively mining new blocks. This can only return true for proof-of-work networks and may not be available in some clients since The Merge. ethereum.org
RPCGetNodeInfo
Returns the current client version. ethereum.org
RPCGetPendingTransactions
RPCGetProof
RPCGetProtocolVersion
Returns the current Ethereum protocol version. Note that this method is not available in Geth ethereum.org
RPCGetStorageAt
Returns the value from a storage position at a given address. ethereum.org
RPCGetSyncing
Returns an object with data about the sync status or false. ethereum.org
RPCGetTransactionByBlockHashAndIndex
Returns information about a transaction by block hash and transaction index position. ethereum.org
RPCGetTransactionByBlockNumberAndIndex
Returns information about a transaction by block number and transaction index position. ethereum.org
RPCGetTransactionByHash
Returns the information about a transaction requested by transaction hash. ethereum.org
RPCGetTransactionCount
Returns the number of transactions sent from an address. ethereum.org
RPCGetTransactionReceipt
Returns the receipt of a transaction by transaction hash. That the receipt is not available for pending transactions. ethereum.org
RPCGetUncleByBlockHashAndIndex
Returns information about a uncle of a block by hash and uncle index position. ethereum.org
RPCGetUncleByBlockNumberAndIndex
Returns information about a uncle of a block by number and uncle index position. ethereum.org
RPCGetUncleCountByBlockNumber
Returns the number of uncles in a block from a block matching the given block number. ethereum.org
RPCNewBlockFilter
Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call eth_getFilterChanges. ethereum.org
RPCNewPendingTransactionFilter
Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call eth_getFilterChanges. ethereum.org
RPCompileLLL
RPCReguestAccounts
RPCSendRawTransaction
Creates new message call transaction or a contract creation for signed transactions. ethereum.org
RPCSendTransaction
Creates new message call transaction or a contract creation, if the data field contains code, and signs it using the account specified in from. ethereum.org
RPCSign
The sign method calculates an Ethereum specific signature with: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))). ethereum.org
RPCSignTransaction
Signs a transaction that can be submitted to the network at a later time using with eth_sendRawTransaction. ethereum.org
RPCSubmitHashrate
RPCSubmitWork
RPCUninstallFilter
Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additionally Filters timeout when they aren't requested with eth_getFilterChanges for a period of time. ethereum.org
RPCWork
TransactionInfo
Represents information about an Ethereum transaction.
TransactionReceipt
Represents the receipt of an Ethereum transaction.
Withdrawal
Represents a withdrawal in the context of Ethereum block.

Enums

EIP1559FeeRate
Enumeration for different fee rates in the context of EIP-1559 transactions.

Mixins

JSONRPCService
A mixin for providing JSON-RPC service functionality.

Typedefs

AccessList = List<AccessListEntry>
Represents a list of access list entries.