post https://api.infstones.com/starknet/mainnet/
Get the nonce associated with the given address in the given block
Parameters
BLOCK PARAMETER
Object Name | Required | Type | Detail |
---|---|---|---|
BLOCK PARAMETER | ✅ | String | "block_hash", "block_number", "latest", "pending" |
CONTRACT ADDRESS | ✅ | String | The address of the contract whose nonce we're seeking. |
"params": [
"latest",
"0x044e5b3f0471a26bc749ffa1d8dd8e43640e05f1b33cf05cef6adee6f5b1b4cf"
]
Result
The last nonce used for the given contract.
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '
{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getNonce",
"params": [
"latest",
"0x044e5b3f0471a26bc749ffa1d8dd8e43640e05f1b33cf05cef6adee6f5b1b4cf"
]
}
'
Return
{
"jsonrpc": "2.0",
"result": "0x0",
"id": 1
}