typescript-sdk

Home > @3rdweb/sdk > ModuleWithRoles > revokeRole

ModuleWithRoles.revokeRole() method

Call this to revoke a role from a specific address.

Signature:

revokeRole(role: Role, address: string): Promise<TransactionReceipt>;

Parameters

Parameter Type Description
role Role The role to revoke
address string The address to revoke the role from

Returns:

Promise<TransactionReceipt>

The transaction receipt

Exceptions

If you are trying to revoke does not exist on the module this will throw an InvariantError.

Remarks

– Caution –

This will let you remove yourself from the role, too. If you remove yourself from the admin role, you will no longer be able to administer the module. There is no way to recover from this.