eth_getTransactionCount RPC Method
MegaETH nodes use a ~15-day pruning window for historical state data. Querying the transaction count at a block older than ~15 days (1,296,064 blocks) may fail because the required account history has been pruned. For more details, see the MegaETH Pruning Policy.
Parameters
address
string
REQUIRED
Loading...
blockNumber
string
REQUIRED
Loading...
Returns
result
string
Loading...
Request
1curl -X POST "https://docs-demo.megaeth-mainnet.quiknode.pro/" \2-H "Content-Type: application/json" \3-d '{4"jsonrpc": "2.0",5"method": "eth_getTransactionCount",6"params": [7"0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",8"latest"9],10"id": 111}'
1curl -X POST "https://docs-demo.megaeth-mainnet.quiknode.pro/" \2-H "Content-Type: application/json" \3-d '{4"jsonrpc": "2.0",5"method": "eth_getTransactionCount",6"params": [7"0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",8"latest"9],10"id": 111}'
Response
1{2"jsonrpc": "2.0",3"result": "0x24478",4"id": 15}
1{2"jsonrpc": "2.0",3"result": "0x24478",4"id": 15}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free