Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions public/content/developers/docs/apis/json-rpc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[]

Returns an object with data about the sync status or `false`.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_syncing">
Try endpoint in playground
</ButtonLink>

**Parameters**

None
Expand Down Expand Up @@ -387,6 +391,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}

Returns the client coinbase address.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_coinbase">
Try endpoint in playground
</ButtonLink>

> **Note:** This method has been deprecated as of **v1.14.0** and is no longer supported. Attempting to use this method will result in a "Method not supported" error.

**Parameters**
Expand Down Expand Up @@ -414,6 +422,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":6

Returns the chain ID used for signing replay-protected transactions.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_chainId">
Try endpoint in playground
</ButtonLink>

**Parameters**

None
Expand All @@ -439,6 +451,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":67

Returns `true` if client is actively mining new blocks. This can only return `true` for proof-of-work networks and may not be available in some clients since [The Merge](/roadmap/merge/).

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_mining">
Try endpoint in playground
</ButtonLink>

**Parameters**

None
Expand All @@ -464,6 +480,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_mining","params":[],"id":71}

Returns the number of hashes per second that the node is mining with. This can only return `true` for proof-of-work networks and may not be available in some clients since [The Merge](/roadmap/merge/).

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_hashrate">
Try endpoint in playground
</ButtonLink>

**Parameters**

None
Expand All @@ -489,6 +509,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":7

Returns an estimate of the current price per gas in wei. For example, the Besu client examines the last 100 blocks and returns the median gas unit price by default.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_gasPrice">
Try endpoint in playground
</ButtonLink>

**Parameters**

None
Expand All @@ -514,6 +538,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":7

Returns a list of addresses owned by client.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_accounts">
Try endpoint in playground
</ButtonLink>

**Parameters**

None
Expand All @@ -539,6 +567,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1

Returns the number of most recent block.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_blockNumber">
Try endpoint in playground
</ButtonLink>

**Parameters**

None
Expand All @@ -564,6 +596,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id

Returns the balance of the account of given address.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getBalance">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `DATA`, 20 Bytes - address to check for balance.
Expand Down Expand Up @@ -594,6 +630,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x407

Returns the value from a storage position at a given address.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getStorageAt">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `DATA`, 20 Bytes - address of the storage.
Expand Down Expand Up @@ -662,6 +702,10 @@ curl -X POST --data '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": [

Returns the number of transactions _sent_ from an address.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getTransactionCount">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `DATA`, 20 Bytes - address.
Expand Down Expand Up @@ -695,6 +739,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params

Returns the number of transactions in a block from a block matching the given block hash.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getBlockTransactionCountByHash">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `DATA`, 32 Bytes - hash of a block
Expand Down Expand Up @@ -724,6 +772,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHa

Returns the number of transactions in a block matching the given block number.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getBlockTransactionCountByNumber">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `QUANTITY|TAG` - integer of a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [block parameter](/developers/docs/apis/json-rpc/#block-parameter).
Expand Down Expand Up @@ -755,6 +807,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNu

Returns the number of uncles in a block from a block matching the given block hash.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getUncleCountByBlockHash">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `DATA`, 32 Bytes - hash of a block
Expand Down Expand Up @@ -784,6 +840,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","p

Returns the number of uncles in a block from a block matching the given block number.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getUncleCountByBlockNumber">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `QUANTITY|TAG` - integer of a block number, or the string `"latest"`, `"earliest"`, `"pending"`, `"safe"` or `"finalized"`, see the [block parameter](/developers/docs/apis/json-rpc/#block-parameter)
Expand Down Expand Up @@ -815,6 +875,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber",

Returns code at a given address.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getCode">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `DATA`, 20 Bytes - address
Expand Down Expand Up @@ -994,6 +1058,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params"

Executes a new message call immediately without creating a transaction on the blockchain. Often used for executing read-only smart contract functions, for example the `balanceOf` for an ERC-20 contract.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_call">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `Object` - The transaction call object
Expand Down Expand Up @@ -1028,6 +1096,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{see above}]

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_estimateGas">
Try endpoint in playground
</ButtonLink>

**Parameters**

See [eth_call](#eth_call) parameters, except that all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit.
Expand All @@ -1053,6 +1125,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{see

Returns information about a block by hash.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getBlockByHash">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `DATA`, 32 Bytes - Hash of a block.
Expand Down Expand Up @@ -1130,6 +1206,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0

Returns information about a block by block number.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getBlockByNumber">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `QUANTITY|TAG` - integer of a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [block parameter](/developers/docs/apis/json-rpc/#block-parameter).
Expand Down Expand Up @@ -1158,6 +1238,10 @@ Result see [eth_getBlockByHash](#eth_getblockbyhash)

Returns the information about a transaction requested by transaction hash.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getTransactionByHash">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `DATA`, 32 Bytes - hash of a transaction
Expand Down Expand Up @@ -1217,6 +1301,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","param

Returns information about a transaction by block hash and transaction index position.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getTransactionByBlockHashAndIndex">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `DATA`, 32 Bytes - hash of a block.
Expand Down Expand Up @@ -1245,6 +1333,10 @@ Result see [eth_getTransactionByHash](#eth_gettransactionbyhash)

Returns information about a transaction by block number and transaction index position.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getTransactionByBlockNumberAndIndex">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `QUANTITY|TAG` - a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"` or `"finalized"`, as in the [block parameter](/developers/docs/apis/json-rpc/#block-parameter).
Expand Down Expand Up @@ -1341,6 +1433,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","para

Returns information about a uncle of a block by hash and uncle index position.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getUncleByBlockHashAndIndex">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `DATA`, 32 Bytes - The hash of a block.
Expand Down Expand Up @@ -1371,6 +1467,10 @@ Result see [eth_getBlockByHash](#eth_getblockbyhash)

Returns information about a uncle of a block by number and uncle index position.

<ButtonLink size="sm" variant="outline" href="https://ethereum-json-rpc.com/?method=eth_getUncleByBlockNumberAndIndex">
Try endpoint in playground
</ButtonLink>

**Parameters**

1. `QUANTITY|TAG` - a block number, or the string `"earliest"`, `"latest"`, `"pending"`, `"safe"`, `"finalized"`, as in the [block parameter](/developers/docs/apis/json-rpc/#block-parameter).
Expand Down