-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update desmos to v6.1.0 and juno to v5.2.1
- Loading branch information
Showing
16 changed files
with
365 additions
and
603 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,110 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
poststypes "github.com/desmos-labs/desmos/v5/x/posts/types" | ||
profilestypes "github.com/desmos-labs/desmos/v5/x/profiles/types" | ||
reactionstypes "github.com/desmos-labs/desmos/v5/x/reactions/types" | ||
relationshiptypes "github.com/desmos-labs/desmos/v5/x/relationships/types" | ||
reportstypes "github.com/desmos-labs/desmos/v5/x/reports/types" | ||
subspacestypes "github.com/desmos-labs/desmos/v5/x/subspaces/types" | ||
// import ( | ||
// "github.com/cosmos/cosmos-sdk/codec" | ||
// sdk "github.com/cosmos/cosmos-sdk/types" | ||
// poststypes "github.com/desmos-labs/desmos/v6/x/posts/types" | ||
// profilestypes "github.com/desmos-labs/desmos/v6/x/profiles/types" | ||
// reactionstypes "github.com/desmos-labs/desmos/v6/x/reactions/types" | ||
// relationshiptypes "github.com/desmos-labs/desmos/v6/x/relationships/types" | ||
// reportstypes "github.com/desmos-labs/desmos/v6/x/reports/types" | ||
// subspacestypes "github.com/desmos-labs/desmos/v6/x/subspaces/types" | ||
// ) | ||
|
||
junomessages "github.com/forbole/juno/v5/modules/messages" | ||
) | ||
// // desmosMessageAddressesParser represents a parser able to get the addresses of the involved | ||
// // account from a Desmos message | ||
// var desmosMessageAddressesParser = junomessages.JoinMessageParsers( | ||
// profilesMessageAddressesParser, | ||
// ) | ||
|
||
// desmosMessageAddressesParser represents a parser able to get the addresses of the involved | ||
// account from a Desmos message | ||
var desmosMessageAddressesParser = junomessages.JoinMessageParsers( | ||
profilesMessageAddressesParser, | ||
) | ||
// // profilesMessageAddressesParser represents a MessageAddressesParser for the x/profiles module | ||
// func profilesMessageAddressesParser(_ codec.Codec, cosmosMsg sdk.Msg) ([]string, error) { | ||
// switch msg := cosmosMsg.(type) { | ||
|
||
// profilesMessageAddressesParser represents a MessageAddressesParser for the x/profiles module | ||
func profilesMessageAddressesParser(_ codec.Codec, cosmosMsg sdk.Msg) ([]string, error) { | ||
switch msg := cosmosMsg.(type) { | ||
// case *poststypes.MsgCreatePost: | ||
// return []string{msg.Author}, nil | ||
// case *poststypes.MsgEditPost: | ||
// return []string{msg.Editor}, nil | ||
// case *poststypes.MsgDeletePost: | ||
// return []string{msg.Signer}, nil | ||
// case *poststypes.MsgAddPostAttachment: | ||
// return []string{msg.Editor}, nil | ||
// case *poststypes.MsgRemovePostAttachment: | ||
// return []string{msg.Editor}, nil | ||
// case *poststypes.MsgAnswerPoll: | ||
// return []string{msg.Signer}, nil | ||
|
||
case *poststypes.MsgCreatePost: | ||
return []string{msg.Author}, nil | ||
case *poststypes.MsgEditPost: | ||
return []string{msg.Editor}, nil | ||
case *poststypes.MsgDeletePost: | ||
return []string{msg.Signer}, nil | ||
case *poststypes.MsgAddPostAttachment: | ||
return []string{msg.Editor}, nil | ||
case *poststypes.MsgRemovePostAttachment: | ||
return []string{msg.Editor}, nil | ||
case *poststypes.MsgAnswerPoll: | ||
return []string{msg.Signer}, nil | ||
// case *profilestypes.MsgRequestDTagTransfer: | ||
// return []string{msg.Sender, msg.Receiver}, nil | ||
// case *profilestypes.MsgCancelDTagTransferRequest: | ||
// return []string{msg.Sender, msg.Receiver}, nil | ||
// case *profilestypes.MsgAcceptDTagTransferRequest: | ||
// return []string{msg.Sender, msg.Receiver}, nil | ||
// case *profilestypes.MsgRefuseDTagTransferRequest: | ||
// return []string{msg.Sender, msg.Receiver}, nil | ||
|
||
case *profilestypes.MsgRequestDTagTransfer: | ||
return []string{msg.Sender, msg.Receiver}, nil | ||
case *profilestypes.MsgCancelDTagTransferRequest: | ||
return []string{msg.Sender, msg.Receiver}, nil | ||
case *profilestypes.MsgAcceptDTagTransferRequest: | ||
return []string{msg.Sender, msg.Receiver}, nil | ||
case *profilestypes.MsgRefuseDTagTransferRequest: | ||
return []string{msg.Sender, msg.Receiver}, nil | ||
// case *reactionstypes.MsgAddReaction: | ||
// return []string{msg.User}, nil | ||
// case *reactionstypes.MsgRemoveReaction: | ||
// return []string{msg.User}, nil | ||
// case *reactionstypes.MsgAddRegisteredReaction: | ||
// return []string{msg.User}, nil | ||
// case *reactionstypes.MsgEditRegisteredReaction: | ||
// return []string{msg.User}, nil | ||
// case *reactionstypes.MsgRemoveRegisteredReaction: | ||
// return []string{msg.User}, nil | ||
// case *reactionstypes.MsgSetReactionsParams: | ||
// return []string{msg.User}, nil | ||
|
||
case *reactionstypes.MsgAddReaction: | ||
return []string{msg.User}, nil | ||
case *reactionstypes.MsgRemoveReaction: | ||
return []string{msg.User}, nil | ||
case *reactionstypes.MsgAddRegisteredReaction: | ||
return []string{msg.User}, nil | ||
case *reactionstypes.MsgEditRegisteredReaction: | ||
return []string{msg.User}, nil | ||
case *reactionstypes.MsgRemoveRegisteredReaction: | ||
return []string{msg.User}, nil | ||
case *reactionstypes.MsgSetReactionsParams: | ||
return []string{msg.User}, nil | ||
// case *relationshiptypes.MsgCreateRelationship: | ||
// return []string{msg.Signer, msg.Counterparty}, nil | ||
// case *relationshiptypes.MsgDeleteRelationship: | ||
// return []string{msg.Signer, msg.Counterparty}, nil | ||
// case *relationshiptypes.MsgBlockUser: | ||
// return []string{msg.Blocker, msg.Blocked}, nil | ||
// case *relationshiptypes.MsgUnblockUser: | ||
// return []string{msg.Blocker, msg.Blocked}, nil | ||
|
||
case *relationshiptypes.MsgCreateRelationship: | ||
return []string{msg.Signer, msg.Counterparty}, nil | ||
case *relationshiptypes.MsgDeleteRelationship: | ||
return []string{msg.Signer, msg.Counterparty}, nil | ||
case *relationshiptypes.MsgBlockUser: | ||
return []string{msg.Blocker, msg.Blocked}, nil | ||
case *relationshiptypes.MsgUnblockUser: | ||
return []string{msg.Blocker, msg.Blocked}, nil | ||
// case *reportstypes.MsgCreateReport: | ||
// return []string{msg.Reporter}, nil | ||
// case *reportstypes.MsgDeleteReport: | ||
// return []string{msg.Signer}, nil | ||
// case *reportstypes.MsgSupportStandardReason: | ||
// return []string{msg.Signer}, nil | ||
// case *reportstypes.MsgAddReason: | ||
// return []string{msg.Signer}, nil | ||
// case *reportstypes.MsgRemoveReason: | ||
// return []string{msg.Signer}, nil | ||
|
||
case *reportstypes.MsgCreateReport: | ||
return []string{msg.Reporter}, nil | ||
case *reportstypes.MsgDeleteReport: | ||
return []string{msg.Signer}, nil | ||
case *reportstypes.MsgSupportStandardReason: | ||
return []string{msg.Signer}, nil | ||
case *reportstypes.MsgAddReason: | ||
return []string{msg.Signer}, nil | ||
case *reportstypes.MsgRemoveReason: | ||
return []string{msg.Signer}, nil | ||
// case *subspacestypes.MsgCreateSubspace: | ||
// return []string{msg.Creator}, nil | ||
// case *subspacestypes.MsgEditSubspace: | ||
// return []string{msg.Signer}, nil | ||
// case *subspacestypes.MsgDeleteSubspace: | ||
// return []string{msg.Signer}, nil | ||
// case *subspacestypes.MsgCreateSection: | ||
// return []string{msg.Creator}, nil | ||
// case *subspacestypes.MsgEditSection: | ||
// return []string{msg.Editor}, nil | ||
// case *subspacestypes.MsgMoveSection: | ||
// return []string{msg.Signer}, nil | ||
// case *subspacestypes.MsgDeleteSection: | ||
// return []string{msg.Signer}, nil | ||
// case *subspacestypes.MsgCreateUserGroup: | ||
// return append([]string{msg.Creator}, msg.InitialMembers...), nil | ||
// case *subspacestypes.MsgEditUserGroup: | ||
// return []string{msg.Signer}, nil | ||
// case *subspacestypes.MsgMoveUserGroup: | ||
// return []string{msg.Signer}, nil | ||
// case *subspacestypes.MsgDeleteUserGroup: | ||
// return []string{msg.Signer}, nil | ||
// case *subspacestypes.MsgAddUserToUserGroup: | ||
// return []string{msg.Signer, msg.User}, nil | ||
// case *subspacestypes.MsgRemoveUserFromUserGroup: | ||
// return []string{msg.Signer, msg.User}, nil | ||
// case *subspacestypes.MsgSetUserPermissions: | ||
// return []string{msg.Signer, msg.User}, nil | ||
// } | ||
|
||
case *subspacestypes.MsgCreateSubspace: | ||
return []string{msg.Creator}, nil | ||
case *subspacestypes.MsgEditSubspace: | ||
return []string{msg.Signer}, nil | ||
case *subspacestypes.MsgDeleteSubspace: | ||
return []string{msg.Signer}, nil | ||
case *subspacestypes.MsgCreateSection: | ||
return []string{msg.Creator}, nil | ||
case *subspacestypes.MsgEditSection: | ||
return []string{msg.Editor}, nil | ||
case *subspacestypes.MsgMoveSection: | ||
return []string{msg.Signer}, nil | ||
case *subspacestypes.MsgDeleteSection: | ||
return []string{msg.Signer}, nil | ||
case *subspacestypes.MsgCreateUserGroup: | ||
return append([]string{msg.Creator}, msg.InitialMembers...), nil | ||
case *subspacestypes.MsgEditUserGroup: | ||
return []string{msg.Signer}, nil | ||
case *subspacestypes.MsgMoveUserGroup: | ||
return []string{msg.Signer}, nil | ||
case *subspacestypes.MsgDeleteUserGroup: | ||
return []string{msg.Signer}, nil | ||
case *subspacestypes.MsgAddUserToUserGroup: | ||
return []string{msg.Signer, msg.User}, nil | ||
case *subspacestypes.MsgRemoveUserFromUserGroup: | ||
return []string{msg.Signer, msg.User}, nil | ||
case *subspacestypes.MsgSetUserPermissions: | ||
return []string{msg.Signer, msg.User}, nil | ||
} | ||
|
||
return nil, junomessages.MessageNotSupported(cosmosMsg) | ||
} | ||
// return nil, junomessages.MessageNotSupported(cosmosMsg) | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.