# eth

The namespace `eth` provides functions related to accounts, blocks, transactions, configurations of networks or nodes, filters, and so on.

Klaytn now supports the namespace `eth` of [Ethereum's JSON-RPC API](https://eth.wiki/json-rpc/API). Please note that some return values have been adjusted to match the Ethereum's API response body.

And due to the fundamental design differences between Klaytn and Ethereum, Klaytn's data structure (Transaction, Block, and TransactionReceipt) cannot be fully supported via `eth` namespace APIs.

Please check the [Differences Overview from Ethereum](#differences_overview_from_ethereum) in this document.

**NOTE**: `eth` namespace APIs are supported from Klaytn v1.8.0.

The list below enumerates the API functions. All `eth` namespace APIs are supported on Klaytn.

### [Account](/content/dapp/json-rpc/api-references/eth/account.md) <a href="#account" id="account"></a>

* [eth\_accounts](/content/dapp/json-rpc/api-references/eth/account.md#eth_accounts)
* [eth\_getBalance](/content/dapp/json-rpc/api-references/eth/account.md#eth_getbalance)
* [eth\_getCode](/content/dapp/json-rpc/api-references/eth/account.md#eth_getcode)
* [eth\_getTransactionCount](/content/dapp/json-rpc/api-references/eth/account.md#eth_gettransactioncount)
* [eth\_sign](/content/dapp/json-rpc/api-references/eth/account.md#eth_sign)

### [Block](/content/dapp/json-rpc/api-references/eth/block.md) <a href="#block" id="block"></a>

* [eth\_blockNumber](/content/dapp/json-rpc/api-references/eth/block.md#eth_blocknumber)
* [eth\_getHeaderByNumber](/content/dapp/json-rpc/api-references/eth/block.md#eth_getheaderbynumber)
* [eth\_getHeaderByHash](/content/dapp/json-rpc/api-references/eth/block.md#eth_getheaderbyhash)
* [eth\_getBlockByNumber](/content/dapp/json-rpc/api-references/eth/block.md#eth_getblockbynumber)
* [eth\_getBlockByHash](/content/dapp/json-rpc/api-references/eth/block.md#eth_getblockbyhash)
* [eth\_getUncleByBlockHashAndIndex](/content/dapp/json-rpc/api-references/eth/block.md#eth_getunclebyblockhashandindex)
* [eth\_getUncleByBlockNumberAndIndex](/content/dapp/json-rpc/api-references/eth/block.md#eth_getunclebyblocknumberandindex)
* [eth\_getBlockTransactionCountByNumber](/content/dapp/json-rpc/api-references/eth/block.md#eth_getblocktransactioncountbynumber)
* [eth\_getBlockTransactionCountByHash](/content/dapp/json-rpc/api-references/eth/block.md#eth_getblocktransactioncountbyhash)
* [eth\_getUncleCountByBlockNumber](/content/dapp/json-rpc/api-references/eth/block.md#eth_getunclecountbyblocknumber)
* [eth\_getUncleCountByBlockHash](/content/dapp/json-rpc/api-references/eth/block.md#eth_getunclecountbyblockhash)
* [eth\_getStorageAt](/content/dapp/json-rpc/api-references/eth/block.md#eth_getstorageat)
* [eth\_mining](/content/dapp/json-rpc/api-references/eth/block.md#eth_mining)
* [eth\_syncing](/content/dapp/json-rpc/api-references/eth/block.md#eth_syncing)

### [Transaction](/content/dapp/json-rpc/api-references/eth/transaction.md) <a href="#transaction" id="transaction"></a>

* [eth\_call](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_call)
* [eth\_estimateGas](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_estimategas)
* [eth\_getTransactionByBlockHashAndIndex](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_gettransactionbyblockhashandindex)
* [eth\_getTransactionByBlockNumberAndIndex](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_gettransactionbyblocknumberandindex)
* [eth\_getTransactionByHash](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_gettransactionbyhash)
* [eth\_getTransactionReceipt](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_gettransactionreceipt)
* [eth\_sendRawTransaction](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_sendrawtransaction)
* [eth\_sendTransaction](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_sendtransaction)
* [eth\_signTransaction](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_signtransaction)
* [eth\_fillTransaction](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_filltransaction)
* [eth\_pendingTransactions](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_pendingtransactions)
* [eth\_resend](/content/dapp/json-rpc/api-references/eth/transaction.md#eth_resend)

### [Configuration](/content/dapp/json-rpc/api-references/eth/config.md) <a href="#configuration" id="configuration"></a>

* [eth\_coinbase](/content/dapp/json-rpc/api-references/eth/config.md#eth_coinbase)
* [eth\_etherbase](/content/dapp/json-rpc/api-references/eth/config.md#eth_etherbase)
* [eth\_chainId](/content/dapp/json-rpc/api-references/eth/config.md#eth_chainid)
* [eth\_gasPrice](/content/dapp/json-rpc/api-references/eth/config.md#eth_gasprice)

### [Filter](/content/dapp/json-rpc/api-references/eth/filter.md) <a href="#filter" id="filter"></a>

* [eth\_getFilterChanges](/content/dapp/json-rpc/api-references/eth/filter.md#eth_getfilterchanges)
* [eth\_getFilterLogs](/content/dapp/json-rpc/api-references/eth/filter.md#eth_getfilterlogs)
* [eth\_getLogs](/content/dapp/json-rpc/api-references/eth/filter.md#eth_getlogs)
* [eth\_newBlockFilter](/content/dapp/json-rpc/api-references/eth/filter.md#eth_newblockfilter)
* [eth\_newFilter](/content/dapp/json-rpc/api-references/eth/filter.md#eth_newfilter)
* [eth\_newPendingTransactionFilter](/content/dapp/json-rpc/api-references/eth/filter.md#eth_newpendingtransactionfilter)
* [eth\_subscribe](/content/dapp/json-rpc/api-references/eth/filter.md#eth_subscribe)
* [eth\_uninstallFilter](/content/dapp/json-rpc/api-references/eth/filter.md#eth_uninstallfilter)
* [eth\_unsubscribe](/content/dapp/json-rpc/api-references/eth/filter.md#eth_unsubscribe)

### [Gas](/content/dapp/json-rpc/api-references/eth/gas.md) <a href="#gas" id="gas"></a>

* [eth\_feeHistory](/content/dapp/json-rpc/api-references/eth/gas.md#eth_feehistory)
* [eth\_maxPriorityFeePerGas](/content/dapp/json-rpc/api-references/eth/gas.md#eth_maxpriorityfeepergas)

### [Miscellaneous](/content/dapp/json-rpc/api-references/eth/misc.md) <a href="#miscellaneous" id="miscellaneous"></a>

* [eth\_hashrate](/content/dapp/json-rpc/api-references/eth/misc.md#eth_hashrate)
* [eth\_getWork](/content/dapp/json-rpc/api-references/eth/misc.md#eth_getwork)
* [eth\_submitWork](/content/dapp/json-rpc/api-references/eth/misc.md#eth_submitwork)
* [eth\_submitHashrate](/content/dapp/json-rpc/api-references/eth/misc.md#eth_submithashrate)

## Differences Overview from Ethereum <a href="#differences_overview_from_ethereum" id="differences_overview_from_ethereum"></a>

> Please check the [Caution](/content/dapp/json-rpc/api-references/eth/caution.md) section which describes the differences between Klaytn and Ethereum when serving eth namespace APIs in more detail.

### Block <a href="#block" id="block"></a>

Related APIs: [eth\_getHeaderByNumber](https://github.com/klaytn/klaytn-docs/blob/main/docs/dapp/json-rpc/api-references/eth/block/README.md#eth_getHeaderByNumber), [eth\_getHeaderByHash](https://github.com/klaytn/klaytn-docs/blob/main/docs/dapp/json-rpc/api-references/eth/block/README.md#eth_getHeaderByHash), [eth\_getBlockByHash](https://github.com/klaytn/klaytn-docs/blob/main/docs/dapp/json-rpc/api-references/eth/block/README.md#eth_getBlockByHash), [eth\_getBlockByNumber](https://github.com/klaytn/klaytn-docs/blob/main/docs/dapp/json-rpc/api-references/eth/block/README.md#eth_getBlockByNumber), [eth\_getUncleByBlockHashAndIndex](https://github.com/klaytn/klaytn-docs/blob/main/docs/dapp/json-rpc/api-references/eth/block/README.md#eth_getUncleByBlockHashAndIndex), [eth\_getUncleByBlockNumberAndIndex](https://github.com/klaytn/klaytn-docs/blob/main/docs/dapp/json-rpc/api-references/eth/block/README.md#eth_getUncleByBlockNumberAndIndex).

| Field           | Description                                                                                                                                                                                                                                                                                                                                                                                                 |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| baseFeePerGas   | This field always has the value `0x0` because Klaytn does not have a baseFeePerGas scheme.                                                                                                                                                                                                                                                                                                                  |
| difficulty      | This field corresponds to `blockScore` in the Klaytn header, which is fixed to `0x1`. This is because Klaytn's consensus mechanism is not based on PoW, indicating the technical concept of block difficulty is not applicable to Klaytn core.                                                                                                                                                              |
| extraData       | This field always has the value `0x` indicating the empty value. Owing to the fact that Klaytn's `extraData` contains consensus data such as validators addresses, validators signatures, and proposer signature, it is not applicable to `eth` namespace API.                                                                                                                                              |
| gasLimit        | This field always has the value `0xe8d4a50fff`(=`999999999999` in decimal), which is an arbitrary figure since Klaytn has no GasLimit. At the time of writing, this figure is 30 times higher than the [block gas limit of Ethereum](https://ethereum.org/en/developers/docs/gas/#block-size). Please refer to [Computation Cost](/content/klaytn/design/computation/computation-cost.md) for more details. |
| miner           | This field returns the block proposer's address, because Klaytn's [consensus mechanism](/content/klaytn/design/consensus-mechanism.md) is [PBFT](/content/klaytn/design/consensus-mechanism.md#pbft-practical-byzantine-fault-tolerance), which has a block proposer instead of miners.                                                                                                                     |
| mixHash         | This field always has zeroHash (`0x00...`) because Klaytn's consensus mechanism is not based on PoW.                                                                                                                                                                                                                                                                                                        |
| nonce           | This field always has zeroNonce (`0x00...`) because Klaytn's consensus mechanism is not based on PoW.                                                                                                                                                                                                                                                                                                       |
| sha3Uncles      | This field always has `0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347`, which is the Keccak256 hash of the RLP-encoded bytes of the list containing empty block header because there are no uncles blocks on Klaytn.                                                                                                                                                                    |
| totalDifficulty | The total difficulty of the chain until the querying block.                                                                                                                                                                                                                                                                                                                                                 |
| uncles          | This field always has the value `[]` because there is no technical concept of uncles block in Klaytn core.                                                                                                                                                                                                                                                                                                  |

Fields not covered here will stick to the block fields of Ethereum.

### Transaction <a href="#transaction" id="transaction"></a>

Related APIs: [eth\_getTransactionByHash](https://github.com/klaytn/klaytn-docs/blob/main/docs/dapp/json-rpc/api-references/eth/transaction/README.md#eth_getTransactionByHash), [eth\_getTransactionByBlockHashAndIndex](https://github.com/klaytn/klaytn-docs/blob/main/docs/dapp/json-rpc/api-references/eth/transaction/README.md#eth_getTransactionByBlockHashAndIndex), [eth\_getTransactionByBlockNumberAndIndex](https://github.com/klaytn/klaytn-docs/blob/main/docs/dapp/json-rpc/api-references/eth/transaction/README.md#eth_getTransactionByBlockNumberAndIndex), [eth\_pendingTransactions](https://github.com/klaytn/klaytn-docs/blob/main/docs/dapp/json-rpc/api-references/eth/transaction/README.md#eth_pendingTransactions).

> Due to the fundamental design differences between Klaytn and Ethereum, Klaytn transactions cannot be fully supported via `eth` namespace APIs.

| Field    | Description                                                                                                                                                                                                                          |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| gasPrice | Also known as [Unit Price](/content/klaytn/design/transaction-fees.md#unit-price) in Klaytn's context, this value is determined in the system via the governance processes.                                                          |
| type     | In Klaytn, `type` returns the transaction type in string (e.g. `"LegacyTransaction"`), but it has been converted to hexadecimal (e.g. `0x0`) to match Ethereum. Transaction types that are only valid in Klaytn always return `0x0`. |

Klaytn transactions can have more than one signature because Klaytn supports MultiSig (Ethereum transactions only have one signature field (= v, r, s)) even on protocol-level. In that context, fields related to signature (v, r, s) will match `tx.signatures[0].V`, `tx.signatures[0].R`, and `tx.signatures[0].S`.

Fields not covered here will stick to the transaction fields of Ethereum.

### Transaction Receipt <a href="#transaction_receipt" id="transaction_receipt"></a>

Related APIs: [eth\_getTransactionReceipt](https://github.com/klaytn/klaytn-docs/blob/main/docs/dapp/json-rpc/api-references/eth/transaction/README.md#eth_getTransactionReceipt).

> Due to the fundamental design differences existing between Klaytn and Ethereum, Klaytn transaction receipt cannot be fully supported when served via Ethereum namespace APIs.

| Field             | Description                                                                                                                                                                                                   |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| effectiveGasPrice | Since Klaytn uses a fixed gas price policy, the gasPrice value is returned. gasPrice(also called [Unit Price](/content/klaytn/design/transaction-fees.md#unit-price)) is set in the system by the governance. |
| transactionIndex  | Almost same with Ethereum but unlike Ethereum, Klaytn returns integer as it is when its pending.                                                                                                              |

Fields not covered here will stick to Ethereum's suggested fields of transaction\_receipt.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://archive-docs.klaytn.foundation/content/dapp/json-rpc/api-references/eth.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
