View Source: openzeppelin-solidity/contracts/access/IAccessControl.sol
↘ Derived Contracts: AccessControl, IProtocol
IAccessControl
External interface of AccessControl declared to support ERC165 detection.
Events
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
- hasRole(bytes32 role, address account)
- getRoleAdmin(bytes32 role)
- grantRole(bytes32 role, address account)
- revokeRole(bytes32 role, address account)
- renounceRole(bytes32 role, address account)
Returns true
if account
has been granted role
.
function hasRole(bytes32 role, address account) external view
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
role | bytes32 | |
account | address |
Source Code
function hasRole(bytes32 role, address account) external view returns (bool);
Returns the admin role that controls role
. See {grantRole} and
{revokeRole}.
To change a role's admin, use {AccessControl-_setRoleAdmin}.
function getRoleAdmin(bytes32 role) external view
returns(bytes32)
Arguments
Name | Type | Description |
---|---|---|
role | bytes32 |
Source Code
function getRoleAdmin(bytes32 role) external view returns (bytes32);
Grants role
to account
.
If account
had not been already granted role
, emits a {RoleGranted}
event.
Requirements:
- the caller must have
role
's admin role.
function grantRole(bytes32 role, address account) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
role | bytes32 | |
account | address |
Source Code
function grantRole(bytes32 role, address account) external;
Revokes role
from account
.
If account
had been granted role
, emits a {RoleRevoked} event.
Requirements:
- the caller must have
role
's admin role.
function revokeRole(bytes32 role, address account) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
role | bytes32 | |
account | address |
Source Code
function revokeRole(bytes32 role, address account) external;
Revokes role
from the calling account.
Roles are often managed via {grantRole} and {revokeRole}: this function's
purpose is to provide a mechanism for accounts to lose their privileges
if they are compromised (such as when a trusted device is misplaced).
If the calling account had been granted role
, emits a {RoleRevoked}
event.
Requirements:
- the caller must be
account
.
function renounceRole(bytes32 role, address account) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
role | bytes32 | |
account | address |
Source Code
function renounceRole(bytes32 role, address account) external;
- AaveStrategy
- AccessControl
- AccessControlLibV1
- Address
- BaseLibV1
- BokkyPooBahsDateTimeLibrary
- BondPool
- BondPoolBase
- BondPoolLibV1
- CompoundStrategy
- Context
- Cover
- CoverBase
- CoverLibV1
- CoverReassurance
- CoverStake
- CoverUtilV1
- cxToken
- cxTokenFactory
- cxTokenFactoryLibV1
- Delayable
- Destroyable
- ERC165
- ERC20
- FakeAaveLendingPool
- FakeCompoundStablecoinDelegator
- FakePriceOracle
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- FaultyAaveLendingPool
- FaultyCompoundStablecoinDelegator
- Finalization
- ForceEther
- Governance
- GovernanceUtilV1
- IAaveV2LendingPoolLike
- IAccessControl
- IBondPool
- IClaimsProcessor
- ICompoundERC20DelegatorLike
- ICover
- ICoverReassurance
- ICoverStake
- ICxToken
- ICxTokenFactory
- IERC165
- IERC20
- IERC20Detailed
- IERC20Metadata
- IERC3156FlashBorrower
- IERC3156FlashLender
- IFinalization
- IGovernance
- ILendingStrategy
- ILiquidityEngine
- IMember
- INeptuneRouterV1
- InvalidStrategy
- IPausable
- IPolicy
- IPolicyAdmin
- IPriceOracle
- IProtocol
- IRecoverable
- IReporter
- IResolution
- IResolvable
- IStakingPools
- IStore
- IStoreLike
- IUniswapV2FactoryLike
- IUniswapV2PairLike
- IUniswapV2RouterLike
- IUnstakable
- IVault
- IVaultDelegate
- IVaultFactory
- IWitness
- LiquidityEngine
- MaliciousToken
- MockAccessControlUser
- MockCoverUtilUser
- MockCxToken
- MockCxTokenPolicy
- MockCxTokenStore
- MockFlashBorrower
- MockLiquidityEngineUser
- MockProcessorStore
- MockProcessorStoreLib
- MockProtocol
- MockRegistryClient
- MockStore
- MockStoreKeyUtilUser
- MockValidationLibUser
- MockVault
- MockVaultLibUser
- NeptuneRouterV1
- NPM
- NpmDistributor
- NTransferUtilV2
- NTransferUtilV2Intermediate
- Ownable
- Pausable
- Policy
- PolicyAdmin
- PolicyHelperV1
- PoorMansERC20
- POT
- PriceLibV1
- Processor
- ProtoBase
- Protocol
- ProtoUtilV1
- Recoverable
- ReentrancyGuard
- RegistryLibV1
- Reporter
- Resolution
- Resolvable
- RoutineInvokerLibV1
- SafeERC20
- StakingPoolBase
- StakingPoolCoreLibV1
- StakingPoolInfo
- StakingPoolLibV1
- StakingPoolReward
- StakingPools
- Store
- StoreBase
- StoreKeyUtil
- StrategyLibV1
- Strings
- TimelockController
- Unstakable
- ValidationLibV1
- Vault
- VaultBase
- VaultDelegate
- VaultDelegateBase
- VaultDelegateWithFlashLoan
- VaultFactory
- VaultFactoryLibV1
- VaultLibV1
- VaultLiquidity
- VaultStrategy
- WithFlashLoan
- WithPausability
- WithRecovery
- Witness