Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data PlutusWithContext c where
- PlutusWithContext ∷ PlutusLanguage l ⇒ {..} → PlutusWithContext c
- data ScriptFailure c = ScriptFailure {}
- data ScriptResult c
- = Passes [PlutusWithContext c]
- | Fails [PlutusWithContext c] (NonEmpty (ScriptFailure c))
- scriptPass ∷ PlutusWithContext c → ScriptResult c
- scriptFail ∷ ScriptFailure c → ScriptResult c
- data PlutusDebugInfo c
- debugPlutus ∷ Crypto c ⇒ String → IO (PlutusDebugInfo c)
- runPlutusScript ∷ PlutusWithContext c → ScriptResult c
- runPlutusScriptWithLogs ∷ PlutusWithContext c → ([Text], ScriptResult c)
- evaluatePlutusWithContext ∷ VerboseMode → PlutusWithContext c → ([Text], Either EvaluationError ExBudget)
- explainPlutusEvaluationError ∷ PlutusWithContext c → EvaluationError → ScriptResult c
Documentation
data PlutusWithContext c where Source #
This type contains all that is necessary from Ledger to evaluate a plutus script.
PlutusWithContext | |
|
Instances
Show (PlutusWithContext c) Source # | |
Defined in Cardano.Ledger.Plutus.Evaluate | |
Crypto c ⇒ FromCBOR (PlutusWithContext c) Source # | |
Defined in Cardano.Ledger.Plutus.Evaluate | |
Crypto c ⇒ ToCBOR (PlutusWithContext c) Source # | |
Defined in Cardano.Ledger.Plutus.Evaluate toCBOR ∷ PlutusWithContext c → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (PlutusWithContext c) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PlutusWithContext c] → Size Source # | |
NFData (PlutusWithContext c) Source # | |
Defined in Cardano.Ledger.Plutus.Evaluate rnf ∷ PlutusWithContext c → () Source # | |
Eq (PlutusWithContext c) Source # | |
Defined in Cardano.Ledger.Plutus.Evaluate (==) ∷ PlutusWithContext c → PlutusWithContext c → Bool Source # (/=) ∷ PlutusWithContext c → PlutusWithContext c → Bool Source # |
data ScriptFailure c Source #
Instances
Generic (ScriptFailure c) Source # | |
Defined in Cardano.Ledger.Plutus.Evaluate from ∷ ScriptFailure c → Rep (ScriptFailure c) x Source # to ∷ Rep (ScriptFailure c) x → ScriptFailure c Source # | |
Show (ScriptFailure c) Source # | |
Defined in Cardano.Ledger.Plutus.Evaluate | |
type Rep (ScriptFailure c) Source # | |
Defined in Cardano.Ledger.Plutus.Evaluate type Rep (ScriptFailure c) = D1 ('MetaData "ScriptFailure" "Cardano.Ledger.Plutus.Evaluate" "cardano-ledger-core-1.16.0.0-inplace" 'False) (C1 ('MetaCons "ScriptFailure" 'PrefixI 'True) (S1 ('MetaSel ('Just "scriptFailureMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "scriptFailurePlutus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PlutusWithContext c)))) |
data ScriptResult c Source #
Passes [PlutusWithContext c] | |
Fails [PlutusWithContext c] (NonEmpty (ScriptFailure c)) |
Instances
scriptPass ∷ PlutusWithContext c → ScriptResult c Source #
scriptFail ∷ ScriptFailure c → ScriptResult c Source #
data PlutusDebugInfo c Source #
DebugBadHex String | |
DebugCannotDecode String | |
DebugSuccess | |
DebugFailure | |
|
Instances
Show (PlutusDebugInfo c) Source # | |
Defined in Cardano.Ledger.Plutus.Evaluate |
debugPlutus ∷ Crypto c ⇒ String → IO (PlutusDebugInfo c) Source #
runPlutusScriptWithLogs ∷ PlutusWithContext c → ([Text], ScriptResult c) Source #
evaluatePlutusWithContext ∷ VerboseMode → PlutusWithContext c → ([Text], Either EvaluationError ExBudget) Source #
explainPlutusEvaluationError ∷ PlutusWithContext c → EvaluationError → ScriptResult c Source #
Explain why a script might fail. Scripts come in three flavors:
- with 3 arguments
[data,redeemer,context]
forPlutusV1
andPlustuV2
- with 2 arguments
[redeemer,context]
forPlutusV1
andPlustuV2
- with 1 argument
context
forPlutusV3
onwards