Base implementation for compiled Plutus scripts of all versions.
This sealed abstract class provides the common implementation for compiling Scala code to Plutus scripts across all Plutus language versions (V1, V2, V3). Subclasses implement version-specific details such as program version numbers, script hash prefixes, and optimizer selection.
Type parameters
A
the Scala type of the compiled code
Value parameters
lazyCode
a thunk that evaluates to the original Scala code
optimizer
the UPLC optimizer to apply (version-specific)
options
compiler options controlling lowering and optimization
The compiled UPLC program. Lazily computed on first access.
The compiled UPLC program. Lazily computed on first access.
If options.addScalusTag is set, the term is wrapped in the ScalusTag marker after optimization (so the UPLC optimizer cannot eliminate the tag as dead code).