# `EEVM.Database.Legacy`
[🔗](https://github.com/mw2000/eevm/blob/v0.1.0/lib/eevm/database/legacy.ex#L1)

> This module is deprecated. Implement the EEVM.Database read callbacks instead.

Adapts a backend written against the pre-1.0 `EEVM.Database` callbacks
(`get_account/2`, `get_balance/2`, `set_balance/3`, `storage_store/4`, ...)
to the read-only behaviour. `EEVM.Database.new/2` wraps such a module
automatically; this shim is kept for one minor version.

Recognising such a module is the one place eevm asks the code server which
functions a module exports (`adapt/2`). It goes away with this module.

Its state is `{module, module_state}`. Reads call the old query callbacks,
`commit/2` replays the changes through the old write callbacks, and
BLOCKHASH falls back to the block environment only.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
