MsgWeightedVote -> MsgVoteWeighted

This commit is contained in:
Sunny Aggarwal 2021-01-24 20:53:45 -05:00
parent 56ed27ad9c
commit b125fccfd2
17 changed files with 163 additions and 163 deletions

View File

@ -35,7 +35,7 @@ type Vote struct {
}
```
And for backwards compatibility, we introduce `MsgWeightedVote` while keeping `MsgVote`.
And for backwards compatibility, we introduce `MsgVoteWeighted` while keeping `MsgVote`.
```
type MsgVote struct {
ProposalID int64
@ -43,14 +43,14 @@ type MsgVote struct {
Option Option
}
type MsgWeightedVote struct {
type MsgVoteWeighted struct {
ProposalID int64
Voter sdk.Address
Options []WeightedVoteOption
}
```
The `ValidateBasic` of a `MsgWeightedVote` struct would require that
The `ValidateBasic` of a `MsgVoteWeighted` struct would require that
1. The sum of all the Rates is equal to 1.0
2. No Option is repeated

View File

@ -284,8 +284,8 @@
- [MsgSubmitProposalResponse](#cosmos.gov.v1beta1.MsgSubmitProposalResponse)
- [MsgVote](#cosmos.gov.v1beta1.MsgVote)
- [MsgVoteResponse](#cosmos.gov.v1beta1.MsgVoteResponse)
- [MsgWeightedVote](#cosmos.gov.v1beta1.MsgWeightedVote)
- [MsgWeightedVoteResponse](#cosmos.gov.v1beta1.MsgWeightedVoteResponse)
- [MsgVoteWeighted](#cosmos.gov.v1beta1.MsgVoteWeighted)
- [MsgVoteWeightedResponse](#cosmos.gov.v1beta1.MsgVoteWeightedResponse)
- [Msg](#cosmos.gov.v1beta1.Msg)
@ -4402,9 +4402,9 @@ MsgVoteResponse defines the Msg/Vote response type.
<a name="cosmos.gov.v1beta1.MsgWeightedVote"></a>
<a name="cosmos.gov.v1beta1.MsgVoteWeighted"></a>
### MsgWeightedVote
### MsgVoteWeighted
MsgVote defines a message to cast a vote.
@ -4419,10 +4419,10 @@ MsgVote defines a message to cast a vote.
<a name="cosmos.gov.v1beta1.MsgWeightedVoteResponse"></a>
<a name="cosmos.gov.v1beta1.MsgVoteWeightedResponse"></a>
### MsgWeightedVoteResponse
MsgWeightedVoteResponse defines the MsgWeightedVote response type.
### MsgVoteWeightedResponse
MsgVoteWeightedResponse defines the MsgVoteWeighted response type.
@ -4444,7 +4444,7 @@ Msg defines the bank Msg service.
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `SubmitProposal` | [MsgSubmitProposal](#cosmos.gov.v1beta1.MsgSubmitProposal) | [MsgSubmitProposalResponse](#cosmos.gov.v1beta1.MsgSubmitProposalResponse) | SubmitProposal defines a method to create new proposal given a content. | |
| `Vote` | [MsgVote](#cosmos.gov.v1beta1.MsgVote) | [MsgVoteResponse](#cosmos.gov.v1beta1.MsgVoteResponse) | Vote defines a method to add a vote on a specific proposal. | |
| `WeightedVote` | [MsgWeightedVote](#cosmos.gov.v1beta1.MsgWeightedVote) | [MsgWeightedVoteResponse](#cosmos.gov.v1beta1.MsgWeightedVoteResponse) | WeightedVote defines a method to add a weighted vote on a specific proposal. | |
| `VoteWeighted` | [MsgVoteWeighted](#cosmos.gov.v1beta1.MsgVoteWeighted) | [MsgVoteWeightedResponse](#cosmos.gov.v1beta1.MsgVoteWeightedResponse) | WeightedVote defines a method to add a weighted vote on a specific proposal. | |
| `Deposit` | [MsgDeposit](#cosmos.gov.v1beta1.MsgDeposit) | [MsgDepositResponse](#cosmos.gov.v1beta1.MsgDepositResponse) | Deposit defines a method to add deposit on a specific proposal. | |
<!-- end services -->

View File

@ -18,7 +18,7 @@ service Msg {
rpc Vote(MsgVote) returns (MsgVoteResponse);
// WeightedVote defines a method to add a weighted vote on a specific proposal.
rpc WeightedVote(MsgWeightedVote) returns (MsgWeightedVoteResponse);
rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse);
// Deposit defines a method to add deposit on a specific proposal.
rpc Deposit(MsgDeposit) returns (MsgDepositResponse);
@ -59,7 +59,7 @@ message MsgVote {
}
// MsgVote defines a message to cast a vote.
message MsgWeightedVote {
message MsgVoteWeighted {
option (gogoproto.equal) = false;
option (gogoproto.goproto_stringer) = false;
option (gogoproto.stringer) = false;
@ -73,8 +73,8 @@ message MsgWeightedVote {
// MsgVoteResponse defines the Msg/Vote response type.
message MsgVoteResponse {}
// MsgWeightedVoteResponse defines the MsgWeightedVote response type.
message MsgWeightedVoteResponse {}
// MsgVoteWeightedResponse defines the MsgVoteWeighted response type.
message MsgVoteWeightedResponse {}
// MsgDeposit defines a message to submit a deposit to an existing proposal.
message MsgDeposit {

View File

@ -10,7 +10,7 @@ const (
DefaultWeightMsgFundCommunityPool int = 50
DefaultWeightMsgDeposit int = 100
DefaultWeightMsgVote int = 67
DefaultWeightMsgWeightedVote int = 33
DefaultWeightMsgVoteWeighted int = 33
DefaultWeightMsgUnjail int = 100
DefaultWeightMsgCreateValidator int = 100
DefaultWeightMsgEditValidator int = 5

View File

@ -286,7 +286,7 @@ $ %s tx gov vote 1 yes=0.6,no=0.3,abstain=0.05,no_with_veto=0.05 --from mykey
}
// Build vote message and run basic validation
msg := types.NewMsgWeightedVote(from, proposalID, options)
msg := types.NewMsgVoteWeighted(from, proposalID, options)
err = msg.ValidateBasic()
if err != nil {
return err

View File

@ -159,7 +159,7 @@ func newWeightedVoteHandlerFn(clientCtx client.Context) http.HandlerFunc {
}
// create the message
msg := types.NewMsgWeightedVote(req.Voter, proposalID, options)
msg := types.NewMsgVoteWeighted(req.Voter, proposalID, options)
if rest.CheckBadRequestError(w, msg.ValidateBasic()) {
return
}

View File

@ -80,7 +80,7 @@ func QueryVotesByTxQuery(clientCtx client.Context, params types.QueryProposalVot
var (
events = []string{
fmt.Sprintf("%s.%s='%s'", sdk.EventTypeMessage, sdk.AttributeKeyAction, types.TypeMsgVote),
fmt.Sprintf("%s.%s='%s'", sdk.EventTypeMessage, sdk.AttributeKeyAction, types.TypeMsgWeightedVote),
fmt.Sprintf("%s.%s='%s'", sdk.EventTypeMessage, sdk.AttributeKeyAction, types.TypeMsgVoteWeighted),
fmt.Sprintf("%s.%s='%s'", types.EventTypeProposalVote, types.AttributeKeyProposalID, []byte(fmt.Sprintf("%d", params.ProposalID))),
}
votes []types.Vote
@ -104,8 +104,8 @@ func QueryVotesByTxQuery(clientCtx client.Context, params types.QueryProposalVot
ProposalId: params.ProposalID,
Options: types.NewNonSplitVoteOption(voteMsg.Option),
})
} else if msg.Type() == types.TypeMsgWeightedVote {
voteMsg := msg.(*types.MsgWeightedVote)
} else if msg.Type() == types.TypeMsgVoteWeighted {
voteMsg := msg.(*types.MsgVoteWeighted)
votes = append(votes, types.Vote{
Voter: voteMsg.Voter,
@ -166,8 +166,8 @@ func QueryVoteByTxQuery(clientCtx client.Context, params types.QueryVoteParams)
}
return bz, nil
} else if msg.Type() == types.TypeMsgWeightedVote {
voteMsg := msg.(*types.MsgWeightedVote)
} else if msg.Type() == types.TypeMsgVoteWeighted {
voteMsg := msg.(*types.MsgVoteWeighted)
vote := types.Vote{
Voter: voteMsg.Voter,

View File

@ -75,7 +75,7 @@ func TestGetPaginatedVotes(t *testing.T) {
}
acc2Msgs := []sdk.Msg{
types.NewMsgVote(acc2, 0, types.OptionYes),
types.NewMsgWeightedVote(acc2, 0, types.NewNonSplitVoteOption(types.OptionYes)),
types.NewMsgVoteWeighted(acc2, 0, types.NewNonSplitVoteOption(types.OptionYes)),
}
for _, tc := range []testCase{
{

View File

@ -27,8 +27,8 @@ func NewHandler(k keeper.Keeper) sdk.Handler {
res, err := msgServer.Vote(sdk.WrapSDKContext(ctx), msg)
return sdk.WrapServiceResult(ctx, res, err)
case *types.MsgWeightedVote:
res, err := msgServer.WeightedVote(sdk.WrapSDKContext(ctx), msg)
case *types.MsgVoteWeighted:
res, err := msgServer.VoteWeighted(sdk.WrapSDKContext(ctx), msg)
return sdk.WrapServiceResult(ctx, res, err)
default:

View File

@ -89,7 +89,7 @@ func (k msgServer) Vote(goCtx context.Context, msg *types.MsgVote) (*types.MsgVo
return &types.MsgVoteResponse{}, nil
}
func (k msgServer) WeightedVote(goCtx context.Context, msg *types.MsgWeightedVote) (*types.MsgWeightedVoteResponse, error) {
func (k msgServer) VoteWeighted(goCtx context.Context, msg *types.MsgVoteWeighted) (*types.MsgVoteWeightedResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
accAddr, accErr := sdk.AccAddressFromBech32(msg.Voter)
if accErr != nil {
@ -116,7 +116,7 @@ func (k msgServer) WeightedVote(goCtx context.Context, msg *types.MsgWeightedVot
),
)
return &types.MsgWeightedVoteResponse{}, nil
return &types.MsgVoteWeightedResponse{}, nil
}
func (k msgServer) Deposit(goCtx context.Context, msg *types.MsgDeposit) (*types.MsgDepositResponse, error) {

View File

@ -22,7 +22,7 @@ var initialProposalID = uint64(100000000000000)
const (
OpWeightMsgDeposit = "op_weight_msg_deposit"
OpWeightMsgVote = "op_weight_msg_vote"
OpWeightMsgWeightedVote = "op_weight_msg_weighted_vote"
OpWeightMsgVoteWeighted = "op_weight_msg_weighted_vote"
)
// WeightedOperations returns all the operations from the module with their respective weights
@ -34,7 +34,7 @@ func WeightedOperations(
var (
weightMsgDeposit int
weightMsgVote int
weightMsgWeightedVote int
weightMsgVoteWeighted int
)
appParams.GetOrGenerate(cdc, OpWeightMsgDeposit, &weightMsgDeposit, nil,
@ -49,9 +49,9 @@ func WeightedOperations(
},
)
appParams.GetOrGenerate(cdc, OpWeightMsgWeightedVote, &weightMsgWeightedVote, nil,
appParams.GetOrGenerate(cdc, OpWeightMsgVoteWeighted, &weightMsgVoteWeighted, nil,
func(_ *rand.Rand) {
weightMsgWeightedVote = simappparams.DefaultWeightMsgWeightedVote
weightMsgVoteWeighted = simappparams.DefaultWeightMsgVoteWeighted
},
)
@ -83,8 +83,8 @@ func WeightedOperations(
SimulateMsgVote(ak, bk, k),
),
simulation.NewWeightedOperation(
weightMsgWeightedVote,
SimulateMsgWeightedVote(ak, bk, k),
weightMsgVoteWeighted,
SimulateMsgVoteWeighted(ak, bk, k),
),
}
@ -327,12 +327,12 @@ func operationSimulateMsgVote(ak types.AccountKeeper, bk types.BankKeeper, k kee
}
}
// SimulateMsgWeightedVote generates a MsgWeightedVote with random values.
func SimulateMsgWeightedVote(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation {
return operationSimulateMsgWeightedVote(ak, bk, k, simtypes.Account{}, -1)
// SimulateMsgVoteWeighted generates a MsgVoteWeighted with random values.
func SimulateMsgVoteWeighted(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation {
return operationSimulateMsgVoteWeighted(ak, bk, k, simtypes.Account{}, -1)
}
func operationSimulateMsgWeightedVote(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper,
func operationSimulateMsgVoteWeighted(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper,
simAccount simtypes.Account, proposalIDInt int64) simtypes.Operation {
return func(
r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context,
@ -349,14 +349,14 @@ func operationSimulateMsgWeightedVote(ak types.AccountKeeper, bk types.BankKeepe
var ok bool
proposalID, ok = randomProposalID(r, k, ctx, types.StatusVotingPeriod)
if !ok {
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgWeightedVote, "unable to generate proposalID"), nil, nil
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgVoteWeighted, "unable to generate proposalID"), nil, nil
}
default:
proposalID = uint64(proposalIDInt)
}
options := randomWeightedVotingOptions(r)
msg := types.NewMsgWeightedVote(simAccount.Address, proposalID, options)
msg := types.NewMsgVoteWeighted(simAccount.Address, proposalID, options)
account := ak.GetAccount(ctx, simAccount.Address)
spendable := bk.SpendableCoins(ctx, account.GetAddress())

View File

@ -80,7 +80,7 @@ func TestWeightedOperations(t *testing.T) {
{2, types.ModuleName, "submit_proposal"},
{simappparams.DefaultWeightMsgDeposit, types.ModuleName, types.TypeMsgDeposit},
{simappparams.DefaultWeightMsgVote, types.ModuleName, types.TypeMsgVote},
{simappparams.DefaultWeightMsgWeightedVote, types.ModuleName, types.TypeMsgWeightedVote},
{simappparams.DefaultWeightMsgVoteWeighted, types.ModuleName, types.TypeMsgVoteWeighted},
}
for i, w := range weightesOps {
@ -208,9 +208,9 @@ func TestSimulateMsgVote(t *testing.T) {
require.Equal(t, types.TypeMsgVote, msg.Type())
}
// TestSimulateMsgWeightedVote tests the normal scenario of a valid message of type TypeMsgWeightedVote.
// TestSimulateMsgVoteWeighted tests the normal scenario of a valid message of type TypeMsgVoteWeighted.
// Abonormal scenarios, where the message is created by an errors are not tested here.
func TestSimulateMsgWeightedVote(t *testing.T) {
func TestSimulateMsgVoteWeighted(t *testing.T) {
app, ctx := createTestApp(false)
blockTime := time.Now().UTC()
ctx = ctx.WithBlockTime(blockTime)
@ -235,11 +235,11 @@ func TestSimulateMsgWeightedVote(t *testing.T) {
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}})
// execute operation
op := simulation.SimulateMsgWeightedVote(app.AccountKeeper, app.BankKeeper, app.GovKeeper)
op := simulation.SimulateMsgVoteWeighted(app.AccountKeeper, app.BankKeeper, app.GovKeeper)
operationMsg, _, err := op(r, app.BaseApp, ctx, accounts, "")
require.NoError(t, err)
var msg types.MsgWeightedVote
var msg types.MsgVoteWeighted
types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg)
require.True(t, operationMsg.OK)
@ -247,7 +247,7 @@ func TestSimulateMsgWeightedVote(t *testing.T) {
require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Voter)
require.True(t, len(msg.Options) >= 1)
require.Equal(t, "gov", msg.Route())
require.Equal(t, types.TypeMsgWeightedVote, msg.Type())
require.Equal(t, types.TypeMsgVoteWeighted, msg.Type())
}
// returns context and an app with updated mint keeper

View File

@ -41,7 +41,7 @@ The governance module emits the following events:
| message | action | vote |
| message | sender | {senderAddress} |
### MsgWeightedVote
### MsgVoteWeighted
| Type | Attribute Key | Attribute Value |
| ------------- | ------------- | ------------------------ |

View File

@ -15,7 +15,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgSubmitProposal{}, "cosmos-sdk/MsgSubmitProposal", nil)
cdc.RegisterConcrete(&MsgDeposit{}, "cosmos-sdk/MsgDeposit", nil)
cdc.RegisterConcrete(&MsgVote{}, "cosmos-sdk/MsgVote", nil)
cdc.RegisterConcrete(&MsgWeightedVote{}, "cosmos-sdk/MsgWeightedVote", nil)
cdc.RegisterConcrete(&MsgVoteWeighted{}, "cosmos-sdk/MsgVoteWeighted", nil)
cdc.RegisterConcrete(&TextProposal{}, "cosmos-sdk/TextProposal", nil)
}
@ -23,7 +23,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgSubmitProposal{},
&MsgVote{},
&MsgWeightedVote{},
&MsgVoteWeighted{},
&MsgDeposit{},
)
registry.RegisterInterface(

View File

@ -16,12 +16,12 @@ import (
const (
TypeMsgDeposit = "deposit"
TypeMsgVote = "vote"
TypeMsgWeightedVote = "weighted_vote"
TypeMsgVoteWeighted = "weighted_vote"
TypeMsgSubmitProposal = "submit_proposal"
)
var (
_, _, _, _ sdk.Msg = &MsgSubmitProposal{}, &MsgDeposit{}, &MsgVote{}, &MsgWeightedVote{}
_, _, _, _ sdk.Msg = &MsgSubmitProposal{}, &MsgDeposit{}, &MsgVote{}, &MsgVoteWeighted{}
_ types.UnpackInterfacesMessage = &MsgSubmitProposal{}
)
@ -219,20 +219,20 @@ func (msg MsgVote) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{voter}
}
// NewMsgWeightedVote creates a message to cast a vote on an active proposal
// NewMsgVoteWeighted creates a message to cast a vote on an active proposal
//nolint:interfacer
func NewMsgWeightedVote(voter sdk.AccAddress, proposalID uint64, options WeightedVoteOptions) *MsgWeightedVote {
return &MsgWeightedVote{proposalID, voter.String(), options}
func NewMsgVoteWeighted(voter sdk.AccAddress, proposalID uint64, options WeightedVoteOptions) *MsgVoteWeighted {
return &MsgVoteWeighted{proposalID, voter.String(), options}
}
// Route implements Msg
func (msg MsgWeightedVote) Route() string { return RouterKey }
func (msg MsgVoteWeighted) Route() string { return RouterKey }
// Type implements Msg
func (msg MsgWeightedVote) Type() string { return TypeMsgWeightedVote }
func (msg MsgVoteWeighted) Type() string { return TypeMsgVoteWeighted }
// ValidateBasic implements Msg
func (msg MsgWeightedVote) ValidateBasic() error {
func (msg MsgVoteWeighted) ValidateBasic() error {
if msg.Voter == "" {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Voter)
}
@ -262,19 +262,19 @@ func (msg MsgWeightedVote) ValidateBasic() error {
}
// String implements the Stringer interface
func (msg MsgWeightedVote) String() string {
func (msg MsgVoteWeighted) String() string {
out, _ := yaml.Marshal(msg)
return string(out)
}
// GetSignBytes implements Msg
func (msg MsgWeightedVote) GetSignBytes() []byte {
func (msg MsgVoteWeighted) GetSignBytes() []byte {
bz := ModuleCdc.MustMarshalJSON(&msg)
return sdk.MustSortJSON(bz)
}
// GetSigners implements Msg
func (msg MsgWeightedVote) GetSigners() []sdk.AccAddress {
func (msg MsgVoteWeighted) GetSigners() []sdk.AccAddress {
voter, _ := sdk.AccAddressFromBech32(msg.Voter)
return []sdk.AccAddress{voter}
}

View File

@ -118,8 +118,8 @@ func TestMsgVote(t *testing.T) {
}
}
// test ValidateBasic for MsgWeightedVote
func TestMsgWeightedVote(t *testing.T) {
// test ValidateBasic for MsgVoteWeighted
func TestMsgVoteWeighted(t *testing.T) {
tests := []struct {
proposalID uint64
voterAddr sdk.AccAddress
@ -150,7 +150,7 @@ func TestMsgWeightedVote(t *testing.T) {
}
for i, tc := range tests {
msg := NewMsgWeightedVote(tc.voterAddr, tc.proposalID, tc.options)
msg := NewMsgVoteWeighted(tc.voterAddr, tc.proposalID, tc.options)
if tc.expectPass {
require.Nil(t, msg.ValidateBasic(), "test: %v", i)
} else {

View File

@ -157,23 +157,23 @@ func (m *MsgVote) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgVote proto.InternalMessageInfo
// MsgVote defines a message to cast a vote.
type MsgWeightedVote struct {
type MsgVoteWeighted struct {
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"`
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
Options []WeightedVoteOption `protobuf:"bytes,3,rep,name=options,proto3" json:"options"`
}
func (m *MsgWeightedVote) Reset() { *m = MsgWeightedVote{} }
func (*MsgWeightedVote) ProtoMessage() {}
func (*MsgWeightedVote) Descriptor() ([]byte, []int) {
func (m *MsgVoteWeighted) Reset() { *m = MsgVoteWeighted{} }
func (*MsgVoteWeighted) ProtoMessage() {}
func (*MsgVoteWeighted) Descriptor() ([]byte, []int) {
return fileDescriptor_3c053992595e3dce, []int{3}
}
func (m *MsgWeightedVote) XXX_Unmarshal(b []byte) error {
func (m *MsgVoteWeighted) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgWeightedVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
func (m *MsgVoteWeighted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgWeightedVote.Marshal(b, m, deterministic)
return xxx_messageInfo_MsgVoteWeighted.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
@ -183,17 +183,17 @@ func (m *MsgWeightedVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, err
return b[:n], nil
}
}
func (m *MsgWeightedVote) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgWeightedVote.Merge(m, src)
func (m *MsgVoteWeighted) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgVoteWeighted.Merge(m, src)
}
func (m *MsgWeightedVote) XXX_Size() int {
func (m *MsgVoteWeighted) XXX_Size() int {
return m.Size()
}
func (m *MsgWeightedVote) XXX_DiscardUnknown() {
xxx_messageInfo_MsgWeightedVote.DiscardUnknown(m)
func (m *MsgVoteWeighted) XXX_DiscardUnknown() {
xxx_messageInfo_MsgVoteWeighted.DiscardUnknown(m)
}
var xxx_messageInfo_MsgWeightedVote proto.InternalMessageInfo
var xxx_messageInfo_MsgVoteWeighted proto.InternalMessageInfo
// MsgVoteResponse defines the Msg/Vote response type.
type MsgVoteResponse struct {
@ -232,22 +232,22 @@ func (m *MsgVoteResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgVoteResponse proto.InternalMessageInfo
// MsgWeightedVoteResponse defines the MsgWeightedVote response type.
type MsgWeightedVoteResponse struct {
// MsgVoteWeightedResponse defines the MsgVoteWeighted response type.
type MsgVoteWeightedResponse struct {
}
func (m *MsgWeightedVoteResponse) Reset() { *m = MsgWeightedVoteResponse{} }
func (m *MsgWeightedVoteResponse) String() string { return proto.CompactTextString(m) }
func (*MsgWeightedVoteResponse) ProtoMessage() {}
func (*MsgWeightedVoteResponse) Descriptor() ([]byte, []int) {
func (m *MsgVoteWeightedResponse) Reset() { *m = MsgVoteWeightedResponse{} }
func (m *MsgVoteWeightedResponse) String() string { return proto.CompactTextString(m) }
func (*MsgVoteWeightedResponse) ProtoMessage() {}
func (*MsgVoteWeightedResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_3c053992595e3dce, []int{5}
}
func (m *MsgWeightedVoteResponse) XXX_Unmarshal(b []byte) error {
func (m *MsgVoteWeightedResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgWeightedVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
func (m *MsgVoteWeightedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgWeightedVoteResponse.Marshal(b, m, deterministic)
return xxx_messageInfo_MsgVoteWeightedResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
@ -257,17 +257,17 @@ func (m *MsgWeightedVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]b
return b[:n], nil
}
}
func (m *MsgWeightedVoteResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgWeightedVoteResponse.Merge(m, src)
func (m *MsgVoteWeightedResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgVoteWeightedResponse.Merge(m, src)
}
func (m *MsgWeightedVoteResponse) XXX_Size() int {
func (m *MsgVoteWeightedResponse) XXX_Size() int {
return m.Size()
}
func (m *MsgWeightedVoteResponse) XXX_DiscardUnknown() {
xxx_messageInfo_MsgWeightedVoteResponse.DiscardUnknown(m)
func (m *MsgVoteWeightedResponse) XXX_DiscardUnknown() {
xxx_messageInfo_MsgVoteWeightedResponse.DiscardUnknown(m)
}
var xxx_messageInfo_MsgWeightedVoteResponse proto.InternalMessageInfo
var xxx_messageInfo_MsgVoteWeightedResponse proto.InternalMessageInfo
// MsgDeposit defines a message to submit a deposit to an existing proposal.
type MsgDeposit struct {
@ -349,9 +349,9 @@ func init() {
proto.RegisterType((*MsgSubmitProposal)(nil), "cosmos.gov.v1beta1.MsgSubmitProposal")
proto.RegisterType((*MsgSubmitProposalResponse)(nil), "cosmos.gov.v1beta1.MsgSubmitProposalResponse")
proto.RegisterType((*MsgVote)(nil), "cosmos.gov.v1beta1.MsgVote")
proto.RegisterType((*MsgWeightedVote)(nil), "cosmos.gov.v1beta1.MsgWeightedVote")
proto.RegisterType((*MsgVoteWeighted)(nil), "cosmos.gov.v1beta1.MsgVoteWeighted")
proto.RegisterType((*MsgVoteResponse)(nil), "cosmos.gov.v1beta1.MsgVoteResponse")
proto.RegisterType((*MsgWeightedVoteResponse)(nil), "cosmos.gov.v1beta1.MsgWeightedVoteResponse")
proto.RegisterType((*MsgVoteWeightedResponse)(nil), "cosmos.gov.v1beta1.MsgVoteWeightedResponse")
proto.RegisterType((*MsgDeposit)(nil), "cosmos.gov.v1beta1.MsgDeposit")
proto.RegisterType((*MsgDepositResponse)(nil), "cosmos.gov.v1beta1.MsgDepositResponse")
}
@ -359,48 +359,48 @@ func init() {
func init() { proto.RegisterFile("cosmos/gov/v1beta1/tx.proto", fileDescriptor_3c053992595e3dce) }
var fileDescriptor_3c053992595e3dce = []byte{
// 655 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xc1, 0x6b, 0x13, 0x4f,
0x14, 0xde, 0x4d, 0xfa, 0x6b, 0x7e, 0x7d, 0x91, 0xd6, 0x2e, 0x41, 0x93, 0x6d, 0xd9, 0x0d, 0x2b,
0x2d, 0x01, 0xe9, 0xae, 0x8d, 0xe0, 0xa1, 0x9e, 0x4c, 0xa5, 0xa8, 0x10, 0xd4, 0x15, 0x14, 0xbc,
0xd4, 0x4d, 0xb2, 0x9d, 0x2e, 0x26, 0xfb, 0x96, 0xcc, 0x24, 0x34, 0x37, 0x8f, 0x9e, 0xd4, 0xa3,
0xc7, 0x9e, 0xbd, 0x09, 0xfe, 0x11, 0xd5, 0x53, 0x8f, 0x1e, 0x24, 0x4a, 0x7b, 0x51, 0xf1, 0xd4,
0xbf, 0x40, 0x76, 0x66, 0x36, 0x8d, 0x6d, 0x12, 0x2a, 0x14, 0x4f, 0xc9, 0x7b, 0xdf, 0xfb, 0xbe,
0xbc, 0xef, 0xcd, 0x9b, 0x09, 0x2c, 0xd4, 0x91, 0xb6, 0x90, 0x3a, 0x04, 0xbb, 0x4e, 0x77, 0xb5,
0xe6, 0x33, 0x6f, 0xd5, 0x61, 0x3b, 0x76, 0xd4, 0x46, 0x86, 0x9a, 0x26, 0x40, 0x9b, 0x60, 0xd7,
0x96, 0xa0, 0x6e, 0x48, 0x42, 0xcd, 0xa3, 0xfe, 0x80, 0x51, 0xc7, 0x20, 0x14, 0x1c, 0x7d, 0x71,
0x84, 0x60, 0xcc, 0x17, 0x68, 0x41, 0xa0, 0x9b, 0x3c, 0x72, 0xa4, 0xbc, 0x80, 0x72, 0x04, 0x09,
0x8a, 0x7c, 0xfc, 0x2d, 0x21, 0x10, 0x44, 0xd2, 0xf4, 0x1d, 0x1e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, 0x55, 0x4a, 0xb4, 0x2d, 0x98, 0x3d, 0xf1,
0x54, 0x2c, 0x8d, 0x3a, 0x92, 0x53, 0x17, 0x48, 0x5f, 0x39, 0x53, 0xd9, 0xe0, 0x9e, 0xdd, 0x81,
0x29, 0xbe, 0x5f, 0x0b, 0x63, 0x68, 0x31, 0xa8, 0x5f, 0x99, 0x00, 0x0e, 0x94, 0x9e, 0xc1, 0x85,
0x3f, 0x36, 0x76, 0x1c, 0x69, 0xb8, 0x48, 0xbf, 0x7a, 0x86, 0xa2, 0xc1, 0x2f, 0x3c, 0x84, 0x4c,
0xb2, 0x19, 0xc6, 0x18, 0x9e, 0xc4, 0xf5, 0xe5, 0xc9, 0x78, 0x22, 0x59, 0xa9, 0xec, 0x1d, 0x18,
0xea, 0xfe, 0x81, 0xa1, 0x7e, 0x3b, 0x30, 0xd4, 0x37, 0x87, 0x86, 0xb2, 0x7f, 0x68, 0x28, 0x9f,
0x0f, 0x0d, 0xe5, 0xe9, 0xe4, 0x23, 0xde, 0xe1, 0xff, 0x18, 0xfc, 0xa0, 0x6b, 0xd3, 0xfc, 0xa9,
0xbe, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x6e, 0x76, 0x95, 0x9d, 0x06, 0x00, 0x00,
// 653 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x3f, 0x6f, 0xd3, 0x5e,
0x14, 0xb5, 0x93, 0xfe, 0x9a, 0x5f, 0x6f, 0x50, 0x4b, 0xad, 0x08, 0x12, 0xb7, 0xb2, 0x23, 0xa3,
0x56, 0x91, 0x50, 0x6d, 0x1a, 0x24, 0x86, 0x32, 0x91, 0xa2, 0x0a, 0x90, 0x22, 0xc0, 0x48, 0x20,
0xb1, 0x14, 0x27, 0x71, 0x5d, 0x8b, 0xc4, 0xd7, 0xca, 0x7b, 0x89, 0x9a, 0x8d, 0x91, 0x09,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77, 0xdf, 0x50, 0x3e, 0xef, 0x1b, 0xca,
0xd3, 0xf1, 0x57, 0xbc, 0xc5, 0xfe, 0x31, 0xd8, 0x45, 0x37, 0x26, 0xd9, 0x53, 0x7d, 0xfd, 0x77,
0x00, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x6c, 0x75, 0x57, 0x9d, 0x06, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -420,7 +420,7 @@ type MsgClient interface {
// Vote defines a method to add a vote on a specific proposal.
Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error)
// WeightedVote defines a method to add a weighted vote on a specific proposal.
WeightedVote(ctx context.Context, in *MsgWeightedVote, opts ...grpc.CallOption) (*MsgWeightedVoteResponse, error)
VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error)
// Deposit defines a method to add deposit on a specific proposal.
Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error)
}
@ -451,9 +451,9 @@ func (c *msgClient) Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOpti
return out, nil
}
func (c *msgClient) WeightedVote(ctx context.Context, in *MsgWeightedVote, opts ...grpc.CallOption) (*MsgWeightedVoteResponse, error) {
out := new(MsgWeightedVoteResponse)
err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Msg/WeightedVote", in, out, opts...)
func (c *msgClient) VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error) {
out := new(MsgVoteWeightedResponse)
err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Msg/VoteWeighted", in, out, opts...)
if err != nil {
return nil, err
}
@ -476,7 +476,7 @@ type MsgServer interface {
// Vote defines a method to add a vote on a specific proposal.
Vote(context.Context, *MsgVote) (*MsgVoteResponse, error)
// WeightedVote defines a method to add a weighted vote on a specific proposal.
WeightedVote(context.Context, *MsgWeightedVote) (*MsgWeightedVoteResponse, error)
VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error)
// Deposit defines a method to add deposit on a specific proposal.
Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error)
}
@ -491,8 +491,8 @@ func (*UnimplementedMsgServer) SubmitProposal(ctx context.Context, req *MsgSubmi
func (*UnimplementedMsgServer) Vote(ctx context.Context, req *MsgVote) (*MsgVoteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented")
}
func (*UnimplementedMsgServer) WeightedVote(ctx context.Context, req *MsgWeightedVote) (*MsgWeightedVoteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method WeightedVote not implemented")
func (*UnimplementedMsgServer) VoteWeighted(ctx context.Context, req *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method VoteWeighted not implemented")
}
func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented")
@ -538,20 +538,20 @@ func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{
return interceptor(ctx, in, info, handler)
}
func _Msg_WeightedVote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgWeightedVote)
func _Msg_VoteWeighted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgVoteWeighted)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).WeightedVote(ctx, in)
return srv.(MsgServer).VoteWeighted(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmos.gov.v1beta1.Msg/WeightedVote",
FullMethod: "/cosmos.gov.v1beta1.Msg/VoteWeighted",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).WeightedVote(ctx, req.(*MsgWeightedVote))
return srv.(MsgServer).VoteWeighted(ctx, req.(*MsgVoteWeighted))
}
return interceptor(ctx, in, info, handler)
}
@ -587,8 +587,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
Handler: _Msg_Vote_Handler,
},
{
MethodName: "WeightedVote",
Handler: _Msg_WeightedVote_Handler,
MethodName: "VoteWeighted",
Handler: _Msg_VoteWeighted_Handler,
},
{
MethodName: "Deposit",
@ -723,7 +723,7 @@ func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *MsgWeightedVote) Marshal() (dAtA []byte, err error) {
func (m *MsgVoteWeighted) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@ -733,12 +733,12 @@ func (m *MsgWeightedVote) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
func (m *MsgWeightedVote) MarshalTo(dAtA []byte) (int, error) {
func (m *MsgVoteWeighted) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgWeightedVote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
func (m *MsgVoteWeighted) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
@ -795,7 +795,7 @@ func (m *MsgVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *MsgWeightedVoteResponse) Marshal() (dAtA []byte, err error) {
func (m *MsgVoteWeightedResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@ -805,12 +805,12 @@ func (m *MsgWeightedVoteResponse) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
func (m *MsgWeightedVoteResponse) MarshalTo(dAtA []byte) (int, error) {
func (m *MsgVoteWeightedResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgWeightedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
func (m *MsgVoteWeightedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
@ -955,7 +955,7 @@ func (m *MsgVote) Size() (n int) {
return n
}
func (m *MsgWeightedVote) Size() (n int) {
func (m *MsgVoteWeighted) Size() (n int) {
if m == nil {
return 0
}
@ -986,7 +986,7 @@ func (m *MsgVoteResponse) Size() (n int) {
return n
}
func (m *MsgWeightedVoteResponse) Size() (n int) {
func (m *MsgVoteWeightedResponse) Size() (n int) {
if m == nil {
return 0
}
@ -1373,7 +1373,7 @@ func (m *MsgVote) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *MsgWeightedVote) Unmarshal(dAtA []byte) error {
func (m *MsgVoteWeighted) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@ -1396,10 +1396,10 @@ func (m *MsgWeightedVote) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MsgWeightedVote: wiretype end group for non-group")
return fmt.Errorf("proto: MsgVoteWeighted: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgWeightedVote: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: MsgVoteWeighted: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@ -1558,7 +1558,7 @@ func (m *MsgVoteResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *MsgWeightedVoteResponse) Unmarshal(dAtA []byte) error {
func (m *MsgVoteWeightedResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@ -1581,10 +1581,10 @@ func (m *MsgWeightedVoteResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MsgWeightedVoteResponse: wiretype end group for non-group")
return fmt.Errorf("proto: MsgVoteWeightedResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgWeightedVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: MsgVoteWeightedResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default: