Home > @3rdweb/sdk > ModuleWithRoles > onlyRoles
Throws an error if an address is missing the roles specified.
Signature:
protected onlyRoles(roles: Role[], address: string): Promise<void>;
Parameter | Type | Description |
---|---|---|
roles | Role[] | The roles to check |
address | string | The address to check |
Returns:
Promise<void>