Cardano.Uplc

Handling the UPLC VM

VmConfig
-> RefDict Output
-> Transaction
-> Result String (List Redeemer)

Evaluate Plutus scripts costs.

This also checks that the provided local state has all relevant UTxOs present.

This function will call Aiken UPLC VM with some JavaScript and WebAssembly code. It requires customized Elm compilation and JS code patching, so you need to call the elm-cardano binary for compilation. More info on that in the README of the elm-cardano GitHub repo.

VmConfig
-> RefDict Output
-> Bytes any
-> Result String (List Redeemer)

Evaluate plutus scripts costs with the Tx raw bytes.

This function will call Aiken UPLC VM with some JavaScript and WebAssembly code. It requires customized Elm compilation and JS code patching, so you need to call the elm-cardano binary for compilation. More info on that in the README of the elm-cardano GitHub repo.

Apply a list of [Data] encode parameters to a given [PlutusScript].

Similar to [evalScriptsCostsRaw], This function will call Aiken UPLC VM with some JavaScript and WebAssembly code. It requires customized Elm compilation and JS code patching, so you need to call the elm-cardano binary for compilation. More info on that in the README of the elm-cardano GitHub repo.

type alias VmConfig =
{ budget : ExUnits
, slotConfig : SlotConfig
, costModels : CostModels
}

UPLC VM configuration.

This is required so that the VM knows how to price memory usage and execution steps, as well as how to manage time.

defaultVmConfig : VmConfig

Default UPLC VM config.

The default budget currently in the Conway era.

Default cost models for the Plutus VM currently in the Conway era.

type alias SlotConfig =
{ zeroTime : Natural
, zeroSlot : Natural
, slotLengthMs : Int
}

Time managing config for the VM.

slotConfigMainnet : SlotConfig

Default slot config for Mainnet.

slotConfigPreview : SlotConfig

Default slot config for Preview.

slotConfigPreprod : SlotConfig

Default slot config for Preprod.