Fix docs in the extending-contracts section (#5300)

This commit is contained in:
Ernesto García
2024-11-18 15:40:14 +07:00
committed by GitHub
parent 448efeea66
commit dac63c4612

View File

@ -0,0 +1,17 @@
// 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);
}
}