Communities
A community is a records-only social object — the umbrella a client renders as a company page, a creator channel, a group, a forum, a DAO, a subreddit, or anything else. Its name and id are on-chain and its owner is on-chain, but the contract does not adjudicate who may post. Membership, roles and posting policy are open, self-describing state that clients and indexers interpret — the same "record, don't enforce" model as posts and the graph. The only thing the chain guarantees is control-integrity: who may write another member's standing.
Identity: name, id and owner are on-chain
createCommunity(uid, bytes32 kind, bytes32[] keys, bytes[] values) payable returns (communityId)
Creating a community mints the next communityId (first = 1), pays the COMMUNITY_FEE
(0.001 ETH, pushed to the treasury), and records an owner uid and a kind — a
self-describing type token set once ("company", "channel", "group", "forum",
"dao", …). A community can have its own handle in a separate namespace from user
names, with the same charset, length, fee-by-length and 30-day rename rules. Communities
are permanent — there is no delete.
Ownership transfers are two-step (transferCommunity then acceptCommunity), so no
community can be pushed onto a profile that didn't accept it.
Flexible relationship between users and a community
Two open bitmaps mirror the user-to-user graph:
standing— the community's view of a member, written by the owner or admins.memberEdge— the member's own view of the community (follow / mute / label), written only by that member, and it may point at any community id.
Suggested standing low bits (only ADMIN is contract-honoured; the rest are advisory):
MEMBER, ADMIN, BANNED, CAN_POST, MODERATOR, VERIFIED, with higher ranges for
registry-defined tiers (subscriber, contributor, editor, paid tiers…) and community-private
bits. A member may hold any combination at once.
Records-only posting
communityBuzz requires only that the community exists and the caller holds POST.
Standing is not enforced — a banned uid's post still lands on-chain; clients hide it.
"Private" means clients don't display non-members' posts, not that the chain refused them.
It emits the normal Buzzed event plus:
CommunityPosted(uint256 indexed communityId, uint256 indexed uid, uint256 indexed bid, bytes32[] settings)
The one rule the chain does enforce is authority over standing: the owner may set any
word for anyone but itself; a non-owner must hold the ADMIN bit, may not grant ADMIN,
and may not touch another admin. A member may shed its own standing with leaveCommunity
— unless it carries the BANNED bit (no self-unban). All community control actions
require the acting address to hold COMMUNITY for that uid.
Endless possibilities
Because the contract only records membership and roles, one primitive renders as many
products. The same community object is a Discord-style server, a Facebook-style page, a
subreddit, a paid newsletter, a DAO, or a brand channel — the difference is entirely which
kind, which standing bits, and which client. Nothing about a new community shape
requires a contract change.
Events: CommunityCreated, CommunityTransferProposed, CommunityTransferred,
CommunityNameSet, CommunityStandingSet, CommunityDataSet, MemberEdgeSet.