Allowance
Allowance is what owner let spender draw.
Command
gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/social/threads/v0.Allowance(,)"
Result
Package threads is a discussion block any realm can embed, keyed on the page it appears on rather than on the realm that stores it.
It is the text half of gno.land/r/moul/reactions: the same embed shape, the same page keys, two lines in the host realm.
1import "gno.land/r/moul/x/social/threads/v0"
2
3func Render(path string) string {
4 return body + threads.RenderBlock()
5}
RenderBlock takes no argument because it does not need one: a plain read exported by a realm and called by another opens no realm frame, so unsafe.CurrentRealm() inside it reports the CALLER. The host realm's own path is the page key, and nothing has to be configured or registered. RenderBlockFor is the explicit form, for a realm that renders more than one page or already holds its path as a constant.
THREAD exists because placement is the one thing a discussion has that people want and cannot all have at once.
1mint 1 THREAD to a thread's author, the first time each distinct
2 address replies to it. People, not messages, and never yourself.
3sink [Boost] burns PinCost THREAD to pin a thread to the top of its
4 page for PinBlocks blocks. That is the only thing that removes
5 supply, and the only thing the token does.
6buyer anyone who wants placement and has not earned it. They have to
7 acquire THREAD from someone who did, with [Transfer], which is
8 what makes attention a market rather than a scoreboard.
It is farmable, and saying so is cheaper than pretending otherwise: two addresses replying to each other mint one THREAD each per thread. The fix is a gate on who counts as a replier, which belongs in a vouching realm and not here; until then the cost of farming is one transaction per point and the benefit is capped by what a pin is worth.
Allowance is what owner let spender draw.
gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/social/threads/v0.Allowance(,)"