Skip to main content

deposit

Description:

Deposit (stake) in a vault

Arguments:

NameTypeRequiredDescription
assetsbigintYesDeposit amount
userAddressstringYesThe user address
vaultAddressstringYesThe address of the vault

Example:

const params = {
assets: 0n,
userAddress: '0x...',
vaultAddress: '0x...',
}

// Send transaction
const hash = await sdk.vault.deposit(params)
// When you sign transactions on the backend (for custodians)
const { data, to, value } = await sdk.vault.deposit.encode(params)
// Get an approximate gas per transaction
const gas = await sdk.vault.deposit.estimateGas(params)