useFactoryRoleConstants
Read the factory's role identifiers in one fan-out.
@tokenops/sdk/fhe-airdrop/advanced/react{ data, isLoading, error, refetch }Description
Read the factory's role identifiers in one fan-out.
Every value is a bytecode constant, so this defaults to staleTime: Infinity
(overridable through query). Feed the results into
useFactoryHasRole, useFactoryRoleMembers and the three
factory role mutations - hand-hashing keccak256("FEE_MANAGER_ROLE")
client-side would turn a constant renamed in a future factory version into a
grantRole that silently grants a role nothing checks.
Bundled rather than shipped as five one-liners: a role panel needs the whole
palette to render at all. Paired with useFactoryRoleMembers it is
also the live check FACTORY_ROLE_CONCENTRATION_NOTE asks for - read the
five roles, list each one's holders, and see for yourself whether they sit on
one key on the chain you are actually connected to, rather than trusting a
fixed string about one deployment at one point in time.
Signature
function useFactoryRoleConstants(args?: UseFactoryRoleConstantsArgs): UseQueryResult<FactoryRoleConstants, Error>;Example
const { data: roles } = useFactoryRoleConstants();
const { data: feeManagers } = useFactoryRoleMembers({ role: roles?.FEE_MANAGER_ROLE });Pulled directly from the hook's TSDoc block — the same snippet your IDE shows on hover.
See also
Other Introspection hooks in airdrop v2:
usePredictEcdsaAirdropAddressWhere an ECDSA create* from deployer with this (mode, userSalt) pair would land.usePredictMerkleAirdropAddressWhere a Merkle create* from deployer with this (mode, userSalt) pair would land.useEcdsaInitCodeHashInit-code hash of the ECDSA proxy the factory would deploy for mode.useMerkleInitCodeHashInit-code hash of the Merkle proxy the factory would deploy for mode - the Merkle counterpart of useEcdsaInitCodeHash, with the same before/after bracketing job and the same /advanced/react home.