starknet_estimateFee - Estimate Transaction...
Estimate fees for Starknet transactions before execution.
Estimates the resources and fees required for executing a sequence of transactions on Starknet.
Request Parameters
Array of transactions to estimate
Optional simulation parameters (`SKIP_VALIDATE` to skip validation phase)
Block reference: `"latest"` (most recent block), block hash, or block number
Response Body
`overall_fee` - Total fee in wei (felt252) `gas_consumed` - Total gas consumed (felt252) `gas_price` - Gas price in wei per unit (felt252)
Examples
curl -X POST https://api-starknet-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "starknet_estimateFee",
"params": [
[
{
"type": "INVOKE",
"sender_address": "0x1234567890abcdef1234567890abcdef12345678",
"calldata": [
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"0x83afdfe4cdc632f4b21f8bdebabc13e47c1f1b4b97fc8b5b4b1c4e6746a3a7e0",
"0x3",
"0xde0b6b3a7640000",
"0x0",
"0x456789abcdef456789abcdef456789ab"
],
"version": "0x3",
"signature": ["0x0"],
"nonce": "0x1"
}
],
["SKIP_VALIDATE"],
"latest"
],
"id": 1
}'starknet_chainId - Get Starknet Chain ID
Returns the currently configured Starknet chain ID as a felt252 hex value. Used for network identification, transaction signing, and multi-chain routing.
starknet_estimateMessageFee - Estimate L1-to-L2 Message Fee
Estimate the L2 fee for processing a message sent from Ethereum L1 to Starknet L2. Essential for cross-layer communication and bridge integrations.