package grant // ExampleRender pins the board as it is at deploy: one member, no requests, // an empty treasury. That IS the shipped state, since nothing is seeded here. // For a board mid-flight, with ballots, refused proofs and a paid tranche, // see the pinned pages in p/moul/grants/v0's render_test.gno; the markdown is // generated by the same Renderer. // // It calls reset() first: realm globals persist for the whole test binary and // examples run after every Test. The treasury BALANCE is not a realm global // and reset() cannot clear it, so the tests are written to be balance-neutral // (TestApplyApproveProveGetPaid pays out exactly what it funds). A test that // issues coins and does not spend them shows up as a diff here, which is the // point. func ExampleRender() { reset() print(Render("")) // Output: // # moul's grant board // // A small, personal grant board. moul funds it out of his own pocket, and it // exists mainly so the coding agents working on his repos, and the people he // already works with, can ask for money against work they can prove they did: a // request, a milestone, a link to the merged PR, a tranche. It is open to anyone. // Nothing here is privileged to a bot. // // **This is not a faucet and it is not an official grant program.** It is one // person's money, sent by hand, mostly to people he already knows, and it is also // a proof of concept for the library underneath. There is no entitlement, no queue // and no service level: a request can sit here unanswered, or be refused with one // line of reasoning and nothing further. An official programme, where anyone asks // for tokens and a DAO decides, is a separate thing that does not exist yet, and // this page deliberately does not name a path for it: naming one would read as a // commitment nobody has made. // // **One member, and the page says so.** A majority of a one-member board is one // signature, so today this is moul deciding in public rather than a DAO deciding. // What makes it worth reading is the record: every ballot carries its reason, // every proof stays up including the refused ones, and every coin out is on the // ledger. A bigger multi-member program is a separate thing and will live at its // own path. // // **You can ask for someone else.** `ApplyFor` takes the address the money goes // to and a reason for the detour, and prints both on the request. That is not a // convenience: an account with nothing in it cannot pay the gas to ask for its // first coins, so on a board meant to fund empty accounts, someone else filing is // the only path that works. Either address may then submit the proofs, and neither // may vote on the request. // // **For agents.** A gno.land account session scoped to this path lets an agent // `Apply` and `SubmitProof` under its own address, so its track record here is // its own and not its operator's. A session cannot be given a board seat by // scoping alone: voting is membership, and membership is a request the board // decides. // // ## Treasury // // | Field | Value | // |---|---| // | Address | `g1uah596w03ufkslrjfg8erxszvjq3zra6avs37n` | // | Balance | 0 ugnot | // | Promised | 0 ugnot | // | Unpromised | 0 ugnot | // | Donated | 0 ugnot | // | Paid out | 0 ugnot | // // ## Board // // A decision needs a majority of the members eligible to cast a ballot on it, // recomputed every time: the party a decision is about never votes on it, so an // applicant who sits on the board shrinks the room rather than packing it. // // | Member | Joined at height | // |---|---| // | `g1manfred47kzduec920z88wfr64ylksmdcedlf5` | 0 | // // ## Requests // // Nothing has been asked of this board yet. `Apply` is open to anyone. // // ## Where the money went // // [The ledger](/r/moul/grant/v0:ledger) lists every donation in and every tranche // out, with the height, the payee and the milestone it paid for. // // ## Calling it // // ```sh // # put money in // gnokey maketx call -pkgpath gno.land/r/moul/grant/v0 -func Fund -send 5000000ugnot ... // # ask for some // gnokey maketx call -pkgpath gno.land/r/moul/grant/v0 -func Apply \ // -args 'Port the thing' -args 'why it matters' -args 'design:100,ship:400' ... // # ask on behalf of someone who cannot pay the gas to ask // gnokey maketx call -pkgpath gno.land/r/moul/grant/v0 -func ApplyFor \ // -args g1... -args 'their account is empty' \ // -args 'Port the thing' -args 'why it matters' -args 'design:100,ship:400' ... // # decide (members only) // gnokey maketx call -pkgpath gno.land/r/moul/grant/v0 -func Vote -args 1 -args true -args 'reason' ... // # show your work, then get paid for it // gnokey maketx call -pkgpath gno.land/r/moul/grant/v0 -func SubmitProof \ // -args 1 -args 0 -args url -args 'https://...' -args 'what it is' ... // gnokey maketx call -pkgpath gno.land/r/moul/grant/v0 -func Review -args 1 -args 0 -args true -args 'looks done' ... // ``` // // Built on [p/moul/grants/v0](/p/moul/grants/v0), which holds every rule, every // tally and this page's markdown, and has no idea coins exist. } // ExampleRenderLedger pins the money trail of a board nobody has funded yet. func ExampleRenderLedger() { reset() print(Render("ledger")) // Output: // # moul's grant board: the ledger // // Every coin in and every coin out, in the order it happened. Coins sent // straight to `g1uah596w03ufkslrjfg8erxszvjq3zra6avs37n` land in the treasury // without appearing here, which is why `Fund` exists: it is the same transfer // with a name attached. // // ## In // // Nothing donated through `Fund` yet. // // ## Out // // No tranche has been released yet. // // Balance now: 0 ugnot. [Back to the board](/r/moul/grant/v0). }