[#EvalScript-08]
= EvalScript
:mrdocs:

Evaluate a script against a stack, tracking Taproot&sol;Tapscript execution state&period;

== Synopsis

Declared in `&lt;script&sol;interpreter&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
EvalScript(
    std::vector&lt;std::vector&lt;unsigned char&gt;&gt;& stack,
    xref:CScript.adoc[CScript] const& script,
    xref:script_verify_flags.adoc[script&lowbar;verify&lowbar;flags] flags,
    xref:BaseSignatureChecker.adoc[BaseSignatureChecker] const& checker,
    xref:SigVersion.adoc[SigVersion] sigversion,
    xref:ScriptExecutionData.adoc[ScriptExecutionData]& execdata,
    xref:ScriptError.adoc[ScriptError]* error = nullptr);
----

== Return Value

`true` if the script executed successfully&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stack*
| The initial and resulting stack of byte&hyphen;vector elements&period;
| *script*
| The script to execute&period;
| *flags*
| The active script verification flags&period;
| *checker*
| The signature checker for CHECKSIG and lock&hyphen;time opcodes&period;
| *sigversion*
| The signature version selecting execution semantics&period;
| *execdata*
| Per&hyphen;input execution state updated during evaluation&period;
| *error*
| Set to the script error when evaluation fails&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
