Skip to content

Commit

Permalink
Updated generic builders for Babbage. Added the Parametric class on P…
Browse files Browse the repository at this point in the history
…Params for use in Tests.
  • Loading branch information
TimSheard committed Feb 11, 2022
1 parent 3df3ca8 commit 3edb971
Show file tree
Hide file tree
Showing 9 changed files with 1,598 additions and 770 deletions.
4 changes: 4 additions & 0 deletions libs/cardano-ledger-test/cardano-ledger-test.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ library
Test.Cardano.Ledger.BaseTypes
Test.Cardano.Ledger.Examples.TwoPhaseValidation
Test.Cardano.Ledger.Generic.Indexed
Test.Cardano.Ledger.Generic.Fields
Test.Cardano.Ledger.Generic.Parametric
Test.Cardano.Ledger.Generic.Proof
Test.Cardano.Ledger.Generic.Scriptic
Test.Cardano.Ledger.Generic.Updaters
Test.Cardano.Ledger.Model.API
Test.Cardano.Ledger.Model.Acnt
Expand Down Expand Up @@ -94,6 +97,7 @@ library
cardano-data,
cardano-ledger-alonzo,
cardano-ledger-alonzo-test,
cardano-ledger-babbage,
cardano-ledger-core,
cardano-ledger-pretty,
cardano-ledger-shelley-ma,
Expand Down
12 changes: 7 additions & 5 deletions libs/cardano-ledger-test/src/Test/Cardano/Ledger/Alonzo/Tools.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ import Data.Maybe (fromJust)
import Test.Cardano.Ledger.Alonzo.PlutusScripts (defaultCostModel)
import Test.Cardano.Ledger.Alonzo.Serialisation.Generators ()
import Test.Cardano.Ledger.Examples.TwoPhaseValidation (A, datumExample1, initUTxO, someKeys, testSystemStart, validatingBody, validatingRedeemersEx1)
import Test.Cardano.Ledger.Generic.Fields (PParamsField (..), TxField (..), WitnessesField (..))
import Test.Cardano.Ledger.Generic.Proof (Evidence (Mock), Proof (Alonzo))
import Test.Cardano.Ledger.Generic.Scriptic (always)
import Test.Cardano.Ledger.Generic.Updaters
import Test.Cardano.Ledger.Shelley.Utils (applySTSTest, runShelleyBase)
import Test.Tasty (TestTree, testGroup)
Expand Down Expand Up @@ -116,13 +118,13 @@ exampleTx :: Core.Tx A
exampleTx =
let pf = Alonzo Mock
in newTx
Override
override
pf
[ Body (validatingBody pf),
Witnesses'
[ AddrWits [makeWitnessVKey (hashAnnotated (validatingBody pf)) (someKeys pf)],
ScriptWits [always 3 pf],
DataWits [datumExample1],
WitnessesI
[ AddrWits' [makeWitnessVKey (hashAnnotated (validatingBody pf)) (someKeys pf)],
ScriptWits' [always 3 pf],
DataWits' [datumExample1],
RdmrWits validatingRedeemersEx1
]
]
Expand Down
Loading

0 comments on commit 3edb971

Please sign in to comment.