Safe HaskellNone




Constructing traces

waitUntilSlot :: forall effs. Member Waiting effs => Slot -> Eff effs Slot Source #

waitNSlots :: forall effs. Member Waiting effs => Natural -> Eff effs Slot Source #

Wait for a number of slots

nextSlot :: Member Waiting effs => Eff effs Slot Source #

Wait until the beginning of the next slot, returning the new slot number.

payToWallet :: forall effs. Member EmulatedWalletAPI effs => Wallet -> Wallet -> Value -> Eff effs TxId Source #

Make a payment from one wallet to another

callEndpoint :: forall effs. Member RunContractPlayground effs => Wallet -> String -> Value -> Eff effs () Source #

Running traces

data EmulatorConfig Source #




runPlaygroundStream :: forall w s e effs a. (ContractConstraints s, Show e, ToJSON e, ToJSON w, Monoid w) => EmulatorConfig -> Contract w s e () -> PlaygroundTrace a -> Stream (Of (LogMessage EmulatorEvent)) (Eff effs) (Maybe EmulatorErr, EmulatorState) Source #

Run a 'Trace Playground', streaming the log messages as they arrive


interpretPlaygroundTrace Source #


:: forall w s e effs a. (Member MultiAgentEffect effs, Member MultiAgentControlEffect effs, Member (Error EmulatorRuntimeError) effs, Member ChainControlEffect effs, Member (LogMsg EmulatorEvent') effs, ContractConstraints s, Show e, ToJSON e, ToJSON w, Monoid w) 
=> EmulatorConfig 
-> Contract w s e ()

The contract

-> [Wallet]

Wallets that should be simulated in the emulator

-> PlaygroundTrace a 
-> Eff effs () 

walletInstanceTag :: Wallet -> ContractInstanceTag Source #

The ContractInstanceTag for the contract instance of a wallet. See note [Wallet contract instances]