Skip to main content

Module pipeline

Module pipeline 

Source
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§

DefaultMapper
Deterministic, stateless mapping.
EvmTransformer
The default transformer: produces Block, Transaction, Receipt and Log.
IndexedMapper
Wraps another mapper and remembers the last capacity hashes it produced, so hashes seen in earlier blocks can be looked up again even when the mapping is one-way.
NormalizedBlock
NormalizedEvent
An EVM-log-shaped event: a Solidity-style signature, indexed accounts, and values.
NormalizedTx
Pipeline
The three stages wired together. With the default EvmTransformer it implements ChainProvider, so it can sit next to an crate::EvmClient.

Enums§

EventValue
ValueScale
How native amounts are expressed in value, fees and native-coin event data.

Constants§

NATIVE_TOKEN_ADDRESS
Address used as the emitter of 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.