Expand description
Serve a non-EVM chain in EVM shape:
native RPC ──► Adapter ──► RawBlock / RawTx ──► Normalizer ──► Normalized* ──► Transformer ──► EVM types
(fetch) (understand) (present)Each stage is a trait, so you can swap one without touching the others: a different
Solana RPC provider is a new Adapter; decoding SPL instructions differently is a new
Normalizer; emitting a different output format is a new Transformer.
Structs§
- Default
Mapper - Deterministic, stateless mapping.
- EvmTransformer
- The default transformer: produces
Block,Transaction,ReceiptandLog. - Indexed
Mapper - Wraps another mapper and remembers the last
capacityhashes it produced, so hashes seen in earlier blocks can be looked up again even when the mapping is one-way. - Normalized
Block - Normalized
Event - An EVM-log-shaped event: a Solidity-style signature, indexed accounts, and values.
- Normalized
Tx - Pipeline
- The three stages wired together. With the default
EvmTransformerit implementsChainProvider, so it can sit next to ancrate::EvmClient.
Enums§
- Event
Value - Value
Scale - How native amounts are expressed in
value, fees and native-coin event data.
Constants§
- NATIVE_
TOKEN_ ADDRESS - Address used as the
emitterof native-coin events (the common “native token” placeholder used by DEX aggregators and bridges). - NULL_
ACCOUNT - Use as an indexed event argument to mean “nobody” (mint / coinbase / burn).
The default mapper turns it into
0x000…000.
Traits§
- Adapter
- Stage 1 — talks to the native node and returns its payloads untouched.
- IdMapper
- How native ids become EVM addresses and hashes, and (where possible) back again.
- Normalizer
- Stage 2 — understands a chain’s raw payloads and produces the chain-agnostic model. Pure and synchronous, which makes it trivial to unit-test against JSON fixtures.
- Transformer
- Stage 3 — presents the normalized model in some output format.