Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Integration with integrational testing engine (pun intended).
Synopsis
- data TestError
- = UnexpectedTypeCheckError TcError
- | UnexpectedStorageType (MismatchError T)
- | UnexpectedBigMapType Natural (MismatchError T)
- | CustomTestError Text
- newtype PureM a = PureM {}
- data PureState = PureState {
- _psSecretKeys :: Map ImplicitAddress SecretKey
- _psDefaultAliasesCounter :: DefaultAliasCounter
- _psRefillableAddresses :: Set ImplicitAddress
- _psNow :: Timestamp
- _psLevel :: Natural
- _psMinBlockTime :: Natural
- _psGState :: GState
- psDefaultAliasesCounter :: Lens' PureState DefaultAliasCounter
- psGState :: Lens' PureState GState
- psLevel :: Lens' PureState Natural
- psMinBlockTime :: Lens' PureState Natural
- psNow :: Lens' PureState Timestamp
- psRefillableAddresses :: Lens' PureState (Set ImplicitAddress)
- psSecretKeys :: Lens' PureState (Map ImplicitAddress SecretKey)
- moneybagAlias :: ImplicitAlias
- runEmulatedT :: ImplicitAlias -> EmulatedT PureM a -> IO a
- emulatedImpl :: EmulatedImpl PureM
- clevelandOpsImpl :: Sender -> ClevelandOpsImpl PureM
- doTransfer :: (ParameterScope (ToT v), IsoValue v, ToL1Address addr) => ImplicitAddress -> addr -> Mutez -> EpName -> v -> PureM [ContractEvent]
- emitOpToContractEvent :: EmitOperation -> ContractEvent
- clevelandMiscImpl :: ClevelandMiscImpl PureM
- findBigMapByIdMaybe :: forall k v. (SingI v, SingI k) => Natural -> MaybeT PureM (Value ('TBigMap k v))
- isAddressRefillable :: ImplicitAddress -> PureM Bool
- getBalance :: L1AddressKind kind => KindedAddress kind -> PureM Mutez
- exceptionHandler :: PureM a -> PureM a
- getMorleyLogsImpl :: PureM a -> PureM (LogsInfo, a)
- getStorageImpl :: forall st addr. ToStorageType st addr => addr -> PureM st
- addressState :: KindedAddress kind -> PureM (AddressStateFam kind)
- resolveLens :: (MonadState PureState m, At x) => LensLike' (Const (Maybe (IxValue x))) GState x -> (Index x -> m b) -> (Index x -> IxValue x -> b) -> Index x -> m b
- resolveAlias :: (At x, Index x ~ Alias kind, IxValue x ~ KindedAddress kind) => LensLike' (Const (Maybe (IxValue x))) GState x -> Alias kind -> PureM (AddressWithAlias kind)
- resolveAddress :: x ~ Bimap (Alias kind) (KindedAddress kind) => LensLike' (Const (Maybe (Index x))) GState x -> KindedAddress kind -> PureM (AddressWithAlias kind)
- unknownAddress :: KindedAddress kind -> PureM whatever
- unknownAlias :: Alias kind -> PureM whatever
- failure :: forall a. Builder -> PureM a
- getSecretKey :: ImplicitAddress -> PureM SecretKey
- initEnv :: ImplicitAlias -> PureState
- transfer :: (ParameterScope (ToT epArg), IsoValue epArg, ToAddress addr) => ("from" :! ImplicitAddress) -> ("to" :! addr) -> Mutez -> EpName -> epArg -> PureM [EmitOperation]
- originate :: OriginateData oty large -> PureM ContractAddress
- throwEE :: ExecutorError -> PureM a
- registerInterpretation :: ExecutorM a -> PureM a
- interpret :: ExecutorM a -> PureM (Either ExecutorError (ExecutorRes, a))
- setDelegate :: ImplicitAddress -> Maybe KeyHash -> PureM ()
Documentation
UnexpectedTypeCheckError TcError | |
UnexpectedStorageType (MismatchError T) | |
UnexpectedBigMapType Natural (MismatchError T) | |
CustomTestError Text |
Instances
Exception TestError Source # | |
Defined in Test.Cleveland.Internal.Pure toException :: TestError -> SomeException # fromException :: SomeException -> Maybe TestError # displayException :: TestError -> String # | |
Show TestError Source # | |
Buildable TestError Source # | |
Defined in Test.Cleveland.Internal.Pure |
Instances
MonadFail PureM Source # | |
Defined in Test.Cleveland.Internal.Pure | |
MonadIO PureM Source # | |
Defined in Test.Cleveland.Internal.Pure | |
Applicative PureM Source # | |
Functor PureM Source # | |
Monad PureM Source # | |
MonadScenario PureM Source # | |
Defined in Test.Cleveland.Internal.Scenario | |
MonadCatch PureM Source # | |
MonadThrow PureM Source # | |
Defined in Test.Cleveland.Internal.Pure | |
MonadState PureState PureM Source # | |
MonadWriter LogsInfo PureM Source # | |
MonadReader (IORef PureState) PureM Source # | |
PureState | |
|
psSecretKeys :: Lens' PureState (Map ImplicitAddress SecretKey) Source #
runEmulatedT :: ImplicitAlias -> EmulatedT PureM a -> IO a Source #
doTransfer :: (ParameterScope (ToT v), IsoValue v, ToL1Address addr) => ImplicitAddress -> addr -> Mutez -> EpName -> v -> PureM [ContractEvent] Source #
emitOpToContractEvent :: EmitOperation -> ContractEvent Source #
findBigMapByIdMaybe :: forall k v. (SingI v, SingI k) => Natural -> MaybeT PureM (Value ('TBigMap k v)) Source #
Traverse storage values of all contracts and looks for a big_map with the given ID.
getBalance :: L1AddressKind kind => KindedAddress kind -> PureM Mutez Source #
exceptionHandler :: PureM a -> PureM a Source #
getStorageImpl :: forall st addr. ToStorageType st addr => addr -> PureM st Source #
addressState :: KindedAddress kind -> PureM (AddressStateFam kind) Source #
resolveLens :: (MonadState PureState m, At x) => LensLike' (Const (Maybe (IxValue x))) GState x -> (Index x -> m b) -> (Index x -> IxValue x -> b) -> Index x -> m b Source #
resolveAlias :: (At x, Index x ~ Alias kind, IxValue x ~ KindedAddress kind) => LensLike' (Const (Maybe (IxValue x))) GState x -> Alias kind -> PureM (AddressWithAlias kind) Source #
resolveAddress :: x ~ Bimap (Alias kind) (KindedAddress kind) => LensLike' (Const (Maybe (Index x))) GState x -> KindedAddress kind -> PureM (AddressWithAlias kind) Source #
unknownAddress :: KindedAddress kind -> PureM whatever Source #
unknownAlias :: Alias kind -> PureM whatever Source #
getSecretKey :: ImplicitAddress -> PureM SecretKey Source #
initEnv :: ImplicitAlias -> PureState Source #
transfer :: (ParameterScope (ToT epArg), IsoValue epArg, ToAddress addr) => ("from" :! ImplicitAddress) -> ("to" :! addr) -> Mutez -> EpName -> epArg -> PureM [EmitOperation] Source #
originate :: OriginateData oty large -> PureM ContractAddress Source #
Originate a contract with given initial storage and balance. Its address is returned.
registerInterpretation :: ExecutorM a -> PureM a Source #
Runs a set of operations and updates the engine's state.
interpret :: ExecutorM a -> PureM (Either ExecutorError (ExecutorRes, a)) Source #
Interpret an action and return the result _without_ updating the engine's state.
setDelegate :: ImplicitAddress -> Maybe KeyHash -> PureM () Source #