MachineParams

scalus.uplc.eval.MachineParams
See theMachineParams companion class
object MachineParams

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def defaultParamsFor(language: Language, protocolVersion: MajorProtocolVersion): MachineParams

Creates default machine parameters for a given Plutus version and protocol version.

Creates default machine parameters for a given Plutus version and protocol version.

Value parameters

language

The plutus version

protocolVersion

The protocol version

Attributes

Returns

The machine parameters

Creates MachineParams from a Blockfrost protocol parameters JSON.

Creates MachineParams from a Blockfrost protocol parameters JSON.

Value parameters

json

The Blockfrost protocol parameters JSON

plutus

The plutus version

Attributes

Returns

The machine parameters

Creates MachineParams from a Cardano CLI protocol parameters JSON.

Creates MachineParams from a Cardano CLI protocol parameters JSON.

Value parameters

json

The Cardano CLI protocol parameters JSON

plutus

The plutus version

Attributes

Returns

The machine parameters

def fromCostModels(costModels: CostModels, language: Language, protocolVersion: MajorProtocolVersion): MachineParams

Creates MachineParams from CostModels and Language.

Creates MachineParams from CostModels and Language.

This function configures the Plutus virtual machine with the appropriate cost models and semantic variants based on the protocol version and Plutus language version. This is crucial for accurate script execution cost calculation and validation.

Value parameters

costModels

Cost models for different Plutus versions

language

Plutus language version (V1, V2, or V3)

protocolVersion

Major protocol version for semantic variant selection

Attributes

Returns

Configured MachineParams for script execution

Creates MachineParams from a ProtocolParams and a Language

Creates MachineParams from a ProtocolParams and a Language

Attributes

Deprecated methods

def defaultParamsFor(plutus: Language, protocolVersion: ProtocolVersion): MachineParams

Creates default machine parameters for a given Plutus version and protocol version.

Creates default machine parameters for a given Plutus version and protocol version.

Value parameters

plutus

The plutus version

protocolVersion

The protocol version

Attributes

Returns

The machine parameters

Deprecated
[Since version 0.12.0] Use the overload with MajorProtocolVersion