Skip to main content

ContractRoles.getAll() method

Call this to get get a list of addresses for all supported roles on the contract.

Example

const rolesAndMembers = await contract.roles.getAll();

Signature:

getAll(): Promise<Record<TRole, string[]>>;

Returns:

Promise<Record<TRole, string[]>>

A record of Roles to lists of addresses that are members of the given role.

Exceptions

If the contract does not support roles this will throw an error.

Remarks

See ContractRoles.get() to get a list of addresses that are members of a specific role.