vault:deposit
Deposit an exact amount of the underlying asset into an ERC-4626 vault, approving the vault automatically when needed. Works with any 4626-compliant vault such as sDAI, Morpho or Yearn v3. For ERC-7540 asynchronous vaults use vault:request-deposit instead.
⚗️ Experimental — available at next.evmcrispr.com.
Supports runtime fields inside smart blocks. Use explicit @helper! expressions or captured outputs; other fields are evaluated at build time.
Syntax
Section titled “Syntax”vault:deposit <assets> <into> <vault>Arguments
Section titled “Arguments”| Name | Type | Evaluation | Description |
|---|---|---|---|
assets | number | Runtime in smart blocks | Amount of the underlying asset to deposit, in base units (wei) |
into | command | Build time | Keyword into |
vault | address | Build time | ERC-4626 vault address |
Options
Section titled “Options”| Name | Type | Evaluation | Description |
|---|---|---|---|
--to | address | Runtime in smart blocks | Receiver of the minted shares (defaults to the connected account) |
--no-approve | bool | Build time | Skip the automatic allowance check and approve action |
Examples
Section titled “Examples”# Deposit 100 WXDAI into the sDAI vault on Gnosis (auto-approves)vault:deposit 100e18 into 0xaf204776c7245bF4147c2612BF6e5972Ee483701
# Deposit 1000 USDC into the Steakhouse USDC Morpho vault on Ethereumload vault
switch mainnetvault:deposit 1000e6 into 0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB
# Import the command to drop the vault: prefixload vault [deposit]
deposit 100e18 into 0xaf204776c7245bF4147c2612BF6e5972Ee483701