cooked-validators-4.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.MockChain.MockChainSt

Synopsis

Documentation

data MockChainSt Source #

Slightly more concrete version of UtxoState, used to actually run the simulation.

Instances

Instances details
Show MockChainSt Source # 
Instance details

Defined in Cooked.MockChain.MockChainSt

Default MockChainSt Source # 
Instance details

Defined in Cooked.MockChain.MockChainSt

Methods

def :: MockChainSt #

Eq MockChainSt Source # 
Instance details

Defined in Cooked.MockChain.MockChainSt

Monad m => MonadState MockChainSt (MockChainT m) Source # 
Instance details

Defined in Cooked.MockChain.Direct

getIndex :: UtxoIndex -> Map TxOutRef TxOut Source #

Converts a builtin UtxoIndex into our own usable map between utxos and associated outputs.

mcstToSkelContext :: MockChainSt -> SkelContext Source #

Generating a skeleton context from a mockchain state. This is dedicated to allowing the pretty printer to resolve skeleton parts.

mcstToEmulatedLedgerState :: MockChainSt -> EmulatedLedgerState Source #

Generating an emulated state for the emulator from a mockchain state and some parameters, based on a standard initial state

Canonical initial values

Initial MockChainSt from an initial distribution

referenceScriptMap0From :: InitialDistribution -> Map ValidatorHash (Versioned Validator) Source #

Reference scripts from initial distributions should be accounted for in the MockChainSt which is done using this function.

datumMap0From :: InitialDistribution -> Map DatumHash (TxSkelOutDatum, Integer) Source #

Datums from initial distributions should be accounted for in the MockChainSt which is done using this function.

utxoIndex0From :: InitialDistribution -> UtxoIndex Source #

This creates the initial UtxoIndex from an initial distribution by submitting an initial transaction with the appropriate content:

  • inputs consist of a single dummy pseudo input
  • all non-ada assets in outputs are considered minted
  • outputs are translated from the TxSkelOut list in the initial distribution

Two things to note: