plutus-ledger-api-1.18.0.0: Interface to the Plutus ledger for the Cardano ledger.
Safe HaskellNone
LanguageHaskell2010

PlutusLedgerApi.Test.EvaluationEvent

Synopsis

Documentation

data ScriptEvaluationEvents Source #

This type contains a list of on-chain script evaluation events. All PlutusV1 evaluations (if any) share the same cost parameters. Same with PlutusV2.

Sharing the cost parameters lets us avoid creating a new EvaluationContext for each ScriptEvaluationEvent.

Constructors

ScriptEvaluationEvents 

Fields

Instances

Instances details
Generic ScriptEvaluationEvents Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

Associated Types

type Rep ScriptEvaluationEvents :: Type -> Type Source #

Serialise ScriptEvaluationEvents Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

type Rep ScriptEvaluationEvents Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

type Rep ScriptEvaluationEvents = D1 ('MetaData "ScriptEvaluationEvents" "PlutusLedgerApi.Test.EvaluationEvent" "plutus-ledger-api-1.18.0.0-3zQlek5i2LQHACPBonQm7t-plutus-ledger-api-testlib" 'False) (C1 ('MetaCons "ScriptEvaluationEvents" 'PrefixI 'True) (S1 ('MetaSel ('Just "eventsCostParamsV1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Integer])) :*: (S1 ('MetaSel ('Just "eventsCostParamsV2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Integer])) :*: S1 ('MetaSel ('Just "eventsEvents") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ScriptEvaluationEvent)))))

data ScriptEvaluationEvent Source #

Information about an on-chain script evaluation event, specifically the information needed to evaluate the script, and the expected result.

Instances

Instances details
Show ScriptEvaluationEvent Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

Generic ScriptEvaluationEvent Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

Associated Types

type Rep ScriptEvaluationEvent :: Type -> Type Source #

Pretty ScriptEvaluationEvent Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

Methods

pretty :: ScriptEvaluationEvent -> Doc ann

prettyList :: [ScriptEvaluationEvent] -> Doc ann

Serialise ScriptEvaluationEvent Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

type Rep ScriptEvaluationEvent Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

data ScriptEvaluationData Source #

All the data needed to evaluate a script using the ledger API, except for the cost model parameters, as these are tracked separately.

Constructors

ScriptEvaluationData 

Fields

Instances

Instances details
Show ScriptEvaluationData Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

Generic ScriptEvaluationData Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

Associated Types

type Rep ScriptEvaluationData :: Type -> Type Source #

Pretty ScriptEvaluationData Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

Methods

pretty :: ScriptEvaluationData -> Doc ann

prettyList :: [ScriptEvaluationData] -> Doc ann

Serialise ScriptEvaluationData Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

type Rep ScriptEvaluationData Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

type Rep ScriptEvaluationData = D1 ('MetaData "ScriptEvaluationData" "PlutusLedgerApi.Test.EvaluationEvent" "plutus-ledger-api-1.18.0.0-3zQlek5i2LQHACPBonQm7t-plutus-ledger-api-testlib" 'False) (C1 ('MetaCons "ScriptEvaluationData" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dataProtocolVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MajorProtocolVersion) :*: S1 ('MetaSel ('Just "dataBudget") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExBudget)) :*: (S1 ('MetaSel ('Just "dataScript") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SerialisedScript) :*: S1 ('MetaSel ('Just "dataInputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Data]))))

data ScriptEvaluationResult Source #

Instances

Instances details
Show ScriptEvaluationResult Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

Generic ScriptEvaluationResult Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

Associated Types

type Rep ScriptEvaluationResult :: Type -> Type Source #

Pretty ScriptEvaluationResult Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

Serialise ScriptEvaluationResult Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

type Rep ScriptEvaluationResult Source # 
Instance details

Defined in PlutusLedgerApi.Test.EvaluationEvent

type Rep ScriptEvaluationResult = D1 ('MetaData "ScriptEvaluationResult" "PlutusLedgerApi.Test.EvaluationEvent" "plutus-ledger-api-1.18.0.0-3zQlek5i2LQHACPBonQm7t-plutus-ledger-api-testlib" 'False) (C1 ('MetaCons "ScriptEvaluationSuccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ScriptEvaluationFailure" 'PrefixI 'False) (U1 :: Type -> Type))

data UnexpectedEvaluationResult Source #

Error type when re-evaluating a ScriptEvaluationEvent.

Constructors

UnexpectedEvaluationSuccess 

Fields

UnexpectedEvaluationFailure 

Fields

DecodeError ScriptDecodeError 

checkEvaluationEvent Source #

Arguments

:: EvaluationContext 
-> [Integer]

Cost parameters

-> ScriptEvaluationEvent 
-> Maybe UnexpectedEvaluationResult 

Re-evaluate an on-chain script evaluation event.