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:85
channels details
threads
*avl.Tree// "channel/id" -> \*Thread
- OID
- 0bea83…0ede:133
threads details
replies
*avl.Tree// "channel/threadId/replyId" -> \*Reply
- OID
- 0bea83…0ede:135
replies details
threadCount
*avl.Tree// channel -> uint64 (next thread ID, monotonic)
- OID
- 0bea83…0ede:137
threadCount details
threadLive
*avl.Tree// channel -> uint64 (currently live (non-deleted) threads)
- OID
- 0bea83…0ede:161
threadLive details
threadLiveIDs
*avl.Tree// channel -> \[]uint64 (live thread IDs, ascending) — bounds renderChannel
- OID
- 0bea83…0ede:185
threadLiveIDs details
replyCount
*avl.Tree// "channel/threadId" -> uint64 (next reply ID, monotonic)
- OID
- 0bea83…0ede:187
replyCount details
replyLive
*avl.Tree// "channel/threadId" -> uint64 (currently live (non-deleted) replies)
- OID
- 0bea83…0ede:189
replyLive details
replyLiveIDs
*avl.Tree// "channel/threadId" -> \[]uint64 (live reply IDs, ascending) — bounds renderThread
- OID
- 0bea83…0ede:191
replyLiveIDs details
threadTomb
*avl.Tree// channel -> \[]uint64 (soft-deleted thread IDs awaiting hard-GC via SweepTombstones) — B2
- OID
- 0bea83…0ede:193
threadTomb details
flags
*avl.Tree// "channel/threadId" -> \*avl.Tree (flagger addr -> bool)
- OID
- 0bea83…0ede:195
flags details
channelOrder
[]string// ordered channel names
- OID
- 0bea83…0ede:201
channelOrder details
members
*avl.Tree- OID
- 0bea83…0ede:197
members details
membershipRevision
uint64Value
0
paused
boolValue
false
owner
.uverse.addressValue
<gnolang.StringValue>
pendingOwner
.uverse.addressValue
<gnolang.StringValue>
init.31
func()- OID
- 0bea83…0ede:20
init.31 details
addChannel
func(name string, description string, ctype memba_dao_channels_v2.ChannelType, readRoles []string, writeRoles []string)- OID
- 0bea83…0ede:22
addChannel details
seedAuthority
func(publisher .uverse.address)seedAuthority grants the publisher ownership and the only initial admin role.
- OID
- 0bea83…0ede:23
seedAuthority 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:24
AddMember details
RemoveMember
func(addr .uverse.address)RemoveMember removes an address from the membership. Only the owner can call this.
- OID
- 0bea83…0ede:25
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:26
UpdateMemberRoles details
ProposeOwner
func(newOwner .uverse.address)ProposeOwner names a successor owner. Only the owner can call this. Nothing is granted until the successor calls AcceptOwnership; a later proposal replaces an earlier one.
- OID
- 0bea83…0ede:27
ProposeOwner details
CancelPendingOwner
func()CancelPendingOwner withdraws the pending proposal. Only the owner can call this.
- OID
- 0bea83…0ede:28
CancelPendingOwner details
AcceptOwnership
func()AcceptOwnership completes the handoff. Only the pending owner can call this, so an address that cannot act here can never become owner. The previous owner loses membership and every role; the new owner keeps its existing roles and gains "admin". It is not pause-gated, like the other owner operations.
- OID
- 0bea83…0ede:29
AcceptOwnership 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:30
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:31
PurgeNonMembers details
IsMember
func(addr .uverse.address) boolIsMember returns whether an address is a member.
- OID
- 0bea83…0ede:32
IsMember details
GetMemberRoles
func(addr .uverse.address) stringGetMemberRoles returns the roles for a member (comma-separated) or empty string.
- OID
- 0bea83…0ede:33
GetMemberRoles details
GetMemberCount
func() intGetMemberCount lets the governance adapter detect unrelated membership changes before consuming a voted action.
- OID
- 0bea83…0ede:34
GetMemberCount details
GetMembershipRevision
func() uint64GetMembershipRevision changes for every owner-controlled membership write, including role updates and batch syncs that leave the count unchanged.
- OID
- 0bea83…0ede:35
GetMembershipRevision details
GetOwner
func() .uverse.address- OID
- 0bea83…0ede:36
GetOwner details
GetPendingOwner
func() .uverse.address- OID
- 0bea83…0ede:37
GetPendingOwner details
assertNotPaused
func()- OID
- 0bea83…0ede:38
assertNotPaused details
PauseRealm
func()- OID
- 0bea83…0ede:39
PauseRealm details
UnpauseRealm
func()- OID
- 0bea83…0ede:40
UnpauseRealm details
IsPaused
func() bool- OID
- 0bea83…0ede:41
IsPaused details
GetChannelState
func(name string) (int, bool, string, string, string, string)Value-only reads let a fixed governance adapter verify a voted channel creation without exposing the mutable channel record.
- OID
- 0bea83…0ede:42
GetChannelState details
CreateChannel
func(name string, description string, ctype string)CreateChannel adds a new channel. Only the owner (admin) can create channels.
- OID
- 0bea83…0ede:43
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:44
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:45
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:46
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:47
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:48
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:49
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:50
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:51
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:52
UnhideThread details
RemoveThread
func(channel string, threadID uint64)RemoveThread permanently removes a thread (moderation action — admin role only).
- OID
- 0bea83…0ede:53
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). Admin role only. The chain refunds the storage deposit of freed bytes to the transaction that frees them (gnoland-1 restricts no denom), and a thread's remaining replies were paid for by their authors. Restricting the sweep keeps thread authors and outsiders from collecting other members' deposits. 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:54
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:55
GetTombstoneCount details
Render
func(path string) string- OID
- 0bea83…0ede:56
Render details
renderHome
func() stringrenderHome produces the board home page. Format: parser.ts parseBoardHome() expects: - \[#name](:\_channel/name) 📢 (N threads)
- OID
- 0bea83…0ede:57
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:58
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:59
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:60
parsePageQuery details
pageClamp
func(p uint64, totalPages uint64) uint64pageClamp keeps a page link within \[1, totalPages].
- OID
- 0bea83…0ede:61
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:62
renderACL details
getChannel
func(name string) *memba_dao_channels_v2.Channel- OID
- 0bea83…0ede:63
getChannel details
getThreadCount
func(channel string) uint64- OID
- 0bea83…0ede:64
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:65
getLiveThreadCount details
getLiveThreadIDs
func(channel string) []uint64- OID
- 0bea83…0ede:66
getLiveThreadIDs details
addLiveThreadID
func(channel string, id uint64)- OID
- 0bea83…0ede:67
addLiveThreadID details
removeLiveThreadID
func(channel string, id uint64)- OID
- 0bea83…0ede:68
removeLiveThreadID details
getLiveReplyCount
func(threadKey string) uint64- OID
- 0bea83…0ede:69
getLiveReplyCount details
getLiveReplyIDs
func(threadKey string) []uint64- OID
- 0bea83…0ede:70
getLiveReplyIDs details
addLiveReplyID
func(threadKey string, id uint64)- OID
- 0bea83…0ede:71
addLiveReplyID details
removeLiveReplyID
func(threadKey string, id uint64)- OID
- 0bea83…0ede:72
removeLiveReplyID details
getThreadTomb
func(channel string) []uint64- OID
- 0bea83…0ede:73
getThreadTomb details
enqueueThreadTomb
func(channel string, id uint64)- OID
- 0bea83…0ede:74
enqueueThreadTomb details
getReplyCount
func(threadKey string) uint64- OID
- 0bea83…0ede:75
getReplyCount details
truncAddr
func(addr .uverse.address) string- OID
- 0bea83…0ede:76
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:77
isValidRoles details
sanitizeForRender
func(s string) stringsanitizeForRender strips markdown-sensitive characters to prevent injection.
- OID
- 0bea83…0ede:78
sanitizeForRender details
assertCallerIsOwner
func()- OID
- 0bea83…0ede:79
assertCallerIsOwner details
assertCallerIsMember
func(caller .uverse.address)- OID
- 0bea83…0ede:80
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:81
assertCallerHasWriteAccess details
hasRole
func(caller .uverse.address, role string) bool- OID
- 0bea83…0ede:82
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:83
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:84