Skip to main content
POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
updateenergylimit
wallet/updateenergylimit
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/updateenergylimit \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "THPvaUhoh2Qn2y9THCZML3H815hhFhn5YC",
  "contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
  "origin_energy_limit": 100000000,
  "visible": true
}'
{
  "visible": true,
  "txID": "<string>",
  "raw_data": {
    "contract": [
      "<any>"
    ],
    "ref_block_bytes": "<string>",
    "ref_block_hash": "<string>",
    "expiration": 123,
    "timestamp": 123
  },
  "raw_data_hex": "<string>"
}
TRON API method that updates the origin energy limit for a smart contract. This setting determines the maximum amount of energy the contract creator provides for contract execution, affecting how much energy users need to provide when calling the contract.
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 contract owner who can update the energy limit
  • contract_address — address of the smart contract to update energy limit for
  • origin_energy_limit — maximum energy amount the contract creator provides (in energy units, not TRX/sun)
  • visible — boolean indicating whether to use visible (Base58) address format instead of hex

Response

  • visible — boolean indicating whether addresses are in visible format
  • txID — unique transaction ID for the energy limit update transaction
  • raw_data — raw transaction data containing:
    • contract — array with contract update details
    • ref_block_bytes — reference block bytes for transaction validation
    • ref_block_hash — hash of the reference block
    • expiration — transaction expiration timestamp
    • timestamp — transaction creation timestamp
  • raw_data_hex — complete transaction data encoded in hexadecimal format

Use case

The wallet/updateenergylimit method is used for:
  • Setting energy subsidies for contract users to improve user experience.
  • Managing contract execution costs by controlling energy allocation.
  • Optimizing contract economics by adjusting energy provision strategies.
  • Implementing freemium models where basic operations are subsidized.
  • Balancing between contract owner costs and user accessibility.
  • Adjusting energy limits based on contract usage patterns and feedback.
Only the contract owner can update the origin energy limit. Higher limits mean the contract owner covers more execution costs, making the contract cheaper for users to interact with. The value is specified in energy units (not TRX/sun).

curl example

Shell
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/updateenergylimit' \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "THPvaUhoh2Qn2y9THCZML3H815hhFhn5YC",
  "contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
  "origin_energy_limit": 100000000,
  "visible": true
}'
This builds an unsigned transaction if the owner_address exists and is authorized (contract owner). Otherwise the node returns a validation error.
1

verify owner account exists

Use wallet/getaccount to make sure the address is activated and format matches visible.
Shell
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getaccount' \
  --header 'Content-Type: application/json' \
  --data '{ "address": "THPvaUhoh2Qn2y9THCZML3H815hhFhn5YC", "visible": true }'
2

confirm contract and owner

wallet/getcontract expects a hex address. It returns origin_address (the deployer/owner) and current settings.
Shell
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getcontract' \
  --header 'Content-Type: application/json' \
  --data '{ "value": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c" }'
common validation errors:
  • Account [41…] does not exist — the payer address does not exist on-chain or the format does not match visible. Query it with wallet/getaccount and fund/activate it first.
  • No permission or similar — the owner_address is not the contract owner; only the origin_address can update settings.
  • Contract not found — check the contract address and use hex for wallet/getcontract.

Body

application/json
owner_address
string
required

Address of the contract owner

contract_address
string
required

Address of the smart contract

origin_energy_limit
number
required

Maximum energy amount the contract creator provides (energy units)

visible
boolean

Whether to use visible (Base58) address format

Response

Contract energy limit update transaction

visible
boolean

Whether addresses are in visible format

txID
string

Transaction ID for the energy limit update

raw_data
object
raw_data_hex
string

Raw transaction data in hex format