-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(ADR-006): POAP v2 #195
Conversation
f917978
to
c0ae971
Compare
Hello, Thank you for your work on this codebase. I would like to propose a change regarding the handling of the In certain scenarios, it could be desirable to have the ability to set the Currently, the desmos-contracts/contracts/poap/src/execute.rs Lines 158 to 164 in 2f66294
and UpdateMinter message
does not accept None as a valid value for the minter . I propose that this be changed to accept None values.
This change could include:
In addition, in this scenario, we might consider allowing desmos-contracts/contracts/poap/src/execute.rs Lines 44 to 49 in 2f66294
This change could provide additional flexibility for the management of minting permissions. Thank you for considering this proposal. |
I also noticed that there are currently no checks in place to ensure that the A future timestamp for both I propose adding a validation step to the relevant functions to check that both |
While the current implementation is different, in the context of a "proof of participation" system, it would be logical for each user to hold a maximum of one token per event, indicating whether they have participated or not as explained here: #190 (comment). If we aim for a more generic implementation where users can hold multiple tokens, we might consider implementing a |
@RiccardoM @giorgionocera I update the contract adding the following features:
As for the checks to make sure that the |
Yeah, it makes sense. Thank you for your clarification and for the effort! |
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.
Overall looks good to me. However, it seems to me that there are some duplicated tests. Particularly:
admin_can_mint_before_start_time
andadmin_can_mint_after_end_time
are duplicates ofadmin_can_mint_outside_mint_time
minter_can_mint_before_start_time
andminter_can_mint_after_end_time
are duplicates ofminter_can_mint_outside_mint_time
user_can_mint_after_start_time
anduser_can_mint_before_end_time
are duplicates ofuser_can_mint_during_mint_time
We could probably delete the single ones and keep only the composite ones (<xxx>can_mint_outside/during_mint_time
).
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.
Thank you again for your work.
Only one thing which could improve readability (it is not a bug or an improvement, it is only a suggestion, you can also discard it):
maybe you could move the self.assert_user_dont_own_a_poap(deps.storage, &user_addr)?;
instruction inside the mint_to_user
and avoid using it in the mint_to
and assert_user_can_mint
functions.
Feel free to do your evaluations.
@RiccardoM The tests are actualy different since in the |
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.
Looks good to me overall. Let's wait a final review from @giorgionocera and merge this if it's OK
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.
Overall, it seems fine to me. Thank you @manu0466 and @RiccardoM! 🧑🚀
Description
This PR updates the POAP contract to make it compliant with the ADR-006.
Closes: #182
Closes: #183
Closes: #184
Closes: #185
Closes: #186
Closes: #187
Closes: #188
Closes: #189
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change