starknet_estimateFee
Estimates the resources required by a given sequence of transactions when applied on a given state. If one of the transactions reverts or fails due to any reason (e.g., validation failure or an internal error), a TRANSACTION_EXECUTION_ERROR is returned. For v0-2 transactions the estimate is given in wei, and for v3 transactions it is given in fri.
Path parameters
Request
The transaction to estimate
Describes what parts of the transaction should be executed
The hash of the requested block, or number (height) of the requested block, or a block tag, for the block referencing the state or call the transaction on.
Response
The fee estimations
The Ethereum gas consumption of the transaction
The gas price (in wei or fri, depending on the tx version) that was used in the cost estimation
The Ethereum data gas consumption of the transaction
The data gas price (in wei or fri, depending on the tx version) that was used in the cost estimation
The estimated fee for the transaction (in wei or fri, depending on the tx version), equals to gas_consumed * gas_price + data_gas_consumed * data_gas_price
Units in which the fee is given