-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
contractgood first issueGood for newcomersGood for newcomersonlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week
Description
Overview
Implement the logic to retrieve campaign backers in the smart contract for the Boundless platform. This function is crucial for allowing users to view all the backers of a given campaign.
🗂 Background
The function to be implemented is located in:
- File:
contracts/boundless/src/logic/campaign.rs - Relevant trait in:
contracts/boundless/src/interface.rs - Data types are defined in:
contracts/boundless/src/datatypes.rs
🛠️ Requirements
-
Location: Implement the logic inside
CampaignManagementtrait forBoundlessContract. -
Logic Steps:
- Retrieve the campaign from storage using the provided
campaign_id. - Extract and return the list of backers from the campaign data.
- Properly handle error cases (e.g., when the campaign does not exist).
- Retrieve the campaign from storage using the provided
-
Current Placeholder: Currently, the function returns an empty vector using a placeholder
Ok(Vec::new(&env)).
📌 Technical Considerations
- Ensure that the function correctly interacts with the existing storage mechanism for retrieving campaign data.
- Maintain consistency with the error handling as defined by
BoundlessErrorin the project. - Validate input parameters as necessary.
- Consider potential edge cases such as a campaign with no backers.
✅ Definition of Done
- The function successfully retrieves and returns a list of backers for a given campaign.
- Proper error handling is implemented when the campaign is not found or other errors occur.
- Code is reviewed and merged following project guidelines.
- All new functionality is covered by tests.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
contractgood first issueGood for newcomersGood for newcomersonlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week