diff --git a/examples/gno.land/r/gnoland/hof/gno.mod b/examples/gno.land/r/gnoland/hof/gno.mod new file mode 100644 index 00000000000..6bc1758ea4d --- /dev/null +++ b/examples/gno.land/r/gnoland/hof/gno.mod @@ -0,0 +1 @@ +module gno.land/r/gnoland/hof \ No newline at end of file diff --git a/examples/gno.land/r/gnoland/hof/hof.gno b/examples/gno.land/r/gnoland/hof/hof.gno new file mode 100644 index 00000000000..3d805391462 --- /dev/null +++ b/examples/gno.land/r/gnoland/hof/hof.gno @@ -0,0 +1,49 @@ +// Package hof represents the gno.land hall of fame realm. +// It contains a permanent exhibition of items in the hall of fame, +// a possibility to host temporary ones created by its admins. +package hof + +import ( + "github.com/gnolang/gno/examples/gno.land/p/demo/avl" + "github.com/gnolang/gno/examples/gno.land/p/demo/seqid" + "time" +) + +var ( + permanent *Exhibition + temporary *avl.Tree + idCounter seqid.ID +) + +type Exhibition struct { + id seqid.ID + + title string + description string + startTime time.Time // given in RFC3339 + endTime time.Time // end time of the event, given in RFC3339 + items *avl.Tree +} + +func init() { + permanent = &Exhibition{ + id: idCounter.Next(), + title: "Hall Of Fame", + description: "gno.land's hall of fame!", + startTime: time.Now(), + endTime: time.Now(), + items: avl.NewTree(), + } + + temporary = avl.NewTree() + +} + +func Register() { + permanent + +} + +func RegisterTemp(id seqid.ID) { + +}