transfer()

Triggers a transfer to the address provided.

Parameters

NameTypeRequiredDescription
toStringYAddress of user being sent the transfer
tokenIdNumberYToken ID being transferred
amountNumberNAmount of tokens being transferred, if not included, defaults to 1

Response

{
    "hash": "string"
}

Example Usage

const to = // an address;
const tokenId = 0;

// ERC721
const transaction = await contract.transfer(to, tokenId);

// ERC1155
const amount = 1;
const transaction = await contract.transfer(to, tokenId, amount);

Possible Errors

Errors in the connect() function

Feedback

Something not quite right, unclear or can't find what you are looking for? Please let us know at support.moonpay.com and we will get back to you as soon as we can.