Transfers ERC20 tokens from the sender's address to the specified recipient address.
import { transfer } from "thirdweb/extensions/erc20";import { sendTransaction } from "thirdweb"; const transaction = transfer({ contract, to: "0x...", amount: 100,}); await sendTransaction({ transaction, account });
function transfer( options: BaseTransactionOptions<TransferParams>,): PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>;
The options for the transfer transaction.
let options: BaseTransactionOptions<TransferParams>;
let returnType: PreparedTransaction< any, AbiFunction, PrepareTransactionOptions>;
A promise that resolves to the prepared transaction.