Commit a593158
Edward (OpenClaw)
asset-leasing: merge per-instruction reference and worked-examples sections
The README had two parallel structures covering the same ground:
- §3 "Instruction handler lifecycle walkthrough" listed each of the
seven instruction handlers in isolation (signers, accounts, what
happens, errors).
- §4 "Full-lifecycle worked examples" walked through five scenarios
that called sequences of those same handlers.
A reader had to flip between §3 (reference) and §4 (narrative) to
follow what any given scenario actually did, and the happy-path
scenario in §4.1 simply re-traced the §3 reference with concrete
numbers attached.
Replace both with a single integrated "3. Lifecycle" section:
- 3.1–3.7 walk the program in narrative order — holder lists tokens,
short seller takes the offer, lease fee streams, short seller
defends or closes, and the two failure-mode branches (liquidate,
close_expired). Each handler's full mechanics (signers, accounts,
what happens, errors) are listed inline as bullet lists at first
appearance.
- 3.8 keeps the four pedagogically-valuable branch scenarios from old
§4 (liquidation, falling-price profit, default on Active, cancel on
Listed) with their concrete numbers, but rewrites them as concise
branches that reference the integrated §3 prose rather than
re-explaining the mechanics. The old §4.1 happy-path is dropped
because §3.5 now covers it.
Renumber later sections (Safety §5→§4, Tests §6→§5, Quasar §7→§6,
Extending §8→§7), update the table of contents, and fix all
cross-references including the §1 link to Quasar port and the §1
"see §X" pointers.
Drop all ASCII flow-arrow diagrams in favour of bullet-list prose,
per house style. No Mermaid added.
Other style fixes applied while rewriting: replace remaining uses of
"protocol" with "program" (Solana onchain code is a program;
"protocol" is EVM jargon), use "instruction handler" not
"instruction" when referring to the function/code, and link
program-derived address / associated token account / cross-program
invocation / instruction handler inline to solana.com/docs/terminology
on first occurrence.1 parent 25f5f8b commit a593158
1 file changed
Lines changed: 484 additions & 638 deletions
0 commit comments