CostModels

scalus.cardano.ledger.CostModels
See theCostModels companion object
case class CostModels(models: Map[Int, IndexedSeq[Long]])

Represents cost models for script languages in the Cardano blockchain.

Cost models define the execution costs of operations in different script languages. The keys are language identifiers (0 for Plutus V1, 1 for Plutus V2, 2 for Plutus V3), and the values are lists of integers representing operation costs.

Value parameters

models

Map from language identifiers to lists of operation costs

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

def getLanguageViewEncoding: Array[Byte]

Generate language view encoding for script integrity hash computation.

Generate language view encoding for script integrity hash computation.

This implements the same logic as Cardano's getLanguageView function. For PlutusV1, it uses double-bagged encoding for backward compatibility. For PlutusV2/V3, it uses standard encoding.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product