eth
eth namespace APIs.
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. 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 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.
Differences Overview from Ethereum
Please check the Caution section which describes the differences between Klaytn and Ethereum when serving eth namespace APIs in more detail.
Block
Related APIs: eth_getHeaderByNumber, eth_getHeaderByHash, eth_getBlockByHash, eth_getBlockByNumber, eth_getUncleByBlockHashAndIndex, eth_getUncleByBlockNumberAndIndex.
Field | Description |
---|---|
baseFeePerGas | This field always has the value |
difficulty | This field corresponds to |
extraData | This field always has the value |
gasLimit | This field always has the value |
miner | This field returns the block proposer's address, because Klaytn's consensus mechanism is PBFT, which has a block proposer instead of miners. |
mixHash | This field always has zeroHash ( |
nonce | This field always has zeroNonce ( |
sha3Uncles | This field always has |
totalDifficulty | The total difficulty of the chain until the querying block. |
uncles | This field always has the value |
Fields not covered here will stick to the block fields of Ethereum.
Transaction
Related APIs: eth_getTransactionByHash, eth_getTransactionByBlockHashAndIndex, eth_getTransactionByBlockNumberAndIndex, 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 in Klaytn's context, this value is determined in the system via the governance processes. |
type | In Klaytn, |
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
Related APIs: 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) 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.
Last updated