ArbitraryInstances

scalus.cardano.ledger.ArbitraryInstances
See theArbitraryInstances companion object

Attributes

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

Members list

Type members

Classlikes

object TimelockGen

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def genMapOfSizeFromArbitrary[A : Arbitrary, B : Arbitrary](from: Int, to: Int): Gen[Map[A, B]]
def genMint(minPolicies: Int = ..., maxPolicies: Int = ..., minAssets: Int = ..., maxAssets: Int = ...): Gen[Mint]

Generates a Mint with a configurable number of policies and assets.

Generates a Mint with a configurable number of policies and assets.

Policies are generated with unique PolicyIds, and each policy contains a map of AssetNames to values. The values can be negative (for burning) or positive (for minting). Values never equal to zero.

Value parameters

maxAssets

Maximum number of assets per policy

maxPolicies

Maximum number of policies to generate

minAssets

Minimum number of assets per policy

minPolicies

Minimum number of policies to generate

Attributes

def genMultiAsset(minPolicies: Int = ..., maxPolicies: Int = ..., minAssets: Int = ..., maxAssets: Int = ...): Gen[MultiAsset]

Generates a MultiAsset with a configurable number of policies and assets.

Generates a MultiAsset with a configurable number of policies and assets.

Policies are generated with unique PolicyIds, and each policy contains a map of AssetNames to values. The values are always positive.

Value parameters

maxAssets

Maximum number of assets per policy

maxPolicies

Maximum number of policies to generate

minAssets

Minimum number of assets per policy

minPolicies

Minimum number of policies to generate

Attributes

Returns

A generator for MultiAsset instances with the specified constraints.

def genSetOfSizeFromArbitrary[A : Arbitrary](from: Int, to: Int): Gen[Set[A]]
def genVectorOfSizeFromArbitrary[A : Arbitrary](from: Int, to: Int): Gen[IndexedSeq[A]]

Inherited methods

Attributes

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

Attributes

Inherited from:
ArbitraryInstances

Givens

Givens

given given_Arbitrary_Anchor: Arbitrary[Anchor]
given given_Arbitrary_Block: Arbitrary[Block]
given given_Arbitrary_Coin: Arbitrary[Coin]
given given_Arbitrary_DRep: Arbitrary[DRep]
given given_Arbitrary_ExUnits: Arbitrary[ExUnits]
given given_Arbitrary_Hash[HF : HashSize, Purpose]: Arbitrary[Hash[HF, Purpose]]
given given_Arbitrary_KeepRaw[A : Encoder]: Arbitrary[KeepRaw[A]]
given given_Arbitrary_Mint: Arbitrary[Mint]
given given_Arbitrary_Native: Arbitrary[Native]
given given_Arbitrary_Relay: Arbitrary[Relay]
given given_Arbitrary_Script: Arbitrary[Script]
given given_Arbitrary_Set: Arbitrary[Set[ProposalProcedure]]
given given_Arbitrary_Sized[A : Encoder]: Arbitrary[Sized[A]]
given given_Arbitrary_Slot: Arbitrary[Slot]
given given_Arbitrary_TaggedOrderedSet[A : Arbitrary]: Arbitrary[TaggedOrderedSet[A]]
given given_Arbitrary_TaggedSortedMap[A : Arbitrary, K : Ordering](implicit evidence$1: Arbitrary[A], evidence$2: Ordering[K], KeyOf[K, A]): Arbitrary[TaggedSortedMap[K, A]]
given given_Arbitrary_TaggedSortedSet[A : Ordering]: Arbitrary[TaggedSortedSet[A]]
given given_Arbitrary_TaggedSortedStrictMap[A : Arbitrary, K : Ordering](implicit evidence$1: Arbitrary[A], evidence$2: Ordering[K], KeyOf[K, A]): Arbitrary[TaggedSortedStrictMap[K, A]]
given given_Arbitrary_Value: Arbitrary[Value]
given given_Arbitrary_Vote: Arbitrary[Vote]
given given_Arbitrary_Voter: Arbitrary[Voter]
given given_Arbitrary_VrfCert: Arbitrary[VrfCert]
given given_Arbitrary_Word64: Arbitrary[Word64]

Inherited givens

given TermShrink: Shrink[Term]

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 given_Arbitrary_Address: Arbitrary[Address]

Attributes

Inherited from:
ArbitraryInstances

Attributes

Inherited from:
ArbitraryInstances
given given_Arbitrary_Network: Arbitrary[Network]

Attributes

Inherited from:
ArbitraryInstances
given given_Arbitrary_Pointer: Arbitrary[Pointer]

Attributes

Inherited from:
ArbitraryInstances
given given_Arbitrary_Program: Arbitrary[Program]

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_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