plutus-contract-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Plutus.Contract.Trace

Description

A trace is a sequence of actions by simulated wallets that can be run on the mockchain. This module contains the functions needed to build traces.

Synopsis

Documentation

data TraceError e Source #

Error produced while running a trace. Either a contract-specific error (of type e), or an AssertionError from the emulator.

data EndpointError Source #

Instances

Instances details
Eq EndpointError Source # 
Instance details

Defined in Plutus.Contract.Trace

Show EndpointError Source # 
Instance details

Defined in Plutus.Contract.Trace

Generic EndpointError Source # 
Instance details

Defined in Plutus.Contract.Trace

Associated Types

type Rep EndpointError :: Type -> Type Source #

ToJSON EndpointError Source # 
Instance details

Defined in Plutus.Contract.Trace

FromJSON EndpointError Source # 
Instance details

Defined in Plutus.Contract.Trace

Pretty EndpointError Source # 
Instance details

Defined in Plutus.Contract.Trace

type Rep EndpointError Source # 
Instance details

Defined in Plutus.Contract.Trace

type Rep EndpointError = D1 ('MetaData "EndpointError" "Plutus.Contract.Trace" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "EndpointNotActive" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Wallet)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EndpointDescription)))

Handle contract requests

handlePendingTransactions :: (Member (LogObserve (LogMessage Text)) effs, Member (LogMsg RequestHandlerLogMsg) effs, Member WalletEffect effs) => RequestHandler effs PABReq PABResp Source #

Submit the wallet's pending transactions to the blockchain.

Initial distributions of emulated chains

Wallets

data Wallet Source #

A wallet identifier

Instances

Instances details
Eq Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

Data Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Wallet -> c Wallet Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Wallet Source #

toConstr :: Wallet -> Constr Source #

dataTypeOf :: Wallet -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Wallet) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Wallet) Source #

gmapT :: (forall b. Data b => b -> b) -> Wallet -> Wallet Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Wallet -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Wallet -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Wallet -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Wallet -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Wallet -> m Wallet Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Wallet -> m Wallet Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Wallet -> m Wallet Source #

Ord Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

Show Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

Generic Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

Associated Types

type Rep Wallet :: Type -> Type Source #

ToJSON Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

ToJSONKey Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

FromJSON Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

ToHttpApiData Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

FromHttpApiData Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

ToSchema Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

Pretty Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

Methods

pretty :: Wallet -> Doc ann Source #

prettyList :: [Wallet] -> Doc ann Source #

type Rep Wallet Source # 
Instance details

Defined in Wallet.Emulator.Wallet

type Rep Wallet = D1 ('MetaData "Wallet" "Wallet.Emulator.Wallet" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "Wallet" 'PrefixI 'True) (S1 ('MetaSel ('Just "prettyWalletName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Just "getWalletId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WalletId)))

mockWalletPaymentPubKey :: Wallet -> PaymentPubKey Source #

The public key of a mock wallet. (Fails if the wallet is not a mock wallet).

mockWalletPaymentPubKeyHash :: Wallet -> PaymentPubKeyHash Source #

The payment public key hash of a mock wallet. (Fails if the wallet is not a mock wallet).