curl --request POST \
--url https://tempo-mainnet.core.chainstack.com/c3ce2925b51f1ed18719fe8a23bbdccf/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": [
"0x9729187D9E8Bbefa8295F39f5634cA454dd9d294",
"latest"
],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}curl --request POST \
--url https://tempo-mainnet.core.chainstack.com/c3ce2925b51f1ed18719fe8a23bbdccf/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": [
"0x9729187D9E8Bbefa8295F39f5634cA454dd9d294",
"latest"
],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}Tempo API method that returns the number of transactions sent from an address (the nonce). This is used to set the correct nonce when sending transactions.Documentation Index
Fetch the complete documentation index at: https://chainstack-mintlify-flesh-empty-pages.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
address — the address to get the transaction count forblockParameter — the block number (hex) or tag (latest, earliest, pending)result — the number of transactions sent from the address encoded as hexadecimaleth_getTransactionCount code examplesconst Web3 = require("web3");
const NODE_URL = "CHAINSTACK_NODE_URL";
const web3 = new Web3(NODE_URL);
async function getNonce() {
const nonce = await web3.eth.getTransactionCount("0x9729187D9E8Bbefa8295F39f5634cA454dd9d294");
console.log(`Nonce: ${nonce}`);
}
getNonce()
Was this page helpful?