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/u26"}, Gatekeepers: []string{}, Title: "Gno Contributors Call (Demo event)", Description: "# Contributor Technical Discussions (demo event)\n\n*To goal of this meeting is to have structured, in depth technical discussions between the contributors and the gno.land core team.*\n\nIf you have a demo or a discussion to propose, simply put it on the list, along with the proposer name. The proposer is expected to hold the demo, or to set the stage for the discussion.\n\nNominate the topics in HackMD to add it to the meeting agenda:\n- Demos (submitted beforehand)\n- Technical discussions (submitted beforehand)\n- Technical discussions (ad-hoc)\n\n---\nNote:\nThis event is for demo on the today's gno contributor call.\nComplementary discussions on the dedicated Signal group.", ImageURI: "ipfs://bafkreic5rmvpjo74xtli4zwdiy5kmmlbhucz7dz2t6cf3itrp2ifhw7vgi", StartDate: 1746036000, EndDate: 1746049500, Capacity: 50, Discoverable: true, GetProfileString: profile.GetStringField, SetProfileString: profile.SetStringField, ZenaoAdminAddr: "g1djrkw9tf4px658j85cc6fhsvm50uf9s0g6kfsm", Location: &zenaov1.EventLocation{ Address: &zenaov1.AddressVirtual{ Uri: "https://meet.google.com/omw-duip-jmi", }, }, 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 }