package event import ( zenaov1 "gno.land/p/zenao/zenao/v1" "gno.land/p/zenao/events" "gno.land/p/zenao/basedao" "gno.land/p/zenao/daokit" "gno.land/p/zenao/daocond" "gno.land/r/demo/profile" "gno.land/r/zenao/eventreg" "gno.land/r/zenao/social_feed" ) var ( DAO daokit.DAO localDAO daokit.DAO event *events.Event // XXX: needed for backward compatibility with frontend queries feedId string // XXX: workaround for "unexpected zero object id" issue ) func init() { // XXX: workaround for "unexpected zero object id" issue feedId = social_feed.NewFeed(cross, "main", false, feedAuth) } func init() { conf := events.Config{ Organizers: []string{"gno.land/r/zenao/users/u14"}, Gatekeepers: []string{}, Title: "Release", Description: "I'M JUST A LOST GUY – REVEAL PROJECTION FEBRUARY 25, 2025\n\nIs this the life you once imagined?\nDid you choose this path, or did it choose you?\nSometimes, getting lost is the only way to figure things out.\n\nOn February 25, 2025, take a step back and see where the journey leads.\n\n#ImJustALostGuy #ShortFilm #FindingTheWay", ImageURI: "ipfs://bafybeidpd3ydnbxidme65pcyeqnlnjswbh3rgzszifwqik5vnp3j67sl24", StartDate: 1740506400, EndDate: 1740520800, Capacity: 150, Discoverable: true, GetProfileString: profile.GetStringField, SetProfileString: profile.SetStringField, ZenaoAdminAddr: "g1djrkw9tf4px658j85cc6fhsvm50uf9s0g6kfsm", Location: &zenaov1.EventLocation{ Address: &zenaov1.AddressCustom{ Address: "1 Bd Poissonnière, 75002 Paris", Timezone: "Europe/Paris", }, }, ParticipationPubkey: "", CrossFn: crossFn, SetImplemFn: setImplem, FeedId: feedId, PrivateVarName: "event", } event = events.NewEvent(&conf) eventreg.Register(cross, func() *zenaov1.EventInfo { return event.Info() }) } func Vote(_ realm, proposalID uint64, vote daocond.Vote) { localDAO.Vote(proposalID, vote) } func Execute(_ realm, proposalID uint64) { localDAO.Execute(proposalID) } func Render(path string) string { return localDAO.Render(path) } func feedAuth() (string, bool) { caller := event.DAOPrivate.CallerID() // XXX: this should be upgradable return caller, basedao.MustGetMembersViewExtension(localDAO).IsMember(caller) } func crossFn(_ realm, cb func()) { cb() } func setImplem(newLocalDAO daokit.DAO, newDAO daokit.DAO) { localDAO, DAO = newLocalDAO, newDAO }