hasRole

Checks if the target account has the role.

Example

import { hasRole } from "thirdweb/extensions/permissions";
const result = await hasRole({
contract,
role: "admin",
targetAccountAddress: "0x1234567890123456789012345678901234567890",
});
function hasRole(
): Promise<boolean>;

Parameters

The options for checking the role.

Type

Returns

let returnType: Promise<boolean>;

A boolean that is true if the target account has the role.