Skip to content

Commit 8483f1f

Browse files
committed
Remove AlonzoValidTxUTXOW test module
1 parent afcb7d8 commit 8483f1f

File tree

6 files changed

+10
-236
lines changed

6 files changed

+10
-236
lines changed

libs/cardano-ledger-test/cardano-ledger-test.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ library
8282
Test.Cardano.Ledger.Examples.AlonzoAPI
8383
Test.Cardano.Ledger.Examples.AlonzoBBODY
8484
Test.Cardano.Ledger.Examples.AlonzoCollectInputs
85-
Test.Cardano.Ledger.Examples.AlonzoValidTxUTXOW
8685
Test.Cardano.Ledger.Examples.BabbageFeatures
8786
Test.Cardano.Ledger.Examples.STSTestUtils
8887
Test.Cardano.Ledger.Generic.AggPropTests

libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoAPI.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import Cardano.Ledger.SafeHash (hashAnnotated)
2424
import Cardano.Ledger.Tools (estimateMinFeeTx)
2525
import qualified PlutusLedgerApi.V1 as PV1
2626
import Test.Cardano.Ledger.Core.KeyPair (mkWitnessVKey)
27-
import Test.Cardano.Ledger.Examples.AlonzoValidTxUTXOW (mkSingleRedeemer)
2827
import Test.Cardano.Ledger.Examples.STSTestUtils (
2928
mkGenesisTxIn,
29+
mkSingleRedeemer,
3030
mkTxDats,
3131
someAddr,
3232
someKeys,

libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoBBODY.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ import qualified Data.Sequence.Strict as StrictSeq
7878
import Lens.Micro ((&), (.~))
7979
import qualified PlutusLedgerApi.V1 as PV1
8080
import Test.Cardano.Ledger.Core.KeyPair (KeyPair (..), mkAddr, mkWitnessVKey)
81-
import Test.Cardano.Ledger.Examples.AlonzoValidTxUTXOW (mkSingleRedeemer)
8281
import Test.Cardano.Ledger.Examples.STSTestUtils (
8382
alwaysFailsHash,
8483
alwaysSucceedsHash,
8584
initUTxO,
8685
mkGenesisTxIn,
86+
mkSingleRedeemer,
8787
mkTxDats,
8888
someAddr,
8989
someKeys,

libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/AlonzoValidTxUTXOW.hs

Lines changed: 0 additions & 230 deletions
This file was deleted.

libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/STSTestUtils.hs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module Test.Cardano.Ledger.Examples.STSTestUtils (
1616
initUTxO,
1717
mkGenesisTxIn,
1818
mkTxDats,
19+
mkSingleRedeemer,
1920
someAddr,
2021
someKeys,
2122
someScriptAddr,
@@ -39,11 +40,12 @@ import Cardano.Ledger.Alonzo.Rules (
3940
AlonzoUtxosPredFailure (..),
4041
AlonzoUtxowPredFailure (..),
4142
)
43+
import Cardano.Ledger.Alonzo.Scripts (ExUnits (..))
4244
import Cardano.Ledger.Alonzo.Tx (
4345
AlonzoTx (..),
4446
IsValid (..),
4547
)
46-
import Cardano.Ledger.Alonzo.TxWits (TxDats (..))
48+
import Cardano.Ledger.Alonzo.TxWits (Redeemers, TxDats (..))
4749
import Cardano.Ledger.BHeaderView (BHeaderView (..))
4850
import Cardano.Ledger.Babbage.Rules (BabbageUtxoPredFailure (..))
4951
import Cardano.Ledger.Babbage.Rules as Babbage (BabbageUtxowPredFailure (..))
@@ -80,6 +82,7 @@ import GHC.Stack
8082
import qualified PlutusLedgerApi.V1 as PV1
8183
import Test.Cardano.Ledger.Core.KeyPair (KeyPair (..), mkAddr)
8284
import Test.Cardano.Ledger.Generic.Fields (TxOutField (..))
85+
import Test.Cardano.Ledger.Generic.GenState (PlutusPurposeTag, mkRedeemersFromTags)
8386
import Test.Cardano.Ledger.Generic.PrettyCore (PrettyA (..))
8487
import Test.Cardano.Ledger.Generic.Proof
8588
import Test.Cardano.Ledger.Generic.Scriptic (PostShelley, Scriptic (..), after, matchkey)
@@ -210,6 +213,10 @@ mkGenesisTxIn = TxIn genesisId . mkTxIxPartial
210213
mkTxDats :: Era era => Data era -> TxDats era
211214
mkTxDats d = TxDats $ Map.singleton (hashData d) d
212215

216+
mkSingleRedeemer :: Proof era -> PlutusPurposeTag -> Data era -> Redeemers era
217+
mkSingleRedeemer proof tag datum =
218+
mkRedeemersFromTags proof [((tag, 0), (datum, ExUnits 5000 5000))]
219+
213220
trustMeP :: Proof era -> Bool -> Tx era -> Tx era
214221
trustMeP Alonzo iv' (AlonzoTx b w _ m) = AlonzoTx b w (IsValid iv') m
215222
trustMeP Babbage iv' (AlonzoTx b w _ m) = AlonzoTx b w (IsValid iv') m

libs/cardano-ledger-test/test/Tests.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import Test.Cardano.Ledger.Constrained.Trace.Tests (conwayTrace, conwayTxwithDRe
2020
import qualified Test.Cardano.Ledger.Examples.AlonzoAPI as AlonzoAPI (tests)
2121
import qualified Test.Cardano.Ledger.Examples.AlonzoBBODY as AlonzoBBODY (tests)
2222
import qualified Test.Cardano.Ledger.Examples.AlonzoCollectInputs as AlonzoCollectInputs (tests)
23-
import qualified Test.Cardano.Ledger.Examples.AlonzoValidTxUTXOW as AlonzoValidTxUTXOW (tests)
2423
import Test.Cardano.Ledger.Examples.BabbageFeatures (babbageFeatures)
2524
import Test.Cardano.Ledger.Generic.AggPropTests (aggTests, depositTests)
2625
import qualified Test.Cardano.Ledger.Generic.PrettyTest as Pretty
@@ -53,7 +52,6 @@ defaultTests =
5352
, testGroup
5453
"STS Tests"
5554
[ babbageFeatures
56-
, AlonzoValidTxUTXOW.tests
5755
, AlonzoBBODY.tests
5856
, AlonzoAPI.tests
5957
, AlonzoCollectInputs.tests

0 commit comments

Comments
 (0)