Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
owner_address
— address of the account that would execute the contract callcontract_address
— address of the smart contract to estimate energy forfunction_selector
— function signature of the contract method to call (e.g., “balanceOf(address)”)parameter
— hex-encoded parameters to pass to the functionvisible
— boolean indicating whether to use visible (Base58) address format instead of hex
Response
result
— estimation result object containing:result
— boolean indicating if estimation was successfulenergy_required
— estimated energy consumption for the function call
energy_used
— total energy that would be consumedconstant_result
— array of return values if the function is a view/pure functiontransaction
— transaction object with estimated costs if applicable
Use case
Thewallet/estimateenergy
method is used for:
- Predicting transaction costs before executing smart contract calls.
- Building user interfaces that show estimated fees upfront.
- Optimizing contract interactions by choosing energy-efficient functions.
- Implementing cost-aware transaction batching and prioritization.
- Creating accurate fee estimation tools for wallets and dApps.
- Analyzing contract performance and identifying gas-intensive operations.
Use this method before calling expensive contract functions to give users accurate cost estimates. This is especially useful for functions that might fail due to insufficient energy, allowing you to prevent failed transactions.
Body
application/json
Address executing the contract call
Address of the smart contract
Function signature to call
Hex-encoded parameters for the function
Whether to use visible (Base58) address format