跳到主要内容

eth_getTransactionCount

Returns the number of transactions sent from an address

curl --request POST \
--url https://evm.confluxrpc.com \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": ["0x1e6309dc46a2a4936abda54b69c91d7a3c75a39e",null],
"method": "eth_getTransactionCount"
}'

Params

address required

Schema
type : string
Pattern : ^0x[0-9,a-f,A-F]{40}$

blocknumber optional

Block Number or Tags
oneOf
type : string
Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$

Result

Schema
type : string
Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$

Examples

Request

curl -X POST --data \
'{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getTransactionCount",
"params": [
"0x1e6309dc46a2a4936abda54b69c91d7a3c75a39e"
]
}' \
-H "Content-Type: application/json" \
localhost:12539

Response

"0x6"