Utils

scalus.cardano.onchain.plutus.v2.Utils
object Utils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Utils.type

Members list

Value members

Concrete methods

def findDatum(outputs: List[TxOut], datum: SortedMap[DatumHash, Datum], datumHash: DatumHash): Option[Datum]

Finds a datum firstly in the datum map by its hash otherwise in the outputs.

Finds a datum firstly in the datum map by its hash otherwise in the outputs.

Value parameters

datum

The map of datum hashes to datums.

datumHash

The hash of the datum to find.

outputs

The list of outputs to search in.

Attributes

Returns

An Option containing the found datum, or None if not found.

def findInput(inputs: List[TxInInfo], outRef: TxOutRef): Option[TxInInfo]

Finds an input in the list of inputs by its out reference.

Finds an input in the list of inputs by its out reference.

Value parameters

inputs

The list of inputs to search in.

outRef

The output reference to find.

Attributes

Returns

An Option containing the found input, or None if not found.

def findScriptOutputs(outputs: List[TxOut], scriptHash: ValidatorHash): List[TxOut]

Finds all outputs that match a given script hash.

Finds all outputs that match a given script hash.

Value parameters

outputs

The list of outputs to search in.

scriptHash

The script hash to match against the outputs' addresses.

Attributes

Returns

A list of outputs that match the script hash.

Concrete fields

lazy val sirDeps: List[SIRModuleWithDeps]
lazy val sirModule: Module