RolesAuthority
@rari-capital/solmate/src (https://github.com/Rari-Capital/@rari-capital/solmate/src/blob/main/src/auth/authorities/RolesAuthority.sol)Modified from Dappsys (https://github.com/dapphub/ds-roles/blob/master/src/roles.sol)
Role based Authority that supports up to 256 roles.
function authority() external view returns (contract Authority)
Name | Type | Description |
---|---|---|
_0 | contract Authority | undefined |
function canCall(address user, address target, bytes4 functionSig) external view returns (bool)
Name | Type | Description |
---|---|---|
user | address | undefined |
target | address | undefined |
functionSig | bytes4 | undefined |
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
function doesRoleHaveCapability(uint8 role, address target, bytes4 functionSig) external view returns (bool)
Name | Type | Description |
---|---|---|
role | uint8 | undefined |
target | address | undefined |
functionSig | bytes4 | undefined |
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
function doesUserHaveRole(address user, uint8 role) external view returns (bool)
Name | Type | Description |
---|---|---|
user | address | undefined |
role | uint8 | undefined |
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
function getRolesWithCapability(address, bytes4) external view returns (bytes32)
Name | Type | Description |
---|---|---|
_0 | address | undefined |
_1 | bytes4 | undefined |
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
function getUserRoles(address) external view returns (bytes32)
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
function isCapabilityPublic(address, bytes4) external view returns (bool)
Name | Type | Description |
---|---|---|
_0 | address | undefined |
_1 | bytes4 | undefined |
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
function owner() external view returns (address)
Name | Type | Description |
---|---|---|
_0 | address | undefined |
function setAuthority(contract Authority newAuthority) external nonpayable
Name | Type | Description |
---|---|---|
newAuthority | contract Authority | undefined |
function setOwner(address newOwner) external nonpayable
Name | Type | Description |
---|---|---|
newOwner | address | undefined |
function setPublicCapability(address target, bytes4 functionSig, bool enabled) external nonpayable
Name | Type | Description |
---|---|---|
target | address | undefined |
functionSig | bytes4 | undefined |
enabled | bool | undefined |
function setRoleCapability(uint8 role, address target, bytes4 functionSig, bool enabled) external nonpayable
Name | Type | Description |
---|---|---|
role | uint8 | undefined |
target | address | undefined |
functionSig | bytes4 | undefined |
enabled | bool | undefined |
function setUserRole(address user, uint8 role, bool enabled) external nonpayable
Name | Type | Description |
---|---|---|
user | address | undefined |
role | uint8 | undefined |
enabled | bool | undefined |
event AuthorityUpdated(address indexed user, contract Authority indexed newAuthority)
Name | Type | Description |
---|---|---|
user indexed | address | undefined |
newAuthority indexed | contract Authority | undefined |
event OwnerUpdated(address indexed user, address indexed newOwner)
Name | Type | Description |
---|---|---|
user indexed | address | undefined |
newOwner indexed | address | undefined |
event PublicCapabilityUpdated(address indexed target, bytes4 indexed functionSig, bool enabled)
Name | Type | Description |
---|---|---|
target indexed | address | undefined |
functionSig indexed | bytes4 | undefined |
enabled | bool | undefined |
event RoleCapabilityUpdated(uint8 indexed role, address indexed target, bytes4 indexed functionSig, bool enabled)
Name | Type | Description |
---|---|---|
role indexed | uint8 | undefined |
target indexed | address | undefined |
functionSig indexed | bytes4 | undefined |
enabled | bool | undefined |
event UserRoleUpdated(address indexed user, uint8 indexed role, bool enabled)
Name | Type | Description |
---|---|---|
user indexed | address | undefined |
role indexed | uint8 | undefined |
enabled | bool | undefined |
Last modified 2d ago