You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
494 B
18 lines
494 B
11 months ago
|
// contracts/AccessControlNonRevokableAdmin.sol
|
||
|
// SPDX-License-Identifier: MIT
|
||
|
pragma solidity ^0.8.20;
|
||
|
|
||
|
import {AccessControl} from "../../../access/AccessControl.sol";
|
||
|
|
||
|
contract AccessControlNonRevokableAdmin is AccessControl {
|
||
|
error AccessControlNonRevokable();
|
||
|
|
||
|
function revokeRole(bytes32 role, address account) public override {
|
||
|
if (role == DEFAULT_ADMIN_ROLE) {
|
||
|
revert AccessControlNonRevokable();
|
||
|
}
|
||
|
|
||
|
super.revokeRole(role, account);
|
||
|
}
|
||
|
}
|