Merged
Conversation
- Create stellar-contract/ directory with Soroban smart contract - Implement ParticipantRole enum (Recycler, Collector, Manufacturer) - Add Soroban storage traits and validation logic - Add 11 comprehensive unit tests covering all role types - Create CI/CD pipeline with GitHub Actions - Add build and verification scripts (bash and PowerShell) - Configure Soroban CLI with network settings - Update README with complete project documentation - Add frontend/ directory structure for future implementation - Remove old frontend files and contracts Closes Xoulomon#1 - Initialize Stellar Rust Project Structure Closes Xoulomon#2 - Implement ParticipantRole Enum in Rust
- Add WasteType enum with 5 variants: Paper, PetPlastic, Plastic, Metal, Glass - Implement Soroban storage traits via #[contracttype] attribute - Add Display trait for string conversion - Implement helper methods: is_valid, from_u32, to_u32, as_str - Add domain-specific methods: is_plastic, is_biodegradable, is_infinitely_recyclable - Add 14 comprehensive unit tests covering all functionality - Add Soroban storage serialization tests - Export WasteType from lib.rs All acceptance criteria met: - Enum compiles without errors - Can be stored in Soroban storage (TryFromVal/TryIntoVal) - Tests pass for all variants - Display trait implemented for string conversion Closes Xoulomon#3 - Implement WasteType Enum in Rust
- Add Material struct to track recyclable material submissions - Implement reward point calculation based on waste type and weight - Add material submission, retrieval, and verification functions - Add minimum weight requirement validation (100g) - Implement reward multipliers: Paper(1x), PetPlastic(3x), Plastic(2x), Metal(5x), Glass(2x) - Add 5 comprehensive tests for material operations - Add material tracking documentation New Features: - submit_material(): Submit recyclable materials with description - get_material(): Retrieve material by ID - verify_material(): Recyclers can verify material submissions - calculate_reward_points(): Automatic reward calculation - meets_minimum_weight(): Weight validation Integration: - Uses WasteType enum for material categorization - Integrates with ParticipantRole for verification permissions - Soroban storage compatible with #[contracttype] Documentation: - Added MATERIAL_TRACKING.txt with complete system overview - Reward point system explained - Workflow and storage details included
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.
closes #17