POSTUpdateSetting

Tron Mainnethttps://tron-mainnet.nodit.io/wallet/updatesetting

Update the consume_user_resource_percent parameter of a smart contract

Request Body
owner_addressstringrequired

Transaction initiator address. (Format: Base58 or Hex)

contract_addressstringrequired

Contract address. (Format: Base58 or Hex). Example: TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs

consume_user_resource_percentinteger (int32)required

Percentage of Energy paid by the contract caller (vs. the deployer). Range: 0–100. Default: 0 (deployer pays all). Example: 10 (caller pays 10%, deployer pays 90%).

Permission_idinteger (int32)

Optional. Permission ID used for multi-signature account operations. Defaults to the owner permission (0) if unspecified.

visibleboolean

Optional. Set to true to format addresses in Base58; set to false for hex format. (Default: false)

Responses
owner_addressstring

Transaction initiator address. (Format: Base58 or Hex)

contract_addressstring

Contract address. (Format: Base58 or Hex)

consume_user_resource_percentint64 (int64)

Percentage of user Energy consumption for a smart contract. (Range: [0-100])

X-API-KEY
RequestCU30
cURL
curl -X POST "https://tron-mainnet.nodit.io/wallet/updatesetting" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "owner_address": "TUoHaVjx7n5xz8LwPRDckgFrDWhMhuSuJM",
  "contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
  "consume_user_resource_percent": 10,
  "visible": true
}'
Response
Example · 200
{
  "owner_address": "string",
  "contract_address": "string"
}