useRoleMembers() function
This feature is currently in beta and may change based on feedback that we receive.
Use this to get the members of a role on a
Example
const {
  data: members,
  isLoading,
  error,
} = useRoleMembers(SmartContract, "admin");
Signature:
export declare function useRoleMembers<TContract extends ContractWithRoles>(
  contract: RequiredParam<TContract>,
  role: RolesForContract<TContract>,
): import("@tanstack/react-query").UseQueryResult<string[], unknown>;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| contract | RequiredParam<TContract> | an instance of a | 
| role | RolesForContract<TContract> | the role to get the members of, see | 
Returns:
import("@tanstack/react-query").UseQueryResult<string[], unknown>
a list of addresses that are members of the role