compile (Func)¶
Compile SilverScript source into a CompiledContract.
Experimental: SilverScript and these bindings are under active
development; the API and the compiler's output may change in breaking ways
between releases. See the kaspa.experimental.silverscript module docs.
| PARAMETER | DESCRIPTION |
|---|---|
source
|
The SilverScript contract source.
TYPE:
|
constructor_args
|
Native Python values matching the contract's constructor parameters. Omit or pass None for a contract with no constructor parameters.
TYPE:
|
allow_entrypoint_return
|
Permit entrypoints that return a value (default: False).
TYPE:
|
record_debug_infos
|
Record debug information during compilation (default: False).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
CompiledContract
|
The compiled contract.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
SilverScriptError
|
If compilation fails (syntax error, type error, or incompatible pragma). |