cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.MockChain.MockChainState

Description

This module exposes the internal state in which our direct simulation is run, and functions to update and query it.

Synopsis

Documentation

data MockChainState Source #

The state used to run the simulation in Direct

Constructors

MockChainState 

Fields

mcstParamsL :: Lens' MockChainState Params Source #

A lens to set or get the parameters of the MockChainState

mcstLedgerStateL :: Lens' MockChainState EmulatedLedgerState Source #

A lens to set or get the ledger state of the MockChainState

mcstOutputsL :: Lens' MockChainState (Map TxOutRef (TxSkelOut, Bool)) Source #

A lens to set or get the outputs of the MockChainState

mcstConstitutionL :: Lens' MockChainState (Maybe (Versioned Script)) Source #

A lens to set or get the constitution script of the MockChainState

mockChainState0From :: MonadBlockChainBalancing m => InitialDistribution -> m MockChainState Source #

This creates the initial MockChainState from an initial distribution by submitting an initial transaction with the appropriate content. The genesis key hash has been taken from https://github.com/input-output-hk/cardano-node/blob/543b267d75d3d448e1940f9ec04b42bd01bbb16b/cardano-api/test/Test/Cardano/Api/Genesis.hs#L60