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 SolidityAddress interface.
EthereumMethods
Represents Ethereum JSON-RPC methods.
EthereumProvider
Represents an interface to interact with Ethereum Virtual Machine (ethereum) nodes using JSON-RPC requests.
EthereumRequest<RESULT, SERVICERESPONSE>
An abstract class representing Ethereum JSON-RPC requests with generic response types.
EthereumRequestCall
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
EthereumRequestCompileSerpent
EthereumRequestCompileSolidity
EthereumRequestCreateAccessList
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
EthereumRequestDetails
Represents the details of an Ethereum JSON-RPC request.
EthereumRequestDynamic<T>
EthereumRequestEstimateGas
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
EthereumRequestETHSubscribeLogs
https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub
EthereumRequestETHSubscribeNewHeads
https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub
EthereumRequestETHSubscribeNewPendingTransactions
https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub
EthereumRequestETHSubscribeSyncing
https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub
EthereumRequestETHUnsubscribe
https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub
EthereumRequestGetAccounts
Returns a list of addresses owned by client. ethereum.org
EthereumRequestGetBalance
Returns the balance of the account of given address. ethereum.org
EthereumRequestGetBlockByHash
Returns information about a block by hash. ethereum.org
EthereumRequestGetBlockByNumber
Returns information about a block by block number. ethereum.org
EthereumRequestGetBlockNumber
Returns the number of most recent block.. ethereum.org
EthereumRequestGetBlockTransactionCountByNumber
Returns the number of transactions in a block matching the given block number. ethereum.org
EthereumRequestGetChainId
Returns the chain ID used for signing replay-protected transactions. ethereum.org
EthereumRequestGetCode
Returns code at a given address. ethereum.org
EthereumRequestGetCoinbase
Returns the client coinbase address. ethereum.org
EthereumRequestGetCompilers
EthereumRequestGetFeeHistory
EthereumRequestGetFilterChanges
Polling method for a filter, which returns an array of logs which occurred since last poll. ethereum.org
EthereumRequestGetFilterLogs
Returns an array of all logs matching filter with given id. ethereum.org
EthereumRequestGetGasPrice
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
EthereumRequestGetGetBlockTransactionCountByHash
Returns the number of transactions in a block from a block matching the given block hash. ethereum.org
EthereumRequestGetGetUncleCountByBlockHash
Returns the number of uncles in a block from a block matching the given block hash. ethereum.org
EthereumRequestGetHashRate
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
EthereumRequestGetMining
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
EthereumRequestGetNodeInfo
Returns the current client version. ethereum.org
EthereumRequestGetPendingTransactions
EthereumRequestGetProof
EthereumRequestGetProtocolVersion
Returns the current Ethereum protocol version. Note that this method is not available in Geth ethereum.org
EthereumRequestGetStorageAt
Returns the value from a storage position at a given address. ethereum.org
EthereumRequestGetSyncing
Returns an object with data about the sync status or false. ethereum.org
EthereumRequestGetTransactionByBlockHashAndIndex
Returns information about a transaction by block hash and transaction index position. ethereum.org
EthereumRequestGetTransactionByBlockNumberAndIndex
Returns information about a transaction by block number and transaction index position. ethereum.org
EthereumRequestGetTransactionByHash
Returns the information about a transaction requested by transaction hash. ethereum.org
EthereumRequestGetTransactionCount
Returns the number of transactions sent from an address. ethereum.org
EthereumRequestGetTransactionReceipt
Returns the receipt of a transaction by transaction hash. That the receipt is not available for pending transactions. ethereum.org
EthereumRequestGetUncleByBlockHashAndIndex
Returns information about a uncle of a block by hash and uncle index position. ethereum.org
EthereumRequestGetUncleByBlockNumberAndIndex
Returns information about a uncle of a block by number and uncle index position. ethereum.org
EthereumRequestGetUncleCountByBlockNumber
Returns the number of uncles in a block from a block matching the given block number. ethereum.org
EthereumRequestNewBlockFilter
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
EthereumRequestNewPendingTransactionFilter
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
EthereumRequestompileLLL
EthereumRequestReguestAccounts
EthereumRequestSendRawTransaction
Creates new message call transaction or a contract creation for signed transactions. ethereum.org
EthereumRequestSendTransaction
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
EthereumRequestSign
The sign method calculates an Ethereum specific signature with: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))). ethereum.org
EthereumRequestSignTransaction
Signs a transaction that can be submitted to the network at a later time using with eth_sendRawTransaction. ethereum.org
EthereumRequestSubmitHashrate
EthereumRequestSubmitWork
EthereumRequestUninstallFilter
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
EthereumRequestWork
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.
ETHTransaction
Represents an Ethereum transaction with EIP-1559 support.
ETHTransactionBuilder
Builder class for creating Ethereum transactions.
ETHTransactionType
Represents the type of an Ethereum transaction.
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.
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.
SubscribeLogsFilter
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

EthereumServiceProvider
A mixin for providing JSON-RPC service functionality.

Typedefs

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

Exceptions / Errors

ETHPluginException