debug_call (Func)¶
Debug a SilverScript contract call by simulating the full spend locally.
Experimental: SilverScript and these bindings are under active development; the API may change in breaking ways between releases.
Compiles source with debug info, builds a synthetic transaction that
spends the contract's P2SH UTXO with a call to the chosen entrypoint, and
executes it through SilverScript's source-level debug engine. The result
reports pass/fail; on failure it includes a source-level report with the
failing statement, the call stack, and the decoded variables (locals,
arguments, contract state) in each frame. console.log output is captured
either way.
This simulates script validation on a synthetic transaction — it does not touch the network and says nothing about fees, mass, or maturity.
| PARAMETER | DESCRIPTION |
|---|---|
source
|
The SilverScript contract source.
TYPE:
|
function_name
|
The entrypoint to call. Defaults to the contract's
first entrypoint. For covenant functions, use the source-level
name (e.g.
TYPE:
|
args
|
Native Python values matching the entrypoint's parameters. For
covenant transition functions the leading
TYPE:
|
constructor_args
|
Native Python values for the contract's constructor parameters.
TYPE:
|
tx
|
Optional transaction scenario dict. Defaults to a single-input,
single-output spend of the contract. Keys:
TYPE:
|
trace
|
When True, record a per-statement execution trace on
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
DebugCallResult
|
The simulation outcome. Script failures are reported in the result, not raised.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
SilverScriptError
|
If compilation fails, the entrypoint or an argument
is invalid, or the |