-
Notifications
You must be signed in to change notification settings - Fork 388
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: DAO SDK #1925
feat: DAO SDK #1925
Conversation
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
Signed-off-by: Norman Meier <norman@berty.tech>
func (v *VotingGroup) Render(path string) string { | ||
sb := strings.Builder{} | ||
sb.WriteString("Member count: ") | ||
sb.WriteString(strconv.FormatUint(uint64(v.MemberCount(havl.Latest)), 10)) |
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.
sb.WriteString(strconv.FormatUint(uint64(v.MemberCount(havl.Latest)), 10)) | |
sb.WriteString(ufmt.Sprintf("%d", havl.Latest)) |
g.powerByAddr.Iterate(start, end, height, func(k string, v interface{}) bool { | ||
if limit > 0 && uint64(len(members)) >= limit { | ||
return true | ||
} |
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.
You can use avl.Tree.IterateByOffset
.
} | ||
|
||
func (g *VotingGroup) MemberCount(height int64) uint32 { | ||
val, ok := g.memberCount.Get("", height) |
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.
isn't avl.Tree.Size
enough for you?
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.
can you move this to gno.land/r/teritori/tori
?
type ExecutableMessage interface { | ||
ToJSON() *json.Node | ||
FromJSON(ast *json.Node) | ||
|
||
String() string | ||
Type() string | ||
} |
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.
why is this needed?
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.
There are several interesting aspects in that PR, but there is too much work to review at the moment. Therefore, I will mark it as "request changes" to allow more time for a thorough review.
A high-level suggestion I can provide is to:
- Simplify the codebase by reducing the number of packages, files, functions, types, and boilerplate, and avoiding the use of JSON, etc. Consider merging some packages together.
- Improve the naming conventions. For instance, use more specific names like "Teritori Realms" and "Daomaker" (a better name could facilitate faster merging, as "Daomaker" is currently too generic and sounds overly official, while "Teritori" would make it easier to integrate).
from gnolang/gno#1925 Signed-off-by: Norman Meier <norman@samourai.coop>
* feat: dao_maker from gnolang/gno#1925 Signed-off-by: Norman Meier <norman@samourai.coop> * tmp Signed-off-by: Norman Meier <norman@samourai.coop> * chore: add back ujson and fix social feed Signed-off-by: Norman Meier <norman@samourai.coop> * chore: remove artifact Signed-off-by: Norman Meier <norman@samourai.coop> * chore: remove artifact Signed-off-by: Norman Meier <norman@samourai.coop> * chore: ci fix Signed-off-by: Norman Meier <norman@samourai.coop> * fix: revert bad change Signed-off-by: Norman Meier <norman@samourai.coop> --------- Signed-off-by: Norman Meier <norman@samourai.coop>
This PR is stale because it has been open 3 months with no activity. Remove stale label or comment or this will be closed in 3 months. |
Can you move all the packages under I believe we should merge your PR in its current state but under teritori. |
🛠 PR Checks Summary🔴 Maintainers must be able to edit this pull request (more info) Manual Checks (for Reviewers):
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:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Signed-off-by: Norman Meier <norman@samourai.coop>
Signed-off-by: Norman Meier <norman@samourai.coop>
Signed-off-by: Norman Meier <norman@samourai.coop>
Signed-off-by: Norman Meier <norman@samourai.coop>
Signed-off-by: Norman Meier <norman@samourai.coop>
This PR aims to fix some of remaining UI bugs on gnoweb after the revamp merge. Some of: gnolang#3355 - Fixes Safari select input design and icons - Fixes input hover - Fixes ToC font style - Fixes UI details and improve CSS - Fixes Responsive with long content - Fixes Scrollbar - Fixes fonts loading strategy and size - Fixes ts issue with copy btn (quick clicks) - Fixes some A11y
closing in favor of #3358 |
This implement a DAO SDK inspired by DA0-DA0
The code in this PR has been extracted from #1154 and cleaned (reviews on the previous PR should have been addressed)
It includes:
gno.land/p/demo/dao_maker/dao_interfaces
gno.land/p/demo/dao_maker/dao_core
gno.land/p/demo/dao_maker/dao_voting_group
gno.land/p/demo/dao_maker/dao_proposal_single
gno.land/r/demo/dao_maker/dao_realm
gno.land/r/demo/dao_maker/dao_registry
For usage see the tutorial, it is integrated into docusaurus
There is an example membership-based DAO at
gno.land/r/demo/teritori/dao_realm
that can administer itself and a grc20 token atgno.land/r/demo/teritori/tori
Here is it's GnoWeb Render:
This powers the "Organizations" feature of Teritori dApp on Gno as shown below
The DAO creation UI uses a Gno template and instantiates a new realm.
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description