IAccessManaged.sol 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. // SPDX-License-Identifier: MIT
  2. // OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAccessManaged.sol)
  3. pragma solidity ^0.8.20;
  4. interface IAccessManaged {
  5. /**
  6. * @dev Authority that manages this contract was updated.
  7. */
  8. event AuthorityUpdated(address authority);
  9. error AccessManagedUnauthorized(address caller);
  10. error AccessManagedRequiredDelay(address caller, uint32 delay);
  11. error AccessManagedInvalidAuthority(address authority);
  12. /**
  13. * @dev Returns the current authority.
  14. */
  15. function authority() external view returns (address);
  16. /**
  17. * @dev Transfers control to a new authority. The caller must be the current authority.
  18. */
  19. function setAuthority(address) external;
  20. /**
  21. * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is
  22. * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs
  23. * attacker controlled calls.
  24. */
  25. function isConsumingScheduledOp() external view returns (bytes4);
  26. }