A Cardano Plutus program.
A program is a versioned Term. The version is a tuple of three integers: major, minor, and patch.
Value parameters
- term
-
the term of the program
- version
-
the version of the program
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Applies an argument to the program.
Applies an argument to the program.
Value parameters
- arg
-
the argument
Attributes
- Returns
-
the program with the argument applied
Checks if two programs are equal.
Checks if two programs are equal.
Two programs are equal if their versions are equal and their terms are alpha-equivalent. This means that the names of the variables are not important, only their De Bruijn indices. We use unique negative indices to represent free variables.
Value parameters
- that
-
the other program
Attributes
- Returns
-
true if the programs are alpha-equal, false otherwise
Checks if two programs are equal.
Checks if two programs are equal.
Two programs are equal if their versions are equal and their terms are alpha-equivalent. This means that the names of the variables are not important, only their De Bruijn indices. We use unique negative indices to represent free variables.
Value parameters
- that
-
the other program
Attributes
- Returns
-
true if the programs are alpha-equal, false otherwise
Evaluates the program using the given VM according to the Plutus specification.
Evaluates the program using the given VM according to the Plutus specification.
Attributes
- Throws
-
RuntimeException
on evaluation error
Evaluates the program using the given VM according to the Plutus specification.
Evaluates the program using the given VM according to the Plutus specification.
Attributes
- Returns
-
scalus.uplc.eval.Result with the evaluation result and the spent budget
Pretty-print the program.
Pretty-print the program.
Attributes
Pretty-print the program with XTerm syntax highlighting.
Pretty-print the program with XTerm syntax highlighting.
Attributes
Show the program as a string.
Show the program as a string.
Attributes
Show the program as a string with XTerm syntax highlighting.
Show the program as a string with XTerm syntax highlighting.
Attributes
Write the program to a Plutus file.
Write the program to a Plutus file.
Value parameters
- path
-
the path to the file
- plutusVersion
-
the Plutus version (V1, V2, or V3)
Attributes
Deprecated methods
Attributes
- Deprecated
-
[Since version 0.14.2]Use Program.evaluate method instead
Attributes
- Deprecated
-
[Since version 0.14.2]Use Program.evaluateDebug method instead
Attributes
- Deprecated
-
[Since version 0.14.2]Use Program.pretty method instead
Attributes
- Deprecated
-
[Since version 0.14.2]Use Program.prettyXTerm method instead
Attributes
- Deprecated
-
[Since version 0.14.2]Use Program.show method instead
Attributes
- Deprecated
-
[Since version 0.14.2]Use Program.showHighlighted method instead
Attributes
- Deprecated
-
[Since version 0.14.2]Use Program.writePlutusFile method instead
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Concrete fields
CBOR-encoded scalus.uplc.builtin.ByteString of the program.
CBOR-encoded scalus.uplc.builtin.ByteString of the program.
The CBOR-encoded representation is a byte array that contains the program in a CBOR format.
Attributes
CBOR-encoded representation of the program.
CBOR-encoded representation of the program.
The CBOR-encoded representation is a byte array that contains the program in a CBOR format.
Attributes
De Bruijn-indexed representation of the program.
De Bruijn-indexed representation of the program.
The De Bruijn-indexed representation is a versioned Term where the variables are indexed using De Bruijn indices. A program must be named.
Attributes
Double CBOR-encoded representation of the program.
Double CBOR-encoded representation of the program.
Cardano uses a double-CBOR encoding for Plutus scripts in many places.
Attributes
Double CBOR-encoded hex string of the program.
Double CBOR-encoded hex string of the program.
Cardano uses a double-CBOR encoding for Plutus scripts in many places.
Attributes
Flat-encoded representation of the program.
Flat-encoded representation of the program.
The flat-encoded representation is a byte array that contains the program in a flat format. This format is used to serialize the program to CBOR.