GovernorProposalGuardianUpgradeable
Inherits: Initializable, GovernorUpgradeable
Extension of {Governor} which adds a proposal guardian that can cancel proposals at any stage in the proposal's lifecycle. NOTE: if the proposal guardian is not configured, then proposers take this role for their proposals.
State Variables
GovernorProposalGuardianStorageLocation
bytes32 private constant GovernorProposalGuardianStorageLocation =
0x2953e0c334ced07e397f02d0e9b450dbfd92be015e93a9c249855132826e0300;
Functions
_getGovernorProposalGuardianStorage
function _getGovernorProposalGuardianStorage() private pure returns (GovernorProposalGuardianStorage storage $);
__GovernorProposalGuardian_init
function __GovernorProposalGuardian_init() internal onlyInitializing;
__GovernorProposalGuardian_init_unchained
function __GovernorProposalGuardian_init_unchained() internal onlyInitializing;
proposalGuardian
Getter that returns the address of the proposal guardian.
function proposalGuardian() public view virtual returns (address);
setProposalGuardian
Update the proposal guardian's address. This operation can only be performed through a governance proposal. Emits a ProposalGuardianSet event.
function setProposalGuardian(address newProposalGuardian) public virtual onlyGovernance;
_setProposalGuardian
Internal setter for the proposal guardian. Emits a ProposalGuardianSet event.
function _setProposalGuardian(address newProposalGuardian) internal virtual;
_validateCancel
Override Governor-_validateCancel to implement the extended cancellation logic. The {proposalGuardian} can cancel any proposal at any point. If no proposal guardian is set, the {IGovernor-proposalProposer} can cancel their proposals at any point. In any case, permissions defined in {Governor-_validateCancel} (or another override) remains valid.
function _validateCancel(uint256 proposalId, address caller) internal view virtual override returns (bool);
Events
ProposalGuardianSet
event ProposalGuardianSet(address oldProposalGuardian, address newProposalGuardian);
Structs
GovernorProposalGuardianStorage
Note: storage-location: erc7201:openzeppelin.storage.GovernorProposalGuardian
struct GovernorProposalGuardianStorage {
address _proposalGuardian;
}