Home > @3rdweb/sdk > ModuleWithRoles > getRoleMembers
Call this to get a list of addresses that are members of a specific role.
Signature:
getRoleMembers(role: Role): Promise<string[]>;
Parameter | Type | Description |
---|---|---|
role | Role | The role to to get a memberlist for. |
Returns:
Promise<string[]>
The list of addresses that are members of the specific role.
If you are requestiong a role that does not exist on the module this will throw an InvariantError.
Say you want to get the list of addresses that are members of the minter role.
const minterAddresses: string[] = await module.getRoleMemberList("minter");