AccessControlFacet
Was this helpful?
Was this helpful?
Inherits: IAccessControl, AccessControlBase, Facet
Sets the function access for a given role.
Parameters
functionSig
bytes4
The function signature to set access for.
role
uint8
The role to set access for.
enabled
bool
Whether the role should be able to call the function.
Sets the role for a given user.
Parameters
user
address
The user to set the role for.
role
uint8
The role to set.
enabled
bool
Whether the user should have the role.
Checks whether a given user can call a given function.
Parameters
user
address
The user to check.
functionSig
bytes4
The function signature to check.
Returns
<none>
bool
Whether the user can call the function.
Gets the roles for a given user.
Parameters
user
address
The user to get the roles for.
Returns
<none>
bytes32
The roles the user has encoded in 256 bits.
Gets the roles that can call a given function.
Parameters
functionSig
bytes4
The function signature to get the roles for.
Returns
<none>
bytes32
The roles that can call the function encoded in 256 bits.
Checks whether a given user has a given role.
Parameters
user
address
The user to check.
role
uint8
The role to check.
Returns
<none>
bool
Whether the user has the role.
Checks whether a given role can call a given function.
Parameters
role
uint8
The role to check.
functionSig
bytes4
The function signature to check.
Returns
<none>
bool
Whether the role can call the function.