PlutusScript

scalus.cardano.ledger.PlutusScript
See thePlutusScript companion object
sealed trait PlutusScript extends Script

Attributes

Companion
object
Graph
Supertypes
trait Script
class Object
trait Matchable
class Any
Known subtypes
class PlutusV1
class PlutusV2
class PlutusV3
class PlutusV4

Members list

Value members

Abstract methods

Get script language

Get script language

Attributes

Concrete methods

Get the De Bruijn-indexed program, preserving source annotations when available.

Get the De Bruijn-indexed program, preserving source annotations when available.

A script decoded from CBOR has no annotations to preserve, so it is decoded straight to the De Bruijn form the evaluator runs, without a round trip through named variables. Bytes after the script's CBOR byte string are treated as in program.

Attributes

def isWellFormed(majorProtocolVersion: MajorProtocolVersion): Boolean

Get the program, preferring the cached in-memory version over CBOR deserialization.

Get the program, preferring the cached in-memory version over CBOR deserialization.

Bytes after the script's CBOR byte string are ignored in a Plutus V1 or V2 script, as the ledger does, and fail the decoding in later languages. Bytes after the program inside the byte string fail the decoding in every language.

Attributes

def toHex: String

Inherited and Abstract methods

Attributes

Inherited from:
Script