diff --git a/packages/governance/src/governor/extensions/governor_settings.cairo b/packages/governance/src/governor/extensions/governor_settings.cairo index a4b1e0cb3..d6041992d 100644 --- a/packages/governance/src/governor/extensions/governor_settings.cairo +++ b/packages/governance/src/governor/extensions/governor_settings.cairo @@ -111,6 +111,10 @@ pub mod GovernorSettingsComponent { /// NOTE: This function does not emit an event if the new voting delay is the same as the /// old one. /// + /// Requirements: + /// + /// - Caller must be the governance executor. + /// /// May emit a `VotingDelayUpdated` event. fn set_voting_delay(ref self: ComponentState, new_voting_delay: u64) { self.assert_only_governance(); @@ -124,6 +128,7 @@ pub mod GovernorSettingsComponent { /// /// Requirements: /// + /// - Caller must be the governance executor. /// - `new_voting_period` must be greater than 0. /// /// May emit a `VotingPeriodUpdated` event. @@ -137,6 +142,10 @@ pub mod GovernorSettingsComponent { /// NOTE: This function does not emit an event if the new proposal threshold is the same as /// the old one. /// + /// Requirements: + /// + /// - Caller must be the governance executor. + /// /// May emit a `ProposalThresholdUpdated` event. fn set_proposal_threshold( ref self: ComponentState, new_proposal_threshold: u256 diff --git a/packages/governance/src/tests/governor/test_governor_settings.cairo b/packages/governance/src/tests/governor/test_governor_settings.cairo index 879b97e20..7a03f7ea3 100644 --- a/packages/governance/src/tests/governor/test_governor_settings.cairo +++ b/packages/governance/src/tests/governor/test_governor_settings.cairo @@ -231,10 +231,10 @@ fn test_initializer() { mock_state.governor_settings.initializer(15, 45, 100); assert_eq!(GovernorSettings::voting_delay(component_state), 15); - spy.assert_only_event_voting_delay_updated(test_address(), 0, 15); + spy.assert_event_voting_delay_updated(test_address(), 0, 15); assert_eq!(GovernorSettings::voting_period(component_state), 45); - spy.assert_only_event_voting_period_updated(test_address(), 0, 45); + spy.assert_event_voting_period_updated(test_address(), 0, 45); assert_eq!(GovernorSettings::proposal_threshold(component_state), 100); spy.assert_only_event_proposal_threshold_updated(test_address(), 0, 100);