community.gno
    8.70 Kb · 71 lines
    
  
 1package community
 2
 3import (
 4	zenaov1 "gno.land/p/zenao/zenao/v1"
 5	"gno.land/p/zenao/communities"
 6	"gno.land/p/zenao/basedao"
 7	"gno.land/p/zenao/daokit"
 8	"gno.land/p/zenao/daocond"
 9	"gno.land/r/demo/profile"
10	"gno.land/r/zenao/communityreg"
11	"gno.land/r/zenao/social_feed"
12)
13
14var (
15	DAO      daokit.DAO
16	localDAO daokit.DAO
17
18	community *communities.Community // XXX: needed for backward compatibility with frontend queries
19	feedId    string                 // XXX: workaround for "unexpected zero object id" issue
20)
21
22func init() {
23	// XXX: workaround for "unexpected zero object id" issue
24	feedId = social_feed.NewFeed(cross, "main", false, feedAuth)
25}
26
27func init() {
28	conf := communities.Config{
29		ZenaoAdminAddr:   "g1djrkw9tf4px658j85cc6fhsvm50uf9s0g6kfsm",
30		Administrators:   []string{"gno.land/r/zenao/users/u514"},
31		Members:          []string{"gno.land/r/zenao/users/u1", "gno.land/r/zenao/users/u514", "gno.land/r/zenao/users/u524", "gno.land/r/zenao/users/u527", "gno.land/r/zenao/users/u528", "gno.land/r/zenao/users/u530", "gno.land/r/zenao/users/u531", "gno.land/r/zenao/users/u532", "gno.land/r/zenao/users/u533", "gno.land/r/zenao/users/u537", "gno.land/r/zenao/users/u538", "gno.land/r/zenao/users/u539", "gno.land/r/zenao/users/u540", "gno.land/r/zenao/users/u541", "gno.land/r/zenao/users/u542", "gno.land/r/zenao/users/u548", "gno.land/r/zenao/users/u553", "gno.land/r/zenao/users/u554", "gno.land/r/zenao/users/u555", "gno.land/r/zenao/users/u556", "gno.land/r/zenao/users/u557", "gno.land/r/zenao/users/u514"},
32		Events:           []string{"gno.land/r/zenao/events/e57"},
33		DisplayName:      "Planet Blue",
34		Description:      "꩜ Planet Blue ꩜      \n\n\n✦ Awaits You ✦\n\nLocation:\n-\n\nSVARAM - Sound Garden\n\n12/10/2025\n\n10am - 9pm\n\n\nPlanet Blue:\n-\n\nA family oriented event showcasing the local artists of Auroville, offering learning opportunities, and encouraging collaboration. \n\nRemembering the creativity, harmony & artistry which once plagued the Earth. \n\n\n. \u3000\u2008˚\u3000.\u3000\u3000\u3000\u3000\u3000 . ✦\u3000\u3000\u3000 \u3000˚\u3000\u3000\u3000\u3000 . ★⋆.\n\nExpect to dance barefoot on the grass, and participate in the various forms of art being created in real time.\n\nCome curious come barefoot, come planet blue! \n\n\nWhat to bring\n-\n\n-  ₹500 contribution \n- Art supplies\n- picnic rug\n- yoga mat \n- water bottle \n\nThis is a Non-Smoking, Drug & Alcohol Free Event\n-\n\nꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀ\n \u3000\u2008˚\u3000.\u3000\u3000\u3000\u3000\u3000 . ✦\u3000\u3000\u3000 \u3000˚\u3000\u3000\u3000\u3000 . ★⋆.\nꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀ\n\nLineup:\n-\n\n—————————————\n\nOnyx - Auroville Youth\n\nLuna & the Murmers - Indie Folk\n\nGory - Experimental\n\n—————————————\n\nAnghiras - Carnatic Music\n\n- Iranian Music\n\nPegitas - Sufi Music\n\n—————————————\n\nShristree - Tribal House\n\nGalactic Falcon - Tech House\n\nC. Wild - Psy-Tech\n\n﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏\n\nWorkshops\n-\n\nMarnix laughing Yoga \n\nCollective Canvas\n\nFlow School & Prop Making\n\nTiago Fire performance \n\n﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏\n\n\n˚\u3000\u3000\u3000\u3000✦\u3000\u3000\u3000.\u3000\u3000. \u3000\u2008˚\u3000.\u3000\u3000\u3000\u3000\u3000 . ✦\u3000\u3000\u3000 \u3000˚\u3000\u3000\u3000\u3000 . ★⋆.\n\nꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀ\n\nSpaces\n-\n\n- Main Stage\n\n     11 hour sound journey taking us from      Carnatic roots to vast electronic soundscapes\n\n- Workshop Space\n\n     Dedicated space for learning and sharing our skills\n\n- Fleamarket\n\n     Buy, swap, sell Auroville made arts and crafts. Get involved, get in contact\n    \n- Eat Street\n\n     Local and traditional food created by the people of Auroville. \n     Blue lemonade stand & hydration station\n\nꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀ\n\n\u3000\u3000\u3000.\u2002\u2002 \u3000\u3000˚\u3000✭\u3000 \u3000\u3000*\u3000\u3000 \u3000\u3000✦\u3000\u3000\u3000.\u3000\u3000.\u3000\u3000\u3000✦\u3000˚ \u3000\u3000\u3000\u3000\u2008\u3000\n\n﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏\n\nContacts:\n-\n☎ Milan - +61 4662 77513 (Whatsapp)\n\n☎ Ajay - +91 9739 197469\n\n\nꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀꕀ\n\n\n˚\u3000\u3000\u3000\u3000✦\u3000\u3000\u3000.\u3000\u3000. \u3000\u2008˚\u3000.\u3000\u3000\u3000\u3000\u3000 . ✦\u3000\u3000\u3000 \u3000˚\u3000\u3000\u3000\u3000 . ★⋆.\u3000\u3000\u2008\u3000\n\nPlanet Blue Welcome Note\n-\n\nWelcome to Planet Blue, a unique place in the cosmos where you are encouraged to create! \n\nHere there are no borders, feel free to move as you wish. \n\n\u3000\u3000\u3000\u2008˚\u3000.˚\u3000\u3000\u3000\u3000\u3000✭\u3000.\u3000\u3000. \u3000\u2008˚\u3000.\u3000\u3000\u3000\u3000 \u3000\u3000 \u3000\u3000\u3000\u3000 ✦\n\nBut first, let me tell you how all this came about:\n\nThere was once a time we lived harmoniously on planet Earth.\nDancing, singing and gathering as community, in celebration of this life.\n\n✦\u3000\u3000\u3000.\u3000\u3000.\u3000\u3000\u3000✦\u3000˚ \u3000\n\n\u3000\u3000\u3000.\u3000\u3000. \u3000\u2008˚\u3000.\u3000\u3000\u3000\u3000\u3000 \n\nOur creations felt limitless, our dreams were in union, but as a humanity we always wanted more.\n\n\n˚\u3000\u3000\u3000\u3000✦\u3000\u3000\u3000.\u3000\u3000. \u3000\u2008˚\u3000.\u3000\u3000\u3000\u3000\u3000 . ✦\u3000\u3000\u3000 \u3000˚\u3000\u3000\u3000\u3000 . ★⋆.\u3000\u3000\u2008\u3000\n\n\nWhen we eventually created The Machine, it elevated our creative ability to new dimensions. \n\u3000\u3000\u3000.\u3000\u3000. \u3000\u2008˚\u3000.\u3000\u3000\u3000\u3000\u3000 \n\nThe beginning of this era felt free, we had knowledge at our fingertips, and could create anything, instantly.\u3000 . ★⋆.\u3000\n\nSounds great right? \n\n*\u3000\u3000 \u3000\u3000✦\u3000\u3000\u3000.\n\nEvidently, this creative power came at a cost. \n\nEarth, was losing its individuality with every prompt. The system was hungry, and we kept feeding it and feeding it.\n\n\u3000\u3000\u3000.\u2002\u2002 \u3000\u3000˚\u3000✭\u3000 \u3000\u3000*\u3000\u3000 \u3000\u3000✦\u3000\u3000\u3000.\u3000\u3000.\u3000\u3000\u3000✦\u3000˚ \u3000\u3000\u3000\u3000\u2008\u3000\n\nEventually, there came a point when we realised, our very humanity was being consumed and the beauty of creation along with it. \n\u3000\u3000✦\u3000\u3000\u3000.\u3000\u3000. \u3000\u2008˚\u3000.\u3000\n\nUnfortunately, by this time, Earth was in ruins; war, disease, fear and structures dominated us, squeezing out every last ounce of Energy. \n\n\u3000\u3000\u3000.\u2002\u2002 \u3000\u3000˚\u3000✭\u3000 \u3000\u3000*\u3000\u3000 \u3000\u3000✦\u3000\u3000\u3000.\u3000\u3000.\u3000\u3000\u3000✦\u3000˚ \u3000\u3000\u3000\u3000\u2008\u3000\n\n\nIt was precisely this moment, when all hope was lost, that Planet Blue took birth. A free space, beyond the confines of the system. \n\n    \u3000\u3000✦\u3000\u3000\u3000.\u3000\u3000. \u3000\u2008˚\u3000.\u3000\n\nAt Planet Blue you are not just invited to enjoy the festivities, but to become the festivity. Let’s stand together and experience the unity of collective authenticity.\n\n\n˚\u3000\u3000\u3000\u3000✦\u3000\u3000\u3000.\u3000\u3000. \u3000\u2008˚\u3000.\u3000\u3000\u3000\u3000\u3000 .  ✦\u3000\u3000\u3000 \u3000˚\u3000\u3000\u3000\u3000 . ★⋆.\u3000\u2008\u3000\n\n\n\nPlanet Blue has something for all ages, tastes and styles. If you hear the call, get in touch with the crew, jump on board the ship, and we will see you soon on Planet Blue.",
35		AvatarURI:        "ipfs://bafybeig7vsa2bt7lwfty6t2yse5v375uaqjcer6l3blr6bezh6ju7wm3f4",
36		BannerURI:        "",
37		GetProfileString: profile.GetStringField,
38		SetProfileString: profile.SetStringField,
39		CrossFn: crossFn,
40		SetImplemFn: setImplem,
41		FeedId: feedId,
42		PrivateVarName: "community",
43	}
44	community = communities.NewCommunity(&conf)
45	communityreg.Register(cross, func() *zenaov1.CommunityInfo { return community.Info() })
46}
47
48func Vote(_ realm, proposalID uint64, vote daocond.Vote) {
49	localDAO.Vote(proposalID, vote)
50}
51
52func Execute(_ realm, proposalID uint64) {
53	localDAO.Execute(proposalID)
54}
55
56func Render(path string) string {
57	return localDAO.Render(path)
58}
59
60func feedAuth() (string, bool) {
61	caller := community.DAOPrivate.CallerID() // XXX: this should be upgradable
62	return caller, basedao.MustGetMembersViewExtension(localDAO).IsMember(caller)
63}
64
65func crossFn(_ realm, cb func()) {
66	cb()
67}
68
69func setImplem(newLocalDAO daokit.DAO, newDAO daokit.DAO) {
70	localDAO, DAO = newLocalDAO, newDAO
71}