Skip to content

Commit e69c6ca

Browse files
authored
Merge pull request #122 from OpenZeppelin/feat/stellar-role-manager-quickstart
Create Stellar Role Manager Quickstart
2 parents e3504ed + 4c89235 commit e69c6ca

18 files changed

Lines changed: 125 additions & 0 deletions

content/role-manager/index.mdx

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
title: Quick Start
3+
---
4+
5+
The Role Manager is an open source, UI tool you can use to provide your users a way to easily assess the status of the roles involved with your smart contracts. The interface is built specifically for the official OpenZeppelin AccessControl and Ownable contracts.
6+
7+
The OpenZeppelin Role Manager allows anyone to simply plug in a contract address and:
8+
9+
* see details relevant to role management, including detection of what OpenZeppelin Access Control implementations are used,
10+
* what roles are active and who has what roles,
11+
* indexed role-related transaction history,
12+
* an interface to prepare and execute role management such as assignment or revocation of specific roles.
13+
14+
> The Role Manager currently supports the Stellar Mainnet and Testnet. Future support will be provided for other networks.
15+
16+
A walkthrough of the Role Manager is shown in the video below. Feel free to watch it and follow along with the rest of this page.
17+
18+
<iframe width="560" height="315" src="https://www.youtube.com/embed/3tA41IJMp1U?si=GPaPNVsl8Ppb18n4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
19+
20+
## Getting Started
21+
22+
Visit [rolemanager.openzeppelin.com](https://rolemanager.openzeppelin.com/) to get started.
23+
24+
### 1. Select Network
25+
26+
First select the network your contract is deployed to.
27+
28+
![Quickstart select network](/role-manager/quickstart-select-network.png)
29+
30+
### 2. Provide Contract Name and Address
31+
32+
Fill in the name and onchain address for the contract that you are working with. The indexer that is deployed inspects the contract provided.
33+
34+
![Populate Contract Details](/role-manager/quickstart-add-contract.png)
35+
36+
![Populate Contract Details](/role-manager/quickstart-contract-address.png)
37+
38+
### 3. Review the Contract Roles Related Details
39+
40+
The first page of the UI shows a dashboard where you can view the basic details of the smart contract, including:
41+
42+
* the types of role related details implemented,
43+
* the number of different roles,
44+
* the number of accounts that hold the different roles
45+
* any pending role changes
46+
47+
![Populate Contract Details](/role-manager/dashboard.png)
48+
49+
Throughout each of the pages, the data can be refreshed. On this page, a JSON snapshot of the current contract state (capabilities, role assignments) can be exported at any point as well.
50+
51+
Before moving onto the next step, connect your Stellar-supported wallet using the UI. We'll use Freighter:
52+
53+
![Connect Wallet](/role-manager/connect-wallet.png)
54+
55+
### 4. Review the Authorized accounts
56+
57+
The next page displays all of the accounts, their role status (active or pending), their respective roles, and the ability to edit their roles. You can filter the page based on the roles and status.
58+
59+
![Authorized Accounts](/role-manager/authorized-accounts.png)
60+
61+
Editing other accounts' roles requires the appropriate permissions from the connected wallet, of course. It is a simple as checking off the onchain change you would like to implement.
62+
63+
> The `Admin` and `Owner` roles require two steps when transferring their roles within the Stellar networks.
64+
65+
![Authorized Accounts Editing](/role-manager/authorized-accounts-editing.png)
66+
67+
### 5. Manage Roles
68+
69+
The next page, titled Roles, provides a simple UI where the different roles are listed with some pertinent details. These include: number of accounts assigned this role, the role name and description.
70+
71+
![Roles List](/role-manager/roles-list.png)
72+
73+
As you select different roles, respective details for each are displayed on the right hand side of the page. Here you can revoke or assign roles to different accounts, if you have the correct permissions to do so.
74+
75+
![Roles Revoke](/role-manager/roles-revoke.png)
76+
77+
![Roles Assign](/role-manager/roles-assign.png)
78+
79+
You can even initiate a Contract Admin or Owner role transfer, and connect the accepting wallet for the role tranfer.
80+
81+
![Admin Transfer](/role-manager/admin-transfer.png)
82+
83+
![Admin Transfer Initiation](/role-manager/admin-transfer-initiate.png)
84+
85+
![Admin Transfer Accept](/role-manager/admin-transfer-accept.png)
86+
87+
If the defined block expiration date is passed, the expired transaction is shown until a new two-step role transfer transaction is initiated.
88+
89+
![Admin Transfer Expired](/role-manager/admin-transfer-expired.png)
90+
91+
### 6. Role-Related Transaction History
92+
93+
The final page of the UI tool showcases the contract's role-related transaction history. This is made possible because of the deployed indexer inspecting the onchain data.
94+
95+
OpenZeppelin has deployed indexers for Stellar, and soon other networks to have onchain data at the ready. The current indexer details are listed below:
96+
97+
* [Stellar Indexer 1](https://app.subquery.network/explorer/project/0x79)
98+
* [Stellar Indexer 2](https://app.subquery.network/explorer/project/0x7e)
99+
* [The Indexer Repo](https://github.com/pasevin/stellar-access-control-indexer)
100+
101+
The public indexer URL can also be replaced in the UI to improve the workflow's robustness.
102+
103+
The changes we incurred in the prior steps can be seen in the contract transaction history.
104+
105+
![Role Changes History](/role-manager/role-changes.png)
106+
107+
### Next Steps
108+
109+
The Role Manager is a useful tool for teams that need to test and carry out their onchain role management, and soon will be available for various ecosystems.
110+
111+
Since it is built off of the same technology stack as the UI Builder, it can also act as a kickoff point for teams looking to build their own UI tool that helps their users carry out the permissioned roles themselves. Take a look at the [UI Builder](https://docs.openzeppelin.com/ui-builder) and its [repo](https://github.com/OpenZeppelin/openzeppelin-ui) to better understand its tech stack that can be customized. The UI Builder is an example of what can be built using the UI Kit and Adapters.
112+
113+
Visit the Role Manager Github repo with the link below and open an issue if you have any problems!
114+
115+
[GitHub Repo](https://github.com/OpenZeppelin/role-manager)
63.3 KB
Loading
68 KB
Loading
23.5 KB
Loading
64.4 KB
Loading
32.6 KB
Loading
151 KB
Loading
23 KB
Loading

public/role-manager/dashboard.png

89.2 KB
Loading
22.2 KB
Loading

0 commit comments

Comments
 (0)