boards.gno
0.54 Kb · 24 lines
1package boards
2
3import (
4 "regexp"
5
6 "gno.land/p/moul/txlink/v0"
7 "gno.land/p/nt/avl/v0"
8)
9
10//----------------------------------------
11// Realm (package) state
12
13var (
14 gRealmLink = txlink.Realm("gno.land/r/archive/boards")
15 gBoards avl.Tree // id -> *Board
16 gBoardsCtr int // increments Board.id
17 gBoardsByName avl.Tree // name -> *Board
18 gDefaultAnonFee = 100000000 // minimum fee required if anonymous
19)
20
21//----------------------------------------
22// Constants
23
24var reName = regexp.MustCompile(`^[a-z]+[_a-z0-9]{2,29}$`)