approve_liquidator_token
Approve loan token spending for the Moolah liquidator contract to enable liquidation. Pass exact amount or 'max' for unlimited approval (user opt-in required).
Instructions
Approve loan token spending for the Moolah public liquidator contract. Required before calling moolah_liquidate. Pass the EXACT amount you intend to use (recommended). Pass amount='max' for unlimited approval ONLY when the user explicitly opts in — it lets the liquidator contract spend the user's entire balance, present and future, until revoked (amount='0').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Exact amount to approve (e.g. '100'), or 'max' for unlimited (NOT recommended; user must opt in). | |
| network | No | Network. Default: mainnet | |
| tokenSymbol | Yes | Token symbol for display (e.g. 'USDT') | |
| tokenAddress | Yes | Loan token contract address (Base58) | |
| tokenDecimals | Yes | Token decimals (e.g. 6 for USDT). Integer in [0, 38]. |