useIsAddressRole
Check if an address is a member of a specific role
function useIsAddressRole<TContract extends ContractWithRoles>(
contract: RequiredParam<TContract>,
role: RolesForContract<TContract>,
walletAddress: RequiredParam<string>,
): boolean;
Parameters
Returns
true if the address is a member of the role, or false if not
type ReturnType = boolean;
Example
const {
data: isMember,
isLoading,
error,
} = useIsAddressRole(contract, "admin", "{{wallet_address}}");