config.gno

0.61 Kb · 32 lines
 1package home
 2
 3import (
 4	"std"
 5
 6	"gno.land/p/demo/ownable"
 7)
 8
 9type Config struct {
10	Title       string
11	Description string
12	Github      string
13}
14
15var config = Config{
16	Title:       "JJOptimist's Home Realm 🏠",
17	Description: "Exploring Gno and building on-chain",
18	Github:      "jjoptimist",
19}
20
21var Ownable = ownable.NewWithAddress(std.Address("g16vfw3r7zuz43fhky3xfsuc2hdv9tnhvlkyn0nj"))
22
23func GetConfig() Config {
24	return config
25}
26
27func UpdateConfig(newTitle, newDescription, newGithub string) {
28	Ownable.AssertCallerIsOwner()
29	config.Title = newTitle
30	config.Description = newDescription
31	config.Github = newGithub
32}