From d768352c1805b55f6120c9bb418420de1653739e Mon Sep 17 00:00:00 2001 From: ChainBid Developer Date: Thu, 22 Oct 2026 11:47:58 +0100 Subject: [PATCH 1/2] feat(governor): add get_config view Adds a public view function to the governor contract for issue #532. This read-only function returns the current including: - registry: Address of the solver registry - timelock: Address of the timelock controller - voting_delay: Delay before voting starts - voting_period: Duration of the voting period - proposal_threshold: Minimum voting power to create a proposal - quorum: Minimum total votes for a proposal to succeed Useful for off-chain tooling, dashboards, and governance UI. Closes #532 --- governor/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/governor/src/lib.rs b/governor/src/lib.rs index 3b7f408..e38a7b1 100644 --- a/governor/src/lib.rs +++ b/governor/src/lib.rs @@ -252,6 +252,15 @@ impl Governor { Ok(Self::voting_power(&env, &config.registry, &account, ledger)) } + /// Returns the current governor configuration. + /// + /// This is a read-only view function that exposes the configuration + /// set during `initialize`. Useful for off-chain tooling and dashboards + /// to discover governance parameters. + pub fn get_config(env: Env) -> Result { + Self::config(&env) + } + // --- internals --- fn config(env: &Env) -> Result { From a2c5b6a53b63a960dc410f886d8f84d695c86204 Mon Sep 17 00:00:00 2001 From: ChainBid Developer Date: Thu, 22 Oct 2026 11:56:54 +0100 Subject: [PATCH 2/2] feat(backstop_vault): add get_withdrawal_cooldown view Adds a public view function for issue #533. Returns the withdrawal cooldown expiration timestamp for an LP: - 0 if no cooldown is set (cooldown expired or LP never deposited) - Future timestamp if cooldown is active (LP must wait until this timestamp) This enables off-chain tooling and dashboards to display accurate cooldown status for LPs without requiring them to track deposit times locally. Closes #533 --- backstop_vault/src/lib.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backstop_vault/src/lib.rs b/backstop_vault/src/lib.rs index 6666af7..63efe58 100644 --- a/backstop_vault/src/lib.rs +++ b/backstop_vault/src/lib.rs @@ -496,6 +496,19 @@ impl BackstopVault { (shares, queued) } + /// Returns the withdrawal cooldown expiration timestamp for `lp`. + /// + /// If the LP has no cooldown set, returns 0 (cooldown expired / no deposit yet). + /// If the returned timestamp is > current ledger timestamp, the LP cannot + /// withdraw until that timestamp passes. + /// Issue #533: Surface the cooldown timestamp for off-chain tooling. + pub fn get_withdrawal_cooldown(env: Env, lp: Address) -> u64 { + env.storage() + .persistent() + .get(&DataKey::WithdrawCooldown(lp)) + .unwrap_or(0) + } + // ── Private helpers ──────────────────────────────────────────────────────── fn load_total_assets(env: &Env) -> i128 {