-
Notifications
You must be signed in to change notification settings - Fork 6
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: psp22 trait contract example with drink tests #300
base: main
Are you sure you want to change the base?
Conversation
# This is the 1st commit message: refactor: general # This is the commit message #2: init # This is the commit message #3: begin refactor # This is the commit message #4: refactor: error handling # This is the commit message #5: tests: add error handling tests # This is the commit message #6: WIP # This is the commit message #7: finalise error handling # This is the commit message #8: refactor: easier review
Co-authored-by: Frank Bell <frank@r0gue.io>
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.
Some of concerns / TODOs I have from my end.
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.
The helper functions are a lot better! Still some things to do. Next time we should take the pallet tests as reference because that is already reviewed and we implement those tests and how to write them much faster.
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.
Example largely looks great, a few improvements can be made imo. Whilst it is awesome that the drink tests are working, I feel that the implementation of the tests is too complex and can be made much more digestible with some refactoring.
Some stuff can be moved to pop-drink, some stuff to eliminate the some initialisation in each test etc. We want to eliminate as much boilerplate as possible, so the example tests showcase how easy it is to write tests using the API. As it stands, there is considerable effort required for the developer.
Co-authored-by: Daanvdplas <daanvdplas@live.nl>
Co-authored-by: Daanvdplas <daanvdplas@live.nl>
Description
Example contract for the fungible use case that applies the PSP22 traits from #297. The PR includes:
pop-drink
andpop-sandbox
, implemented in chore(devnet): add sandbox & test contracts with drink #277