Map

scalus.uplc.builtin.Data.Map
case class Map(values: List[(Data, Data)]) extends Data

Key-value mapping - represents associative data structures.

Used to encode Map[K, V] types where both keys and values are Data. Note that duplicate keys are allowed (this is a list of pairs, not a true map). Equality compares the pairs in order, as Plutus does: maps with the same entries in a different order are not equal.

Corresponds to UPLC builtins mapData and unMapData.

Value parameters

values

list of key-value pairs

Attributes

Example
 // A map from integers to strings
 Map(List((I(1), B(hex"aa")), (I(2), B(hex"bb"))))
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Data
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
override def toString: String

Debug string representation matching the Pretty instance format. It does not recurse, so the nesting depth is not limited by the stack.

Debug string representation matching the Pretty instance format. It does not recurse, so the nesting depth is not limited by the stack.

Attributes

Definition Classes
Data -> Any
Inherited from:
Data