Skip to content

Futarchy AMM#292

Merged
metaproph3t merged 44 commits into
developfrom
futarchy-amm
Jun 26, 2025
Merged

Futarchy AMM#292
metaproph3t merged 44 commits into
developfrom
futarchy-amm

Conversation

@metaproph3t
Copy link
Copy Markdown
Member

No description provided.

metaproph3t and others added 14 commits June 24, 2025 00:00
- 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>
@metaproph3t metaproph3t marked this pull request as ready for review June 26, 2025 16:07
@metaproph3t metaproph3t merged commit 6855f7f into develop Jun 26, 2025
1 check passed
@metaproph3t metaproph3t deleted the futarchy-amm branch June 26, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant