POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
updatesetting
wallet/updatesetting
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/updatesetting \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "TSNEe5Tf4rnc9zPMNXfaTF5fZfHDDH8oyW",
  "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs",
  "consume_user_resource_percent": 10,
  "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 consume user resource percentage setting for a smart contract. This setting determines what percentage of the contract caller’s resources (bandwidth and energy) should be consumed when executing 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 settings
  • contract_address — address of the smart contract to update settings for
  • consume_user_resource_percent — percentage (0-100) of caller’s resources to consume
  • 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 setting 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/updatesetting method is used for:
  • Adjusting resource consumption patterns for smart contract execution.
  • Optimizing contract costs by controlling user vs contract owner resource usage.
  • Managing energy and bandwidth allocation between contract and users.
  • Implementing different pricing models for contract interactions.
  • Fine-tuning contract economics and user experience trade-offs.
  • Setting up contracts to be more or less resource-friendly to callers.
Only the contract owner can update the consume user resource percentage. Setting this to 100 means all resources come from the caller, while 0 means all resources come from the contract owner. The default is typically 100.

Body

application/json

Response

200 - application/json

Contract setting update transaction

The response is of type object.