Prepares a transaction to call the "grantRoles" function on the contract.
import { sendTransaction } from "thirdweb";import { grantRoles } from "thirdweb/extensions/modules"; const transaction = grantRoles({ contract, user: ..., roles: ..., overrides: { ... }}); // Send the transactionawait sendTransaction({ transaction, account });
function grantRoles( options: BaseTransactionOptions< | GrantRolesParams | { asyncParams: () => Promise<GrantRolesParams> } >,): PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>;
The options for the "grantRoles" function.
let options: BaseTransactionOptions< GrantRolesParams | { asyncParams: () => Promise<GrantRolesParams> }>;
let returnType: PreparedTransaction< any, AbiFunction, PrepareTransactionOptions>;
A prepared transaction object.