vault.depositYield(DepositYield)
Deposit yield into a vault’s reward distributor. This approves the ERC20 amount and then deposits it.
DepositYield Type Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| depositorSigner | Signer | Required | Signer that deposits yield. Must be connected to a provider. |
| vault | string | Required | Vault address. |
| erc20 | string | Required | ERC20 token address used to deposit yield. |
| decimals | number | Required | ERC20 token decimals. |
| humanReadableAmount | string | Required | Amount to deposit in human-readable units (e.g., "1"). |
Returns
| Field | Type | Description |
|---|---|---|
| status | deposited | Status of the operation. |
| vault | string | Vault address. |
| rewardDistributor | string | Reward distributor contract address. |
| depositor | string | Address that submitted the transaction. |
| token | { address: string; decimals: number } | ERC20 token details. |
| amount | { human: string; units: bigint } | Amount details. |
| approval | { status: 'approved'; spender: string; allowanceBefore: bigint; allowanceAfter: bigint } | Approval details for the reward distributor. |
| receipt | TransactionReceipt | Transaction receipt for the deposit call. |

