An immutable emulator for Cardano transactions.
Unlike scalus.cardano.node.Emulator, this emulator is fully immutable: every state-changing operation (submit, advanceSlot) returns a new ImmutableEmulator instance, leaving the original unchanged.
This makes it suitable for use in functional state-threading patterns such as the Scenario monad, where branching and backtracking require independent state copies.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Advance the slot by the given number of slots.
Advance the slot by the given number of slots.
Attributes
Create a read-only scalus.cardano.node.BlockchainReader snapshot.
Create a read-only scalus.cardano.node.BlockchainReader snapshot.
This provides read-only access to the emulator's state without submit capability. Uses ExecutionContext.global to avoid deadlocks when callers use Await.result on the returned futures.
Attributes
Current CardanoInfo snapshot.
Current CardanoInfo snapshot.
Attributes
Clear the applied-transaction bookkeeping (log + index), keeping ledger state.
Clear the applied-transaction bookkeeping (log + index), keeping ledger state.
Attributes
Current slot number.
Current slot number.
Attributes
Find UTxOs matching the given query.
Find UTxOs matching the given query.
Attributes
Look up the full applied-tx record (transaction + slot + spent inputs) by hash.
Look up the full applied-tx record (transaction + slot + spent inputs) by hash.
Attributes
Resolve a datum by its hash, or None if unknown.
Resolve a datum by its hash, or None if unknown.
Attributes
Look up a previously applied transaction by hash, or None if it was never applied.
Look up a previously applied transaction by hash, or None if it was never applied.
Attributes
True if the given transaction has been applied to this emulator.
True if the given transaction has been applied to this emulator.
Attributes
Current protocol parameters.
Current protocol parameters.
Attributes
Set the slot to a specific value.
Set the slot to a specific value.
Attributes
Submit a transaction, returning the transaction hash and a new emulator with updated state.
Submit a transaction, returning the transaction hash and a new emulator with updated state.
The original emulator is not modified.
Attributes
Convert to a mutable scalus.cardano.node.Emulator.
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product