1package event
2
3import (
4 "gno.land/p/zenao/basedao"
5 "gno.land/p/zenao/daocond"
6 "gno.land/p/zenao/daokit"
7 "gno.land/p/zenao/events"
8 zenaov1 "gno.land/p/zenao/zenao/v1"
9 "gno.land/r/demo/profile"
10 "gno.land/r/zenao/eventreg"
11)
12
13var (
14 DAO daokit.DAO
15 daoPrivate *basedao.DAOPrivate
16 event *events.Event
17)
18
19func init() {
20 conf := events.Config{
21 Creator: "g158vx2ckhwqtl5c66c2wnt8zupfmd0ary9ngv6l",
22 Title: "Samouraï Friends Night",
23 Description: "**Samouraï Friends Night** is a free and open afterwork in Paris aiming to gather a diversity of humans from creative world and open source world around beers.\n\nPeople joining are composing a big patchwork of humans, like open source developers, distributed protocol engineers, film makers, designers, motion designers, smart contract hackers, builders for commons.\nYou can invite your friends, wherever they come from.\n\nThere you'll find friends to discuss open source, tech, art, and future of humanity.\n\nThis even is powered by Samouraï Coop crew : \nhttps://www.samourai.world",
24 ImageURI: "ipfs://bafybeie6evrjz2fmcpaey23t7yvp5azm5ftfx63ycp3ls4ax6657mc4zvy",
25 StartDate: 1742590800,
26 EndDate: 1742612100,
27 Capacity: 150,
28 GetProfileString: profile.GetStringField,
29 SetProfileString: profile.SetStringField,
30 ZenaoAdminAddr: "g1djrkw9tf4px658j85cc6fhsvm50uf9s0g6kfsm",
31 Location: &zenaov1.EventLocation{
32 Address: &zenaov1.AddressCustom{
33 Address: "150",
34 Timezone: "America/Santiago",
35 },
36 },
37 }
38 event = events.NewEvent(&conf)
39 daoPrivate = event.DAOPrivate
40 DAO = event.DAO
41 eventreg.Register(func() *zenaov1.EventInfo { return event.Info() })
42}
43
44func Vote(proposalID uint64, vote daocond.Vote) {
45 DAO.Vote(proposalID, vote)
46}
47
48func Execute(proposalID uint64) {
49 DAO.Execute(proposalID)
50}
51
52func Render(path string) string {
53 return event.Render(path)
54}
event.gno
1.87 Kb · 54 lines