Skip to main content

useAllRoleMembers() function

This feature is currently in beta and may change based on feedback that we receive.

Use this to get the roles of a

Example

const { data: roles, isLoading, error } = useAllRoleMembers(SmartContract);

Signature:

export declare function useAllRoleMembers<TContract extends ContractWithRoles>(
contract: RequiredParam<TContract>,
): import("@tanstack/react-query").UseQueryResult<
Awaited<Record<RolesForContract<TContract>, string[]>>,
unknown
>;

Parameters

ParameterTypeDescription
contractRequiredParam<TContract>an instance of a

Returns:

import("@tanstack/react-query").UseQueryResult<Awaited<Record<RolesForContract<TContract>, string[]>>, unknown>

a list of addresses for all supported roles on the contract.