Documentation
Onchain Theming
Managing Roles

Managing Access Roles

Under the hood of Flexible (opens in a new tab), a role-based access control mechanism determines who can edit theming data for a given platform. By default, the person who creates a platformIndex for a specific platform is given admin privileges. Moreover, methods are provided for easy management of multiple administrators/managers of a deployment. You can view the code for the theme registry contract here (opens in a new tab).

How to Grant Roles

Quickstart

Dash

Visit Etherscan

Head to Etherscan (opens in a new tab) and connect your wallet.

Prepare the grantRoles function

Once connected, supply the appropriate function arguments.

  1. platformIndex The index number created via using a Flexible template If you haven't minted it yet, check out our Getting Started page.

  2. roleDetails The Ethereum address which you want to grant a role, followed by the number corresponding to that role. Below is an example of how the tuple should be formatted.

[["0x9798A181E731Ee9d3abffc5ae15c93cA3d95A8e3", "1"]]
NameValue
0 NO ROLE
1 MANAGER (able to make changes to a platform's theme)
2 ADMIN (able to make changes to a platforms's theme, and add and revoke roles)

Dash

If you experience any errors make sure your tuple is formatted correctly.

Confirm the transaction

Click the "Write" button next to the function, this will prompt a confirmation window from your wallet. Keep in mind that you'll have to pay gas fees for the transaction, so make sure you have enough ether in your wallet to cover these costs. After confirming the transaction, you can view its details on Etherscan by clicking on the transaction hash.