plutus-contract-1.2.0.0
Safe HaskellNone
LanguageHaskell2010

Plutus.Trace.Effects.Waiting

Description

Waiting for things to happen

Synopsis

Documentation

data Waiting r where Source #

Constructors

WaitUntilSlot :: Slot -> Waiting Slot 
GetSlotConfig :: Waiting SlotConfig 

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

waitUntilTime :: Member Waiting effs => POSIXTime -> Eff effs POSIXTime Source #

Wait until the slot where the given time falls into and return latest time we know has passed.

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

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

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

Wait for a number of slots

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

Convert the given n milliseconds to a number of slots to wait.

Note: Currently, if n < length of a slot, then waitNMilliSeconds has no effect.

handleWaiting :: forall effs effs2 a. Member (Yield (EmSystemCall effs2 EmulatorMessage a) (Maybe EmulatorMessage)) effs => SlotConfig -> Waiting ~> Eff effs Source #