write_wallet_approve
Build an unsigned approval transaction. For ERC20 tokens: generates approve(spender, amount). For ERC721/ERC1155 NFTs (e.g. LP positions): generates setApprovalForAll(operator, true). Required before write_account_deposit or write_account_add_liquidity (when depositing from wallet). Tip: call read_wallet_allowances first to check if approval already exists: skip this if the current allowance is sufficient.
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": {
"token_address": "<token_address>",
"spender_address": "<spender_address>"
},
"name": "write_wallet_approve"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | ERC20 only: amount in raw units, or 'max_uint256' for unlimited. Ignored for NFTs. | max_uint256 |
| chain_id | No | Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood) | |
| asset_type | No | Token type: 'erc20' (default) for fungible tokens, 'erc721' or 'erc1155' for NFTs (LP positions) | erc20 |
| token_address | Yes | Token contract address to approve | |
| spender_address | Yes | Address being approved — use the Arcadia account address for deposits |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | ||
| transaction | Yes | ||
| predicted_account_address | No |