program
the silas program is written in rust with anchor and deployed with its name set in the program's metadata so that explorers render it as silas rather than as a bare address. its interface description is published as a json file at the link below. this page describes the accounts and instructions in plain words. the json is the exact machine readable version.
open the interface jsonaccounts
| account | seeds | size | holds |
|---|---|---|---|
| body | silas, mint | 1,412 bytes | state, hull, power, heat, odometer, grounded tripod, position, heading, cells visited, antenna a, antenna b, face bits, genome, counters, fee reserve pointer |
| leg | leg, mint, index | 64 bytes plus platters | index, load, bearing, floor, faulted, platter count, platter list |
| platter | platter, mint, index, stride | 48 bytes | leg index, stride number, load, bearing, odometer, scrapped flag |
| pip | pip, mint | 2,980 bytes | survival count, genome copy, position copy, heading copy, odometer copy, face ring of sixty four, log of two hundred and fifty six entries |
| crate | crate, mint, stride | 40 bytes | stride number, amount, destined leg, unloaded flag |
| fee reserve | reserve, mint | token account | the hook fee balance the rules spend from |
| power cell | power, mint | token account | the balance steps are paid from |
instructions
| instruction | caller | effect |
|---|---|---|
| initialize_body | deployer, once | creates body, six legs, pip, fee reserve, power cell, writes the initial genome, sets state to idle |
| transfer_hook | token program on every transfer | the only recurring entry point. classifies the transfer, updates legs, antennae, hull, heat, power, genome, face, map, and triggers stride, vent, lock, fault, stall and scrap when their conditions hold |
| initialize_extra_account_meta_list | deployer, once | registers the accounts the hook needs so the token program can pass them |
| seal_platter | internal, from stride | writes one platter for one leg |
| unload_crate | internal, from stride | distributes the oldest crate to the lightest leg's holders |
| vent | internal, from the hook | burns heat from the fee reserve |
| lock_buyback | internal, from the hook | buys from the pool with the fee reserve and burns the result |
| scrap | internal, from the hook | the skull plate rule |
| initialize_successor | deployer, after a scrap | creates a new body for a new mint from pip's stored genome |
layouts
all integers are little endian. amounts are u64 in base units. the body layout, in order, is the eight byte anchor discriminator, the mint pubkey, a u8 state, a u64 hull, a u64 hull maximum, a u64 power, a u64 heat, a u64 odometer, a u64 shuffles, a u8 grounded tripod, an i32 x, an i32 y, a u8 heading, a u32 cells visited, an i128 antenna a, an i128 antenna b, a u32 face bits, two hundred and fifty six bytes of genome, a u32 strides, a u32 vents, a u32 locks, a u32 faults, a u32 stalls, a u32 crates on back, a u32 crates unloaded, a u64 burned by venting, a u64 burned by lock, a u64 queued crossings, and the fee reserve pubkey. the site decodes this layout directly with a dataview.
name on explorers
the deploy steps set the program name so it renders on solscan and solana fm. after deploying with anchor, the idl is published on chain with anchor idl init, and the program metadata name is written with the metadata program so the account shows silas. the exact commands are in the json file's metadata block under deploy notes. a program that shows as a bare address is a failed deploy.