github.com/InjectiveLabs/sdk-go@v1.53.0/chain/types/account.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: injective/types/v1beta1/account.proto
     3  
     4  package types
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/cosmos/cosmos-proto"
     9  	types "github.com/cosmos/cosmos-sdk/x/auth/types"
    10  	_ "github.com/cosmos/gogoproto/gogoproto"
    11  	proto "github.com/cosmos/gogoproto/proto"
    12  	io "io"
    13  	math "math"
    14  	math_bits "math/bits"
    15  )
    16  
    17  // Reference imports to suppress errors if they are not otherwise used.
    18  var _ = proto.Marshal
    19  var _ = fmt.Errorf
    20  var _ = math.Inf
    21  
    22  // This is a compile-time assertion to ensure that this generated file
    23  // is compatible with the proto package it is being compiled against.
    24  // A compilation error at this line likely means your copy of the
    25  // proto package needs to be updated.
    26  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    27  
    28  // EthAccount implements the authtypes.AccountI interface and embeds an
    29  // authtypes.BaseAccount type. It is compatible with the auth AccountKeeper.
    30  type EthAccount struct {
    31  	*types.BaseAccount `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3,embedded=base_account" json:"base_account,omitempty" yaml:"base_account"`
    32  	CodeHash           []byte `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty" yaml:"code_hash"`
    33  }
    34  
    35  func (m *EthAccount) Reset()      { *m = EthAccount{} }
    36  func (*EthAccount) ProtoMessage() {}
    37  func (*EthAccount) Descriptor() ([]byte, []int) {
    38  	return fileDescriptor_e25f61138fdc8ede, []int{0}
    39  }
    40  func (m *EthAccount) XXX_Unmarshal(b []byte) error {
    41  	return m.Unmarshal(b)
    42  }
    43  func (m *EthAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    44  	if deterministic {
    45  		return xxx_messageInfo_EthAccount.Marshal(b, m, deterministic)
    46  	} else {
    47  		b = b[:cap(b)]
    48  		n, err := m.MarshalToSizedBuffer(b)
    49  		if err != nil {
    50  			return nil, err
    51  		}
    52  		return b[:n], nil
    53  	}
    54  }
    55  func (m *EthAccount) XXX_Merge(src proto.Message) {
    56  	xxx_messageInfo_EthAccount.Merge(m, src)
    57  }
    58  func (m *EthAccount) XXX_Size() int {
    59  	return m.Size()
    60  }
    61  func (m *EthAccount) XXX_DiscardUnknown() {
    62  	xxx_messageInfo_EthAccount.DiscardUnknown(m)
    63  }
    64  
    65  var xxx_messageInfo_EthAccount proto.InternalMessageInfo
    66  
    67  func init() {
    68  	proto.RegisterType((*EthAccount)(nil), "injective.types.v1beta1.EthAccount")
    69  }
    70  
    71  func init() {
    72  	proto.RegisterFile("injective/types/v1beta1/account.proto", fileDescriptor_e25f61138fdc8ede)
    73  }
    74  
    75  var fileDescriptor_e25f61138fdc8ede = []byte{
    76  	// 317 bytes of a gzipped FileDescriptorProto
    77  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xcd, 0xcc, 0xcb, 0x4a,
    78  	0x4d, 0x2e, 0xc9, 0x2c, 0x4b, 0xd5, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0x4c, 0x4a,
    79  	0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f,
    80  	0xc9, 0x17, 0x12, 0x87, 0x2b, 0xd3, 0x03, 0x2b, 0xd3, 0x83, 0x2a, 0x93, 0x92, 0x4b, 0xce, 0x2f,
    81  	0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2c, 0x2d, 0xc9, 0x40, 0xe8, 0x2d, 0x2d, 0xc9, 0x80, 0x68, 0x94,
    82  	0x92, 0x84, 0xc8, 0xc7, 0x83, 0x79, 0xfa, 0x10, 0x0e, 0x54, 0x4a, 0x24, 0x3d, 0x3f, 0x3d, 0x1f,
    83  	0x22, 0x0e, 0x62, 0x41, 0x44, 0x95, 0xce, 0x33, 0x72, 0x71, 0xb9, 0x96, 0x64, 0x38, 0x42, 0xac,
    84  	0x17, 0x4a, 0xe0, 0xe2, 0x49, 0x4a, 0x2c, 0x4e, 0x8d, 0x87, 0x3a, 0x47, 0x82, 0x51, 0x81, 0x51,
    85  	0x83, 0xdb, 0x48, 0x41, 0x0f, 0x6a, 0x12, 0xd8, 0x26, 0xa8, 0xb5, 0x7a, 0x4e, 0x89, 0xc5, 0xa9,
    86  	0x50, 0x7d, 0x4e, 0xd2, 0x17, 0xee, 0xc9, 0x33, 0x7e, 0xba, 0x27, 0x2f, 0x5c, 0x99, 0x98, 0x9b,
    87  	0x63, 0xa5, 0x84, 0x6c, 0x86, 0x52, 0x10, 0x77, 0x12, 0x42, 0xa5, 0x90, 0x21, 0x17, 0x67, 0x72,
    88  	0x7e, 0x4a, 0x6a, 0x7c, 0x46, 0x62, 0x71, 0x86, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x8f, 0x93, 0xc8,
    89  	0xa7, 0x7b, 0xf2, 0x02, 0x10, 0x8d, 0x70, 0x29, 0xa5, 0x20, 0x0e, 0x10, 0xdb, 0x23, 0xb1, 0x38,
    90  	0xc3, 0x4a, 0xa7, 0x63, 0x81, 0x3c, 0xc3, 0x8c, 0x05, 0xf2, 0x0c, 0x2f, 0x16, 0xc8, 0x33, 0x9c,
    91  	0xda, 0xa2, 0x2b, 0x83, 0xcd, 0x35, 0x50, 0xf3, 0x3d, 0x9d, 0xc2, 0x4f, 0x3c, 0x92, 0x63, 0xbc,
    92  	0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63,
    93  	0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x36, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f,
    94  	0x57, 0xdf, 0x13, 0x16, 0xc0, 0x3e, 0x89, 0x49, 0xc5, 0xfa, 0xf0, 0xe0, 0xd6, 0x4d, 0xce, 0x2f,
    95  	0x4a, 0x45, 0xe6, 0x66, 0x24, 0x66, 0xe6, 0x41, 0xa2, 0x2a, 0x89, 0x0d, 0x1c, 0x62, 0xc6, 0x80,
    96  	0x00, 0x00, 0x00, 0xff, 0xff, 0xef, 0x10, 0x61, 0x9a, 0xc4, 0x01, 0x00, 0x00,
    97  }
    98  
    99  func (m *EthAccount) Marshal() (dAtA []byte, err error) {
   100  	size := m.Size()
   101  	dAtA = make([]byte, size)
   102  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   103  	if err != nil {
   104  		return nil, err
   105  	}
   106  	return dAtA[:n], nil
   107  }
   108  
   109  func (m *EthAccount) MarshalTo(dAtA []byte) (int, error) {
   110  	size := m.Size()
   111  	return m.MarshalToSizedBuffer(dAtA[:size])
   112  }
   113  
   114  func (m *EthAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   115  	i := len(dAtA)
   116  	_ = i
   117  	var l int
   118  	_ = l
   119  	if len(m.CodeHash) > 0 {
   120  		i -= len(m.CodeHash)
   121  		copy(dAtA[i:], m.CodeHash)
   122  		i = encodeVarintAccount(dAtA, i, uint64(len(m.CodeHash)))
   123  		i--
   124  		dAtA[i] = 0x12
   125  	}
   126  	if m.BaseAccount != nil {
   127  		{
   128  			size, err := m.BaseAccount.MarshalToSizedBuffer(dAtA[:i])
   129  			if err != nil {
   130  				return 0, err
   131  			}
   132  			i -= size
   133  			i = encodeVarintAccount(dAtA, i, uint64(size))
   134  		}
   135  		i--
   136  		dAtA[i] = 0xa
   137  	}
   138  	return len(dAtA) - i, nil
   139  }
   140  
   141  func encodeVarintAccount(dAtA []byte, offset int, v uint64) int {
   142  	offset -= sovAccount(v)
   143  	base := offset
   144  	for v >= 1<<7 {
   145  		dAtA[offset] = uint8(v&0x7f | 0x80)
   146  		v >>= 7
   147  		offset++
   148  	}
   149  	dAtA[offset] = uint8(v)
   150  	return base
   151  }
   152  func (m *EthAccount) Size() (n int) {
   153  	if m == nil {
   154  		return 0
   155  	}
   156  	var l int
   157  	_ = l
   158  	if m.BaseAccount != nil {
   159  		l = m.BaseAccount.Size()
   160  		n += 1 + l + sovAccount(uint64(l))
   161  	}
   162  	l = len(m.CodeHash)
   163  	if l > 0 {
   164  		n += 1 + l + sovAccount(uint64(l))
   165  	}
   166  	return n
   167  }
   168  
   169  func sovAccount(x uint64) (n int) {
   170  	return (math_bits.Len64(x|1) + 6) / 7
   171  }
   172  func sozAccount(x uint64) (n int) {
   173  	return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   174  }
   175  func (m *EthAccount) Unmarshal(dAtA []byte) error {
   176  	l := len(dAtA)
   177  	iNdEx := 0
   178  	for iNdEx < l {
   179  		preIndex := iNdEx
   180  		var wire uint64
   181  		for shift := uint(0); ; shift += 7 {
   182  			if shift >= 64 {
   183  				return ErrIntOverflowAccount
   184  			}
   185  			if iNdEx >= l {
   186  				return io.ErrUnexpectedEOF
   187  			}
   188  			b := dAtA[iNdEx]
   189  			iNdEx++
   190  			wire |= uint64(b&0x7F) << shift
   191  			if b < 0x80 {
   192  				break
   193  			}
   194  		}
   195  		fieldNum := int32(wire >> 3)
   196  		wireType := int(wire & 0x7)
   197  		if wireType == 4 {
   198  			return fmt.Errorf("proto: EthAccount: wiretype end group for non-group")
   199  		}
   200  		if fieldNum <= 0 {
   201  			return fmt.Errorf("proto: EthAccount: illegal tag %d (wire type %d)", fieldNum, wire)
   202  		}
   203  		switch fieldNum {
   204  		case 1:
   205  			if wireType != 2 {
   206  				return fmt.Errorf("proto: wrong wireType = %d for field BaseAccount", wireType)
   207  			}
   208  			var msglen int
   209  			for shift := uint(0); ; shift += 7 {
   210  				if shift >= 64 {
   211  					return ErrIntOverflowAccount
   212  				}
   213  				if iNdEx >= l {
   214  					return io.ErrUnexpectedEOF
   215  				}
   216  				b := dAtA[iNdEx]
   217  				iNdEx++
   218  				msglen |= int(b&0x7F) << shift
   219  				if b < 0x80 {
   220  					break
   221  				}
   222  			}
   223  			if msglen < 0 {
   224  				return ErrInvalidLengthAccount
   225  			}
   226  			postIndex := iNdEx + msglen
   227  			if postIndex < 0 {
   228  				return ErrInvalidLengthAccount
   229  			}
   230  			if postIndex > l {
   231  				return io.ErrUnexpectedEOF
   232  			}
   233  			if m.BaseAccount == nil {
   234  				m.BaseAccount = &types.BaseAccount{}
   235  			}
   236  			if err := m.BaseAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   237  				return err
   238  			}
   239  			iNdEx = postIndex
   240  		case 2:
   241  			if wireType != 2 {
   242  				return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType)
   243  			}
   244  			var byteLen int
   245  			for shift := uint(0); ; shift += 7 {
   246  				if shift >= 64 {
   247  					return ErrIntOverflowAccount
   248  				}
   249  				if iNdEx >= l {
   250  					return io.ErrUnexpectedEOF
   251  				}
   252  				b := dAtA[iNdEx]
   253  				iNdEx++
   254  				byteLen |= int(b&0x7F) << shift
   255  				if b < 0x80 {
   256  					break
   257  				}
   258  			}
   259  			if byteLen < 0 {
   260  				return ErrInvalidLengthAccount
   261  			}
   262  			postIndex := iNdEx + byteLen
   263  			if postIndex < 0 {
   264  				return ErrInvalidLengthAccount
   265  			}
   266  			if postIndex > l {
   267  				return io.ErrUnexpectedEOF
   268  			}
   269  			m.CodeHash = append(m.CodeHash[:0], dAtA[iNdEx:postIndex]...)
   270  			if m.CodeHash == nil {
   271  				m.CodeHash = []byte{}
   272  			}
   273  			iNdEx = postIndex
   274  		default:
   275  			iNdEx = preIndex
   276  			skippy, err := skipAccount(dAtA[iNdEx:])
   277  			if err != nil {
   278  				return err
   279  			}
   280  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   281  				return ErrInvalidLengthAccount
   282  			}
   283  			if (iNdEx + skippy) > l {
   284  				return io.ErrUnexpectedEOF
   285  			}
   286  			iNdEx += skippy
   287  		}
   288  	}
   289  
   290  	if iNdEx > l {
   291  		return io.ErrUnexpectedEOF
   292  	}
   293  	return nil
   294  }
   295  func skipAccount(dAtA []byte) (n int, err error) {
   296  	l := len(dAtA)
   297  	iNdEx := 0
   298  	depth := 0
   299  	for iNdEx < l {
   300  		var wire uint64
   301  		for shift := uint(0); ; shift += 7 {
   302  			if shift >= 64 {
   303  				return 0, ErrIntOverflowAccount
   304  			}
   305  			if iNdEx >= l {
   306  				return 0, io.ErrUnexpectedEOF
   307  			}
   308  			b := dAtA[iNdEx]
   309  			iNdEx++
   310  			wire |= (uint64(b) & 0x7F) << shift
   311  			if b < 0x80 {
   312  				break
   313  			}
   314  		}
   315  		wireType := int(wire & 0x7)
   316  		switch wireType {
   317  		case 0:
   318  			for shift := uint(0); ; shift += 7 {
   319  				if shift >= 64 {
   320  					return 0, ErrIntOverflowAccount
   321  				}
   322  				if iNdEx >= l {
   323  					return 0, io.ErrUnexpectedEOF
   324  				}
   325  				iNdEx++
   326  				if dAtA[iNdEx-1] < 0x80 {
   327  					break
   328  				}
   329  			}
   330  		case 1:
   331  			iNdEx += 8
   332  		case 2:
   333  			var length int
   334  			for shift := uint(0); ; shift += 7 {
   335  				if shift >= 64 {
   336  					return 0, ErrIntOverflowAccount
   337  				}
   338  				if iNdEx >= l {
   339  					return 0, io.ErrUnexpectedEOF
   340  				}
   341  				b := dAtA[iNdEx]
   342  				iNdEx++
   343  				length |= (int(b) & 0x7F) << shift
   344  				if b < 0x80 {
   345  					break
   346  				}
   347  			}
   348  			if length < 0 {
   349  				return 0, ErrInvalidLengthAccount
   350  			}
   351  			iNdEx += length
   352  		case 3:
   353  			depth++
   354  		case 4:
   355  			if depth == 0 {
   356  				return 0, ErrUnexpectedEndOfGroupAccount
   357  			}
   358  			depth--
   359  		case 5:
   360  			iNdEx += 4
   361  		default:
   362  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   363  		}
   364  		if iNdEx < 0 {
   365  			return 0, ErrInvalidLengthAccount
   366  		}
   367  		if depth == 0 {
   368  			return iNdEx, nil
   369  		}
   370  	}
   371  	return 0, io.ErrUnexpectedEOF
   372  }
   373  
   374  var (
   375  	ErrInvalidLengthAccount        = fmt.Errorf("proto: negative length found during unmarshaling")
   376  	ErrIntOverflowAccount          = fmt.Errorf("proto: integer overflow")
   377  	ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group")
   378  )