prepare_tron_vote
Build unsigned TRON VoteWitnessContract transactions to cast votes for Super Representatives and earn voting rewards on frozen TRX. VoteWitness replaces all prior votes atomically — pass every SR you intend to back.
Instructions
Build an unsigned TRON VoteWitnessContract transaction — casts votes for Super Representatives to earn voting rewards on frozen TRX. IMPORTANT: VoteWitness REPLACES the wallet's entire prior vote allocation atomically. Pass every SR you intend to back (not just a delta); an empty votes array clears all votes. Sum of count values must not exceed the wallet's available TRON Power — check list_tron_witnesses(address) → availableVotes first. count is an integer (1 vote = 1 TRX of TRON Power). Rewards accrue per block and are harvested via prepare_tron_claim_rewards (24h cooldown). Returns a preview + opaque handle; forward via send_transaction for USB-HID signing on the paired Ledger.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Base58 TRON owner address (prefix T). | |
| votes | Yes | Full vote allocation. VoteWitness REPLACES all prior votes atomically — pass every SR you intend to back, not just the delta. An empty array clears all votes. Sum of counts must not exceed the wallet's available TRON Power (see `list_tron_witnesses` → `availableVotes`); TronGrid rejects otherwise. |