fix: restore investment_vault compilation and repair deposit-lock (Closes #310, #311, #314) - #356
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>
…-cap and carbon-credits (Heliobond#314, Heliobond#319, Heliobond#321, Heliobond#318) 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
The withdrawal-window feature merge (#36) left the investment-vault crate non-compiling on main. This PR restores compilation and repairs the deposit-lock logic.
Root cause
A botched merge introduced several defects at once:
Fix
Verification
cargo build -p investment-vault compiles cleanly. The existing test_withdrawal_window_blocks_early_exit / test_withdrawal_window_allows_exit_after_window tests exercise exactly this sliding-window behavior.
Closes #310
Closes #311
Closes #314