--- title: estimateEnergy --- # estimateEnergy Estimate the energy required to trigger the contract. This interface requires the fullnode node to enable the service. If the call is not enabled, an error will be reported. You can continue to use the triggerconstantcontract interface to estimate the energy. (v5.1.0 new interface) ## Usage ``` javascript const result = await tronWeb.transactionBuilder.estimateEnergy(contractAddress, functionSelector, options, parameter, issuerAddress); ``` ## Parameters The parameters of `estimateEnergy()` is same as [triggerSmartContract()](./triggerSmartContract). ## Returns ```typescript { /** * The energy required for trigger the contract. */ energy_required: number; result: { result: boolean; } } ``` ## Example ``` javascript const result = await tronWeb.transactionBuilder.estimateEnergy( 'TPYwAC9Y4uUcT2QH3WPPjqxzJSJWymMoMS', 'balanceOf(address)', {}, [{ type:'address',value: 'THvMiWQeVPGEMuBtAnuKn2QpuSjqjrGQGu' }] ) // output-start { "result": { "result": true, }, "energy_required": 900000 } // output-end ```