Skip to content

Commit fe09bfa

Browse files
committed
WIP - UtxosSpec
1 parent 69ebfb9 commit fe09bfa

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import qualified Test.Cardano.Ledger.Conway.Imp.GovSpec as Gov
5151
import qualified Test.Cardano.Ledger.Conway.Imp.LedgerSpec as Ledger
5252
import qualified Test.Cardano.Ledger.Conway.Imp.RatifySpec as Ratify
5353
import qualified Test.Cardano.Ledger.Conway.Imp.UtxoSpec as Utxo
54-
-- import qualified Test.Cardano.Ledger.Conway.Imp.UtxosSpec as Utxos
54+
import qualified Test.Cardano.Ledger.Conway.Imp.UtxosSpec as Utxos
5555
import Test.Cardano.Ledger.Conway.ImpTest (
5656
ConwayEraImp,
5757
LedgerSpec,
@@ -139,5 +139,4 @@ conwaySpec = do
139139
describe "LEDGER" Ledger.spec
140140
describe "RATIFY" Ratify.spec
141141
describe "UTXO" Utxo.spec
142-
143-
-- describe "UTXOS" Utxos.spec
142+
describe "UTXOS" Utxos.spec

eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/UtxosSpec.hs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ import Test.Cardano.Ledger.Plutus.Examples (
5252
spec ::
5353
forall era.
5454
( ConwayEraImp era
55-
, ShelleyEraTxCert era
5655
, Inject (BabbageContextError era) (ContextError era)
5756
, Inject (ConwayContextError era) (ContextError era)
5857
, InjectRuleFailure "LEDGER" BabbageUtxoPredFailure era
@@ -207,7 +206,6 @@ datumAndReferenceInputsSpec = do
207206
conwayFeaturesPlutusV1V2FailureSpec ::
208207
forall era.
209208
( ConwayEraImp era
210-
, ShelleyEraTxCert era
211209
, InjectRuleFailure "LEDGER" BabbageUtxoPredFailure era
212210
, InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era
213211
, Inject (ConwayContextError era) (ContextError era)
@@ -271,7 +269,7 @@ conwayFeaturesPlutusV1V2FailureSpec = do
271269
describe "ProposalProcedures" $ do
272270
it "V1" $ do
273271
deposit <- getsNES $ nesEsL . curPParamsEpochStateL . ppGovActionDepositL
274-
rewardAccount <- registerRewardAccount
272+
rewardAccount <- registerRewardAccountWithDeposit
275273
let badField = OSet.singleton $ ProposalProcedure deposit rewardAccount InfoAction def
276274
testPlutusV1V2Failure
277275
(hashPlutusScript $ redeemerSameAsDatum SPlutusV1)
@@ -281,7 +279,7 @@ conwayFeaturesPlutusV1V2FailureSpec = do
281279
$ ProposalProceduresFieldNotSupported badField
282280
it "V2" $ do
283281
deposit <- getsNES $ nesEsL . curPParamsEpochStateL . ppGovActionDepositL
284-
rewardAccount <- registerRewardAccount
282+
rewardAccount <- registerRewardAccountWithDeposit
285283
let badField = OSet.singleton $ ProposalProcedure deposit rewardAccount InfoAction def
286284
testPlutusV1V2Failure
287285
(hashPlutusScript $ redeemerSameAsDatum SPlutusV2)
@@ -455,7 +453,6 @@ conwayFeaturesPlutusV1V2FailureSpec = do
455453
govPolicySpec ::
456454
forall era.
457455
( ConwayEraImp era
458-
, ShelleyEraTxCert era
459456
, InjectRuleFailure "LEDGER" ShelleyUtxowPredFailure era
460457
, InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era
461458
) =>
@@ -482,7 +479,7 @@ govPolicySpec = do
482479
submitFailingTx tx [injectFailure $ ScriptWitnessNotValidatingUTXOW [scriptHash]]
483480

484481
impAnn "TreasuryWithdrawals" $ do
485-
rewardAccount <- registerRewardAccount
482+
rewardAccount <- registerRewardAccountWithDeposit
486483
let withdrawals = Map.fromList [(rewardAccount, Coin 1000)]
487484
let govAction = TreasuryWithdrawals withdrawals (SJust scriptHash)
488485
proposal <- mkProposal govAction
@@ -503,7 +500,7 @@ govPolicySpec = do
503500
(Constitution anchor (SJust alwaysSucceedsSh))
504501
dRep
505502
committeeMembers'
506-
rewardAccount <- registerRewardAccount
503+
rewardAccount <- registerRewardAccountWithDeposit
507504

508505
impAnn "ParameterChange" $ do
509506
let pparamsUpdate = def & ppuCommitteeMinSizeL .~ SJust 1
@@ -530,7 +527,7 @@ govPolicySpec = do
530527
submitPhase2Invalid_ tx
531528

532529
impAnn "TreasuryWithdrawals" $ do
533-
rewardAccount <- registerRewardAccount
530+
rewardAccount <- registerRewardAccountWithDeposit
534531
let withdrawals = Map.fromList [(rewardAccount, Coin 1000)]
535532
let govAction = TreasuryWithdrawals withdrawals (SJust alwaysFailsSh)
536533
proposal <- mkProposal govAction
@@ -540,7 +537,6 @@ govPolicySpec = do
540537
costModelsSpec ::
541538
forall era.
542539
( ConwayEraImp era
543-
, ShelleyEraTxCert era
544540
, InjectRuleFailure "LEDGER" ShelleyUtxowPredFailure era
545541
, InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era
546542
) =>
@@ -704,9 +700,7 @@ testPlutusV1V2Failure sh badField lenz errorField = do
704700
)
705701

706702
enactCostModels ::
707-
( ConwayEraImp era
708-
, ShelleyEraTxCert era
709-
) =>
703+
ConwayEraImp era =>
710704
StrictMaybe (GovPurposeId 'PParamUpdatePurpose) ->
711705
CostModels ->
712706
Credential 'DRepRole ->

0 commit comments

Comments
 (0)