prepare_compound_supply
Build unsigned Compound V3 supply transactions for base tokens or collateral, automatically handling ERC-20 approvals when required for DeFi operations.
Instructions
Build an unsigned Compound V3 supply transaction (base token or collateral). If an ERC-20 approve() is required first, it is returned as the outer tx with supply in .next.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | 0x-prefixed EVM wallet address (40 hex chars) that will execute this action. | |
| chain | No | EVM chain the Comet market lives on. Defaults to ethereum. | ethereum |
| market | Yes | Comet market address (e.g. cUSDCv3). Discover via get_compound_positions or the Compound registry. | |
| asset | Yes | ERC-20 token address being supplied or withdrawn — either the market's base token or a listed collateral token. | |
| amount | Yes | Human-readable decimal amount of `asset`, NOT raw wei/base units. Example: "10" for 10 USDC. Pass "max" for full-balance withdraw. | |
| approvalCap | No | Cap on the ERC-20 approval preceding this action. Omit for "unlimited" (standard DeFi UX — fewer follow-up approvals). Pass "exact" to approve only what this action pulls. Pass a decimal string (e.g. "500") for a specific ceiling in the asset's human units; must be ≥ the action amount, otherwise the transaction would revert. |