Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
Documentation
readPlutusScript :: Either String FilePath -> IO (Either TxGenError ScriptInAnyLang) Source #
readPlutusScript
accepts a string for the name of a script that
may be known in the Left
case and a filepath to read as a script
in the Right
case. API errors are signalled via an Either
.
What the 1
flag signifies is to use a set of statically-
defined (via TH) scripts for the script name lookups instead of a
set of library files.
preExecutePlutusScript :: ProtocolParameters -> ScriptInAnyLang -> ScriptData -> ScriptRedeemer -> Either TxGenError ExecutionUnits Source #
preExecutePlutusScript
is a front end for the internal
preExecutePlutusVn
functions used to calculate ExecutionUnits
that switches on Plutus versions. The
evaluateScriptCounting
, evaluateScriptCounting
and evaluateScriptCounting
functions do the actual work on
the script's binary representation to count the number of execution
units needed.