Omniscia Olympus DAO Audit

Governable Code Style Findings

Governable Code Style Findings

GOV-01C: Inexistent Deletion of Pending Governor

TypeSeverityLocation
Gas OptimizationInformationalGovernable.sol:L43-L47

Description:

The _newGovernor entry should be deleted when it is consumed by the pullGovernor function.

Example:

contracts/types/Governable.sol
43function pullGovernor() public virtual override {
44 require( msg.sender == _newGovernor, "Governable: must be new governor to pull");
45 emit GovernorPulled( _governor, _newGovernor );
46 _governor = _newGovernor;
47}

Recommendation:

We advise it to be deleted so to ensure a consistent contract state.

Alleviation:

The new governor is now properly deleted when the pullGovernor function concludes.