Allow TRX transfers under 10,000,000 sun (10 TRX)
Theamount field is denoted in sun, the lowest denomination of TRX.
Allow all TRX transfers (TransferContract)
Allow USDT (TRC-20) transfers on Nile testnet
This policy allowstransfer calls (selector a9059cbb) on the Nile testnet USDT contract. The contract address differs between Nile testnet and Tron mainnet — double check before reusing this on mainnet.
tron.tx.contract[0].data has no 0x prefix (it is stripped for alignment with the examples above); the top-level tron.tx.data convenience field keeps the 0x prefix. See the language page for the full breakdown. The policy language has no substring slicing — use startsWith / endsWith / contains / matches instead, as in the examples on this page.Restrict a TRC-20 transfer’s recipient using the ABI-encoded parameter
An ERC-20-styletransfer(address,uint256) call encodes as: 4-byte selector + the to address left-padded to 32 bytes + the amount. Since the selector and the zero-padding before the address are both fixed, you can pin the recipient with a single startsWith check over selector + padding + address (no substring slicing needed). This lets you enforce an allowed recipient even though 0xkey does not decode ABI parameters for Tron.
Restrict resource delegation to an allowlisted receiver (gasless sponsorship)
Use this on the sponsor wallet’s policy to ensureDelegateResourceContract calls can only grant resources to a specific end-user address and cannot exceed a balance cap. See Gasless Tron transactions for the full sponsorship flow.