Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions contracts/price-oracle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ pub trait StellarFlowTrait {
///
/// Returns true if the contract is frozen, false otherwise.
fn is_frozen(env: Env) -> bool;

/// Check if the contract is active (not paused).
///
/// Returns true if the contract is active, false if paused.
fn is_contract_active(env: Env) -> bool;
}

#[contractclient(name = "TokenContractClient")]
Expand Down Expand Up @@ -2145,6 +2150,13 @@ impl PriceOracle {
crate::auth::_is_frozen(&env)
}

/// Check if the contract is active (not paused).
///
/// Returns true if the contract is active, false if paused.
pub fn is_contract_active(env: Env) -> bool {
!crate::auth::_is_paused(&env)
}

/// Get the price buffer for a specific asset.
///
/// Returns all relayer submissions for the current ledger,
Expand Down