Search Apps Documentation Source Content File Folder Download Copy Actions Download

config.gno

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