plutus-ledger-api-1.60.0.0: Interface to the Plutus ledger for the Cardano ledger.
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusLedgerApi.Test.V1.Data.Value

Synopsis

toCellCandidatesNumber :: Int -> Int #

Return how many candidates to randomly choose from to fill the given number of cells. For example, if we only need to fill a single cell, we choose from 6 different candidates, and if we need to fill 5 cells, we choose from 11 candidates.

>>> map (\i -> (i, toCellCandidatesNumber i)) [1..13]
[(1,6),(2,6),(3,6),(4,8),(5,11),(6,14),(7,18),(8,22),(9,27),(10,31),(11,36),(12,41),(13,46)] 

genShortHex :: BuiltinByteString by picking one of the predetermined ones, given a number of cells to fill (see toCellCandidatesNumber). The idea is that we want to occasionally generate the same Values to have decent test coverage, hence to make name clashing more likely we pick from a predetermined set of BuiltinByteString for two different Gen [(name, b)] #

Annotate each element of the give list with a name, given a function turning Arbitrary instance for a.

Constructors

NoArbitrary 

Fields

Instances

Instances details
Value] #