wrap_trx
Convert TRX to WTRX at a 1:1 rate for use in DeFi protocols like JustLend that require TRC20 tokens. Ensure enough TRX balance for the wrap amount and gas fees.
Instructions
Wrap native TRX into WTRX (Wrapped TRX) at a 1:1 rate by sending TRX to the WTRX contract's payable deposit(). WTRX is a TRC20 representation of TRX used by DeFi protocols that can't hold native TRX (e.g. JustLend V2 / Moolah markets quoting WTRX). Reversible: unwrap_trx converts WTRX back to TRX 1:1. Pre-checks: sufficient TRX balance for the wrap amount + gas.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount of TRX to wrap into WTRX (human-readable decimal string, e.g. '1' or '10.5') | |
| network | No | Network. Default: mainnet |