From b33d89feb8e9ab56f107d53b426278429f489e17 Mon Sep 17 00:00:00 2001 From: Pablo Lamela Date: Mon, 13 Jan 2025 15:52:25 +0100 Subject: [PATCH] Reupdate to match with API refactoring --- .../src/Cardano/CLI/EraBased/Run/Governance/Actions.hs | 2 +- .../src/Cardano/CLI/EraBased/Run/Governance/DRep.hs | 4 ++-- .../src/Cardano/CLI/EraBased/Run/Governance/Vote.hs | 2 +- .../src/Cardano/CLI/EraBased/Transaction/HashCheck.hs | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs index a476f845bb..0af3f222fb 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs @@ -525,7 +525,7 @@ carryHashChecksWrapper carryHashChecksWrapper checkHash anchor checkType = firstExceptT (GovernanceActionsHashCheckError checkType) $ carryHashChecks - (validateGovActionAnchorData CIP108) + (validateGovActionAnchorData BaseGovActionMetadata) ( PotentiallyCheckedAnchor { pcaMustCheck = checkHash , pcaAnchor = anchor diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs index 86372e0e56..d3a80b0e23 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs @@ -117,7 +117,7 @@ runGovernanceDRepRegistrationCertificateCmd mapM_ ( withExceptT RegistrationDRepHashCheckError - . carryHashChecks (validateGovActionAnchorData CIP119) + . carryHashChecks (validateGovActionAnchorData DrepRegistrationMetadata) ) mAnchor @@ -167,7 +167,7 @@ runGovernanceDRepUpdateCertificateCmd conwayEraOnwardsConstraints w $ do mapM_ ( withExceptT GovernanceDRepHashCheckError - . carryHashChecks (validateGovActionAnchorData CIP119) + . carryHashChecks (validateGovActionAnchorData DrepRegistrationMetadata) ) mAnchor drepCredential <- modifyError GovernanceCmdKeyReadError $ readDRepCredential drepHashSource diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Vote.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Vote.hs index fc0207dfd5..839adc753a 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Vote.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Vote.hs @@ -65,7 +65,7 @@ runGovernanceVoteCreateCmd mapM_ ( withExceptT GovernanceVoteCmdResignationCertHashCheckError - . carryHashChecks (validateGovActionAnchorData CIP108) + . carryHashChecks (validateGovActionAnchorData BaseGovActionMetadata) ) mAnchor' diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Transaction/HashCheck.hs b/cardano-cli/src/Cardano/CLI/EraBased/Transaction/HashCheck.hs index 659e8739ab..46c270cef2 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Transaction/HashCheck.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Transaction/HashCheck.hs @@ -42,7 +42,7 @@ checkCertificateHashes cert = do (return mempty) ( checkAnchorMetadataHash ( if isDRepRegOrUpdateCert cert - then validateGovActionAnchorData Shelley.CIP119 + then validateGovActionAnchorData Shelley.DrepRegistrationMetadata else const $ return () ) ) @@ -57,7 +57,7 @@ checkVotingProcedureHashes eon (Shelley.VotingProcedures (L.VotingProcedures vot forM_ voterMap ( mapM $ \(L.VotingProcedure _ mAnchor) -> - forM_ mAnchor $ checkAnchorMetadataHash $ validateGovActionAnchorData Shelley.CIP108 + forM_ mAnchor $ checkAnchorMetadataHash $ validateGovActionAnchorData Shelley.BaseGovActionMetadata ) -- | Find references to anchor data in proposals and check the hashes are valid @@ -74,10 +74,10 @@ checkProposalHashes ) ) = Shelley.shelleyBasedEraConstraints eon $ do - checkAnchorMetadataHash (validateGovActionAnchorData Shelley.CIP108) anchor + checkAnchorMetadataHash (validateGovActionAnchorData Shelley.BaseGovActionMetadata) anchor maybe (return ()) - (checkAnchorMetadataHash $ validateGovActionAnchorData Shelley.CIP108) + (checkAnchorMetadataHash $ validateGovActionAnchorData Shelley.BaseGovActionMetadata) (getAnchorDataFromGovernanceAction govAction) -- Only the `NewConstitution` governance action contains a checkable hash with a corresponding URL.