Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

render.gno

3.11 Kb · 62 lines
 1package grant
 2
 3import "gno.land/p/moul/grants/v0"
 4
 5// The board's whole front page is these three strings plus the library's
 6// Renderer. Nothing about the layout lives here, which is the test of whether
 7// the split worked: a second board is another file this size.
 8const (
 9	intro = "A small, personal grant board. moul funds it out of his own pocket, and it\n" +
10		"exists mainly so the coding agents working on his repos, and the people he\n" +
11		"already works with, can ask for money against work they can prove they did: a\n" +
12		"request, a milestone, a link to the merged PR, a tranche. It is open to anyone.\n" +
13		"Nothing here is privileged to a bot."
14
15	notofficial = "**This is not a faucet and it is not an official grant program.** It is one\n" +
16		"person's money, sent by hand, mostly to people he already knows, and it is also\n" +
17		"a proof of concept for the library underneath. There is no entitlement, no queue\n" +
18		"and no service level: a request can sit here unanswered, or be refused with one\n" +
19		"line of reasoning and nothing further. An official programme, where anyone asks\n" +
20		"for tokens and a DAO decides, is a separate thing that does not exist yet, and\n" +
21		"this page deliberately does not name a path for it: naming one would read as a\n" +
22		"commitment nobody has made."
23
24	scope = "**One member, and the page says so.** A majority of a one-member board is one\n" +
25		"signature, so today this is moul deciding in public rather than a DAO deciding.\n" +
26		"What makes it worth reading is the record: every ballot carries its reason,\n" +
27		"every proof stays up including the refused ones, and every coin out is on the\n" +
28		"ledger. A bigger multi-member program is a separate thing and will live at its\n" +
29		"own path."
30
31	forothers = "**You can ask for someone else.** `ApplyFor` takes the address the money goes\n" +
32		"to and a reason for the detour, and prints both on the request. That is not a\n" +
33		"convenience: an account with nothing in it cannot pay the gas to ask for its\n" +
34		"first coins, so on a board meant to fund empty accounts, someone else filing is\n" +
35		"the only path that works. Either address may then submit the proofs, and neither\n" +
36		"may vote on the request."
37
38	agents = "**For agents.** A gno.land account session scoped to this path lets an agent\n" +
39		"`Apply` and `SubmitProof` under its own address, so its track record here is\n" +
40		"its own and not its operator's. A session cannot be given a board seat by\n" +
41		"scoping alone: voting is membership, and membership is a request the board\n" +
42		"decides."
43
44	footer = "Built on [p/moul/grants/v0](/p/moul/grants/v0), which holds every rule, every\n" +
45		"tally and this page's markdown, and has no idea coins exist."
46)
47
48// Render serves the board at "", one request at "request/<id>", and the money
49// trail at "ledger".
50func Render(path string) string {
51	return grants.Renderer{
52		Program:  program,
53		Title:    "moul's grant board",
54		Intro:    intro,
55		Notes:    []string{notofficial, scope, forothers, agents},
56		Path:     Path,
57		Link:     Link,
58		Treasury: Address(),
59		Balance:  Balance(),
60		Footer:   footer,
61	}.Render(path)
62}