useComplianceRoleConstants
Read a compliance-manager clone's role identifiers.
@tokenops/sdk/fhe-airdrop/react{ data, isLoading, error, refetch }Description
Read a compliance-manager clone's role identifiers. address is the CLONE.
Both values are bytecode constants, so this is cacheable indefinitely
(staleTime: Infinity by default, overridable through query). Feed them
into useComplianceHasRole, useComplianceRoleMembers and the
role mutations rather than hand-hashing keccak256("DELEGATION_ADMIN_ROLE")
client-side, which would turn a constant renamed in a future contract
version into a grant of a role nothing checks.
Bundled despite being only two reads, so the shape matches
useAirdropRoleConstants and the factory equivalent - and because two
one-line hooks for two constants is the pattern this subpath avoids.
Signature
function useComplianceRoleConstants(args: UseComplianceRoleConstantsArgs): UseQueryResult<ComplianceRoleConstants, Error>;Example
const { data: roles } = useComplianceRoleConstants({ address: managerAddress });
const { data: canDelegate } = useComplianceHasRole({
address: managerAddress,
role: roles?.DELEGATION_ADMIN_ROLE,
holder: account,
});Pulled directly from the hook's TSDoc block — the same snippet your IDE shows on hover.
See also
Other Introspection hooks in airdrop v2: