safeTransferFrom

Prepares a transaction to call the "safeTransferFrom" function on the contract.

Example

import { sendTransaction } from "thirdweb";
import { safeTransferFrom } from "thirdweb/extensions/erc1155";
const transaction = safeTransferFrom({
contract,
from: ...,
to: ...,
tokenId: ...,
value: ...,
data: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function safeTransferFrom(
| { asyncParams: () => Promise<SafeTransferFromParams> }
>,

Parameters

The options for the "safeTransferFrom" function.

Type

| { asyncParams: () => Promise<SafeTransferFromParams> }
>;

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.