1package events
2
3import (
4 "std"
5
6 "gno.land/p/demo/ownable/exts/authorizable"
7)
8
9var (
10 su = std.Address("g125em6arxsnj49vx35f0n0z34putv5ty3376fg5") // @leohhhn
11 auth = authorizable.NewAuthorizableWithAddress(su)
12)
13
14// GetOwner gets the owner of the events realm
15func GetOwner() std.Address {
16 return auth.Owner()
17}
18
19// AddModerator adds a moderator to the events realm
20func AddModerator(mod std.Address) {
21 auth.AssertCallerIsOwner()
22
23 if err := auth.AddToAuthList(mod); err != nil {
24 panic(err)
25 }
26}
administration.gno
0.49 Kb ยท 26 lines