-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1443 from cosmos/sdk47-types
Add group and gov v1 message types
- Loading branch information
Showing
8 changed files
with
80 additions
and
0 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { AminoConverters } from "../../aminotypes"; | ||
|
||
export function createGroupAminoConverters(): AminoConverters { | ||
// Missing, see https://github.com/cosmos/cosmjs/issues/1441 | ||
return {}; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { GeneratedType } from "@cosmjs/proto-signing"; | ||
import { | ||
MsgCreateGroup, | ||
MsgCreateGroupPolicy, | ||
MsgCreateGroupWithPolicy, | ||
MsgExec, | ||
MsgLeaveGroup, | ||
MsgSubmitProposal, | ||
MsgUpdateGroupAdmin, | ||
MsgUpdateGroupMembers, | ||
MsgUpdateGroupMetadata, | ||
MsgUpdateGroupPolicyAdmin, | ||
MsgUpdateGroupPolicyDecisionPolicy, | ||
MsgUpdateGroupPolicyMetadata, | ||
MsgVote, | ||
MsgWithdrawProposal, | ||
} from "cosmjs-types/cosmos/group/v1/tx"; | ||
|
||
export const groupTypes: ReadonlyArray<[string, GeneratedType]> = [ | ||
["/cosmos.group.v1.MsgCreateGroup", MsgCreateGroup], | ||
["/cosmos.group.v1.MsgCreateGroupPolicy", MsgCreateGroupPolicy], | ||
["/cosmos.group.v1.MsgCreateGroupWithPolicy", MsgCreateGroupWithPolicy], | ||
["/cosmos.group.v1.MsgExec", MsgExec], | ||
["/cosmos.group.v1.MsgLeaveGroup", MsgLeaveGroup], | ||
["/cosmos.group.v1.MsgSubmitProposal", MsgSubmitProposal], | ||
["/cosmos.group.v1.MsgUpdateGroupAdmin", MsgUpdateGroupAdmin], | ||
["/cosmos.group.v1.MsgUpdateGroupMembers", MsgUpdateGroupMembers], | ||
["/cosmos.group.v1.MsgUpdateGroupMetadata", MsgUpdateGroupMetadata], | ||
["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", MsgUpdateGroupPolicyAdmin], | ||
["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", MsgUpdateGroupPolicyDecisionPolicy], | ||
["/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", MsgUpdateGroupPolicyMetadata], | ||
["/cosmos.group.v1.MsgVote", MsgVote], | ||
["/cosmos.group.v1.MsgWithdrawProposal", MsgWithdrawProposal], | ||
]; | ||
|
||
// There are no EncodeObject implementations for the new v1 message types because | ||
// those things don't scale (https://github.com/cosmos/cosmjs/issues/1440). We need to | ||
// address this more fundamentally. Users can use | ||
// const msg = { | ||
// typeUrl: "/cosmos.group.v1.MsgCreateGroup", | ||
// value: MsgCreateGroup.fromPartial({ ... }) | ||
// } | ||
// in their app. |
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