Actions61
- Activity Actions
- Asset Actions
- Custom Query Actions
- Hub Actions
- Lending Actions
- Market Data Actions
- Position Management Actions
- Position Swap Actions
- Protocol Actions
- Reserve Actions
- Spoke Actions
- Swap Actions
- User Position Actions
Lending → Prepare Supply
AI-generatedSummary
Prepare a supply transaction for a specified lending reserve, optionally enabling collateral and using permit for gasless approval.
Inputs
- chainId — Chain identifier or name to use for the transaction
- lendingReserveId (required) — Identifier or name of the reserve to supply
- lendingAmount (required) — Amount of the asset to supply, expressed in the asset's main unit
- lendingSenderAddress (required) — Sender wallet address that will initiate the transaction
- lendingEnableCollateral — Whether to mark the supplied asset as collateral
- lendingUsePermit — Whether to use EIP‑2612 permit for gasless token approval
Output shape
a transaction confirmation object (typically containing a transaction hash)
On success the operation returns a confirmation payload; failures are thrown as errors.
Examples
Example 1: Supply 2.5 ETH from address 0xAbc... on Ethereum mainnet, enabling collateral
{"chainId": "mainnet", "lendingReserveId": "0xReserve...", "lendingAmount": "2.5", "lendingSenderAddress": "0xAbc...", "lendingEnableCollateral": true}
Example 2: Supply 1000 USDC via a permit without paying gas
{"chainId": "arbitrum", "lendingReserveId": "0xUSDCReserve...", "lendingAmount": "1000", "lendingSenderAddress": "0xDef...", "lendingUsePermit": true}
Example 3: Prepare a borrow action as a preview without actually executing
{"chainId": "polygon", "lendingReserveId": "0xBorrowReserve...", "lendingAmount": "500", "lendingSenderAddress": "0xGhi...", "lendingUsePermit": false}