Grant/Revoke Roles
Last updated
Last updated
There is a common role flow in inverter network, this guide guides you on how to manage granting / revoking and checking different roles throughout our protocol.
The chosen modules for the workflows should be specified for type safety.
To begin with the process we need the role hexes from the authorizer.
For checking the status of the role we need to use the role hex.
For admin roles we need to use the grantRole
or revokeRole
function from the authorizer.
For any role which is not a orchestrator
admin role we need to generate a role id using the authorizer
this generation is necessary to have a unique identifier since every workflow has different modules with different addresses.
Note that this is only to check the status of a module role.
For checking the status of the role we need to use the generated role.
For module roles we need to use the grantModuleRole
or revokeModuleRole
function from the module itself not the authorizer function.
For the granting or revoking we are using the non generated role.
The guide includes code snippets for Inverter Network's TypeScript SDK. Please refer to the relevant code snippets based on the SDK you are using.
Set up Inverter Network SDK: Refer to the Quick Start guides for detailed instructions. See the React SDK Guide or TypeScript SDK Guide for more information.
Deploy a Workflow: Refer to the Deploy a Workflow guide for detailed instructions. See the React SDK Guide or TypeScript SDK Guide for more information.
Retrieve a deployed Workflow: Refer to the Operate a Workflow guide for detailed instructions. See the React SDK Guide or TypeScript SDK Guide for more information.
Optionally if your setup needs a specific contract: Refer to the Deploy a Contract Guide for detailed instructions. See the React SDK Guide or TypeScript SDK Guide for more information.