From 0beed4a5d6cc01071f524bea170236f67cc5a29f Mon Sep 17 00:00:00 2001 From: deepan95dev Date: Tue, 27 Feb 2024 17:21:55 +0530 Subject: [PATCH] lint: golang ci fix --- app/const.go | 30 ---- app/migrations/helpers/constant.go | 5 - app/migrations/helpers/indy_style.go | 25 --- app/migrations/helpers/indy_style_test.go | 17 -- app/migrations/helpers/protobuf.go | 42 ----- app/migrations/helpers/protobuf_test.go | 39 ----- app/migrations/helpers/storage.go | 28 --- app/migrations/helpers/suite_test.go | 13 -- app/migrations/helpers/uuid.go | 26 --- app/migrations/helpers/uuid_test.go | 18 -- app/migrations/migration_did_indy_style.go | 20 --- app/migrations/migration_did_simple.go | 54 ------ app/migrations/migration_did_uuid.go | 20 --- app/migrations/migration_did_version_id.go | 19 -- app/migrations/migration_resource_checksum.go | 30 ---- ...ration_resource_default_alternative_url.go | 27 --- .../migration_resource_indy_style.go | 17 -- app/migrations/migration_resource_simple.go | 57 ------ app/migrations/migration_resource_uuid.go | 20 --- .../migration_resource_version_links.go | 67 -------- app/migrations/migrator.go | 78 --------- make/proto.mk | 4 - tests/upgrade/integration/v1/cli/query_did.go | 37 ---- .../integration/v1/cli/query_resource.go | 37 ---- tests/upgrade/integration/v1/cli/tx_did.go | 162 ------------------ tests/upgrade/integration/v2/loader.go | 12 -- x/did/types/tx_msg_create_diddoc_payload.go | 1 - x/resource/keeper/querier.go | 24 --- .../keeper/querier_collection_resources.go | 1 - 29 files changed, 930 deletions(-) delete mode 100644 app/migrations/helpers/constant.go delete mode 100644 app/migrations/helpers/indy_style.go delete mode 100644 app/migrations/helpers/indy_style_test.go delete mode 100644 app/migrations/helpers/protobuf.go delete mode 100644 app/migrations/helpers/protobuf_test.go delete mode 100644 app/migrations/helpers/storage.go delete mode 100644 app/migrations/helpers/suite_test.go delete mode 100644 app/migrations/helpers/uuid.go delete mode 100644 app/migrations/helpers/uuid_test.go delete mode 100644 app/migrations/migration_did_indy_style.go delete mode 100644 app/migrations/migration_did_simple.go delete mode 100644 app/migrations/migration_did_uuid.go delete mode 100644 app/migrations/migration_did_version_id.go delete mode 100644 app/migrations/migration_resource_checksum.go delete mode 100644 app/migrations/migration_resource_default_alternative_url.go delete mode 100644 app/migrations/migration_resource_indy_style.go delete mode 100644 app/migrations/migration_resource_simple.go delete mode 100644 app/migrations/migration_resource_uuid.go delete mode 100644 app/migrations/migration_resource_version_links.go delete mode 100644 app/migrations/migrator.go delete mode 100644 tests/upgrade/integration/v1/cli/query_did.go delete mode 100644 tests/upgrade/integration/v1/cli/query_resource.go delete mode 100644 tests/upgrade/integration/v1/cli/tx_did.go delete mode 100644 x/resource/keeper/querier.go delete mode 100644 x/resource/keeper/querier_collection_resources.go diff --git a/app/const.go b/app/const.go index c6917dd09..2f624b110 100644 --- a/app/const.go +++ b/app/const.go @@ -6,34 +6,4 @@ const ( // Set ProtocolVersion to app's major version number ProtocolVersion = 2 - - // allowed msg types of ica host - authzMsgExec = "/cosmos.authz.v1beta1.MsgExec" - authzMsgGrant = "/cosmos.authz.v1beta1.MsgGrant" - authzMsgRevoke = "/cosmos.authz.v1beta1.MsgRevoke" - bankMsgSend = "/cosmos.bank.v1beta1.MsgSend" - bankMsgMultiSend = "/cosmos.bank.v1beta1.MsgMultiSend" - distrMsgSetWithdrawAddr = "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress" - distrMsgWithdrawValidatorCommission = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission" - distrMsgFundCommunityPool = "/cosmos.distribution.v1beta1.MsgFundCommunityPool" - distrMsgWithdrawDelegatorReward = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward" - feegrantMsgGrantAllowance = "/cosmos.feegrant.v1beta1.MsgGrantAllowance" - feegrantMsgRevokeAllowance = "/cosmos.feegrant.v1beta1.MsgRevokeAllowance" - govMsgVoteWeighted = "/cosmos.gov.v1beta1.MsgVoteWeighted" - govMsgSubmitProposal = "/cosmos.gov.v1beta1.MsgSubmitProposal" - govMsgDeposit = "/cosmos.gov.v1beta1.MsgDeposit" - govMsgVote = "/cosmos.gov.v1beta1.MsgVote" - stakingMsgEditValidator = "/cosmos.staking.v1beta1.MsgEditValidator" - stakingMsgDelegate = "/cosmos.staking.v1beta1.MsgDelegate" - stakingMsgUndelegate = "/cosmos.staking.v1beta1.MsgUndelegate" - stakingMsgBeginRedelegate = "/cosmos.staking.v1beta1.MsgBeginRedelegate" - stakingMsgCreateValidator = "/cosmos.staking.v1beta1.MsgCreateValidator" - vestingMsgCreateVestingAccount = "/cosmos.vesting.v1beta1.MsgCreateVestingAccount" - ibcMsgTransfer = "/ibc.applications.transfer.v1.MsgTransfer" - - // cheqd namespace - didMsgCreateDidDoc = "/cheqd.did.v2.MsgCreateDidDoc" - didMsgUpdateDidDoc = "/cheqd.did.v2.MsgUpdateDidDoc" - didMsgDeactivateDidDoc = "/cheqd.did.v2.MsgDeactivateDidDoc" - resourceMsgCreateResource = "/cheqd.resource.v2.MsgCreateResource" ) diff --git a/app/migrations/helpers/constant.go b/app/migrations/helpers/constant.go deleted file mode 100644 index dd193b4a9..000000000 --- a/app/migrations/helpers/constant.go +++ /dev/null @@ -1,5 +0,0 @@ -package helpers - -const ( - OldTimeFormat = "2006-01-02 15:04:05.999999999 -0700 MST" -) diff --git a/app/migrations/helpers/indy_style.go b/app/migrations/helpers/indy_style.go deleted file mode 100644 index e1fb743d5..000000000 --- a/app/migrations/helpers/indy_style.go +++ /dev/null @@ -1,25 +0,0 @@ -package helpers - -import ( - "crypto/sha256" - - didutils "github.com/cheqd/cheqd-node/x/did/utils" - "github.com/mr-tron/base58" -) - -func MigrateIndyStyleDid(did string) string { - method, namespace, id := didutils.MustSplitDID(did) - return didutils.JoinDID(method, namespace, MigrateIndyStyleID(id)) -} - -func MigrateIndyStyleID(id string) string { - // If id is UUID it should not be changed - if didutils.IsValidUUID(id) { - return id - } - - // Get Hash from current id to make a 32-symbol string - hash := sha256.Sum256([]byte(id)) - // Indy-style identifier is 16-byte base58 string - return base58.Encode(hash[:16]) -} diff --git a/app/migrations/helpers/indy_style_test.go b/app/migrations/helpers/indy_style_test.go deleted file mode 100644 index facde5668..000000000 --- a/app/migrations/helpers/indy_style_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package helpers - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = DescribeTable( - "Positive/Negative entries for checking indy style identifier compiling", - func(id string, outputStr string) { - Expect(MigrateIndyStyleID(id)).To(Equal(outputStr)) - }, - - Entry("Valid: Real case: 16-symbol id", "zGqsJraNJCojDzG4", "QQHVWEaGae5Jts1quynR6M"), - Entry("Valid: Real case: 32-symbol id", "zGqsJraNJCojDzG4NXY2podMeaESVWvi", "AamcX5kPatrjccMNmuJxSo"), - Entry("Valid: UUID should not be changed", "F62542C3-4F71-4C21-8A2B-AD8DA460A976", "F62542C3-4F71-4C21-8A2B-AD8DA460A976"), -) diff --git a/app/migrations/helpers/protobuf.go b/app/migrations/helpers/protobuf.go deleted file mode 100644 index 8c299c028..000000000 --- a/app/migrations/helpers/protobuf.go +++ /dev/null @@ -1,42 +0,0 @@ -package helpers - -import ( - "time" - - "github.com/multiformats/go-multibase" -) - -func GenerateEd25519VerificationKey2020VerificationMaterial(publicKey string) (string, error) { - encoding, publicKeyBytes, err := multibase.Decode(publicKey) - if encoding != multibase.Base58BTC { - panic("Only Base58BTC encoding is supported") - } - if err != nil { - return "", err - } - publicKeyMultibaseBytes := []byte{0xed, 0x01} - publicKeyMultibaseBytes = append(publicKeyMultibaseBytes, publicKeyBytes...) - - return multibase.Encode(multibase.Base58BTC, publicKeyMultibaseBytes) -} - -func MustParseFromStringTimeToGoTime(timeString string) time.Time { - // If timeString is empty return default nullable time value (0001-01-01 00:00:00 +0000 UTC) - if timeString == "" { - return time.Time{} - } - - t, err := time.Parse(time.RFC3339, timeString) - if err == nil { - return t - } - t, err = time.Parse(time.RFC3339Nano, timeString) - if err == nil { - return t - } - t, err = time.Parse(OldTimeFormat, timeString) - if err != nil { - panic(err) - } - return t -} diff --git a/app/migrations/helpers/protobuf_test.go b/app/migrations/helpers/protobuf_test.go deleted file mode 100644 index 0f002bf99..000000000 --- a/app/migrations/helpers/protobuf_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package helpers - -import ( - "time" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var ( - expecteRFC3339, _ = time.Parse(time.RFC3339, "2022-09-06T16:19:39Z") - expecteRFC3339Nano, _ = time.Parse(time.RFC3339Nano, "2022-09-06T16:19:39.464251406Z") - expectedOldTimeFormat, _ = time.Parse(OldTimeFormat, "2022-02-22 13:32:19.464251406 +0000 UTC") -) - -var _ = DescribeTable( - "Test GenerateEd25519VerificationKey2020VerificationMaterial", - func(v1PubKey string, v2PubKey string) { - key, err := GenerateEd25519VerificationKey2020VerificationMaterial(v1PubKey) - Expect(err).To(BeNil()) - Expect(key).To(Equal(v2PubKey)) - }, - - Entry("Valid: General conversion", "zDw21irq4wBfyTvxAG9L8PQj6b79iyTyzyV6XVj9SfyRR", "z6MksPH4K75WGjASaRnrwiHyEWH6QgRaPMEMfW1TL17TbCCo"), - // Mainnet case - Entry("Valid: Real case", "zF7rhDBfUt9d1gJPjx7s1JXfUY7oVWkYsWCo7fztHtepn", "z6Mkta7joRuvDh7UnoESdgpr9dDUMh5LvdoECDi3WGrJoscA"), -) - -var _ = DescribeTable( - "Test MustParseFromStringTimeToGoTime", - func(inputS string, outputTT time.Time) { - timeTime := MustParseFromStringTimeToGoTime(inputS) - Expect(timeTime).To(Equal(outputTT)) - }, - - Entry("Valid: General conversion RFC3339", "2022-09-06T16:19:39Z", expecteRFC3339), - Entry("Valid: General conversion RFC3339Nano", "2022-09-06T16:19:39.464251406Z", expecteRFC3339Nano), - Entry("Valid: General conversion OldTimeFormat", "2022-02-22 13:32:19.464251406 +0000 UTC", expectedOldTimeFormat), -) diff --git a/app/migrations/helpers/storage.go b/app/migrations/helpers/storage.go deleted file mode 100644 index ab67e9c4c..000000000 --- a/app/migrations/helpers/storage.go +++ /dev/null @@ -1,28 +0,0 @@ -package helpers - -import ( - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type ByteStr []byte - -func ReadAllKeys(store types.KVStore, prefix []byte) []ByteStr { - keys := []ByteStr{} - - iterator := sdk.KVStorePrefixIterator(store, prefix) - defer CloseIteratorOrPanic(iterator) - - for ; iterator.Valid(); iterator.Next() { - keys = append(keys, ByteStr(iterator.Key())) - } - - return keys -} - -func CloseIteratorOrPanic(iterator sdk.Iterator) { - err := iterator.Close() - if err != nil { - panic(err.Error()) - } -} diff --git a/app/migrations/helpers/suite_test.go b/app/migrations/helpers/suite_test.go deleted file mode 100644 index fb0cf40b6..000000000 --- a/app/migrations/helpers/suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package helpers - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestMigration(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "App Module Migration Suite") -} diff --git a/app/migrations/helpers/uuid.go b/app/migrations/helpers/uuid.go deleted file mode 100644 index f39261d66..000000000 --- a/app/migrations/helpers/uuid.go +++ /dev/null @@ -1,26 +0,0 @@ -package helpers - -import ( - didutils "github.com/cheqd/cheqd-node/x/did/utils" - "github.com/google/uuid" -) - -func MigrateUUIDDid(did string) string { - method, namespace, id := didutils.MustSplitDID(did) - return didutils.JoinDID(method, namespace, MigrateUUIDId(id)) -} - -func MigrateUUIDId(id string) string { - // If id is not UUID it should not be changed - if !didutils.IsValidUUID(id) { - return id - } - - // If uuid is already normalized, it should not be changed - if didutils.NormalizeUUID(id) == id { - return id - } - - newID := uuid.NewSHA1(uuid.Nil, []byte(id)) - return didutils.NormalizeUUID(newID.String()) -} diff --git a/app/migrations/helpers/uuid_test.go b/app/migrations/helpers/uuid_test.go deleted file mode 100644 index ba51ba980..000000000 --- a/app/migrations/helpers/uuid_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package helpers - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = DescribeTable( - "Positive/Negative entries for UUID style identifier compiling", - func(id string, outputStr string) { - Expect(MigrateUUIDId(id)).To(Equal(outputStr)) - }, - - Entry("Valid: Lower case UUID should be kept as is", "cc490981-66a0-4d87-84b7-5aad0d699fd0", "cc490981-66a0-4d87-84b7-5aad0d699fd0"), - Entry("Valid: Not uuid should be kept as is", "zGqsJraNJCojDzG4NXY2podMeaESVWvi", "zGqsJraNJCojDzG4NXY2podMeaESVWvi"), - Entry("Valid: Upper case uuid should be hashed", "F62542C3-4F71-4C21-8A2B-AD8DA460A976", "587bf72c-1963-5ec4-a5ac-0ac5fd8521ce"), - Entry("Valid: Mixed case uuid should be hashed", "F62542C3-4F71-4C21-8a2b-ad8da460a976", "3e2bc7a8-873c-5dd4-b713-6c9f96bf6a5f"), -) diff --git a/app/migrations/migration_did_indy_style.go b/app/migrations/migration_did_indy_style.go deleted file mode 100644 index 2e122641f..000000000 --- a/app/migrations/migration_did_indy_style.go +++ /dev/null @@ -1,20 +0,0 @@ -package migrations - -import ( - "github.com/cheqd/cheqd-node/app/migrations/helpers" - didtypes "github.com/cheqd/cheqd-node/x/did/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// This migration should be run after protobuf that's why we use new DidDocWithMetadata -func MigrateDidIndyStyle(sctx sdk.Context, mctx MigrationContext) error { - sctx.Logger().Debug("MigrateDidIndyStyle: Starting migration") - - return MigrateDidSimple(sctx, mctx, func(didDocWithMetadata *didtypes.DidDocWithMetadata) { - sctx.Logger().Debug("MigrateDidIndyStyle: OldDID: " + didDocWithMetadata.DidDoc.Id) - // Migrate from old Indy style DIDs to new Indy DIDs - newDid := helpers.MigrateIndyStyleDid(didDocWithMetadata.DidDoc.Id) - didDocWithMetadata.ReplaceDids(didDocWithMetadata.DidDoc.Id, newDid) - sctx.Logger().Debug("MigrateDidIndyStyle: NewDID: " + didDocWithMetadata.DidDoc.Id) - }) -} diff --git a/app/migrations/migration_did_simple.go b/app/migrations/migration_did_simple.go deleted file mode 100644 index b3542a3f8..000000000 --- a/app/migrations/migration_did_simple.go +++ /dev/null @@ -1,54 +0,0 @@ -package migrations - -import ( - didtypes "github.com/cheqd/cheqd-node/x/did/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func MigrateDidSimple(sctx sdk.Context, mctx MigrationContext, apply func(didDocWithMetadata *didtypes.DidDocWithMetadata)) error { - sctx.Logger().Debug("MigrateDidSimple: Starting migration") - - store := sctx.KVStore(mctx.didStoreKey) - - sctx.Logger().Debug("MigrateDidSimple: Resetting counter") - // Reset counter - mctx.didKeeperNew.SetDidDocCount(&sctx, 0) - - // Collect all DIDDoc versions - var allDidDocVersions []didtypes.DidDocWithMetadata - - sctx.Logger().Debug("MigrateDidSimple: Iterating through all DIDDocs") - mctx.didKeeperNew.IterateAllDidDocVersions(&sctx, func(metadata didtypes.DidDocWithMetadata) bool { - allDidDocVersions = append(allDidDocVersions, metadata) - return true - }) - - // Iterate and migrate did docs. We can use single loop for removing old values, migration - // and writing new values because there is only one version of each diddoc in the store - for _, version := range allDidDocVersions { - // Needed for preventing using variables with the same address - version := version - sctx.Logger().Debug("MigrateDidSimple: Starting migration for DIDDoc: " + version.DidDoc.Id) - - // Remove last version pointer - latestVersionKey := didtypes.GetLatestDidDocVersionKey(version.DidDoc.Id) - store.Delete(latestVersionKey) - - // Remove version - versionKey := didtypes.GetDidDocVersionKey(version.DidDoc.Id, version.Metadata.VersionId) - store.Delete(versionKey) - - // Migrate - apply(&version) - - // Create as a new did doc - err := mctx.didKeeperNew.AddNewDidDocVersion(&sctx, &version) - if err != nil { - return err - } - sctx.Logger().Debug("MigrateDidSimple: Migration finished for DIDDoc: " + version.DidDoc.Id) - } - sctx.Logger().Debug("MigrateDidSimple: Migration finished") - - return nil -} diff --git a/app/migrations/migration_did_uuid.go b/app/migrations/migration_did_uuid.go deleted file mode 100644 index 17a9c75d2..000000000 --- a/app/migrations/migration_did_uuid.go +++ /dev/null @@ -1,20 +0,0 @@ -package migrations - -import ( - "github.com/cheqd/cheqd-node/app/migrations/helpers" - didtypes "github.com/cheqd/cheqd-node/x/did/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// This migration should be run after protobuf that's why we use new DidDocWithMetadata -func MigrateDidUUID(sctx sdk.Context, mctx MigrationContext) error { - sctx.Logger().Debug("MigrateDidUUID: Starting migration") - - return MigrateDidSimple(sctx, mctx, func(didDocWithMetadata *didtypes.DidDocWithMetadata) { - sctx.Logger().Debug("MigrateDidUUID: OldDID: " + didDocWithMetadata.DidDoc.Id) - // Migrate uuid dids, make them normalized - newDid := helpers.MigrateUUIDDid(didDocWithMetadata.DidDoc.Id) - didDocWithMetadata.ReplaceDids(didDocWithMetadata.DidDoc.Id, newDid) - sctx.Logger().Debug("MigrateDidUUID: NewDID: " + didDocWithMetadata.DidDoc.Id) - }) -} diff --git a/app/migrations/migration_did_version_id.go b/app/migrations/migration_did_version_id.go deleted file mode 100644 index 597f34a39..000000000 --- a/app/migrations/migration_did_version_id.go +++ /dev/null @@ -1,19 +0,0 @@ -package migrations - -import ( - didtypes "github.com/cheqd/cheqd-node/x/did/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/google/uuid" -) - -// This migration should be run after protobuf that's why we use new DidDocWithMetadata -func MigrateDidVersionID(sctx sdk.Context, mctx MigrationContext) error { - sctx.Logger().Debug("MigrateDidVersionID: Starting migration") - - return MigrateDidSimple(sctx, mctx, func(didDocWithMetadata *didtypes.DidDocWithMetadata) { - sctx.Logger().Debug("MigrateDidVersionID: DID: " + didDocWithMetadata.DidDoc.Id + " OldVersionId: " + didDocWithMetadata.Metadata.VersionId) - versionID := uuid.NewSHA1(uuid.Nil, []byte(didDocWithMetadata.DidDoc.Id)) - didDocWithMetadata.Metadata.VersionId = versionID.String() - sctx.Logger().Debug("MigrateDidVersionID: DID: " + didDocWithMetadata.DidDoc.Id + " NewVersionId: " + didDocWithMetadata.Metadata.VersionId) - }) -} diff --git a/app/migrations/migration_resource_checksum.go b/app/migrations/migration_resource_checksum.go deleted file mode 100644 index 1d3a5e625..000000000 --- a/app/migrations/migration_resource_checksum.go +++ /dev/null @@ -1,30 +0,0 @@ -package migrations - -import ( - "crypto/sha256" - "encoding/hex" - "fmt" - - resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// Migration because we need to fix the algo for checksum calculation -func MigrateResourceChecksum(sctx sdk.Context, mctx MigrationContext) error { - sctx.Logger().Debug("MigrateResourceChecksum: Starting migration") - - return MigrateResourceSimple(sctx, mctx, func(resource *resourcetypes.ResourceWithMetadata) { - sctx.Logger().Debug(fmt.Sprintf( - "MigrateResourceChecksum: Id: %s CollectionId: %s OldChecksum: %s", - resource.Metadata.Id, - resource.Metadata.CollectionId, - resource.Metadata.Checksum)) - checksum := sha256.Sum256(resource.Resource.Data) - resource.Metadata.Checksum = hex.EncodeToString(checksum[:]) - sctx.Logger().Debug(fmt.Sprintf( - "MigrateResourceChecksum: Id: %s CollectionId: %s NewChecksum: %s", - resource.Metadata.Id, - resource.Metadata.CollectionId, - resource.Metadata.Checksum)) - }) -} diff --git a/app/migrations/migration_resource_default_alternative_url.go b/app/migrations/migration_resource_default_alternative_url.go deleted file mode 100644 index 222f867fc..000000000 --- a/app/migrations/migration_resource_default_alternative_url.go +++ /dev/null @@ -1,27 +0,0 @@ -package migrations - -import ( - "fmt" - - resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func MigrateResourceDefaultAlternativeURL(sctx sdk.Context, mctx MigrationContext) error { - sctx.Logger().Debug("MigrateResourceDefaultAlternativeUrl: Starting migration") - - namespace := mctx.didKeeperNew.GetDidNamespace(&sctx) - - return MigrateResourceSimple(sctx, mctx, func(resource *resourcetypes.ResourceWithMetadata) { - alternativeURI := resourcetypes.AlternativeUri{ - Uri: fmt.Sprintf("did:cheqd:%s:%s/resources/%s", namespace, resource.Metadata.CollectionId, resource.Metadata.Id), - Description: "did-url", - } - resource.Metadata.AlsoKnownAs = append(resource.Metadata.AlsoKnownAs, &alternativeURI) - sctx.Logger().Debug(fmt.Sprintf( - "MigrateResourceDefaultAlternativeUrl: Id: %s CollectionId: %s AlternativeUri: %s", - resource.Metadata.Id, - resource.Metadata.CollectionId, - string(mctx.codec.MustMarshalJSON(&alternativeURI)))) - }) -} diff --git a/app/migrations/migration_resource_indy_style.go b/app/migrations/migration_resource_indy_style.go deleted file mode 100644 index 1fefe27cd..000000000 --- a/app/migrations/migration_resource_indy_style.go +++ /dev/null @@ -1,17 +0,0 @@ -package migrations - -import ( - "github.com/cheqd/cheqd-node/app/migrations/helpers" - resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func MigrateResourceIndyStyle(sctx sdk.Context, mctx MigrationContext) error { - sctx.Logger().Debug("MigrateResourceIndyStyle: Starting migration") - - return MigrateResourceSimple(sctx, mctx, func(resource *resourcetypes.ResourceWithMetadata) { - sctx.Logger().Debug("MigrateResourceIndyStyle: OldCollectionId: " + resource.Metadata.CollectionId) - resource.Metadata.CollectionId = helpers.MigrateIndyStyleID(resource.Metadata.CollectionId) - sctx.Logger().Debug("MigrateResourceIndyStyle: NewCollectionId: " + resource.Metadata.CollectionId) - }) -} diff --git a/app/migrations/migration_resource_simple.go b/app/migrations/migration_resource_simple.go deleted file mode 100644 index 11878cf55..000000000 --- a/app/migrations/migration_resource_simple.go +++ /dev/null @@ -1,57 +0,0 @@ -package migrations - -import ( - resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func MigrateResourceSimple(sctx sdk.Context, mctx MigrationContext, apply func(resourceWithMetadata *resourcetypes.ResourceWithMetadata)) error { - sctx.Logger().Debug("MigrateResourceSimple: Starting migration") - store := sctx.KVStore(mctx.resourceStoreKey) - - sctx.Logger().Debug("MigrateResourceSimple: Removing old counters") - // Reset counter - mctx.didKeeperNew.SetDidDocCount(&sctx, 0) - - // Cache resources - var metadatas []resourcetypes.Metadata - - sctx.Logger().Debug("MigrateResourceSimple: Iterating over all resource metadatas") - mctx.resourceKeeperNew.IterateAllResourceMetadatas(&sctx, func(metadata resourcetypes.Metadata) bool { - metadatas = append(metadatas, metadata) - return true - }) - - // Iterate and migrate resources - for _, metadata := range metadatas { - - sctx.Logger().Debug("MigrateResourceSimple: Starting migration for resource: " + metadata.Id) - // Read value - resourceWithMetadata, err := mctx.resourceKeeperNew.GetResource(&sctx, metadata.CollectionId, metadata.Id) - if err != nil { - return err - } - - // Remove old values - metadataKey := resourcetypes.GetResourceMetadataKey(metadata.CollectionId, metadata.Id) - dataKey := resourcetypes.GetResourceDataKey(metadata.CollectionId, metadata.Id) - - store.Delete(metadataKey) - store.Delete(dataKey) - - // Migrate - apply(&resourceWithMetadata) - - // Write new value - err = mctx.resourceKeeperNew.SetResource(&sctx, &resourceWithMetadata) - if err != nil { - return err - } - - sctx.Logger().Debug("MigrateResourceSimple: Migration finished for resource: " + resourceWithMetadata.Metadata.Id) - } - - sctx.Logger().Debug("MigrateResourceSimple: Migration finished") - - return nil -} diff --git a/app/migrations/migration_resource_uuid.go b/app/migrations/migration_resource_uuid.go deleted file mode 100644 index bb5450a43..000000000 --- a/app/migrations/migration_resource_uuid.go +++ /dev/null @@ -1,20 +0,0 @@ -package migrations - -import ( - "github.com/cheqd/cheqd-node/app/migrations/helpers" - resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func MigrateResourceUUID(sctx sdk.Context, mctx MigrationContext) error { - sctx.Logger().Debug("MigrateResourceUUID: Starting migration") - - return MigrateResourceSimple(sctx, mctx, func(resource *resourcetypes.ResourceWithMetadata) { - sctx.Logger().Debug("MigrateResourceUUID: OldId: " + resource.Metadata.Id) - sctx.Logger().Debug("MigrateResourceUUID: OldCollectionId: " + resource.Metadata.CollectionId) - resource.Metadata.CollectionId = helpers.MigrateUUIDId(resource.Metadata.CollectionId) - resource.Metadata.Id = helpers.MigrateUUIDId(resource.Metadata.Id) - sctx.Logger().Debug("MigrateResourceUUID: NewId: " + resource.Metadata.Id) - sctx.Logger().Debug("MigrateResourceUUID: NewCollectionId: " + resource.Metadata.CollectionId) - }) -} diff --git a/app/migrations/migration_resource_version_links.go b/app/migrations/migration_resource_version_links.go deleted file mode 100644 index f6f832a14..000000000 --- a/app/migrations/migration_resource_version_links.go +++ /dev/null @@ -1,67 +0,0 @@ -package migrations - -import ( - "fmt" - "sort" - - "github.com/cheqd/cheqd-node/app/migrations/helpers" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func MigrateResourceVersionLinks(sctx sdk.Context, mctx MigrationContext) error { - sctx.Logger().Debug("MigrateResourceVersionLinks: Starting migration") - store := sctx.KVStore(mctx.resourceStoreKey) - - sctx.Logger().Debug("MigrateResourceVersionLinks: Reading all resources") - // Read all resources. Yes, this is memory intensive, but it's the simplest way to do it. - // Resource size is limited to 200KB, so this should be fine. - resources, err := mctx.resourceKeeperNew.GetAllResources(&sctx) - if err != nil { - return err - } - - sctx.Logger().Debug("MigrateResourceVersionLinks: Reading all keys and Clean store") - // Clean store - keys := helpers.ReadAllKeys(store, nil) - for _, key := range keys { - store.Delete(key) - } - - // Reset version links - for _, resource := range resources { - sctx.Logger().Debug(fmt.Sprintf( - "MigrateResourceVersionLinks: Id: %s CollectionId: %s OldPreviousVersionId: %s OldNextVersionId: %s", - resource.Metadata.Id, - resource.Metadata.CollectionId, - resource.Metadata.PreviousVersionId, - resource.Metadata.NextVersionId)) - resource.Metadata.PreviousVersionId = "" - resource.Metadata.NextVersionId = "" - } - - sctx.Logger().Debug("MigrateResourceVersionLinks: Sorting resources by date created") - // Sort resources by date created - sort.Slice(resources, func(i, j int) bool { - iCreated := resources[i].Metadata.Created - jCreated := resources[j].Metadata.Created - return iCreated.Before(jCreated) - }) - - sctx.Logger().Debug("MigrateResourceVersionLinks: Setting version links") - // Add resources to store in the same order as they were created. This will create proper links. - for _, resource := range resources { - err = mctx.resourceKeeperNew.AddNewResourceVersion(&sctx, resource) - sctx.Logger().Debug(fmt.Sprintf( - "MigrateResourceVersionLinks: Id: %s CollectionId: %s NewPreviousVersionId: %s NewNextVersionId: %s", - resource.Metadata.Id, - resource.Metadata.CollectionId, - resource.Metadata.PreviousVersionId, - resource.Metadata.NextVersionId)) - if err != nil { - return err - } - } - sctx.Logger().Debug("MigrateResourceVersionLinks: Migration finished") - - return nil -} diff --git a/app/migrations/migrator.go b/app/migrations/migrator.go deleted file mode 100644 index 28565ab41..000000000 --- a/app/migrations/migrator.go +++ /dev/null @@ -1,78 +0,0 @@ -package migrations - -import ( - didkeeper "github.com/cheqd/cheqd-node/x/did/keeper" - // didkeeperv1 "github.com/cheqd/cheqd-node/x/did/keeper/v1" - didtypes "github.com/cheqd/cheqd-node/x/did/types" - resourcekeeper "github.com/cheqd/cheqd-node/x/resource/keeper" - - // resourcekeeperv1 "github.com/cheqd/cheqd-node/x/resource/keeper/v1" - resourcetypes "github.com/cheqd/cheqd-node/x/resource/types" - "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - portkeeper "github.com/cosmos/ibc-go/v7/modules/core/05-port/keeper" - "github.com/cosmos/ibc-go/v7/modules/core/exported" -) - -type Migrator struct { - context MigrationContext - migrations []Migration -} - -func NewMigrator( - context MigrationContext, - migrations []Migration, -) Migrator { - return Migrator{ - context: context, - migrations: migrations, - } -} - -func (m *Migrator) Migrate(ctx sdk.Context) error { - for _, migration := range m.migrations { - err := migration(ctx, m.context) - if err != nil { - return err - } - } - - return nil -} - -type Migration func(sctx sdk.Context, mctx MigrationContext) error - -type MigrationContext struct { - codec codec.Codec - - didStoreKey *storetypes.KVStoreKey - // didKeeperOld *didkeeperv1.Keeper - didKeeperNew *didkeeper.Keeper - - resourceStoreKey *storetypes.KVStoreKey - // resourceKeeperOld *resourcekeeperv1.Keeper - resourceKeeperNew *resourcekeeper.Keeper -} - -func NewMigrationContext( - codec codec.Codec, - didStoreKey *storetypes.KVStoreKey, - didSubspace didtypes.ParamSubspace, - resourceStoreKey *storetypes.KVStoreKey, - resourceSubspace resourcetypes.ParamSubspace, - portKeeper *portkeeper.Keeper, - scopedKeeper exported.ScopedKeeper, -) MigrationContext { - return MigrationContext{ - codec: codec, - - didStoreKey: didStoreKey, - // didKeeperOld: didkeeperv1.NewKeeper(codec, didStoreKey), - didKeeperNew: didkeeper.NewKeeper(codec, didStoreKey, didSubspace), - - resourceStoreKey: resourceStoreKey, - // resourceKeeperOld: resourcekeeperv1.NewKeeper(codec, resourceStoreKey), - resourceKeeperNew: resourcekeeper.NewKeeper(codec, resourceStoreKey, resourceSubspace, portKeeper, scopedKeeper), - } -} diff --git a/make/proto.mk b/make/proto.mk index 42d673596..8e0e2a199 100644 --- a/make/proto.mk +++ b/make/proto.mk @@ -8,10 +8,6 @@ DOCKER := $(shell which docker) containerProtoVer=0.14.0 containerProtoImage=ghcr.io/cosmos/proto-builder:$(containerProtoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) -# containerProtoGen=cheqd-node-proto-gen-$(containerProtoVer) -# containerProtoFmt=cheqd-node-proto-fmt-$(containerProtoVer) -# containerProtoGenSwagger=cheqd-node-proto-gen-swagger-$(containerProtoVer) -# containerPulsar=cheqd-node-pulsar-gen-$(containerProtoVer) proto-all: proto-gen proto-swagger-gen diff --git a/tests/upgrade/integration/v1/cli/query_did.go b/tests/upgrade/integration/v1/cli/query_did.go deleted file mode 100644 index 8ad16d39b..000000000 --- a/tests/upgrade/integration/v1/cli/query_did.go +++ /dev/null @@ -1,37 +0,0 @@ -package cli - -import ( - integrationhelpers "github.com/cheqd/cheqd-node/tests/integration/helpers" - didtypesv2 "github.com/cheqd/cheqd-node/x/did/types" - // didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" -) - -// func QueryDidLegacy(did string, container string) (didtypesv1.QueryGetDidResponse, error) { -// res, err := Query(container, CliBinaryName, "cheqd", "did", did) -// if err != nil { -// return didtypesv1.QueryGetDidResponse{}, err -// } - -// var resp didtypesv1.QueryGetDidResponse -// err = integrationhelpers.Codec.UnmarshalJSON([]byte(res), &resp) -// if err != nil { -// return didtypesv1.QueryGetDidResponse{}, err -// } - -// return resp, nil -// } - -func QueryDid(did string, container string) (didtypesv2.QueryDidDocResponse, error) { - res, err := Query(container, CliBinaryName, "cheqd", "did-document", did) - if err != nil { - return didtypesv2.QueryDidDocResponse{}, err - } - - var resp didtypesv2.QueryDidDocResponse - err = integrationhelpers.Codec.UnmarshalJSON([]byte(res), &resp) - if err != nil { - return didtypesv2.QueryDidDocResponse{}, err - } - - return resp, nil -} diff --git a/tests/upgrade/integration/v1/cli/query_resource.go b/tests/upgrade/integration/v1/cli/query_resource.go deleted file mode 100644 index f17a64a81..000000000 --- a/tests/upgrade/integration/v1/cli/query_resource.go +++ /dev/null @@ -1,37 +0,0 @@ -package cli - -import ( - integrationhelpers "github.com/cheqd/cheqd-node/tests/integration/helpers" - resourcetypesv2 "github.com/cheqd/cheqd-node/x/resource/types" - // resourcetypesv1 "github.com/cheqd/cheqd-node/x/resource/types/v1" -) - -// func QueryResourceLegacy(collectionID string, resourceID string, container string) (resourcetypesv1.QueryResourceResponse, error) { -// res, err := Query(container, CliBinaryName, "resource", "resource", collectionID, resourceID) -// if err != nil { -// return resourcetypesv1.QueryResourceResponse{}, err -// } - -// var resp resourcetypesv1.QueryResourceResponse -// err = integrationhelpers.Codec.UnmarshalJSON([]byte(res), &resp) -// if err != nil { -// return resourcetypesv1.QueryResourceResponse{}, err -// } - -// return resp, nil -// } - -func QueryResource(collectionID string, resourceID string, container string) (resourcetypesv2.QueryResourceResponse, error) { - res, err := Query(container, CliBinaryName, "resource", "specific-resource", collectionID, resourceID) - if err != nil { - return resourcetypesv2.QueryResourceResponse{}, err - } - - var resp resourcetypesv2.QueryResourceResponse - err = integrationhelpers.Codec.UnmarshalJSON([]byte(res), &resp) - if err != nil { - return resourcetypesv2.QueryResourceResponse{}, err - } - - return resp, nil -} diff --git a/tests/upgrade/integration/v1/cli/tx_did.go b/tests/upgrade/integration/v1/cli/tx_did.go deleted file mode 100644 index 02d0957dc..000000000 --- a/tests/upgrade/integration/v1/cli/tx_did.go +++ /dev/null @@ -1,162 +0,0 @@ -package cli - -import ( - "encoding/json" - "fmt" - - integrationhelpers "github.com/cheqd/cheqd-node/tests/integration/helpers" - "github.com/cheqd/cheqd-node/x/did/client/cli" - didtypesv2 "github.com/cheqd/cheqd-node/x/did/types" - - // didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// func CreateDidLegacy(payload didtypesv1.MsgCreateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error) { -// payloadJSON, err := integrationhelpers.Codec.MarshalJSON(&payload) -// if err != nil { -// return sdk.TxResponse{}, err -// } - -// args := []string{string(payloadJSON)} - -// for _, signInput := range signInputs { -// args = append(args, signInput.VerificationMethodID) -// args = append(args, base64.StdEncoding.EncodeToString(signInput.PrivKey)) -// } - -// args = append(args, GasParams...) - -// return Tx(container, CliBinaryName, "cheqd", "create-did", OperatorAccounts[container], args...) -// } - -func CreateDid(payload cli.DIDDocument, signInputs []cli.SignInput, container, versionID, fees string) (sdk.TxResponse, error) { - innerPayloadJSON, err := json.Marshal(&payload) - if err != nil { - return sdk.TxResponse{}, err - } - - outerPayload := cli.PayloadWithSignInputs{ - Payload: innerPayloadJSON, - SignInputs: signInputs, - } - - outerPayloadJSON, err := json.Marshal(&outerPayload) - if err != nil { - return sdk.TxResponse{}, err - } - - out, err := LocalnetExecExec(container, "/bin/bash", "-c", "echo '"+string(outerPayloadJSON)+"' > payload.json") - if err != nil { - return sdk.TxResponse{}, err - } - - fmt.Println(out) - - args := []string{string("payload.json")} - - args = append(args, integrationhelpers.GenerateFees(fees)...) - - if versionID != "" { - args = append(args, versionID) - } - - return Tx(container, CliBinaryName, "cheqd", "create-did", OperatorAccounts[container], args...) -} - -// func UpdateDidLegacy(payload didtypesv1.MsgUpdateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error) { -// payloadJSON, err := integrationhelpers.Codec.MarshalJSON(&payload) -// if err != nil { -// return sdk.TxResponse{}, err -// } - -// args := []string{string(payloadJSON)} - -// for _, signInput := range signInputs { -// args = append(args, signInput.VerificationMethodID) -// args = append(args, base64.StdEncoding.EncodeToString(signInput.PrivKey)) -// } - -// args = append(args, GasParams...) - -// return Tx(container, CliBinaryName, "cheqd", "update-did", OperatorAccounts[container], args...) -// } - -func UpdateDid(payload cli.DIDDocument, signInputs []cli.SignInput, container, versionID, fees string) (sdk.TxResponse, error) { - innerPayloadJSON, err := json.Marshal(&payload) - if err != nil { - return sdk.TxResponse{}, err - } - - outerPayload := cli.PayloadWithSignInputs{ - Payload: innerPayloadJSON, - SignInputs: signInputs, - } - - outerPayloadJSON, err := json.Marshal(&outerPayload) - if err != nil { - return sdk.TxResponse{}, err - } - - out, err := LocalnetExecExec(container, "/bin/bash", "-c", "echo '"+string(outerPayloadJSON)+"' > payload.json") - if err != nil { - return sdk.TxResponse{}, err - } - - fmt.Println(out) - - args := []string{string("payload.json")} - - args = append(args, integrationhelpers.GenerateFees(fees)...) - - if versionID != "" { - args = append(args, versionID) - } - - return Tx(container, CliBinaryName, "cheqd", "update-did", OperatorAccounts[container], args...) -} - -// func DeactivateDidLegacy(payload didtypesv1.MsgDeactivateDidPayload, signInputs []cli.SignInput, container string) (sdk.TxResponse, error) { -// payloadJSON, err := integrationhelpers.Codec.MarshalJSON(&payload) -// if err != nil { -// return sdk.TxResponse{}, err -// } - -// args := []string{string(payloadJSON)} - -// for _, signInput := range signInputs { -// args = append(args, signInput.VerificationMethodID) -// args = append(args, base64.StdEncoding.EncodeToString(signInput.PrivKey)) -// } - -// args = append(args, GasParams...) - -// return Tx(container, CliBinaryName, "cheqd", "deactivate-did", OperatorAccounts[container], args...) -// } - -func DeactivateDid(payload didtypesv2.MsgDeactivateDidDocPayload, signInputs []cli.SignInput, container string, fees string) (sdk.TxResponse, error) { - innerPayloadJSON := integrationhelpers.Codec.MustMarshalJSON(&payload) - - outerPayload := cli.PayloadWithSignInputs{ - Payload: innerPayloadJSON, - SignInputs: signInputs, - } - - outerPayloadJSON, err := json.Marshal(&outerPayload) - if err != nil { - return sdk.TxResponse{}, err - } - - out, err := LocalnetExecExec(container, "/bin/bash", "-c", "echo '"+string(outerPayloadJSON)+"' > payload.json") - if err != nil { - return sdk.TxResponse{}, err - } - - fmt.Println(out) - - args := []string{string("payload.json")} - - args = append(args, integrationhelpers.GenerateFees(fees)...) - - return Tx(container, CliBinaryName, "cheqd", "deactivate-did", OperatorAccounts[container], args...) -} diff --git a/tests/upgrade/integration/v2/loader.go b/tests/upgrade/integration/v2/loader.go index 55dd2ee10..baf584016 100644 --- a/tests/upgrade/integration/v2/loader.go +++ b/tests/upgrade/integration/v2/loader.go @@ -8,9 +8,7 @@ import ( "github.com/cheqd/cheqd-node/x/did/client/cli" didtypesv2 "github.com/cheqd/cheqd-node/x/did/types" - // didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" resourcetypesv2 "github.com/cheqd/cheqd-node/x/resource/types" - // resourcetypesv1 "github.com/cheqd/cheqd-node/x/resource/types/v1" ) func Loader(path string, ptrPayload interface{}) ([]cli.SignInput, error) { @@ -40,12 +38,6 @@ func Loader(path string, ptrPayload interface{}) ([]cli.SignInput, error) { } switch ptrPayload := ptrPayload.(type) { - // case *didtypesv1.MsgCreateDidPayload: - // err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - // case *didtypesv1.MsgUpdateDidPayload: - // err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - // case *didtypesv1.Did: - // err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) case *didtypesv2.MsgCreateDidDocPayload: err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) case *didtypesv2.MsgUpdateDidDocPayload: @@ -58,10 +50,6 @@ func Loader(path string, ptrPayload interface{}) ([]cli.SignInput, error) { err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) case *resourcetypesv2.ResourceWithMetadata: err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - // case *resourcetypesv1.MsgCreateResourcePayload: - // err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) - // case *resourcetypesv1.ResourceHeader: - // err = integrationhelpers.Codec.UnmarshalJSON(tc.Payload, ptrPayload) default: err = json.Unmarshal(tc.Payload, ptrPayload) } diff --git a/x/did/types/tx_msg_create_diddoc_payload.go b/x/did/types/tx_msg_create_diddoc_payload.go index c0eb3291f..f11cea2a5 100644 --- a/x/did/types/tx_msg_create_diddoc_payload.go +++ b/x/did/types/tx_msg_create_diddoc_payload.go @@ -1,7 +1,6 @@ package types import ( - // didtypesv1 "github.com/cheqd/cheqd-node/x/did/types/v1" "github.com/cheqd/cheqd-node/x/did/utils" validation "github.com/go-ozzo/ozzo-validation/v4" ) diff --git a/x/resource/keeper/querier.go b/x/resource/keeper/querier.go deleted file mode 100644 index 66149f2d1..000000000 --- a/x/resource/keeper/querier.go +++ /dev/null @@ -1,24 +0,0 @@ -package keeper - -// func NewQuerier(k Keeper, cheqdKeeper didkeeper.Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { -// return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { -// var ( -// res []byte -// err error -// ) - -// switch path[0] { -// case types.QueryGetResource: -// return resource(ctx, k, cheqdKeeper, legacyQuerierCdc, path[1], path[2]) -// case types.QueryGetResourceMetadata: -// return resourceMetadata(ctx, k, cheqdKeeper, legacyQuerierCdc, path[1], path[2]) -// case types.QueryGetCollectionResources: -// return collectionResources(ctx, k, cheqdKeeper, legacyQuerierCdc, path[1]) - -// default: -// err = sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) -// } - -// return res, err -// } -// } diff --git a/x/resource/keeper/querier_collection_resources.go b/x/resource/keeper/querier_collection_resources.go deleted file mode 100644 index b55569d4a..000000000 --- a/x/resource/keeper/querier_collection_resources.go +++ /dev/null @@ -1 +0,0 @@ -package keeper