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 });

Parameters

Returns

A prepared transaction object.