IAccessManaged.sol 1.0 KB

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