github.com/InjectiveLabs/sdk-go@v1.53.0/chain/types/tx_ext.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: injective/types/v1beta1/tx_ext.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 _ "github.com/cosmos/gogoproto/gogoproto" 9 proto "github.com/cosmos/gogoproto/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 type ExtensionOptionsWeb3Tx struct { 27 // typedDataChainID used only in EIP712 Domain and should match 28 // Ethereum network ID in a Web3 provider (e.g. Metamask). 29 TypedDataChainID uint64 `protobuf:"varint,1,opt,name=typedDataChainID,proto3" json:"typedDataChainID,omitempty"` 30 // feePayer is an account address for the fee payer. It will be validated 31 // during EIP712 signature checking. 32 FeePayer string `protobuf:"bytes,2,opt,name=feePayer,proto3" json:"feePayer,omitempty"` 33 // feePayerSig is a signature data from the fee paying account, 34 // allows to perform fee delegation when using EIP712 Domain. 35 FeePayerSig []byte `protobuf:"bytes,3,opt,name=feePayerSig,proto3" json:"feePayerSig,omitempty"` 36 } 37 38 func (m *ExtensionOptionsWeb3Tx) Reset() { *m = ExtensionOptionsWeb3Tx{} } 39 func (m *ExtensionOptionsWeb3Tx) String() string { return proto.CompactTextString(m) } 40 func (*ExtensionOptionsWeb3Tx) ProtoMessage() {} 41 func (*ExtensionOptionsWeb3Tx) Descriptor() ([]byte, []int) { 42 return fileDescriptor_b8dd2dd0020f764b, []int{0} 43 } 44 func (m *ExtensionOptionsWeb3Tx) XXX_Unmarshal(b []byte) error { 45 return m.Unmarshal(b) 46 } 47 func (m *ExtensionOptionsWeb3Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 48 if deterministic { 49 return xxx_messageInfo_ExtensionOptionsWeb3Tx.Marshal(b, m, deterministic) 50 } else { 51 b = b[:cap(b)] 52 n, err := m.MarshalToSizedBuffer(b) 53 if err != nil { 54 return nil, err 55 } 56 return b[:n], nil 57 } 58 } 59 func (m *ExtensionOptionsWeb3Tx) XXX_Merge(src proto.Message) { 60 xxx_messageInfo_ExtensionOptionsWeb3Tx.Merge(m, src) 61 } 62 func (m *ExtensionOptionsWeb3Tx) XXX_Size() int { 63 return m.Size() 64 } 65 func (m *ExtensionOptionsWeb3Tx) XXX_DiscardUnknown() { 66 xxx_messageInfo_ExtensionOptionsWeb3Tx.DiscardUnknown(m) 67 } 68 69 var xxx_messageInfo_ExtensionOptionsWeb3Tx proto.InternalMessageInfo 70 71 func init() { 72 proto.RegisterType((*ExtensionOptionsWeb3Tx)(nil), "injective.types.v1beta1.ExtensionOptionsWeb3Tx") 73 } 74 75 func init() { 76 proto.RegisterFile("injective/types/v1beta1/tx_ext.proto", fileDescriptor_b8dd2dd0020f764b) 77 } 78 79 var fileDescriptor_b8dd2dd0020f764b = []byte{ 80 // 251 bytes of a gzipped FileDescriptorProto 81 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xc9, 0xcc, 0xcb, 0x4a, 82 0x4d, 0x2e, 0xc9, 0x2c, 0x4b, 0xd5, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 83 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0x88, 0x4f, 0xad, 0x28, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 84 0x17, 0x12, 0x87, 0xab, 0xd2, 0x03, 0xab, 0xd2, 0x83, 0xaa, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 85 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0x95, 0x3a, 0x18, 0xb9, 0xc4, 0x5c, 0x2b, 0x4a, 0x52, 86 0xf3, 0x8a, 0x33, 0xf3, 0xf3, 0xfc, 0x0b, 0x4a, 0x32, 0xf3, 0xf3, 0x8a, 0xc3, 0x53, 0x93, 0x8c, 87 0x43, 0x2a, 0x84, 0xb4, 0xb8, 0x04, 0x40, 0x26, 0xa4, 0xb8, 0x24, 0x96, 0x24, 0x3a, 0x67, 0x24, 88 0x66, 0xe6, 0x79, 0xba, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x04, 0x61, 0x88, 0x0b, 0x49, 0x71, 89 0x71, 0xa4, 0xa5, 0xa6, 0x06, 0x24, 0x56, 0xa6, 0x16, 0x49, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x06, 90 0xc1, 0xf9, 0x42, 0x0a, 0x5c, 0xdc, 0x30, 0x76, 0x70, 0x66, 0xba, 0x04, 0xb3, 0x02, 0xa3, 0x06, 91 0x4f, 0x10, 0xb2, 0x90, 0x15, 0x4b, 0xc7, 0x02, 0x79, 0x06, 0xa7, 0xf0, 0x13, 0x8f, 0xe4, 0x18, 92 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 93 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xb2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 94 0xcf, 0xd5, 0xf7, 0x84, 0x79, 0xcf, 0x27, 0x31, 0xa9, 0x58, 0x1f, 0xee, 0x59, 0xdd, 0xe4, 0xfc, 95 0xa2, 0x54, 0x64, 0x2e, 0xc8, 0x61, 0x90, 0x70, 0x4a, 0x62, 0x03, 0x7b, 0xd5, 0x18, 0x10, 0x00, 96 0x00, 0xff, 0xff, 0x6a, 0xc7, 0xc7, 0xeb, 0x41, 0x01, 0x00, 0x00, 97 } 98 99 func (m *ExtensionOptionsWeb3Tx) 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 *ExtensionOptionsWeb3Tx) MarshalTo(dAtA []byte) (int, error) { 110 size := m.Size() 111 return m.MarshalToSizedBuffer(dAtA[:size]) 112 } 113 114 func (m *ExtensionOptionsWeb3Tx) MarshalToSizedBuffer(dAtA []byte) (int, error) { 115 i := len(dAtA) 116 _ = i 117 var l int 118 _ = l 119 if len(m.FeePayerSig) > 0 { 120 i -= len(m.FeePayerSig) 121 copy(dAtA[i:], m.FeePayerSig) 122 i = encodeVarintTxExt(dAtA, i, uint64(len(m.FeePayerSig))) 123 i-- 124 dAtA[i] = 0x1a 125 } 126 if len(m.FeePayer) > 0 { 127 i -= len(m.FeePayer) 128 copy(dAtA[i:], m.FeePayer) 129 i = encodeVarintTxExt(dAtA, i, uint64(len(m.FeePayer))) 130 i-- 131 dAtA[i] = 0x12 132 } 133 if m.TypedDataChainID != 0 { 134 i = encodeVarintTxExt(dAtA, i, uint64(m.TypedDataChainID)) 135 i-- 136 dAtA[i] = 0x8 137 } 138 return len(dAtA) - i, nil 139 } 140 141 func encodeVarintTxExt(dAtA []byte, offset int, v uint64) int { 142 offset -= sovTxExt(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 *ExtensionOptionsWeb3Tx) Size() (n int) { 153 if m == nil { 154 return 0 155 } 156 var l int 157 _ = l 158 if m.TypedDataChainID != 0 { 159 n += 1 + sovTxExt(uint64(m.TypedDataChainID)) 160 } 161 l = len(m.FeePayer) 162 if l > 0 { 163 n += 1 + l + sovTxExt(uint64(l)) 164 } 165 l = len(m.FeePayerSig) 166 if l > 0 { 167 n += 1 + l + sovTxExt(uint64(l)) 168 } 169 return n 170 } 171 172 func sovTxExt(x uint64) (n int) { 173 return (math_bits.Len64(x|1) + 6) / 7 174 } 175 func sozTxExt(x uint64) (n int) { 176 return sovTxExt(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 177 } 178 func (m *ExtensionOptionsWeb3Tx) Unmarshal(dAtA []byte) error { 179 l := len(dAtA) 180 iNdEx := 0 181 for iNdEx < l { 182 preIndex := iNdEx 183 var wire uint64 184 for shift := uint(0); ; shift += 7 { 185 if shift >= 64 { 186 return ErrIntOverflowTxExt 187 } 188 if iNdEx >= l { 189 return io.ErrUnexpectedEOF 190 } 191 b := dAtA[iNdEx] 192 iNdEx++ 193 wire |= uint64(b&0x7F) << shift 194 if b < 0x80 { 195 break 196 } 197 } 198 fieldNum := int32(wire >> 3) 199 wireType := int(wire & 0x7) 200 if wireType == 4 { 201 return fmt.Errorf("proto: ExtensionOptionsWeb3Tx: wiretype end group for non-group") 202 } 203 if fieldNum <= 0 { 204 return fmt.Errorf("proto: ExtensionOptionsWeb3Tx: illegal tag %d (wire type %d)", fieldNum, wire) 205 } 206 switch fieldNum { 207 case 1: 208 if wireType != 0 { 209 return fmt.Errorf("proto: wrong wireType = %d for field TypedDataChainID", wireType) 210 } 211 m.TypedDataChainID = 0 212 for shift := uint(0); ; shift += 7 { 213 if shift >= 64 { 214 return ErrIntOverflowTxExt 215 } 216 if iNdEx >= l { 217 return io.ErrUnexpectedEOF 218 } 219 b := dAtA[iNdEx] 220 iNdEx++ 221 m.TypedDataChainID |= uint64(b&0x7F) << shift 222 if b < 0x80 { 223 break 224 } 225 } 226 case 2: 227 if wireType != 2 { 228 return fmt.Errorf("proto: wrong wireType = %d for field FeePayer", wireType) 229 } 230 var stringLen uint64 231 for shift := uint(0); ; shift += 7 { 232 if shift >= 64 { 233 return ErrIntOverflowTxExt 234 } 235 if iNdEx >= l { 236 return io.ErrUnexpectedEOF 237 } 238 b := dAtA[iNdEx] 239 iNdEx++ 240 stringLen |= uint64(b&0x7F) << shift 241 if b < 0x80 { 242 break 243 } 244 } 245 intStringLen := int(stringLen) 246 if intStringLen < 0 { 247 return ErrInvalidLengthTxExt 248 } 249 postIndex := iNdEx + intStringLen 250 if postIndex < 0 { 251 return ErrInvalidLengthTxExt 252 } 253 if postIndex > l { 254 return io.ErrUnexpectedEOF 255 } 256 m.FeePayer = string(dAtA[iNdEx:postIndex]) 257 iNdEx = postIndex 258 case 3: 259 if wireType != 2 { 260 return fmt.Errorf("proto: wrong wireType = %d for field FeePayerSig", wireType) 261 } 262 var byteLen int 263 for shift := uint(0); ; shift += 7 { 264 if shift >= 64 { 265 return ErrIntOverflowTxExt 266 } 267 if iNdEx >= l { 268 return io.ErrUnexpectedEOF 269 } 270 b := dAtA[iNdEx] 271 iNdEx++ 272 byteLen |= int(b&0x7F) << shift 273 if b < 0x80 { 274 break 275 } 276 } 277 if byteLen < 0 { 278 return ErrInvalidLengthTxExt 279 } 280 postIndex := iNdEx + byteLen 281 if postIndex < 0 { 282 return ErrInvalidLengthTxExt 283 } 284 if postIndex > l { 285 return io.ErrUnexpectedEOF 286 } 287 m.FeePayerSig = append(m.FeePayerSig[:0], dAtA[iNdEx:postIndex]...) 288 if m.FeePayerSig == nil { 289 m.FeePayerSig = []byte{} 290 } 291 iNdEx = postIndex 292 default: 293 iNdEx = preIndex 294 skippy, err := skipTxExt(dAtA[iNdEx:]) 295 if err != nil { 296 return err 297 } 298 if (skippy < 0) || (iNdEx+skippy) < 0 { 299 return ErrInvalidLengthTxExt 300 } 301 if (iNdEx + skippy) > l { 302 return io.ErrUnexpectedEOF 303 } 304 iNdEx += skippy 305 } 306 } 307 308 if iNdEx > l { 309 return io.ErrUnexpectedEOF 310 } 311 return nil 312 } 313 func skipTxExt(dAtA []byte) (n int, err error) { 314 l := len(dAtA) 315 iNdEx := 0 316 depth := 0 317 for iNdEx < l { 318 var wire uint64 319 for shift := uint(0); ; shift += 7 { 320 if shift >= 64 { 321 return 0, ErrIntOverflowTxExt 322 } 323 if iNdEx >= l { 324 return 0, io.ErrUnexpectedEOF 325 } 326 b := dAtA[iNdEx] 327 iNdEx++ 328 wire |= (uint64(b) & 0x7F) << shift 329 if b < 0x80 { 330 break 331 } 332 } 333 wireType := int(wire & 0x7) 334 switch wireType { 335 case 0: 336 for shift := uint(0); ; shift += 7 { 337 if shift >= 64 { 338 return 0, ErrIntOverflowTxExt 339 } 340 if iNdEx >= l { 341 return 0, io.ErrUnexpectedEOF 342 } 343 iNdEx++ 344 if dAtA[iNdEx-1] < 0x80 { 345 break 346 } 347 } 348 case 1: 349 iNdEx += 8 350 case 2: 351 var length int 352 for shift := uint(0); ; shift += 7 { 353 if shift >= 64 { 354 return 0, ErrIntOverflowTxExt 355 } 356 if iNdEx >= l { 357 return 0, io.ErrUnexpectedEOF 358 } 359 b := dAtA[iNdEx] 360 iNdEx++ 361 length |= (int(b) & 0x7F) << shift 362 if b < 0x80 { 363 break 364 } 365 } 366 if length < 0 { 367 return 0, ErrInvalidLengthTxExt 368 } 369 iNdEx += length 370 case 3: 371 depth++ 372 case 4: 373 if depth == 0 { 374 return 0, ErrUnexpectedEndOfGroupTxExt 375 } 376 depth-- 377 case 5: 378 iNdEx += 4 379 default: 380 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 381 } 382 if iNdEx < 0 { 383 return 0, ErrInvalidLengthTxExt 384 } 385 if depth == 0 { 386 return iNdEx, nil 387 } 388 } 389 return 0, io.ErrUnexpectedEOF 390 } 391 392 var ( 393 ErrInvalidLengthTxExt = fmt.Errorf("proto: negative length found during unmarshaling") 394 ErrIntOverflowTxExt = fmt.Errorf("proto: integer overflow") 395 ErrUnexpectedEndOfGroupTxExt = fmt.Errorf("proto: unexpected end of group") 396 )