plutus-pab-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Plutus.PAB.Core.ContractInstance.BlockchainEnv

Description

 
Synopsis

Documentation

startNodeClient Source #

Arguments

:: FilePath

Socket to connect to node

-> NodeMode

Whether to connect to real node or mock node

-> Maybe Int

How much history do we remember for rollbacks

-> SlotConfig

Slot config used by the node

-> NetworkId

Cardano network ID

-> Point 
-> InstancesState

In-memory state of running contract instances

-> IO BlockchainEnv 

Connect to the node and write node updates to the blockchain env.

processMockBlock :: InstancesState -> BlockchainEnv -> Block -> Slot -> STM (Either SyncActionFailure (Slot, BlockNumber)) Source #

Go through the transactions in a block, updating the BlockchainEnv when any interesting addresses or transactions have changed.

processChainSyncEvent :: InstancesState -> BlockchainEnv -> ChainSyncEvent -> STM (Either SyncActionFailure (Slot, BlockNumber)) Source #

Process a chain sync event that we receive from the alonzo node client