MaxPostLen
untyped bigintValue
(5000 <untyped> bigint)
MaxTitleLen
untyped bigintValue
(200 <untyped> bigint)
MaxChannels
untyped bigintValue
(20 <untyped> bigint)
MaxThreadsPerChan
untyped bigintValue
(500 <untyped> bigint)
FlagThreshold
untyped bigint// flags before auto-hide
Value
(3 <untyped> bigint)
MaxRepliesPerThread
untyped bigint// live (non-deleted) replies per thread
Value
(500 <untyped> bigint)
ReplyPageSize
untyped bigint// replies rendered per page
Value
(50 <untyped> bigint)
ChannelType
typeValue
memba_dao_channels_v2.ChannelType
ChannelText
memba_dao_channels_v2.ChannelTypeValue
<gnolang.StringValue>
ChannelAnnouncements
memba_dao_channels_v2.ChannelTypeValue
<gnolang.StringValue>
ChannelReadonly
memba_dao_channels_v2.ChannelTypeValue
<gnolang.StringValue>
Channel
typeValue
memba_dao_channels_v2.Channel
Thread
typeValue
memba_dao_channels_v2.Thread
Reply
typeValue
memba_dao_channels_v2.Reply
channels
*avl.Tree// name -> \*Channel
- OID
- 0bea83…0ede:76
channels details
threads
*avl.Tree// "channel/id" -> \*Thread
- OID
- 0bea83…0ede:124
threads details
replies
*avl.Tree// "channel/threadId/replyId" -> \*Reply
- OID
- 0bea83…0ede:126
replies details
threadCount
*avl.Tree// channel -> uint64 (next thread ID, monotonic)
- OID
- 0bea83…0ede:128
threadCount details
threadLive
*avl.Tree// channel -> uint64 (currently live (non-deleted) threads)
- OID
- 0bea83…0ede:152
threadLive details
threadLiveIDs
*avl.Tree// channel -> \[]uint64 (live thread IDs, ascending) — bounds renderChannel
- OID
- 0bea83…0ede:176
threadLiveIDs details
replyCount
*avl.Tree// "channel/threadId" -> uint64 (next reply ID, monotonic)
- OID
- 0bea83…0ede:178
replyCount details
replyLive
*avl.Tree// "channel/threadId" -> uint64 (currently live (non-deleted) replies)
- OID
- 0bea83…0ede:180
replyLive details
replyLiveIDs
*avl.Tree// "channel/threadId" -> \[]uint64 (live reply IDs, ascending) — bounds renderThread
- OID
- 0bea83…0ede:182
replyLiveIDs details
threadTomb
*avl.Tree// channel -> \[]uint64 (soft-deleted thread IDs awaiting hard-GC via SweepTombstones) — B2
- OID
- 0bea83…0ede:184
threadTomb details
flags
*avl.Tree// "channel/threadId" -> \*avl.Tree (flagger addr -> bool)
- OID
- 0bea83…0ede:186
flags details
channelOrder
[]string// ordered channel names
- OID
- 0bea83…0ede:192
channelOrder details
members
*avl.Tree- OID
- 0bea83…0ede:188
members details
paused
boolValue
false
owner
.uverse.addressValue
<gnolang.StringValue>
init.29
func()- OID
- 0bea83…0ede:18
init.29 details
addChannel
func(name string, description string, ctype memba_dao_channels_v2.ChannelType, readRoles []string, writeRoles []string)- OID
- 0bea83…0ede:20
addChannel details
AddMember
func(addr .uverse.address, roles string)AddMember adds an address with specified roles. Only the owner can call this. roles is a comma-separated list (e.g., "admin,dev" or "member").
- OID
- 0bea83…0ede:21
AddMember details
RemoveMember
func(addr .uverse.address)RemoveMember removes an address from the membership. Only the owner can call this.
- OID
- 0bea83…0ede:22
RemoveMember details
UpdateMemberRoles
func(addr .uverse.address, newRoles string)UpdateMemberRoles updates the roles for an existing member. Only the owner can call this.
- OID
- 0bea83…0ede:23
UpdateMemberRoles details
TransferOwnership
func(newOwner .uverse.address)TransferOwnership transfers realm ownership to a new address. Only the current owner can call this. The new owner gets "admin" added to their existing roles (not overwritten). The old owner is demoted from "admin" to "member".
- OID
- 0bea83…0ede:24
TransferOwnership details
SyncMembers
func(addresses string, rolesList string)SyncMembers allows the owner to batch-sync membership from the DAO. addresses and rolesList are comma-separated, with roles pipe-delimited per address. Example: SyncMembers("g1a,g1b", "admin,dev|member")
- OID
- 0bea83…0ede:25
SyncMembers details
PurgeNonMembers
func(keepAddresses string)PurgeNonMembers removes all members not in the provided comma-separated list. The owner is never purged.
- OID
- 0bea83…0ede:26
PurgeNonMembers details
IsMember
func(addr .uverse.address) boolIsMember returns whether an address is a member.
- OID
- 0bea83…0ede:27
IsMember details
GetMemberRoles
func(addr .uverse.address) stringGetMemberRoles returns the roles for a member (comma-separated) or empty string.
- OID
- 0bea83…0ede:28
GetMemberRoles details
GetOwner
func() .uverse.address- OID
- 0bea83…0ede:29
GetOwner details
assertNotPaused
func()- OID
- 0bea83…0ede:30
assertNotPaused details
PauseRealm
func()- OID
- 0bea83…0ede:31
PauseRealm details
UnpauseRealm
func()- OID
- 0bea83…0ede:32
UnpauseRealm details
IsPaused
func() bool- OID
- 0bea83…0ede:33
IsPaused details
CreateChannel
func(name string, description string, ctype string)CreateChannel adds a new channel. Only the owner (admin) can create channels.
- OID
- 0bea83…0ede:34
CreateChannel details
PostThread
func(channel string, title string, body string) uint64PostThread creates a new thread in a channel. Caller must be a member with a role listed in the channel's WriteRoles.
- OID
- 0bea83…0ede:35
PostThread details
PostReply
func(channel string, threadID uint64, body string)PostReply adds a reply to a thread. Caller must be a member with a role listed in the channel's WriteRoles.
- OID
- 0bea83…0ede:36
PostReply details
dropReply
func(threadKey string, replyKey string, replyID uint64)dropReply hard-removes a reply: deletes the node (storage reclaimed — B2), drops it from the live index, and decrements the live count. Shared by DeleteReply and RemoveReply. renderThread only walks the live index, so a removed reply is never looked up — no tombstone is needed.
- OID
- 0bea83…0ede:37
dropReply details
DeleteReply
func(channel string, threadID uint64, replyID uint64)DeleteReply lets the reply's author delete it. Caller must be a member and the original author. The reply node is hard-removed (B2 state-shrink) and a slot is freed under MaxRepliesPerThread (B1).
- OID
- 0bea83…0ede:38
DeleteReply details
RemoveReply
func(channel string, threadID uint64, replyID uint64)RemoveReply permanently removes a reply (moderation — admin role only). Hard- removes the node like DeleteReply, bounding renderThread (B1) + reclaiming storage (B2).
- OID
- 0bea83…0ede:39
RemoveReply details
EditThread
func(channel string, threadID uint64, newBody string)EditThread allows the original author to edit their thread. Caller must be a member.
- OID
- 0bea83…0ede:40
EditThread details
DeleteThread
func(channel string, threadID uint64)DeleteThread soft-deletes a thread (marks as deleted). Caller must be a member and the original author.
- OID
- 0bea83…0ede:41
DeleteThread details
FlagThread
func(channel string, threadID uint64)FlagThread flags a thread for moderation review. After FlagThreshold flags, the thread is auto-hidden. Caller must be a member (any role) to flag content.
- OID
- 0bea83…0ede:42
FlagThread details
UnhideThread
func(channel string, threadID uint64)UnhideThread allows the owner or an admin to clear flags and un-hide a thread.
- OID
- 0bea83…0ede:43
UnhideThread details
RemoveThread
func(channel string, threadID uint64)RemoveThread permanently removes a thread (moderation action — admin role only).
- OID
- 0bea83…0ede:44
RemoveThread details
SweepTombstones
func(channel string, limit int) intSweepTombstones hard-removes up to \`limit\` soft-deleted threads in a channel (and all of their remaining reply state), reclaiming AVL storage so that post+delete spam can no longer accrete permanent state (B2). Permissionless GC by design: anyone may call it. Released storage deposits go to the calling tx per the chain's deposit policy (an explicit caller bounty); on restricted-denom chains (e.g. test12/test13 \`restricted\_denoms=\["ugnot"]\`) they route to the StorageFeeCollector instead — so this is a state-shrink/ hygiene primitive, not a user-refund path (see plan B2 / Q11). Bounded + idempotent: each soft-deleted thread holds at most MaxRepliesPerThread reply nodes, so keep \`limit\` small (1–5) to stay well within block gas; re-running drains the next batch and stops at 0. Returns the number of threads swept.
- OID
- 0bea83…0ede:45
SweepTombstones details
GetTombstoneCount
func(channel string) intGetTombstoneCount returns how many soft-deleted threads in a channel are still awaiting hard-GC (read-only; lets ops/indexers decide when to call SweepTombstones).
- OID
- 0bea83…0ede:46
GetTombstoneCount details
Render
func(path string) string- OID
- 0bea83…0ede:47
Render details
renderHome
func() stringrenderHome produces the board home page. Format: parser.ts parseBoardHome() expects: - \[#name](:\_channel/name) 📢 (N threads)
- OID
- 0bea83…0ede:48
renderHome details
renderChannel
func(channelName string) stringrenderChannel produces a channel's thread list. Format: parser.ts parseThreadList() expects: ### [Title](:channel/id) by g1addr... | N replies | block H
- OID
- 0bea83…0ede:49
renderChannel details
renderThread
func(channelName string, threadID uint64, page uint64) stringrenderThread produces a single thread with replies. Format: parser.ts parseThreadDetail() expects: # Title body --- *Posted by g1addr at block H* *(edited at block M)* ## Replies **g1addr...** (block H) *(edited)* reply body ---
- OID
- 0bea83…0ede:50
renderThread details
parsePageQuery
func(q string) uint64parsePageQuery extracts the page number from a "?page=N" query string (also tolerates extra &-separated params). Returns 0 (= default/newest) on absence or parse error.
- OID
- 0bea83…0ede:51
parsePageQuery details
pageClamp
func(p uint64, totalPages uint64) uint64pageClamp keeps a page link within \[1, totalPages].
- OID
- 0bea83…0ede:52
pageClamp details
renderACL
func(channelName string) stringrenderACL produces the ACL response for a channel. Format: parser.ts parseACL() expects: read:role1,role2 write:role1,role2,role3 type:text
- OID
- 0bea83…0ede:53
renderACL details
getChannel
func(name string) *memba_dao_channels_v2.Channel- OID
- 0bea83…0ede:54
getChannel details
getThreadCount
func(channel string) uint64- OID
- 0bea83…0ede:55
getThreadCount details
getLiveThreadCount
func(channel string) uint64getLiveThreadCount returns the number of non-deleted threads in a channel. Unlike getThreadCount (monotonic ID counter), this decreases when threads are deleted, so deleted threads free up slots under MaxThreadsPerChan.
- OID
- 0bea83…0ede:56
getLiveThreadCount details
getLiveThreadIDs
func(channel string) []uint64- OID
- 0bea83…0ede:57
getLiveThreadIDs details
addLiveThreadID
func(channel string, id uint64)- OID
- 0bea83…0ede:58
addLiveThreadID details
removeLiveThreadID
func(channel string, id uint64)- OID
- 0bea83…0ede:59
removeLiveThreadID details
getLiveReplyCount
func(threadKey string) uint64- OID
- 0bea83…0ede:60
getLiveReplyCount details
getLiveReplyIDs
func(threadKey string) []uint64- OID
- 0bea83…0ede:61
getLiveReplyIDs details
addLiveReplyID
func(threadKey string, id uint64)- OID
- 0bea83…0ede:62
addLiveReplyID details
removeLiveReplyID
func(threadKey string, id uint64)- OID
- 0bea83…0ede:63
removeLiveReplyID details
getThreadTomb
func(channel string) []uint64- OID
- 0bea83…0ede:64
getThreadTomb details
enqueueThreadTomb
func(channel string, id uint64)- OID
- 0bea83…0ede:65
enqueueThreadTomb details
getReplyCount
func(threadKey string) uint64- OID
- 0bea83…0ede:66
getReplyCount details
truncAddr
func(addr .uverse.address) string- OID
- 0bea83…0ede:67
truncAddr details
isValidRoles
func(s string) boolisValidRoles validates a comma-separated role list contains only safe characters. Allowed: a-z, A-Z, 0-9, hyphen, comma. No spaces, no markdown chars, no null bytes.
- OID
- 0bea83…0ede:68
isValidRoles details
sanitizeForRender
func(s string) stringsanitizeForRender strips markdown-sensitive characters to prevent injection.
- OID
- 0bea83…0ede:69
sanitizeForRender details
assertCallerIsOwner
func()- OID
- 0bea83…0ede:70
assertCallerIsOwner details
assertCallerIsMember
func(caller .uverse.address)- OID
- 0bea83…0ede:71
assertCallerIsMember details
assertCallerHasWriteAccess
func(caller .uverse.address, ch *memba_dao_channels_v2.Channel)assertCallerHasWriteAccess checks that the caller is a member AND has at least one role that matches the channel's WriteRoles.
- OID
- 0bea83…0ede:72
assertCallerHasWriteAccess details
hasRole
func(caller .uverse.address, role string) bool- OID
- 0bea83…0ede:73
hasRole details
assertCallerIsAdminRole
func()assertCallerIsAdminRole checks that the caller is a member with the "admin" role. Used for moderation actions (RemoveThread, UnhideThread) so any admin can moderate, not just the single owner.
- OID
- 0bea83…0ede:74
assertCallerIsAdminRole details
isValidChannelName
func(name string) boolisValidChannelName validates that a channel name contains only lowercase alphanumeric characters and hyphens, and does not start with underscore.
- OID
- 0bea83…0ede:75