Skip to content

Commit

Permalink
add initial hof
Browse files Browse the repository at this point in the history
  • Loading branch information
leohhhn committed Sep 24, 2024
1 parent 9897b66 commit 5d8a12b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/gno.land/r/gnoland/hof/gno.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module gno.land/r/gnoland/hof
49 changes: 49 additions & 0 deletions examples/gno.land/r/gnoland/hof/hof.gno
Original file line number Diff line number Diff line change
@@ -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) {

}

0 comments on commit 5d8a12b

Please sign in to comment.