-
Notifications
You must be signed in to change notification settings - Fork 30
feat: Implement paginated project listing #362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for tansu canceled.
|
✅ Deploy Preview for staging-tansu canceled.
|
tupui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @masch It's a good start, I left some comments.
|
@tupui Great tips! Let me know what do you think. |
… updating the total projects count.
tupui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I think we are really close 😃
…x generation in register tests.
tupui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again. I will merge once the CI is green. Looking forward to the follow up 😃
This PR implements the functionality to list registered projects on-chain with pagination support, mirroring the existing DAO pagination pattern but optimized for storage efficiency. This functionality follows the requirements for #331.
Key Changes
Contract Interface:
Storage Optimization:
ProjectKey::ProjectKeys(u32)to store a list of project keys for each page.Vec<Bytes>(keys) per page rather than duplicating project data.Error Handling:
ContractErrors::NoProjectPageFoundto handle out-of-bounds page requests gracefully.Tests:
This implementation ensures efficient storage usage while providing a robust way to traverse all registered projects.