fix: extend pause circuit-breaker to all privileged entry points (Closes #313) - #359
Open
laurentketterle-hub wants to merge 2 commits into
Open
Conversation
…oses Heliobond#310, Heliobond#311, Heliobond#314) The withdrawal-window merge (Heliobond#36) left the crate non-compiling: get_withdrawal_window and get_volume_fee_tier were missing closing braces, the withdrawal_window_set and funding_round_ended event functions were missing closing braces, check_deposit_lock referenced an undefined last_seq and merged two incompatible lock models, and VaultError had three variants sharing discriminant 41. This change adds a LastDepositSeq(Address) storage key recorded by lock_deposit, rewrites check_deposit_lock to enforce the ledger-sequence sliding window (Heliobond#36), renumbers FundingRoundActive to 42 and InvestmentCapExceeded to 43, and restores all missing closing braces. Signed-off-by: laurentketterle-hub <laurentketterle-hub@users.noreply.github.com>
Heliobond#313) require_not_paused was only enforced in fund_project, deposit, and withdraw. Every other fund-moving or share-minting/burning entry point (multi-sig funding, batch funding, yield distribution, insurance payouts, bridge mint/burn, cross-chain completion, flash loans, and carbon-credit transfers) ignored the Paused flag entirely. This adds require_not_paused to all 11 listed functions and documents the coverage on pause(). Signed-off-by: laurentketterle-hub <laurentketterle-hub@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the pause circuit-breaker to every privileged state-mutating entry point.
Problem
require_not_paused was only enforced in fund_project, deposit, and withdraw. Every other fund-moving or share-minting/burning entry point (multi-sig funding, batch funding, yield distribution, insurance payouts, bridge mint/burn, cross-chain completion, flash loans, and carbon-credit transfers) ignored the Paused flag entirely, so pause()/emergency_pause() did not actually stop capital from moving through those paths.
Change
Note
This branch is stacked on the compilation-restoring fix in PR #356 (issues #310/#311/#314), which must merge first.
Closes #313