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
| Method | Purpose |
|---|---|
| eth_accounts | List accounts managed by the node. This is usually empty on TRON. |
| eth_getBalance | Query the TRX balance of an account. |
Block queries
| Method | Purpose |
|---|---|
| eth_blockNumber | Query the latest block number. |
| eth_getBlockByHash | Query a block by block hash. |
| eth_getBlockByNumber | Query a block by block number. |
| eth_getBlockReceipts | Query all receipts in a block. |
| eth_getBlockTransactionCountByHash | Query the number of transactions in a block by hash. |
| eth_getBlockTransactionCountByNumber | Query the number of transactions in a block by number. |
| eth_getWork | Return the current TRON block hash. |
Transaction queries
| Method | Purpose |
|---|---|
| eth_getTransactionByHash | Query a transaction by hash. |
| eth_getTransactionByBlockHashAndIndex | Query a transaction by block hash and index. |
| eth_getTransactionByBlockNumberAndIndex | Query a transaction by block number and index. |
| eth_getTransactionReceipt | Query a transaction receipt. |
Contracts and storage
| Method | Purpose |
|---|---|
| eth_call | Simulate a read-only contract call without submitting a transaction. |
| eth_getCode | Query contract bytecode. |
| eth_getStorageAt | Query the value stored in a contract storage slot. |
| eth_estimateGas | Estimate the Energy required by a transaction. |
| eth_gasPrice | Query the current Energy price in sun. |
Filters and logs
| Method | Purpose |
|---|---|
| eth_newFilter | Create a log filter. |
| eth_newBlockFilter | Create a new-block filter. |
| eth_getFilterChanges | Poll filter changes. |
| eth_getFilterLogs | Get all logs matched by a filter. |
| eth_getLogs | Query logs directly by filter criteria. |
| eth_uninstallFilter | Uninstall a filter. |
Chain and protocol information
| Method | Purpose |
|---|---|
| eth_chainId | Query the chain ID. On TRON, this is derived from the low 4 bytes of the genesis block hash. |
| eth_coinbase | Return the SR address associated with the node. |
| eth_protocolVersion | Query the protocol version. |
| eth_syncing | Query node synchronization status. |
Related resources
- TVM vs. EVM — behavior differences for eth_* methods, especially chainId, selfdestruct, and create2
- Migrate Ethereum contracts to TRON — use Web3.js, ethers, or viem with TRON
- buildTransaction — TRON-specific transaction construction