Skip to main content

Permission Controls

Read All Members of All Roles

Get all roles and all the members of each role.

React SDK support for getAll is coming soon.

Want this feature sooner? Let us know in Discord!


Read Members of a Role

Get the wallet addresses of a specific role.

React SDK support for get is coming soon.

Want this feature sooner? Let us know in Discord!


Grant Role

React SDK support for grant is coming soon.

Want this feature sooner? Let us know in Discord!


Revoke Role

React SDK support for revoke is coming soon.

Want this feature sooner? Let us know in Discord!


Set All Roles (Overwrite)

Dangerous Operation

This will overwrite all existing permissions on this contract.

THIS INCLUDES YOUR OWN WALLET ADDRESS.

If you revoke your admin permissions, you will not be able to get them back.

Only proceed if you know what you are doing.

React SDK support for setAll is coming soon.

Want this feature sooner? Let us know in Discord!


Update Roles

  1. Read the current roles from the get function.
  2. Modify the array for the role you want to update.
  3. Call the setAll function with the modified array.
const rolesAndMembers = await contract.roles.getAll();

const updatedRoles = {
...rolesAndMembers,
admin: [...rolesAndMembers.admin, "0x-new-address-here"],
};

await contract.roles.setAll(updatedRoles);