gno icon indicating copy to clipboard operation
gno copied to clipboard

feat: DAO SDK

Open n0izn0iz opened this issue 10 months ago • 3 comments

This implement a DAO SDK inspired by DA0-DA0

The code in this PR has been extracted from https://github.com/gnolang/gno/pull/1154 and cleaned (reviews on the previous PR should have been addressed)

It includes:

  • Interfaces for the DAO gno.land/p/demo/dao_maker/dao_interfaces
  • A reference implementation for the core of the DAO gno.land/p/demo/dao_maker/dao_core
  • A membership-based voting module gno.land/p/demo/dao_maker/dao_voting_group
  • A single-choice proposal module gno.land/p/demo/dao_maker/dao_proposal_single
  • An example DAO gno.land/r/demo/dao_maker/dao_realm
  • A registry to dynamically interact with any registered DAO using it's address gno.land/r/demo/dao_maker/dao_registry

For usage see the tutorial, it is integrated into docusaurus

Screenshot 2024-04-12 at 18 41 10

There is an example membership-based DAO at gno.land/r/demo/teritori/dao_realm that can administer itself and a grc20 token at gno.land/r/demo/teritori/tori

Here is it's GnoWeb Render: Screenshot 2024-04-12 at 18 28 41


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.

Screenshot 2024-04-12 at 18 43 23 Screenshot 2024-04-12 at 18 44 50 Screenshot 2024-04-12 at 18 44 15 Screenshot 2024-04-12 at 18 42 26
Contributors' checklist...
  • [x] Added new tests, or not needed, or not feasible
  • [ ] 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, if any. More info here.

n0izn0iz avatar Apr 12 '24 16:04 n0izn0iz

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 48.44%. Comparing base (4809582) to head (58a8385).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1925      +/-   ##
==========================================
+ Coverage   46.74%   48.44%   +1.70%     
==========================================
  Files         492      409      -83     
  Lines       69614    61965    -7649     
==========================================
- Hits        32539    30019    -2520     
+ Misses      34363    29446    -4917     
+ Partials     2712     2500     -212     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 13 '24 17:04 codecov[bot]

Thanks for the review @leohhhn, I addressed your comments

I have two remarks to spark discussion around guidelines:

  • Adding periods everywhere is considered a bad ux practice by google

  • Tutorials should be playful instead of formal

    The use of humor in the college classroom has been researched extensively (see Segrist & Hupp, 2015 who summarized 41 years of literature on humor in the college classroom) and has been shown to have many benefits for students (Banas, Dunbar, Rodriguez & Liu, 2011; Garner, 2006; Huss & Estep, 2016; Pollio, 2002), some of which are: An increase in learning. An increase in self-motivation. An increase in class attendance. An increase in test performance. An increase in divergent thinking. An increase of interest in learning. A reduction of anxiety and stress in dealing with difficult material. The creation of a positive social and emotional learning environment. The creation of a common psychological bond between students and faculty.

n0izn0iz avatar May 04 '24 10:05 n0izn0iz

impressive work, keep grinding

elix1er avatar May 07 '24 17:05 elix1er