deposit

Calls the "deposit" function on the contract (useful to wrap ETH).

Example

import { deposit } from "thirdweb/extensions/erc20";
import { sendTransaction } from "thirdweb";
const transaction = deposit({ contract, amount: "0.1" });
await sendTransaction({ transaction, account });
function deposit(

Parameters

The options for the "deposit" function.

Type

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.