scalus.uplc.CompiledPlutus
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
sir
the Scalus Intermediate Representation
Attributes
Graph
Reset zoom Hide graph Show graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Members list
The Plutus language version (V1, V2, V3, etc.).
The Plutus language version (V1, V2, V3, etc.).
Attributes
Creates the program with the appropriate version.
Creates the program with the appropriate version.
Attributes
Creates the script with the appropriate version.
Creates the script with the appropriate version.
Attributes
Returns a copy of this compiled script with error traces enabled.
Returns a copy of this compiled script with error traces enabled.
Error traces provide detailed error messages during script evaluation, useful for debugging. This increases script size and execution cost.
Attributes
Returns
a new CompiledPlutus with generateErrorTraces = true
Derives a Cardano address for this script on the specified network.
Derives a Cardano address for this script on the specified network.
Value parameters
network
the Cardano network (Mainnet or Testnet)
Attributes
Returns
the script address
Evaluates and returns the original Scala code.
Evaluates and returns the original Scala code.
Attributes
Lowers the SIR to UPLC using the configured backend and applies optimization if enabled.
Lowers the SIR to UPLC using the configured backend and applies optimization if enabled.
Attributes
The compiled UPLC program. Lazily computed on first access.
The compiled UPLC program. Lazily computed on first access.
If options.addScalusTag is set, the ScalusTag marker is injected after optimization (so the set of (error) nodes it attaches to is final).
Attributes
The Plutus script in its serialized form. Lazily computed on first access.
The Plutus script in its serialized form. Lazily computed on first access.
Attributes