IntrospectionuseQuery
useRoleConstants
Read all eight AccessControl role hashes off the manager in one fan-out.
Import
@tokenops/sdk/fhe-vesting/reactReturn
{ data, isLoading, error, refetch }Lifecycle
IntrospectionDescription
Read all eight AccessControl role hashes off the manager in one fan-out.
Each hash is bytecode-immutable, so this is cacheable indefinitely. Pair
with useHasRole for membership checks.
Signature
@tokenops/sdk/fhe-vesting/react
ts
function useRoleConstants(options: ManagerHookOptions): UseQueryResult<RoleConstants, Error>;Example
components/useRoleConstantsExample.tsx
tsx
"use client";
import { useRoleConstants } from "@tokenops/sdk/fhe-vesting/react";
export function Example() {
const { data, isLoading } = useRoleConstants(/* args */);
if (isLoading) return "loading…";
return <pre>{JSON.stringify(data, null, 2)}</pre>;
}Auto-generated from the hook's shape (the SDK doesn't carry a TSDoc @example here yet).
See also
Other Introspection hooks in vesting:
useConfidentialVestingFactoryImplementationRead the FHE-vesting factory's current implementation() address — the LibClone target every new manager clone delegates to.useFactoryInitCodeHashRead the init-code hash the factory would use to CREATE2 a manager clone with the given token + deployer (+ optional immutable flags).useManagerDeploymentBlockNumberRead the manager clone's immutable DEPLOYMENT_BLOCK_NUMBER — the block at which the factory deployed this clone via LibClone.