grantRoles

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

Example

import { grantRoles } from "thirdweb/extensions/modular";
const transaction = grantRoles({
contract,
user: ...,
roles: ...,
overrides: {
...
}
});
// Send the transaction
...
function grantRoles(
| { asyncParams: () => Promise<GrantRolesParams> }
>,

Parameters

The options for the "grantRoles" function.

Type

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

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.