Skip to content

Commit f15b88f

Browse files
authored
Update access-control.adoc
1 parent a1a0a67 commit f15b88f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/modules/ROOT/pages/access-control.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ The minimum delay (accessible through the xref:api:governance.adoc#TimelockContr
150150

151151
For a system of contracts, better integrated role management can be achieved with an xref:api:access.adoc#AccessManager[`AccessManager`] instance. Instead of managing each contract's permission separately, AccessManager stores all the permissions in a single contract, making your protocol easier to audit and maintain.
152152

153-
Although xref:api:access.adoc#AccessControl[`AccessControl`] offers a more dynamic solution for adding permissions to your contracts than Ownable, decentralized protocols tend to become more complex after integrating new contract instances and requires you to keep track of permissions separately in each contract. This increases the complexity of permissions management and monitoring across the system.
153+
Although xref:api:access.adoc#AccessControl[`AccessControl`] offers a more dynamic solution for adding permissions to your contracts than Ownable, decentralized protocols tend to become more complex after integrating new contract instances, requiring you to keep track of permissions separately in each contract. This increases the complexity of permissions management and monitoring across the system.
154154

155155
image::access-control-multiple.svg[Access Control multiple]
156156

@@ -279,15 +279,15 @@ Similar to `AccessControl`, accounts might be granted and revoked roles dynamica
279279

280280
The base `AccessManager` contract provides comprehensive role-based access control but does not support on-chain enumeration of role members or target function permissions by default. To track which accounts hold roles and which functions are assigned to roles, you should rely on the xref:api:access.adoc#AccessManager-RoleGranted-uint64-address-uint32-uint48-bool-[RoleGranted], xref:api:access.adoc#AccessManager-RoleRevoked-uint64-address-[RoleRevoked], and xref:api:access.adoc#AccessManager-TargetFunctionRoleUpdated-address-bytes4-uint64-[TargetFunctionRoleUpdated] events, which can be processed off-chain.
281281

282-
If on-chain enumeration is required, it can be added implemented on top of the existing logic:
282+
If on-chain enumeration is required, it can be implemented on top of the existing logic:
283283

284284
```solidity
285285
include::api:example$AccessManagerEnumerable.sol[]
286286
```
287287

288288
NOTE: The enumerable example only enumerates members of a role and functions that each role can call. Yet, it's possible to enumerate roles active (i.e. roles granted to at least 1 member), guardians and admins.
289289

290-
This adds function that can be queried to iterate over the accounts that have been granted a role and the functions that a role is allowed to call on specific targets:
290+
This adds functions that can be queried to iterate over the accounts that have been granted a role and the functions that a role is allowed to call on specific targets:
291291

292292
```javascript
293293
// Enumerate role members
@@ -320,7 +320,7 @@ Contracts already inheriting from xref:api:access.adoc#Ownable[`Ownable`] can mi
320320

321321
```javascript
322322
await ownable.connect(owner).transferOwnership(accessManager);
323-
```
323+
NOTE: After migrating to AccessManager, the msg.sender in restricted functions will be the AccessManager contract itself through the xref:api:access.adoc#AccessManager-execute-address-bytes-[execute] function, not the original caller. This is a fundamental change in how access control works and may require updates to your contract logic or frontend integration.
324324

325325
=== Using with AccessControl
326326

0 commit comments

Comments
 (0)