diff --git a/CHANGELOG.md b/CHANGELOG.md index 25416350ba..8c9b5d4d2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Renamed `PollData` and `PollAnswer` to `Poll` and `ProvidedAnswer` ([#536]((https://github.com/desmos-labs/desmos/issues/536))) - Enabled snapshot by default ([#529](https://github.com/desmos-labs/desmos/pull/529)) +## Version 0.17.3 +- Removed the version check when creating an IBC channel + ## Version 0.17.2 - Renamed x/profiles messages response Proto definitions to match others @@ -39,13 +42,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Added the logging of some interesting operations ([#483](https://github.com/desmos-labs/desmos/issues/483)) - Updated Cosmos SDK to `v0.42.6` ([#509](https://github.com/desmos-labs/desmos/issues/509)) -### Messages +#### Messages - Renamed the following messages - `MsgCancelDTagTransfer` -> `MsgCancelDTagTransferRequest` - `MsgAcceptDTagTransfer` -> `MsgAcceptDTagTransferRequest` - `MsgRefuseDTagTransfer` -> `MsgRefuseDTagTransferRequest` -### CLI +#### CLI - Renamed the following CLI commands - `profiles tx request-dtag` -> `profiles tx request-dtag-transfer` - `profiles tx cancel-dtag-transfer` -> `profiles tx cancel-dtag-transfer-request` @@ -54,8 +57,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - `profiles query dtag-requests` -> `profiles query incoming-dtag-transfer-requests` - `profiles query blocklist` -> `profiles query blocks` -# Version 0.16.3 -## Changes +## Version 0.16.3 +### Changes - Renamed all `OptionalData` into `AdditionalAttributes` and `OptionalDataEntry` into `Attribute` ([#422](https://github.com/desmos-labs/desmos/issues/422)) - Capped the `OptionalDataEntry.Key` length ([#393](https://github.com/desmos-labs/desmos/issues/393)]) - Removed `--allows-comments` in favor of `--disable-comments` ([#386](https://github.com/desmos-labs/desmos/issues/386)) @@ -64,85 +67,85 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Updated Cosmos to `v0.42.5` ([#433](https://github.com/desmos-labs/desmos/issues/433)) - Merged `x/reports` inside `x/posts` ([#429](https://github.com/desmos-labs/desmos/issues/429)) -## Bug fixes +### Bug fixes - Added missing `CommunitySpendProposal` handler ([#421](https://github.com/desmos-labs/desmos/issues/421)) -# Version 0.16.2 -## Changes +## Version 0.16.2 +### Changes - Renamed profile's `moniker` into `nickname` ([#413](https://github.com/desmos-labs/desmos/issues/413)) -## Bug fixes +### Bug fixes - Fixed failing transactions performed by a `Profile` continuously depleting funds ([\#416](https://github.com/desmos-labs/desmos/issues/416)) - Fixed vesting accounts not working properly ([\#384](https://github.com/desmos-labs/desmos/issues/384)) -# Version 0.16.1 -## Changes +## Version 0.16.1 +### Changes - Added the ability to query all accounts ([cosmos#8522](https://github.com/cosmos/cosmos-sdk/pull/8522)) - Refactored relationships related CLI commands to make them less implicits ([#408](https://github.com/desmos-labs/desmos/issues/408)) - Reintroduced deleted relationships CLI commands' tests ([#409](https://github.com/desmos-labs/desmos/issues/409)) -## Bug fixes +### Bug fixes - Removed duplicated `vesting` CLI commands - Fixed the `--recover` flag of the `init` command not working ([cosmos#9201](https://github.com/cosmos/cosmos-sdk/pull/9201)) - Fixed `x/mint` queries not working ([\#403](https://github.com/desmos-labs/desmos/issues/403)) - Fixed the not-working `delete` CLI command for relationships inside `x/profiles` ([#407](https://github.com/desmos-labs/desmos/issues/407)) -# Version 0.16.0 -## Changes +## Version 0.16.0 +### Changes - Updated Cosmos to `v0.42.4` - Disabled all the modules, except the `x/profiles` module - Changed how data are stored inside the `x/profiles` modules ([\#261](https://github.com/desmos-labs/desmos/issues/261)) - Enabled the `x/ibc` transfer module ([\#382](https://github.com/desmos-labs/desmos/issues/382)) -# Version 0.15.5 +## Version 0.15.5 - Updated Cosmos to `v0.42.3` ([\#387](https://github.com/desmos-labs/desmos/issues/387)) -# Version 0.15.4 -## Changes +## Version 0.15.4 +### Changes - Updated Cosmos to `v0.42.1` ([\#378](https://github.com/desmos-labs/desmos/issues/378)) -## Bug fixes +### Bug fixes - Fixed a security vulnerability identified in the `app.go` file. -# Version 0.15.3 -## Bug fixes +## Version 0.15.3 +### Bug fixes - Added missing gRPC gateways ([\#370](https://github.com/desmos-labs/desmos/issues/370)) -# Version 0.15.2 -## Changes +## Version 0.15.2 +### Changes - Updated Cosmos to v0.41.3 ([\#359](https://github.com/desmos-labs/desmos/issues/359)) - Added Tendermint LD flag ([\#360](https://github.com/desmos-labs/desmos/issues/360)) - Added ARM-32 support -# Version 0.15.1 -## Changes +## Version 0.15.1 +### Changes - Replaced `gogoproto.jsontag` usages to be coherent with Proto field names - Removed usage of `json` inside genesis-related methods ([\#348](https://github.com/desmos-labs/desmos/issues/348)) - Updated Cosmos to `v0.40.1` ([\#345](https://github.com/desmos-labs/desmos/issues/345)) -## Bug fixes +### Bug fixes - Fixed some buys inside the `verify-genesis` command that did not detect some errors -# Version 0.15.0 -## Changes +## Version 0.15.0 +### Changes - Updated Cosmos to v0.40.0 ([\#313](https://github.com/desmos-labs/desmos/issues/313)) - Updated validators documentation ([\#333](https://github.com/desmos-labs/desmos/issues/333)) - Renamed binary from `desmosd` to `desmos` ([\#342](https://github.com/desmos-labs/desmos/issues/342)) -# Version 0.14.0 -## Changes +## Version 0.14.0 +### Changes - Implemented blocked users checks ([\#298](https://github.com/desmos-labs/desmos/issues/298)) - Implemented the possibility to set a minimum messages fee ([\#230](https://github.com/desmos-labs/desmos/issues/230)) -## Bug fixes +### Bug fixes - Fixed height not working in REST queries ([\#299](https://github.com/desmos-labs/desmos/issues/299)) -# Version 0.13.0 -## Changes +## Version 0.13.0 +### Changes - Removed the relationship event attribute key prefix ([\#300](https://github.com/desmos-labs/desmos/issues/300)) - Removed the user_block event attribute key prefix ([\#291](https://github.com/desmos-labs/desmos/issues/291)) - Changed posts' optional data representation ([\#272](https://github.com/desmos-labs/desmos/issues/272)) @@ -150,40 +153,40 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). , [\#296](https://github.com/desmos-labs/desmos/issues/296)) - Implemented the possibility to refuse and cancel DTag requests from both receiver and sender side ([\#297](https://github.com/desmos-labs/desmos/issues/297)) -## Bug fixes +### Bug fixes - Fixed the possibility of requesting a transfer of an empty DTag ([\#292](https://github.com/desmos-labs/desmos/issues/292)) - Fixed the impossibility of querying all the relationships on chain ([\#306](https://github.com/desmos-labs/desmos/issues/306)) -# Version 0.12.3 -## Changes +## Version 0.12.3 +### Changes - Renamed the `accept-dtag-transfer` CLI command to remove the `.md` suffix ([\#282](https://github.com/desmos-labs/desmos/issues/282)) -# Version 0.12.2 -## Changes +## Version 0.12.2 +### Changes - Added the migration command from v0.10.0 to v0.12.0 -# Version 0.12.1 -## Bug fixes +## Version 0.12.1 +### Bug fixes - Fixed an upgrade migration bug -# Version 0.12.0 -## Changes +## Version 0.12.0 +### Changes - Changed `relationships`' implementation adding a `subspace` field to identify in which app users make relationships ([\#266](https://github.com/desmos-labs/desmos/issues/266)) - Implemented the possibility to (un)block a specific user ([\#169](https://github.com/desmos-labs/desmos/issues/169)) - Allow users to edit their DTag ([\#226](https://github.com/desmos-labs/desmos/issues/226)) - Allow users to give their DTag away ([\#225](https://github.com/desmos-labs/desmos/issues/225)) -# Version 0.11.0 -## Changes +## Version 0.11.0 +### Changes - Allowed the possibility to edit a post's attachments and poll data using the `MsgEditPost` type ([\#202](https://github.com/desmos-labs/desmos/issues/202)) - Removed the `Open` field from within the `PollData` object. Now you should rely on the `CloseDate` field to determine whether a poll is close or open. ([\#252](https://github.com/desmos-labs/desmos/issues/252)) - Implemented users `Relationships` ([\#168](https://github.com/desmos-labs/desmos/issues/168)) -# Version 0.10.0 -## Changes +## Version 0.10.0 +### Changes - Changed application errors to make them more clear ([\#237](https://github.com/desmos-labs/desmos/issues/237)) - Implemented the `x/upgrade` module ([\#174](https://github.com/desmos-labs/desmos/issues/174)) - Removed user specified post's `CreationDate` and `LastEdited` in favor of block time usage ([\#215](https://github.com/desmos-labs/desmos/issues/215)) @@ -191,31 +194,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Renamed `PostMedia` into `Attachment` to fix incorrect singular and plural forms of variables ([\#203](https://github.com/desmos-labs/desmos/issues/203)) - Updated Cosmos to `v.0.39.1` ([\#257](https://github.com/desmos-labs/desmos/issues/257)) -## Bug fixes +### Bug fixes - Fixed a bug that caused valid URIs to be considered invalid ([\#233](https://github.com/desmos-labs/desmos/issues/233)) - Fixed a bug that didn't allow querying `x/profile` parameters from REST API ([\#244](https://github.com/desmos-labs/desmos/issues/244)) -# Version 0.9.0 -## Changes +## Version 0.9.0 +### Changes - Removed the JSON-style `String` methods where it was possible, changed the others to not rely on JSON for `String` representation ([\#199](https://github.com/desmos-labs/desmos/issues/199)) - Replaced `SetupTestInput()` with testify test suite ([\#198](https://github.com/desmos-labs/desmos/issues/198)) - Removed all the `internal` folders ([\#197](https://github.com/desmos-labs/desmos/issues/197)) -# Version 0.8.2 -## Changes +## Version 0.8.2 +### Changes - Updated Cosmos to v0.38.5 -# Version 0.8.1 -## Changes +## Version 0.8.1 +### Changes - Added the removal of invalid registered reactions during `v0.8.0` migration -## Bug fixes +### Bug fixes - Fixed a bug inside the post validation method that did not consider poll-only posts valid - Added the registration of new modules when migrating towards `v0.8.0` -# Version 0.8.0 -## Changes +## Version 0.8.0 +### Changes - Changed the data stored inside the profile objects ([\#193](https://github.com/desmos-labs/desmos/issues/193)) - Renamed the `profile_cov` field of `MsgSaveProfile` to `cover_picture` - Renamed the `profile_pic` field of `MsgSaveProfile` to `profile_picture` @@ -226,59 +229,59 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Changed the way times are serialized inside event attributes ([\#211](https://github.com/desmos-labs/desmos/issues/211)) - Updated Cosmos to `v0.38.5` -## Bug fixes +### Bug fixes - Fixed a bug inside the `Equals` method of the `Pictures` object - Changed the `tx profiles save` flags names (fixes #207) -# Version 0.7.0 -## Changes +## Version 0.7.0 +### Changes - Implemented benchmarks tests ([\#126](https://github.com/desmos-labs/desmos/issues/126)) - Implemented posts' reports ([\#50](https://github.com/desmos-labs/desmos/issues/50)) - Re-introduced the on-chain government module ([\#173](https://github.com/desmos-labs/desmos/issues/173)) - Fixed reactions registration bug ([\#187](https://github.com/desmos-labs/desmos/issues/187)) -# Version 0.6.3 -## Changes +## Version 0.6.3 +### Changes - Restored evidence module ([\#189](https://github.com/desmos-labs/desmos/issues/189)) -# Version 0.6.2 -## Changes +## Version 0.6.2 +### Changes - Updated Cosmos to v0.38.4 ([\#177](https://github.com/desmos-labs/desmos/issues/177)) -# Version 0.6.1 -## Changes +## Version 0.6.1 +### Changes - Updated the way with which the profiles are created and edited ([\#170](https://github.com/desmos-labs/desmos/issues/170)) -## Bug fixes +### Bug fixes - Fixed the on-chain events usage ([\#175](https://github.com/desmos-labs/desmos/issues/175)) -# Version 0.6.0 -## Changes +## Version 0.6.0 +### Changes - Added the option to use [RocksDB](https://github.com/facebook/rocksdb) as both Tendermint and/or Cosmos database backend ([\#111](https://github.com/desmos-labs/desmos/issues/111)) - Implemented tags in post medias ([\#118](https://github.com/desmos-labs/desmos/issues/118)) - Edited PostReaction struct to allow a better integration with middle layer applications ([\#157](https://github.com/desmos-labs/desmos/issues/157)) -## Bug fixes +### Bug fixes - Fixed the account query CLI command ([\#155](https://github.com/desmos-labs/desmos/issues/155)) - Fixed the profile deletion CLI command ([\#166](https://github.com/desmos-labs/desmos/issues/166)) -# Version 0.5.3 -## Changes +## Version 0.5.3 +### Changes - Updated Cosmos to [v0.38.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.38.5) -# Version 0.5.2 -## Bug fixes +## Version 0.5.2 +### Bug fixes - Fixed a bug that caused the state export to fail due to [cosmos/cosmos-sdk#6280](https://github.com/cosmos/cosmos-sdk/issues/6280) -# Version 0.5.1 -## Bug fixes +## Version 0.5.1 +### Bug fixes - Fixed a bug that caused users to be unable to add more than one reaction to the same post -# Version 0.5.0 -## Changes +## Version 0.5.0 +### Changes - Implemented invariants for posts and profile modules ([\#90](https://github.com/desmos-labs/desmos/issues/90)) - Added YAML support for types ([\#124](https://github.com/desmos-labs/desmos/issues/124)) - Improved reactions events ([\#144](https://github.com/desmos-labs/desmos/issues/144)) @@ -286,8 +289,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Improved reaction registration error message ([\#147](https://github.com/desmos-labs/desmos/issues/147)) - Allow for empty message posts when they contain a poll ([\#148](https://github.com/desmos-labs/desmos/issues/148)) -# Version 0.4.0 -## Changes +## Version 0.4.0 +### Changes - Improved the generation of post ids ([\#131](https://github.com/desmos-labs/desmos/issues/131)) - Improved `alias.go` files ([\#103](https://github.com/desmos-labs/desmos/issues/103)) - Added the support for posting empty-message posts with medias ([\#110](https://github.com/desmos-labs/desmos/issues/110)) @@ -298,18 +301,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Improved the storage usage to reduce gas usage ([\#125](https://github.com/desmos-labs/desmos/issues/125)) - Removed the `gov` and `upgrade` modules as they are currently not used ([\#142](https://github.com/desmos-labs/desmos/issues/142)) -## Bug fixes +### Bug fixes - Fixed a bug inside the migration procedure of the `magpie` module ([\#106](https://github.com/desmos-labs/desmos/issues/106)) -# Version 0.3.2 +## Version 0.3.2 - Fixed a bug that should allow to properly export the state of the chain -# Version 0.3.1 +## Version 0.3.1 - Updated Cosmos SDK to `v0.38.3` and Tendermint to `v0.33.3` to solve security issues. -# Version 0.3.0 -## Changes +## Version 0.3.0 +### Changes - Implemented the support for media posts ([\#36](https://github.com/desmos-labs/desmos/issues/36)) - Implemented the support for poll posts ([\#14](https://github.com/desmos-labs/desmos/issues/14)) - Added the support for posts sorting ([\#78](https://github.com/desmos-labs/desmos/issues/78)) @@ -317,19 +320,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Posts now only supports `subspace` values in form of hex-encoded SHA-256 hashes ([\#82](https://github.com/desmos-labs/desmos/issues/82)) - Bumped Cosmos to `v0.38.0` ([\#10](https://github.com/desmos-labs/desmos/issues/10)) -## Bug fixes +### Bug fixes - Fixed the posts REST endpoint not working properly ([\#77](https://github.com/desmos-labs/desmos/issues/77)) - Fixed a bug that allowed to create multiple posts with the exact same contents ([\#92](https://github.com/desmos-labs/desmos/issues/92)) -## Migration +### Migration In order to migrate the chain state from version `v0.2.0` to `v0.3.0`, please run the following command: ```bash desmos migrate v0.3.0 ``` -# Version 0.2.0 -## Changes +## Version 0.2.0 +### Changes - Implemented the support for arbitrary data inside a post ([\#52](https://github.com/desmos-labs/desmos/issues/52) , [\#66](https://github.com/desmos-labs/desmos/issues/66)) - Implemented the support for posts reactions ([\#47](https://github.com/desmos-labs/desmos/issues/47)) @@ -338,27 +341,27 @@ desmos migrate v0.3.0 - Replaced the block height with timestamps inside posts' creation dates and edit dates ([\#62](https://github.com/desmos-labs/desmos/issues/62)) - Capped the post message length to 500 characters ([\#67](https://github.com/desmos-labs/desmos/issues/67)) -## Migration +### Migration In order to migrate the chain state from version `v0.1.0` or `v0.1.1` to `v0.2.0`, please run the following command: ```bash desmos migrate v0.2.0 ``` -# Version 0.1.1 -## Bug fixes +## Version 0.1.1 +### Bug fixes - Fixed double children IDs insertion upon post edit ([\#63](https://github.com/desmos-labs/desmos/issues/63)) - Fixed a bug that made impossible to create a new post upon a post edit due to the `Post with ID X already exists` ([\#64](https://github.com/desmos-labs/desmos/issues/64)) -# Version 0.1.0 -## Changes +## Version 0.1.0 +### Changes - Create a session to associate an external chain address to a Desmos address. - Create a post using a `MsgCreatePost` and providing a message. You can also decide whether other users can comment on such post or not. - Like a post using a `MsgLikePost` and specifying a post id. - Unlike a post using a `MsgUnlikePost` and specifying a post id. -## Notes +### Notes - When generating Desmos accounts, the path to use is `m'/852'/0'/0/0` - The stake token denomination is `desmos` diff --git a/testutil/ibctesting/chain.go b/testutil/ibctesting/chain.go index f38e0e946f..0c858854a2 100644 --- a/testutil/ibctesting/chain.go +++ b/testutil/ibctesting/chain.go @@ -42,39 +42,18 @@ import ( ) const ( - // Default params constants used to create a TM client - TrustingPeriod time.Duration = time.Hour * 24 * 7 * 2 - UnbondingPeriod time.Duration = time.Hour * 24 * 7 * 3 - MaxClockDrift time.Duration = time.Second * 10 - DefaultDelayPeriod uint64 = 0 + TrustingPeriod = time.Hour * 24 * 7 * 2 + UnbondingPeriod = time.Hour * 24 * 7 * 3 + MaxClockDrift = time.Second * 10 - DefaultChannelVersion = profilestypes.IBCVersion - InvalidID = "IDisInvalid" - - ConnectionIDPrefix = "conn" - ChannelIDPrefix = "chan" - - IBCProfilesPort = profilestypes.IBCPortID - MockPort = "mock" - - // used for testing UpdateClientProposal - Title = "title" - Description = "description" + DefaultDelayPeriod uint64 = 0 ) var ( DefaultOpenInitVersion *connectiontypes.Version - - // Default params variables used to create a TM client - DefaultTrustLevel ibctmtypes.Fraction = ibctmtypes.DefaultTrustLevel - TestHash = tmhash.Sum([]byte("TESTING HASH")) - - UpgradePath = []string{"upgrade", "upgradedIBCState"} - - ConnectionVersion = connectiontypes.ExportedVersionsToProto(connectiontypes.GetCompatibleVersions())[0] - - MockAcknowledgement = mock.MockAcknowledgement - MockCommitment = mock.MockCommitment + DefaultTrustLevel = ibctmtypes.DefaultTrustLevel + UpgradePath = []string{"upgrade", "upgradedIBCState"} + ConnectionVersion = connectiontypes.ExportedVersionsToProto(connectiontypes.GetCompatibleVersions())[0] ) // TestChain is a testing struct that wraps a simapp with the last TM Header, the current ABCI @@ -390,7 +369,7 @@ func (chain *TestChain) ConstructNextTestConnection(clientID, counterpartyClient return &TestConnection{ ID: connectionID, ClientID: clientID, - NextChannelVersion: DefaultChannelVersion, + NextChannelVersion: "ics-20", CounterpartyClientID: counterpartyClientID, } } @@ -717,7 +696,7 @@ func (chain *TestChain) CreatePortCapability(portID string) { require.NoError(chain.t, err) switch portID { - case IBCProfilesPort: + case profilestypes.IBCPortID: // claim capability using the ibcporfiles capability keeper err = chain.App.ScopedProfilesKeeper.ClaimCapability(chain.GetContext(), cap, host.PortPath(portID)) require.NoError(chain.t, err) diff --git a/testutil/ibctesting/coordinator.go b/testutil/ibctesting/coordinator.go index 5ccf733531..84c3065316 100644 --- a/testutil/ibctesting/coordinator.go +++ b/testutil/ibctesting/coordinator.go @@ -6,6 +6,8 @@ import ( "testing" "time" + profilestypes "github.com/desmos-labs/desmos/x/profiles/types" + "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" @@ -148,7 +150,7 @@ func (coord *Coordinator) CreateConnection( return connA, connB } -// CreateTransferChannels constructs and executes channel handshake messages to create OPEN +// CreateIBCProfilesChannels constructs and executes channel handshake messages to create OPEN // ibc-profiles channel to profiles channel on chainA and chainB. The function expects the channels to be // successfully opened otherwise testing will fail. func (coord *Coordinator) CreateIBCProfilesChannels( @@ -156,7 +158,7 @@ func (coord *Coordinator) CreateIBCProfilesChannels( connA, connB *TestConnection, order channeltypes.Order, ) (TestChannel, TestChannel) { - return coord.CreateChannel(chainA, chainB, connA, connB, IBCProfilesPort, IBCProfilesPort, order) + return coord.CreateChannel(chainA, chainB, connA, connB, profilestypes.IBCPortID, profilestypes.IBCPortID, order) } // CreateChannel constructs and executes channel handshake messages in order to create diff --git a/x/profiles/client/cli/cli_relationships.go b/x/profiles/client/cli/cli_relationships.go index d4eced6f78..bfdf2d06ec 100644 --- a/x/profiles/client/cli/cli_relationships.go +++ b/x/profiles/client/cli/cli_relationships.go @@ -160,7 +160,7 @@ func GetCmdQueryUserRelationships() *cobra.Command { } flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, types.QueryUserRelationships) + flags.AddPaginationFlagsToCmd(cmd, "user relationships") return cmd } @@ -201,7 +201,7 @@ func GetCmdQueryUserBlocks() *cobra.Command { } flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, types.QueryUserBlocks) + flags.AddPaginationFlagsToCmd(cmd, "user blocks") return cmd } diff --git a/x/profiles/keeper/relay_app_links_test.go b/x/profiles/keeper/relay_app_links_test.go index df8be3c917..83933b60c8 100644 --- a/x/profiles/keeper/relay_app_links_test.go +++ b/x/profiles/keeper/relay_app_links_test.go @@ -82,7 +82,7 @@ func (suite *KeeperTestSuite) TestKeeper_StartProfileConnection() { // channel references wrong ID _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, _ = suite.coordinator.CreateIBCProfilesChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) - channelA.ID = ibctesting.InvalidID + channelA.ID = "IDisInvalid" }, expPass: false, }, @@ -97,7 +97,13 @@ func (suite *KeeperTestSuite) TestKeeper_StartProfileConnection() { suite.chainA.App.IBCKeeper.ChannelKeeper.SetChannel( suite.chainA.GetContext(), channelA.PortID, channelA.ID, - channeltypes.NewChannel(channeltypes.OPEN, channeltypes.ORDERED, channeltypes.NewCounterparty(channelB.PortID, channelB.ID), []string{connA.ID}, ibctesting.DefaultChannelVersion), + channeltypes.NewChannel( + channeltypes.OPEN, + channeltypes.ORDERED, + channeltypes.NewCounterparty(channelB.PortID, channelB.ID), + []string{connA.ID}, + "ics-20", + ), ) suite.chainA.CreateChannelCapability(channelA.PortID, channelA.ID) }, diff --git a/x/profiles/module.go b/x/profiles/module.go index ddc738dd50..2098cfb79d 100644 --- a/x/profiles/module.go +++ b/x/profiles/module.go @@ -135,10 +135,10 @@ func (am AppModule) NewHandler() sdk.Handler { // QuerierRoute returns the profiles module's querier route name. func (am AppModule) QuerierRoute() string { - return types.QuerierRoute + return types.RouterKey } -// NewQuerierHandler returns the profiles module sdk.Querier. +// LegacyQuerierHandler returns the profiles module sdk.Querier. func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { return nil } diff --git a/x/profiles/module_ibc.go b/x/profiles/module_ibc.go index bc3d8d73f9..bdeac2e5a1 100644 --- a/x/profiles/module_ibc.go +++ b/x/profiles/module_ibc.go @@ -51,9 +51,6 @@ func ValidateProfilesChannelParams( return sdkerrors.Wrapf(porttypes.ErrInvalidPort, "invalid port: %s, expected %s", portID, boundPort) } - if version != types.IBCVersion { - return sdkerrors.Wrapf(types.ErrInvalidVersion, "got %s, expected %s", version, types.IBCVersion) - } return nil } @@ -99,10 +96,6 @@ func (am AppModule) OnChanOpenTry( return err } - if counterpartyVersion != types.IBCVersion { - return sdkerrors.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: got: %s, expected %s", counterpartyVersion, types.IBCVersion) - } - // Module may have already claimed capability in OnChanOpenInit in the case of crossing hellos // (ie chainA and chainB both call ChanOpenInit before one of them calls ChanOpenTry) // If module can already authenticate the capability then module already owns it so we don't need to claim @@ -124,9 +117,6 @@ func (am AppModule) OnChanOpenAck( channelID string, counterpartyVersion string, ) error { - if counterpartyVersion != types.IBCVersion { - return sdkerrors.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: %s, expected %s", counterpartyVersion, types.IBCVersion) - } return nil } diff --git a/x/profiles/simulation/operations_user_blocks.go b/x/profiles/simulation/operations_user_blocks.go index 7a9fc9013c..980e7d7cad 100644 --- a/x/profiles/simulation/operations_user_blocks.go +++ b/x/profiles/simulation/operations_user_blocks.go @@ -40,7 +40,7 @@ func SimulateMsgBlockUser( ) err = simtesting.SendMsg(r, app, ak, bk, msg, ctx, chainID, DefaultGasValue, []cryptotypes.PrivKey{acc.PrivKey}) if err != nil { - return simtypes.NoOpMsg(types.QuerierRoute, types.ModuleName, ""), nil, err + return simtypes.NoOpMsg(types.RouterKey, types.ModuleName, ""), nil, err } return simtypes.NewOperationMsg(msg, true, ""), nil, nil @@ -92,7 +92,7 @@ func SimulateMsgUnblockUser( acc, userBlock, skip := randomUnblockUserFields(r, ctx, accs, k) if skip { - return simtypes.NoOpMsg(types.QuerierRoute, types.ModuleName, ""), nil, nil + return simtypes.NoOpMsg(types.RouterKey, types.ModuleName, ""), nil, nil } msg := types.NewMsgUnblockUser( @@ -102,7 +102,7 @@ func SimulateMsgUnblockUser( ) err = simtesting.SendMsg(r, app, ak, bk, msg, ctx, chainID, DefaultGasValue, []cryptotypes.PrivKey{acc.PrivKey}) if err != nil { - return simtypes.NoOpMsg(types.QuerierRoute, types.ModuleName, ""), nil, err + return simtypes.NoOpMsg(types.RouterKey, types.ModuleName, ""), nil, err } return simtypes.NewOperationMsg(msg, true, ""), nil, nil diff --git a/x/profiles/types/keys.go b/x/profiles/types/keys.go index ddfb495945..e8413dd824 100644 --- a/x/profiles/types/keys.go +++ b/x/profiles/types/keys.go @@ -9,8 +9,6 @@ const ( RouterKey = ModuleName StoreKey = ModuleName - DesmosChainName = "desmos" - ActionSaveProfile = "save_profile" ActionDeleteProfile = "delete_profile" ActionRequestDTag = "request_dtag_transfer" @@ -26,21 +24,9 @@ const ( ActionLinkApplication = "link_application" ActionUnlinkApplication = "unlink_application" - QuerierRoute = ModuleName - QueryProfile = "profile" - QueryIncomingDTagRequests = "incoming-dtag-requests" - QueryUserRelationships = "user_relationships" - QueryRelationships = "relationships" - QueryUserBlocks = "user_blocks" - QueryParams = "params" - DoNotModify = "[do-not-modify]" - // IBCVersion represents the version of the IBC specification to be used. - // Currently we use ICS20-1 because we need to communicate with Band which uses the same version. - // TODO: Explore if it's possible to support multiple specifications at once, and see if we should create our own one. - IBCVersion = "ics20-1" - IBCPortID = "ibc-profiles" + IBCPortID = "ibc-profiles" ) var (