Skip to main content

eth_getTransactionCount

Returns the number of transactions sent from an address.

Params

  1. Address: string. The address to get the number of transactions from.
  2. BlockNumber: string (optional). The block number to get the number of transactions at. If omitted, the latest block is used.

Result

Returns a Promise that resolves with an integer that represents the number of transactions sent from the given address.

Example

const transactionCount = await provider.request({
method: 'eth_getTransactionCount',
params: [
'0x...',
'latest'
]
});
console.log(transactionCount); // [1]