precompilisium
Reference

Watch list

Accounts and assets are served on request, so the keeper only pays for what someone reads.

NotServed
first read of an account
watch()→
Served
on change + 60 s heartbeat
24 h→
Renewed by use
or dropped when idle

How it works

Call CoreStore.watch(kind, input) with the same raw input you will read, or press Serve it in the playground. The keeper picks up the Watch event and starts posting that account's position, spot balances, margin summary and coreUserExists on every change and every 60 seconds. Every perp's mark and oracle price and the main spot books are served without asking.

Windows and caps

A watch lasts 24 hours and renews when the key is read. One caller can open 32 watches a day in this version.