/** A counter whose count lives in the vat's storage. */ export const buildRootObject = ({ Far, storage }) => Far("counterRoot", { increment: () => { const n = (storage.get("count") ?? 0) + 1; storage.put("count", n); return n; }, read: () => storage.get("count") ?? 0, });