PreiseGitHubDashboard

TRON

wallet/updatesetting15 Credits

Builds an unsigned transaction that updates the energy share (consume_user_resource_percent) of a contract.

Netzwerk: tron

Parameter

NameTypBeschreibung
owner_addressstringTransaction initiator address (base58 or hex).
contract_addressstringContract address (base58 or hex).
consume_user_resource_percentnumberPercentage (0 to 100) of the Energy paid by the caller.
Permission_idnumberPermission ID for multi-signature accounts; defaults to the owner permission (0). (optional)
visiblebooleantrue = base58 addresses (in the request and the response); false (default) = hex addresses. (optional)

Rückgabewert

Typ

Object

Unsigned transaction object (txID, raw_data, raw_data_hex, visible). It is only built, not signed or broadcast; sign it and send it with wallet/broadcasttransaction. On failure an object with an Error string (still HTTP 200).

Codebeispiele

curl 'https://holy-burned-sky-tron-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7/wallet/updatesetting' \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "owner_address": "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy",
  "contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
  "consume_user_resource_percent": 50,
  "visible": true
}'