feat: add a generic treasury pkg and integrate it to the govdao v3
This PR:
- Adds a
p/demo/treasurypackage meant to be generic / reusable by other Realms and DAOs. It can use multipleBanker, currently two are implemented:- a GRC20 tokens banker
- a
std.Coinsbanker
- Adds a
r/gov/dao/v3/treasuryRealms that use thisp/demo/treasurypackage. - Adds a
NewTreasuryPaymentRequest()method to thegovdao.
There are some 'NOTE' comments in these changes on points where I was uncertain.
Also I'm not sure if the path are relevant for both p/demo/treasury and p/aeddi/utils packages.
To Do:
- [ ] Finish writing tests in
p/demo/treasuryandp/aeddi/panictoerrpackages. - [ ] Write a
gno.land/pkg/integration/testdata/govdao_proposal_treasury_payment.txtar - [ ] Fix lint errors
Depends on https://github.com/gnolang/gno/pull/4373.
π PR Checks Summary
All Automated Checks passed. β
Manual Checks (for Reviewers):
- [ ] IGNORE the bot requirements for this PR (force green CI check)
Read More
π€ This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.
β Automated Checks (for Contributors):
π’ Maintainers must be able to edit this pull request (more info)
βοΈ Contributor Actions:
- Fix any issues flagged by automated checks.
- Follow the Contributor Checklist to ensure your PR is ready for review.
- Add new tests, or document why they are unnecessary.
- Provide clear examples/screenshots, if necessary.
- Update documentation, if required.
- Ensure no breaking changes, or include
BREAKING CHANGEnotes. - Link related issues/PRs, where applicable.
βοΈ Reviewer Actions:
- Complete manual checks for the PR, including the guidelines and additional checks if applicable.
π Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)
If
π’ Condition met βββ π’ And βββ π’ The base branch matches this pattern: ^master$ βββ π’ The pull request was created from a fork (head branch repo: aeddi/gno)Then
π’ Requirement satisfied βββ π’ Maintainer can modify this pull requestManual Checks
**IGNORE** the bot requirements for this PR (force green CI check)
If
π’ Condition met βββ π’ On every pull requestCan be checked by
- Any user with comment edit permission
Closes https://github.com/gnolang/gno/issues/4094
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:loudspeaker: Thoughts on this report? Let us know!
@moul @zivkovicmilos The tests are working now. Do we only authorize govdao members (or even only members of a specific tier) to:
- Create a payment proposalβ©(https://github.com/gnolang/gno/pull/4374/files#diff-3a2d1baf6d57fe1d2380abbaea30f64e29eb17ec13dab348d79e205e11f984edR146)
- Vote on a payment proposal (https://github.com/gnolang/gno/pull/4374/files#diff-3a2d1baf6d57fe1d2380abbaea30f64e29eb17ec13dab348d79e205e11f984edR171)
@aeddi
Generally props for GovDAO are allowed only by the members; so you do not need to check for this in your realms. About tiering, that's a different topic and I don't have an answer to that.
ie, this was added to govdao v3 recently: https://github.com/gnolang/gno/pull/4464
@moul @zivkovicmilos The tests are working now. Do we only authorize govdao members (or even only members of a specific tier) to:
- Create a payment proposalβ© (#4374 (files))
- Vote on a payment proposal (#4374 (files))
I discussed this point with @zivkovicmilos on another discussion channel, and we concluded the current limitation to DAO members was enough to merge this PR as is. We will potentially add filters (dynamic or not) in the future.