safeTransferFrom

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

Example

import { safeTransferFrom } from "thirdweb/extensions/erc1155";
const transaction = safeTransferFrom({
contract,
from: ...,
to: ...,
tokenId: ...,
value: ...,
data: ...,
overrides: {
...
}
});
// Send the transaction
...
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.