From 1c4411361750e616804e81fde3e33192c8545315 Mon Sep 17 00:00:00 2001 From: Pablo Lamela Date: Mon, 13 Jan 2025 13:29:30 +0100 Subject: [PATCH] Reorganise files --- cardano-api/cardano-api.cabal | 4 ++-- cardano-api/internal/Cardano/Api/Governance/Actions/CIP119.hs | 2 +- .../Governance/{Actions/CIP108.hs => Metadata/GovAction.hs} | 4 ++-- .../{Actions/MetadataValidation.hs => Metadata/Validation.hs} | 2 +- cardano-api/src/Cardano/Api.hs | 4 ++-- .../cardano-api-test/Test/Cardano/Api/GovAnchorValidation.hs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) rename cardano-api/internal/Cardano/Api/Governance/{Actions/CIP108.hs => Metadata/GovAction.hs} (96%) rename cardano-api/internal/Cardano/Api/Governance/{Actions/MetadataValidation.hs => Metadata/Validation.hs} (84%) diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index 2fa264e14e..ebcd1a6bc5 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -91,12 +91,12 @@ library internal Cardano.Api.GeneralParsers Cardano.Api.Genesis Cardano.Api.GenesisParameters - Cardano.Api.Governance.Actions.CIP108 Cardano.Api.Governance.Actions.CIP119 - Cardano.Api.Governance.Actions.MetadataValidation Cardano.Api.Governance.Actions.ProposalProcedure Cardano.Api.Governance.Actions.VotingProcedure Cardano.Api.Governance.Metadata.DrepRegistration + Cardano.Api.Governance.Metadata.GovAction + Cardano.Api.Governance.Metadata.Validation Cardano.Api.Governance.Poll Cardano.Api.HasTypeProxy Cardano.Api.Hash diff --git a/cardano-api/internal/Cardano/Api/Governance/Actions/CIP119.hs b/cardano-api/internal/Cardano/Api/Governance/Actions/CIP119.hs index ff7780d0a6..6bb085952d 100644 --- a/cardano-api/internal/Cardano/Api/Governance/Actions/CIP119.hs +++ b/cardano-api/internal/Cardano/Api/Governance/Actions/CIP119.hs @@ -7,7 +7,7 @@ module Cardano.Api.Governance.Actions.CIP119 (CIP119 (..)) where import Cardano.Api.GeneralParsers (textWithMaxLength) -import Cardano.Api.Governance.Actions.MetadataValidation (GovActionMetadata) +import Cardano.Api.Governance.Metadata.Validation (GovActionMetadata) import Data.Aeson (FromJSON, withObject, (.:), (.:?)) import qualified Data.Aeson as Aeson diff --git a/cardano-api/internal/Cardano/Api/Governance/Actions/CIP108.hs b/cardano-api/internal/Cardano/Api/Governance/Metadata/GovAction.hs similarity index 96% rename from cardano-api/internal/Cardano/Api/Governance/Actions/CIP108.hs rename to cardano-api/internal/Cardano/Api/Governance/Metadata/GovAction.hs index d00d1137ff..cc857b5142 100644 --- a/cardano-api/internal/Cardano/Api/Governance/Actions/CIP108.hs +++ b/cardano-api/internal/Cardano/Api/Governance/Metadata/GovAction.hs @@ -4,10 +4,10 @@ {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TypeFamilies #-} -module Cardano.Api.Governance.Actions.CIP108 (CIP108 (..)) where +module Cardano.Api.Governance.Metadata.GovAction (CIP108 (..)) where import Cardano.Api.GeneralParsers (textWithMaxLength) -import Cardano.Api.Governance.Actions.MetadataValidation (GovActionMetadata) +import Cardano.Api.Governance.Metadata.Validation (GovActionMetadata) import Data.Aeson (FromJSON, withObject, withText, (.:), (.:?)) import qualified Data.Aeson as Aeson diff --git a/cardano-api/internal/Cardano/Api/Governance/Actions/MetadataValidation.hs b/cardano-api/internal/Cardano/Api/Governance/Metadata/Validation.hs similarity index 84% rename from cardano-api/internal/Cardano/Api/Governance/Actions/MetadataValidation.hs rename to cardano-api/internal/Cardano/Api/Governance/Metadata/Validation.hs index d1b53cc5ad..3c2def4251 100644 --- a/cardano-api/internal/Cardano/Api/Governance/Actions/MetadataValidation.hs +++ b/cardano-api/internal/Cardano/Api/Governance/Metadata/Validation.hs @@ -2,7 +2,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} -module Cardano.Api.Governance.Actions.MetadataValidation (GovActionMetadata, validateGovActionAnchorData) where +module Cardano.Api.Governance.Metadata.Validation (GovActionMetadata, validateGovActionAnchorData) where import Data.Aeson (FromJSON, eitherDecodeStrict) import Data.ByteString (ByteString) diff --git a/cardano-api/src/Cardano/Api.hs b/cardano-api/src/Cardano/Api.hs index 22983495cf..44cf3a2da0 100644 --- a/cardano-api/src/Cardano/Api.hs +++ b/cardano-api/src/Cardano/Api.hs @@ -1092,10 +1092,10 @@ import Cardano.Api.Feature import Cardano.Api.Fees import Cardano.Api.Genesis import Cardano.Api.GenesisParameters -import Cardano.Api.Governance.Actions.CIP108 (CIP108 (..)) import Cardano.Api.Governance.Actions.CIP119 (CIP119 (..)) -import Cardano.Api.Governance.Actions.MetadataValidation import Cardano.Api.Governance.Actions.ProposalProcedure +import Cardano.Api.Governance.Metadata.GovAction (CIP108 (..)) +import Cardano.Api.Governance.Metadata.Validation import Cardano.Api.Hash import Cardano.Api.HasTypeProxy import Cardano.Api.InMode diff --git a/cardano-api/test/cardano-api-test/Test/Cardano/Api/GovAnchorValidation.hs b/cardano-api/test/cardano-api-test/Test/Cardano/Api/GovAnchorValidation.hs index 90c512fe76..b73f07be3c 100644 --- a/cardano-api/test/cardano-api-test/Test/Cardano/Api/GovAnchorValidation.hs +++ b/cardano-api/test/cardano-api-test/Test/Cardano/Api/GovAnchorValidation.hs @@ -9,7 +9,7 @@ where import Cardano.Api (CIP108 (..), CIP119 (..), File (File), FileDirection (In), FileError, readByteStringFile) import Cardano.Api.DRepMetadata (DRepMetadata (..)) -import Cardano.Api.Governance.Actions.MetadataValidation (validateGovActionAnchorData) +import Cardano.Api.Governance.Metadata.Validation (validateGovActionAnchorData) import Data.ByteString (ByteString) import Data.Monoid (Any)