starknet_estimateMessageFee

Estimates the resources required by the l1_handler transaction induced by the message.

Path parameters

apiKeystringRequired

Request

This endpoint expects an object.
MSG_FROM_L1objectRequired
The Message from L1 object
block_idobject or enumRequired

The hash of the requested block, the block number (height) of the requested block, or a block tag (latest or pending)

Response

Array of fee estimation results
l1_data_gas_consumedstring or null
The amount of Layer 1 data gas consumed by the transaction
l1_data_gas_pricestring or null

The price per unit of Layer 1 data gas (in WEI)

l1_gas_consumedstring or null
The amount of Layer 1 execution gas consumed by the transaction
l1_gas_pricestring or null

The price per unit of Layer 1 execution gas (in WEI)

l2_gas_consumedstring or null
The amount of Layer 2 gas consumed by the transaction
l2_gas_pricestring or null

The price per unit of Layer 2 gas (in WEI)

overall_feestring or null
The total estimated fee for the transaction in WEI, computed using all gas consumed and respective prices
unitstring or null
The unit in which the overall fee is expressed