factor_give_approval
Approve an ERC20 token for spending by a specified spender, such as a vault, before depositing when allowance is insufficient; set an exact base-unit amount or "max" for unlimited approval.
Instructions
Approve an ERC20 token for spending by a spender address (e.g., a vault). This MUST be called before depositing tokens into a vault if the vault does not have sufficient allowance. Use "max" amount for unlimited approval, or specify an exact amount in base units. Always call this before factor_deposit if the vault needs allowance.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tokenAddress": "<tokenAddress>",
"spenderAddress": "<spenderAddress>"
},
"name": "factor_give_approval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Amount to approve in base units (wei), or "max" for unlimited approval. Default: "max" | |
| password | No | Wallet password if the wallet is encrypted | |
| tokenAddress | Yes | The ERC20 token address to approve | |
| spenderAddress | Yes | The address to approve spending for (e.g., vault address, factory address) |