Update gov types
This commit is contained in:
parent
a89eb77841
commit
7562c2765a
|
@ -356,6 +356,46 @@ func (m *MsgSubmitEvidence) XXX_DiscardUnknown() {
|
|||
|
||||
var xxx_messageInfo_MsgSubmitEvidence proto.InternalMessageInfo
|
||||
|
||||
// MsgSubmitProposal defines the application-level message type for handling
|
||||
// governance proposals.
|
||||
type MsgSubmitProposal struct {
|
||||
Content *Content `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
|
||||
types4.MsgSubmitProposalBase `protobuf:"bytes,2,opt,name=base,proto3,embedded=base" json:"base"`
|
||||
}
|
||||
|
||||
func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} }
|
||||
func (m *MsgSubmitProposal) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgSubmitProposal) ProtoMessage() {}
|
||||
func (*MsgSubmitProposal) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_3c6d4085e4065f5a, []int{4}
|
||||
}
|
||||
func (m *MsgSubmitProposal) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgSubmitProposal.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *MsgSubmitProposal) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgSubmitProposal.Merge(m, src)
|
||||
}
|
||||
func (m *MsgSubmitProposal) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgSubmitProposal) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgSubmitProposal.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgSubmitProposal proto.InternalMessageInfo
|
||||
|
||||
// Proposal defines the application-level concrete proposal type used in governance
|
||||
// proposals.
|
||||
type Proposal struct {
|
||||
|
@ -367,7 +407,7 @@ func (m *Proposal) Reset() { *m = Proposal{} }
|
|||
func (m *Proposal) String() string { return proto.CompactTextString(m) }
|
||||
func (*Proposal) ProtoMessage() {}
|
||||
func (*Proposal) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_3c6d4085e4065f5a, []int{4}
|
||||
return fileDescriptor_3c6d4085e4065f5a, []int{5}
|
||||
}
|
||||
func (m *Proposal) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
|
@ -419,7 +459,7 @@ func (m *Content) Reset() { *m = Content{} }
|
|||
func (m *Content) String() string { return proto.CompactTextString(m) }
|
||||
func (*Content) ProtoMessage() {}
|
||||
func (*Content) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_3c6d4085e4065f5a, []int{5}
|
||||
return fileDescriptor_3c6d4085e4065f5a, []int{6}
|
||||
}
|
||||
func (m *Content) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
|
@ -450,6 +490,7 @@ var xxx_messageInfo_Content proto.InternalMessageInfo
|
|||
|
||||
type isContent_Sum interface {
|
||||
isContent_Sum()
|
||||
Equal(interface{}) bool
|
||||
MarshalTo([]byte) (int, error)
|
||||
Size() int
|
||||
}
|
||||
|
@ -534,6 +575,7 @@ func init() {
|
|||
proto.RegisterType((*Supply)(nil), "cosmos_sdk.simapp.codec.v1.Supply")
|
||||
proto.RegisterType((*Evidence)(nil), "cosmos_sdk.simapp.codec.v1.Evidence")
|
||||
proto.RegisterType((*MsgSubmitEvidence)(nil), "cosmos_sdk.simapp.codec.v1.MsgSubmitEvidence")
|
||||
proto.RegisterType((*MsgSubmitProposal)(nil), "cosmos_sdk.simapp.codec.v1.MsgSubmitProposal")
|
||||
proto.RegisterType((*Proposal)(nil), "cosmos_sdk.simapp.codec.v1.Proposal")
|
||||
proto.RegisterType((*Content)(nil), "cosmos_sdk.simapp.codec.v1.Content")
|
||||
}
|
||||
|
@ -541,61 +583,62 @@ func init() {
|
|||
func init() { proto.RegisterFile("simapp/codec/codec.proto", fileDescriptor_3c6d4085e4065f5a) }
|
||||
|
||||
var fileDescriptor_3c6d4085e4065f5a = []byte{
|
||||
// 850 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x56, 0xcf, 0x8e, 0xdb, 0x44,
|
||||
0x18, 0xb7, 0x69, 0xba, 0x1b, 0x4d, 0x0b, 0x94, 0x11, 0x65, 0xa3, 0x80, 0x92, 0x92, 0x42, 0xc5,
|
||||
0x1f, 0xc5, 0x6e, 0x69, 0xa1, 0x6d, 0x2e, 0xa5, 0x09, 0x8b, 0x82, 0xc4, 0xa2, 0x55, 0x16, 0x38,
|
||||
0x20, 0x90, 0xe5, 0x8c, 0x07, 0xc7, 0x5a, 0xdb, 0x33, 0x78, 0xc6, 0xc6, 0x79, 0x03, 0xc4, 0x69,
|
||||
0x1f, 0x80, 0xc3, 0x8a, 0x07, 0xe0, 0xb4, 0x47, 0x1e, 0x60, 0xb5, 0xa7, 0x3d, 0x72, 0x5a, 0xa1,
|
||||
0xdd, 0x0b, 0x8f, 0x81, 0x3c, 0x33, 0x76, 0x6c, 0xd9, 0xc9, 0x5e, 0xac, 0x78, 0xbe, 0xdf, 0xbf,
|
||||
0xb1, 0xe7, 0xfb, 0x1c, 0xd0, 0x61, 0x5e, 0x60, 0x53, 0x6a, 0x22, 0xe2, 0x60, 0x24, 0xaf, 0x06,
|
||||
0x8d, 0x08, 0x27, 0xb0, 0x8b, 0x08, 0x0b, 0x08, 0xb3, 0x98, 0x73, 0x68, 0x48, 0x90, 0x21, 0xcb,
|
||||
0xc9, 0xa3, 0xee, 0xc7, 0x7c, 0xe1, 0x45, 0x8e, 0x45, 0xed, 0x88, 0x2f, 0x4d, 0x01, 0x37, 0x25,
|
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x00, 0x00, 0xff, 0xff, 0x17, 0x2b, 0x3f, 0x40, 0x9f, 0x08,
|
||||
0x00, 0x00,
|
||||
// 876 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x41, 0x6f, 0xe3, 0x44,
|
||||
0x14, 0xb6, 0x77, 0xb3, 0x6d, 0x34, 0xbb, 0xc0, 0x32, 0x62, 0x69, 0x14, 0x50, 0xb2, 0x64, 0x61,
|
||||
0x05, 0x8b, 0x6a, 0xef, 0x52, 0xa0, 0x6d, 0x24, 0x54, 0x9a, 0x50, 0x14, 0x24, 0x8a, 0xaa, 0x14,
|
||||
0x38, 0x20, 0x90, 0xe5, 0x8c, 0x07, 0xc7, 0xaa, 0xed, 0x19, 0x3c, 0x63, 0xe3, 0xfc, 0x03, 0xc4,
|
||||
0xa9, 0x3f, 0xa1, 0xe2, 0xc0, 0x91, 0x53, 0x8f, 0xfc, 0x80, 0xaa, 0xa7, 0x1e, 0x39, 0x55, 0xa8,
|
||||
0xbd, 0xf0, 0x33, 0x90, 0x3d, 0x63, 0xc7, 0x96, 0x9d, 0x64, 0x2f, 0x56, 0x3c, 0xef, 0x7b, 0xdf,
|
||||
0xf7, 0x8d, 0x67, 0xde, 0x7b, 0x01, 0x2d, 0xe6, 0x78, 0x26, 0xa5, 0x3a, 0x22, 0x16, 0x46, 0xe2,
|
||||
0xa9, 0xd1, 0x80, 0x70, 0x02, 0xdb, 0x88, 0x30, 0x8f, 0x30, 0x83, 0x59, 0x27, 0x9a, 0x00, 0x69,
|
||||
0x22, 0x1c, 0xbd, 0x68, 0x7f, 0xc8, 0xa7, 0x4e, 0x60, 0x19, 0xd4, 0x0c, 0xf8, 0x4c, 0x4f, 0xe1,
|
||||
0xba, 0x40, 0x6f, 0x16, 0x5f, 0x04, 0x51, 0xfb, 0x69, 0x15, 0x6c, 0x13, 0x9b, 0xcc, 0x7f, 0x49,
|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 0x22,
|
||||
0x7a, 0x37, 0x15, 0xdd, 0x5a, 0x2e, 0xfa, 0x85, 0x48, 0xae, 0x28, 0x3e, 0xb2, 0xea, 0x02, 0x90,
|
||||
0x82, 0x16, 0xc5, 0x81, 0x43, 0x2c, 0x07, 0x55, 0xf4, 0x1a, 0xa9, 0xde, 0xc7, 0xcb, 0xf5, 0x8e,
|
||||
0x64, 0x76, 0x45, 0xf0, 0x4d, 0x5a, 0x1b, 0x81, 0xdf, 0x80, 0x57, 0x3d, 0x62, 0x85, 0xee, 0xfc,
|
||||
0x88, 0xee, 0xa5, 0x3a, 0xef, 0x95, 0x75, 0xc4, 0x3d, 0x4c, 0x14, 0x0e, 0x53, 0xf4, 0x9c, 0xf8,
|
||||
0x15, 0xaf, 0xb8, 0xd0, 0xdf, 0xbd, 0x3c, 0xdf, 0xfc, 0xe4, 0x99, 0xed, 0xf0, 0x69, 0x38, 0xd1,
|
||||
0x10, 0xf1, 0x64, 0xd5, 0x64, 0x95, 0xc4, 0xac, 0x13, 0x5d, 0xde, 0x7b, 0x1c, 0x53, 0x12, 0x70,
|
||||
0x6c, 0x69, 0x32, 0x75, 0x70, 0x0f, 0xdc, 0x65, 0xa1, 0xd7, 0xfb, 0x5d, 0x05, 0x6b, 0xc7, 0xa9,
|
||||
0x1c, 0xdc, 0x01, 0x6b, 0x42, 0x58, 0xde, 0x9b, 0xce, 0x22, 0x53, 0x02, 0x3f, 0x52, 0xc6, 0x12,
|
||||
0xdf, 0xdf, 0xfb, 0xef, 0xac, 0xab, 0x5e, 0x9e, 0x6f, 0x6e, 0xaf, 0xb2, 0x22, 0x0b, 0x2c, 0x37,
|
||||
0x23, 0x98, 0xbe, 0xca, 0xcc, 0xfc, 0xa1, 0x82, 0xe6, 0x81, 0xac, 0x33, 0xf8, 0x35, 0x78, 0x80,
|
||||
0x7f, 0x09, 0x9d, 0x88, 0x20, 0x33, 0xb9, 0xfa, 0xd2, 0xd4, 0xd3, 0xb2, 0xa9, 0xac, 0x2a, 0x13,
|
||||
0x5b, 0x07, 0x05, 0xf4, 0x48, 0x19, 0x97, 0xb2, 0xfb, 0xfb, 0xd2, 0xe2, 0xee, 0x0a, 0x87, 0x79,
|
||||
0x99, 0xe7, 0x1e, 0x33, 0x43, 0x99, 0xc9, 0xbf, 0x54, 0xf0, 0xfa, 0x21, 0xb3, 0x8f, 0xc3, 0x89,
|
||||
0xe7, 0xf0, 0xdc, 0xed, 0xe7, 0xa0, 0x99, 0xa5, 0x4a, 0xa7, 0xef, 0x6a, 0x8b, 0xbb, 0x5f, 0x4e,
|
||||
0x3a, 0xce, 0xb3, 0xe0, 0x21, 0x68, 0x24, 0x35, 0x28, 0xcb, 0x4b, 0x5f, 0xbc, 0xcf, 0x8a, 0x78,
|
||||
0x52, 0xc9, 0x83, 0xe6, 0xc5, 0x75, 0x57, 0xb9, 0xba, 0xee, 0xaa, 0xe3, 0x94, 0xa6, 0xdf, 0xfc,
|
||||
0xed, 0xac, 0xab, 0x24, 0x9b, 0xee, 0xfd, 0x59, 0x34, 0x7c, 0x24, 0x5b, 0x10, 0xfc, 0x0c, 0xac,
|
||||
0x27, 0x75, 0x88, 0xf3, 0x36, 0xf1, 0x64, 0x99, 0xdf, 0xa1, 0x80, 0x8e, 0xb3, 0x1c, 0x38, 0x2a,
|
||||
0xb9, 0x7d, 0x56, 0x76, 0x6b, 0x93, 0xa8, 0x64, 0x34, 0x13, 0x5d, 0x61, 0xf4, 0x54, 0x05, 0xcd,
|
||||
0xdc, 0xdf, 0x9e, 0x14, 0xa8, 0xed, 0x61, 0x52, 0x60, 0x19, 0x2f, 0x1c, 0xce, 0x37, 0x78, 0xe7,
|
||||
0xa5, 0x37, 0x38, 0x68, 0x24, 0x2c, 0xf9, 0x36, 0x7b, 0x67, 0x0d, 0xb0, 0x2e, 0x43, 0x70, 0x1b,
|
||||
0x34, 0x38, 0x8e, 0xf9, 0x52, 0x47, 0xdf, 0xe2, 0x38, 0xdf, 0xed, 0x48, 0x19, 0xa7, 0x09, 0xf0,
|
||||
0x47, 0xf0, 0x30, 0x1d, 0x03, 0x98, 0xe3, 0xc0, 0x40, 0x53, 0xd3, 0xb7, 0x17, 0x9c, 0xb2, 0x18,
|
||||
0x16, 0xe9, 0xce, 0x32, 0xfc, 0x30, 0x85, 0x17, 0x28, 0x5f, 0xa3, 0xe5, 0x10, 0xfc, 0x09, 0x3c,
|
||||
0x64, 0xe4, 0x67, 0xfe, 0xab, 0x19, 0x60, 0x43, 0x0e, 0x12, 0xd9, 0x2d, 0x9f, 0x97, 0xd9, 0x65,
|
||||
0x30, 0xad, 0x60, 0x99, 0xf0, 0x9d, 0x58, 0x2a, 0xd2, 0xb3, 0x72, 0x08, 0x52, 0xb0, 0x81, 0x4c,
|
||||
0x1f, 0x61, 0xd7, 0xa8, 0xa8, 0x34, 0xea, 0x06, 0x41, 0x41, 0x65, 0x98, 0xe6, 0x2d, 0xd6, 0x7a,
|
||||
0x84, 0xea, 0x00, 0xd0, 0x05, 0x6f, 0x20, 0xe2, 0x79, 0xa1, 0xef, 0xf0, 0x99, 0x41, 0x09, 0x71,
|
||||
0x0d, 0x46, 0xb1, 0x6f, 0xc9, 0x56, 0xb9, 0x53, 0x96, 0x2b, 0x4e, 0x47, 0x71, 0x8e, 0x32, 0xf3,
|
||||
0x88, 0x10, 0xf7, 0x38, 0xc9, 0x2b, 0x08, 0x42, 0x54, 0x89, 0xf6, 0x77, 0x64, 0x63, 0x78, 0xbe,
|
||||
0xa2, 0x31, 0xe4, 0x13, 0x3e, 0xbf, 0x2a, 0xa2, 0x1f, 0x0c, 0x86, 0x17, 0x37, 0x1d, 0xf5, 0xea,
|
||||
0xa6, 0xa3, 0xfe, 0x7b, 0xd3, 0x51, 0x4f, 0x6f, 0x3b, 0xca, 0xd5, 0x6d, 0x47, 0xf9, 0xe7, 0xb6,
|
||||
0xa3, 0xfc, 0xf0, 0xc1, 0x52, 0xca, 0xe2, 0xbf, 0xa6, 0xc9, 0x5a, 0x3a, 0xcc, 0xb7, 0xfe, 0x0f,
|
||||
0x00, 0x00, 0xff, 0xff, 0x22, 0x64, 0xee, 0x71, 0x4c, 0x09, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (this *Supply) Equal(that interface{}) bool {
|
||||
|
@ -733,6 +776,183 @@ func (this *MsgSubmitEvidence) Equal(that interface{}) bool {
|
|||
}
|
||||
return true
|
||||
}
|
||||
func (this *MsgSubmitProposal) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*MsgSubmitProposal)
|
||||
if !ok {
|
||||
that2, ok := that.(MsgSubmitProposal)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !this.Content.Equal(that1.Content) {
|
||||
return false
|
||||
}
|
||||
if !this.MsgSubmitProposalBase.Equal(&that1.MsgSubmitProposalBase) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *Content) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*Content)
|
||||
if !ok {
|
||||
that2, ok := that.(Content)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if that1.Sum == nil {
|
||||
if this.Sum != nil {
|
||||
return false
|
||||
}
|
||||
} else if this.Sum == nil {
|
||||
return false
|
||||
} else if !this.Sum.Equal(that1.Sum) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *Content_Text) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*Content_Text)
|
||||
if !ok {
|
||||
that2, ok := that.(Content_Text)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !this.Text.Equal(that1.Text) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *Content_ParameterChange) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*Content_ParameterChange)
|
||||
if !ok {
|
||||
that2, ok := that.(Content_ParameterChange)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !this.ParameterChange.Equal(that1.ParameterChange) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *Content_SoftwareUpgrade) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*Content_SoftwareUpgrade)
|
||||
if !ok {
|
||||
that2, ok := that.(Content_SoftwareUpgrade)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !this.SoftwareUpgrade.Equal(that1.SoftwareUpgrade) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *Content_CancelSoftwareUpgrade) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*Content_CancelSoftwareUpgrade)
|
||||
if !ok {
|
||||
that2, ok := that.(Content_CancelSoftwareUpgrade)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !this.CancelSoftwareUpgrade.Equal(that1.CancelSoftwareUpgrade) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *Content_CommunityPoolSpend) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*Content_CommunityPoolSpend)
|
||||
if !ok {
|
||||
that2, ok := that.(Content_CommunityPoolSpend)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !this.CommunityPoolSpend.Equal(that1.CommunityPoolSpend) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *Account) GetAccount() github_com_cosmos_cosmos_sdk_x_auth_exported.Account {
|
||||
if x := this.GetBaseAccount(); x != nil {
|
||||
return x
|
||||
|
@ -1167,6 +1387,51 @@ func (m *MsgSubmitEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgSubmitProposal) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *MsgSubmitProposal) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
{
|
||||
size, err := m.MsgSubmitProposalBase.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintCodec(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
if m.Content != nil {
|
||||
{
|
||||
size, err := m.Content.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintCodec(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *Proposal) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
|
@ -1493,6 +1758,21 @@ func (m *MsgSubmitEvidence) Size() (n int) {
|
|||
return n
|
||||
}
|
||||
|
||||
func (m *MsgSubmitProposal) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Content != nil {
|
||||
l = m.Content.Size()
|
||||
n += 1 + l + sovCodec(uint64(l))
|
||||
}
|
||||
l = m.MsgSubmitProposalBase.Size()
|
||||
n += 1 + l + sovCodec(uint64(l))
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *Proposal) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
|
@ -2111,6 +2391,128 @@ func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowCodec
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: MsgSubmitProposal: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgSubmitProposal: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowCodec
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthCodec
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthCodec
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Content == nil {
|
||||
m.Content = &Content{}
|
||||
}
|
||||
if err := m.Content.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field MsgSubmitProposalBase", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowCodec
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthCodec
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthCodec
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.MsgSubmitProposalBase.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipCodec(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthCodec
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthCodec
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *Proposal) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
|
|
@ -61,6 +61,16 @@ message MsgSubmitEvidence {
|
|||
cosmos_sdk.x.evidence.v1.MsgSubmitEvidenceBase base = 2 [(gogoproto.nullable) = false, (gogoproto.embed) = true];
|
||||
}
|
||||
|
||||
// MsgSubmitProposal defines the application-level message type for handling
|
||||
// governance proposals.
|
||||
message MsgSubmitProposal {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
Content content = 1;
|
||||
cosmos_sdk.x.gov.v1.MsgSubmitProposalBase base = 2 [(gogoproto.nullable) = false, (gogoproto.embed) = true];
|
||||
}
|
||||
|
||||
// Proposal defines the application-level concrete proposal type used in governance
|
||||
// proposals.
|
||||
message Proposal {
|
||||
|
@ -71,6 +81,7 @@ message Proposal {
|
|||
// Content defines the application-level allowed Content to be included in a
|
||||
// governance proposal.
|
||||
message Content {
|
||||
option (gogoproto.equal) = true;
|
||||
option (cosmos_proto.interface_type) = "github.com/cosmos/cosmos-sdk/x/gov/types.Content";
|
||||
|
||||
oneof sum {
|
||||
|
|
|
@ -5,9 +5,13 @@ import (
|
|||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/cosmos/cosmos-sdk/x/evidence"
|
||||
eviexported "github.com/cosmos/cosmos-sdk/x/evidence/exported"
|
||||
"github.com/cosmos/cosmos-sdk/x/gov"
|
||||
)
|
||||
|
||||
var _ eviexported.MsgSubmitEvidence = MsgSubmitEvidence{}
|
||||
var (
|
||||
_ eviexported.MsgSubmitEvidence = MsgSubmitEvidence{}
|
||||
_ gov.MsgSubmitProposal = MsgSubmitProposal{}
|
||||
)
|
||||
|
||||
// NewMsgSubmitEvidence returns a new MsgSubmitEvidence.
|
||||
func NewMsgSubmitEvidence(evidenceI eviexported.Evidence, s sdk.AccAddress) (MsgSubmitEvidence, error) {
|
||||
|
@ -16,7 +20,10 @@ func NewMsgSubmitEvidence(evidenceI eviexported.Evidence, s sdk.AccAddress) (Msg
|
|||
return MsgSubmitEvidence{}, err
|
||||
}
|
||||
|
||||
return MsgSubmitEvidence{Evidence: e, MsgSubmitEvidenceBase: evidence.NewMsgSubmitEvidenceBase(s)}, nil
|
||||
return MsgSubmitEvidence{
|
||||
Evidence: e,
|
||||
MsgSubmitEvidenceBase: evidence.NewMsgSubmitEvidenceBase(s),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ValidateBasic performs basic (non-state-dependant) validation on a
|
||||
|
@ -38,3 +45,40 @@ func (msg MsgSubmitEvidence) ValidateBasic() error {
|
|||
// nolint
|
||||
func (msg MsgSubmitEvidence) GetEvidence() eviexported.Evidence { return msg.Evidence.GetEvidence() }
|
||||
func (msg MsgSubmitEvidence) GetSubmitter() sdk.AccAddress { return msg.Submitter }
|
||||
|
||||
// NewMsgSubmitProposal returns a new MsgSubmitProposal.
|
||||
func NewMsgSubmitProposal(c gov.Content, d sdk.Coins, p sdk.AccAddress) (MsgSubmitProposal, error) {
|
||||
content := &Content{}
|
||||
if err := content.SetContent(c); err != nil {
|
||||
return MsgSubmitProposal{}, err
|
||||
}
|
||||
|
||||
return MsgSubmitProposal{
|
||||
Content: content,
|
||||
MsgSubmitProposalBase: gov.NewMsgSubmitProposalBase(d, p),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ValidateBasic performs basic (non-state-dependant) validation on a
|
||||
// MsgSubmitProposal.
|
||||
func (msg MsgSubmitProposal) ValidateBasic() error {
|
||||
if err := msg.MsgSubmitProposalBase.ValidateBasic(); err != nil {
|
||||
return nil
|
||||
}
|
||||
if msg.Content == nil {
|
||||
return sdkerrors.Wrap(gov.ErrInvalidProposalContent, "missing content")
|
||||
}
|
||||
if !gov.IsValidProposalType(msg.Content.GetContent().ProposalType()) {
|
||||
return sdkerrors.Wrap(gov.ErrInvalidProposalType, msg.Content.GetContent().ProposalType())
|
||||
}
|
||||
if err := msg.Content.GetContent().ValidateBasic(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// nolint
|
||||
func (msg MsgSubmitProposal) GetContent() gov.Content { return msg.Content.GetContent() }
|
||||
func (msg MsgSubmitProposal) GetInitialDeposit() sdk.Coins { return msg.InitialDeposit }
|
||||
func (msg MsgSubmitProposal) GetProposer() sdk.AccAddress { return msg.Proposer }
|
||||
|
|
|
@ -82,7 +82,7 @@ var (
|
|||
SplitInactiveProposalQueueKey = types.SplitInactiveProposalQueueKey
|
||||
SplitKeyDeposit = types.SplitKeyDeposit
|
||||
SplitKeyVote = types.SplitKeyVote
|
||||
NewMsgSubmitProposal = types.NewMsgSubmitProposal
|
||||
NewMsgSubmitProposalBase = types.NewMsgSubmitProposalBase
|
||||
NewMsgDeposit = types.NewMsgDeposit
|
||||
NewMsgVote = types.NewMsgVote
|
||||
ParamKeyTable = types.ParamKeyTable
|
||||
|
@ -125,32 +125,33 @@ var (
|
|||
)
|
||||
|
||||
type (
|
||||
Keeper = keeper.Keeper
|
||||
Content = types.Content
|
||||
Handler = types.Handler
|
||||
Deposit = types.Deposit
|
||||
Deposits = types.Deposits
|
||||
GenesisState = types.GenesisState
|
||||
MsgSubmitProposal = types.MsgSubmitProposal
|
||||
MsgDeposit = types.MsgDeposit
|
||||
MsgVote = types.MsgVote
|
||||
DepositParams = types.DepositParams
|
||||
TallyParams = types.TallyParams
|
||||
VotingParams = types.VotingParams
|
||||
Params = types.Params
|
||||
Proposal = types.Proposal
|
||||
Proposals = types.Proposals
|
||||
ProposalQueue = types.ProposalQueue
|
||||
ProposalStatus = types.ProposalStatus
|
||||
TextProposal = types.TextProposal
|
||||
QueryProposalParams = types.QueryProposalParams
|
||||
QueryDepositParams = types.QueryDepositParams
|
||||
QueryVoteParams = types.QueryVoteParams
|
||||
QueryProposalsParams = types.QueryProposalsParams
|
||||
ValidatorGovInfo = types.ValidatorGovInfo
|
||||
TallyResult = types.TallyResult
|
||||
Vote = types.Vote
|
||||
Votes = types.Votes
|
||||
VoteOption = types.VoteOption
|
||||
Codec = types.Codec
|
||||
Keeper = keeper.Keeper
|
||||
Content = types.Content
|
||||
Handler = types.Handler
|
||||
Deposit = types.Deposit
|
||||
Deposits = types.Deposits
|
||||
GenesisState = types.GenesisState
|
||||
MsgSubmitProposal = types.MsgSubmitProposal
|
||||
MsgSubmitProposalBase = types.MsgSubmitProposalBase
|
||||
MsgDeposit = types.MsgDeposit
|
||||
MsgVote = types.MsgVote
|
||||
DepositParams = types.DepositParams
|
||||
TallyParams = types.TallyParams
|
||||
VotingParams = types.VotingParams
|
||||
Params = types.Params
|
||||
Proposal = types.Proposal
|
||||
Proposals = types.Proposals
|
||||
ProposalQueue = types.ProposalQueue
|
||||
ProposalStatus = types.ProposalStatus
|
||||
TextProposal = types.TextProposal
|
||||
QueryProposalParams = types.QueryProposalParams
|
||||
QueryDepositParams = types.QueryDepositParams
|
||||
QueryVoteParams = types.QueryVoteParams
|
||||
QueryProposalsParams = types.QueryProposalsParams
|
||||
ValidatorGovInfo = types.ValidatorGovInfo
|
||||
TallyResult = types.TallyResult
|
||||
Vote = types.Vote
|
||||
Votes = types.Votes
|
||||
VoteOption = types.VoteOption
|
||||
Codec = types.Codec
|
||||
)
|
||||
|
|
|
@ -16,7 +16,7 @@ type Codec interface {
|
|||
// governance module.
|
||||
func RegisterCodec(cdc *codec.Codec) {
|
||||
cdc.RegisterInterface((*Content)(nil), nil)
|
||||
cdc.RegisterConcrete(MsgSubmitProposal{}, "cosmos-sdk/MsgSubmitProposal", nil)
|
||||
cdc.RegisterConcrete(MsgSubmitProposalBase{}, "cosmos-sdk/MsgSubmitProposalBase", nil)
|
||||
cdc.RegisterConcrete(MsgDeposit{}, "cosmos-sdk/MsgDeposit", nil)
|
||||
cdc.RegisterConcrete(MsgVote{}, "cosmos-sdk/MsgVote", nil)
|
||||
cdc.RegisterConcrete(TextProposal{}, "cosmos-sdk/TextProposal", nil)
|
||||
|
|
|
@ -3,6 +3,8 @@ package types
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
|
@ -12,8 +14,8 @@ func NewDeposit(proposalID uint64, depositor sdk.AccAddress, amount sdk.Coins) D
|
|||
}
|
||||
|
||||
func (d Deposit) String() string {
|
||||
return fmt.Sprintf("deposit by %s on Proposal %d is for the amount %s",
|
||||
d.Depositor, d.ProposalID, d.Amount)
|
||||
out, _ := yaml.Marshal(d)
|
||||
return string(out)
|
||||
}
|
||||
|
||||
// Deposits is a collection of Deposit objects
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package types
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
@ -38,16 +37,14 @@ func DefaultGenesisState() GenesisState {
|
|||
)
|
||||
}
|
||||
|
||||
// Equal checks whether two gov GenesisState structs are equivalent
|
||||
func (data GenesisState) Equal(data2 GenesisState) bool {
|
||||
b1 := ModuleCdc.MustMarshalBinaryBare(data)
|
||||
b2 := ModuleCdc.MustMarshalBinaryBare(data2)
|
||||
return bytes.Equal(b1, b2)
|
||||
}
|
||||
|
||||
// IsEmpty returns true if a GenesisState is empty
|
||||
func (data GenesisState) IsEmpty() bool {
|
||||
return data.Equal(GenesisState{})
|
||||
return data.Deposits == nil &&
|
||||
data.Votes == nil &&
|
||||
data.Proposals == nil &&
|
||||
data.DepositParams.Equal(DepositParams{}) &&
|
||||
data.TallyParams.Equal(TallyParams{}) &&
|
||||
data.VotingParams.Equal(VotingParams{})
|
||||
}
|
||||
|
||||
// ValidateGenesis checks if parameters are within valid ranges
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package types
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
|
@ -14,32 +14,35 @@ const (
|
|||
TypeMsgSubmitProposal = "submit_proposal"
|
||||
)
|
||||
|
||||
var _, _, _ sdk.Msg = MsgSubmitProposal{}, MsgDeposit{}, MsgVote{}
|
||||
var _, _, _ sdk.Msg = MsgSubmitProposalBase{}, MsgDeposit{}, MsgVote{}
|
||||
|
||||
// MsgSubmitProposal defines a message to create a governance proposal with a
|
||||
// given content and initial deposit
|
||||
type MsgSubmitProposal struct {
|
||||
Content Content `json:"content" yaml:"content"`
|
||||
InitialDeposit sdk.Coins `json:"initial_deposit" yaml:"initial_deposit"` // Initial deposit paid by sender. Must be strictly positive
|
||||
Proposer sdk.AccAddress `json:"proposer" yaml:"proposer"` // Address of the proposer
|
||||
// MsgSubmitProposal defines the specific interface a concrete message must
|
||||
// implement in order to process governance proposals. The concrete MsgSubmitProposal
|
||||
// must be defined at the application-level.
|
||||
type MsgSubmitProposal interface {
|
||||
sdk.Msg
|
||||
|
||||
GetContent() Content
|
||||
GetInitialDeposit() sdk.Coins
|
||||
GetProposer() sdk.AccAddress
|
||||
}
|
||||
|
||||
// NewMsgSubmitProposal creates a new MsgSubmitProposal instance
|
||||
func NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer sdk.AccAddress) MsgSubmitProposal {
|
||||
return MsgSubmitProposal{content, initialDeposit, proposer}
|
||||
// NewMsgSubmitProposalBase creates a new MsgSubmitProposalBase.
|
||||
func NewMsgSubmitProposalBase(initialDeposit sdk.Coins, proposer sdk.AccAddress) MsgSubmitProposalBase {
|
||||
return MsgSubmitProposalBase{
|
||||
InitialDeposit: initialDeposit,
|
||||
Proposer: proposer,
|
||||
}
|
||||
}
|
||||
|
||||
// Route implements Msg
|
||||
func (msg MsgSubmitProposal) Route() string { return RouterKey }
|
||||
func (msg MsgSubmitProposalBase) Route() string { return RouterKey }
|
||||
|
||||
// Type implements Msg
|
||||
func (msg MsgSubmitProposal) Type() string { return TypeMsgSubmitProposal }
|
||||
func (msg MsgSubmitProposalBase) Type() string { return TypeMsgSubmitProposal }
|
||||
|
||||
// ValidateBasic implements Msg
|
||||
func (msg MsgSubmitProposal) ValidateBasic() error {
|
||||
if msg.Content == nil {
|
||||
return sdkerrors.Wrap(ErrInvalidProposalContent, "missing content")
|
||||
}
|
||||
func (msg MsgSubmitProposalBase) ValidateBasic() error {
|
||||
if msg.Proposer.Empty() {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Proposer.String())
|
||||
}
|
||||
|
@ -49,32 +52,27 @@ func (msg MsgSubmitProposal) ValidateBasic() error {
|
|||
if msg.InitialDeposit.IsAnyNegative() {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, msg.InitialDeposit.String())
|
||||
}
|
||||
if !IsValidProposalType(msg.Content.ProposalType()) {
|
||||
return sdkerrors.Wrap(ErrInvalidProposalType, msg.Content.ProposalType())
|
||||
}
|
||||
|
||||
return msg.Content.ValidateBasic()
|
||||
}
|
||||
|
||||
// String implements the Stringer interface
|
||||
func (msg MsgSubmitProposal) String() string {
|
||||
return fmt.Sprintf(`Submit Proposal Message:
|
||||
Content: %s
|
||||
Initial Deposit: %s
|
||||
`, msg.Content.String(), msg.InitialDeposit)
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetSignBytes implements Msg
|
||||
func (msg MsgSubmitProposal) GetSignBytes() []byte {
|
||||
func (msg MsgSubmitProposalBase) GetSignBytes() []byte {
|
||||
bz := ModuleCdc.MustMarshalJSON(msg)
|
||||
return sdk.MustSortJSON(bz)
|
||||
}
|
||||
|
||||
// GetSigners implements Msg
|
||||
func (msg MsgSubmitProposal) GetSigners() []sdk.AccAddress {
|
||||
func (msg MsgSubmitProposalBase) GetSigners() []sdk.AccAddress {
|
||||
return []sdk.AccAddress{msg.Proposer}
|
||||
}
|
||||
|
||||
// String implements the Stringer interface
|
||||
func (msg MsgSubmitProposalBase) String() string {
|
||||
out, _ := yaml.Marshal(msg)
|
||||
return string(out)
|
||||
}
|
||||
|
||||
// NewMsgDeposit creates a new MsgDeposit instance
|
||||
func NewMsgDeposit(depositor sdk.AccAddress, proposalID uint64, amount sdk.Coins) MsgDeposit {
|
||||
return MsgDeposit{proposalID, depositor, amount}
|
||||
|
@ -103,11 +101,8 @@ func (msg MsgDeposit) ValidateBasic() error {
|
|||
|
||||
// String implements the Stringer interface
|
||||
func (msg MsgDeposit) String() string {
|
||||
return fmt.Sprintf(`Deposit Message:
|
||||
Depositer: %s
|
||||
Proposal ID: %d
|
||||
Amount: %s
|
||||
`, msg.Depositor, msg.ProposalID, msg.Amount)
|
||||
out, _ := yaml.Marshal(msg)
|
||||
return string(out)
|
||||
}
|
||||
|
||||
// GetSignBytes implements Msg
|
||||
|
@ -146,10 +141,8 @@ func (msg MsgVote) ValidateBasic() error {
|
|||
|
||||
// String implements the Stringer interface
|
||||
func (msg MsgVote) String() string {
|
||||
return fmt.Sprintf(`Vote Message:
|
||||
Proposal ID: %d
|
||||
Option: %s
|
||||
`, msg.ProposalID, msg.Option)
|
||||
out, _ := yaml.Marshal(msg)
|
||||
return string(out)
|
||||
}
|
||||
|
||||
// GetSignBytes implements Msg
|
||||
|
|
|
@ -4,6 +4,8 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
)
|
||||
|
@ -61,9 +63,8 @@ func DefaultDepositParams() DepositParams {
|
|||
|
||||
// String implements stringer insterface
|
||||
func (dp DepositParams) String() string {
|
||||
return fmt.Sprintf(`Deposit Params:
|
||||
Min Deposit: %s
|
||||
Max Deposit Period: %s`, dp.MinDeposit, dp.MaxDepositPeriod)
|
||||
out, _ := yaml.Marshal(dp)
|
||||
return string(out)
|
||||
}
|
||||
|
||||
// Equal checks equality of DepositParams
|
||||
|
@ -108,13 +109,15 @@ func DefaultTallyParams() TallyParams {
|
|||
return NewTallyParams(DefaultQuorum, DefaultThreshold, DefaultVeto)
|
||||
}
|
||||
|
||||
// Equal checks equality of TallyParams
|
||||
func (tp TallyParams) Equal(other TallyParams) bool {
|
||||
return tp.Quorum.Equal(other.Quorum) && tp.Threshold.Equal(other.Threshold) && tp.Veto.Equal(other.Veto)
|
||||
}
|
||||
|
||||
// String implements stringer insterface
|
||||
func (tp TallyParams) String() string {
|
||||
return fmt.Sprintf(`Tally Params:
|
||||
Quorum: %s
|
||||
Threshold: %s
|
||||
Veto: %s`,
|
||||
tp.Quorum, tp.Threshold, tp.Veto)
|
||||
out, _ := yaml.Marshal(tp)
|
||||
return string(out)
|
||||
}
|
||||
|
||||
func validateTallyParams(i interface{}) error {
|
||||
|
@ -162,10 +165,15 @@ func DefaultVotingParams() VotingParams {
|
|||
return NewVotingParams(DefaultPeriod)
|
||||
}
|
||||
|
||||
// Equal checks equality of TallyParams
|
||||
func (vp VotingParams) Equal(other VotingParams) bool {
|
||||
return vp.VotingPeriod == other.VotingPeriod
|
||||
}
|
||||
|
||||
// String implements stringer interface
|
||||
func (vp VotingParams) String() string {
|
||||
return fmt.Sprintf(`Voting Params:
|
||||
Voting Period: %s`, vp.VotingPeriod)
|
||||
out, _ := yaml.Marshal(vp)
|
||||
return string(out)
|
||||
}
|
||||
|
||||
func validateVotingParams(i interface{}) error {
|
||||
|
|
|
@ -199,10 +199,8 @@ func (tp TextProposal) ValidateBasic() error { return ValidateAbstract(tp) }
|
|||
|
||||
// String implements Stringer interface
|
||||
func (tp TextProposal) String() string {
|
||||
return fmt.Sprintf(`Text Proposal:
|
||||
Title: %s
|
||||
Description: %s
|
||||
`, tp.Title, tp.Description)
|
||||
out, _ := yaml.Marshal(tp)
|
||||
return string(out)
|
||||
}
|
||||
|
||||
var validProposalTypes = map[string]struct{}{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package types
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
@ -63,9 +63,6 @@ func (tr TallyResult) Equals(comp TallyResult) bool {
|
|||
|
||||
// String implements stringer interface
|
||||
func (tr TallyResult) String() string {
|
||||
return fmt.Sprintf(`Tally Result:
|
||||
Yes: %s
|
||||
Abstain: %s
|
||||
No: %s
|
||||
NoWithVeto: %s`, tr.Yes, tr.Abstain, tr.No, tr.NoWithVeto)
|
||||
out, _ := yaml.Marshal(tr)
|
||||
return string(out)
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
package types
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
|
@ -15,8 +16,6 @@ import (
|
|||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
reflect "reflect"
|
||||
strings "strings"
|
||||
time "time"
|
||||
)
|
||||
|
||||
|
@ -97,9 +96,16 @@ func (ProposalStatus) EnumDescriptor() ([]byte, []int) {
|
|||
return fileDescriptor_a5ae5e91b5b3fb03, []int{1}
|
||||
}
|
||||
|
||||
// MsgSubmitProposalBase defines an sdk.Msg type that supports submitting arbitrary
|
||||
// proposal Content.
|
||||
//
|
||||
// Note, this message type provides the basis for which a true MsgSubmitProposal
|
||||
// can be constructed. Since the Content submitted in the message can be arbitrary,
|
||||
// assuming it fulfills the Content interface, it must be defined at the
|
||||
// application-level and extend MsgSubmitProposalBase.
|
||||
type MsgSubmitProposalBase struct {
|
||||
IntialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=intial_deposit,json=intialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"intial_deposit" yaml:"initial_deposit"`
|
||||
Proposer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=proposer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proposer,omitempty"`
|
||||
InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit" yaml:"initial_deposit"`
|
||||
Proposer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=proposer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proposer,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgSubmitProposalBase) Reset() { *m = MsgSubmitProposalBase{} }
|
||||
|
@ -134,45 +140,6 @@ func (m *MsgSubmitProposalBase) XXX_DiscardUnknown() {
|
|||
|
||||
var xxx_messageInfo_MsgSubmitProposalBase proto.InternalMessageInfo
|
||||
|
||||
// MsgDeposit defines a message to submit a deposit to an existing proposal
|
||||
type MsgDeposit struct {
|
||||
ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"`
|
||||
Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=depositor,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"depositor,omitempty"`
|
||||
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
|
||||
}
|
||||
|
||||
func (m *MsgDeposit) Reset() { *m = MsgDeposit{} }
|
||||
func (*MsgDeposit) ProtoMessage() {}
|
||||
func (*MsgDeposit) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a5ae5e91b5b3fb03, []int{1}
|
||||
}
|
||||
func (m *MsgDeposit) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgDeposit.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *MsgDeposit) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgDeposit.Merge(m, src)
|
||||
}
|
||||
func (m *MsgDeposit) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgDeposit) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgDeposit.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo
|
||||
|
||||
// MsgVote defines a message to cast a vote
|
||||
type MsgVote struct {
|
||||
ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"`
|
||||
|
@ -183,7 +150,7 @@ type MsgVote struct {
|
|||
func (m *MsgVote) Reset() { *m = MsgVote{} }
|
||||
func (*MsgVote) ProtoMessage() {}
|
||||
func (*MsgVote) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a5ae5e91b5b3fb03, []int{2}
|
||||
return fileDescriptor_a5ae5e91b5b3fb03, []int{1}
|
||||
}
|
||||
func (m *MsgVote) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
|
@ -212,6 +179,45 @@ func (m *MsgVote) XXX_DiscardUnknown() {
|
|||
|
||||
var xxx_messageInfo_MsgVote proto.InternalMessageInfo
|
||||
|
||||
// MsgDeposit defines a message to submit a deposit to an existing proposal
|
||||
type MsgDeposit struct {
|
||||
ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"`
|
||||
Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=depositor,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"depositor,omitempty"`
|
||||
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
|
||||
}
|
||||
|
||||
func (m *MsgDeposit) Reset() { *m = MsgDeposit{} }
|
||||
func (*MsgDeposit) ProtoMessage() {}
|
||||
func (*MsgDeposit) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a5ae5e91b5b3fb03, []int{2}
|
||||
}
|
||||
func (m *MsgDeposit) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgDeposit.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *MsgDeposit) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgDeposit.Merge(m, src)
|
||||
}
|
||||
func (m *MsgDeposit) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgDeposit) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgDeposit.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo
|
||||
|
||||
// TextProposal defines a standard text proposal whose changes need to be
|
||||
// manually updated in case of approval
|
||||
type TextProposal struct {
|
||||
|
@ -421,8 +427,8 @@ func init() {
|
|||
proto.RegisterEnum("cosmos_sdk.x.gov.v1.VoteOption", VoteOption_name, VoteOption_value)
|
||||
proto.RegisterEnum("cosmos_sdk.x.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value)
|
||||
proto.RegisterType((*MsgSubmitProposalBase)(nil), "cosmos_sdk.x.gov.v1.MsgSubmitProposalBase")
|
||||
proto.RegisterType((*MsgDeposit)(nil), "cosmos_sdk.x.gov.v1.MsgDeposit")
|
||||
proto.RegisterType((*MsgVote)(nil), "cosmos_sdk.x.gov.v1.MsgVote")
|
||||
proto.RegisterType((*MsgDeposit)(nil), "cosmos_sdk.x.gov.v1.MsgDeposit")
|
||||
proto.RegisterType((*TextProposal)(nil), "cosmos_sdk.x.gov.v1.TextProposal")
|
||||
proto.RegisterType((*Deposit)(nil), "cosmos_sdk.x.gov.v1.Deposit")
|
||||
proto.RegisterType((*ProposalBase)(nil), "cosmos_sdk.x.gov.v1.ProposalBase")
|
||||
|
@ -433,81 +439,305 @@ func init() {
|
|||
func init() { proto.RegisterFile("x/gov/types/types.proto", fileDescriptor_a5ae5e91b5b3fb03) }
|
||||
|
||||
var fileDescriptor_a5ae5e91b5b3fb03 = []byte{
|
||||
// 1181 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xc1, 0x6f, 0xd3, 0x56,
|
||||
0x18, 0xb7, 0x93, 0x36, 0x6d, 0x5f, 0xd2, 0x60, 0x5e, 0x3b, 0xc8, 0xac, 0xc9, 0x36, 0x06, 0xa1,
|
||||
0x8e, 0x09, 0x67, 0x94, 0xc3, 0x24, 0x0e, 0xd3, 0x62, 0x62, 0x20, 0x88, 0x26, 0x91, 0x13, 0x15,
|
||||
0xb1, 0x69, 0xb2, 0xdc, 0xd8, 0xb8, 0x1e, 0x8e, 0x5f, 0x96, 0xf7, 0x92, 0x91, 0x1b, 0xda, 0x61,
|
||||
0x9a, 0x72, 0x42, 0x3b, 0xed, 0x12, 0x09, 0x69, 0x1c, 0xd0, 0xb4, 0xc3, 0xfe, 0x86, 0x9d, 0x90,
|
||||
0x76, 0x18, 0x47, 0x34, 0x4d, 0x61, 0x94, 0xdb, 0xb4, 0x13, 0xd2, 0x2e, 0x3b, 0x4d, 0xf6, 0x7b,
|
||||
0xa6, 0x0e, 0x2d, 0x83, 0x8a, 0x4d, 0x93, 0x76, 0x69, 0xeb, 0xef, 0x7d, 0xdf, 0xef, 0xf7, 0xbe,
|
||||
0xdf, 0xfb, 0xde, 0xef, 0xa9, 0xe0, 0xe8, 0xcd, 0xb2, 0x87, 0x86, 0x65, 0x32, 0xea, 0xb9, 0x98,
|
||||
0xfe, 0xd4, 0x7a, 0x7d, 0x44, 0x10, 0x5c, 0xe9, 0x20, 0xdc, 0x45, 0xd8, 0xc2, 0xce, 0x0d, 0xed,
|
||||
0xa6, 0xe6, 0xa1, 0xa1, 0x36, 0x3c, 0x23, 0x1e, 0xde, 0x93, 0x27, 0x9e, 0x24, 0xdb, 0x7e, 0xdf,
|
||||
0xb1, 0x7a, 0x76, 0x9f, 0x8c, 0xca, 0x71, 0xa8, 0xec, 0x21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xdf, 0x63, 0xcd, 0x5b, 0xbe, 0x53, 0xe2, 0x15, 0x7e,
|
||||
0x6d, 0x4e, 0x3f, 0xbb, 0x33, 0x95, 0x41, 0xa2, 0x49, 0xad, 0xfa, 0xdb, 0x54, 0x4e, 0x27, 0x3d,
|
||||
0x9d, 0xca, 0x90, 0x36, 0x9b, 0x0a, 0xaa, 0x26, 0x48, 0xbe, 0x6a, 0x0e, 0x6c, 0x80, 0x25, 0x26,
|
||||
0x00, 0x7a, 0x8d, 0xad, 0xef, 0x62, 0xc0, 0x8f, 0x41, 0xce, 0xee, 0xa2, 0x41, 0x48, 0x4a, 0xd9,
|
||||
0x17, 0x1f, 0xc5, 0xbb, 0xd1, 0x51, 0x1c, 0x48, 0x70, 0x06, 0xaa, 0x3e, 0xe6, 0xc1, 0xc2, 0x06,
|
||||
0xf6, 0x36, 0x11, 0x71, 0xff, 0x25, 0x45, 0x2e, 0x82, 0xf9, 0x21, 0x22, 0xaf, 0x73, 0x90, 0xb4,
|
||||
0x1e, 0xbe, 0x07, 0x72, 0xa8, 0x47, 0x7c, 0x14, 0x96, 0xb2, 0x0a, 0xbf, 0x56, 0x5c, 0x97, 0xb5,
|
||||
0x7d, 0x6e, 0x8e, 0x16, 0x75, 0xd2, 0x88, 0xd3, 0x4c, 0x96, 0xae, 0x5e, 0x00, 0x85, 0xb6, 0x7b,
|
||||
0xf3, 0xd9, 0xa8, 0xc3, 0x55, 0x30, 0x4f, 0x7c, 0x12, 0xb8, 0x71, 0x87, 0x4b, 0x26, 0xfd, 0x80,
|
||||
0x0a, 0xc8, 0x3b, 0x2e, 0xee, 0xf4, 0x7d, 0xca, 0x91, 0x89, 0xd7, 0xd2, 0x21, 0xf5, 0x56, 0x06,
|
||||
0x2c, 0x24, 0xd3, 0x63, 0xec, 0xa7, 0xd5, 0x89, 0x59, 0xad, 0xfe, 0x87, 0xe3, 0xf2, 0x63, 0x0e,
|
||||
0x14, 0x66, 0x2c, 0x43, 0xdf, 0x4f, 0x87, 0x63, 0x7b, 0x66, 0x26, 0x13, 0x8f, 0xca, 0x12, 0x73,
|
||||
0x8a, 0xe7, 0x44, 0xb8, 0x0a, 0x72, 0x98, 0xd8, 0x64, 0x80, 0x63, 0x05, 0x8a, 0xeb, 0xc7, 0xf7,
|
||||
0x3d, 0xd8, 0x04, 0xaf, 0x15, 0xa7, 0xea, 0xe2, 0xae, 0xf3, 0x3c, 0xdb, 0x00, 0x45, 0x51, 0x4d,
|
||||
0x06, 0x07, 0x3f, 0x05, 0xf0, 0xba, 0x1f, 0xda, 0x81, 0x45, 0xec, 0x20, 0x18, 0x59, 0x7d, 0x17,
|
||||
0x0f, 0x02, 0x12, 0x4f, 0x4f, 0x7e, 0x5d, 0xd9, 0x97, 0xa4, 0x1d, 0x25, 0x9a, 0x71, 0x9e, 0x7e,
|
||||
0x8c, 0xf9, 0xdb, 0x9b, 0x94, 0x65, 0x2f, 0x92, 0x6a, 0x0a, 0x71, 0x30, 0x55, 0x04, 0x3f, 0x02,
|
||||
0x79, 0x1c, 0x1b, 0xab, 0x15, 0xd9, 0x6e, 0x69, 0x2e, 0xe6, 0x12, 0x35, 0xea, 0xc9, 0x5a, 0xe2,
|
||||
0xc9, 0x5a, 0x3b, 0xf1, 0x64, 0x5d, 0x62, 0x2c, 0x6c, 0x52, 0x52, 0xc5, 0xea, 0xed, 0x47, 0x32,
|
||||
0x6f, 0x02, 0x1a, 0x89, 0x0a, 0xa0, 0x0f, 0x04, 0x76, 0xd2, 0x96, 0x1b, 0x3a, 0x94, 0x61, 0xfe,
|
||||
0xa5, 0x0c, 0xc7, 0x19, 0xc3, 0x51, 0xca, 0xf0, 0x3c, 0x02, 0xa5, 0x29, 0xb2, 0xb0, 0x11, 0x3a,
|
||||
0x31, 0xd5, 0xe7, 0x3c, 0x58, 0x26, 0x88, 0xa4, 0x5e, 0x82, 0xdc, 0x8b, 0xe7, 0xe9, 0x12, 0x63,
|
||||
0x58, 0xa5, 0x0c, 0x33, 0x75, 0x07, 0x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x9d, 0xfa, 0x8e, 0x07, 0x60, 0x37, 0x0c, 0x45, 0x30, 0x6f, 0x6c, 0x34,
|
||||
0xdb, 0xd7, 0x04, 0x4e, 0x3c, 0x34, 0x9e, 0x28, 0x79, 0x1a, 0x36, 0xba, 0x3d, 0x32, 0x82, 0x47,
|
||||
0x40, 0xf6, 0x9a, 0xd1, 0x12, 0x78, 0x71, 0x79, 0x3c, 0x51, 0x96, 0xe8, 0xca, 0x35, 0x17, 0x43,
|
||||
0x09, 0x2c, 0x54, 0xf4, 0x56, 0xbb, 0x52, 0xab, 0x0b, 0x19, 0xf1, 0xf0, 0x78, 0xa2, 0x2c, 0xd3,
|
||||
0xb5, 0x0a, 0x3b, 0xdd, 0x55, 0x90, 0xa9, 0x37, 0x84, 0xac, 0x58, 0x18, 0x4f, 0x94, 0x45, 0xba,
|
||||
0x54, 0x47, 0xf0, 0x24, 0x28, 0xd4, 0x1b, 0xd6, 0xd5, 0x5a, 0xfb, 0x92, 0xb5, 0x69, 0xb4, 0x1b,
|
||||
0xc2, 0x9c, 0xb8, 0x3a, 0x9e, 0x28, 0x42, 0xb2, 0x9e, 0x48, 0x2e, 0x16, 0xbe, 0xfc, 0x46, 0xe2,
|
||||
0xee, 0xdd, 0x95, 0xb8, 0xef, 0xef, 0x4a, 0xdc, 0xa9, 0xdf, 0x79, 0x50, 0x9c, 0x35, 0xe7, 0x68,
|
||||
0x5b, 0xf5, 0xda, 0x15, 0x81, 0xa3, 0xdb, 0xa2, 0xc1, 0xba, 0x1f, 0xc0, 0x77, 0x40, 0xb1, 0x6a,
|
||||
0x34, 0x1b, 0xad, 0x5a, 0xdb, 0x6a, 0x1a, 0x66, 0xad, 0x51, 0x15, 0x78, 0xf1, 0xe8, 0x78, 0xa2,
|
||||
0xac, 0xd0, 0x14, 0x76, 0xef, 0x9b, 0x6e, 0xdf, 0x47, 0x0e, 0x7c, 0x1b, 0x2c, 0x6f, 0x36, 0xda,
|
||||
0xb5, 0xfa, 0xc5, 0x24, 0x37, 0x23, 0x1e, 0x19, 0x4f, 0x14, 0x48, 0x73, 0x37, 0xe3, 0x3b, 0xc5,
|
||||
0x52, 0xdf, 0x02, 0xb9, 0x66, 0xa5, 0xd5, 0x32, 0xaa, 0x42, 0x56, 0x14, 0xc6, 0x13, 0xa5, 0x40,
|
||||
0x73, 0x9a, 0x36, 0xc6, 0xae, 0x03, 0x15, 0xb0, 0x68, 0x1a, 0x97, 0x8d, 0xf3, 0x6d, 0xa3, 0x2a,
|
||||
0xcc, 0x89, 0x70, 0x3c, 0x51, 0x8a, 0x74, 0xdd, 0x74, 0x3f, 0x71, 0x3b, 0xc4, 0x8d, 0xeb, 0x2f,
|
||||
0x54, 0x6a, 0x57, 0x8c, 0xaa, 0x30, 0x9f, 0xae, 0xbf, 0x60, 0xfb, 0x81, 0xeb, 0xcc, 0xb6, 0xab,
|
||||
0xd7, 0xef, 0x3f, 0x96, 0xb8, 0x87, 0x8f, 0x25, 0xee, 0xd6, 0x8e, 0xc4, 0xdd, 0xdf, 0x91, 0xf8,
|
||||
0x07, 0x3b, 0x12, 0xff, 0xeb, 0x8e, 0xc4, 0xdf, 0x7e, 0x22, 0x71, 0x0f, 0x9e, 0x48, 0xdc, 0xc3,
|
||||
0x27, 0x12, 0xf7, 0xe1, 0xdf, 0x5b, 0x5e, 0xea, 0x7f, 0x81, 0xad, 0x5c, 0xec, 0x2a, 0x67, 0xff,
|
||||
0x0a, 0x00, 0x00, 0xff, 0xff, 0x48, 0xe7, 0x6e, 0x7f, 0x21, 0x0c, 0x00, 0x00,
|
||||
// 1185 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xc1, 0x6b, 0xdb, 0x56,
|
||||
0x18, 0x97, 0x6c, 0xc7, 0x49, 0x9e, 0x1d, 0x57, 0x7d, 0xc9, 0x5a, 0x4f, 0x0c, 0x49, 0x75, 0x4b,
|
||||
0xc9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0x18, 0x3b, 0x36, 0x54, 0xc0, 0x9c, 0xa1, 0xdf, 0xd4,
|
||||
0xaf, 0x36, 0xf5, 0xb2, 0x90, 0x12, 0xe1, 0x70, 0xa4, 0xe4, 0xe8, 0xba, 0xe1, 0x7c, 0xe6, 0xb4,
|
||||
0x88, 0x13, 0xe5, 0x5f, 0x2b, 0x55, 0x6e, 0xe9, 0x65, 0x61, 0x66, 0x32, 0xff, 0x9a, 0xe5, 0xf9,
|
||||
0x8e, 0x3d, 0xdd, 0xae, 0x56, 0xdd, 0x7c, 0x29, 0x71, 0xcf, 0x5f, 0x4a, 0xdc, 0x97, 0x5b, 0x12,
|
||||
0xb7, 0xb9, 0x25, 0xf1, 0xcf, 0xb6, 0x24, 0xfe, 0xe7, 0x2d, 0x89, 0x7f, 0xb8, 0x2d, 0x71, 0xcf,
|
||||
0xb6, 0x25, 0xee, 0xf9, 0xb6, 0xc4, 0x7d, 0xfc, 0xf7, 0xf6, 0x37, 0xf1, 0x1f, 0xc3, 0x7a, 0x3a,
|
||||
0x72, 0x98, 0xcb, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x41, 0x42, 0x32, 0xc2, 0x47, 0x0c, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
func (this *MsgSubmitProposalBase) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*MsgSubmitProposalBase)
|
||||
if !ok {
|
||||
that2, ok := that.(MsgSubmitProposalBase)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.InitialDeposit) != len(that1.InitialDeposit) {
|
||||
return false
|
||||
}
|
||||
for i := range this.InitialDeposit {
|
||||
if !this.InitialDeposit[i].Equal(&that1.InitialDeposit[i]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if !bytes.Equal(this.Proposer, that1.Proposer) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *MsgVote) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*MsgVote)
|
||||
if !ok {
|
||||
that2, ok := that.(MsgVote)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if this.ProposalID != that1.ProposalID {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.Voter, that1.Voter) {
|
||||
return false
|
||||
}
|
||||
if this.Option != that1.Option {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *MsgDeposit) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*MsgDeposit)
|
||||
if !ok {
|
||||
that2, ok := that.(MsgDeposit)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if this.ProposalID != that1.ProposalID {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.Depositor, that1.Depositor) {
|
||||
return false
|
||||
}
|
||||
if len(this.Amount) != len(that1.Amount) {
|
||||
return false
|
||||
}
|
||||
for i := range this.Amount {
|
||||
if !this.Amount[i].Equal(&that1.Amount[i]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *TextProposal) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*TextProposal)
|
||||
if !ok {
|
||||
that2, ok := that.(TextProposal)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if this.Title != that1.Title {
|
||||
return false
|
||||
}
|
||||
if this.Description != that1.Description {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *Deposit) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*Deposit)
|
||||
if !ok {
|
||||
that2, ok := that.(Deposit)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if this.ProposalID != that1.ProposalID {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.Depositor, that1.Depositor) {
|
||||
return false
|
||||
}
|
||||
if len(this.Amount) != len(that1.Amount) {
|
||||
return false
|
||||
}
|
||||
for i := range this.Amount {
|
||||
if !this.Amount[i].Equal(&that1.Amount[i]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *TallyResult) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*TallyResult)
|
||||
if !ok {
|
||||
that2, ok := that.(TallyResult)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !this.Yes.Equal(that1.Yes) {
|
||||
return false
|
||||
}
|
||||
if !this.Abstain.Equal(that1.Abstain) {
|
||||
return false
|
||||
}
|
||||
if !this.No.Equal(that1.No) {
|
||||
return false
|
||||
}
|
||||
if !this.NoWithVeto.Equal(that1.NoWithVeto) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *Vote) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*Vote)
|
||||
if !ok {
|
||||
that2, ok := that.(Vote)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if this.ProposalID != that1.ProposalID {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.Voter, that1.Voter) {
|
||||
return false
|
||||
}
|
||||
if this.Option != that1.Option {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type ProposalBaseFace interface {
|
||||
|
@ -602,10 +832,10 @@ func (m *MsgSubmitProposalBase) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.IntialDeposit) > 0 {
|
||||
for iNdEx := len(m.IntialDeposit) - 1; iNdEx >= 0; iNdEx-- {
|
||||
if len(m.InitialDeposit) > 0 {
|
||||
for iNdEx := len(m.InitialDeposit) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.IntialDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.InitialDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -619,6 +849,46 @@ func (m *MsgSubmitProposalBase) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgVote) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *MsgVote) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Option != 0 {
|
||||
i = encodeVarintTypes(dAtA, i, uint64(m.Option))
|
||||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if len(m.Voter) > 0 {
|
||||
i -= len(m.Voter)
|
||||
copy(dAtA[i:], m.Voter)
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.Voter)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.ProposalID != 0 {
|
||||
i = encodeVarintTypes(dAtA, i, uint64(m.ProposalID))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgDeposit) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
|
@ -668,46 +938,6 @@ func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgVote) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *MsgVote) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Option != 0 {
|
||||
i = encodeVarintTypes(dAtA, i, uint64(m.Option))
|
||||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if len(m.Voter) > 0 {
|
||||
i -= len(m.Voter)
|
||||
copy(dAtA[i:], m.Voter)
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.Voter)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.ProposalID != 0 {
|
||||
i = encodeVarintTypes(dAtA, i, uint64(m.ProposalID))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *TextProposal) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
|
@ -1003,8 +1233,8 @@ func (m *MsgSubmitProposalBase) Size() (n int) {
|
|||
}
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.IntialDeposit) > 0 {
|
||||
for _, e := range m.IntialDeposit {
|
||||
if len(m.InitialDeposit) > 0 {
|
||||
for _, e := range m.InitialDeposit {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
|
@ -1016,6 +1246,25 @@ func (m *MsgSubmitProposalBase) Size() (n int) {
|
|||
return n
|
||||
}
|
||||
|
||||
func (m *MsgVote) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.ProposalID != 0 {
|
||||
n += 1 + sovTypes(uint64(m.ProposalID))
|
||||
}
|
||||
l = len(m.Voter)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
if m.Option != 0 {
|
||||
n += 1 + sovTypes(uint64(m.Option))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgDeposit) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
|
@ -1038,25 +1287,6 @@ func (m *MsgDeposit) Size() (n int) {
|
|||
return n
|
||||
}
|
||||
|
||||
func (m *MsgVote) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.ProposalID != 0 {
|
||||
n += 1 + sovTypes(uint64(m.ProposalID))
|
||||
}
|
||||
l = len(m.Voter)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
if m.Option != 0 {
|
||||
n += 1 + sovTypes(uint64(m.Option))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *TextProposal) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
|
@ -1169,30 +1399,6 @@ func sovTypes(x uint64) (n int) {
|
|||
func sozTypes(x uint64) (n int) {
|
||||
return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (this *MsgSubmitProposalBase) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
repeatedStringForIntialDeposit := "[]Coin{"
|
||||
for _, f := range this.IntialDeposit {
|
||||
repeatedStringForIntialDeposit += fmt.Sprintf("%v", f) + ","
|
||||
}
|
||||
repeatedStringForIntialDeposit += "}"
|
||||
s := strings.Join([]string{`&MsgSubmitProposalBase{`,
|
||||
`IntialDeposit:` + repeatedStringForIntialDeposit + `,`,
|
||||
`Proposer:` + fmt.Sprintf("%v", this.Proposer) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func valueToStringTypes(v interface{}) string {
|
||||
rv := reflect.ValueOf(v)
|
||||
if rv.IsNil() {
|
||||
return "nil"
|
||||
}
|
||||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *MsgSubmitProposalBase) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
@ -1224,7 +1430,7 @@ func (m *MsgSubmitProposalBase) Unmarshal(dAtA []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field IntialDeposit", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field InitialDeposit", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -1251,8 +1457,8 @@ func (m *MsgSubmitProposalBase) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.IntialDeposit = append(m.IntialDeposit, types.Coin{})
|
||||
if err := m.IntialDeposit[len(m.IntialDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
m.InitialDeposit = append(m.InitialDeposit, types.Coin{})
|
||||
if err := m.InitialDeposit[len(m.InitialDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -1314,6 +1520,131 @@ func (m *MsgSubmitProposalBase) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgVote) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: MsgVote: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ProposalID", wireType)
|
||||
}
|
||||
m.ProposalID = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ProposalID |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Voter = append(m.Voter[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.Voter == nil {
|
||||
m.Voter = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Option", wireType)
|
||||
}
|
||||
m.Option = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Option |= VoteOption(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTypes(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgDeposit) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
@ -1454,131 +1785,6 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgVote) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: MsgVote: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ProposalID", wireType)
|
||||
}
|
||||
m.ProposalID = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ProposalID |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Voter = append(m.Voter[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.Voter == nil {
|
||||
m.Voter = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Option", wireType)
|
||||
}
|
||||
m.Option = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Option |= VoteOption(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTypes(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *TextProposal) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
|
|
@ -10,10 +10,17 @@ option (gogoproto.goproto_stringer_all) = false;
|
|||
option (gogoproto.stringer_all) = false;
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
|
||||
// MsgSubmitProposalBase defines an sdk.Msg type that supports submitting arbitrary
|
||||
// proposal Content.
|
||||
//
|
||||
// Note, this message type provides the basis for which a true MsgSubmitProposal
|
||||
// can be constructed. Since the Content submitted in the message can be arbitrary,
|
||||
// assuming it fulfills the Content interface, it must be defined at the
|
||||
// application-level and extend MsgSubmitProposalBase.
|
||||
message MsgSubmitProposalBase {
|
||||
option (gogoproto.stringer) = true;
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
repeated cosmos_sdk.v1.Coin intial_deposit = 1 [
|
||||
repeated cosmos_sdk.v1.Coin initial_deposit = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "yaml:\"initial_deposit\""
|
||||
|
@ -21,8 +28,23 @@ message MsgSubmitProposalBase {
|
|||
bytes proposer = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
}
|
||||
|
||||
// MsgVote defines a message to cast a vote
|
||||
message MsgVote {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
uint64 proposal_id = 1 [
|
||||
(gogoproto.customname) = "ProposalID",
|
||||
(gogoproto.moretags) = "yaml:\"proposal_id\"",
|
||||
(gogoproto.jsontag) = "proposal_id"
|
||||
];
|
||||
bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
VoteOption option = 3;
|
||||
}
|
||||
|
||||
// MsgDeposit defines a message to submit a deposit to an existing proposal
|
||||
message MsgDeposit {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
uint64 proposal_id = 1 [
|
||||
(gogoproto.customname) = "ProposalID",
|
||||
(gogoproto.moretags) = "yaml:\"proposal_id\"",
|
||||
|
@ -46,26 +68,19 @@ enum VoteOption {
|
|||
NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"];
|
||||
}
|
||||
|
||||
// MsgVote defines a message to cast a vote
|
||||
message MsgVote {
|
||||
uint64 proposal_id = 1 [
|
||||
(gogoproto.customname) = "ProposalID",
|
||||
(gogoproto.moretags) = "yaml:\"proposal_id\"",
|
||||
(gogoproto.jsontag) = "proposal_id"
|
||||
];
|
||||
bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
VoteOption option = 3;
|
||||
}
|
||||
|
||||
// TextProposal defines a standard text proposal whose changes need to be
|
||||
// manually updated in case of approval
|
||||
message TextProposal {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string title = 1;
|
||||
string description = 2;
|
||||
}
|
||||
|
||||
// Deposit defines an amount deposited by an account address to an active proposal
|
||||
message Deposit {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
uint64 proposal_id = 1 [(gogoproto.customname) = "ProposalID", (gogoproto.moretags) = "yaml:\"proposal_id\""];
|
||||
bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
repeated cosmos_sdk.v1.Coin amount = 3
|
||||
|
@ -115,6 +130,8 @@ enum ProposalStatus {
|
|||
|
||||
// TallyResult defines a standard tally for a proposal
|
||||
message TallyResult {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string yes = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
string abstain = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
string no = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
|
@ -128,6 +145,8 @@ message TallyResult {
|
|||
// Vote defines a vote on a governance proposal. A vote corresponds to a proposal
|
||||
// ID, the voter, and the vote option.
|
||||
message Vote {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
uint64 proposal_id = 1 [(gogoproto.customname) = "ProposalID", (gogoproto.moretags) = "yaml:\"proposal_id\""];
|
||||
bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
VoteOption option = 3;
|
||||
|
|
|
@ -4,6 +4,8 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
|
@ -13,7 +15,8 @@ func NewVote(proposalID uint64, voter sdk.AccAddress, option VoteOption) Vote {
|
|||
}
|
||||
|
||||
func (v Vote) String() string {
|
||||
return fmt.Sprintf("voter %s voted with option %s on proposal %d", v.Voter, v.Option, v.ProposalID)
|
||||
out, _ := yaml.Marshal(v)
|
||||
return string(out)
|
||||
}
|
||||
|
||||
// Votes is a collection of Vote objects
|
||||
|
|
Loading…
Reference in New Issue