typescript-sdk

Home > @3rdweb/sdk > BundleModule > transferBatchFrom

BundleModule.transferBatchFrom() method

Transfer Many NFTs

Signature:

transferBatchFrom(from: string, to: string, args: INFTBundleBatchArgs[], data?: BytesLike): Promise<TransactionReceipt>;

Parameters

Parameter Type Description
from string  
to string  
args INFTBundleBatchArgs[]  
data BytesLike  

Returns:

Promise<TransactionReceipt>

Remarks

Transfer NFTs from the one wallet to another.

Example

// Address of the wallet to send the NFT from
const fromAddress = "";
// Address of the wallet you want to send the NFT to
const toAddress = "0x...";

// The data of the NFTs you want to send
const data = [{
  tokenId: 1, // The token ID of the NFT you want to send
  amount: 1, // The number of this NFT you want to send
}, {
  tokenId: 2,
  amount: 1,
}]

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