cleveland-0.3.1: Testing framework for Morley.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cleveland.Lorentz.Requester

Description

Contract that call on-chain views and keep the result in storage.

This is like contractConsumer, but it is _active_ - you call it, not the contract containing the view, in order to access the view.

Prefer using callView or unsafeCallView.

Synopsis

Documentation

contractRequester :: forall name arg ret vd cp st. (NiceParameterFull cp, NiceStorage cp, NiceParameterFull arg, NiceStorageFull [ret], NiceViewable arg, NiceViewable ret, HasView vd name arg ret, Typeable vd, KnownSymbol name) => ContractHandle cp st vd -> Contract arg [ret] () Source #

Allows calling a view multiple times, remembering results in last-goes-first order.

contractRequester @"viewName" contractWithView