Skip to content

Commit

Permalink
add governance mode flag definition, tbd implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Cholmondeley De Tempo committed Feb 3, 2025
1 parent b37214e commit ecd2923
Showing 1 changed file with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@

module ol_framework::ol_features_constants {
use std::features;
/// Whether the new epoch trigger logic is enabled.
/// Lifetime: transient
const EPOCH_TRIGGER_ENABLED: u64 = 24;
public fun get_epoch_trigger(): u64 { EPOCH_TRIGGER_ENABLED }
public fun epoch_trigger_enabled(): bool {
features::is_enabled(EPOCH_TRIGGER_ENABLED)
}
///////// KEEP COMMENTED ////////
// NOTE: this feature is deprecated
// since epoch trigger was an experimental feature
// but is permanent since v7.0.3.
// The code and ID are kept here for reference
// /// Whether the new epoch trigger logic is enabled.
// /// Lifetime: transient
// const EPOCH_TRIGGER_ENABLED: u64 = 24;
// public fun get_epoch_trigger(): u64 { EPOCH_TRIGGER_ENABLED }
// public fun epoch_trigger_enabled(): bool {
// features::is_enabled(EPOCH_TRIGGER_ENABLED)
// }


/// GOVERNANCE MODE
/// Certain transactions are disabled during deliberation and
/// execution of on-chain hot upgrades.
const GOVERNANCE_MODE_ENABLED: u64 = 25;
public fun get_governance_mode(): u64 { GOVERNANCE_MODE_ENABLED }
public fun is_governance_mode_enabled(): bool {
features::is_enabled(GOVERNANCE_MODE_ENABLED)
}

//////// TEST HELPERS ////////
#[test_only]
Expand Down

0 comments on commit ecd2923

Please sign in to comment.