UplcRepr
scalus.compiler.UplcRepr
final class UplcRepr(repr: UplcRepresentation) extends StaticAnnotation
Specifies the UPLC representation for a case class, enum, or field.
When applied to a type, this annotation directs the Scalus compiler to use the specified representation instead of the default structural inference. Can also be applied to individual constructor fields for per-field representation control.
Value parameters
- repr
-
The representation from UplcRepresentation
Attributes
- Example
-
@UplcRepr(UplcRepresentation.ProductCaseOneElement) case class PubKeyHash(hash: ByteString) @UplcRepr(UplcRepresentation.PackedDataMap) case class AssocMap[K, V](inner: List[(K, V)]) @UplcRepr(UplcRepresentation.UplcConstr) case class Tile(x: BigInt, y: BigInt) @UplcRepr(UplcRepresentation.UplcConstr) case class ChessSet( size: BigInt, @UplcRepr(UplcRepresentation.SumBuiltinList(UplcRepresentation.UplcConstr)) visited: List[Tile] ) - Graph
-
- Supertypes
-
trait StaticAnnotationclass Annotationclass Objecttrait Matchableclass Any
In this article