| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Cardano.Ledger.Dijkstra.Translation.TranslatableGen
Synopsis
- genTranslatableTxWithNestedTxs ∷ (DijkstraEraTxBody era, AlonzoEraTxWits era, EraUTxO era, ScriptsNeeded era ~ AlonzoScriptsNeeded era, EraPlutusTxInfo 'PlutusV4 era, Arbitrary (Tx 'TopTx era), Arbitrary (Value era), Arbitrary (Script era)) ⇒ Gen (Tx 'TopTx era, UTxO era)
Documentation
genTranslatableTxWithNestedTxs ∷ (DijkstraEraTxBody era, AlonzoEraTxWits era, EraUTxO era, ScriptsNeeded era ~ AlonzoScriptsNeeded era, EraPlutusTxInfo 'PlutusV4 era, Arbitrary (Tx 'TopTx era), Arbitrary (Value era), Arbitrary (Script era)) ⇒ Gen (Tx 'TopTx era, UTxO era) Source #
Generate a top-level transaction together with its sub-transactions (if any) and
a UTxO that makes the whole batch translatable (by functions like transGuardingTopTxInfo).
Some properties of the generated transactions:
* every input/reference input across the batch resolves in the UTxO,
* no output anywhere in the batch carries a StakeRefPtr or a Byron address,
* inputs never overlap with reference inputs within the same transaction,
* reference inputs, datums, withdrawal and direct deposit account addresses, guard and
required top-level guard credentials, and minted asset ids are often shared across the
top transaction field and nested transactions, so that their aggregation is exercised; an
asset id is sometimes minted in one transaction and burned in another.
* sub-transactions often vote again, differently, on some of the (voter,
governance action) pairs of the top-level transaction or of other
sub-transactions, so that which vote wins across the batch is exercised. It
also exercises votes one a new governance action for a known voter, so that
votes are merged per voter.
* sometimes no transaction of the batch has an upper bound (or, alternatively, a lower
bound) in its validity interval, so that a bound absent from the whole batch is exercised,
* every redeemer points at a script that its transaction both needs and provides, from a
small pool of PlutusV4 scripts, so that the same script is often executed in more than
one transaction, and sometimes for two purposes (guarding and minting) in one transaction.
Only scripts for guarding and minting purposes are executed; the
translation of the other purposes is left to the unit tests of
transPlutusPurposeV4.