Safe Haskell | None |
---|---|
Language | Haskell2010 |
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) = (NiceParameter 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 RunCode cp st vd = RunCode {
- rcContract :: Contract cp st vd
- rcStorage :: MaybeRPC st
- rcParameter :: MaybeRPC cp
- rcAmount :: Mutez
- rcBalance :: Mutez
- rcSource :: Maybe Address
- data ClevelandInput
- newtype DefaultAliasCounter = DefaultAliasCounter {}
- data SpecificOrDefaultAliasHint
- data ClevelandOpsImpl m = ClevelandOpsImpl {
- coiRunOperationBatch :: HasCallStack => [OperationInfo ClevelandInput] -> m [OperationInfo Result]
- data ClevelandMiscImpl m = ClevelandMiscImpl {
- cmiRunIO :: forall res. HasCallStack => IO res -> m res
- cmiResolveAddress :: HasCallStack => AliasHint -> 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, 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 ()
- cmiEmulatedImpl :: m (Maybe (EmulatedImpl m))
- cmiRunCode :: forall cp st vd. (HasCallStack, HasRPCRepr st, IsoValue (AsRPC st)) => Sender -> RunCode cp st vd -> m (AsRPC st)
- 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 (OperationInfo ClevelandInput) (OperationInfo Result) e a -> m a
- runSingleOperation :: (HasCallStack, Functor m) => ClevelandOpsImpl m -> Text -> OperationInfo ClevelandInput -> (OperationInfo Result -> 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 {}
- class Monad (ClevelandBaseMonad caps) => HasClevelandCaps caps where
- type ClevelandBaseMonad caps :: Type -> Type
- clevelandCapsL :: Lens' caps (ClevelandCaps (ClevelandBaseMonad caps))
- senderL :: HasClevelandCaps caps => Lens' caps Sender
- moneybagL :: HasClevelandCaps caps => Lens' caps Moneybag
- getMiscCap :: HasClevelandCaps caps => caps -> ClevelandMiscImpl (ClevelandBaseMonad caps)
- getOpsCap :: HasClevelandCaps caps => caps -> ClevelandOpsImpl (ClevelandBaseMonad 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.
(NiceParameter cp, NiceStorage st, NiceViewsDescriptor vd) => ContractHandle | |
|
Instances
data OriginateData param st vd Source #
OriginateData | |
|
data TransferData Source #
Information about transfer operation.
forall v addr.(NiceParameter v, ToAddress addr) => TransferData | |
|
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.
Moneybag | |
|
data UntypedOriginateData Source #
Untyped version of OriginateData. It can be used for interaction with raw Michelson contracts
UntypedOriginateData | |
|
data RunCode cp st vd Source #
The data needed to call the /run_code
RPC endpoint.
RunCode | |
|
data ClevelandInput Source #
Designates an operation input.
Instances
OperationInfoDescriptor ClevelandInput Source # | |
Defined in Test.Cleveland.Internal.Abstract | |
type OriginationInfo ClevelandInput Source # | |
Defined in Test.Cleveland.Internal.Abstract | |
type RevealInfo ClevelandInput Source # | |
Defined in Test.Cleveland.Internal.Abstract type RevealInfo ClevelandInput = PublicKey | |
type TransferInfo ClevelandInput Source # | |
Defined in Test.Cleveland.Internal.Abstract |
newtype DefaultAliasCounter Source #
Counter which is used to provide different default aliases.
Instances
Show DefaultAliasCounter Source # | |
Defined in Test.Cleveland.Internal.Abstract showsPrec :: Int -> DefaultAliasCounter -> ShowS # show :: DefaultAliasCounter -> String # showList :: [DefaultAliasCounter] -> ShowS # |
data SpecificOrDefaultAliasHint Source #
An alias hint with default value that can be used to define unique alias automatically.
Instances
Actions
data ClevelandOpsImpl m Source #
A record data type with operations creating primitives.
ClevelandOpsImpl | |
|
data ClevelandMiscImpl m Source #
A record data type with all base methods one can use during a cleveland test.
ClevelandMiscImpl | |
|
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.
EmulatedImpl | |
|
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.
BatchResultMismatch Text | Carries expected operation type in lowercase |
Instances
Buildable BatchResultMismatch Source # | |
Defined in Test.Cleveland.Internal.Abstract 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 (OperationInfo ClevelandInput) (OperationInfo Result) 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 -> OperationInfo ClevelandInput -> (OperationInfo Result -> 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
.
TransferFailure | |
|
Instances
Eq TransferFailure Source # | |
Defined in Test.Cleveland.Internal.Abstract (==) :: TransferFailure -> TransferFailure -> Bool # (/=) :: TransferFailure -> TransferFailure -> Bool # | |
Show TransferFailure Source # | |
Defined in Test.Cleveland.Internal.Abstract showsPrec :: Int -> TransferFailure -> ShowS # show :: TransferFailure -> String # showList :: [TransferFailure] -> ShowS # | |
Exception TransferFailure Source # | |
Defined in Test.Cleveland.Internal.Abstract | |
Buildable TransferFailure Source # | |
Defined in Test.Cleveland.Internal.Abstract build :: TransferFailure -> Builder # |
data TransferFailureReason Source #
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 (==) :: TransferFailureReason -> TransferFailureReason -> Bool # (/=) :: TransferFailureReason -> TransferFailureReason -> Bool # | |
Show TransferFailureReason Source # | |
Defined in Test.Cleveland.Internal.Abstract showsPrec :: Int -> TransferFailureReason -> ShowS # show :: TransferFailureReason -> String # showList :: [TransferFailureReason] -> ShowS # | |
Buildable TransferFailureReason Source # | |
Defined in Test.Cleveland.Internal.Abstract 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.
Instances
Show FailedInBranch Source # | |
Defined in Test.Cleveland.Internal.Abstract showsPrec :: Int -> FailedInBranch -> ShowS # show :: FailedInBranch -> String # showList :: [FailedInBranch] -> ShowS # | |
Exception FailedInBranch Source # | |
Defined in Test.Cleveland.Internal.Abstract | |
Buildable FailedInBranch Source # | |
Defined in Test.Cleveland.Internal.Abstract build :: FailedInBranch -> Builder # |
newtype ScenarioBranchName Source #
When using branchout
function for building test scenarios - names
of branches we are currently within.
Instances
Eq ScenarioBranchName Source # | |
Defined in Test.Cleveland.Internal.Abstract (==) :: ScenarioBranchName -> ScenarioBranchName -> Bool # (/=) :: ScenarioBranchName -> ScenarioBranchName -> Bool # | |
Show ScenarioBranchName Source # | |
Defined in Test.Cleveland.Internal.Abstract showsPrec :: Int -> ScenarioBranchName -> ShowS # show :: ScenarioBranchName -> String # showList :: [ScenarioBranchName] -> ShowS # | |
Buildable ScenarioBranchName Source # | |
Defined in Test.Cleveland.Internal.Abstract build :: ScenarioBranchName -> Builder # |
data GenericTestError Source #
Instances
Show GenericTestError Source # | |
Defined in Test.Cleveland.Internal.Abstract showsPrec :: Int -> GenericTestError -> ShowS # show :: GenericTestError -> String # showList :: [GenericTestError] -> ShowS # | |
Exception GenericTestError Source # | |
Defined in Test.Cleveland.Internal.Abstract | |
Buildable GenericTestError Source # | |
Defined in Test.Cleveland.Internal.Abstract build :: GenericTestError -> Builder # |
data ExpressionOrTypedValue where Source #
Representation of Expression we got from the RPC or a typed value we got from the emulator.
EOTVExpression :: Expression -> ExpressionOrTypedValue | |
EOTVTypedValue :: (SingI t, ConstantScope t) => Value t -> ExpressionOrTypedValue |
Instances
Eq ExpressionOrTypedValue Source # | |
Defined in Test.Cleveland.Internal.Abstract | |
Show ExpressionOrTypedValue Source # | |
Defined in Test.Cleveland.Internal.Abstract showsPrec :: Int -> ExpressionOrTypedValue -> ShowS # show :: ExpressionOrTypedValue -> String # showList :: [ExpressionOrTypedValue] -> ShowS # | |
Buildable ExpressionOrTypedValue Source # | |
Defined in Test.Cleveland.Internal.Abstract 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.
ClevelandCaps | |
|
Instances
Monad m => HasClevelandCaps (ClevelandCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract type ClevelandBaseMonad (ClevelandCaps m) :: Type -> Type Source # clevelandCapsL :: Lens' (ClevelandCaps m) (ClevelandCaps (ClevelandBaseMonad (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.
Instances
Monad m => HasEmulatedCaps (EmulatedCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract getEmulatedCap :: EmulatedCaps m -> EmulatedImpl (ClevelandBaseMonad (EmulatedCaps m)) Source # | |
Monad m => HasClevelandCaps (EmulatedCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract type ClevelandBaseMonad (EmulatedCaps m) :: Type -> Type Source # clevelandCapsL :: Lens' (EmulatedCaps m) (ClevelandCaps (ClevelandBaseMonad (EmulatedCaps m))) Source # | |
type ClevelandBaseMonad (EmulatedCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract |
class Monad (ClevelandBaseMonad caps) => HasClevelandCaps caps where Source #
A proof that the given caps
record contains
the basic cleveland capabilities.
type ClevelandBaseMonad caps :: Type -> Type Source #
This will be either PureM
or ClientM
.
clevelandCapsL :: Lens' caps (ClevelandCaps (ClevelandBaseMonad caps)) Source #
Instances
Monad m => HasClevelandCaps (EmulatedCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract type ClevelandBaseMonad (EmulatedCaps m) :: Type -> Type Source # clevelandCapsL :: Lens' (EmulatedCaps m) (ClevelandCaps (ClevelandBaseMonad (EmulatedCaps m))) Source # | |
Monad m => HasClevelandCaps (ClevelandCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract type ClevelandBaseMonad (ClevelandCaps m) :: Type -> Type Source # clevelandCapsL :: Lens' (ClevelandCaps m) (ClevelandCaps (ClevelandBaseMonad (ClevelandCaps m))) Source # |
getMiscCap :: HasClevelandCaps caps => caps -> ClevelandMiscImpl (ClevelandBaseMonad caps) Source #
getOpsCap :: HasClevelandCaps caps => caps -> ClevelandOpsImpl (ClevelandBaseMonad caps) Source #
class HasClevelandCaps caps => HasEmulatedCaps caps where Source #
A proof that the given caps
record contains
the basic cleveland capabilities + the emulator capabiilities.
getEmulatedCap :: caps -> EmulatedImpl (ClevelandBaseMonad caps) Source #
Instances
Monad m => HasEmulatedCaps (EmulatedCaps m) Source # | |
Defined in Test.Cleveland.Internal.Abstract 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 #
ScenarioLogs | |
|
Instances
Eq ScenarioLogs Source # | |
Defined in Test.Cleveland.Internal.Abstract (==) :: ScenarioLogs -> ScenarioLogs -> Bool # (/=) :: ScenarioLogs -> ScenarioLogs -> Bool # | |
Show ScenarioLogs Source # | |
Defined in Test.Cleveland.Internal.Abstract 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