Program

scalus.uplc.Program
See theProgram companion object
case class Program(version: (Int, Int, Int), term: Term)

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 Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

infix def $(arg: Term): Program

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

infix def alphaEq(that: Program): Boolean

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

def eval: Term
Extension method from scalus
Extension method from scalus
def pretty: Doc
Extension method from scalus
def prettyXTerm: Doc
Extension method from scalus
def show: String
Extension method from scalus
def showHighlighted: String
Extension method from scalus
def writePlutusFile(path: String, plutusVersion: PlutusLedgerLanguage): Unit
Extension method from scalus

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val cborEncoded: Array[Byte]

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

lazy val doubleCborEncoded: Array[Byte]

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

lazy val doubleCborHex: String

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

lazy val flatEncoded: Array[Byte]

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.

Attributes