silas
silas
mass
unit price
hull
state
odometer

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 json

accounts

accountseedssizeholds
bodysilas, mint1,412 bytesstate, hull, power, heat, odometer, grounded tripod, position, heading, cells visited, antenna a, antenna b, face bits, genome, counters, fee reserve pointer
legleg, mint, index64 bytes plus plattersindex, load, bearing, floor, faulted, platter count, platter list
platterplatter, mint, index, stride48 bytesleg index, stride number, load, bearing, odometer, scrapped flag
pippip, mint2,980 bytessurvival count, genome copy, position copy, heading copy, odometer copy, face ring of sixty four, log of two hundred and fifty six entries
cratecrate, mint, stride40 bytesstride number, amount, destined leg, unloaded flag
fee reservereserve, minttoken accountthe hook fee balance the rules spend from
power cellpower, minttoken accountthe balance steps are paid from

instructions

instructioncallereffect
initialize_bodydeployer, oncecreates body, six legs, pip, fee reserve, power cell, writes the initial genome, sets state to idle
transfer_hooktoken program on every transferthe 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_listdeployer, onceregisters the accounts the hook needs so the token program can pass them
seal_platterinternal, from stridewrites one platter for one leg
unload_crateinternal, from stridedistributes the oldest crate to the lightest leg's holders
ventinternal, from the hookburns heat from the fee reserve
lock_buybackinternal, from the hookbuys from the pool with the fee reserve and burns the result
scrapinternal, from the hookthe skull plate rule
initialize_successordeployer, after a scrapcreates 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.