v1

latestOpenAPI 3.1.02026-07-2612501.4 MB

estimateenergy

Estimate the energy required for the successful execution of smart contract transactions or deploying a contract.

post/node/v1/tron/mainnet/{apiKey}/wallet/estimateenergy

Path parameters

apiKeystring required

please <span class="custom-style"><a href="../docs/quick-start-guide#-creating-your-api-key-on-the-zan-platform" target="_blank">create your own API key</a></span>

Request body

owner_addressstring required

Owner address that triggers the contract. If visible=true, use base58check format, otherwise use hex format. For constant call you can use the all-zero address.

contract_addressstring required

Smart contract address. If visible=true, use base58check format, otherwise use hex format.

function_selectorstring

Function call, must not be left blank.

parameterstring

Parameter encoding needs to be in accordance with the ABI rules, the rules are more complicated, users can use the ethers library to encode,For details, please refer to the document-Guide-Smart Contract-Best Practice-Parameter Encoding and Decoding.

visibleboolean required

Optional.Whehter the address is in base58 format.

Response

200

energy_requiredinteger