Parameters
chainId
string
default:"starknet-sepolia"
required
Unique identifier for a blockchain network.
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"starknet_estimateMessageFee"
required
JSON-RPC method name.
Parameters for starknet_estimateMessageFeePositional parameters for starknet_estimateMessageFee:params[0]: Message from L1 objectparams[1]: Block identifier object
Returns
Estimated fee for processing the l1_handler transaction
Ethereum gas consumed by the transaction
Gas price used in estimation (wei or fri)
Ethereum data gas consumed by the transaction
Data gas price used in estimation (wei or fri)
Estimated total fee = gas + data gas cost
curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=starknet-sepolia \
--header 'content-type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_estimateMessageFee",
"params": [
{},
{}
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"from_address": "FROM_ADDRESS",
"to_address": "TO_ADDRESS",
"entry_point_selector": "ENTRY_POINT_SELECTOR",
"payload": []
},
"latest"
]
}