-
Notifications
You must be signed in to change notification settings - Fork 382
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: add p/demo/pausable #1328
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1328 +/- ##
==========================================
+ Coverage 47.89% 56.37% +8.48%
==========================================
Files 372 421 +49
Lines 63019 67691 +4672
==========================================
+ Hits 30180 38163 +7983
+ Misses 30373 26592 -3781
- Partials 2466 2936 +470 ☔ View full report in Codecov by Sentry. |
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.
LGTM.
The only suggestion I'd make is to simplify the API to rename the methods to Pause()
and Unpause()
because it more clearly defines the action rather than how the action is implemented.
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.
Apart from the small CI fail, good to go 🚀
## Description This PR adds the `Pausable` package to p/demo, allowing realms to have pausability. It relies on the already existing `Ownable` package for access control, gnolang#1314. Inspired by OpenZeppelin's [Pausable](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/security/Pausable.sol). <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details> --------- Co-authored-by: Morgan Bazalgette <[email protected]>
Description
This PR adds the
Pausable
package to p/demo, allowing realms to have pausability. It relies on the already existingOwnable
package for access control, #1314.Inspired by OpenZeppelin's Pausable.
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description