plutus-chain-index-core-1.2.0.0
Safe HaskellNone
LanguageHaskell2010

Plutus.ChainIndex.Emulator.DiskState

Description

The disk state is the part of the chain index that is kept on disk. This module defines an in-memory implementation of the disk state which can be used in the emulator.

Synopsis

Documentation

data DiskState Source #

Data that we keep on disk. (This type is used for testing only - we need other structures for the disk-backed storage)

Instances

Instances details
Eq DiskState Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Show DiskState Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Generic DiskState Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Associated Types

type Rep DiskState :: Type -> Type Source #

Semigroup DiskState Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Monoid DiskState Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

type Rep DiskState Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

type Rep DiskState = D1 ('MetaData "DiskState" "Plutus.ChainIndex.Emulator.DiskState" "plutus-chain-index-core-1.2.0.0-KXwe88sWnh3Kg9uXBYztrS" 'False) (C1 ('MetaCons "DiskState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_DataMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map DatumHash Datum)) :*: (S1 ('MetaSel ('Just "_ScriptMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map ScriptHash (Versioned Script))) :*: S1 ('MetaSel ('Just "_RedeemerMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map RedeemerHash Redeemer)))) :*: (S1 ('MetaSel ('Just "_TxMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map TxId ChainIndexTx)) :*: (S1 ('MetaSel ('Just "_AddressMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CredentialMap) :*: S1 ('MetaSel ('Just "_AssetClassMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AssetClassMap)))))

dataMap :: Lens' DiskState (Map DatumHash Datum) Source #

scriptMap :: Lens' DiskState (Map ScriptHash (Versioned Script)) Source #

redeemerMap :: Lens' DiskState (Map RedeemerHash Redeemer) Source #

txMap :: Lens' DiskState (Map TxId ChainIndexTx) Source #

fromTx :: ChainIndexTx -> DiskState Source #

The data we store on disk for a given ChainIndexTx

data CredentialMap Source #

Set of transaction output references for each address.

Instances

Instances details
Eq CredentialMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Show CredentialMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Generic CredentialMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Associated Types

type Rep CredentialMap :: Type -> Type Source #

Semigroup CredentialMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Monoid CredentialMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

At CredentialMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Methods

at :: Index CredentialMap -> Lens' CredentialMap (Maybe (IxValue CredentialMap))

Ixed CredentialMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Methods

ix :: Index CredentialMap -> Traversal' CredentialMap (IxValue CredentialMap)

type Rep CredentialMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

type Rep CredentialMap = D1 ('MetaData "CredentialMap" "Plutus.ChainIndex.Emulator.DiskState" "plutus-chain-index-core-1.2.0.0-KXwe88sWnh3Kg9uXBYztrS" 'True) (C1 ('MetaCons "CredentialMap" 'PrefixI 'True) (S1 ('MetaSel ('Just "_unCredentialMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Credential (Set TxOutRef)))))
type Index CredentialMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

type Index CredentialMap = Credential
type IxValue CredentialMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

type IxValue CredentialMap = Set TxOutRef

unCredentialMap :: Iso' CredentialMap (Map Credential (Set TxOutRef)) Source #

data AssetClassMap Source #

Set of transaction output references for each asset class.

Instances

Instances details
Eq AssetClassMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Show AssetClassMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Generic AssetClassMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Associated Types

type Rep AssetClassMap :: Type -> Type Source #

Semigroup AssetClassMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Monoid AssetClassMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

At AssetClassMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Methods

at :: Index AssetClassMap -> Lens' AssetClassMap (Maybe (IxValue AssetClassMap))

Ixed AssetClassMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

Methods

ix :: Index AssetClassMap -> Traversal' AssetClassMap (IxValue AssetClassMap)

type Rep AssetClassMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

type Rep AssetClassMap = D1 ('MetaData "AssetClassMap" "Plutus.ChainIndex.Emulator.DiskState" "plutus-chain-index-core-1.2.0.0-KXwe88sWnh3Kg9uXBYztrS" 'True) (C1 ('MetaCons "AssetClassMap" 'PrefixI 'True) (S1 ('MetaSel ('Just "_unAssetClassMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map AssetId (Set TxOutRef)))))
type Index AssetClassMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

type Index AssetClassMap = AssetId
type IxValue AssetClassMap Source # 
Instance details

Defined in Plutus.ChainIndex.Emulator.DiskState

type IxValue AssetClassMap = Set TxOutRef

unAssetClassMap :: Iso' AssetClassMap (Map AssetId (Set TxOutRef)) Source #