getFeeCalculatorForBlockhash RPC Method
Returns the fee calculator associated with the query blockhash, or null if the
blockhash has expired
This method is expected to be removed in solana-core v2.0. Please use
isBlockhashValid or
getFeeForMessage instead.
Parameters#
stringrequired
query blockhash, as a base-58 encoded string
objectoptional
Configuration object containing the following fields:
The commitment describes how finalized a block is at that point in time.
minContextSlotnumberoptional
The minimum slot that the request can be evaluated at.
Result#
The result will be an RpcResponse JSON object with value equal to:
<null>- if the query blockhash has expired; or<object>- otherwise, a JSON object containing:feeCalculator: <object>-FeeCalculatorobject describing the cluster fee rate at the queried blockhash
Code sample#
curl https://api.devnet.solana.com -s -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getFeeCalculatorForBlockhash",
"params": [
"GJxqhuxcgfn5Tcj6y3f8X4FeCDd2RQ6SnEMo1AAxrPRZ"
]
}
'
Response#
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 221
},
"value": {
"feeCalculator": {
"lamportsPerSignature": 5000
}
}
},
"id": 1
}