eth_getTransactionCount
返回指定地址发生的交易数量。
参数
DATA
- 20字节,地址QUANTITY|TAG
- 整数块编号,或字符串"latest"、"earliest"或"pending"
params: [
'0x407d73d8a49eeb85d32cf465507dd71d507100c1',
'latest' // state at the latest block
]
返回值
QUANTITY
- 从指定地址发出的交易数量,整数
示例代码
请求:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0x407d73d8a49eeb85d32cf465507dd71d507100c1","latest"],"id":1}'
响应:
{
"id":1,
"jsonrpc": "2.0",
"result": "0x1" // 1
}