cosmos-sdk/x/nft/nft.pb.go

862 lines
19 KiB
Go
Raw Normal View History

feat: generate nft protobuf (#9747) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description Generate nft protobuf, refer #9826. <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
2021-08-31 04:10:44 -07:00
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmos/nft/v1beta1/nft.proto
package nft
import (
fmt "fmt"
types "github.com/cosmos/cosmos-sdk/codec/types"
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
// Class defines the class of the nft type.
type Class struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
Uri string `protobuf:"bytes,5,opt,name=uri,proto3" json:"uri,omitempty"`
}
func (m *Class) Reset() { *m = Class{} }
func (m *Class) String() string { return proto.CompactTextString(m) }
func (*Class) ProtoMessage() {}
func (*Class) Descriptor() ([]byte, []int) {
return fileDescriptor_eb8ebf8e8053172c, []int{0}
}
func (m *Class) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Class) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Class.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 *Class) XXX_Merge(src proto.Message) {
xxx_messageInfo_Class.Merge(m, src)
}
func (m *Class) XXX_Size() int {
return m.Size()
}
func (m *Class) XXX_DiscardUnknown() {
xxx_messageInfo_Class.DiscardUnknown(m)
}
var xxx_messageInfo_Class proto.InternalMessageInfo
func (m *Class) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Class) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Class) GetSymbol() string {
if m != nil {
return m.Symbol
}
return ""
}
func (m *Class) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *Class) GetUri() string {
if m != nil {
return m.Uri
}
return ""
}
// NFT defines the nft.
type NFT struct {
ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"`
Data *types.Any `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"`
}
func (m *NFT) Reset() { *m = NFT{} }
func (m *NFT) String() string { return proto.CompactTextString(m) }
func (*NFT) ProtoMessage() {}
func (*NFT) Descriptor() ([]byte, []int) {
return fileDescriptor_eb8ebf8e8053172c, []int{1}
}
func (m *NFT) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *NFT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_NFT.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 *NFT) XXX_Merge(src proto.Message) {
xxx_messageInfo_NFT.Merge(m, src)
}
func (m *NFT) XXX_Size() int {
return m.Size()
}
func (m *NFT) XXX_DiscardUnknown() {
xxx_messageInfo_NFT.DiscardUnknown(m)
}
var xxx_messageInfo_NFT proto.InternalMessageInfo
func (m *NFT) GetClassId() string {
if m != nil {
return m.ClassId
}
return ""
}
func (m *NFT) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *NFT) GetUri() string {
if m != nil {
return m.Uri
}
return ""
}
func (m *NFT) GetData() *types.Any {
if m != nil {
return m.Data
}
return nil
}
func init() {
proto.RegisterType((*Class)(nil), "cosmos.nft.v1beta1.Class")
proto.RegisterType((*NFT)(nil), "cosmos.nft.v1beta1.NFT")
}
func init() { proto.RegisterFile("cosmos/nft/v1beta1/nft.proto", fileDescriptor_eb8ebf8e8053172c) }
var fileDescriptor_eb8ebf8e8053172c = []byte{
// 285 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x50, 0x3f, 0x4b, 0xc4, 0x30,
0x1c, 0x6d, 0xda, 0xde, 0xa9, 0x39, 0x10, 0x09, 0x22, 0x39, 0x91, 0x50, 0x3a, 0x75, 0x31, 0xe1,
0x74, 0x75, 0x51, 0x41, 0x70, 0x71, 0x38, 0x9c, 0x5c, 0x24, 0x6d, 0x7a, 0x35, 0xd8, 0x36, 0x47,
0x93, 0xaa, 0xfd, 0x16, 0x7e, 0x2c, 0xc7, 0x1b, 0x1d, 0xa5, 0xfd, 0x22, 0xd2, 0xb4, 0x16, 0xa7,
0xdf, 0xfb, 0xbd, 0xf7, 0x78, 0xbf, 0x3f, 0xf0, 0x2c, 0x51, 0xba, 0x50, 0x9a, 0x95, 0x1b, 0xc3,
0xde, 0x56, 0x71, 0x6a, 0xf8, 0xaa, 0xc7, 0x74, 0x5b, 0x29, 0xa3, 0x10, 0x1a, 0x54, 0xda, 0x33,
0xa3, 0x7a, 0xba, 0xcc, 0x94, 0xca, 0xf2, 0x94, 0x59, 0x47, 0x5c, 0x6f, 0x18, 0x2f, 0x9b, 0xc1,
0x1e, 0xbe, 0xc3, 0xd9, 0x6d, 0xce, 0xb5, 0x46, 0x87, 0xd0, 0x95, 0x02, 0x83, 0x00, 0x44, 0x07,
0x6b, 0x57, 0x0a, 0x84, 0xa0, 0x5f, 0xf2, 0x22, 0xc5, 0xae, 0x65, 0x2c, 0x46, 0x27, 0x70, 0xae,
0x9b, 0x22, 0x56, 0x39, 0xf6, 0x2c, 0x3b, 0x76, 0x28, 0x80, 0x0b, 0x91, 0xea, 0xa4, 0x92, 0x5b,
0x23, 0x55, 0x89, 0x7d, 0x2b, 0xfe, 0xa7, 0xd0, 0x11, 0xf4, 0xea, 0x4a, 0xe2, 0x99, 0x55, 0x7a,
0x18, 0xe6, 0xd0, 0x7b, 0xb8, 0x7b, 0x44, 0x4b, 0xb8, 0x9f, 0xf4, 0xf3, 0x9f, 0xa7, 0xe1, 0x7b,
0xb6, 0xbf, 0x17, 0xe3, 0x46, 0xee, 0xb4, 0xd1, 0x98, 0xe1, 0x4d, 0x19, 0x28, 0x82, 0xbe, 0xe0,
0x86, 0x63, 0x18, 0x80, 0x68, 0x71, 0x71, 0x4c, 0x87, 0x33, 0xe9, 0xdf, 0x99, 0xf4, 0xba, 0x6c,
0xd6, 0xd6, 0x71, 0x73, 0xf5, 0xd5, 0x12, 0xb0, 0x6b, 0x09, 0xf8, 0x69, 0x09, 0xf8, 0xec, 0x88,
0xb3, 0xeb, 0x88, 0xf3, 0xdd, 0x11, 0xe7, 0x29, 0xcc, 0xa4, 0x79, 0xa9, 0x63, 0x9a, 0xa8, 0x82,
0x8d, 0x8f, 0x1d, 0xca, 0xb9, 0x16, 0xaf, 0xec, 0xa3, 0xff, 0x6c, 0x3c, 0xb7, 0x89, 0x97, 0xbf,
0x01, 0x00, 0x00, 0xff, 0xff, 0xf6, 0xc1, 0xa5, 0xbb, 0x7a, 0x01, 0x00, 0x00,
}
func (m *Class) 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 *Class) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Class) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Uri) > 0 {
i -= len(m.Uri)
copy(dAtA[i:], m.Uri)
i = encodeVarintNft(dAtA, i, uint64(len(m.Uri)))
i--
dAtA[i] = 0x2a
}
if len(m.Description) > 0 {
i -= len(m.Description)
copy(dAtA[i:], m.Description)
i = encodeVarintNft(dAtA, i, uint64(len(m.Description)))
i--
dAtA[i] = 0x22
}
if len(m.Symbol) > 0 {
i -= len(m.Symbol)
copy(dAtA[i:], m.Symbol)
i = encodeVarintNft(dAtA, i, uint64(len(m.Symbol)))
i--
dAtA[i] = 0x1a
}
if len(m.Name) > 0 {
i -= len(m.Name)
copy(dAtA[i:], m.Name)
i = encodeVarintNft(dAtA, i, uint64(len(m.Name)))
i--
dAtA[i] = 0x12
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintNft(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *NFT) 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 *NFT) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *NFT) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Data != nil {
{
size, err := m.Data.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintNft(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x52
}
if len(m.Uri) > 0 {
i -= len(m.Uri)
copy(dAtA[i:], m.Uri)
i = encodeVarintNft(dAtA, i, uint64(len(m.Uri)))
i--
dAtA[i] = 0x1a
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintNft(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0x12
}
if len(m.ClassId) > 0 {
i -= len(m.ClassId)
copy(dAtA[i:], m.ClassId)
i = encodeVarintNft(dAtA, i, uint64(len(m.ClassId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintNft(dAtA []byte, offset int, v uint64) int {
offset -= sovNft(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Class) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Id)
if l > 0 {
n += 1 + l + sovNft(uint64(l))
}
l = len(m.Name)
if l > 0 {
n += 1 + l + sovNft(uint64(l))
}
l = len(m.Symbol)
if l > 0 {
n += 1 + l + sovNft(uint64(l))
}
l = len(m.Description)
if l > 0 {
n += 1 + l + sovNft(uint64(l))
}
l = len(m.Uri)
if l > 0 {
n += 1 + l + sovNft(uint64(l))
}
return n
}
func (m *NFT) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ClassId)
if l > 0 {
n += 1 + l + sovNft(uint64(l))
}
l = len(m.Id)
if l > 0 {
n += 1 + l + sovNft(uint64(l))
}
l = len(m.Uri)
if l > 0 {
n += 1 + l + sovNft(uint64(l))
}
if m.Data != nil {
l = m.Data.Size()
n += 1 + l + sovNft(uint64(l))
}
return n
}
func sovNft(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozNft(x uint64) (n int) {
return sovNft(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Class) 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 ErrIntOverflowNft
}
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: Class: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Class: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNft
}
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 ErrInvalidLengthNft
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNft
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Id = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNft
}
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 ErrInvalidLengthNft
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNft
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNft
}
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 ErrInvalidLengthNft
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNft
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Symbol = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
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 ErrIntOverflowNft
}
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 ErrInvalidLengthNft
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNft
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Description = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNft
}
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 ErrInvalidLengthNft
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNft
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Uri = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipNft(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthNft
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NFT) 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 ErrIntOverflowNft
}
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: NFT: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NFT: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNft
}
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 ErrInvalidLengthNft
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNft
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ClassId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNft
}
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 ErrInvalidLengthNft
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNft
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Id = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNft
}
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 ErrInvalidLengthNft
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthNft
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Uri = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 10:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowNft
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthNft
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthNft
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Data == nil {
m.Data = &types.Any{}
}
if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipNft(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthNft
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipNft(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, ErrIntOverflowNft
}
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, ErrIntOverflowNft
}
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, ErrIntOverflowNft
}
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, ErrInvalidLengthNft
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupNft
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthNft
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthNft = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowNft = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupNft = fmt.Errorf("proto: unexpected end of group")
)