901 lines
22 KiB
Go
901 lines
22 KiB
Go
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||
|
// source: wormhole/governance.proto
|
||
|
|
||
|
package types
|
||
|
|
||
|
import (
|
||
|
bytes "bytes"
|
||
|
fmt "fmt"
|
||
|
_ "github.com/gogo/protobuf/gogoproto"
|
||
|
proto "github.com/gogo/protobuf/proto"
|
||
|
io "io"
|
||
|
math "math"
|
||
|
math_bits "math/bits"
|
||
|
)
|
||
|
|
||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||
|
var _ = proto.Marshal
|
||
|
var _ = fmt.Errorf
|
||
|
var _ = math.Inf
|
||
|
|
||
|
// This is a compile-time assertion to ensure that this generated file
|
||
|
// is compatible with the proto package it is being compiled against.
|
||
|
// A compilation error at this line likely means your copy of the
|
||
|
// proto package needs to be updated.
|
||
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||
|
|
||
|
// GuardianSetUpdateProposal defines a guardian set update governance proposal
|
||
|
type GuardianSetUpdateProposal struct {
|
||
|
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||
|
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
||
|
NewGuardianSet GuardianSet `protobuf:"bytes,3,opt,name=newGuardianSet,proto3" json:"newGuardianSet"`
|
||
|
}
|
||
|
|
||
|
func (m *GuardianSetUpdateProposal) Reset() { *m = GuardianSetUpdateProposal{} }
|
||
|
func (*GuardianSetUpdateProposal) ProtoMessage() {}
|
||
|
func (*GuardianSetUpdateProposal) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_ceebda8f8c3f5f74, []int{0}
|
||
|
}
|
||
|
func (m *GuardianSetUpdateProposal) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *GuardianSetUpdateProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_GuardianSetUpdateProposal.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 *GuardianSetUpdateProposal) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_GuardianSetUpdateProposal.Merge(m, src)
|
||
|
}
|
||
|
func (m *GuardianSetUpdateProposal) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *GuardianSetUpdateProposal) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_GuardianSetUpdateProposal.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_GuardianSetUpdateProposal proto.InternalMessageInfo
|
||
|
|
||
|
func (m *GuardianSetUpdateProposal) GetTitle() string {
|
||
|
if m != nil {
|
||
|
return m.Title
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (m *GuardianSetUpdateProposal) GetDescription() string {
|
||
|
if m != nil {
|
||
|
return m.Description
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (m *GuardianSetUpdateProposal) GetNewGuardianSet() GuardianSet {
|
||
|
if m != nil {
|
||
|
return m.NewGuardianSet
|
||
|
}
|
||
|
return GuardianSet{}
|
||
|
}
|
||
|
|
||
|
// GovernanceWormholeMessageProposal defines a governance proposal to emit a generic message in the governance message
|
||
|
// format.
|
||
|
type GovernanceWormholeMessageProposal struct {
|
||
|
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||
|
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
||
|
Action uint32 `protobuf:"varint,3,opt,name=action,proto3" json:"action,omitempty"`
|
||
|
Module []byte `protobuf:"bytes,4,opt,name=module,proto3" json:"module,omitempty"`
|
||
|
TargetChain uint32 `protobuf:"varint,5,opt,name=targetChain,proto3" json:"targetChain,omitempty"`
|
||
|
Payload []byte `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (m *GovernanceWormholeMessageProposal) Reset() { *m = GovernanceWormholeMessageProposal{} }
|
||
|
func (*GovernanceWormholeMessageProposal) ProtoMessage() {}
|
||
|
func (*GovernanceWormholeMessageProposal) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_ceebda8f8c3f5f74, []int{1}
|
||
|
}
|
||
|
func (m *GovernanceWormholeMessageProposal) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *GovernanceWormholeMessageProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_GovernanceWormholeMessageProposal.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 *GovernanceWormholeMessageProposal) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_GovernanceWormholeMessageProposal.Merge(m, src)
|
||
|
}
|
||
|
func (m *GovernanceWormholeMessageProposal) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *GovernanceWormholeMessageProposal) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_GovernanceWormholeMessageProposal.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_GovernanceWormholeMessageProposal proto.InternalMessageInfo
|
||
|
|
||
|
func (m *GovernanceWormholeMessageProposal) GetTitle() string {
|
||
|
if m != nil {
|
||
|
return m.Title
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (m *GovernanceWormholeMessageProposal) GetDescription() string {
|
||
|
if m != nil {
|
||
|
return m.Description
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (m *GovernanceWormholeMessageProposal) GetAction() uint32 {
|
||
|
if m != nil {
|
||
|
return m.Action
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (m *GovernanceWormholeMessageProposal) GetModule() []byte {
|
||
|
if m != nil {
|
||
|
return m.Module
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *GovernanceWormholeMessageProposal) GetTargetChain() uint32 {
|
||
|
if m != nil {
|
||
|
return m.TargetChain
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (m *GovernanceWormholeMessageProposal) GetPayload() []byte {
|
||
|
if m != nil {
|
||
|
return m.Payload
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
proto.RegisterType((*GuardianSetUpdateProposal)(nil), "wormhole_foundation.wormchain.wormhole.GuardianSetUpdateProposal")
|
||
|
proto.RegisterType((*GovernanceWormholeMessageProposal)(nil), "wormhole_foundation.wormchain.wormhole.GovernanceWormholeMessageProposal")
|
||
|
}
|
||
|
|
||
|
func init() { proto.RegisterFile("wormhole/governance.proto", fileDescriptor_ceebda8f8c3f5f74) }
|
||
|
|
||
|
var fileDescriptor_ceebda8f8c3f5f74 = []byte{
|
||
|
// 358 bytes of a gzipped FileDescriptorProto
|
||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x51, 0xb1, 0x4e, 0xf2, 0x50,
|
||
|
0x18, 0xed, 0xfd, 0x7f, 0x40, 0xbd, 0xa8, 0x43, 0x43, 0x4c, 0xc1, 0xa4, 0x54, 0x06, 0xc3, 0x62,
|
||
|
0x9b, 0xc8, 0xa4, 0x23, 0x0e, 0x4c, 0x26, 0xa6, 0xc4, 0x98, 0xb8, 0x90, 0x4b, 0xfb, 0x59, 0x9a,
|
||
|
0x94, 0x7e, 0xcd, 0xed, 0xad, 0xc8, 0x5b, 0x38, 0x3a, 0xf2, 0x28, 0x8e, 0x8c, 0xb8, 0x39, 0x19,
|
||
|
0x03, 0x8b, 0x8f, 0x61, 0x6e, 0x5b, 0xa0, 0x71, 0x32, 0x71, 0xfb, 0xce, 0x39, 0x3d, 0x27, 0x3d,
|
||
|
0xe7, 0xd2, 0xfa, 0x04, 0xf9, 0x78, 0x84, 0x01, 0x58, 0x1e, 0x3e, 0x02, 0x0f, 0x59, 0xe8, 0x80,
|
||
|
0x19, 0x71, 0x14, 0xa8, 0x9e, 0xae, 0xa5, 0xc1, 0x03, 0x26, 0xa1, 0xcb, 0x84, 0x8f, 0xa1, 0x29,
|
||
|
0x39, 0x67, 0xc4, 0xfc, 0xec, 0x92, 0x6a, 0xe3, 0x78, 0x1b, 0x91, 0x30, 0xee, 0xfa, 0x2c, 0x1c,
|
||
|
0xc4, 0x20, 0xb2, 0x90, 0x46, 0xcd, 0x43, 0x0f, 0xd3, 0xd3, 0x92, 0x57, 0xc6, 0xb6, 0x5e, 0x09,
|
||
|
0xad, 0xf7, 0xf2, 0x8f, 0xfb, 0x20, 0x6e, 0x23, 0x97, 0x09, 0xb8, 0xe1, 0x18, 0x61, 0xcc, 0x02,
|
||
|
0xb5, 0x46, 0xcb, 0xc2, 0x17, 0x01, 0x68, 0xc4, 0x20, 0xed, 0x3d, 0x3b, 0x03, 0xaa, 0x41, 0xab,
|
||
|
0x2e, 0xc4, 0x0e, 0xf7, 0x23, 0xf9, 0x23, 0xda, 0xbf, 0x54, 0x2b, 0x52, 0x2a, 0xa3, 0x87, 0x21,
|
||
|
0x4c, 0x0a, 0xb9, 0xda, 0x7f, 0x83, 0xb4, 0xab, 0xe7, 0x1d, 0xf3, 0x77, 0x4d, 0xcc, 0x82, 0xb5,
|
||
|
0x5b, 0x9a, 0x7f, 0x34, 0x15, 0xfb, 0x47, 0xe0, 0xe5, 0xee, 0xcb, 0xac, 0xa9, 0x7c, 0xcd, 0x9a,
|
||
|
0xa4, 0xf5, 0x46, 0xe8, 0x49, 0x6f, 0x33, 0xd9, 0x5d, 0x1e, 0x71, 0x0d, 0x71, 0xcc, 0xbc, 0xbf,
|
||
|
0x57, 0x39, 0xa2, 0x15, 0xe6, 0xa4, 0xa2, 0xac, 0x70, 0x60, 0xe7, 0x48, 0xf2, 0x63, 0x74, 0x93,
|
||
|
0x00, 0xb4, 0x92, 0x41, 0xda, 0xfb, 0x76, 0x8e, 0x64, 0xa2, 0x60, 0xdc, 0x03, 0x71, 0x25, 0x1b,
|
||
|
0x69, 0xe5, 0xd4, 0x54, 0xa4, 0x54, 0x8d, 0xee, 0x44, 0x6c, 0x1a, 0x20, 0x73, 0xb5, 0x4a, 0x6a,
|
||
|
0x5d, 0xc3, 0x6d, 0xa7, 0x6e, 0x7f, 0xbe, 0xd4, 0xc9, 0x62, 0xa9, 0x93, 0xcf, 0xa5, 0x4e, 0x9e,
|
||
|
0x57, 0xba, 0xb2, 0x58, 0xe9, 0xca, 0xfb, 0x4a, 0x57, 0xee, 0x2f, 0x3c, 0x5f, 0x8c, 0x92, 0xa1,
|
||
|
0xe9, 0xe0, 0xd8, 0x5a, 0xcf, 0x75, 0xb6, 0x1d, 0xd3, 0xda, 0x8c, 0x69, 0x3d, 0x6d, 0x74, 0x4b,
|
||
|
0x4c, 0x23, 0x88, 0x87, 0x95, 0xf4, 0xc9, 0x3b, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x06, 0x0f,
|
||
|
0x17, 0x16, 0x6a, 0x02, 0x00, 0x00,
|
||
|
}
|
||
|
|
||
|
func (this *GuardianSetUpdateProposal) Equal(that interface{}) bool {
|
||
|
if that == nil {
|
||
|
return this == nil
|
||
|
}
|
||
|
|
||
|
that1, ok := that.(*GuardianSetUpdateProposal)
|
||
|
if !ok {
|
||
|
that2, ok := that.(GuardianSetUpdateProposal)
|
||
|
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
|
||
|
}
|
||
|
if !this.NewGuardianSet.Equal(&that1.NewGuardianSet) {
|
||
|
return false
|
||
|
}
|
||
|
return true
|
||
|
}
|
||
|
func (this *GovernanceWormholeMessageProposal) Equal(that interface{}) bool {
|
||
|
if that == nil {
|
||
|
return this == nil
|
||
|
}
|
||
|
|
||
|
that1, ok := that.(*GovernanceWormholeMessageProposal)
|
||
|
if !ok {
|
||
|
that2, ok := that.(GovernanceWormholeMessageProposal)
|
||
|
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
|
||
|
}
|
||
|
if this.Action != that1.Action {
|
||
|
return false
|
||
|
}
|
||
|
if !bytes.Equal(this.Module, that1.Module) {
|
||
|
return false
|
||
|
}
|
||
|
if this.TargetChain != that1.TargetChain {
|
||
|
return false
|
||
|
}
|
||
|
if !bytes.Equal(this.Payload, that1.Payload) {
|
||
|
return false
|
||
|
}
|
||
|
return true
|
||
|
}
|
||
|
func (m *GuardianSetUpdateProposal) 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 *GuardianSetUpdateProposal) MarshalTo(dAtA []byte) (int, error) {
|
||
|
size := m.Size()
|
||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||
|
}
|
||
|
|
||
|
func (m *GuardianSetUpdateProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||
|
i := len(dAtA)
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
{
|
||
|
size, err := m.NewGuardianSet.MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintGovernance(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0x1a
|
||
|
if len(m.Description) > 0 {
|
||
|
i -= len(m.Description)
|
||
|
copy(dAtA[i:], m.Description)
|
||
|
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Description)))
|
||
|
i--
|
||
|
dAtA[i] = 0x12
|
||
|
}
|
||
|
if len(m.Title) > 0 {
|
||
|
i -= len(m.Title)
|
||
|
copy(dAtA[i:], m.Title)
|
||
|
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Title)))
|
||
|
i--
|
||
|
dAtA[i] = 0xa
|
||
|
}
|
||
|
return len(dAtA) - i, nil
|
||
|
}
|
||
|
|
||
|
func (m *GovernanceWormholeMessageProposal) 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 *GovernanceWormholeMessageProposal) MarshalTo(dAtA []byte) (int, error) {
|
||
|
size := m.Size()
|
||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||
|
}
|
||
|
|
||
|
func (m *GovernanceWormholeMessageProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||
|
i := len(dAtA)
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if len(m.Payload) > 0 {
|
||
|
i -= len(m.Payload)
|
||
|
copy(dAtA[i:], m.Payload)
|
||
|
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Payload)))
|
||
|
i--
|
||
|
dAtA[i] = 0x32
|
||
|
}
|
||
|
if m.TargetChain != 0 {
|
||
|
i = encodeVarintGovernance(dAtA, i, uint64(m.TargetChain))
|
||
|
i--
|
||
|
dAtA[i] = 0x28
|
||
|
}
|
||
|
if len(m.Module) > 0 {
|
||
|
i -= len(m.Module)
|
||
|
copy(dAtA[i:], m.Module)
|
||
|
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Module)))
|
||
|
i--
|
||
|
dAtA[i] = 0x22
|
||
|
}
|
||
|
if m.Action != 0 {
|
||
|
i = encodeVarintGovernance(dAtA, i, uint64(m.Action))
|
||
|
i--
|
||
|
dAtA[i] = 0x18
|
||
|
}
|
||
|
if len(m.Description) > 0 {
|
||
|
i -= len(m.Description)
|
||
|
copy(dAtA[i:], m.Description)
|
||
|
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Description)))
|
||
|
i--
|
||
|
dAtA[i] = 0x12
|
||
|
}
|
||
|
if len(m.Title) > 0 {
|
||
|
i -= len(m.Title)
|
||
|
copy(dAtA[i:], m.Title)
|
||
|
i = encodeVarintGovernance(dAtA, i, uint64(len(m.Title)))
|
||
|
i--
|
||
|
dAtA[i] = 0xa
|
||
|
}
|
||
|
return len(dAtA) - i, nil
|
||
|
}
|
||
|
|
||
|
func encodeVarintGovernance(dAtA []byte, offset int, v uint64) int {
|
||
|
offset -= sovGovernance(v)
|
||
|
base := offset
|
||
|
for v >= 1<<7 {
|
||
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||
|
v >>= 7
|
||
|
offset++
|
||
|
}
|
||
|
dAtA[offset] = uint8(v)
|
||
|
return base
|
||
|
}
|
||
|
func (m *GuardianSetUpdateProposal) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
l = len(m.Title)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovGovernance(uint64(l))
|
||
|
}
|
||
|
l = len(m.Description)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovGovernance(uint64(l))
|
||
|
}
|
||
|
l = m.NewGuardianSet.Size()
|
||
|
n += 1 + l + sovGovernance(uint64(l))
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *GovernanceWormholeMessageProposal) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
l = len(m.Title)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovGovernance(uint64(l))
|
||
|
}
|
||
|
l = len(m.Description)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovGovernance(uint64(l))
|
||
|
}
|
||
|
if m.Action != 0 {
|
||
|
n += 1 + sovGovernance(uint64(m.Action))
|
||
|
}
|
||
|
l = len(m.Module)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovGovernance(uint64(l))
|
||
|
}
|
||
|
if m.TargetChain != 0 {
|
||
|
n += 1 + sovGovernance(uint64(m.TargetChain))
|
||
|
}
|
||
|
l = len(m.Payload)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovGovernance(uint64(l))
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func sovGovernance(x uint64) (n int) {
|
||
|
return (math_bits.Len64(x|1) + 6) / 7
|
||
|
}
|
||
|
func sozGovernance(x uint64) (n int) {
|
||
|
return sovGovernance(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||
|
}
|
||
|
func (m *GuardianSetUpdateProposal) 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 ErrIntOverflowGovernance
|
||
|
}
|
||
|
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: GuardianSetUpdateProposal: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: GuardianSetUpdateProposal: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
|
||
|
}
|
||
|
var stringLen uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
stringLen |= uint64(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
intStringLen := int(stringLen)
|
||
|
if intStringLen < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Title = string(dAtA[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
|
||
|
}
|
||
|
var stringLen uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
stringLen |= uint64(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
intStringLen := int(stringLen)
|
||
|
if intStringLen < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Description = string(dAtA[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
case 3:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field NewGuardianSet", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
if err := m.NewGuardianSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipGovernance(dAtA[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *GovernanceWormholeMessageProposal) 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 ErrIntOverflowGovernance
|
||
|
}
|
||
|
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: GovernanceWormholeMessageProposal: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: GovernanceWormholeMessageProposal: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
|
||
|
}
|
||
|
var stringLen uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
stringLen |= uint64(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
intStringLen := int(stringLen)
|
||
|
if intStringLen < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Title = string(dAtA[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
|
||
|
}
|
||
|
var stringLen uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
stringLen |= uint64(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
intStringLen := int(stringLen)
|
||
|
if intStringLen < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Description = string(dAtA[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
case 3:
|
||
|
if wireType != 0 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
|
||
|
}
|
||
|
m.Action = 0
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
m.Action |= uint32(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
case 4:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType)
|
||
|
}
|
||
|
var byteLen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
byteLen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if byteLen < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
postIndex := iNdEx + byteLen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Module = append(m.Module[:0], dAtA[iNdEx:postIndex]...)
|
||
|
if m.Module == nil {
|
||
|
m.Module = []byte{}
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
case 5:
|
||
|
if wireType != 0 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field TargetChain", wireType)
|
||
|
}
|
||
|
m.TargetChain = 0
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
m.TargetChain |= uint32(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
case 6:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
|
||
|
}
|
||
|
var byteLen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
byteLen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if byteLen < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
postIndex := iNdEx + byteLen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
|
||
|
if m.Payload == nil {
|
||
|
m.Payload = []byte{}
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipGovernance(dAtA[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||
|
return ErrInvalidLengthGovernance
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func skipGovernance(dAtA []byte) (n int, err error) {
|
||
|
l := len(dAtA)
|
||
|
iNdEx := 0
|
||
|
depth := 0
|
||
|
for iNdEx < l {
|
||
|
var wire uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return 0, ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return 0, io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
wire |= (uint64(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
wireType := int(wire & 0x7)
|
||
|
switch wireType {
|
||
|
case 0:
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return 0, ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return 0, io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx++
|
||
|
if dAtA[iNdEx-1] < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
case 1:
|
||
|
iNdEx += 8
|
||
|
case 2:
|
||
|
var length int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return 0, ErrIntOverflowGovernance
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return 0, io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
length |= (int(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if length < 0 {
|
||
|
return 0, ErrInvalidLengthGovernance
|
||
|
}
|
||
|
iNdEx += length
|
||
|
case 3:
|
||
|
depth++
|
||
|
case 4:
|
||
|
if depth == 0 {
|
||
|
return 0, ErrUnexpectedEndOfGroupGovernance
|
||
|
}
|
||
|
depth--
|
||
|
case 5:
|
||
|
iNdEx += 4
|
||
|
default:
|
||
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||
|
}
|
||
|
if iNdEx < 0 {
|
||
|
return 0, ErrInvalidLengthGovernance
|
||
|
}
|
||
|
if depth == 0 {
|
||
|
return iNdEx, nil
|
||
|
}
|
||
|
}
|
||
|
return 0, io.ErrUnexpectedEOF
|
||
|
}
|
||
|
|
||
|
var (
|
||
|
ErrInvalidLengthGovernance = fmt.Errorf("proto: negative length found during unmarshaling")
|
||
|
ErrIntOverflowGovernance = fmt.Errorf("proto: integer overflow")
|
||
|
ErrUnexpectedEndOfGroupGovernance = fmt.Errorf("proto: unexpected end of group")
|
||
|
)
|