typescript-sdk

Home > @3rdweb/sdk > TokenModule > transferFrom

TokenModule.transferFrom() method

Transfer Tokens From Address

Signature:

transferFrom(from: string, to: string, amount: BigNumberish): Promise<TransactionReceipt>;

Parameters

Parameter Type Description
from string  
to string  
amount BigNumberish  

Returns:

Promise<TransactionReceipt>

Remarks

Transfer tokens from one wallet to another

Example

// Address of the wallet sending the tokens
const fromAddress = "";
// Address of the wallet you want to send the tokens to
const toAddress = "0x...";
// The number of tokens you want to send
const amount = 100

// Note that the connected wallet must have approval to transfer the tokens of the fromAddress
await module.transferFrom(fromAddress, toAddress, amount);