setApprovalForAll

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

Example

import { sendTransaction } from "thirdweb";
import { setApprovalForAll } from "thirdweb/extensions/erc721";
const transaction = setApprovalForAll({
contract,
operator: ...,
approved: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function setApprovalForAll(
| { asyncParams: () => Promise<SetApprovalForAllParams> }
>,

Parameters

The options for the "setApprovalForAll" function.

Type

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

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.