gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
842 stars 343 forks source link

feat: p/demo/accesscontrol & p/demo/timelock #2307

Open kazai777 opened 3 weeks ago

kazai777 commented 3 weeks ago

We have developed two packages: accesscontrol and timelock inspired by openzeppelin contracts. These packages were created in collaboration with @mous1985 , @DIGIX666 , and myself.

The accesscontrol package was primarily designed to support the development of the timelock package, but it can also be used independently for many other use cases.

Features

Accesscontrol

The accesscontrol package provides a library for managing roles and permissions within Gno. It allows for the creation, assignment, and management of roles with specific administrative privileges, ensuring that only authorized accounts can perform certain actions.

Timelock

The timelock package offers a library for scheduling, canceling, and executing time-locked operations in Gno. It ensures that operations are only carried out after a specified delay and provides mechanisms to manage and verify the status of these operations. The creation of the accesscontrol package was necessary to provide role and permission management required for the administrative tasks of timelock.

Use Cases

Accesscontrol

Timelock

These examples of use cases are not exhaustive, and many other things are possible with these packages.

Contributors' checklist... - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] 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).
linhpn99 commented 2 weeks ago

I'm just a contributor who enjoy your features, I leave a few comments (mainly nitpicks) hoping it's useful so we can have the best quality packages 🙏

notJoon commented 1 week ago

@gnolang/tech-staff @kazai777 We are planning to use a timelock when implementing governance this time. What is the current status of the review for this PR?

kazai777 commented 1 week ago

@gnolang/tech-staff @kazai777 We are planning to use a timelock when implementing governance this time. What is the current status of the review for this PR?

So far only @deelawn has reviewed it, we're waiting for the other reviews to come in. 🙃

leohhhn commented 1 week ago

@kazai777 @notJoon

Coming with a review today! Sorry for the delay 🙏🏻