Raxol.Payments.ChainReader.Stub (Raxol Payments v0.2.0)

Copy Markdown View Source

Deterministic in-memory Raxol.Payments.ChainReader for tests.

This is the no-mock substrate: canned receipts and balances are looked up from plain maps, so tests inject known chain state without a mocking library. An unknown key returns {:error, :not_found}.

Summary

Functions

Build a stub reader.

Functions

new(opts \\ [])

Build a stub reader.

Options:

  • :receipts -- %{{chain_id, tx_hash} => receipt | :pending | {:error, term}}

  • :balances -- %{{chain_id, address} => wei}