This PR redefines the Arbitrary instance for PartialTx era in terms of the following generators and shrinkers that use ledger types:
genTxForBalancing :: IsRecentEra era => Gen (Tx era)
genTxOut :: IsRecentEra era => Gen (TxOut era)
shrinkTx :: IsRecentEra era => Tx era -> [Tx era]
Internally, these generators and shrinkers may still use conversions to and from cardano-api types, but those conversions no longer leak out into code that calls them.
Importantly, this allows the definition of Arbitrary for PartialTx era to be completely free of conversions, which makes the flow of data clearer.
This PR redefines the
Arbitrary
instance forPartialTx era
in terms of the following generators and shrinkers that use ledger types:Internally, these generators and shrinkers may still use conversions to and from
cardano-api
types, but those conversions no longer leak out into code that calls them.Importantly, this allows the definition of
Arbitrary
forPartialTx era
to be completely free of conversions, which makes the flow of data clearer.Issue
ADP-3272