# eth

Không gian tên `eth` cung cấp các hàm liên quan đến tài khoản, khối, giao dịch, cấu hình của mạng hoặc nút, bộ lọc, v.v.

Klaytn hiện hỗ trợ không gian tên `eth` của [API JSON-RPC của Ethereum](https://eth.wiki/json-rpc/API). Xin lưu ý rằng một số giá trị trả về đã được điều chỉnh để phù hợp với nội dung phản hồi API của Ethereum.

Và do sự khác biệt cơ bản về thiết kế giữa Klaytn và Ethereum, nên Cấu trúc dữ liệu của Klaytn (Giao dịch, Chặn và Biên lai giao dịch) sẽ không được hỗ trợ hoàn chỉnh thông qua API không gian tên `eth`.

Vui lòng kiểm tra [Tổng quan về sự khác biệt với Ethereum](#differences_overview_from_ethereum) trong tài liệu này.

**LƯU Ý**: API không gian tên `eth` được hỗ trợ từ Klaytn v1.8.0.

Danh sách dưới đây liệt kê các hàm API. Tất cả các API không gian tên `eth` được hỗ trợ trên Klaytn.

### \[Tài khoản]\(./eth/tài khoản.md) <a href="#account" id="account"></a>

* [eth\_tài khoảns](/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)

### [Khối](/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)

### [Giao dịch](/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)

### [Cấu hình](/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)

### \[Bộ lọc]\(./eth/bộ lọc.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)

### [Khác](/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)

## Tổng quan về sự khác biệt so với Ethereum <a href="#differences_overview_from_ethereum" id="differences_overview_from_ethereum"></a>

> Vui lòng xem phần [Cảnh báo](/content/dapp/json-rpc/api-references/eth/caution.md) mô tả chi tiết về sự khác biệt giữa Klaytn và Ethereum khi thực thi API không gian tên eth.

### Khối <a href="#block" id="block"></a>

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

| Trường          | Mô tả                                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| baseFeePerGas   | Trường này luôn có giá trị `0x0` vì Klaytn không có chế độ baseFeePerGas.                                                                                                                                                                                                                                                                                                                                               |
| độ khó          | Trường này tương ứng với `blockScore` trong tiêu đề Klaytn, được cố định thành `0x1`. Lý do là vì cơ chế đồng thuận của Klaytn không dựa trên PoW (bằng chứng xử lý) nhằm biểu thị khái niệm kỹ thuật về độ khó của khối không áp dụng cho nhân Klaytn.                                                                                                                                                                 |
| extraData       | Trường này luôn có giá trị là `0x` biểu thị giá trị rỗng. Do `extraData` của Klaytn chứa dữ liệu đồng thuận như địa chỉ của người xác thực, chữ ký của người xác thực và chữ ký của người đề xuất nên dữ liệu này không thể áp dụng cho API không gian tên `eth`.                                                                                                                                                       |
| gasLimit        | Trường này luôn có giá trị là `0xe8d4a50fff`(=`999999999999` ở dạng thập phân), đây là một con số bất kỳ vì Klaytn không có GasLimit. Tại thời điểm tạo bài viết này, con số này cao gấp 30 lần so với [giới hạn gas khối của Ethereum](https://ethereum.org/en/developers/docs/gas/#block-size). Vui lòng tham khảo [Chi phí tính toán](/content/klaytn/design/computation/computation-cost.md) để biết thêm chi tiết. |
| miner           | Trường này trả về địa chỉ của người đề xuất khối, vì [cơ chế đồng thuận](/content/klaytn/design/consensus-mechanism.md) của Klaytn là [PBFT](/content/klaytn/design/consensus-mechanism.md#pbft-practical-byzantine-fault-tolerance), trong đó có một người đề xuất khối thay vì thợ đào.                                                                                                                               |
| mixHash         | Trường này luôn có giá trị là zeroHash (`0x00...`) vì cơ chế đồng thuận của Klaytn không dựa trên PoW.                                                                                                                                                                                                                                                                                                                  |
| số dùng một lần | Trường này luôn có giá trị là zeroNonce (`0x00...`) do cơ chế đồng thuận của Klaytn không dựa trên PoW.                                                                                                                                                                                                                                                                                                                 |
| sha3Uncles      | Trường này luôn có giá trị `0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347`, là mã băm Keccak256 của các byte được mã hóa RLP của danh sách chứa tiêu đề khối trống vì không có khối chú trên Klaytn.                                                                                                                                                                                               |
| totalDifficulty | Tổng độ khó của chuỗi cho đến khối truy vấn.                                                                                                                                                                                                                                                                                                                                                                            |
| uncles          | Trường này luôn có giá trị `[]` vì không có khái niệm kỹ thuật về khối chú trong Klaytn core.                                                                                                                                                                                                                                                                                                                           |

Các trường không được đề cập ở đây sẽ gán vào các trường khối của Ethereum.

### Giao dịch <a href="#transaction" id="transaction"></a>

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

> Do sự khác biệt cơ bản về thiết kế giữa Klaytn và Ethereum, Các giao dịch Klaytn không thể được hỗ trợ đầy đủ thông qua các API không gian tên `eth`.

| Trường  | Mô tả                                                                                                                                                                                                                                           |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| giá gas | Còn được gọi là [Đơn giá](/content/klaytn/design/transaction-fees.md#unit-price) trong bối cảnh của Klaytn, giá trị này được xác định trong hệ thống thông qua các quy trình quản trị.                                                          |
| loại   | Trong Klaytn, `loại` trả về loại giao dịch theo chuỗi (ví dụ: `"LegacyTransaction"`), nhưng đã được chuyển đổi sang hệ thập lục phân (ví dụ: `0x0`) để khớp với Ethereum. Các loại giao dịch chỉ hợp lệ trong Klaytn luôn trả về giá trị `0x0`. |

Các giao dịch Klaytn có thể có nhiều hơn một chữ ký vì Klaytn hỗ trợ MultiSig (các giao dịch Ethereum chỉ có một trường chữ ký (= v, r, s)) ngay cả ở cấp độ giao thức. Trong ngữ cảnh đó, các trường liên quan đến chữ ký (v, r, s) sẽ khớp với `tx.signatures[0].V`, `tx.signatures[0].R` và `tx.signatures[0].S`.

Các trường không được đề cập ở đây sẽ gán vào các trường giao dịch của Ethereum.

### Biên lai giao dịch <a href="#transaction_receipt" id="transaction_receipt"></a>

API liên quan: [eth\_getTransactionReceipt](https://github.com/klaytn/klaytn-docs-vn/blob/main/docs/dapp/json-rpc/api-references/eth/transaction/README.md#eth_getTransactionReceipt).

> Do sự khác biệt thiết kế cơ bản tồn tại giữa Klaytn và Ethereum, Biên lai giao dịch Klaytn không thể được hỗ trợ đầy đủ khi được cung cấp qua API không gian tên Ethereum.

| Trường            | Mô tả                                                                                                                                                                                                                 |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| effectiveGasPrice | Giá trị gasPrice được trả về do Klaytn áp dụng chính sách giá gas cố định. gasPrice (còn được gọi là [Đơn giá](/content/klaytn/design/transaction-fees.md#unit-price)) được cơ chế quản trị thiết lập trong hệ thống. |
| transactionIndex  | Gần giống như Ethereum nhưng khác với Ethereum ở chỗ Klaytn trả về số nguyên như khi giao dịch đang chờ xử lý.                                                                                                        |

Các trường không được đề cập ở đây sẽ gán vào các trường giao dịch\_receipt được đề xuất của Ethereum.


---

# 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-vn.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.
