ArbitraryInstances

scalus.cardano.onchain.plutus.v3.ArbitraryInstances
See theArbitraryInstances companion object

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Value members

Inherited methods

Attributes

Inherited from:
ArbitraryInstances
def genAmount: Gen[BigInt]

Token quantities, bounded to what a Value may legally hold.

Token quantities, bounded to what a Value may legally hold.

Same edge-case shape as iArb, but its wide [-2^128, 2^128] branch is narrowed to [-2^64, 2^64]: real ledger quantities fit Int64, and the CIP-153 builtins that Value operations lower to at PV11 reject quantities beyond +-(2^127) and fail when a unionValue/scaleValue result leaves that range (see docs/superpowers/specs/2026-08-18-t7-value-builtins-lowering-design.md). The bound stays well below 2^127 so that summing the up-to-11 generated assets cannot overflow either.

The * properties test in ValueTest couples its +-(2^62) scaling-factor bound to this +-(2^64) amount bound (2^64 * 2^62 = 2^126), so widening this bound means narrowing that one in step.

Attributes

Inherited from:
ArbitraryInstances
def genAsset: Gen[Value]

Attributes

Inherited from:
ArbitraryInstances

Generates a random asset name, which is a ByteString of length between 1 and 32 bytes.

Generates a random asset name, which is a ByteString of length between 1 and 32 bytes.

Attributes

Inherited from:
ArbitraryInstances
def genByteStringOfN(n: Int): Gen[ByteString]

Attributes

Inherited from:
ArbitraryInstances
def genLovelace: Gen[Value]

Attributes

Inherited from:
ArbitraryInstances

Attributes

Inherited from:
ArbitraryInstances
def genToken: Gen[(ByteString, BigInt)]

Attributes

Inherited from:
ArbitraryInstances

Givens

Givens

given given_Arbitrary_TxId: Arbitrary[TxId]
given given_Arbitrary_TxInfo: Arbitrary[TxInfo]

Inherited givens

given TermShrink: Shrink[Term]

Attributes

Inherited from:
ArbitraryInstances
given TxIdV1: Arbitrary[TxId]

Attributes

Inherited from:
ArbitraryInstances
given arbAssocMap[A : Eq, B : Arbitrary]: Arbitrary[AssocMap[A, B]]

Attributes

Inherited from:
ArbitraryInstances
given arbData: Arbitrary[Data]

Attributes

Inherited from:
ArbitraryInstances
given arbList[A : Arbitrary]: Arbitrary[List[A]]

Attributes

Inherited from:
ArbitraryInstances
given arbOption[A : Arbitrary]: Arbitrary[Option[A]]

Attributes

Inherited from:
ArbitraryInstances
given arbSortedMap[A : Ord, B : Arbitrary]: Arbitrary[SortedMap[A, B]]

Attributes

Inherited from:
ArbitraryInstances
given arbitraryConstant: Arbitrary[Constant]

Attributes

Inherited from:
ArbitraryInstances
given arbitraryDefaultUni: Arbitrary[DefaultUni]

Attributes

Inherited from:
ArbitraryInstances
given arbitraryTerm: Arbitrary[Term]

Attributes

Inherited from:
ArbitraryInstances
given bArb: Arbitrary[B]

Attributes

Inherited from:
ArbitraryInstances
given byteStringArb: Arbitrary[ByteString]

Attributes

Inherited from:
ArbitraryInstances
given g1ElementArbitrary: Arbitrary[G1Element]

Attributes

Inherited from:
ArbitraryInstances
given g2ElementArbitrary: Arbitrary[G2Element]

Attributes

Inherited from:
ArbitraryInstances
given given_Arbitrary_Address: Arbitrary[Address]

Attributes

Inherited from:
ArbitraryInstances

Attributes

Inherited from:
ArbitraryInstances

Attributes

Inherited from:
ArbitraryInstances

Attributes

Inherited from:
ArbitraryInstances

Attributes

Inherited from:
ArbitraryInstances

Attributes

Inherited from:
ArbitraryInstances
given given_Arbitrary_Program: Arbitrary[Program]

Attributes

Inherited from:
ArbitraryInstances

Attributes

Inherited from:
ArbitraryInstances

Attributes

Inherited from:
ArbitraryInstances
given given_Arbitrary_TxOut: Arbitrary[TxOut]

Attributes

Inherited from:
ArbitraryInstances
given given_Arbitrary_Value: Arbitrary[Value]

Attributes

Inherited from:
ArbitraryInstances

Attributes

Inherited from:
ArbitraryInstances
given given_Shrink_Data: Shrink[Data]

Attributes

Inherited from:
ArbitraryInstances
given given_Shrink_Program: Shrink[Program]

Attributes

Inherited from:
ArbitraryInstances
given iArb: Arbitrary[I]

Attributes

Inherited from:
ArbitraryInstances