diff --git a/modules/light-clients/08-wasm/types/genesis.pb.go b/modules/light-clients/08-wasm/types/genesis.pb.go deleted file mode 100644 index d142dfd1ddb..00000000000 --- a/modules/light-clients/08-wasm/types/genesis.pb.go +++ /dev/null @@ -1,504 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/lightclients/wasm/v1/genesis.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/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 - -// GenesisState defines 08-wasm's keeper genesis state -type GenesisState struct { - // uploaded light client wasm contracts - Contracts []Contract `protobuf:"bytes,1,rep,name=contracts,proto3" json:"contracts"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_05e250654f164e20, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetContracts() []Contract { - if m != nil { - return m.Contracts - } - return nil -} - -// Contract stores contract code -type Contract struct { - // contract byte code - CodeBytes []byte `protobuf:"bytes,1,opt,name=code_bytes,json=codeBytes,proto3" json:"code_bytes,omitempty"` -} - -func (m *Contract) Reset() { *m = Contract{} } -func (m *Contract) String() string { return proto.CompactTextString(m) } -func (*Contract) ProtoMessage() {} -func (*Contract) Descriptor() ([]byte, []int) { - return fileDescriptor_05e250654f164e20, []int{1} -} -func (m *Contract) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Contract.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 *Contract) XXX_Merge(src proto.Message) { - xxx_messageInfo_Contract.Merge(m, src) -} -func (m *Contract) XXX_Size() int { - return m.Size() -} -func (m *Contract) XXX_DiscardUnknown() { - xxx_messageInfo_Contract.DiscardUnknown(m) -} - -var xxx_messageInfo_Contract proto.InternalMessageInfo - -func init() { - proto.RegisterType((*GenesisState)(nil), "ibc.lightclients.wasm.v1.GenesisState") - proto.RegisterType((*Contract)(nil), "ibc.lightclients.wasm.v1.Contract") -} - -func init() { - proto.RegisterFile("ibc/lightclients/wasm/v1/genesis.proto", fileDescriptor_05e250654f164e20) -} - -var fileDescriptor_05e250654f164e20 = []byte{ - // 261 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xcb, 0x4c, 0x4a, 0xd6, - 0xcf, 0xc9, 0x4c, 0xcf, 0x28, 0x49, 0xce, 0xc9, 0x4c, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x4f, 0x2c, - 0xce, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0x92, 0xc8, 0x4c, 0x4a, 0xd6, 0x43, 0x56, 0xa7, 0x07, 0x52, 0xa7, 0x57, 0x66, - 0x28, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, 0xa4, 0x0f, 0x62, 0x41, 0xd4, 0x2b, 0x85, 0x71, - 0xf1, 0xb8, 0x43, 0x0c, 0x08, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0x72, 0xe3, 0xe2, 0x4c, 0xce, 0xcf, - 0x2b, 0x29, 0x4a, 0x4c, 0x2e, 0x29, 0x96, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x52, 0xd2, 0xc3, - 0x65, 0xa6, 0x9e, 0x33, 0x54, 0xa9, 0x13, 0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x41, 0x08, 0xad, 0x4a, - 0xfa, 0x5c, 0x1c, 0x30, 0x49, 0x21, 0x59, 0x2e, 0xae, 0xe4, 0xfc, 0x94, 0xd4, 0xf8, 0xa4, 0xca, - 0x92, 0x54, 0x90, 0xa1, 0x8c, 0x1a, 0x3c, 0x20, 0xa5, 0x29, 0xa9, 0x4e, 0x20, 0x01, 0x2b, 0x96, - 0x8e, 0x05, 0xf2, 0x0c, 0x4e, 0x61, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, - 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, - 0x65, 0x93, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9c, 0x5f, 0x9c, - 0x9b, 0x5f, 0xac, 0x9f, 0x99, 0x94, 0xac, 0x9b, 0x9e, 0xaf, 0x9f, 0x9b, 0x9f, 0x52, 0x9a, 0x93, - 0x5a, 0x0c, 0x09, 0x17, 0x5d, 0x58, 0xc0, 0x18, 0x58, 0xe8, 0x82, 0xc3, 0xa6, 0xa4, 0xb2, 0x20, - 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x4f, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x06, 0xb3, 0x17, - 0x15, 0x41, 0x01, 0x00, 0x00, -} - -func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Contracts) > 0 { - for iNdEx := len(m.Contracts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Contracts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Contract) 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 *Contract) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Contract) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CodeBytes) > 0 { - i -= len(m.CodeBytes) - copy(dAtA[i:], m.CodeBytes) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.CodeBytes))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Contracts) > 0 { - for _, e := range m.Contracts { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func (m *Contract) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CodeBytes) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) 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 ErrIntOverflowGenesis - } - 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: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Contracts = append(m.Contracts, Contract{}) - if err := m.Contracts[len(m.Contracts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Contract) 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 ErrIntOverflowGenesis - } - 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: Contract: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Contract: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CodeBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CodeBytes = append(m.CodeBytes[:0], dAtA[iNdEx:postIndex]...) - if m.CodeBytes == nil { - m.CodeBytes = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(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, ErrIntOverflowGenesis - } - 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, ErrIntOverflowGenesis - } - 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, ErrIntOverflowGenesis - } - 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, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/modules/light-clients/08-wasm/types/query.pb.go b/modules/light-clients/08-wasm/types/query.pb.go deleted file mode 100644 index 325d5e0dccd..00000000000 --- a/modules/light-clients/08-wasm/types/query.pb.go +++ /dev/null @@ -1,1053 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/lightclients/wasm/v1/query.proto - -package types - -import ( - context "context" - fmt "fmt" - query "github.com/cosmos/cosmos-sdk/types/query" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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 - -// QueryChecksumsRequest is the request type for the Query/Checksums RPC method. -type QueryChecksumsRequest struct { - // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryChecksumsRequest) Reset() { *m = QueryChecksumsRequest{} } -func (m *QueryChecksumsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryChecksumsRequest) ProtoMessage() {} -func (*QueryChecksumsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9e3718a8cb915777, []int{0} -} -func (m *QueryChecksumsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryChecksumsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryChecksumsRequest.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 *QueryChecksumsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryChecksumsRequest.Merge(m, src) -} -func (m *QueryChecksumsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryChecksumsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryChecksumsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryChecksumsRequest proto.InternalMessageInfo - -func (m *QueryChecksumsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryChecksumsResponse is the response type for the Query/Checksums RPC method. -type QueryChecksumsResponse struct { - // checksums is a list of the hex encoded checksums of all wasm codes stored. - Checksums []string `protobuf:"bytes,1,rep,name=checksums,proto3" json:"checksums,omitempty"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryChecksumsResponse) Reset() { *m = QueryChecksumsResponse{} } -func (m *QueryChecksumsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryChecksumsResponse) ProtoMessage() {} -func (*QueryChecksumsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9e3718a8cb915777, []int{1} -} -func (m *QueryChecksumsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryChecksumsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryChecksumsResponse.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 *QueryChecksumsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryChecksumsResponse.Merge(m, src) -} -func (m *QueryChecksumsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryChecksumsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryChecksumsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryChecksumsResponse proto.InternalMessageInfo - -func (m *QueryChecksumsResponse) GetChecksums() []string { - if m != nil { - return m.Checksums - } - return nil -} - -func (m *QueryChecksumsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryCodeRequest is the request type for the Query/Code RPC method. -type QueryCodeRequest struct { - // checksum is a hex encoded string of the code stored. - Checksum string `protobuf:"bytes,1,opt,name=checksum,proto3" json:"checksum,omitempty"` -} - -func (m *QueryCodeRequest) Reset() { *m = QueryCodeRequest{} } -func (m *QueryCodeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCodeRequest) ProtoMessage() {} -func (*QueryCodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9e3718a8cb915777, []int{2} -} -func (m *QueryCodeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCodeRequest.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 *QueryCodeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCodeRequest.Merge(m, src) -} -func (m *QueryCodeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryCodeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCodeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCodeRequest proto.InternalMessageInfo - -func (m *QueryCodeRequest) GetChecksum() string { - if m != nil { - return m.Checksum - } - return "" -} - -// QueryCodeResponse is the response type for the Query/Code RPC method. -type QueryCodeResponse struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *QueryCodeResponse) Reset() { *m = QueryCodeResponse{} } -func (m *QueryCodeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCodeResponse) ProtoMessage() {} -func (*QueryCodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9e3718a8cb915777, []int{3} -} -func (m *QueryCodeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCodeResponse.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 *QueryCodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCodeResponse.Merge(m, src) -} -func (m *QueryCodeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryCodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCodeResponse proto.InternalMessageInfo - -func (m *QueryCodeResponse) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func init() { - proto.RegisterType((*QueryChecksumsRequest)(nil), "ibc.lightclients.wasm.v1.QueryChecksumsRequest") - proto.RegisterType((*QueryChecksumsResponse)(nil), "ibc.lightclients.wasm.v1.QueryChecksumsResponse") - proto.RegisterType((*QueryCodeRequest)(nil), "ibc.lightclients.wasm.v1.QueryCodeRequest") - proto.RegisterType((*QueryCodeResponse)(nil), "ibc.lightclients.wasm.v1.QueryCodeResponse") -} - -func init() { - proto.RegisterFile("ibc/lightclients/wasm/v1/query.proto", fileDescriptor_9e3718a8cb915777) -} - -var fileDescriptor_9e3718a8cb915777 = []byte{ - // 432 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0xaa, 0xd3, 0x40, - 0x14, 0xc6, 0x3b, 0xf5, 0x2a, 0x66, 0x74, 0xa1, 0x03, 0x4a, 0x09, 0x97, 0x70, 0x89, 0x7f, 0xee, - 0xe5, 0x5e, 0x3a, 0xd3, 0xb4, 0x08, 0x82, 0xae, 0x14, 0x74, 0xab, 0x59, 0xb8, 0x70, 0x23, 0x93, - 0xc9, 0x90, 0x0e, 0x26, 0x99, 0xb4, 0x33, 0xa9, 0x14, 0x11, 0xc1, 0x27, 0x10, 0x5c, 0xea, 0xe3, - 0xb8, 0x70, 0x59, 0x70, 0xe3, 0x52, 0x5a, 0x1f, 0x44, 0x32, 0x93, 0x34, 0xad, 0x58, 0xda, 0xdd, - 0xe4, 0xf0, 0x3b, 0xdf, 0xf7, 0x9d, 0x93, 0x03, 0xef, 0x8a, 0x88, 0x91, 0x54, 0x24, 0x63, 0xcd, - 0x52, 0xc1, 0x73, 0xad, 0xc8, 0x3b, 0xaa, 0x32, 0x32, 0x0b, 0xc8, 0xa4, 0xe4, 0xd3, 0x39, 0x2e, - 0xa6, 0x52, 0x4b, 0xd4, 0x13, 0x11, 0xc3, 0x9b, 0x14, 0xae, 0x28, 0x3c, 0x0b, 0xdc, 0xe3, 0x44, - 0xca, 0x24, 0xe5, 0x84, 0x16, 0x82, 0xd0, 0x3c, 0x97, 0x9a, 0x6a, 0x21, 0x73, 0x65, 0xfb, 0xdc, - 0x73, 0x26, 0x55, 0x26, 0x15, 0x89, 0xa8, 0xe2, 0x56, 0x90, 0xcc, 0x82, 0x88, 0x6b, 0x1a, 0x90, - 0x82, 0x26, 0x22, 0x37, 0xb0, 0x65, 0xfd, 0x37, 0xf0, 0xd6, 0xcb, 0x8a, 0x78, 0x3a, 0xe6, 0xec, - 0xad, 0x2a, 0x33, 0x15, 0xf2, 0x49, 0xc9, 0x95, 0x46, 0xcf, 0x20, 0x6c, 0xe1, 0x1e, 0x38, 0x01, - 0x67, 0xd7, 0x86, 0xf7, 0xb1, 0x55, 0xc6, 0x95, 0x32, 0xb6, 0x51, 0x6b, 0x65, 0xfc, 0x82, 0x26, - 0xbc, 0xee, 0x0d, 0x37, 0x3a, 0xfd, 0x8f, 0xf0, 0xf6, 0xbf, 0x06, 0xaa, 0x90, 0xb9, 0xe2, 0xe8, - 0x18, 0x3a, 0xac, 0x29, 0xf6, 0xc0, 0xc9, 0xa5, 0x33, 0x27, 0x6c, 0x0b, 0xe8, 0xf9, 0x96, 0x7f, - 0xd7, 0xf8, 0x9f, 0xee, 0xf5, 0xb7, 0xd2, 0x5b, 0x01, 0x30, 0xbc, 0x61, 0x03, 0xc8, 0xb8, 0x09, - 0x88, 0x5c, 0x78, 0xb5, 0x71, 0x32, 0xa3, 0x39, 0xe1, 0xfa, 0xdb, 0x3f, 0x85, 0x37, 0x37, 0xf8, - 0x3a, 0x2b, 0x82, 0x47, 0x31, 0xd5, 0xd4, 0xc0, 0xd7, 0x43, 0xf3, 0x1e, 0x7e, 0xef, 0xc2, 0xcb, - 0x86, 0x44, 0x5f, 0x01, 0x74, 0xd6, 0xf3, 0x21, 0x82, 0x77, 0xfd, 0x37, 0xfc, 0xdf, 0x55, 0xbb, - 0x83, 0xc3, 0x1b, 0x6c, 0x1c, 0xff, 0xe2, 0xd3, 0xcf, 0x3f, 0x5f, 0xba, 0xf7, 0xd0, 0x1d, 0xb2, - 0xf3, 0x90, 0xda, 0x4d, 0x7e, 0x03, 0xf0, 0xa8, 0x1a, 0x06, 0x9d, 0xef, 0xf3, 0x69, 0x37, 0xe4, - 0x5e, 0x1c, 0xc4, 0xd6, 0x71, 0x1e, 0x99, 0x38, 0x0f, 0xd0, 0xe8, 0x80, 0x38, 0xe4, 0x7d, 0xf3, - 0xfc, 0x40, 0x98, 0x8c, 0xf9, 0x93, 0x57, 0x3f, 0x96, 0x1e, 0x58, 0x2c, 0x3d, 0xf0, 0x7b, 0xe9, - 0x81, 0xcf, 0x2b, 0xaf, 0xb3, 0x58, 0x79, 0x9d, 0x5f, 0x2b, 0xaf, 0xf3, 0xfa, 0x71, 0x22, 0xf4, - 0xb8, 0x8c, 0x30, 0x93, 0x19, 0xa9, 0x4f, 0x5a, 0x44, 0xac, 0x9f, 0x48, 0x92, 0xc9, 0xb8, 0x4c, - 0xb9, 0xb2, 0x56, 0xfd, 0xc6, 0x6b, 0xf0, 0xb0, 0x6f, 0xec, 0xf4, 0xbc, 0xe0, 0x2a, 0xba, 0x62, - 0x0e, 0x7c, 0xf4, 0x37, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x82, 0x4a, 0xb3, 0x6c, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Get all Wasm checksums - Checksums(ctx context.Context, in *QueryChecksumsRequest, opts ...grpc.CallOption) (*QueryChecksumsResponse, error) - // Get Wasm code for given checksum - Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Checksums(ctx context.Context, in *QueryChecksumsRequest, opts ...grpc.CallOption) (*QueryChecksumsResponse, error) { - out := new(QueryChecksumsResponse) - err := c.cc.Invoke(ctx, "/ibc.lightclients.wasm.v1.Query/Checksums", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error) { - out := new(QueryCodeResponse) - err := c.cc.Invoke(ctx, "/ibc.lightclients.wasm.v1.Query/Code", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Get all Wasm checksums - Checksums(context.Context, *QueryChecksumsRequest) (*QueryChecksumsResponse, error) - // Get Wasm code for given checksum - Code(context.Context, *QueryCodeRequest) (*QueryCodeResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Checksums(ctx context.Context, req *QueryChecksumsRequest) (*QueryChecksumsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Checksums not implemented") -} -func (*UnimplementedQueryServer) Code(ctx context.Context, req *QueryCodeRequest) (*QueryCodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Code not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Checksums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryChecksumsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Checksums(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.lightclients.wasm.v1.Query/Checksums", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Checksums(ctx, req.(*QueryChecksumsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Code_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Code(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.lightclients.wasm.v1.Query/Code", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Code(ctx, req.(*QueryCodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ibc.lightclients.wasm.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Checksums", - Handler: _Query_Checksums_Handler, - }, - { - MethodName: "Code", - Handler: _Query_Code_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ibc/lightclients/wasm/v1/query.proto", -} - -func (m *QueryChecksumsRequest) 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 *QueryChecksumsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryChecksumsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryChecksumsResponse) 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 *QueryChecksumsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryChecksumsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Checksums) > 0 { - for iNdEx := len(m.Checksums) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Checksums[iNdEx]) - copy(dAtA[i:], m.Checksums[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Checksums[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryCodeRequest) 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 *QueryCodeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Checksum) > 0 { - i -= len(m.Checksum) - copy(dAtA[i:], m.Checksum) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Checksum))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryCodeResponse) 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 *QueryCodeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryChecksumsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryChecksumsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Checksums) > 0 { - for _, s := range m.Checksums { - l = len(s) - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCodeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Checksum) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCodeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryChecksumsRequest) 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 ErrIntOverflowQuery - } - 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: QueryChecksumsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryChecksumsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryChecksumsResponse) 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 ErrIntOverflowQuery - } - 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: QueryChecksumsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryChecksumsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Checksums", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Checksums = append(m.Checksums, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCodeRequest) 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 ErrIntOverflowQuery - } - 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: QueryCodeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Checksum", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Checksum = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCodeResponse) 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 ErrIntOverflowQuery - } - 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: QueryCodeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(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, ErrIntOverflowQuery - } - 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, ErrIntOverflowQuery - } - 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, ErrIntOverflowQuery - } - 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, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/modules/light-clients/08-wasm/types/query.pb.gw.go b/modules/light-clients/08-wasm/types/query.pb.gw.go deleted file mode 100644 index 0b06f46b5f9..00000000000 --- a/modules/light-clients/08-wasm/types/query.pb.gw.go +++ /dev/null @@ -1,272 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: ibc/lightclients/wasm/v1/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -var ( - filter_Query_Checksums_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_Checksums_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryChecksumsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Checksums_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.Checksums(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Checksums_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryChecksumsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Checksums_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.Checksums(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCodeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["checksum"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "checksum") - } - - protoReq.Checksum, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "checksum", err) - } - - msg, err := client.Code(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCodeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["checksum"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "checksum") - } - - protoReq.Checksum, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "checksum", err) - } - - msg, err := server.Code(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Checksums_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Checksums_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Checksums_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Code_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Checksums_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Checksums_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Checksums_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Code_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Checksums_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "lightclients", "wasm", "v1", "checksums"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Code_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"ibc", "lightclients", "wasm", "v1", "checksums", "checksum", "code"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Checksums_0 = runtime.ForwardResponseMessage - - forward_Query_Code_0 = runtime.ForwardResponseMessage -) diff --git a/modules/light-clients/08-wasm/types/tx.pb.go b/modules/light-clients/08-wasm/types/tx.pb.go deleted file mode 100644 index 8c0fdf5f1f0..00000000000 --- a/modules/light-clients/08-wasm/types/tx.pb.go +++ /dev/null @@ -1,1524 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/lightclients/wasm/v1/tx.proto - -package types - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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 - -// MsgStoreCode defines the request type for the StoreCode rpc. -type MsgStoreCode struct { - // signer address - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - // wasm byte code of light client contract. It can be raw or gzip compressed - WasmByteCode []byte `protobuf:"bytes,2,opt,name=wasm_byte_code,json=wasmByteCode,proto3" json:"wasm_byte_code,omitempty"` -} - -func (m *MsgStoreCode) Reset() { *m = MsgStoreCode{} } -func (m *MsgStoreCode) String() string { return proto.CompactTextString(m) } -func (*MsgStoreCode) ProtoMessage() {} -func (*MsgStoreCode) Descriptor() ([]byte, []int) { - return fileDescriptor_1d9737363bf1e38d, []int{0} -} -func (m *MsgStoreCode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgStoreCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgStoreCode.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 *MsgStoreCode) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgStoreCode.Merge(m, src) -} -func (m *MsgStoreCode) XXX_Size() int { - return m.Size() -} -func (m *MsgStoreCode) XXX_DiscardUnknown() { - xxx_messageInfo_MsgStoreCode.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgStoreCode proto.InternalMessageInfo - -func (m *MsgStoreCode) GetSigner() string { - if m != nil { - return m.Signer - } - return "" -} - -func (m *MsgStoreCode) GetWasmByteCode() []byte { - if m != nil { - return m.WasmByteCode - } - return nil -} - -// MsgStoreCodeResponse defines the response type for the StoreCode rpc -type MsgStoreCodeResponse struct { - // checksum is the sha256 hash of the stored code - Checksum []byte `protobuf:"bytes,1,opt,name=checksum,proto3" json:"checksum,omitempty"` -} - -func (m *MsgStoreCodeResponse) Reset() { *m = MsgStoreCodeResponse{} } -func (m *MsgStoreCodeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgStoreCodeResponse) ProtoMessage() {} -func (*MsgStoreCodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1d9737363bf1e38d, []int{1} -} -func (m *MsgStoreCodeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgStoreCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgStoreCodeResponse.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 *MsgStoreCodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgStoreCodeResponse.Merge(m, src) -} -func (m *MsgStoreCodeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgStoreCodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgStoreCodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgStoreCodeResponse proto.InternalMessageInfo - -func (m *MsgStoreCodeResponse) GetChecksum() []byte { - if m != nil { - return m.Checksum - } - return nil -} - -// MsgRemoveChecksum defines the request type for the MsgRemoveChecksum rpc. -type MsgRemoveChecksum struct { - // signer address - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - // checksum is the sha256 hash to be removed from the store - Checksum []byte `protobuf:"bytes,2,opt,name=checksum,proto3" json:"checksum,omitempty"` -} - -func (m *MsgRemoveChecksum) Reset() { *m = MsgRemoveChecksum{} } -func (m *MsgRemoveChecksum) String() string { return proto.CompactTextString(m) } -func (*MsgRemoveChecksum) ProtoMessage() {} -func (*MsgRemoveChecksum) Descriptor() ([]byte, []int) { - return fileDescriptor_1d9737363bf1e38d, []int{2} -} -func (m *MsgRemoveChecksum) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRemoveChecksum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRemoveChecksum.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 *MsgRemoveChecksum) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRemoveChecksum.Merge(m, src) -} -func (m *MsgRemoveChecksum) XXX_Size() int { - return m.Size() -} -func (m *MsgRemoveChecksum) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRemoveChecksum.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRemoveChecksum proto.InternalMessageInfo - -func (m *MsgRemoveChecksum) GetSigner() string { - if m != nil { - return m.Signer - } - return "" -} - -func (m *MsgRemoveChecksum) GetChecksum() []byte { - if m != nil { - return m.Checksum - } - return nil -} - -// MsgStoreChecksumResponse defines the response type for the StoreCode rpc -type MsgRemoveChecksumResponse struct { -} - -func (m *MsgRemoveChecksumResponse) Reset() { *m = MsgRemoveChecksumResponse{} } -func (m *MsgRemoveChecksumResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRemoveChecksumResponse) ProtoMessage() {} -func (*MsgRemoveChecksumResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1d9737363bf1e38d, []int{3} -} -func (m *MsgRemoveChecksumResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRemoveChecksumResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRemoveChecksumResponse.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 *MsgRemoveChecksumResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRemoveChecksumResponse.Merge(m, src) -} -func (m *MsgRemoveChecksumResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRemoveChecksumResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRemoveChecksumResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRemoveChecksumResponse proto.InternalMessageInfo - -// MsgMigrateContract defines the request type for the MigrateContract rpc. -type MsgMigrateContract struct { - // signer address - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - // the client id of the contract - ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - // checksum is the sha256 hash of the new wasm byte code for the contract - Checksum []byte `protobuf:"bytes,3,opt,name=checksum,proto3" json:"checksum,omitempty"` - // the json encoded message to be passed to the contract on migration - Msg []byte `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` -} - -func (m *MsgMigrateContract) Reset() { *m = MsgMigrateContract{} } -func (m *MsgMigrateContract) String() string { return proto.CompactTextString(m) } -func (*MsgMigrateContract) ProtoMessage() {} -func (*MsgMigrateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_1d9737363bf1e38d, []int{4} -} -func (m *MsgMigrateContract) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgMigrateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgMigrateContract.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 *MsgMigrateContract) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgMigrateContract.Merge(m, src) -} -func (m *MsgMigrateContract) XXX_Size() int { - return m.Size() -} -func (m *MsgMigrateContract) XXX_DiscardUnknown() { - xxx_messageInfo_MsgMigrateContract.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgMigrateContract proto.InternalMessageInfo - -func (m *MsgMigrateContract) GetSigner() string { - if m != nil { - return m.Signer - } - return "" -} - -func (m *MsgMigrateContract) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -func (m *MsgMigrateContract) GetChecksum() []byte { - if m != nil { - return m.Checksum - } - return nil -} - -func (m *MsgMigrateContract) GetMsg() []byte { - if m != nil { - return m.Msg - } - return nil -} - -// MsgMigrateContractResponse defines the response type for the MigrateContract rpc -type MsgMigrateContractResponse struct { -} - -func (m *MsgMigrateContractResponse) Reset() { *m = MsgMigrateContractResponse{} } -func (m *MsgMigrateContractResponse) String() string { return proto.CompactTextString(m) } -func (*MsgMigrateContractResponse) ProtoMessage() {} -func (*MsgMigrateContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1d9737363bf1e38d, []int{5} -} -func (m *MsgMigrateContractResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgMigrateContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgMigrateContractResponse.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 *MsgMigrateContractResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgMigrateContractResponse.Merge(m, src) -} -func (m *MsgMigrateContractResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgMigrateContractResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgMigrateContractResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgMigrateContractResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgStoreCode)(nil), "ibc.lightclients.wasm.v1.MsgStoreCode") - proto.RegisterType((*MsgStoreCodeResponse)(nil), "ibc.lightclients.wasm.v1.MsgStoreCodeResponse") - proto.RegisterType((*MsgRemoveChecksum)(nil), "ibc.lightclients.wasm.v1.MsgRemoveChecksum") - proto.RegisterType((*MsgRemoveChecksumResponse)(nil), "ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse") - proto.RegisterType((*MsgMigrateContract)(nil), "ibc.lightclients.wasm.v1.MsgMigrateContract") - proto.RegisterType((*MsgMigrateContractResponse)(nil), "ibc.lightclients.wasm.v1.MsgMigrateContractResponse") -} - -func init() { proto.RegisterFile("ibc/lightclients/wasm/v1/tx.proto", fileDescriptor_1d9737363bf1e38d) } - -var fileDescriptor_1d9737363bf1e38d = []byte{ - // 445 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4d, 0x6f, 0xd3, 0x40, - 0x14, 0xcc, 0x26, 0x50, 0x35, 0x8f, 0xa8, 0x80, 0x85, 0x20, 0xb8, 0xc8, 0x2a, 0x11, 0x42, 0x55, - 0x21, 0x6b, 0xda, 0x72, 0x40, 0x88, 0x53, 0x7b, 0xe2, 0xe0, 0x8b, 0x41, 0x48, 0x70, 0x89, 0xe2, - 0xf5, 0x6a, 0xb3, 0x22, 0xeb, 0x8d, 0xfc, 0xd6, 0x81, 0xdc, 0x10, 0xe2, 0x07, 0xf0, 0x53, 0xfa, - 0x33, 0x38, 0xf6, 0xc8, 0x81, 0x03, 0x4a, 0x0e, 0xfd, 0x1b, 0xc8, 0x5f, 0xc1, 0x4e, 0x95, 0xaa, - 0xb9, 0x79, 0x9f, 0xe6, 0xcd, 0x8c, 0xdf, 0x68, 0xe0, 0xb1, 0x0c, 0x98, 0x3b, 0x96, 0x62, 0x64, - 0xd8, 0x58, 0xf2, 0xc8, 0xa0, 0xfb, 0x65, 0x88, 0xca, 0x9d, 0x1e, 0xba, 0xe6, 0x2b, 0x9d, 0xc4, - 0xda, 0x68, 0xab, 0x2b, 0x03, 0x46, 0xab, 0x10, 0x9a, 0x42, 0xe8, 0xf4, 0xd0, 0x7e, 0xc0, 0x34, - 0x2a, 0x8d, 0xae, 0x42, 0x91, 0x6e, 0x28, 0x14, 0xf9, 0x4a, 0xef, 0x23, 0x74, 0x3c, 0x14, 0xef, - 0x8c, 0x8e, 0xf9, 0xa9, 0x0e, 0xb9, 0x75, 0x1f, 0xb6, 0x50, 0x8a, 0x88, 0xc7, 0x5d, 0xb2, 0x47, - 0xf6, 0xdb, 0x7e, 0xf1, 0xb2, 0x9e, 0xc0, 0x4e, 0xca, 0x35, 0x08, 0x66, 0x86, 0x0f, 0x98, 0x0e, - 0x79, 0xb7, 0xb9, 0x47, 0xf6, 0x3b, 0x7e, 0x27, 0x9d, 0x9e, 0xcc, 0x4c, 0xb6, 0xfd, 0xfa, 0xd6, - 0xf7, 0x8b, 0xb3, 0x83, 0x62, 0xa5, 0x77, 0x04, 0xf7, 0xaa, 0xd4, 0x3e, 0xc7, 0x89, 0x8e, 0x90, - 0x5b, 0x36, 0x6c, 0xb3, 0x11, 0x67, 0x9f, 0x31, 0x51, 0x99, 0x48, 0xc7, 0x5f, 0xbe, 0x7b, 0xef, - 0xe1, 0xae, 0x87, 0xc2, 0xe7, 0x4a, 0x4f, 0xf9, 0x69, 0x31, 0x5c, 0xeb, 0xa9, 0x4a, 0xd4, 0xac, - 0x13, 0xd5, 0x9d, 0xec, 0xc2, 0xc3, 0x4b, 0xac, 0xa5, 0x9d, 0xde, 0x0f, 0x02, 0x96, 0x87, 0xc2, - 0x93, 0x22, 0x1e, 0xa6, 0xbf, 0x11, 0x99, 0x78, 0xc8, 0xcc, 0x5a, 0xd1, 0x5d, 0x68, 0xe7, 0xc7, - 0x1d, 0xc8, 0x30, 0x53, 0x6d, 0xfb, 0xdb, 0xf9, 0xe0, 0x6d, 0x58, 0x73, 0xd4, 0xaa, 0x3b, 0xb2, - 0xee, 0x40, 0x4b, 0xa1, 0xe8, 0xde, 0xc8, 0xc6, 0xe9, 0x67, 0xdd, 0xe3, 0x23, 0xb0, 0x2f, 0xbb, - 0x28, 0x4d, 0x1e, 0xfd, 0x69, 0x42, 0xcb, 0x43, 0x61, 0x31, 0x68, 0xff, 0xcf, 0xea, 0x29, 0x5d, - 0x97, 0x37, 0xad, 0x1e, 0xde, 0xa6, 0xd7, 0xc3, 0x2d, 0x03, 0x8a, 0x61, 0x67, 0x25, 0x81, 0x67, - 0x57, 0x32, 0xd4, 0xc1, 0xf6, 0xf1, 0x06, 0xe0, 0xa5, 0x66, 0x02, 0xb7, 0x57, 0x13, 0x78, 0x7e, - 0x25, 0xcf, 0x0a, 0xda, 0x7e, 0xb9, 0x09, 0xba, 0x94, 0xb5, 0x6f, 0x7e, 0xbb, 0x38, 0x3b, 0x20, - 0x27, 0x1f, 0x7e, 0xcd, 0x1d, 0x72, 0x3e, 0x77, 0xc8, 0xdf, 0xb9, 0x43, 0x7e, 0x2e, 0x9c, 0xc6, - 0xf9, 0xc2, 0x69, 0xfc, 0x5e, 0x38, 0x8d, 0x4f, 0x6f, 0x84, 0x34, 0xa3, 0x24, 0xa0, 0x4c, 0x2b, - 0xb7, 0xe8, 0x90, 0x0c, 0x58, 0x5f, 0x68, 0x57, 0xe9, 0x30, 0x19, 0x73, 0xcc, 0x2b, 0xd9, 0x2f, - 0x3b, 0xf9, 0xe2, 0x55, 0x3f, 0xab, 0xa5, 0x99, 0x4d, 0x38, 0x06, 0x5b, 0x59, 0xc9, 0x8e, 0xff, - 0x05, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xb7, 0xbc, 0xcb, 0xbc, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - // StoreCode defines a rpc handler method for MsgStoreCode. - StoreCode(ctx context.Context, in *MsgStoreCode, opts ...grpc.CallOption) (*MsgStoreCodeResponse, error) - // RemoveChecksum defines a rpc handler method for MsgRemoveChecksum. - RemoveChecksum(ctx context.Context, in *MsgRemoveChecksum, opts ...grpc.CallOption) (*MsgRemoveChecksumResponse, error) - // MigrateContract defines a rpc handler method for MsgMigrateContract. - MigrateContract(ctx context.Context, in *MsgMigrateContract, opts ...grpc.CallOption) (*MsgMigrateContractResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) StoreCode(ctx context.Context, in *MsgStoreCode, opts ...grpc.CallOption) (*MsgStoreCodeResponse, error) { - out := new(MsgStoreCodeResponse) - err := c.cc.Invoke(ctx, "/ibc.lightclients.wasm.v1.Msg/StoreCode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RemoveChecksum(ctx context.Context, in *MsgRemoveChecksum, opts ...grpc.CallOption) (*MsgRemoveChecksumResponse, error) { - out := new(MsgRemoveChecksumResponse) - err := c.cc.Invoke(ctx, "/ibc.lightclients.wasm.v1.Msg/RemoveChecksum", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) MigrateContract(ctx context.Context, in *MsgMigrateContract, opts ...grpc.CallOption) (*MsgMigrateContractResponse, error) { - out := new(MsgMigrateContractResponse) - err := c.cc.Invoke(ctx, "/ibc.lightclients.wasm.v1.Msg/MigrateContract", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // StoreCode defines a rpc handler method for MsgStoreCode. - StoreCode(context.Context, *MsgStoreCode) (*MsgStoreCodeResponse, error) - // RemoveChecksum defines a rpc handler method for MsgRemoveChecksum. - RemoveChecksum(context.Context, *MsgRemoveChecksum) (*MsgRemoveChecksumResponse, error) - // MigrateContract defines a rpc handler method for MsgMigrateContract. - MigrateContract(context.Context, *MsgMigrateContract) (*MsgMigrateContractResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) StoreCode(ctx context.Context, req *MsgStoreCode) (*MsgStoreCodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StoreCode not implemented") -} -func (*UnimplementedMsgServer) RemoveChecksum(ctx context.Context, req *MsgRemoveChecksum) (*MsgRemoveChecksumResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveChecksum not implemented") -} -func (*UnimplementedMsgServer) MigrateContract(ctx context.Context, req *MsgMigrateContract) (*MsgMigrateContractResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MigrateContract not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_StoreCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgStoreCode) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).StoreCode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.lightclients.wasm.v1.Msg/StoreCode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).StoreCode(ctx, req.(*MsgStoreCode)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RemoveChecksum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRemoveChecksum) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RemoveChecksum(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.lightclients.wasm.v1.Msg/RemoveChecksum", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RemoveChecksum(ctx, req.(*MsgRemoveChecksum)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_MigrateContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgMigrateContract) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).MigrateContract(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.lightclients.wasm.v1.Msg/MigrateContract", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).MigrateContract(ctx, req.(*MsgMigrateContract)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ibc.lightclients.wasm.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "StoreCode", - Handler: _Msg_StoreCode_Handler, - }, - { - MethodName: "RemoveChecksum", - Handler: _Msg_RemoveChecksum_Handler, - }, - { - MethodName: "MigrateContract", - Handler: _Msg_MigrateContract_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ibc/lightclients/wasm/v1/tx.proto", -} - -func (m *MsgStoreCode) 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 *MsgStoreCode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgStoreCode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.WasmByteCode) > 0 { - i -= len(m.WasmByteCode) - copy(dAtA[i:], m.WasmByteCode) - i = encodeVarintTx(dAtA, i, uint64(len(m.WasmByteCode))) - i-- - dAtA[i] = 0x12 - } - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgStoreCodeResponse) 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 *MsgStoreCodeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgStoreCodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Checksum) > 0 { - i -= len(m.Checksum) - copy(dAtA[i:], m.Checksum) - i = encodeVarintTx(dAtA, i, uint64(len(m.Checksum))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRemoveChecksum) 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 *MsgRemoveChecksum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRemoveChecksum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Checksum) > 0 { - i -= len(m.Checksum) - copy(dAtA[i:], m.Checksum) - i = encodeVarintTx(dAtA, i, uint64(len(m.Checksum))) - i-- - dAtA[i] = 0x12 - } - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRemoveChecksumResponse) 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 *MsgRemoveChecksumResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRemoveChecksumResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgMigrateContract) 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 *MsgMigrateContract) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgMigrateContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Msg) > 0 { - i -= len(m.Msg) - copy(dAtA[i:], m.Msg) - i = encodeVarintTx(dAtA, i, uint64(len(m.Msg))) - i-- - dAtA[i] = 0x22 - } - if len(m.Checksum) > 0 { - i -= len(m.Checksum) - copy(dAtA[i:], m.Checksum) - i = encodeVarintTx(dAtA, i, uint64(len(m.Checksum))) - i-- - dAtA[i] = 0x1a - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgMigrateContractResponse) 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 *MsgMigrateContractResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgMigrateContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgStoreCode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.WasmByteCode) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgStoreCodeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Checksum) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRemoveChecksum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Checksum) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRemoveChecksumResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgMigrateContract) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Checksum) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Msg) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgMigrateContractResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgStoreCode) 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 ErrIntOverflowTx - } - 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: MsgStoreCode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgStoreCode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WasmByteCode", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WasmByteCode = append(m.WasmByteCode[:0], dAtA[iNdEx:postIndex]...) - if m.WasmByteCode == nil { - m.WasmByteCode = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgStoreCodeResponse) 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 ErrIntOverflowTx - } - 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: MsgStoreCodeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgStoreCodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Checksum", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Checksum = append(m.Checksum[:0], dAtA[iNdEx:postIndex]...) - if m.Checksum == nil { - m.Checksum = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRemoveChecksum) 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 ErrIntOverflowTx - } - 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: MsgRemoveChecksum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRemoveChecksum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Checksum", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Checksum = append(m.Checksum[:0], dAtA[iNdEx:postIndex]...) - if m.Checksum == nil { - m.Checksum = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRemoveChecksumResponse) 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 ErrIntOverflowTx - } - 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: MsgRemoveChecksumResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRemoveChecksumResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgMigrateContract) 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 ErrIntOverflowTx - } - 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: MsgMigrateContract: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMigrateContract: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Checksum", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Checksum = append(m.Checksum[:0], dAtA[iNdEx:postIndex]...) - if m.Checksum == nil { - m.Checksum = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) - if m.Msg == nil { - m.Msg = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgMigrateContractResponse) 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 ErrIntOverflowTx - } - 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: MsgMigrateContractResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMigrateContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTx(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, ErrIntOverflowTx - } - 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, ErrIntOverflowTx - } - 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, ErrIntOverflowTx - } - 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, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/modules/light-clients/08-wasm/types/wasm.pb.go b/modules/light-clients/08-wasm/types/wasm.pb.go deleted file mode 100644 index 50b40d45bc3..00000000000 --- a/modules/light-clients/08-wasm/types/wasm.pb.go +++ /dev/null @@ -1,934 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/lightclients/wasm/v1/wasm.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - types "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - 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 - -// Wasm light client's Client state -type ClientState struct { - // bytes encoding the client state of the underlying light client - // implemented as a Wasm contract. - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Checksum []byte `protobuf:"bytes,2,opt,name=checksum,proto3" json:"checksum,omitempty"` - LatestHeight types.Height `protobuf:"bytes,3,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height"` -} - -func (m *ClientState) Reset() { *m = ClientState{} } -func (m *ClientState) String() string { return proto.CompactTextString(m) } -func (*ClientState) ProtoMessage() {} -func (*ClientState) Descriptor() ([]byte, []int) { - return fileDescriptor_678928ebbdee1807, []int{0} -} -func (m *ClientState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClientState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClientState.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 *ClientState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClientState.Merge(m, src) -} -func (m *ClientState) XXX_Size() int { - return m.Size() -} -func (m *ClientState) XXX_DiscardUnknown() { - xxx_messageInfo_ClientState.DiscardUnknown(m) -} - -var xxx_messageInfo_ClientState proto.InternalMessageInfo - -// Wasm light client's ConsensusState -type ConsensusState struct { - // bytes encoding the consensus state of the underlying light client - // implemented as a Wasm contract. - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *ConsensusState) Reset() { *m = ConsensusState{} } -func (m *ConsensusState) String() string { return proto.CompactTextString(m) } -func (*ConsensusState) ProtoMessage() {} -func (*ConsensusState) Descriptor() ([]byte, []int) { - return fileDescriptor_678928ebbdee1807, []int{1} -} -func (m *ConsensusState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusState.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 *ConsensusState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusState.Merge(m, src) -} -func (m *ConsensusState) XXX_Size() int { - return m.Size() -} -func (m *ConsensusState) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusState.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusState proto.InternalMessageInfo - -// Wasm light client message (either header(s) or misbehaviour) -type ClientMessage struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *ClientMessage) Reset() { *m = ClientMessage{} } -func (m *ClientMessage) String() string { return proto.CompactTextString(m) } -func (*ClientMessage) ProtoMessage() {} -func (*ClientMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_678928ebbdee1807, []int{2} -} -func (m *ClientMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClientMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClientMessage.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 *ClientMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClientMessage.Merge(m, src) -} -func (m *ClientMessage) XXX_Size() int { - return m.Size() -} -func (m *ClientMessage) XXX_DiscardUnknown() { - xxx_messageInfo_ClientMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_ClientMessage proto.InternalMessageInfo - -// Checksums defines a list of all checksums that are stored -// -// Deprecated: This message is deprecated in favor of storing the checksums -// using a Collections.KeySet. -// -// Deprecated: Do not use. -type Checksums struct { - Checksums [][]byte `protobuf:"bytes,1,rep,name=checksums,proto3" json:"checksums,omitempty"` -} - -func (m *Checksums) Reset() { *m = Checksums{} } -func (m *Checksums) String() string { return proto.CompactTextString(m) } -func (*Checksums) ProtoMessage() {} -func (*Checksums) Descriptor() ([]byte, []int) { - return fileDescriptor_678928ebbdee1807, []int{3} -} -func (m *Checksums) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Checksums) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Checksums.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 *Checksums) XXX_Merge(src proto.Message) { - xxx_messageInfo_Checksums.Merge(m, src) -} -func (m *Checksums) XXX_Size() int { - return m.Size() -} -func (m *Checksums) XXX_DiscardUnknown() { - xxx_messageInfo_Checksums.DiscardUnknown(m) -} - -var xxx_messageInfo_Checksums proto.InternalMessageInfo - -func (m *Checksums) GetChecksums() [][]byte { - if m != nil { - return m.Checksums - } - return nil -} - -func init() { - proto.RegisterType((*ClientState)(nil), "ibc.lightclients.wasm.v1.ClientState") - proto.RegisterType((*ConsensusState)(nil), "ibc.lightclients.wasm.v1.ConsensusState") - proto.RegisterType((*ClientMessage)(nil), "ibc.lightclients.wasm.v1.ClientMessage") - proto.RegisterType((*Checksums)(nil), "ibc.lightclients.wasm.v1.Checksums") -} - -func init() { - proto.RegisterFile("ibc/lightclients/wasm/v1/wasm.proto", fileDescriptor_678928ebbdee1807) -} - -var fileDescriptor_678928ebbdee1807 = []byte{ - // 339 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xc3, 0x30, - 0x10, 0x86, 0xe3, 0xb6, 0x42, 0xd4, 0x6d, 0x19, 0x22, 0x86, 0x28, 0x42, 0x69, 0x55, 0x96, 0x82, - 0x14, 0x9b, 0xc2, 0x82, 0x2a, 0xa6, 0x56, 0x48, 0x2c, 0x2c, 0x45, 0x62, 0x60, 0x41, 0x89, 0x6b, - 0x25, 0x16, 0x49, 0x5d, 0xf5, 0x9c, 0x22, 0xde, 0x00, 0x31, 0xf1, 0x08, 0x3c, 0x4e, 0xc7, 0x8e, - 0x4c, 0x08, 0xb5, 0x2f, 0x82, 0x6c, 0xa7, 0xc0, 0x02, 0x53, 0x2e, 0xbf, 0x3f, 0xdf, 0x7d, 0xf2, - 0xe1, 0x43, 0x11, 0x33, 0x9a, 0x89, 0x24, 0x55, 0x2c, 0x13, 0x7c, 0xaa, 0x80, 0x3e, 0x46, 0x90, - 0xd3, 0x45, 0xdf, 0x7c, 0xc9, 0x6c, 0x2e, 0x95, 0x74, 0x3d, 0x11, 0x33, 0xf2, 0x1b, 0x22, 0xe6, - 0x70, 0xd1, 0xf7, 0xf7, 0x13, 0x99, 0x48, 0x03, 0x51, 0x5d, 0x59, 0xde, 0x6f, 0xeb, 0xa6, 0x4c, - 0xce, 0x39, 0xb5, 0xbc, 0x6e, 0x67, 0x2b, 0x0b, 0x74, 0x5f, 0x10, 0x6e, 0x8c, 0x4c, 0x70, 0xa3, - 0x22, 0xc5, 0x5d, 0x17, 0xd7, 0x26, 0x91, 0x8a, 0x3c, 0xd4, 0x41, 0xbd, 0xe6, 0xd8, 0xd4, 0xae, - 0x8f, 0x77, 0x59, 0xca, 0xd9, 0x03, 0x14, 0xb9, 0x57, 0x31, 0xf9, 0xf7, 0xbf, 0x7b, 0x89, 0x5b, - 0x59, 0xa4, 0x38, 0xa8, 0xfb, 0x94, 0x6b, 0x2d, 0xaf, 0xda, 0x41, 0xbd, 0xc6, 0xa9, 0x4f, 0xb4, - 0xa8, 0x1e, 0x4c, 0xca, 0x71, 0x8b, 0x3e, 0xb9, 0x32, 0xc4, 0xb0, 0xb6, 0xfc, 0x68, 0x3b, 0xe3, - 0xa6, 0xbd, 0x66, 0xb3, 0x41, 0xed, 0xf9, 0xad, 0xed, 0x74, 0x8f, 0xf1, 0xde, 0x48, 0x4e, 0x81, - 0x4f, 0xa1, 0x80, 0x3f, 0x75, 0x4a, 0xf6, 0x08, 0xb7, 0xac, 0xf7, 0x35, 0x07, 0x88, 0x92, 0xff, - 0xd0, 0x10, 0xd7, 0x47, 0xa5, 0x2f, 0xb8, 0x07, 0xb8, 0xbe, 0x95, 0x07, 0x0f, 0x75, 0xaa, 0xbd, - 0xe6, 0xf8, 0x27, 0x18, 0x54, 0x3c, 0x34, 0xbc, 0x5d, 0xae, 0x03, 0xb4, 0x5a, 0x07, 0xe8, 0x73, - 0x1d, 0xa0, 0xd7, 0x4d, 0xe0, 0xac, 0x36, 0x81, 0xf3, 0xbe, 0x09, 0x9c, 0xbb, 0x8b, 0x44, 0xa8, - 0xb4, 0x88, 0x09, 0x93, 0x39, 0x65, 0x12, 0x72, 0x09, 0x54, 0xc4, 0x2c, 0x4c, 0x24, 0xcd, 0xe5, - 0xa4, 0xc8, 0x38, 0xd8, 0xfd, 0x85, 0xdb, 0x05, 0x9e, 0x9c, 0x87, 0x66, 0x87, 0xea, 0x69, 0xc6, - 0x21, 0xde, 0x31, 0x2f, 0x7e, 0xf6, 0x15, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x78, 0x4d, 0x63, 0xe9, - 0x01, 0x00, 0x00, -} - -func (m *ClientState) 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 *ClientState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.LatestHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintWasm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.Checksum) > 0 { - i -= len(m.Checksum) - copy(dAtA[i:], m.Checksum) - i = encodeVarintWasm(dAtA, i, uint64(len(m.Checksum))) - i-- - dAtA[i] = 0x12 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintWasm(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ConsensusState) 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 *ConsensusState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintWasm(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ClientMessage) 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 *ClientMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClientMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintWasm(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Checksums) 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 *Checksums) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Checksums) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Checksums) > 0 { - for iNdEx := len(m.Checksums) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Checksums[iNdEx]) - copy(dAtA[i:], m.Checksums[iNdEx]) - i = encodeVarintWasm(dAtA, i, uint64(len(m.Checksums[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintWasm(dAtA []byte, offset int, v uint64) int { - offset -= sovWasm(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ClientState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovWasm(uint64(l)) - } - l = len(m.Checksum) - if l > 0 { - n += 1 + l + sovWasm(uint64(l)) - } - l = m.LatestHeight.Size() - n += 1 + l + sovWasm(uint64(l)) - return n -} - -func (m *ConsensusState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovWasm(uint64(l)) - } - return n -} - -func (m *ClientMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovWasm(uint64(l)) - } - return n -} - -func (m *Checksums) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Checksums) > 0 { - for _, b := range m.Checksums { - l = len(b) - n += 1 + l + sovWasm(uint64(l)) - } - } - return n -} - -func sovWasm(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozWasm(x uint64) (n int) { - return sovWasm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ClientState) 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 ErrIntOverflowWasm - } - 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: ClientState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClientState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWasm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthWasm - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthWasm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Checksum", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWasm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthWasm - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthWasm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Checksum = append(m.Checksum[:0], dAtA[iNdEx:postIndex]...) - if m.Checksum == nil { - m.Checksum = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LatestHeight", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWasm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthWasm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthWasm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LatestHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWasm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWasm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConsensusState) 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 ErrIntOverflowWasm - } - 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: ConsensusState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWasm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthWasm - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthWasm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWasm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWasm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClientMessage) 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 ErrIntOverflowWasm - } - 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: ClientMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClientMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWasm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthWasm - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthWasm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWasm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWasm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Checksums) 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 ErrIntOverflowWasm - } - 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: Checksums: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Checksums: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Checksums", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWasm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthWasm - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthWasm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Checksums = append(m.Checksums, make([]byte, postIndex-iNdEx)) - copy(m.Checksums[len(m.Checksums)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWasm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWasm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipWasm(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, ErrIntOverflowWasm - } - 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, ErrIntOverflowWasm - } - 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, ErrIntOverflowWasm - } - 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, ErrInvalidLengthWasm - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupWasm - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthWasm - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthWasm = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowWasm = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupWasm = fmt.Errorf("proto: unexpected end of group") -)