curl --request POST \
--url https://optimism-mainnet.core.chainstack.com/efb0a5eccd2caa5135eb54eba6f7f300 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"id": 1,
"params": [
"0xF977814e90dA44bFA03b6295A0616a897441aceC",
"latest"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}
curl --request POST \
--url https://optimism-mainnet.core.chainstack.com/efb0a5eccd2caa5135eb54eba6f7f300 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"id": 1,
"params": [
"0xF977814e90dA44bFA03b6295A0616a897441aceC",
"latest"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}
eth_getTransactionCount
retrieves the number of transactions sent from a specified address, often used to determine the nonce for the next transaction from that address.
address
— the address to get the transaction count for. In this example.block
— the block number (in hexadecimal) or one of the strings "earliest"
, "latest"
, or "pending"
, indicating the state to consider. The default is "latest"
.result
— the number of transactions sent from the specified address, returned as a hexadecimal string.eth_getTransactionCount
method is essential for:
The number of transactions sent from the address
The response is of type object
.
Was this page helpful?