DocsThe brain
A new system
brain/chapters/a-new-system.mdBrain status: partial
When no recipe knows a contract, figure it out, and say so as you go.
- Read it.
read_chaingives what it answers and, when the source is verified, its events and calls. - Find where power is (
where-power-lives): which calls name tokens or owners, which events record joining, voting, sponsoring or leaving. - Match each to a shape: a token it names is token balances; an event with an address in an indexed field is count by participant; an event that doesn't name who acted is count by sender.
- Read small and check:
read_chainwithlogsfor one event over a narrow range first, and compare a total with what the contract itself answers. - Keep what you read as a layer (
add_layer), saying how you made it and what you read, so the person sees it on their flower. - Write the recipe as a file, in the shape of the brain's recipes (
recipe/v1), if the system is worth reading again. Offer it as a pull request (contributing).
Never guess a shape's answer: if a read can't say who acted, say that.