github.com/InjectiveLabs/sdk-go@v1.53.0/chain/insurance/types/tx.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: injective/insurance/v1beta1/tx.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" 10 _ "github.com/cosmos/cosmos-proto" 11 types1 "github.com/cosmos/cosmos-sdk/types" 12 _ "github.com/cosmos/cosmos-sdk/types/msgservice" 13 _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 14 _ "github.com/cosmos/gogoproto/gogoproto" 15 grpc1 "github.com/cosmos/gogoproto/grpc" 16 proto "github.com/cosmos/gogoproto/proto" 17 grpc "google.golang.org/grpc" 18 codes "google.golang.org/grpc/codes" 19 status "google.golang.org/grpc/status" 20 io "io" 21 math "math" 22 math_bits "math/bits" 23 ) 24 25 // Reference imports to suppress errors if they are not otherwise used. 26 var _ = proto.Marshal 27 var _ = fmt.Errorf 28 var _ = math.Inf 29 30 // This is a compile-time assertion to ensure that this generated file 31 // is compatible with the proto package it is being compiled against. 32 // A compilation error at this line likely means your copy of the 33 // proto package needs to be updated. 34 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 35 36 // MsgCreateInsuranceFund a message to create an insurance fund for a derivative 37 // market. 38 type MsgCreateInsuranceFund struct { 39 // Creator of the insurance fund. 40 Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` 41 // Ticker for the derivative market. 42 Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"` 43 // Coin denom to use for the market quote denom 44 QuoteDenom string `protobuf:"bytes,3,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` 45 // Oracle base currency of the derivative market OR the oracle symbol for the 46 // binary options market. 47 OracleBase string `protobuf:"bytes,4,opt,name=oracle_base,json=oracleBase,proto3" json:"oracle_base,omitempty"` 48 // Oracle quote currency of the derivative market OR the oracle provider for 49 // the binary options market. 50 OracleQuote string `protobuf:"bytes,5,opt,name=oracle_quote,json=oracleQuote,proto3" json:"oracle_quote,omitempty"` 51 // Oracle type of the binary options or derivative market 52 OracleType types.OracleType `protobuf:"varint,6,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` 53 // Expiration time of the derivative market. Should be -1 for perpetual or -2 54 // for binary options markets. 55 Expiry int64 `protobuf:"varint,7,opt,name=expiry,proto3" json:"expiry,omitempty"` 56 // Initial deposit of the insurance fund 57 InitialDeposit types1.Coin `protobuf:"bytes,8,opt,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit"` 58 } 59 60 func (m *MsgCreateInsuranceFund) Reset() { *m = MsgCreateInsuranceFund{} } 61 func (m *MsgCreateInsuranceFund) String() string { return proto.CompactTextString(m) } 62 func (*MsgCreateInsuranceFund) ProtoMessage() {} 63 func (*MsgCreateInsuranceFund) Descriptor() ([]byte, []int) { 64 return fileDescriptor_7e1fa941c3fd0dc4, []int{0} 65 } 66 func (m *MsgCreateInsuranceFund) XXX_Unmarshal(b []byte) error { 67 return m.Unmarshal(b) 68 } 69 func (m *MsgCreateInsuranceFund) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 70 if deterministic { 71 return xxx_messageInfo_MsgCreateInsuranceFund.Marshal(b, m, deterministic) 72 } else { 73 b = b[:cap(b)] 74 n, err := m.MarshalToSizedBuffer(b) 75 if err != nil { 76 return nil, err 77 } 78 return b[:n], nil 79 } 80 } 81 func (m *MsgCreateInsuranceFund) XXX_Merge(src proto.Message) { 82 xxx_messageInfo_MsgCreateInsuranceFund.Merge(m, src) 83 } 84 func (m *MsgCreateInsuranceFund) XXX_Size() int { 85 return m.Size() 86 } 87 func (m *MsgCreateInsuranceFund) XXX_DiscardUnknown() { 88 xxx_messageInfo_MsgCreateInsuranceFund.DiscardUnknown(m) 89 } 90 91 var xxx_messageInfo_MsgCreateInsuranceFund proto.InternalMessageInfo 92 93 type MsgCreateInsuranceFundResponse struct { 94 } 95 96 func (m *MsgCreateInsuranceFundResponse) Reset() { *m = MsgCreateInsuranceFundResponse{} } 97 func (m *MsgCreateInsuranceFundResponse) String() string { return proto.CompactTextString(m) } 98 func (*MsgCreateInsuranceFundResponse) ProtoMessage() {} 99 func (*MsgCreateInsuranceFundResponse) Descriptor() ([]byte, []int) { 100 return fileDescriptor_7e1fa941c3fd0dc4, []int{1} 101 } 102 func (m *MsgCreateInsuranceFundResponse) XXX_Unmarshal(b []byte) error { 103 return m.Unmarshal(b) 104 } 105 func (m *MsgCreateInsuranceFundResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 106 if deterministic { 107 return xxx_messageInfo_MsgCreateInsuranceFundResponse.Marshal(b, m, deterministic) 108 } else { 109 b = b[:cap(b)] 110 n, err := m.MarshalToSizedBuffer(b) 111 if err != nil { 112 return nil, err 113 } 114 return b[:n], nil 115 } 116 } 117 func (m *MsgCreateInsuranceFundResponse) XXX_Merge(src proto.Message) { 118 xxx_messageInfo_MsgCreateInsuranceFundResponse.Merge(m, src) 119 } 120 func (m *MsgCreateInsuranceFundResponse) XXX_Size() int { 121 return m.Size() 122 } 123 func (m *MsgCreateInsuranceFundResponse) XXX_DiscardUnknown() { 124 xxx_messageInfo_MsgCreateInsuranceFundResponse.DiscardUnknown(m) 125 } 126 127 var xxx_messageInfo_MsgCreateInsuranceFundResponse proto.InternalMessageInfo 128 129 // MsgUnderwrite defines a message for depositing coins to underwrite an 130 // insurance fund 131 type MsgUnderwrite struct { 132 // Address of the underwriter. 133 Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` 134 // MarketID of the insurance fund. 135 MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` 136 // Amount of quote_denom to underwrite the insurance fund. 137 Deposit types1.Coin `protobuf:"bytes,3,opt,name=deposit,proto3" json:"deposit"` 138 } 139 140 func (m *MsgUnderwrite) Reset() { *m = MsgUnderwrite{} } 141 func (m *MsgUnderwrite) String() string { return proto.CompactTextString(m) } 142 func (*MsgUnderwrite) ProtoMessage() {} 143 func (*MsgUnderwrite) Descriptor() ([]byte, []int) { 144 return fileDescriptor_7e1fa941c3fd0dc4, []int{2} 145 } 146 func (m *MsgUnderwrite) XXX_Unmarshal(b []byte) error { 147 return m.Unmarshal(b) 148 } 149 func (m *MsgUnderwrite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 150 if deterministic { 151 return xxx_messageInfo_MsgUnderwrite.Marshal(b, m, deterministic) 152 } else { 153 b = b[:cap(b)] 154 n, err := m.MarshalToSizedBuffer(b) 155 if err != nil { 156 return nil, err 157 } 158 return b[:n], nil 159 } 160 } 161 func (m *MsgUnderwrite) XXX_Merge(src proto.Message) { 162 xxx_messageInfo_MsgUnderwrite.Merge(m, src) 163 } 164 func (m *MsgUnderwrite) XXX_Size() int { 165 return m.Size() 166 } 167 func (m *MsgUnderwrite) XXX_DiscardUnknown() { 168 xxx_messageInfo_MsgUnderwrite.DiscardUnknown(m) 169 } 170 171 var xxx_messageInfo_MsgUnderwrite proto.InternalMessageInfo 172 173 type MsgUnderwriteResponse struct { 174 } 175 176 func (m *MsgUnderwriteResponse) Reset() { *m = MsgUnderwriteResponse{} } 177 func (m *MsgUnderwriteResponse) String() string { return proto.CompactTextString(m) } 178 func (*MsgUnderwriteResponse) ProtoMessage() {} 179 func (*MsgUnderwriteResponse) Descriptor() ([]byte, []int) { 180 return fileDescriptor_7e1fa941c3fd0dc4, []int{3} 181 } 182 func (m *MsgUnderwriteResponse) XXX_Unmarshal(b []byte) error { 183 return m.Unmarshal(b) 184 } 185 func (m *MsgUnderwriteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 186 if deterministic { 187 return xxx_messageInfo_MsgUnderwriteResponse.Marshal(b, m, deterministic) 188 } else { 189 b = b[:cap(b)] 190 n, err := m.MarshalToSizedBuffer(b) 191 if err != nil { 192 return nil, err 193 } 194 return b[:n], nil 195 } 196 } 197 func (m *MsgUnderwriteResponse) XXX_Merge(src proto.Message) { 198 xxx_messageInfo_MsgUnderwriteResponse.Merge(m, src) 199 } 200 func (m *MsgUnderwriteResponse) XXX_Size() int { 201 return m.Size() 202 } 203 func (m *MsgUnderwriteResponse) XXX_DiscardUnknown() { 204 xxx_messageInfo_MsgUnderwriteResponse.DiscardUnknown(m) 205 } 206 207 var xxx_messageInfo_MsgUnderwriteResponse proto.InternalMessageInfo 208 209 // MsgRequestRedemption defines a message for requesting a redemption of the 210 // sender's insurance fund tokens 211 type MsgRequestRedemption struct { 212 // Address of the underwriter requesting a redemption. 213 Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` 214 // MarketID of the insurance fund. 215 MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` 216 // Insurance fund share token amount to be redeemed. 217 Amount types1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` 218 } 219 220 func (m *MsgRequestRedemption) Reset() { *m = MsgRequestRedemption{} } 221 func (m *MsgRequestRedemption) String() string { return proto.CompactTextString(m) } 222 func (*MsgRequestRedemption) ProtoMessage() {} 223 func (*MsgRequestRedemption) Descriptor() ([]byte, []int) { 224 return fileDescriptor_7e1fa941c3fd0dc4, []int{4} 225 } 226 func (m *MsgRequestRedemption) XXX_Unmarshal(b []byte) error { 227 return m.Unmarshal(b) 228 } 229 func (m *MsgRequestRedemption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 230 if deterministic { 231 return xxx_messageInfo_MsgRequestRedemption.Marshal(b, m, deterministic) 232 } else { 233 b = b[:cap(b)] 234 n, err := m.MarshalToSizedBuffer(b) 235 if err != nil { 236 return nil, err 237 } 238 return b[:n], nil 239 } 240 } 241 func (m *MsgRequestRedemption) XXX_Merge(src proto.Message) { 242 xxx_messageInfo_MsgRequestRedemption.Merge(m, src) 243 } 244 func (m *MsgRequestRedemption) XXX_Size() int { 245 return m.Size() 246 } 247 func (m *MsgRequestRedemption) XXX_DiscardUnknown() { 248 xxx_messageInfo_MsgRequestRedemption.DiscardUnknown(m) 249 } 250 251 var xxx_messageInfo_MsgRequestRedemption proto.InternalMessageInfo 252 253 type MsgRequestRedemptionResponse struct { 254 } 255 256 func (m *MsgRequestRedemptionResponse) Reset() { *m = MsgRequestRedemptionResponse{} } 257 func (m *MsgRequestRedemptionResponse) String() string { return proto.CompactTextString(m) } 258 func (*MsgRequestRedemptionResponse) ProtoMessage() {} 259 func (*MsgRequestRedemptionResponse) Descriptor() ([]byte, []int) { 260 return fileDescriptor_7e1fa941c3fd0dc4, []int{5} 261 } 262 func (m *MsgRequestRedemptionResponse) XXX_Unmarshal(b []byte) error { 263 return m.Unmarshal(b) 264 } 265 func (m *MsgRequestRedemptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 266 if deterministic { 267 return xxx_messageInfo_MsgRequestRedemptionResponse.Marshal(b, m, deterministic) 268 } else { 269 b = b[:cap(b)] 270 n, err := m.MarshalToSizedBuffer(b) 271 if err != nil { 272 return nil, err 273 } 274 return b[:n], nil 275 } 276 } 277 func (m *MsgRequestRedemptionResponse) XXX_Merge(src proto.Message) { 278 xxx_messageInfo_MsgRequestRedemptionResponse.Merge(m, src) 279 } 280 func (m *MsgRequestRedemptionResponse) XXX_Size() int { 281 return m.Size() 282 } 283 func (m *MsgRequestRedemptionResponse) XXX_DiscardUnknown() { 284 xxx_messageInfo_MsgRequestRedemptionResponse.DiscardUnknown(m) 285 } 286 287 var xxx_messageInfo_MsgRequestRedemptionResponse proto.InternalMessageInfo 288 289 type MsgUpdateParams struct { 290 // authority is the address of the governance account. 291 Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` 292 // params defines the insurance parameters to update. 293 // 294 // NOTE: All parameters must be supplied. 295 Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` 296 } 297 298 func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } 299 func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } 300 func (*MsgUpdateParams) ProtoMessage() {} 301 func (*MsgUpdateParams) Descriptor() ([]byte, []int) { 302 return fileDescriptor_7e1fa941c3fd0dc4, []int{6} 303 } 304 func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { 305 return m.Unmarshal(b) 306 } 307 func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 308 if deterministic { 309 return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) 310 } else { 311 b = b[:cap(b)] 312 n, err := m.MarshalToSizedBuffer(b) 313 if err != nil { 314 return nil, err 315 } 316 return b[:n], nil 317 } 318 } 319 func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { 320 xxx_messageInfo_MsgUpdateParams.Merge(m, src) 321 } 322 func (m *MsgUpdateParams) XXX_Size() int { 323 return m.Size() 324 } 325 func (m *MsgUpdateParams) XXX_DiscardUnknown() { 326 xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) 327 } 328 329 var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo 330 331 func (m *MsgUpdateParams) GetAuthority() string { 332 if m != nil { 333 return m.Authority 334 } 335 return "" 336 } 337 338 func (m *MsgUpdateParams) GetParams() Params { 339 if m != nil { 340 return m.Params 341 } 342 return Params{} 343 } 344 345 type MsgUpdateParamsResponse struct { 346 } 347 348 func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } 349 func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } 350 func (*MsgUpdateParamsResponse) ProtoMessage() {} 351 func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { 352 return fileDescriptor_7e1fa941c3fd0dc4, []int{7} 353 } 354 func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { 355 return m.Unmarshal(b) 356 } 357 func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 358 if deterministic { 359 return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) 360 } else { 361 b = b[:cap(b)] 362 n, err := m.MarshalToSizedBuffer(b) 363 if err != nil { 364 return nil, err 365 } 366 return b[:n], nil 367 } 368 } 369 func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { 370 xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) 371 } 372 func (m *MsgUpdateParamsResponse) XXX_Size() int { 373 return m.Size() 374 } 375 func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { 376 xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) 377 } 378 379 var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo 380 381 func init() { 382 proto.RegisterType((*MsgCreateInsuranceFund)(nil), "injective.insurance.v1beta1.MsgCreateInsuranceFund") 383 proto.RegisterType((*MsgCreateInsuranceFundResponse)(nil), "injective.insurance.v1beta1.MsgCreateInsuranceFundResponse") 384 proto.RegisterType((*MsgUnderwrite)(nil), "injective.insurance.v1beta1.MsgUnderwrite") 385 proto.RegisterType((*MsgUnderwriteResponse)(nil), "injective.insurance.v1beta1.MsgUnderwriteResponse") 386 proto.RegisterType((*MsgRequestRedemption)(nil), "injective.insurance.v1beta1.MsgRequestRedemption") 387 proto.RegisterType((*MsgRequestRedemptionResponse)(nil), "injective.insurance.v1beta1.MsgRequestRedemptionResponse") 388 proto.RegisterType((*MsgUpdateParams)(nil), "injective.insurance.v1beta1.MsgUpdateParams") 389 proto.RegisterType((*MsgUpdateParamsResponse)(nil), "injective.insurance.v1beta1.MsgUpdateParamsResponse") 390 } 391 392 func init() { 393 proto.RegisterFile("injective/insurance/v1beta1/tx.proto", fileDescriptor_7e1fa941c3fd0dc4) 394 } 395 396 var fileDescriptor_7e1fa941c3fd0dc4 = []byte{ 397 // 779 bytes of a gzipped FileDescriptorProto 398 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4f, 0x4f, 0xe3, 0x46, 399 0x14, 0x8f, 0x1b, 0x08, 0x30, 0x50, 0x10, 0x2e, 0x25, 0x4e, 0xa8, 0x9c, 0x34, 0xa5, 0x52, 0x94, 400 0x82, 0xad, 0x84, 0x8a, 0x96, 0xf4, 0x44, 0xa0, 0x55, 0x91, 0x1a, 0xd1, 0xa6, 0xed, 0xa5, 0x97, 401 0x68, 0x62, 0x8f, 0xcc, 0x94, 0xd8, 0x63, 0x3c, 0x63, 0x96, 0xdc, 0x76, 0xf7, 0xb2, 0xab, 0x3d, 402 0xf1, 0x11, 0xf8, 0x08, 0x39, 0xec, 0x69, 0xb5, 0x1f, 0x80, 0x23, 0xda, 0xd3, 0x9e, 0x56, 0x2b, 403 0x38, 0xb0, 0x1f, 0x62, 0x0f, 0x2b, 0x7b, 0xc6, 0x76, 0xb2, 0x84, 0xbf, 0x17, 0xf0, 0xfb, 0xbd, 404 0xdf, 0x7b, 0xef, 0xf7, 0xf3, 0x9b, 0x8c, 0xc1, 0x32, 0x76, 0xfe, 0x47, 0x06, 0xc3, 0x87, 0x48, 405 0xc7, 0x0e, 0xf5, 0x3d, 0xe8, 0x18, 0x48, 0x3f, 0xac, 0x76, 0x10, 0x83, 0x55, 0x9d, 0x1d, 0x69, 406 0xae, 0x47, 0x18, 0x91, 0x97, 0x62, 0x96, 0x16, 0xb3, 0x34, 0xc1, 0xca, 0x2f, 0x58, 0xc4, 0x22, 407 0x21, 0x4f, 0x0f, 0x9e, 0x78, 0x49, 0x5e, 0x35, 0x08, 0xb5, 0x09, 0xd5, 0x3b, 0x90, 0x26, 0x0d, 408 0x0d, 0x82, 0x1d, 0x91, 0xcf, 0x8a, 0xbc, 0x4d, 0x2d, 0xfd, 0xb0, 0x1a, 0xfc, 0x13, 0x89, 0x1c, 409 0x4f, 0xb4, 0x79, 0x47, 0x1e, 0x88, 0xd4, 0x0f, 0x37, 0x89, 0x4d, 0x84, 0x71, 0xf2, 0xf7, 0x09, 410 0x99, 0x78, 0xd0, 0xe8, 0x26, 0x4c, 0x1e, 0x0a, 0xda, 0x3c, 0xb4, 0xb1, 0x43, 0xf4, 0xf0, 0x2f, 411 0x87, 0x4a, 0xc7, 0x69, 0xb0, 0xd8, 0xa4, 0xd6, 0x96, 0x87, 0x20, 0x43, 0x3b, 0x51, 0xdb, 0xdf, 412 0x7c, 0xc7, 0x94, 0x17, 0x41, 0x86, 0x22, 0xc7, 0x44, 0x9e, 0x22, 0x15, 0xa5, 0xf2, 0x54, 0x4b, 413 0x44, 0x01, 0xce, 0xb0, 0xb1, 0x8f, 0x3c, 0xe5, 0x0b, 0x8e, 0xf3, 0x48, 0x2e, 0x80, 0xe9, 0x03, 414 0x9f, 0x30, 0xd4, 0x36, 0x91, 0x43, 0x6c, 0x25, 0x1d, 0x26, 0x41, 0x08, 0x6d, 0x07, 0x48, 0x40, 415 0xe0, 0x72, 0xda, 0xc1, 0x8b, 0x52, 0xc6, 0x38, 0x81, 0x43, 0x0d, 0x48, 0x91, 0xfc, 0x2d, 0x98, 416 0x11, 0x84, 0xb0, 0x4a, 0x19, 0x0f, 0x19, 0xa2, 0xe8, 0xaf, 0x00, 0x92, 0x7f, 0x8d, 0x7b, 0xb0, 417 0x9e, 0x8b, 0x94, 0x4c, 0x51, 0x2a, 0xcf, 0xd6, 0x96, 0xb5, 0x64, 0x67, 0xc2, 0xb0, 0xf0, 0xaf, 418 0xed, 0x86, 0xe1, 0x3f, 0x3d, 0x17, 0x45, 0x93, 0x82, 0xe7, 0xc0, 0x03, 0x3a, 0x72, 0xb1, 0xd7, 419 0x53, 0x26, 0x8a, 0x52, 0x39, 0xdd, 0x12, 0x91, 0xfc, 0x3b, 0x98, 0xc3, 0x0e, 0x66, 0x18, 0x76, 420 0xdb, 0x26, 0x72, 0x09, 0xc5, 0x4c, 0x99, 0x2c, 0x4a, 0xe5, 0xe9, 0x5a, 0x4e, 0x13, 0xdb, 0x09, 421 0xa4, 0xc7, 0xdd, 0xb7, 0x08, 0x76, 0x1a, 0x63, 0xa7, 0xef, 0x0a, 0xa9, 0xd6, 0xac, 0xa8, 0xdb, 422 0xe6, 0x65, 0xf5, 0x9f, 0x9f, 0x9f, 0x14, 0x52, 0x1f, 0x4e, 0x0a, 0xa9, 0xa7, 0x97, 0xfd, 0x8a, 423 0x78, 0x75, 0x2f, 0x2e, 0xfb, 0x95, 0x62, 0xb2, 0xcd, 0xd1, 0xef, 0xbd, 0x54, 0x04, 0xea, 0xe8, 424 0x4c, 0x0b, 0x51, 0x97, 0x38, 0x14, 0x95, 0xfa, 0x12, 0xf8, 0xb2, 0x49, 0xad, 0x7f, 0x83, 0x9e, 425 0x8f, 0x3c, 0xcc, 0xd0, 0xb5, 0xbb, 0x5a, 0x02, 0x53, 0x36, 0xf4, 0xf6, 0x11, 0x6b, 0x63, 0x53, 426 0xac, 0x6b, 0x92, 0x03, 0x3b, 0xa6, 0xbc, 0x01, 0x26, 0x22, 0x93, 0xe9, 0xbb, 0x99, 0x8c, 0xf8, 427 0x75, 0xfd, 0x1a, 0x77, 0xd9, 0x21, 0x77, 0x89, 0xc0, 0x52, 0x16, 0x7c, 0x3d, 0x04, 0xc4, 0x5e, 428 0x5e, 0x4b, 0x60, 0xa1, 0x49, 0xad, 0x16, 0x3a, 0xf0, 0x11, 0x65, 0x2d, 0x64, 0x22, 0xdb, 0x65, 429 0x98, 0x38, 0x0f, 0xb3, 0xf4, 0x13, 0xc8, 0x40, 0x9b, 0xf8, 0xce, 0x9d, 0x1d, 0x09, 0x7a, 0x7d, 430 0xfd, 0x1a, 0x43, 0xea, 0x90, 0xa1, 0x2b, 0x2a, 0x4b, 0x2a, 0xf8, 0x66, 0x14, 0x1e, 0xdb, 0x7b, 431 0x25, 0x81, 0xb9, 0xc0, 0xb8, 0x6b, 0x42, 0x86, 0xfe, 0x84, 0x1e, 0xb4, 0xa9, 0xbc, 0x0e, 0xa6, 432 0xa0, 0xcf, 0xf6, 0x88, 0x87, 0x59, 0x8f, 0x9b, 0x6b, 0x28, 0x6f, 0x5e, 0xae, 0x2e, 0x08, 0xa9, 433 0x9b, 0xa6, 0xe9, 0x21, 0x4a, 0xff, 0x66, 0x1e, 0x76, 0xac, 0x56, 0x42, 0x95, 0x37, 0x41, 0xc6, 434 0x0d, 0x3b, 0x84, 0xb6, 0xa7, 0x6b, 0xdf, 0x69, 0x37, 0x5c, 0x55, 0x1a, 0x1f, 0x16, 0xd9, 0xe4, 435 0x85, 0xf5, 0x95, 0xc0, 0x5e, 0xd2, 0x32, 0x70, 0x98, 0x1b, 0x5e, 0xd9, 0x80, 0xd0, 0x52, 0x0e, 436 0x64, 0x3f, 0x83, 0x22, 0x5f, 0xb5, 0x8f, 0x69, 0x90, 0x6e, 0x52, 0x4b, 0x7e, 0x26, 0x81, 0xaf, 437 0x46, 0x5d, 0x1e, 0x6b, 0x37, 0x6a, 0x1b, 0x7d, 0xbe, 0xf3, 0xbf, 0x3c, 0xa0, 0x28, 0x52, 0x24, 438 0x77, 0x01, 0x18, 0xf8, 0x41, 0x54, 0x6e, 0x6b, 0x95, 0x70, 0xf3, 0xb5, 0xbb, 0x73, 0xe3, 0x69, 439 0x4f, 0x24, 0x30, 0x7f, 0xf5, 0xcc, 0x56, 0x6f, 0xeb, 0x74, 0xa5, 0x24, 0xbf, 0x71, 0xef, 0x92, 440 0x58, 0x83, 0x07, 0x66, 0x86, 0xce, 0xd5, 0xca, 0xad, 0x3e, 0x06, 0xd8, 0xf9, 0x1f, 0xef, 0xc3, 441 0x8e, 0x66, 0xe6, 0xc7, 0x1f, 0x5f, 0xf6, 0x2b, 0x52, 0x03, 0x9f, 0x9e, 0xab, 0xd2, 0xd9, 0xb9, 442 0x2a, 0xbd, 0x3f, 0x57, 0xa5, 0xe3, 0x0b, 0x35, 0x75, 0x76, 0xa1, 0xa6, 0xde, 0x5e, 0xa8, 0xa9, 443 0xff, 0x76, 0x2d, 0xcc, 0xf6, 0xfc, 0x8e, 0x66, 0x10, 0x5b, 0xdf, 0x89, 0x06, 0xfc, 0x01, 0x3b, 444 0x54, 0x8f, 0xc7, 0xad, 0x1a, 0xc4, 0x43, 0x83, 0xe1, 0x1e, 0xc4, 0x8e, 0x6e, 0x13, 0xd3, 0xef, 445 0x22, 0x3a, 0xf0, 0xb5, 0x0b, 0x6e, 0x78, 0xda, 0xc9, 0x84, 0x1f, 0xaa, 0xb5, 0x4f, 0x01, 0x00, 446 0x00, 0xff, 0xff, 0x5f, 0x13, 0xc4, 0xc0, 0xbe, 0x07, 0x00, 0x00, 447 } 448 449 // Reference imports to suppress errors if they are not otherwise used. 450 var _ context.Context 451 var _ grpc.ClientConn 452 453 // This is a compile-time assertion to ensure that this generated file 454 // is compatible with the grpc package it is being compiled against. 455 const _ = grpc.SupportPackageIsVersion4 456 457 // MsgClient is the client API for Msg service. 458 // 459 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 460 type MsgClient interface { 461 // CreateInsuranceFund defines a method for creating an insurance fund 462 CreateInsuranceFund(ctx context.Context, in *MsgCreateInsuranceFund, opts ...grpc.CallOption) (*MsgCreateInsuranceFundResponse, error) 463 // Underwrite defines a method for depositing tokens to underwrite an 464 // insurance fund 465 Underwrite(ctx context.Context, in *MsgUnderwrite, opts ...grpc.CallOption) (*MsgUnderwriteResponse, error) 466 // RequestRedemption defines a method for requesting a redemption of the 467 // sender's insurance fund tokens 468 RequestRedemption(ctx context.Context, in *MsgRequestRedemption, opts ...grpc.CallOption) (*MsgRequestRedemptionResponse, error) 469 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) 470 } 471 472 type msgClient struct { 473 cc grpc1.ClientConn 474 } 475 476 func NewMsgClient(cc grpc1.ClientConn) MsgClient { 477 return &msgClient{cc} 478 } 479 480 func (c *msgClient) CreateInsuranceFund(ctx context.Context, in *MsgCreateInsuranceFund, opts ...grpc.CallOption) (*MsgCreateInsuranceFundResponse, error) { 481 out := new(MsgCreateInsuranceFundResponse) 482 err := c.cc.Invoke(ctx, "/injective.insurance.v1beta1.Msg/CreateInsuranceFund", in, out, opts...) 483 if err != nil { 484 return nil, err 485 } 486 return out, nil 487 } 488 489 func (c *msgClient) Underwrite(ctx context.Context, in *MsgUnderwrite, opts ...grpc.CallOption) (*MsgUnderwriteResponse, error) { 490 out := new(MsgUnderwriteResponse) 491 err := c.cc.Invoke(ctx, "/injective.insurance.v1beta1.Msg/Underwrite", in, out, opts...) 492 if err != nil { 493 return nil, err 494 } 495 return out, nil 496 } 497 498 func (c *msgClient) RequestRedemption(ctx context.Context, in *MsgRequestRedemption, opts ...grpc.CallOption) (*MsgRequestRedemptionResponse, error) { 499 out := new(MsgRequestRedemptionResponse) 500 err := c.cc.Invoke(ctx, "/injective.insurance.v1beta1.Msg/RequestRedemption", in, out, opts...) 501 if err != nil { 502 return nil, err 503 } 504 return out, nil 505 } 506 507 func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { 508 out := new(MsgUpdateParamsResponse) 509 err := c.cc.Invoke(ctx, "/injective.insurance.v1beta1.Msg/UpdateParams", in, out, opts...) 510 if err != nil { 511 return nil, err 512 } 513 return out, nil 514 } 515 516 // MsgServer is the server API for Msg service. 517 type MsgServer interface { 518 // CreateInsuranceFund defines a method for creating an insurance fund 519 CreateInsuranceFund(context.Context, *MsgCreateInsuranceFund) (*MsgCreateInsuranceFundResponse, error) 520 // Underwrite defines a method for depositing tokens to underwrite an 521 // insurance fund 522 Underwrite(context.Context, *MsgUnderwrite) (*MsgUnderwriteResponse, error) 523 // RequestRedemption defines a method for requesting a redemption of the 524 // sender's insurance fund tokens 525 RequestRedemption(context.Context, *MsgRequestRedemption) (*MsgRequestRedemptionResponse, error) 526 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) 527 } 528 529 // UnimplementedMsgServer can be embedded to have forward compatible implementations. 530 type UnimplementedMsgServer struct { 531 } 532 533 func (*UnimplementedMsgServer) CreateInsuranceFund(ctx context.Context, req *MsgCreateInsuranceFund) (*MsgCreateInsuranceFundResponse, error) { 534 return nil, status.Errorf(codes.Unimplemented, "method CreateInsuranceFund not implemented") 535 } 536 func (*UnimplementedMsgServer) Underwrite(ctx context.Context, req *MsgUnderwrite) (*MsgUnderwriteResponse, error) { 537 return nil, status.Errorf(codes.Unimplemented, "method Underwrite not implemented") 538 } 539 func (*UnimplementedMsgServer) RequestRedemption(ctx context.Context, req *MsgRequestRedemption) (*MsgRequestRedemptionResponse, error) { 540 return nil, status.Errorf(codes.Unimplemented, "method RequestRedemption not implemented") 541 } 542 func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { 543 return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") 544 } 545 546 func RegisterMsgServer(s grpc1.Server, srv MsgServer) { 547 s.RegisterService(&_Msg_serviceDesc, srv) 548 } 549 550 func _Msg_CreateInsuranceFund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 551 in := new(MsgCreateInsuranceFund) 552 if err := dec(in); err != nil { 553 return nil, err 554 } 555 if interceptor == nil { 556 return srv.(MsgServer).CreateInsuranceFund(ctx, in) 557 } 558 info := &grpc.UnaryServerInfo{ 559 Server: srv, 560 FullMethod: "/injective.insurance.v1beta1.Msg/CreateInsuranceFund", 561 } 562 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 563 return srv.(MsgServer).CreateInsuranceFund(ctx, req.(*MsgCreateInsuranceFund)) 564 } 565 return interceptor(ctx, in, info, handler) 566 } 567 568 func _Msg_Underwrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 569 in := new(MsgUnderwrite) 570 if err := dec(in); err != nil { 571 return nil, err 572 } 573 if interceptor == nil { 574 return srv.(MsgServer).Underwrite(ctx, in) 575 } 576 info := &grpc.UnaryServerInfo{ 577 Server: srv, 578 FullMethod: "/injective.insurance.v1beta1.Msg/Underwrite", 579 } 580 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 581 return srv.(MsgServer).Underwrite(ctx, req.(*MsgUnderwrite)) 582 } 583 return interceptor(ctx, in, info, handler) 584 } 585 586 func _Msg_RequestRedemption_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 587 in := new(MsgRequestRedemption) 588 if err := dec(in); err != nil { 589 return nil, err 590 } 591 if interceptor == nil { 592 return srv.(MsgServer).RequestRedemption(ctx, in) 593 } 594 info := &grpc.UnaryServerInfo{ 595 Server: srv, 596 FullMethod: "/injective.insurance.v1beta1.Msg/RequestRedemption", 597 } 598 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 599 return srv.(MsgServer).RequestRedemption(ctx, req.(*MsgRequestRedemption)) 600 } 601 return interceptor(ctx, in, info, handler) 602 } 603 604 func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 605 in := new(MsgUpdateParams) 606 if err := dec(in); err != nil { 607 return nil, err 608 } 609 if interceptor == nil { 610 return srv.(MsgServer).UpdateParams(ctx, in) 611 } 612 info := &grpc.UnaryServerInfo{ 613 Server: srv, 614 FullMethod: "/injective.insurance.v1beta1.Msg/UpdateParams", 615 } 616 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 617 return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) 618 } 619 return interceptor(ctx, in, info, handler) 620 } 621 622 var _Msg_serviceDesc = grpc.ServiceDesc{ 623 ServiceName: "injective.insurance.v1beta1.Msg", 624 HandlerType: (*MsgServer)(nil), 625 Methods: []grpc.MethodDesc{ 626 { 627 MethodName: "CreateInsuranceFund", 628 Handler: _Msg_CreateInsuranceFund_Handler, 629 }, 630 { 631 MethodName: "Underwrite", 632 Handler: _Msg_Underwrite_Handler, 633 }, 634 { 635 MethodName: "RequestRedemption", 636 Handler: _Msg_RequestRedemption_Handler, 637 }, 638 { 639 MethodName: "UpdateParams", 640 Handler: _Msg_UpdateParams_Handler, 641 }, 642 }, 643 Streams: []grpc.StreamDesc{}, 644 Metadata: "injective/insurance/v1beta1/tx.proto", 645 } 646 647 func (m *MsgCreateInsuranceFund) Marshal() (dAtA []byte, err error) { 648 size := m.Size() 649 dAtA = make([]byte, size) 650 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 651 if err != nil { 652 return nil, err 653 } 654 return dAtA[:n], nil 655 } 656 657 func (m *MsgCreateInsuranceFund) MarshalTo(dAtA []byte) (int, error) { 658 size := m.Size() 659 return m.MarshalToSizedBuffer(dAtA[:size]) 660 } 661 662 func (m *MsgCreateInsuranceFund) MarshalToSizedBuffer(dAtA []byte) (int, error) { 663 i := len(dAtA) 664 _ = i 665 var l int 666 _ = l 667 { 668 size, err := m.InitialDeposit.MarshalToSizedBuffer(dAtA[:i]) 669 if err != nil { 670 return 0, err 671 } 672 i -= size 673 i = encodeVarintTx(dAtA, i, uint64(size)) 674 } 675 i-- 676 dAtA[i] = 0x42 677 if m.Expiry != 0 { 678 i = encodeVarintTx(dAtA, i, uint64(m.Expiry)) 679 i-- 680 dAtA[i] = 0x38 681 } 682 if m.OracleType != 0 { 683 i = encodeVarintTx(dAtA, i, uint64(m.OracleType)) 684 i-- 685 dAtA[i] = 0x30 686 } 687 if len(m.OracleQuote) > 0 { 688 i -= len(m.OracleQuote) 689 copy(dAtA[i:], m.OracleQuote) 690 i = encodeVarintTx(dAtA, i, uint64(len(m.OracleQuote))) 691 i-- 692 dAtA[i] = 0x2a 693 } 694 if len(m.OracleBase) > 0 { 695 i -= len(m.OracleBase) 696 copy(dAtA[i:], m.OracleBase) 697 i = encodeVarintTx(dAtA, i, uint64(len(m.OracleBase))) 698 i-- 699 dAtA[i] = 0x22 700 } 701 if len(m.QuoteDenom) > 0 { 702 i -= len(m.QuoteDenom) 703 copy(dAtA[i:], m.QuoteDenom) 704 i = encodeVarintTx(dAtA, i, uint64(len(m.QuoteDenom))) 705 i-- 706 dAtA[i] = 0x1a 707 } 708 if len(m.Ticker) > 0 { 709 i -= len(m.Ticker) 710 copy(dAtA[i:], m.Ticker) 711 i = encodeVarintTx(dAtA, i, uint64(len(m.Ticker))) 712 i-- 713 dAtA[i] = 0x12 714 } 715 if len(m.Sender) > 0 { 716 i -= len(m.Sender) 717 copy(dAtA[i:], m.Sender) 718 i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) 719 i-- 720 dAtA[i] = 0xa 721 } 722 return len(dAtA) - i, nil 723 } 724 725 func (m *MsgCreateInsuranceFundResponse) Marshal() (dAtA []byte, err error) { 726 size := m.Size() 727 dAtA = make([]byte, size) 728 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 729 if err != nil { 730 return nil, err 731 } 732 return dAtA[:n], nil 733 } 734 735 func (m *MsgCreateInsuranceFundResponse) MarshalTo(dAtA []byte) (int, error) { 736 size := m.Size() 737 return m.MarshalToSizedBuffer(dAtA[:size]) 738 } 739 740 func (m *MsgCreateInsuranceFundResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 741 i := len(dAtA) 742 _ = i 743 var l int 744 _ = l 745 return len(dAtA) - i, nil 746 } 747 748 func (m *MsgUnderwrite) Marshal() (dAtA []byte, err error) { 749 size := m.Size() 750 dAtA = make([]byte, size) 751 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 752 if err != nil { 753 return nil, err 754 } 755 return dAtA[:n], nil 756 } 757 758 func (m *MsgUnderwrite) MarshalTo(dAtA []byte) (int, error) { 759 size := m.Size() 760 return m.MarshalToSizedBuffer(dAtA[:size]) 761 } 762 763 func (m *MsgUnderwrite) MarshalToSizedBuffer(dAtA []byte) (int, error) { 764 i := len(dAtA) 765 _ = i 766 var l int 767 _ = l 768 { 769 size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) 770 if err != nil { 771 return 0, err 772 } 773 i -= size 774 i = encodeVarintTx(dAtA, i, uint64(size)) 775 } 776 i-- 777 dAtA[i] = 0x1a 778 if len(m.MarketId) > 0 { 779 i -= len(m.MarketId) 780 copy(dAtA[i:], m.MarketId) 781 i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) 782 i-- 783 dAtA[i] = 0x12 784 } 785 if len(m.Sender) > 0 { 786 i -= len(m.Sender) 787 copy(dAtA[i:], m.Sender) 788 i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) 789 i-- 790 dAtA[i] = 0xa 791 } 792 return len(dAtA) - i, nil 793 } 794 795 func (m *MsgUnderwriteResponse) Marshal() (dAtA []byte, err error) { 796 size := m.Size() 797 dAtA = make([]byte, size) 798 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 799 if err != nil { 800 return nil, err 801 } 802 return dAtA[:n], nil 803 } 804 805 func (m *MsgUnderwriteResponse) MarshalTo(dAtA []byte) (int, error) { 806 size := m.Size() 807 return m.MarshalToSizedBuffer(dAtA[:size]) 808 } 809 810 func (m *MsgUnderwriteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 811 i := len(dAtA) 812 _ = i 813 var l int 814 _ = l 815 return len(dAtA) - i, nil 816 } 817 818 func (m *MsgRequestRedemption) Marshal() (dAtA []byte, err error) { 819 size := m.Size() 820 dAtA = make([]byte, size) 821 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 822 if err != nil { 823 return nil, err 824 } 825 return dAtA[:n], nil 826 } 827 828 func (m *MsgRequestRedemption) MarshalTo(dAtA []byte) (int, error) { 829 size := m.Size() 830 return m.MarshalToSizedBuffer(dAtA[:size]) 831 } 832 833 func (m *MsgRequestRedemption) MarshalToSizedBuffer(dAtA []byte) (int, error) { 834 i := len(dAtA) 835 _ = i 836 var l int 837 _ = l 838 { 839 size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) 840 if err != nil { 841 return 0, err 842 } 843 i -= size 844 i = encodeVarintTx(dAtA, i, uint64(size)) 845 } 846 i-- 847 dAtA[i] = 0x1a 848 if len(m.MarketId) > 0 { 849 i -= len(m.MarketId) 850 copy(dAtA[i:], m.MarketId) 851 i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) 852 i-- 853 dAtA[i] = 0x12 854 } 855 if len(m.Sender) > 0 { 856 i -= len(m.Sender) 857 copy(dAtA[i:], m.Sender) 858 i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) 859 i-- 860 dAtA[i] = 0xa 861 } 862 return len(dAtA) - i, nil 863 } 864 865 func (m *MsgRequestRedemptionResponse) Marshal() (dAtA []byte, err error) { 866 size := m.Size() 867 dAtA = make([]byte, size) 868 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 869 if err != nil { 870 return nil, err 871 } 872 return dAtA[:n], nil 873 } 874 875 func (m *MsgRequestRedemptionResponse) MarshalTo(dAtA []byte) (int, error) { 876 size := m.Size() 877 return m.MarshalToSizedBuffer(dAtA[:size]) 878 } 879 880 func (m *MsgRequestRedemptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 881 i := len(dAtA) 882 _ = i 883 var l int 884 _ = l 885 return len(dAtA) - i, nil 886 } 887 888 func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { 889 size := m.Size() 890 dAtA = make([]byte, size) 891 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 892 if err != nil { 893 return nil, err 894 } 895 return dAtA[:n], nil 896 } 897 898 func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { 899 size := m.Size() 900 return m.MarshalToSizedBuffer(dAtA[:size]) 901 } 902 903 func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { 904 i := len(dAtA) 905 _ = i 906 var l int 907 _ = l 908 { 909 size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) 910 if err != nil { 911 return 0, err 912 } 913 i -= size 914 i = encodeVarintTx(dAtA, i, uint64(size)) 915 } 916 i-- 917 dAtA[i] = 0x12 918 if len(m.Authority) > 0 { 919 i -= len(m.Authority) 920 copy(dAtA[i:], m.Authority) 921 i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) 922 i-- 923 dAtA[i] = 0xa 924 } 925 return len(dAtA) - i, nil 926 } 927 928 func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { 929 size := m.Size() 930 dAtA = make([]byte, size) 931 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 932 if err != nil { 933 return nil, err 934 } 935 return dAtA[:n], nil 936 } 937 938 func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { 939 size := m.Size() 940 return m.MarshalToSizedBuffer(dAtA[:size]) 941 } 942 943 func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 944 i := len(dAtA) 945 _ = i 946 var l int 947 _ = l 948 return len(dAtA) - i, nil 949 } 950 951 func encodeVarintTx(dAtA []byte, offset int, v uint64) int { 952 offset -= sovTx(v) 953 base := offset 954 for v >= 1<<7 { 955 dAtA[offset] = uint8(v&0x7f | 0x80) 956 v >>= 7 957 offset++ 958 } 959 dAtA[offset] = uint8(v) 960 return base 961 } 962 func (m *MsgCreateInsuranceFund) Size() (n int) { 963 if m == nil { 964 return 0 965 } 966 var l int 967 _ = l 968 l = len(m.Sender) 969 if l > 0 { 970 n += 1 + l + sovTx(uint64(l)) 971 } 972 l = len(m.Ticker) 973 if l > 0 { 974 n += 1 + l + sovTx(uint64(l)) 975 } 976 l = len(m.QuoteDenom) 977 if l > 0 { 978 n += 1 + l + sovTx(uint64(l)) 979 } 980 l = len(m.OracleBase) 981 if l > 0 { 982 n += 1 + l + sovTx(uint64(l)) 983 } 984 l = len(m.OracleQuote) 985 if l > 0 { 986 n += 1 + l + sovTx(uint64(l)) 987 } 988 if m.OracleType != 0 { 989 n += 1 + sovTx(uint64(m.OracleType)) 990 } 991 if m.Expiry != 0 { 992 n += 1 + sovTx(uint64(m.Expiry)) 993 } 994 l = m.InitialDeposit.Size() 995 n += 1 + l + sovTx(uint64(l)) 996 return n 997 } 998 999 func (m *MsgCreateInsuranceFundResponse) Size() (n int) { 1000 if m == nil { 1001 return 0 1002 } 1003 var l int 1004 _ = l 1005 return n 1006 } 1007 1008 func (m *MsgUnderwrite) Size() (n int) { 1009 if m == nil { 1010 return 0 1011 } 1012 var l int 1013 _ = l 1014 l = len(m.Sender) 1015 if l > 0 { 1016 n += 1 + l + sovTx(uint64(l)) 1017 } 1018 l = len(m.MarketId) 1019 if l > 0 { 1020 n += 1 + l + sovTx(uint64(l)) 1021 } 1022 l = m.Deposit.Size() 1023 n += 1 + l + sovTx(uint64(l)) 1024 return n 1025 } 1026 1027 func (m *MsgUnderwriteResponse) Size() (n int) { 1028 if m == nil { 1029 return 0 1030 } 1031 var l int 1032 _ = l 1033 return n 1034 } 1035 1036 func (m *MsgRequestRedemption) Size() (n int) { 1037 if m == nil { 1038 return 0 1039 } 1040 var l int 1041 _ = l 1042 l = len(m.Sender) 1043 if l > 0 { 1044 n += 1 + l + sovTx(uint64(l)) 1045 } 1046 l = len(m.MarketId) 1047 if l > 0 { 1048 n += 1 + l + sovTx(uint64(l)) 1049 } 1050 l = m.Amount.Size() 1051 n += 1 + l + sovTx(uint64(l)) 1052 return n 1053 } 1054 1055 func (m *MsgRequestRedemptionResponse) Size() (n int) { 1056 if m == nil { 1057 return 0 1058 } 1059 var l int 1060 _ = l 1061 return n 1062 } 1063 1064 func (m *MsgUpdateParams) Size() (n int) { 1065 if m == nil { 1066 return 0 1067 } 1068 var l int 1069 _ = l 1070 l = len(m.Authority) 1071 if l > 0 { 1072 n += 1 + l + sovTx(uint64(l)) 1073 } 1074 l = m.Params.Size() 1075 n += 1 + l + sovTx(uint64(l)) 1076 return n 1077 } 1078 1079 func (m *MsgUpdateParamsResponse) Size() (n int) { 1080 if m == nil { 1081 return 0 1082 } 1083 var l int 1084 _ = l 1085 return n 1086 } 1087 1088 func sovTx(x uint64) (n int) { 1089 return (math_bits.Len64(x|1) + 6) / 7 1090 } 1091 func sozTx(x uint64) (n int) { 1092 return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1093 } 1094 func (m *MsgCreateInsuranceFund) Unmarshal(dAtA []byte) error { 1095 l := len(dAtA) 1096 iNdEx := 0 1097 for iNdEx < l { 1098 preIndex := iNdEx 1099 var wire uint64 1100 for shift := uint(0); ; shift += 7 { 1101 if shift >= 64 { 1102 return ErrIntOverflowTx 1103 } 1104 if iNdEx >= l { 1105 return io.ErrUnexpectedEOF 1106 } 1107 b := dAtA[iNdEx] 1108 iNdEx++ 1109 wire |= uint64(b&0x7F) << shift 1110 if b < 0x80 { 1111 break 1112 } 1113 } 1114 fieldNum := int32(wire >> 3) 1115 wireType := int(wire & 0x7) 1116 if wireType == 4 { 1117 return fmt.Errorf("proto: MsgCreateInsuranceFund: wiretype end group for non-group") 1118 } 1119 if fieldNum <= 0 { 1120 return fmt.Errorf("proto: MsgCreateInsuranceFund: illegal tag %d (wire type %d)", fieldNum, wire) 1121 } 1122 switch fieldNum { 1123 case 1: 1124 if wireType != 2 { 1125 return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) 1126 } 1127 var stringLen uint64 1128 for shift := uint(0); ; shift += 7 { 1129 if shift >= 64 { 1130 return ErrIntOverflowTx 1131 } 1132 if iNdEx >= l { 1133 return io.ErrUnexpectedEOF 1134 } 1135 b := dAtA[iNdEx] 1136 iNdEx++ 1137 stringLen |= uint64(b&0x7F) << shift 1138 if b < 0x80 { 1139 break 1140 } 1141 } 1142 intStringLen := int(stringLen) 1143 if intStringLen < 0 { 1144 return ErrInvalidLengthTx 1145 } 1146 postIndex := iNdEx + intStringLen 1147 if postIndex < 0 { 1148 return ErrInvalidLengthTx 1149 } 1150 if postIndex > l { 1151 return io.ErrUnexpectedEOF 1152 } 1153 m.Sender = string(dAtA[iNdEx:postIndex]) 1154 iNdEx = postIndex 1155 case 2: 1156 if wireType != 2 { 1157 return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) 1158 } 1159 var stringLen uint64 1160 for shift := uint(0); ; shift += 7 { 1161 if shift >= 64 { 1162 return ErrIntOverflowTx 1163 } 1164 if iNdEx >= l { 1165 return io.ErrUnexpectedEOF 1166 } 1167 b := dAtA[iNdEx] 1168 iNdEx++ 1169 stringLen |= uint64(b&0x7F) << shift 1170 if b < 0x80 { 1171 break 1172 } 1173 } 1174 intStringLen := int(stringLen) 1175 if intStringLen < 0 { 1176 return ErrInvalidLengthTx 1177 } 1178 postIndex := iNdEx + intStringLen 1179 if postIndex < 0 { 1180 return ErrInvalidLengthTx 1181 } 1182 if postIndex > l { 1183 return io.ErrUnexpectedEOF 1184 } 1185 m.Ticker = string(dAtA[iNdEx:postIndex]) 1186 iNdEx = postIndex 1187 case 3: 1188 if wireType != 2 { 1189 return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) 1190 } 1191 var stringLen uint64 1192 for shift := uint(0); ; shift += 7 { 1193 if shift >= 64 { 1194 return ErrIntOverflowTx 1195 } 1196 if iNdEx >= l { 1197 return io.ErrUnexpectedEOF 1198 } 1199 b := dAtA[iNdEx] 1200 iNdEx++ 1201 stringLen |= uint64(b&0x7F) << shift 1202 if b < 0x80 { 1203 break 1204 } 1205 } 1206 intStringLen := int(stringLen) 1207 if intStringLen < 0 { 1208 return ErrInvalidLengthTx 1209 } 1210 postIndex := iNdEx + intStringLen 1211 if postIndex < 0 { 1212 return ErrInvalidLengthTx 1213 } 1214 if postIndex > l { 1215 return io.ErrUnexpectedEOF 1216 } 1217 m.QuoteDenom = string(dAtA[iNdEx:postIndex]) 1218 iNdEx = postIndex 1219 case 4: 1220 if wireType != 2 { 1221 return fmt.Errorf("proto: wrong wireType = %d for field OracleBase", wireType) 1222 } 1223 var stringLen uint64 1224 for shift := uint(0); ; shift += 7 { 1225 if shift >= 64 { 1226 return ErrIntOverflowTx 1227 } 1228 if iNdEx >= l { 1229 return io.ErrUnexpectedEOF 1230 } 1231 b := dAtA[iNdEx] 1232 iNdEx++ 1233 stringLen |= uint64(b&0x7F) << shift 1234 if b < 0x80 { 1235 break 1236 } 1237 } 1238 intStringLen := int(stringLen) 1239 if intStringLen < 0 { 1240 return ErrInvalidLengthTx 1241 } 1242 postIndex := iNdEx + intStringLen 1243 if postIndex < 0 { 1244 return ErrInvalidLengthTx 1245 } 1246 if postIndex > l { 1247 return io.ErrUnexpectedEOF 1248 } 1249 m.OracleBase = string(dAtA[iNdEx:postIndex]) 1250 iNdEx = postIndex 1251 case 5: 1252 if wireType != 2 { 1253 return fmt.Errorf("proto: wrong wireType = %d for field OracleQuote", wireType) 1254 } 1255 var stringLen uint64 1256 for shift := uint(0); ; shift += 7 { 1257 if shift >= 64 { 1258 return ErrIntOverflowTx 1259 } 1260 if iNdEx >= l { 1261 return io.ErrUnexpectedEOF 1262 } 1263 b := dAtA[iNdEx] 1264 iNdEx++ 1265 stringLen |= uint64(b&0x7F) << shift 1266 if b < 0x80 { 1267 break 1268 } 1269 } 1270 intStringLen := int(stringLen) 1271 if intStringLen < 0 { 1272 return ErrInvalidLengthTx 1273 } 1274 postIndex := iNdEx + intStringLen 1275 if postIndex < 0 { 1276 return ErrInvalidLengthTx 1277 } 1278 if postIndex > l { 1279 return io.ErrUnexpectedEOF 1280 } 1281 m.OracleQuote = string(dAtA[iNdEx:postIndex]) 1282 iNdEx = postIndex 1283 case 6: 1284 if wireType != 0 { 1285 return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType) 1286 } 1287 m.OracleType = 0 1288 for shift := uint(0); ; shift += 7 { 1289 if shift >= 64 { 1290 return ErrIntOverflowTx 1291 } 1292 if iNdEx >= l { 1293 return io.ErrUnexpectedEOF 1294 } 1295 b := dAtA[iNdEx] 1296 iNdEx++ 1297 m.OracleType |= types.OracleType(b&0x7F) << shift 1298 if b < 0x80 { 1299 break 1300 } 1301 } 1302 case 7: 1303 if wireType != 0 { 1304 return fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType) 1305 } 1306 m.Expiry = 0 1307 for shift := uint(0); ; shift += 7 { 1308 if shift >= 64 { 1309 return ErrIntOverflowTx 1310 } 1311 if iNdEx >= l { 1312 return io.ErrUnexpectedEOF 1313 } 1314 b := dAtA[iNdEx] 1315 iNdEx++ 1316 m.Expiry |= int64(b&0x7F) << shift 1317 if b < 0x80 { 1318 break 1319 } 1320 } 1321 case 8: 1322 if wireType != 2 { 1323 return fmt.Errorf("proto: wrong wireType = %d for field InitialDeposit", wireType) 1324 } 1325 var msglen int 1326 for shift := uint(0); ; shift += 7 { 1327 if shift >= 64 { 1328 return ErrIntOverflowTx 1329 } 1330 if iNdEx >= l { 1331 return io.ErrUnexpectedEOF 1332 } 1333 b := dAtA[iNdEx] 1334 iNdEx++ 1335 msglen |= int(b&0x7F) << shift 1336 if b < 0x80 { 1337 break 1338 } 1339 } 1340 if msglen < 0 { 1341 return ErrInvalidLengthTx 1342 } 1343 postIndex := iNdEx + msglen 1344 if postIndex < 0 { 1345 return ErrInvalidLengthTx 1346 } 1347 if postIndex > l { 1348 return io.ErrUnexpectedEOF 1349 } 1350 if err := m.InitialDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1351 return err 1352 } 1353 iNdEx = postIndex 1354 default: 1355 iNdEx = preIndex 1356 skippy, err := skipTx(dAtA[iNdEx:]) 1357 if err != nil { 1358 return err 1359 } 1360 if (skippy < 0) || (iNdEx+skippy) < 0 { 1361 return ErrInvalidLengthTx 1362 } 1363 if (iNdEx + skippy) > l { 1364 return io.ErrUnexpectedEOF 1365 } 1366 iNdEx += skippy 1367 } 1368 } 1369 1370 if iNdEx > l { 1371 return io.ErrUnexpectedEOF 1372 } 1373 return nil 1374 } 1375 func (m *MsgCreateInsuranceFundResponse) Unmarshal(dAtA []byte) error { 1376 l := len(dAtA) 1377 iNdEx := 0 1378 for iNdEx < l { 1379 preIndex := iNdEx 1380 var wire uint64 1381 for shift := uint(0); ; shift += 7 { 1382 if shift >= 64 { 1383 return ErrIntOverflowTx 1384 } 1385 if iNdEx >= l { 1386 return io.ErrUnexpectedEOF 1387 } 1388 b := dAtA[iNdEx] 1389 iNdEx++ 1390 wire |= uint64(b&0x7F) << shift 1391 if b < 0x80 { 1392 break 1393 } 1394 } 1395 fieldNum := int32(wire >> 3) 1396 wireType := int(wire & 0x7) 1397 if wireType == 4 { 1398 return fmt.Errorf("proto: MsgCreateInsuranceFundResponse: wiretype end group for non-group") 1399 } 1400 if fieldNum <= 0 { 1401 return fmt.Errorf("proto: MsgCreateInsuranceFundResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1402 } 1403 switch fieldNum { 1404 default: 1405 iNdEx = preIndex 1406 skippy, err := skipTx(dAtA[iNdEx:]) 1407 if err != nil { 1408 return err 1409 } 1410 if (skippy < 0) || (iNdEx+skippy) < 0 { 1411 return ErrInvalidLengthTx 1412 } 1413 if (iNdEx + skippy) > l { 1414 return io.ErrUnexpectedEOF 1415 } 1416 iNdEx += skippy 1417 } 1418 } 1419 1420 if iNdEx > l { 1421 return io.ErrUnexpectedEOF 1422 } 1423 return nil 1424 } 1425 func (m *MsgUnderwrite) Unmarshal(dAtA []byte) error { 1426 l := len(dAtA) 1427 iNdEx := 0 1428 for iNdEx < l { 1429 preIndex := iNdEx 1430 var wire uint64 1431 for shift := uint(0); ; shift += 7 { 1432 if shift >= 64 { 1433 return ErrIntOverflowTx 1434 } 1435 if iNdEx >= l { 1436 return io.ErrUnexpectedEOF 1437 } 1438 b := dAtA[iNdEx] 1439 iNdEx++ 1440 wire |= uint64(b&0x7F) << shift 1441 if b < 0x80 { 1442 break 1443 } 1444 } 1445 fieldNum := int32(wire >> 3) 1446 wireType := int(wire & 0x7) 1447 if wireType == 4 { 1448 return fmt.Errorf("proto: MsgUnderwrite: wiretype end group for non-group") 1449 } 1450 if fieldNum <= 0 { 1451 return fmt.Errorf("proto: MsgUnderwrite: illegal tag %d (wire type %d)", fieldNum, wire) 1452 } 1453 switch fieldNum { 1454 case 1: 1455 if wireType != 2 { 1456 return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) 1457 } 1458 var stringLen uint64 1459 for shift := uint(0); ; shift += 7 { 1460 if shift >= 64 { 1461 return ErrIntOverflowTx 1462 } 1463 if iNdEx >= l { 1464 return io.ErrUnexpectedEOF 1465 } 1466 b := dAtA[iNdEx] 1467 iNdEx++ 1468 stringLen |= uint64(b&0x7F) << shift 1469 if b < 0x80 { 1470 break 1471 } 1472 } 1473 intStringLen := int(stringLen) 1474 if intStringLen < 0 { 1475 return ErrInvalidLengthTx 1476 } 1477 postIndex := iNdEx + intStringLen 1478 if postIndex < 0 { 1479 return ErrInvalidLengthTx 1480 } 1481 if postIndex > l { 1482 return io.ErrUnexpectedEOF 1483 } 1484 m.Sender = string(dAtA[iNdEx:postIndex]) 1485 iNdEx = postIndex 1486 case 2: 1487 if wireType != 2 { 1488 return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) 1489 } 1490 var stringLen uint64 1491 for shift := uint(0); ; shift += 7 { 1492 if shift >= 64 { 1493 return ErrIntOverflowTx 1494 } 1495 if iNdEx >= l { 1496 return io.ErrUnexpectedEOF 1497 } 1498 b := dAtA[iNdEx] 1499 iNdEx++ 1500 stringLen |= uint64(b&0x7F) << shift 1501 if b < 0x80 { 1502 break 1503 } 1504 } 1505 intStringLen := int(stringLen) 1506 if intStringLen < 0 { 1507 return ErrInvalidLengthTx 1508 } 1509 postIndex := iNdEx + intStringLen 1510 if postIndex < 0 { 1511 return ErrInvalidLengthTx 1512 } 1513 if postIndex > l { 1514 return io.ErrUnexpectedEOF 1515 } 1516 m.MarketId = string(dAtA[iNdEx:postIndex]) 1517 iNdEx = postIndex 1518 case 3: 1519 if wireType != 2 { 1520 return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) 1521 } 1522 var msglen int 1523 for shift := uint(0); ; shift += 7 { 1524 if shift >= 64 { 1525 return ErrIntOverflowTx 1526 } 1527 if iNdEx >= l { 1528 return io.ErrUnexpectedEOF 1529 } 1530 b := dAtA[iNdEx] 1531 iNdEx++ 1532 msglen |= int(b&0x7F) << shift 1533 if b < 0x80 { 1534 break 1535 } 1536 } 1537 if msglen < 0 { 1538 return ErrInvalidLengthTx 1539 } 1540 postIndex := iNdEx + msglen 1541 if postIndex < 0 { 1542 return ErrInvalidLengthTx 1543 } 1544 if postIndex > l { 1545 return io.ErrUnexpectedEOF 1546 } 1547 if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1548 return err 1549 } 1550 iNdEx = postIndex 1551 default: 1552 iNdEx = preIndex 1553 skippy, err := skipTx(dAtA[iNdEx:]) 1554 if err != nil { 1555 return err 1556 } 1557 if (skippy < 0) || (iNdEx+skippy) < 0 { 1558 return ErrInvalidLengthTx 1559 } 1560 if (iNdEx + skippy) > l { 1561 return io.ErrUnexpectedEOF 1562 } 1563 iNdEx += skippy 1564 } 1565 } 1566 1567 if iNdEx > l { 1568 return io.ErrUnexpectedEOF 1569 } 1570 return nil 1571 } 1572 func (m *MsgUnderwriteResponse) Unmarshal(dAtA []byte) error { 1573 l := len(dAtA) 1574 iNdEx := 0 1575 for iNdEx < l { 1576 preIndex := iNdEx 1577 var wire uint64 1578 for shift := uint(0); ; shift += 7 { 1579 if shift >= 64 { 1580 return ErrIntOverflowTx 1581 } 1582 if iNdEx >= l { 1583 return io.ErrUnexpectedEOF 1584 } 1585 b := dAtA[iNdEx] 1586 iNdEx++ 1587 wire |= uint64(b&0x7F) << shift 1588 if b < 0x80 { 1589 break 1590 } 1591 } 1592 fieldNum := int32(wire >> 3) 1593 wireType := int(wire & 0x7) 1594 if wireType == 4 { 1595 return fmt.Errorf("proto: MsgUnderwriteResponse: wiretype end group for non-group") 1596 } 1597 if fieldNum <= 0 { 1598 return fmt.Errorf("proto: MsgUnderwriteResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1599 } 1600 switch fieldNum { 1601 default: 1602 iNdEx = preIndex 1603 skippy, err := skipTx(dAtA[iNdEx:]) 1604 if err != nil { 1605 return err 1606 } 1607 if (skippy < 0) || (iNdEx+skippy) < 0 { 1608 return ErrInvalidLengthTx 1609 } 1610 if (iNdEx + skippy) > l { 1611 return io.ErrUnexpectedEOF 1612 } 1613 iNdEx += skippy 1614 } 1615 } 1616 1617 if iNdEx > l { 1618 return io.ErrUnexpectedEOF 1619 } 1620 return nil 1621 } 1622 func (m *MsgRequestRedemption) Unmarshal(dAtA []byte) error { 1623 l := len(dAtA) 1624 iNdEx := 0 1625 for iNdEx < l { 1626 preIndex := iNdEx 1627 var wire uint64 1628 for shift := uint(0); ; shift += 7 { 1629 if shift >= 64 { 1630 return ErrIntOverflowTx 1631 } 1632 if iNdEx >= l { 1633 return io.ErrUnexpectedEOF 1634 } 1635 b := dAtA[iNdEx] 1636 iNdEx++ 1637 wire |= uint64(b&0x7F) << shift 1638 if b < 0x80 { 1639 break 1640 } 1641 } 1642 fieldNum := int32(wire >> 3) 1643 wireType := int(wire & 0x7) 1644 if wireType == 4 { 1645 return fmt.Errorf("proto: MsgRequestRedemption: wiretype end group for non-group") 1646 } 1647 if fieldNum <= 0 { 1648 return fmt.Errorf("proto: MsgRequestRedemption: illegal tag %d (wire type %d)", fieldNum, wire) 1649 } 1650 switch fieldNum { 1651 case 1: 1652 if wireType != 2 { 1653 return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) 1654 } 1655 var stringLen uint64 1656 for shift := uint(0); ; shift += 7 { 1657 if shift >= 64 { 1658 return ErrIntOverflowTx 1659 } 1660 if iNdEx >= l { 1661 return io.ErrUnexpectedEOF 1662 } 1663 b := dAtA[iNdEx] 1664 iNdEx++ 1665 stringLen |= uint64(b&0x7F) << shift 1666 if b < 0x80 { 1667 break 1668 } 1669 } 1670 intStringLen := int(stringLen) 1671 if intStringLen < 0 { 1672 return ErrInvalidLengthTx 1673 } 1674 postIndex := iNdEx + intStringLen 1675 if postIndex < 0 { 1676 return ErrInvalidLengthTx 1677 } 1678 if postIndex > l { 1679 return io.ErrUnexpectedEOF 1680 } 1681 m.Sender = string(dAtA[iNdEx:postIndex]) 1682 iNdEx = postIndex 1683 case 2: 1684 if wireType != 2 { 1685 return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) 1686 } 1687 var stringLen uint64 1688 for shift := uint(0); ; shift += 7 { 1689 if shift >= 64 { 1690 return ErrIntOverflowTx 1691 } 1692 if iNdEx >= l { 1693 return io.ErrUnexpectedEOF 1694 } 1695 b := dAtA[iNdEx] 1696 iNdEx++ 1697 stringLen |= uint64(b&0x7F) << shift 1698 if b < 0x80 { 1699 break 1700 } 1701 } 1702 intStringLen := int(stringLen) 1703 if intStringLen < 0 { 1704 return ErrInvalidLengthTx 1705 } 1706 postIndex := iNdEx + intStringLen 1707 if postIndex < 0 { 1708 return ErrInvalidLengthTx 1709 } 1710 if postIndex > l { 1711 return io.ErrUnexpectedEOF 1712 } 1713 m.MarketId = string(dAtA[iNdEx:postIndex]) 1714 iNdEx = postIndex 1715 case 3: 1716 if wireType != 2 { 1717 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 1718 } 1719 var msglen int 1720 for shift := uint(0); ; shift += 7 { 1721 if shift >= 64 { 1722 return ErrIntOverflowTx 1723 } 1724 if iNdEx >= l { 1725 return io.ErrUnexpectedEOF 1726 } 1727 b := dAtA[iNdEx] 1728 iNdEx++ 1729 msglen |= int(b&0x7F) << shift 1730 if b < 0x80 { 1731 break 1732 } 1733 } 1734 if msglen < 0 { 1735 return ErrInvalidLengthTx 1736 } 1737 postIndex := iNdEx + msglen 1738 if postIndex < 0 { 1739 return ErrInvalidLengthTx 1740 } 1741 if postIndex > l { 1742 return io.ErrUnexpectedEOF 1743 } 1744 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1745 return err 1746 } 1747 iNdEx = postIndex 1748 default: 1749 iNdEx = preIndex 1750 skippy, err := skipTx(dAtA[iNdEx:]) 1751 if err != nil { 1752 return err 1753 } 1754 if (skippy < 0) || (iNdEx+skippy) < 0 { 1755 return ErrInvalidLengthTx 1756 } 1757 if (iNdEx + skippy) > l { 1758 return io.ErrUnexpectedEOF 1759 } 1760 iNdEx += skippy 1761 } 1762 } 1763 1764 if iNdEx > l { 1765 return io.ErrUnexpectedEOF 1766 } 1767 return nil 1768 } 1769 func (m *MsgRequestRedemptionResponse) Unmarshal(dAtA []byte) error { 1770 l := len(dAtA) 1771 iNdEx := 0 1772 for iNdEx < l { 1773 preIndex := iNdEx 1774 var wire uint64 1775 for shift := uint(0); ; shift += 7 { 1776 if shift >= 64 { 1777 return ErrIntOverflowTx 1778 } 1779 if iNdEx >= l { 1780 return io.ErrUnexpectedEOF 1781 } 1782 b := dAtA[iNdEx] 1783 iNdEx++ 1784 wire |= uint64(b&0x7F) << shift 1785 if b < 0x80 { 1786 break 1787 } 1788 } 1789 fieldNum := int32(wire >> 3) 1790 wireType := int(wire & 0x7) 1791 if wireType == 4 { 1792 return fmt.Errorf("proto: MsgRequestRedemptionResponse: wiretype end group for non-group") 1793 } 1794 if fieldNum <= 0 { 1795 return fmt.Errorf("proto: MsgRequestRedemptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1796 } 1797 switch fieldNum { 1798 default: 1799 iNdEx = preIndex 1800 skippy, err := skipTx(dAtA[iNdEx:]) 1801 if err != nil { 1802 return err 1803 } 1804 if (skippy < 0) || (iNdEx+skippy) < 0 { 1805 return ErrInvalidLengthTx 1806 } 1807 if (iNdEx + skippy) > l { 1808 return io.ErrUnexpectedEOF 1809 } 1810 iNdEx += skippy 1811 } 1812 } 1813 1814 if iNdEx > l { 1815 return io.ErrUnexpectedEOF 1816 } 1817 return nil 1818 } 1819 func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { 1820 l := len(dAtA) 1821 iNdEx := 0 1822 for iNdEx < l { 1823 preIndex := iNdEx 1824 var wire uint64 1825 for shift := uint(0); ; shift += 7 { 1826 if shift >= 64 { 1827 return ErrIntOverflowTx 1828 } 1829 if iNdEx >= l { 1830 return io.ErrUnexpectedEOF 1831 } 1832 b := dAtA[iNdEx] 1833 iNdEx++ 1834 wire |= uint64(b&0x7F) << shift 1835 if b < 0x80 { 1836 break 1837 } 1838 } 1839 fieldNum := int32(wire >> 3) 1840 wireType := int(wire & 0x7) 1841 if wireType == 4 { 1842 return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") 1843 } 1844 if fieldNum <= 0 { 1845 return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) 1846 } 1847 switch fieldNum { 1848 case 1: 1849 if wireType != 2 { 1850 return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) 1851 } 1852 var stringLen uint64 1853 for shift := uint(0); ; shift += 7 { 1854 if shift >= 64 { 1855 return ErrIntOverflowTx 1856 } 1857 if iNdEx >= l { 1858 return io.ErrUnexpectedEOF 1859 } 1860 b := dAtA[iNdEx] 1861 iNdEx++ 1862 stringLen |= uint64(b&0x7F) << shift 1863 if b < 0x80 { 1864 break 1865 } 1866 } 1867 intStringLen := int(stringLen) 1868 if intStringLen < 0 { 1869 return ErrInvalidLengthTx 1870 } 1871 postIndex := iNdEx + intStringLen 1872 if postIndex < 0 { 1873 return ErrInvalidLengthTx 1874 } 1875 if postIndex > l { 1876 return io.ErrUnexpectedEOF 1877 } 1878 m.Authority = string(dAtA[iNdEx:postIndex]) 1879 iNdEx = postIndex 1880 case 2: 1881 if wireType != 2 { 1882 return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) 1883 } 1884 var msglen int 1885 for shift := uint(0); ; shift += 7 { 1886 if shift >= 64 { 1887 return ErrIntOverflowTx 1888 } 1889 if iNdEx >= l { 1890 return io.ErrUnexpectedEOF 1891 } 1892 b := dAtA[iNdEx] 1893 iNdEx++ 1894 msglen |= int(b&0x7F) << shift 1895 if b < 0x80 { 1896 break 1897 } 1898 } 1899 if msglen < 0 { 1900 return ErrInvalidLengthTx 1901 } 1902 postIndex := iNdEx + msglen 1903 if postIndex < 0 { 1904 return ErrInvalidLengthTx 1905 } 1906 if postIndex > l { 1907 return io.ErrUnexpectedEOF 1908 } 1909 if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1910 return err 1911 } 1912 iNdEx = postIndex 1913 default: 1914 iNdEx = preIndex 1915 skippy, err := skipTx(dAtA[iNdEx:]) 1916 if err != nil { 1917 return err 1918 } 1919 if (skippy < 0) || (iNdEx+skippy) < 0 { 1920 return ErrInvalidLengthTx 1921 } 1922 if (iNdEx + skippy) > l { 1923 return io.ErrUnexpectedEOF 1924 } 1925 iNdEx += skippy 1926 } 1927 } 1928 1929 if iNdEx > l { 1930 return io.ErrUnexpectedEOF 1931 } 1932 return nil 1933 } 1934 func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { 1935 l := len(dAtA) 1936 iNdEx := 0 1937 for iNdEx < l { 1938 preIndex := iNdEx 1939 var wire uint64 1940 for shift := uint(0); ; shift += 7 { 1941 if shift >= 64 { 1942 return ErrIntOverflowTx 1943 } 1944 if iNdEx >= l { 1945 return io.ErrUnexpectedEOF 1946 } 1947 b := dAtA[iNdEx] 1948 iNdEx++ 1949 wire |= uint64(b&0x7F) << shift 1950 if b < 0x80 { 1951 break 1952 } 1953 } 1954 fieldNum := int32(wire >> 3) 1955 wireType := int(wire & 0x7) 1956 if wireType == 4 { 1957 return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") 1958 } 1959 if fieldNum <= 0 { 1960 return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1961 } 1962 switch fieldNum { 1963 default: 1964 iNdEx = preIndex 1965 skippy, err := skipTx(dAtA[iNdEx:]) 1966 if err != nil { 1967 return err 1968 } 1969 if (skippy < 0) || (iNdEx+skippy) < 0 { 1970 return ErrInvalidLengthTx 1971 } 1972 if (iNdEx + skippy) > l { 1973 return io.ErrUnexpectedEOF 1974 } 1975 iNdEx += skippy 1976 } 1977 } 1978 1979 if iNdEx > l { 1980 return io.ErrUnexpectedEOF 1981 } 1982 return nil 1983 } 1984 func skipTx(dAtA []byte) (n int, err error) { 1985 l := len(dAtA) 1986 iNdEx := 0 1987 depth := 0 1988 for iNdEx < l { 1989 var wire uint64 1990 for shift := uint(0); ; shift += 7 { 1991 if shift >= 64 { 1992 return 0, ErrIntOverflowTx 1993 } 1994 if iNdEx >= l { 1995 return 0, io.ErrUnexpectedEOF 1996 } 1997 b := dAtA[iNdEx] 1998 iNdEx++ 1999 wire |= (uint64(b) & 0x7F) << shift 2000 if b < 0x80 { 2001 break 2002 } 2003 } 2004 wireType := int(wire & 0x7) 2005 switch wireType { 2006 case 0: 2007 for shift := uint(0); ; shift += 7 { 2008 if shift >= 64 { 2009 return 0, ErrIntOverflowTx 2010 } 2011 if iNdEx >= l { 2012 return 0, io.ErrUnexpectedEOF 2013 } 2014 iNdEx++ 2015 if dAtA[iNdEx-1] < 0x80 { 2016 break 2017 } 2018 } 2019 case 1: 2020 iNdEx += 8 2021 case 2: 2022 var length int 2023 for shift := uint(0); ; shift += 7 { 2024 if shift >= 64 { 2025 return 0, ErrIntOverflowTx 2026 } 2027 if iNdEx >= l { 2028 return 0, io.ErrUnexpectedEOF 2029 } 2030 b := dAtA[iNdEx] 2031 iNdEx++ 2032 length |= (int(b) & 0x7F) << shift 2033 if b < 0x80 { 2034 break 2035 } 2036 } 2037 if length < 0 { 2038 return 0, ErrInvalidLengthTx 2039 } 2040 iNdEx += length 2041 case 3: 2042 depth++ 2043 case 4: 2044 if depth == 0 { 2045 return 0, ErrUnexpectedEndOfGroupTx 2046 } 2047 depth-- 2048 case 5: 2049 iNdEx += 4 2050 default: 2051 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2052 } 2053 if iNdEx < 0 { 2054 return 0, ErrInvalidLengthTx 2055 } 2056 if depth == 0 { 2057 return iNdEx, nil 2058 } 2059 } 2060 return 0, io.ErrUnexpectedEOF 2061 } 2062 2063 var ( 2064 ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") 2065 ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") 2066 ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") 2067 )