typescript-sdk

Home > @3rdweb/sdk > ModuleWithRoles > onlyRoles

ModuleWithRoles.onlyRoles() method

Throws an error if an address is missing the roles specified.

Signature:

protected onlyRoles(roles: Role[], address: string): Promise<void>;

Parameters

Parameter Type Description
roles Role[] The roles to check
address string The address to check

Returns:

Promise<void>