feat: implement participants storage map and waste transfer history#103
Merged
Xoulomon merged 3 commits intoXoulomon:mainfrom Feb 24, 2026
Merged
feat: implement participants storage map and waste transfer history#103Xoulomon merged 3 commits intoXoulomon:mainfrom
Xoulomon merged 3 commits intoXoulomon:mainfrom
Conversation
- Add participants storage with get/set functions
- Implement registration checks to prevent duplicates
- Add update functions that preserve registration data
- Create waste transfer history storage with immutable records
- Implement transfer_waste function with ownership validation
- Add chronological transfer history tracking
- Create comprehensive documentation for both features
- Add 84 passing tests covering all functionality
Storage architecture:
- Participants: (address,) → Participant
- Transfer history: ('transfers', waste_id) → Vec<WasteTransfer>
New functions:
- set_participant (internal helper)
- is_participant_registered
- transfer_waste
- get_transfer_history
- record_transfer (internal)
- get_transfers_from/to (placeholder for future indexing)
Closes Xoulomon#2 and Xoulomon#1
- Add Incentive type with budget management and reward calculation - Implement three storage maps: incentive by ID, by rewarder, by waste type - Add create_incentive, deactivate_incentive, and claim_incentive_reward functions - Support multiple incentives per manufacturer - Auto-deactivate incentives when budget exhausted - Add comprehensive tests for all incentive operations - Update documentation with INCENTIVE_STORAGE_IMPLEMENTATION.md closes Xoulomon#30
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.
Storage architecture:
New functions:
Closes #29