deposit

Prepares a transaction to call the "deposit" function on the contract.

Example

import { sendTransaction } from "thirdweb";
import { deposit } from "thirdweb/extensions/erc4626";
const transaction = deposit({
contract,
assets: ...,
receiver: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function deposit(
DepositParams | { asyncParams: () => Promise<DepositParams> }
>,

Parameters

The options for the "deposit" function.

Type

DepositParams | { asyncParams: () => Promise<DepositParams> }
>;

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.