Skip to main content

Erc1155.transfer() method

Transfer a single NFT

Example

// Address of the wallet you want to send the NFT to
const toAddress = "{{wallet_address}}";
const tokenId = "0"; // The token ID of the NFT you want to send
const amount = 3; // How many copies of the NFTs to transfer
await contract.transfer(toAddress, tokenId, amount);

Signature:

transfer(to: string, tokenId: BigNumberish, amount: BigNumberish, data?: BytesLike): Promise<TransactionResult>;

Parameters

ParameterTypeDescription
tostring
tokenIdBigNumberish
amountBigNumberish
dataBytesLike(Optional)

Returns:

Promise<TransactionResult>

Remarks

Transfer an NFT from the connected wallet to another wallet.