eth

Ethereum-compatible eth_* JSON-RPC methods for accounts, blocks, transactions, contracts, filters, and chain information.

Ethereum-compatible eth_* JSON-RPC methods for accounts, blocks, transactions, contracts, filters, and chain information.

Methods in this group

Accounts and balances

MethodPurpose
eth_accountsList accounts managed by the node. This is usually empty on TRON.
eth_getBalanceQuery the TRX balance of an account.

Block queries

MethodPurpose
eth_blockNumberQuery the latest block number.
eth_getBlockByHashQuery a block by block hash.
eth_getBlockByNumberQuery a block by block number.
eth_getBlockReceiptsQuery all receipts in a block.
eth_getBlockTransactionCountByHashQuery the number of transactions in a block by hash.
eth_getBlockTransactionCountByNumberQuery the number of transactions in a block by number.
eth_getWorkReturn the current TRON block hash.

Transaction queries

MethodPurpose
eth_getTransactionByHashQuery a transaction by hash.
eth_getTransactionByBlockHashAndIndexQuery a transaction by block hash and index.
eth_getTransactionByBlockNumberAndIndexQuery a transaction by block number and index.
eth_getTransactionReceiptQuery a transaction receipt.

Contracts and storage

MethodPurpose
eth_callSimulate a read-only contract call without submitting a transaction.
eth_getCodeQuery contract bytecode.
eth_getStorageAtQuery the value stored in a contract storage slot.
eth_estimateGasEstimate the Energy required by a transaction.
eth_gasPriceQuery the current Energy price in sun.

Filters and logs

MethodPurpose
eth_newFilterCreate a log filter.
eth_newBlockFilterCreate a new-block filter.
eth_getFilterChangesPoll filter changes.
eth_getFilterLogsGet all logs matched by a filter.
eth_getLogsQuery logs directly by filter criteria.
eth_uninstallFilterUninstall a filter.

Chain and protocol information

MethodPurpose
eth_chainIdQuery the chain ID. On TRON, this is derived from the low 4 bytes of the genesis block hash.
eth_coinbaseReturn the SR address associated with the node.
eth_protocolVersionQuery the protocol version.
eth_syncingQuery node synchronization status.

Related resources