// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.4 <0.9.0; /** @title Governable contract @notice Manages the governance role */ interface IPriceGovernable { /*/////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ /** @notice Emitted when pendingGovernance accepts to be governance @param _governance Address of the new governance */ event GovernanceSet(address _governance); /** @notice Emitted when new governance is proposed @param _pendingGovernance The address proposed to be the new governance */ event GovernanceProposal(address _pendingGovernance); /*/////////////////////////////////////////////////////////////// ERRORS //////////////////////////////////////////////////////////////*/ /** @notice Thrown when the caller of the function is not governance */ error PriceGovernable_OnlyGovernance(); /** @notice Thrown when the caller of the function is not pendingGovernance */ error PriceGovernable_OnlyPendingGovernance(); /** @notice Thrown when trying to set governance to zero address */ error PriceGovernable_NoGovernanceZeroAddress(); /*/////////////////////////////////////////////////////////////// VARIABLES //////////////////////////////////////////////////////////////*/ /** @notice Returns the governance address @return _governance The governance address */ function governance() external view returns (address _governance); /** @notice Returns the pendingGovernance address @return _pendingGovernance The pendingGovernance address */ function pendingGovernance() external view returns (address _pendingGovernance); /*/////////////////////////////////////////////////////////////// LOGIC //////////////////////////////////////////////////////////////*/ /** @notice Proposes a new address to be governance @param _governance The address being proposed as the new governance */ function setGovernance(address _governance) external; /** @notice Changes the governance from the current one to the previously proposed address */ function acceptGovernance() external; }