Skip to main content

ContractRoles.get() method

Call this to get a list of addresses that are members of a specific role.

Example

Say you want to get the list of addresses that are members of the minter role.

const minterAddresses = await contract.roles.get("minter");

Signature:

get(role: TRole): Promise<string[]>;

Parameters

ParameterTypeDescription
roleTRoleThe Role to to get a memberlist for.

Returns:

Promise<string[]>

The list of addresses that are members of the specific role.

Exceptions

If you are requestiong a role that does not exist on the contract this will throw an error.

Remarks

See ContractRoles.getAll() to get get a list of addresses for all supported roles on the contract.