Docs

wallet/estimateenergy - Estimate TRON Energy Co...

Estimate energy consumption for TRON smart contract calls before execution. Optimize transaction costs and resource planning with Dwellir RPC.

Optimize Smart Contract Costs

Dwellir's TRON endpoints provide accurate energy estimation to help you optimize smart contract execution costs. Plan your transactions and avoid energy shortfalls with precise cost forecasting.

Optimize your energy usage

Estimates the energy consumption required for executing a smart contract call on the TRON network. Essential for cost planning and resource management.

When to Use This Method

wallet/estimateenergy is essential for:

  • Cost Planning - Estimate transaction costs before execution
  • Resource Management - Plan energy requirements for smart contracts
  • User Interfaces - Display estimated costs to users
  • Batch Operations - Calculate total energy needed for multiple calls
  • Energy Optimization - Compare different execution strategies

Implementation Examples

Response Examples

Successful Energy Estimation

JSON
{
  "energy_required": 13326,
  "result": {
    "result": true
  },
  "energy_used": 13326
}

Failed Estimation (Insufficient Balance)

JSON
{
  "energy_required": 0,
  "result": {
    "result": false,
    "code": "REVERT",
    "message": "revert Insufficient balance"
  }
}

Need help? Contact our support team or check the TRON documentation.