Registry — General-Purpose Key/Value Storage
One-line pitch: A generic owner-written byte store with typed overloads; reads are public.
What this is
Section titled “What this is”Registry stores byte keys and values. Its public interface uses Get, Inserted, Count and GetHashByIndex; owner-gated Register and Remove have typed overloads. Register does not overwrite an existing key. Removal uses swap-and-pop, so indices need not remain stable.
If you’ve played a web3 game before
Section titled “If you’ve played a web3 game before”- Closest analogy: a generic key-value mapping contract like Ethereum’s on-chain registries.
- Or: Redis on-chain — simple get/set, nothing fancy.
- Or: a namespace-aware contract-level storage module.
| Dysnomia term | What it maps to |
|---|---|
| Registry | Generic bytes → bytes store |
| Get / Inserted / Register / Remove | Read, membership check, owner-gated write and delete |
| No-overwrite | Must Remove before re-Register |
What you actually do with it
Section titled “What you actually do with it”Use the exact ABI overload and known key encoding. Enumerate with Count/GetHashByIndex when a verified instance exposes them. A general Registry interface is not proof of an active player deployment.
Rewards / costs
Section titled “Rewards / costs”Reads can be queried without an on-chain transaction. Authorized writes cost storage gas and do not imply a reward.
Requirements & gating
Section titled “Requirements & gating”- Owner (MultiOwnable) controls writes. Reads are public.
Where it connects
Section titled “Where it connects”Used by various contracts needing flexible storage. No single “canonical consumer” — think of it as scratch space.
Quick FAQ
Section titled “Quick FAQ”Indices are not stable: Remove moves the last entry into the freed slot.
Want the Solidity? The contract reference lives at
technical/lib/REGISTRY.