Skip to main content

Module receipts

Module receipts 

Source
Expand description

State receipts and event emission.

Receipts are Hopper’s way of making state changes observable. After mutating state, programs emit a receipt that can be:

  • logged to the runtime for indexers/explorers
  • returned as instruction data for CPI callers
  • used by testing and auditing tools

This is Hopper’s current state-observability surface. Raw receipts, tagged receipts, typed receipts, and CPI return data are all available today, and the same wire formats feed schema and manager tooling.

Traits§

Receipt
Trait for types that can be emitted as receipts.

Functions§

emit_receipt
Emit a raw receipt (log the bytes to the runtime).
emit_tagged_receipt
Emit a receipt with a type tag prefix.
emit_typed_receipt
Emit a typed receipt.
set_return_data
Set return data for the current instruction.