Futarchy AMM#292
Merged
Merged
Conversation
`shared_liquidity_manager`
- Created error.rs with SharedLiquidityManagerError enum containing all 12 unique error variants - Updated all instruction files to use consolidated error instead of local error definitions - Removed scattered #[error_code] enums from individual instruction files - Added error module to lib.rs imports - All error references now use SharedLiquidityManagerError:: prefix for consistency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added inline Rust unit tests using #[cfg(test)] modules - Added unit tests for state structs (DraftProposal, ProposalInstruction, etc.) - Added unit tests for instruction validation logic: - unstake_from_draft_proposal: validate stake amounts and error conditions - withdraw_shared_liquidity: validate pool usage, authorization, LP shares - deposit_shared_liquidity: validate pool availability - Created mock context structs for isolated testing of validation logic - Tests cover success cases, edge cases, and comprehensive error handling - All 17 Rust unit tests pass with proper error code validation - Follows Rust testing patterns from other programs in the codebase 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.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.
No description provided.