| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Cleveland.Internal.Abstract
Description
Abstract cleveland interface not bound to a particular implementation.
The interface may look a bit untyped and unsafe in some places. For example, in order to call a contract one should supply a simple address rather than a contract ref, so it is easy to pass a value of wrong type. Also it is easy to call a non-existing entrypoint.
Subjectively, it makes writing test scenarios easier because you have to prove less to the compiler. It also makes implementation of cleveland engine a bit easier. Of course, it also makes it easier to make certain mistakes. However, we expect users of this interface to also use the functionality of the Test.Cleveland.Internal.Pure module and convert cleveland scenarios to purely testable scenarios for integrational testing engine. In this case errors should be detected almost as quickly as they would reported by the compiler, at least before trying to run scenario on a live network.
Also this interface uses Address rather than EpAddress.
I (@gromak) concluded that EpAddress can not be passed to tezos-client.
For key addresses it just does not make sense and for contract addresses
I get such errors:
bad contract notation Invalid contract notation "KT1VrFpBPwBTm3hsK7DB7SPmY8fTHJ3vY6sJ%mint"
Synopsis
- data ContractHandle (cp :: Type) (st :: Type) (vd :: Type) = (NiceParameterFull cp, NiceStorage st, NiceViewsDescriptor vd) => ContractHandle {
- chContractName :: Text
- chAddress :: Address
- data OriginateData param st vd = OriginateData {
- odName :: AliasHint
- odBalance :: Mutez
- odStorage :: st
- odContract :: Contract param st vd
- data TransferData = forall v addr.(NiceParameter v, ToAddress addr) => TransferData {
- tdTo :: addr
- tdAmount :: Mutez
- tdEntrypoint :: EpName
- tdParameter :: v
- newtype Sender = Sender {
- unSender :: Address
- newtype Moneybag = Moneybag {
- unMoneybag :: Address
- data UntypedOriginateData = UntypedOriginateData {
- uodName :: AliasHint
- uodBalance :: Mutez
- uodStorage :: Value
- uodContract :: Contract
- data BaseOperationData
- data BaseOperationResult
- = OriginateResult Address
- | TransferResult
- newtype DefaultAliasCounter = DefaultAliasCounter {}
- data SpecificOrDefaultAliasHint
- data ClevelandOpsImpl m = ClevelandOpsImpl {
- coiRunOperationBatch :: HasCallStack => [BaseOperationData] -> m [BaseOperationResult]
- data ClevelandMiscImpl m = ClevelandMiscImpl {
- cmiRunIO :: forall res. HasCallStack => IO res -> m res
- cmiResolveAddress :: HasCallStack => Alias -> m Address
- cmiGenKey :: HasCallStack => SpecificOrDefaultAliasHint -> m Address
- cmiGenFreshKey :: HasCallStack => SpecificOrDefaultAliasHint -> m Address
- cmiSignBytes :: HasCallStack => ByteString -> Address -> m Signature
- cmiOriginateLargeUntyped :: HasCallStack => Sender -> UntypedOriginateData -> m Address
- cmiComment :: HasCallStack => Text -> m ()
- cmiGetBalance :: HasCallStack => Address -> m Mutez
- cmiGetSomeStorage :: HasCallStack => Address -> m SomeAnnotatedValue
- cmiGetBigMapValueMaybe :: forall k v. (HasCallStack, NiceComparable k, NicePackedValue k, NiceUnpackedValue v) => BigMapId k v -> k -> m (Maybe v)
- cmiGetAllBigMapValuesMaybe :: forall k v. (HasCallStack, NiceComparable k, NicePackedValue k, NiceUnpackedValue v) => BigMapId k v -> m (Maybe [v])
- cmiGetPublicKey :: HasCallStack => Address -> m PublicKey
- cmiGetDelegate :: HasCallStack => Address -> m (Maybe KeyHash)
- cmiRegisterDelegate :: HasCallStack => Address -> m ()
- cmiGetChainId :: HasCallStack => m ChainId
- cmiAdvanceTime :: forall unit. (HasCallStack, KnownDivRat unit Second) => Time unit -> m ()
- cmiAdvanceToLevel :: HasCallStack => (Natural -> Natural) -> m ()
- cmiGetNow :: HasCallStack => m Timestamp
- cmiGetLevel :: HasCallStack => m Natural
- cmiFailure :: forall a. HasCallStack => Builder -> m a
- cmiThrow :: forall a. HasCallStack => SomeException -> m a
- cmiGetApproximateBlockInterval :: HasCallStack => m (Time Second)
- cmiAttempt :: forall a e. (Exception e, HasCallStack) => m a -> m (Either e a)
- cmiMarkAddressRefillable :: Address -> m ()
- data EmulatedImpl m = EmulatedImpl {
- eiBranchout :: [(Text, m ())] -> m ()
- eiGetStorage :: forall st addr. (HasCallStack, ToStorageType st addr) => addr -> m st
- eiGetMorleyLogs :: forall a. m a -> m (LogsInfo, a)
- eiSetVotingPowers :: VotingPowers -> m ()
- mapClevelandOpsImplExceptions :: (forall a. HasCallStack => m a -> m a) -> ClevelandOpsImpl m -> ClevelandOpsImpl m
- mapClevelandMiscImplExceptions :: (forall a. HasCallStack => m a -> m a) -> ClevelandMiscImpl m -> ClevelandMiscImpl m
- data BatchResultMismatch = BatchResultMismatch Text
- data ClevelandOpsBatch a
- runBatched :: (HasCallStack, Functor m) => ClevelandOpsImpl m -> ClevelandOpsBatch a -> m a
- batchedOpsImpl :: ClevelandOpsImpl ClevelandOpsBatch
- runOperationBatchM :: (HasCallStack, Buildable e, Functor m) => Proxy e -> ClevelandOpsImpl m -> BatchingM BaseOperationData BaseOperationResult e a -> m a
- runSingleOperation :: (HasCallStack, Functor m) => ClevelandOpsImpl m -> Text -> BaseOperationData -> (BaseOperationResult -> Maybe a) -> m a
- data TransferFailure = TransferFailure {
- tfAddress :: Address
- tfReason :: TransferFailureReason
- data TransferFailureReason
- = FailedWith ExpressionOrTypedValue (Maybe InstrCallStack)
- | EmptyTransaction
- | BadParameter
- | MutezArithError MutezArithErrorType
- | ShiftOverflow
- | GasExhaustion
- data FailedInBranch = FailedInBranch ScenarioBranchName SomeException
- newtype ScenarioBranchName = ScenarioBranchName {
- unTestBranch :: [Text]
- data GenericTestError = UnexpectedSuccess
- data ExpressionOrTypedValue where
- EOTVExpression :: Expression -> ExpressionOrTypedValue
- EOTVTypedValue :: (SingI t, ConstantScope t) => Value t -> ExpressionOrTypedValue
- auto :: SpecificOrDefaultAliasHint
- ep :: HasCallStack => Text -> EpName
- mkDefaultAlias :: Natural -> AliasHint
- data AliasHint
- data ClevelandCaps m = ClevelandCaps {
- ccSender :: Sender
- ccMoneybag :: Moneybag
- ccMiscCap :: ClevelandMiscImpl m
- ccOpsCap :: Sender -> ClevelandOpsImpl m
- data EmulatedCaps m = EmulatedCaps {}
- data RunMode caps where
- NetworkMode :: RunMode caps
- EmulationMode :: HasEmulatedCaps caps => RunMode caps
- class Monad (ClevelandBaseMonad caps) => HasClevelandCaps caps where
- type ClevelandBaseMonad caps :: Type -> Type
- senderL :: Lens' caps Sender
- moneybagL :: Lens' caps Moneybag
- getMiscCap :: caps -> ClevelandMiscImpl (ClevelandBaseMonad caps)
- getOpsCap :: caps -> ClevelandOpsImpl (ClevelandBaseMonad caps)
- runMode :: RunMode caps
- class HasClevelandCaps caps => HasEmulatedCaps caps where
- getEmulatedCap :: caps -> EmulatedImpl (ClevelandBaseMonad caps)
- type MonadCleveland caps m = (m ~ ReaderT caps (ClevelandBaseMonad caps), HasClevelandCaps caps)
- type MonadEmulated caps m = (MonadCleveland caps m, HasEmulatedCaps caps)
- type ClevelandT m = ReaderT (ClevelandCaps m) m
- type EmulatedT m = ReaderT (EmulatedCaps m) m
- type LogsInfo = [ScenarioLogs]
- data ScenarioLogs = ScenarioLogs {
- _slAddr :: Address
- _slLog :: MorleyLogs
- slAddr :: Lens' ScenarioLogs Address
- slLog :: Lens' ScenarioLogs MorleyLogs
- logsL :: Lens' ScenarioLogs MorleyLogs
- filterLogsByAddrL :: (ToAddress addr, Applicative f) => addr -> (MorleyLogs -> f MorleyLogs) -> ScenarioLogs -> f ScenarioLogs
- logsForAddress :: (Each s s ScenarioLogs ScenarioLogs, ToAddress addr) => addr -> s -> [MorleyLogs]
- collectLogs :: LogsInfo -> MorleyLogs
Documentation
data ContractHandle (cp :: Type) (st :: Type) (vd :: Type) Source #
Handle to a contract.
This is what you get when originating a contract and that allows further operations with the contract within the test framework.
Note that this is part of the testing framework and exists solely in Haskell
world, so it has no IsoValue and related instances and cannot be used in
Lorentz code.
Constructors
| (NiceParameterFull cp, NiceStorage st, NiceViewsDescriptor vd) => ContractHandle | |
Fields
| |
Instances
data OriginateData param st vd Source #
Constructors
| OriginateData | |
Fields
| |
data TransferData Source #
Information about transfer operation.
Constructors
| forall v addr.(NiceParameter v, ToAddress addr) => TransferData | |
Fields
| |
Designates the special sender address.
Transfers and some other operations will occur on behalf of this address.
This is initialized to moneybag address and then can be locally modified.
Operations in ClevelandOpsImpl are affected by this address.
Designates the address that gifts money to new addresses.
Once a new address is allocated in a test scenario, we have to transfer some
money to it so that it is able to serve as transactions sender. Moneybag
serves as a source of that money.
We do not use Sender for this purpose because in most situations changing
moneybag is not necessary. If a user wraps a large piece of their script with
withSender call and that changes the moneybag - this behaviour may be
undesired and unexpected to the user.
Constructors
| Moneybag | |
Fields
| |
data UntypedOriginateData Source #
Untyped version of OriginateData. It can be used for interaction with raw Michelson contracts
Constructors
| UntypedOriginateData | |
Fields
| |
data BaseOperationData Source #
Datatype specifying creation of arbitrary operation.
Constructors
| OriginateOp UntypedOriginateData | |
| TransferOp TransferData |
data BaseOperationResult Source #
Datatype specifying result of operation run.
Constructors
| OriginateResult Address | |
| TransferResult |
newtype DefaultAliasCounter Source #
Counter which is used to provide different default aliases.
Constructors
| DefaultAliasCounter | |
Fields | |
data SpecificOrDefaultAliasHint Source #
An alias hint with default value that can be used to define unique alias automatically.
Constructors
| SpecificAliasHint AliasHint | |
| DefaultAliasHint |
Instances
| Show SpecificOrDefaultAliasHint Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods showsPrec :: Int -> SpecificOrDefaultAliasHint -> ShowS # show :: SpecificOrDefaultAliasHint -> String # showList :: [SpecificOrDefaultAliasHint] -> ShowS # | |
| IsString SpecificOrDefaultAliasHint Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods | |
| Default SpecificOrDefaultAliasHint Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods | |
Actions
data ClevelandOpsImpl m Source #
A record data type with operations creating primitives.
Constructors
| ClevelandOpsImpl | |
Fields
| |
data ClevelandMiscImpl m Source #
A record data type with all base methods one can use during a cleveland test.
Constructors
| ClevelandMiscImpl | |
Fields
| |
data EmulatedImpl m Source #
A record data type with all base methods one can use during cleveland, but which are available only when running on an emulated environment (e.g. Morley.Michelson.Runtime) and not on a real network.
Constructors
| EmulatedImpl | |
Fields
| |
mapClevelandOpsImplExceptions :: (forall a. HasCallStack => m a -> m a) -> ClevelandOpsImpl m -> ClevelandOpsImpl m Source #
Runs a handler over every action.
mapClevelandMiscImplExceptions :: (forall a. HasCallStack => m a -> m a) -> ClevelandMiscImpl m -> ClevelandMiscImpl m Source #
Runs a handler over every action (except cmiAttempt and cmiThrow),
possibly transforming exceptions thrown by those actions.
Batching
data BatchResultMismatch Source #
A batch returned invalid output, e.g. origination address when transaction was supplied.
Constructors
| BatchResultMismatch Text | Carries expected operation type in lowercase |
Instances
| Buildable BatchResultMismatch Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods build :: BatchResultMismatch -> Builder # | |
data ClevelandOpsBatch a Source #
Where the batched operations occur.
Note that this is not a Monad, rather an Applicative - use
-XApplicativeDo extension for nicer experience.
Instances
runBatched :: (HasCallStack, Functor m) => ClevelandOpsImpl m -> ClevelandOpsBatch a -> m a Source #
Run a series of operations within a batch.
Example:
contract <- runBatched impl $ do
-- this block is executed within ClevelandOpsBatch
contract <- runSingleOperation batchedOpsImpl "origination" ...
for_ [1..3] i ->
runSingleOperation batchedOpsImpl "transfer" ...
return contract
See ClevelandOpsBatch for some precautions.
batchedOpsImpl :: ClevelandOpsImpl ClevelandOpsBatch Source #
ClevelandOpsImpl suitable for methods executed within a batch.
runOperationBatchM :: (HasCallStack, Buildable e, Functor m) => Proxy e -> ClevelandOpsImpl m -> BatchingM BaseOperationData BaseOperationResult e a -> m a Source #
Version of coiRunOperationBatch that uses BatchingM.
This is an internal function.
Invariant: all errors described by e must be internal and should not occur
in practice (we require e type to be specified explicitly to hinder
incorrect usage).
runSingleOperation :: (HasCallStack, Functor m) => ClevelandOpsImpl m -> Text -> BaseOperationData -> (BaseOperationResult -> Maybe a) -> m a Source #
Helper that runs a single operation using ClevelandOpsImpl.
Validation
data TransferFailure Source #
Failures that could be expected in the execution of a transfer.
These can be caught and handled with attempt.
Constructors
| TransferFailure | |
Fields
| |
Instances
| Eq TransferFailure Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods (==) :: TransferFailure -> TransferFailure -> Bool # (/=) :: TransferFailure -> TransferFailure -> Bool # | |
| Show TransferFailure Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods showsPrec :: Int -> TransferFailure -> ShowS # show :: TransferFailure -> String # showList :: [TransferFailure] -> ShowS # | |
| Exception TransferFailure Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods toException :: TransferFailure -> SomeException # | |
| Buildable TransferFailure Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods build :: TransferFailure -> Builder # | |
data TransferFailureReason Source #
Constructors
| FailedWith ExpressionOrTypedValue (Maybe InstrCallStack) | Expect that interpretation of contract with the given address ended
with |
| EmptyTransaction | Expect failure due to an attempt to transfer 0tz towards a simple address. |
| BadParameter | Expect failure due to an attempt to call a contract with an invalid parameter. |
| MutezArithError MutezArithErrorType | Expect failure due to an arithmetic over-/underflow |
| ShiftOverflow | Expect that interpretation of contract with the given address ended with an overflow error. |
| GasExhaustion |
Instances
| Eq TransferFailureReason Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods (==) :: TransferFailureReason -> TransferFailureReason -> Bool # (/=) :: TransferFailureReason -> TransferFailureReason -> Bool # | |
| Show TransferFailureReason Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods showsPrec :: Int -> TransferFailureReason -> ShowS # show :: TransferFailureReason -> String # showList :: [TransferFailureReason] -> ShowS # | |
| Buildable TransferFailureReason Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods build :: TransferFailureReason -> Builder # | |
data FailedInBranch Source #
When an exception is thrown in a branchout branch, we wrap it in this
constructor to remember in _which_ branch it was thrown.
We use this information to provide better error messages when a test fails.
Constructors
| FailedInBranch ScenarioBranchName SomeException |
Instances
| Show FailedInBranch Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods showsPrec :: Int -> FailedInBranch -> ShowS # show :: FailedInBranch -> String # showList :: [FailedInBranch] -> ShowS # | |
| Exception FailedInBranch Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods toException :: FailedInBranch -> SomeException # | |
| Buildable FailedInBranch Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods build :: FailedInBranch -> Builder # | |
newtype ScenarioBranchName Source #
When using branchout function for building test scenarios - names
of branches we are currently within.
Constructors
| ScenarioBranchName | |
Fields
| |
Instances
| Eq ScenarioBranchName Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods (==) :: ScenarioBranchName -> ScenarioBranchName -> Bool # (/=) :: ScenarioBranchName -> ScenarioBranchName -> Bool # | |
| Show ScenarioBranchName Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods showsPrec :: Int -> ScenarioBranchName -> ShowS # show :: ScenarioBranchName -> String # showList :: [ScenarioBranchName] -> ShowS # | |
| Buildable ScenarioBranchName Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods build :: ScenarioBranchName -> Builder # | |
data GenericTestError Source #
Constructors
| UnexpectedSuccess |
Instances
| Show GenericTestError Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods showsPrec :: Int -> GenericTestError -> ShowS # show :: GenericTestError -> String # showList :: [GenericTestError] -> ShowS # | |
| Exception GenericTestError Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods toException :: GenericTestError -> SomeException # | |
| Buildable GenericTestError Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods build :: GenericTestError -> Builder # | |
data ExpressionOrTypedValue where Source #
Representation of Expression we got from the RPC or a typed value we got from the emulator.
Constructors
| EOTVExpression :: Expression -> ExpressionOrTypedValue | |
| EOTVTypedValue :: (SingI t, ConstantScope t) => Value t -> ExpressionOrTypedValue |
Instances
| Eq ExpressionOrTypedValue Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods (==) :: ExpressionOrTypedValue -> ExpressionOrTypedValue -> Bool # (/=) :: ExpressionOrTypedValue -> ExpressionOrTypedValue -> Bool # | |
| Show ExpressionOrTypedValue Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods showsPrec :: Int -> ExpressionOrTypedValue -> ShowS # show :: ExpressionOrTypedValue -> String # showList :: [ExpressionOrTypedValue] -> ShowS # | |
| Buildable ExpressionOrTypedValue Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods build :: ExpressionOrTypedValue -> Builder # | |
Helpers
auto :: SpecificOrDefaultAliasHint Source #
Helper to use automatically determined unique alias.
ep :: HasCallStack => Text -> EpName Source #
A short partial constructor for EpName. It is supposed to be
applied to string constants, so programmer is responsible for
validity. And this code is for tests anyway, so each failure is a
programmer mistake.
It is intentionally here and not in some deeper module because the name is really short and more suitable for writing scenarios.
mkDefaultAlias :: Natural -> AliasHint Source #
Morley client re-exports
Capability records
data ClevelandCaps m Source #
A record with all the capabilities available to any cleveland test.
Constructors
| ClevelandCaps | |
Fields
| |
Instances
| Monad m => HasClevelandCaps (ClevelandCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract Associated Types type ClevelandBaseMonad (ClevelandCaps m) :: Type -> Type Source # Methods senderL :: Lens' (ClevelandCaps m) Sender Source # moneybagL :: Lens' (ClevelandCaps m) Moneybag Source # getMiscCap :: ClevelandCaps m -> ClevelandMiscImpl (ClevelandBaseMonad (ClevelandCaps m)) Source # getOpsCap :: ClevelandCaps m -> ClevelandOpsImpl (ClevelandBaseMonad (ClevelandCaps m)) Source # runMode :: RunMode (ClevelandCaps m) Source # | |
| type ClevelandBaseMonad (ClevelandCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract | |
data EmulatedCaps m Source #
A record with all the capabilities available to a cleveland test on the emulator.
Constructors
| EmulatedCaps | |
Fields | |
Instances
| Monad m => HasEmulatedCaps (EmulatedCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods getEmulatedCap :: EmulatedCaps m -> EmulatedImpl (ClevelandBaseMonad (EmulatedCaps m)) Source # | |
| Monad m => HasClevelandCaps (EmulatedCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract Associated Types type ClevelandBaseMonad (EmulatedCaps m) :: Type -> Type Source # Methods senderL :: Lens' (EmulatedCaps m) Sender Source # moneybagL :: Lens' (EmulatedCaps m) Moneybag Source # getMiscCap :: EmulatedCaps m -> ClevelandMiscImpl (ClevelandBaseMonad (EmulatedCaps m)) Source # getOpsCap :: EmulatedCaps m -> ClevelandOpsImpl (ClevelandBaseMonad (EmulatedCaps m)) Source # runMode :: RunMode (EmulatedCaps m) Source # | |
| type ClevelandBaseMonad (EmulatedCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract | |
data RunMode caps where Source #
In which mode the test suite is currently executed.
Constructors
| NetworkMode :: RunMode caps | Test is run on-chain. |
| EmulationMode :: HasEmulatedCaps caps => RunMode caps | Test is run in Morley emulation. |
class Monad (ClevelandBaseMonad caps) => HasClevelandCaps caps where Source #
A proof that the given caps record contains
the basic cleveland capabilities.
Associated Types
type ClevelandBaseMonad caps :: Type -> Type Source #
This will be either PureM or ClientM.
Methods
senderL :: Lens' caps Sender Source #
moneybagL :: Lens' caps Moneybag Source #
getMiscCap :: caps -> ClevelandMiscImpl (ClevelandBaseMonad caps) Source #
getOpsCap :: caps -> ClevelandOpsImpl (ClevelandBaseMonad caps) Source #
Instances
class HasClevelandCaps caps => HasEmulatedCaps caps where Source #
A proof that the given caps record contains
the basic cleveland capabilities + the emulator capabiilities.
Methods
getEmulatedCap :: caps -> EmulatedImpl (ClevelandBaseMonad caps) Source #
Instances
| Monad m => HasEmulatedCaps (EmulatedCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods getEmulatedCap :: EmulatedCaps m -> EmulatedImpl (ClevelandBaseMonad (EmulatedCaps m)) Source # | |
type MonadCleveland caps m = (m ~ ReaderT caps (ClevelandBaseMonad caps), HasClevelandCaps caps) Source #
Constraint for a monad in which we can do cleveland actions.
type MonadEmulated caps m = (MonadCleveland caps m, HasEmulatedCaps caps) Source #
Constraint for a monad in which we can do cleveland actions that can't be run on a real network.
It requires the EmulatedImpl capability.
type ClevelandT m = ReaderT (ClevelandCaps m) m Source #
Monad transformer that adds only the ClevelandCaps capabilities.
type EmulatedT m = ReaderT (EmulatedCaps m) m Source #
Monad transformer that adds both ClevelandCaps and EmulatedCaps capabilities.
Log utilities
type LogsInfo = [ScenarioLogs] Source #
data ScenarioLogs Source #
Constructors
| ScenarioLogs | |
Fields
| |
Instances
| Eq ScenarioLogs Source # | |
Defined in Test.Cleveland.Internal.Abstract | |
| Show ScenarioLogs Source # | |
Defined in Test.Cleveland.Internal.Abstract Methods showsPrec :: Int -> ScenarioLogs -> ShowS # show :: ScenarioLogs -> String # showList :: [ScenarioLogs] -> ShowS # | |
| MonadWriter LogsInfo PureM Source # | |
slAddr :: Lens' ScenarioLogs Address Source #
logsL :: Lens' ScenarioLogs MorleyLogs Source #
An alias for slLog with a clearer name
filterLogsByAddrL :: (ToAddress addr, Applicative f) => addr -> (MorleyLogs -> f MorleyLogs) -> ScenarioLogs -> f ScenarioLogs Source #
Lens combinator specified for filtering logs by address from LogsInfo
logsForAddress :: (Each s s ScenarioLogs ScenarioLogs, ToAddress addr) => addr -> s -> [MorleyLogs] Source #
Get logs for a given address from LogsInfo
collectLogs :: LogsInfo -> MorleyLogs Source #
Collect logs produced by all contracts into the single list