902 lines
22 KiB
Go
902 lines
22 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: wormhole/governance.proto
|
|
|
|
package types
|
|
|
|
import (
|
|
bytes "bytes"
|
|
fmt "fmt"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
)
|
|
|
|
// 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), "certusone.wormholechain.wormhole.GuardianSetUpdateProposal")
|
|
proto.RegisterType((*GovernanceWormholeMessageProposal)(nil), "certusone.wormholechain.wormhole.GovernanceWormholeMessageProposal")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("wormhole/governance.proto", fileDescriptor_ceebda8f8c3f5f74) }
|
|
|
|
var fileDescriptor_ceebda8f8c3f5f74 = []byte{
|
|
// 357 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x51, 0xb1, 0x4e, 0xe3, 0x40,
|
|
0x14, 0xf4, 0xde, 0x25, 0xb9, 0xbb, 0xcd, 0x41, 0x61, 0x45, 0xc8, 0x09, 0x92, 0x63, 0x52, 0xa5,
|
|
0x89, 0x2d, 0x01, 0x15, 0x65, 0x28, 0x52, 0x81, 0x90, 0x11, 0x42, 0x82, 0x02, 0x6d, 0xec, 0x27,
|
|
0xc7, 0x92, 0xe3, 0x67, 0xed, 0xae, 0x09, 0xf9, 0x0b, 0x4a, 0xca, 0x7c, 0x07, 0x5f, 0x90, 0x32,
|
|
0x74, 0x54, 0x08, 0x25, 0x0d, 0x9f, 0x81, 0xbc, 0x71, 0x1c, 0x8b, 0x86, 0x82, 0xee, 0xcd, 0xbc,
|
|
0x37, 0xa3, 0x9d, 0x59, 0xda, 0x9c, 0x20, 0x1f, 0x8f, 0x30, 0x02, 0x27, 0xc0, 0x7b, 0xe0, 0x31,
|
|
0x8b, 0x3d, 0xb0, 0x13, 0x8e, 0x12, 0x75, 0xcb, 0x03, 0x2e, 0x53, 0x81, 0x31, 0xd8, 0x9b, 0x23,
|
|
0x6f, 0xc4, 0xc2, 0xb8, 0x40, 0xad, 0xfd, 0xad, 0x38, 0x65, 0xdc, 0x0f, 0x59, 0x7c, 0x27, 0x40,
|
|
0xae, 0xe5, 0xad, 0x46, 0x80, 0x01, 0xaa, 0xd1, 0xc9, 0xa6, 0x35, 0xdb, 0x79, 0x26, 0xb4, 0x39,
|
|
0xc8, 0x8f, 0x2f, 0x41, 0x5e, 0x25, 0x3e, 0x93, 0x70, 0xc1, 0x31, 0x41, 0xc1, 0x22, 0xbd, 0x41,
|
|
0xab, 0x32, 0x94, 0x11, 0x18, 0xc4, 0x22, 0xdd, 0x7f, 0xee, 0x1a, 0xe8, 0x16, 0xad, 0xfb, 0x20,
|
|
0x3c, 0x1e, 0x26, 0x32, 0xc4, 0xd8, 0xf8, 0xa5, 0x76, 0x65, 0x4a, 0xbf, 0xa5, 0xbb, 0x31, 0x4c,
|
|
0x4a, 0xbe, 0xc6, 0x6f, 0x8b, 0x74, 0xeb, 0x87, 0x3d, 0xfb, 0xbb, 0x0c, 0x76, 0x49, 0xd4, 0xaf,
|
|
0xcc, 0xdf, 0xda, 0x9a, 0xfb, 0xc5, 0xea, 0xe4, 0xef, 0xd3, 0xac, 0xad, 0x7d, 0xcc, 0xda, 0xa4,
|
|
0xf3, 0x42, 0xe8, 0xc1, 0xa0, 0xa8, 0xe9, 0x3a, 0xb7, 0x38, 0x03, 0x21, 0x58, 0xf0, 0xf3, 0x10,
|
|
0x7b, 0xb4, 0xc6, 0x3c, 0xb5, 0xcc, 0x1e, 0xbf, 0xe3, 0xe6, 0x28, 0xe3, 0xc7, 0xe8, 0xa7, 0x11,
|
|
0x18, 0x15, 0x8b, 0x74, 0xff, 0xbb, 0x39, 0xca, 0x1c, 0x25, 0xe3, 0x01, 0xc8, 0xd3, 0x2c, 0x91,
|
|
0x51, 0x55, 0xa2, 0x32, 0xa5, 0x1b, 0xf4, 0x4f, 0xc2, 0xa6, 0x11, 0x32, 0xdf, 0xa8, 0x29, 0xe9,
|
|
0x06, 0x6e, 0x33, 0xf5, 0xcf, 0xe7, 0x4b, 0x93, 0x2c, 0x96, 0x26, 0x79, 0x5f, 0x9a, 0xe4, 0x71,
|
|
0x65, 0x6a, 0x8b, 0x95, 0xa9, 0xbd, 0xae, 0x4c, 0xed, 0xe6, 0x38, 0x08, 0xe5, 0x28, 0x1d, 0xda,
|
|
0x1e, 0x8e, 0x9d, 0xa2, 0x46, 0x67, 0x53, 0x5c, 0x4f, 0xf5, 0xe8, 0x3c, 0x14, 0x84, 0x23, 0xa7,
|
|
0x09, 0x88, 0x61, 0x4d, 0xfd, 0xf3, 0xd1, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x07, 0x3a,
|
|
0x70, 0x59, 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")
|
|
)
|