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

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: injective/insurance/v1beta1/insurance.proto
     3  
     4  package types
     5  
     6  import (
     7  	cosmossdk_io_math "cosmossdk.io/math"
     8  	fmt "fmt"
     9  	types "github.com/InjectiveLabs/sdk-go/chain/oracle/types"
    10  	types1 "github.com/cosmos/cosmos-sdk/types"
    11  	_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
    12  	_ "github.com/cosmos/gogoproto/gogoproto"
    13  	proto "github.com/cosmos/gogoproto/proto"
    14  	github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types"
    15  	_ "google.golang.org/protobuf/types/known/durationpb"
    16  	_ "google.golang.org/protobuf/types/known/timestamppb"
    17  	io "io"
    18  	math "math"
    19  	math_bits "math/bits"
    20  	time "time"
    21  )
    22  
    23  // Reference imports to suppress errors if they are not otherwise used.
    24  var _ = proto.Marshal
    25  var _ = fmt.Errorf
    26  var _ = math.Inf
    27  var _ = time.Kitchen
    28  
    29  // This is a compile-time assertion to ensure that this generated file
    30  // is compatible with the proto package it is being compiled against.
    31  // A compilation error at this line likely means your copy of the
    32  // proto package needs to be updated.
    33  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    34  
    35  type Params struct {
    36  	// default_redemption_notice_period_duration defines the default minimum
    37  	// notice period duration that must pass after an underwriter sends a
    38  	// redemption request before the underwriter can claim his tokens
    39  	DefaultRedemptionNoticePeriodDuration time.Duration `protobuf:"bytes,1,opt,name=default_redemption_notice_period_duration,json=defaultRedemptionNoticePeriodDuration,proto3,stdduration" json:"default_redemption_notice_period_duration" yaml:"default_redemption_notice_period_duration"`
    40  }
    41  
    42  func (m *Params) Reset()         { *m = Params{} }
    43  func (m *Params) String() string { return proto.CompactTextString(m) }
    44  func (*Params) ProtoMessage()    {}
    45  func (*Params) Descriptor() ([]byte, []int) {
    46  	return fileDescriptor_dbc47a7b76393948, []int{0}
    47  }
    48  func (m *Params) XXX_Unmarshal(b []byte) error {
    49  	return m.Unmarshal(b)
    50  }
    51  func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    52  	if deterministic {
    53  		return xxx_messageInfo_Params.Marshal(b, m, deterministic)
    54  	} else {
    55  		b = b[:cap(b)]
    56  		n, err := m.MarshalToSizedBuffer(b)
    57  		if err != nil {
    58  			return nil, err
    59  		}
    60  		return b[:n], nil
    61  	}
    62  }
    63  func (m *Params) XXX_Merge(src proto.Message) {
    64  	xxx_messageInfo_Params.Merge(m, src)
    65  }
    66  func (m *Params) XXX_Size() int {
    67  	return m.Size()
    68  }
    69  func (m *Params) XXX_DiscardUnknown() {
    70  	xxx_messageInfo_Params.DiscardUnknown(m)
    71  }
    72  
    73  var xxx_messageInfo_Params proto.InternalMessageInfo
    74  
    75  func (m *Params) GetDefaultRedemptionNoticePeriodDuration() time.Duration {
    76  	if m != nil {
    77  		return m.DefaultRedemptionNoticePeriodDuration
    78  	}
    79  	return 0
    80  }
    81  
    82  type InsuranceFund struct {
    83  	// deposit denomination for the given insurance fund
    84  	DepositDenom string `protobuf:"bytes,1,opt,name=deposit_denom,json=depositDenom,proto3" json:"deposit_denom,omitempty"`
    85  	// insurance fund pool token denomination for the given insurance fund
    86  	InsurancePoolTokenDenom string `protobuf:"bytes,2,opt,name=insurance_pool_token_denom,json=insurancePoolTokenDenom,proto3" json:"insurance_pool_token_denom,omitempty"`
    87  	// redemption_notice_period_duration defines the minimum notice period
    88  	// duration that must pass after an underwriter sends a redemption request
    89  	// before the underwriter can claim his tokens
    90  	RedemptionNoticePeriodDuration time.Duration `protobuf:"bytes,3,opt,name=redemption_notice_period_duration,json=redemptionNoticePeriodDuration,proto3,stdduration" json:"redemption_notice_period_duration" yaml:"redemption_notice_period_duration"`
    91  	// balance of fund
    92  	Balance cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=cosmossdk.io/math.Int" json:"balance"`
    93  	// total share tokens minted
    94  	TotalShare cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=total_share,json=totalShare,proto3,customtype=cosmossdk.io/math.Int" json:"total_share"`
    95  	// marketID of the derivative market
    96  	MarketId string `protobuf:"bytes,6,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
    97  	// ticker of the derivative market
    98  	MarketTicker string `protobuf:"bytes,7,opt,name=market_ticker,json=marketTicker,proto3" json:"market_ticker,omitempty"`
    99  	// Oracle base currency of the derivative market OR the oracle symbol for the
   100  	// binary options market.
   101  	OracleBase string `protobuf:"bytes,8,opt,name=oracle_base,json=oracleBase,proto3" json:"oracle_base,omitempty"`
   102  	// Oracle quote currency of the derivative market OR the oracle provider for
   103  	// the binary options market.
   104  	OracleQuote string `protobuf:"bytes,9,opt,name=oracle_quote,json=oracleQuote,proto3" json:"oracle_quote,omitempty"`
   105  	// Oracle type of the binary options or derivative market
   106  	OracleType types.OracleType `protobuf:"varint,10,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"`
   107  	// Expiration time of the derivative market. Should be -1 for perpetual or -2
   108  	// for binary options markets.
   109  	Expiry int64 `protobuf:"varint,11,opt,name=expiry,proto3" json:"expiry,omitempty"`
   110  }
   111  
   112  func (m *InsuranceFund) Reset()         { *m = InsuranceFund{} }
   113  func (m *InsuranceFund) String() string { return proto.CompactTextString(m) }
   114  func (*InsuranceFund) ProtoMessage()    {}
   115  func (*InsuranceFund) Descriptor() ([]byte, []int) {
   116  	return fileDescriptor_dbc47a7b76393948, []int{1}
   117  }
   118  func (m *InsuranceFund) XXX_Unmarshal(b []byte) error {
   119  	return m.Unmarshal(b)
   120  }
   121  func (m *InsuranceFund) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   122  	if deterministic {
   123  		return xxx_messageInfo_InsuranceFund.Marshal(b, m, deterministic)
   124  	} else {
   125  		b = b[:cap(b)]
   126  		n, err := m.MarshalToSizedBuffer(b)
   127  		if err != nil {
   128  			return nil, err
   129  		}
   130  		return b[:n], nil
   131  	}
   132  }
   133  func (m *InsuranceFund) XXX_Merge(src proto.Message) {
   134  	xxx_messageInfo_InsuranceFund.Merge(m, src)
   135  }
   136  func (m *InsuranceFund) XXX_Size() int {
   137  	return m.Size()
   138  }
   139  func (m *InsuranceFund) XXX_DiscardUnknown() {
   140  	xxx_messageInfo_InsuranceFund.DiscardUnknown(m)
   141  }
   142  
   143  var xxx_messageInfo_InsuranceFund proto.InternalMessageInfo
   144  
   145  func (m *InsuranceFund) GetDepositDenom() string {
   146  	if m != nil {
   147  		return m.DepositDenom
   148  	}
   149  	return ""
   150  }
   151  
   152  func (m *InsuranceFund) GetInsurancePoolTokenDenom() string {
   153  	if m != nil {
   154  		return m.InsurancePoolTokenDenom
   155  	}
   156  	return ""
   157  }
   158  
   159  func (m *InsuranceFund) GetRedemptionNoticePeriodDuration() time.Duration {
   160  	if m != nil {
   161  		return m.RedemptionNoticePeriodDuration
   162  	}
   163  	return 0
   164  }
   165  
   166  func (m *InsuranceFund) GetMarketId() string {
   167  	if m != nil {
   168  		return m.MarketId
   169  	}
   170  	return ""
   171  }
   172  
   173  func (m *InsuranceFund) GetMarketTicker() string {
   174  	if m != nil {
   175  		return m.MarketTicker
   176  	}
   177  	return ""
   178  }
   179  
   180  func (m *InsuranceFund) GetOracleBase() string {
   181  	if m != nil {
   182  		return m.OracleBase
   183  	}
   184  	return ""
   185  }
   186  
   187  func (m *InsuranceFund) GetOracleQuote() string {
   188  	if m != nil {
   189  		return m.OracleQuote
   190  	}
   191  	return ""
   192  }
   193  
   194  func (m *InsuranceFund) GetOracleType() types.OracleType {
   195  	if m != nil {
   196  		return m.OracleType
   197  	}
   198  	return types.OracleType_Unspecified
   199  }
   200  
   201  func (m *InsuranceFund) GetExpiry() int64 {
   202  	if m != nil {
   203  		return m.Expiry
   204  	}
   205  	return 0
   206  }
   207  
   208  type RedemptionSchedule struct {
   209  	// id of redemption schedule
   210  	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
   211  	// marketId of insurance fund for the redemption
   212  	MarketId string `protobuf:"bytes,2,opt,name=marketId,proto3" json:"marketId,omitempty"`
   213  	// address of the redeemer
   214  	Redeemer string `protobuf:"bytes,3,opt,name=redeemer,proto3" json:"redeemer,omitempty"`
   215  	// the time after which the redemption can be claimed
   216  	ClaimableRedemptionTime time.Time `protobuf:"bytes,4,opt,name=claimable_redemption_time,json=claimableRedemptionTime,proto3,stdtime" json:"claimable_redemption_time" yaml:"claimable_redemption_time"`
   217  	// the insurance_pool_token amount to redeem
   218  	RedemptionAmount types1.Coin `protobuf:"bytes,5,opt,name=redemption_amount,json=redemptionAmount,proto3" json:"redemption_amount"`
   219  }
   220  
   221  func (m *RedemptionSchedule) Reset()         { *m = RedemptionSchedule{} }
   222  func (m *RedemptionSchedule) String() string { return proto.CompactTextString(m) }
   223  func (*RedemptionSchedule) ProtoMessage()    {}
   224  func (*RedemptionSchedule) Descriptor() ([]byte, []int) {
   225  	return fileDescriptor_dbc47a7b76393948, []int{2}
   226  }
   227  func (m *RedemptionSchedule) XXX_Unmarshal(b []byte) error {
   228  	return m.Unmarshal(b)
   229  }
   230  func (m *RedemptionSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   231  	if deterministic {
   232  		return xxx_messageInfo_RedemptionSchedule.Marshal(b, m, deterministic)
   233  	} else {
   234  		b = b[:cap(b)]
   235  		n, err := m.MarshalToSizedBuffer(b)
   236  		if err != nil {
   237  			return nil, err
   238  		}
   239  		return b[:n], nil
   240  	}
   241  }
   242  func (m *RedemptionSchedule) XXX_Merge(src proto.Message) {
   243  	xxx_messageInfo_RedemptionSchedule.Merge(m, src)
   244  }
   245  func (m *RedemptionSchedule) XXX_Size() int {
   246  	return m.Size()
   247  }
   248  func (m *RedemptionSchedule) XXX_DiscardUnknown() {
   249  	xxx_messageInfo_RedemptionSchedule.DiscardUnknown(m)
   250  }
   251  
   252  var xxx_messageInfo_RedemptionSchedule proto.InternalMessageInfo
   253  
   254  func (m *RedemptionSchedule) GetId() uint64 {
   255  	if m != nil {
   256  		return m.Id
   257  	}
   258  	return 0
   259  }
   260  
   261  func (m *RedemptionSchedule) GetMarketId() string {
   262  	if m != nil {
   263  		return m.MarketId
   264  	}
   265  	return ""
   266  }
   267  
   268  func (m *RedemptionSchedule) GetRedeemer() string {
   269  	if m != nil {
   270  		return m.Redeemer
   271  	}
   272  	return ""
   273  }
   274  
   275  func (m *RedemptionSchedule) GetClaimableRedemptionTime() time.Time {
   276  	if m != nil {
   277  		return m.ClaimableRedemptionTime
   278  	}
   279  	return time.Time{}
   280  }
   281  
   282  func (m *RedemptionSchedule) GetRedemptionAmount() types1.Coin {
   283  	if m != nil {
   284  		return m.RedemptionAmount
   285  	}
   286  	return types1.Coin{}
   287  }
   288  
   289  func init() {
   290  	proto.RegisterType((*Params)(nil), "injective.insurance.v1beta1.Params")
   291  	proto.RegisterType((*InsuranceFund)(nil), "injective.insurance.v1beta1.InsuranceFund")
   292  	proto.RegisterType((*RedemptionSchedule)(nil), "injective.insurance.v1beta1.RedemptionSchedule")
   293  }
   294  
   295  func init() {
   296  	proto.RegisterFile("injective/insurance/v1beta1/insurance.proto", fileDescriptor_dbc47a7b76393948)
   297  }
   298  
   299  var fileDescriptor_dbc47a7b76393948 = []byte{
   300  	// 759 bytes of a gzipped FileDescriptorProto
   301  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x41, 0x6f, 0xd3, 0x48,
   302  	0x14, 0x8e, 0xd3, 0x6c, 0xda, 0x4c, 0xda, 0xaa, 0x1d, 0xed, 0x6e, 0xdd, 0x54, 0xeb, 0xa4, 0xd9,
   303  	0xad, 0x94, 0xdd, 0x05, 0x9b, 0x16, 0x24, 0xa4, 0x82, 0x90, 0x08, 0x05, 0x29, 0x52, 0x45, 0x8b,
   304  	0x9b, 0x13, 0x17, 0x6b, 0x6c, 0x4f, 0x93, 0x21, 0xb6, 0xc7, 0xd8, 0xe3, 0x8a, 0xdc, 0x39, 0x71,
   305  	0xea, 0x11, 0x71, 0xe2, 0x27, 0xd0, 0x7f, 0xd1, 0x63, 0x6f, 0x20, 0x0e, 0x05, 0xb5, 0x07, 0x38,
   306  	0x70, 0xe2, 0x17, 0xa0, 0x19, 0x8f, 0xed, 0x08, 0x04, 0xed, 0xc5, 0xf2, 0x7b, 0xef, 0x7b, 0x6f,
   307  	0xde, 0xfb, 0xde, 0x37, 0x03, 0xfe, 0x27, 0xc1, 0x13, 0xec, 0x30, 0x72, 0x80, 0x0d, 0x12, 0xc4,
   308  	0x49, 0x84, 0x02, 0x07, 0x1b, 0x07, 0xeb, 0x36, 0x66, 0x68, 0xbd, 0xf0, 0xe8, 0x61, 0x44, 0x19,
   309  	0x85, 0x2b, 0x39, 0x58, 0x2f, 0x42, 0x12, 0xdc, 0xf8, 0x7d, 0x40, 0x07, 0x54, 0xe0, 0x0c, 0xfe,
   310  	0x97, 0xa6, 0x34, 0xb4, 0x01, 0xa5, 0x03, 0x0f, 0x1b, 0xc2, 0xb2, 0x93, 0x7d, 0xc3, 0x4d, 0x22,
   311  	0xc4, 0x08, 0x0d, 0x64, 0xbc, 0xf9, 0x7d, 0x9c, 0x11, 0x1f, 0xc7, 0x0c, 0xf9, 0x61, 0x56, 0xc0,
   312  	0xa1, 0xb1, 0x4f, 0x63, 0xc3, 0x46, 0x71, 0xd1, 0x98, 0x43, 0x49, 0x56, 0x60, 0xad, 0x18, 0x80,
   313  	0x46, 0xc8, 0xf1, 0x0a, 0x50, 0x6a, 0x4a, 0xd8, 0x22, 0xf2, 0x49, 0x40, 0x0d, 0xf1, 0x4d, 0x5d,
   314  	0xed, 0xb7, 0x0a, 0xa8, 0xee, 0xa2, 0x08, 0xf9, 0x31, 0x3c, 0x52, 0xc0, 0xbf, 0x2e, 0xde, 0x47,
   315  	0x89, 0xc7, 0xac, 0x08, 0xbb, 0xd8, 0x0f, 0x79, 0x8b, 0x56, 0x40, 0x19, 0x71, 0xb0, 0x15, 0xe2,
   316  	0x88, 0x50, 0xd7, 0xca, 0x3a, 0x57, 0x95, 0x96, 0xd2, 0xa9, 0x6f, 0x2c, 0xeb, 0x69, 0xeb, 0x7a,
   317  	0xd6, 0xba, 0xbe, 0x25, 0x01, 0xdd, 0xdb, 0xc7, 0xa7, 0xcd, 0xd2, 0xd7, 0xd3, 0xe6, 0xb5, 0x31,
   318  	0xf2, 0xbd, 0xcd, 0xf6, 0xa5, 0x2b, 0xb7, 0x5f, 0x7e, 0x68, 0x2a, 0xe6, 0x9a, 0xc4, 0x9b, 0x39,
   319  	0xfc, 0xa1, 0x40, 0xef, 0x0a, 0x70, 0x76, 0xc8, 0xe6, 0xf2, 0xe7, 0xd7, 0x4d, 0xe5, 0xc5, 0xa7,
   320  	0x37, 0xff, 0x2d, 0x14, 0x8b, 0x4b, 0xc7, 0x69, 0x7f, 0xa9, 0x80, 0xb9, 0x5e, 0xe6, 0x7c, 0x90,
   321  	0x04, 0x2e, 0xfc, 0x1b, 0xcc, 0xb9, 0x38, 0xa4, 0x31, 0x61, 0x96, 0x8b, 0x03, 0xea, 0x8b, 0x19,
   322  	0x6a, 0xe6, 0xac, 0x74, 0x6e, 0x71, 0x1f, 0xbc, 0x05, 0x1a, 0x79, 0x29, 0x2b, 0xa4, 0xd4, 0xb3,
   323  	0x18, 0x1d, 0xe1, 0x40, 0x66, 0x94, 0x45, 0xc6, 0x52, 0x8e, 0xd8, 0xa5, 0xd4, 0xeb, 0xf3, 0x78,
   324  	0x9a, 0xfc, 0x4a, 0x01, 0xab, 0x17, 0x53, 0x37, 0x75, 0x11, 0x75, 0x37, 0x24, 0x75, 0x9d, 0x94,
   325  	0xba, 0x4b, 0x52, 0xa6, 0x45, 0xbf, 0xe4, 0x0a, 0xde, 0x04, 0xd3, 0x36, 0xf2, 0x78, 0xd7, 0x6a,
   326  	0x85, 0x8f, 0xd1, 0xfd, 0x8b, 0x1f, 0xf3, 0xfe, 0xb4, 0xf9, 0x47, 0xaa, 0xae, 0xd8, 0x1d, 0xe9,
   327  	0x84, 0x1a, 0x3e, 0x62, 0x43, 0xbd, 0x17, 0x30, 0x33, 0x43, 0xc3, 0x3b, 0xa0, 0xce, 0x28, 0x43,
   328  	0x9e, 0x15, 0x0f, 0x51, 0x84, 0xd5, 0xdf, 0x2e, 0x93, 0x0c, 0x44, 0xc6, 0x1e, 0x4f, 0x80, 0x2b,
   329  	0xa0, 0xe6, 0xa3, 0x68, 0x84, 0x99, 0x45, 0x5c, 0xb5, 0x2a, 0x18, 0x9c, 0x49, 0x1d, 0x3d, 0xb1,
   330  	0x14, 0x19, 0x64, 0xc4, 0x19, 0xe1, 0x48, 0x9d, 0x4e, 0x97, 0x92, 0x3a, 0xfb, 0xc2, 0x07, 0x9b,
   331  	0xa0, 0x9e, 0x0a, 0xd9, 0xe2, 0x37, 0x40, 0x9d, 0x11, 0x10, 0x90, 0xba, 0xba, 0x28, 0xc6, 0x70,
   332  	0x15, 0xcc, 0x4a, 0xc0, 0xd3, 0x84, 0x32, 0xac, 0xd6, 0x04, 0x42, 0x26, 0x3d, 0xe2, 0x2e, 0x78,
   333  	0x3f, 0xaf, 0xc1, 0xc6, 0x21, 0x56, 0x41, 0x4b, 0xe9, 0xcc, 0x6f, 0xfc, 0xa3, 0x17, 0xb7, 0x59,
   334  	0x5e, 0x15, 0x79, 0x73, 0xf4, 0x1d, 0x61, 0xf6, 0xc7, 0x21, 0xce, 0x4e, 0xe2, 0xff, 0xf0, 0x4f,
   335  	0x50, 0xc5, 0xcf, 0x42, 0x12, 0x8d, 0xd5, 0x7a, 0x4b, 0xe9, 0x4c, 0x99, 0xd2, 0x6a, 0x1f, 0x95,
   336  	0x01, 0x2c, 0xc4, 0xba, 0xe7, 0x0c, 0xb1, 0x9b, 0x78, 0x18, 0xce, 0x83, 0x32, 0x71, 0x85, 0xd0,
   337  	0x2a, 0x66, 0x99, 0xb8, 0xb0, 0x01, 0xf2, 0xd1, 0xa5, 0x98, 0x0a, 0x2a, 0x1a, 0x60, 0x86, 0xaf,
   338  	0x10, 0xfb, 0x38, 0x12, 0x1a, 0xa9, 0x99, 0xb9, 0x0d, 0x9f, 0x2b, 0x60, 0xd9, 0xf1, 0x10, 0xf1,
   339  	0x91, 0xed, 0xe1, 0xc9, 0x4b, 0xc4, 0x9f, 0x0a, 0xb1, 0xcf, 0xfa, 0x46, 0xe3, 0x07, 0x45, 0xf5,
   340  	0xb3, 0x77, 0xa4, 0x7b, 0x45, 0x4a, 0xaa, 0x95, 0x4a, 0xea, 0xa7, 0xa5, 0xda, 0x87, 0x5c, 0x4a,
   341  	0x4b, 0x79, 0xbc, 0x18, 0x89, 0xd7, 0x82, 0xdb, 0x60, 0x71, 0x22, 0x01, 0xf9, 0x34, 0x09, 0x98,
   342  	0x10, 0x04, 0xd7, 0x73, 0xaa, 0x04, 0x9d, 0xaf, 0x28, 0x67, 0xf1, 0x1e, 0x25, 0x41, 0xb7, 0xc2,
   343  	0x0f, 0x37, 0x17, 0x8a, 0xcc, 0xbb, 0x22, 0xb1, 0x4b, 0x8e, 0xcf, 0x34, 0xe5, 0xe4, 0x4c, 0x53,
   344  	0x3e, 0x9e, 0x69, 0xca, 0xe1, 0xb9, 0x56, 0x3a, 0x39, 0xd7, 0x4a, 0xef, 0xce, 0xb5, 0xd2, 0xe3,
   345  	0x9d, 0x01, 0x61, 0xc3, 0xc4, 0xd6, 0x1d, 0xea, 0x1b, 0xbd, 0x6c, 0x43, 0xdb, 0xc8, 0x8e, 0x8d,
   346  	0x7c, 0x5f, 0x57, 0x1d, 0x1a, 0xe1, 0x49, 0x73, 0x88, 0x48, 0x60, 0xf8, 0x94, 0xd3, 0x1e, 0x4f,
   347  	0xbc, 0xe3, 0x7c, 0xdb, 0xb1, 0x5d, 0x15, 0x9c, 0x5c, 0xff, 0x16, 0x00, 0x00, 0xff, 0xff, 0x4b,
   348  	0x5b, 0xe9, 0xd1, 0xeb, 0x05, 0x00, 0x00,
   349  }
   350  
   351  func (this *Params) Equal(that interface{}) bool {
   352  	if that == nil {
   353  		return this == nil
   354  	}
   355  
   356  	that1, ok := that.(*Params)
   357  	if !ok {
   358  		that2, ok := that.(Params)
   359  		if ok {
   360  			that1 = &that2
   361  		} else {
   362  			return false
   363  		}
   364  	}
   365  	if that1 == nil {
   366  		return this == nil
   367  	} else if this == nil {
   368  		return false
   369  	}
   370  	if this.DefaultRedemptionNoticePeriodDuration != that1.DefaultRedemptionNoticePeriodDuration {
   371  		return false
   372  	}
   373  	return true
   374  }
   375  func (m *Params) Marshal() (dAtA []byte, err error) {
   376  	size := m.Size()
   377  	dAtA = make([]byte, size)
   378  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   379  	if err != nil {
   380  		return nil, err
   381  	}
   382  	return dAtA[:n], nil
   383  }
   384  
   385  func (m *Params) MarshalTo(dAtA []byte) (int, error) {
   386  	size := m.Size()
   387  	return m.MarshalToSizedBuffer(dAtA[:size])
   388  }
   389  
   390  func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   391  	i := len(dAtA)
   392  	_ = i
   393  	var l int
   394  	_ = l
   395  	n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.DefaultRedemptionNoticePeriodDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.DefaultRedemptionNoticePeriodDuration):])
   396  	if err1 != nil {
   397  		return 0, err1
   398  	}
   399  	i -= n1
   400  	i = encodeVarintInsurance(dAtA, i, uint64(n1))
   401  	i--
   402  	dAtA[i] = 0xa
   403  	return len(dAtA) - i, nil
   404  }
   405  
   406  func (m *InsuranceFund) Marshal() (dAtA []byte, err error) {
   407  	size := m.Size()
   408  	dAtA = make([]byte, size)
   409  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   410  	if err != nil {
   411  		return nil, err
   412  	}
   413  	return dAtA[:n], nil
   414  }
   415  
   416  func (m *InsuranceFund) MarshalTo(dAtA []byte) (int, error) {
   417  	size := m.Size()
   418  	return m.MarshalToSizedBuffer(dAtA[:size])
   419  }
   420  
   421  func (m *InsuranceFund) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   422  	i := len(dAtA)
   423  	_ = i
   424  	var l int
   425  	_ = l
   426  	if m.Expiry != 0 {
   427  		i = encodeVarintInsurance(dAtA, i, uint64(m.Expiry))
   428  		i--
   429  		dAtA[i] = 0x58
   430  	}
   431  	if m.OracleType != 0 {
   432  		i = encodeVarintInsurance(dAtA, i, uint64(m.OracleType))
   433  		i--
   434  		dAtA[i] = 0x50
   435  	}
   436  	if len(m.OracleQuote) > 0 {
   437  		i -= len(m.OracleQuote)
   438  		copy(dAtA[i:], m.OracleQuote)
   439  		i = encodeVarintInsurance(dAtA, i, uint64(len(m.OracleQuote)))
   440  		i--
   441  		dAtA[i] = 0x4a
   442  	}
   443  	if len(m.OracleBase) > 0 {
   444  		i -= len(m.OracleBase)
   445  		copy(dAtA[i:], m.OracleBase)
   446  		i = encodeVarintInsurance(dAtA, i, uint64(len(m.OracleBase)))
   447  		i--
   448  		dAtA[i] = 0x42
   449  	}
   450  	if len(m.MarketTicker) > 0 {
   451  		i -= len(m.MarketTicker)
   452  		copy(dAtA[i:], m.MarketTicker)
   453  		i = encodeVarintInsurance(dAtA, i, uint64(len(m.MarketTicker)))
   454  		i--
   455  		dAtA[i] = 0x3a
   456  	}
   457  	if len(m.MarketId) > 0 {
   458  		i -= len(m.MarketId)
   459  		copy(dAtA[i:], m.MarketId)
   460  		i = encodeVarintInsurance(dAtA, i, uint64(len(m.MarketId)))
   461  		i--
   462  		dAtA[i] = 0x32
   463  	}
   464  	{
   465  		size := m.TotalShare.Size()
   466  		i -= size
   467  		if _, err := m.TotalShare.MarshalTo(dAtA[i:]); err != nil {
   468  			return 0, err
   469  		}
   470  		i = encodeVarintInsurance(dAtA, i, uint64(size))
   471  	}
   472  	i--
   473  	dAtA[i] = 0x2a
   474  	{
   475  		size := m.Balance.Size()
   476  		i -= size
   477  		if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil {
   478  			return 0, err
   479  		}
   480  		i = encodeVarintInsurance(dAtA, i, uint64(size))
   481  	}
   482  	i--
   483  	dAtA[i] = 0x22
   484  	n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.RedemptionNoticePeriodDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.RedemptionNoticePeriodDuration):])
   485  	if err2 != nil {
   486  		return 0, err2
   487  	}
   488  	i -= n2
   489  	i = encodeVarintInsurance(dAtA, i, uint64(n2))
   490  	i--
   491  	dAtA[i] = 0x1a
   492  	if len(m.InsurancePoolTokenDenom) > 0 {
   493  		i -= len(m.InsurancePoolTokenDenom)
   494  		copy(dAtA[i:], m.InsurancePoolTokenDenom)
   495  		i = encodeVarintInsurance(dAtA, i, uint64(len(m.InsurancePoolTokenDenom)))
   496  		i--
   497  		dAtA[i] = 0x12
   498  	}
   499  	if len(m.DepositDenom) > 0 {
   500  		i -= len(m.DepositDenom)
   501  		copy(dAtA[i:], m.DepositDenom)
   502  		i = encodeVarintInsurance(dAtA, i, uint64(len(m.DepositDenom)))
   503  		i--
   504  		dAtA[i] = 0xa
   505  	}
   506  	return len(dAtA) - i, nil
   507  }
   508  
   509  func (m *RedemptionSchedule) Marshal() (dAtA []byte, err error) {
   510  	size := m.Size()
   511  	dAtA = make([]byte, size)
   512  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   513  	if err != nil {
   514  		return nil, err
   515  	}
   516  	return dAtA[:n], nil
   517  }
   518  
   519  func (m *RedemptionSchedule) MarshalTo(dAtA []byte) (int, error) {
   520  	size := m.Size()
   521  	return m.MarshalToSizedBuffer(dAtA[:size])
   522  }
   523  
   524  func (m *RedemptionSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   525  	i := len(dAtA)
   526  	_ = i
   527  	var l int
   528  	_ = l
   529  	{
   530  		size, err := m.RedemptionAmount.MarshalToSizedBuffer(dAtA[:i])
   531  		if err != nil {
   532  			return 0, err
   533  		}
   534  		i -= size
   535  		i = encodeVarintInsurance(dAtA, i, uint64(size))
   536  	}
   537  	i--
   538  	dAtA[i] = 0x2a
   539  	n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ClaimableRedemptionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ClaimableRedemptionTime):])
   540  	if err4 != nil {
   541  		return 0, err4
   542  	}
   543  	i -= n4
   544  	i = encodeVarintInsurance(dAtA, i, uint64(n4))
   545  	i--
   546  	dAtA[i] = 0x22
   547  	if len(m.Redeemer) > 0 {
   548  		i -= len(m.Redeemer)
   549  		copy(dAtA[i:], m.Redeemer)
   550  		i = encodeVarintInsurance(dAtA, i, uint64(len(m.Redeemer)))
   551  		i--
   552  		dAtA[i] = 0x1a
   553  	}
   554  	if len(m.MarketId) > 0 {
   555  		i -= len(m.MarketId)
   556  		copy(dAtA[i:], m.MarketId)
   557  		i = encodeVarintInsurance(dAtA, i, uint64(len(m.MarketId)))
   558  		i--
   559  		dAtA[i] = 0x12
   560  	}
   561  	if m.Id != 0 {
   562  		i = encodeVarintInsurance(dAtA, i, uint64(m.Id))
   563  		i--
   564  		dAtA[i] = 0x8
   565  	}
   566  	return len(dAtA) - i, nil
   567  }
   568  
   569  func encodeVarintInsurance(dAtA []byte, offset int, v uint64) int {
   570  	offset -= sovInsurance(v)
   571  	base := offset
   572  	for v >= 1<<7 {
   573  		dAtA[offset] = uint8(v&0x7f | 0x80)
   574  		v >>= 7
   575  		offset++
   576  	}
   577  	dAtA[offset] = uint8(v)
   578  	return base
   579  }
   580  func (m *Params) Size() (n int) {
   581  	if m == nil {
   582  		return 0
   583  	}
   584  	var l int
   585  	_ = l
   586  	l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.DefaultRedemptionNoticePeriodDuration)
   587  	n += 1 + l + sovInsurance(uint64(l))
   588  	return n
   589  }
   590  
   591  func (m *InsuranceFund) Size() (n int) {
   592  	if m == nil {
   593  		return 0
   594  	}
   595  	var l int
   596  	_ = l
   597  	l = len(m.DepositDenom)
   598  	if l > 0 {
   599  		n += 1 + l + sovInsurance(uint64(l))
   600  	}
   601  	l = len(m.InsurancePoolTokenDenom)
   602  	if l > 0 {
   603  		n += 1 + l + sovInsurance(uint64(l))
   604  	}
   605  	l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.RedemptionNoticePeriodDuration)
   606  	n += 1 + l + sovInsurance(uint64(l))
   607  	l = m.Balance.Size()
   608  	n += 1 + l + sovInsurance(uint64(l))
   609  	l = m.TotalShare.Size()
   610  	n += 1 + l + sovInsurance(uint64(l))
   611  	l = len(m.MarketId)
   612  	if l > 0 {
   613  		n += 1 + l + sovInsurance(uint64(l))
   614  	}
   615  	l = len(m.MarketTicker)
   616  	if l > 0 {
   617  		n += 1 + l + sovInsurance(uint64(l))
   618  	}
   619  	l = len(m.OracleBase)
   620  	if l > 0 {
   621  		n += 1 + l + sovInsurance(uint64(l))
   622  	}
   623  	l = len(m.OracleQuote)
   624  	if l > 0 {
   625  		n += 1 + l + sovInsurance(uint64(l))
   626  	}
   627  	if m.OracleType != 0 {
   628  		n += 1 + sovInsurance(uint64(m.OracleType))
   629  	}
   630  	if m.Expiry != 0 {
   631  		n += 1 + sovInsurance(uint64(m.Expiry))
   632  	}
   633  	return n
   634  }
   635  
   636  func (m *RedemptionSchedule) Size() (n int) {
   637  	if m == nil {
   638  		return 0
   639  	}
   640  	var l int
   641  	_ = l
   642  	if m.Id != 0 {
   643  		n += 1 + sovInsurance(uint64(m.Id))
   644  	}
   645  	l = len(m.MarketId)
   646  	if l > 0 {
   647  		n += 1 + l + sovInsurance(uint64(l))
   648  	}
   649  	l = len(m.Redeemer)
   650  	if l > 0 {
   651  		n += 1 + l + sovInsurance(uint64(l))
   652  	}
   653  	l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ClaimableRedemptionTime)
   654  	n += 1 + l + sovInsurance(uint64(l))
   655  	l = m.RedemptionAmount.Size()
   656  	n += 1 + l + sovInsurance(uint64(l))
   657  	return n
   658  }
   659  
   660  func sovInsurance(x uint64) (n int) {
   661  	return (math_bits.Len64(x|1) + 6) / 7
   662  }
   663  func sozInsurance(x uint64) (n int) {
   664  	return sovInsurance(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   665  }
   666  func (m *Params) Unmarshal(dAtA []byte) error {
   667  	l := len(dAtA)
   668  	iNdEx := 0
   669  	for iNdEx < l {
   670  		preIndex := iNdEx
   671  		var wire uint64
   672  		for shift := uint(0); ; shift += 7 {
   673  			if shift >= 64 {
   674  				return ErrIntOverflowInsurance
   675  			}
   676  			if iNdEx >= l {
   677  				return io.ErrUnexpectedEOF
   678  			}
   679  			b := dAtA[iNdEx]
   680  			iNdEx++
   681  			wire |= uint64(b&0x7F) << shift
   682  			if b < 0x80 {
   683  				break
   684  			}
   685  		}
   686  		fieldNum := int32(wire >> 3)
   687  		wireType := int(wire & 0x7)
   688  		if wireType == 4 {
   689  			return fmt.Errorf("proto: Params: wiretype end group for non-group")
   690  		}
   691  		if fieldNum <= 0 {
   692  			return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
   693  		}
   694  		switch fieldNum {
   695  		case 1:
   696  			if wireType != 2 {
   697  				return fmt.Errorf("proto: wrong wireType = %d for field DefaultRedemptionNoticePeriodDuration", wireType)
   698  			}
   699  			var msglen int
   700  			for shift := uint(0); ; shift += 7 {
   701  				if shift >= 64 {
   702  					return ErrIntOverflowInsurance
   703  				}
   704  				if iNdEx >= l {
   705  					return io.ErrUnexpectedEOF
   706  				}
   707  				b := dAtA[iNdEx]
   708  				iNdEx++
   709  				msglen |= int(b&0x7F) << shift
   710  				if b < 0x80 {
   711  					break
   712  				}
   713  			}
   714  			if msglen < 0 {
   715  				return ErrInvalidLengthInsurance
   716  			}
   717  			postIndex := iNdEx + msglen
   718  			if postIndex < 0 {
   719  				return ErrInvalidLengthInsurance
   720  			}
   721  			if postIndex > l {
   722  				return io.ErrUnexpectedEOF
   723  			}
   724  			if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.DefaultRedemptionNoticePeriodDuration, dAtA[iNdEx:postIndex]); err != nil {
   725  				return err
   726  			}
   727  			iNdEx = postIndex
   728  		default:
   729  			iNdEx = preIndex
   730  			skippy, err := skipInsurance(dAtA[iNdEx:])
   731  			if err != nil {
   732  				return err
   733  			}
   734  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   735  				return ErrInvalidLengthInsurance
   736  			}
   737  			if (iNdEx + skippy) > l {
   738  				return io.ErrUnexpectedEOF
   739  			}
   740  			iNdEx += skippy
   741  		}
   742  	}
   743  
   744  	if iNdEx > l {
   745  		return io.ErrUnexpectedEOF
   746  	}
   747  	return nil
   748  }
   749  func (m *InsuranceFund) Unmarshal(dAtA []byte) error {
   750  	l := len(dAtA)
   751  	iNdEx := 0
   752  	for iNdEx < l {
   753  		preIndex := iNdEx
   754  		var wire uint64
   755  		for shift := uint(0); ; shift += 7 {
   756  			if shift >= 64 {
   757  				return ErrIntOverflowInsurance
   758  			}
   759  			if iNdEx >= l {
   760  				return io.ErrUnexpectedEOF
   761  			}
   762  			b := dAtA[iNdEx]
   763  			iNdEx++
   764  			wire |= uint64(b&0x7F) << shift
   765  			if b < 0x80 {
   766  				break
   767  			}
   768  		}
   769  		fieldNum := int32(wire >> 3)
   770  		wireType := int(wire & 0x7)
   771  		if wireType == 4 {
   772  			return fmt.Errorf("proto: InsuranceFund: wiretype end group for non-group")
   773  		}
   774  		if fieldNum <= 0 {
   775  			return fmt.Errorf("proto: InsuranceFund: illegal tag %d (wire type %d)", fieldNum, wire)
   776  		}
   777  		switch fieldNum {
   778  		case 1:
   779  			if wireType != 2 {
   780  				return fmt.Errorf("proto: wrong wireType = %d for field DepositDenom", wireType)
   781  			}
   782  			var stringLen uint64
   783  			for shift := uint(0); ; shift += 7 {
   784  				if shift >= 64 {
   785  					return ErrIntOverflowInsurance
   786  				}
   787  				if iNdEx >= l {
   788  					return io.ErrUnexpectedEOF
   789  				}
   790  				b := dAtA[iNdEx]
   791  				iNdEx++
   792  				stringLen |= uint64(b&0x7F) << shift
   793  				if b < 0x80 {
   794  					break
   795  				}
   796  			}
   797  			intStringLen := int(stringLen)
   798  			if intStringLen < 0 {
   799  				return ErrInvalidLengthInsurance
   800  			}
   801  			postIndex := iNdEx + intStringLen
   802  			if postIndex < 0 {
   803  				return ErrInvalidLengthInsurance
   804  			}
   805  			if postIndex > l {
   806  				return io.ErrUnexpectedEOF
   807  			}
   808  			m.DepositDenom = string(dAtA[iNdEx:postIndex])
   809  			iNdEx = postIndex
   810  		case 2:
   811  			if wireType != 2 {
   812  				return fmt.Errorf("proto: wrong wireType = %d for field InsurancePoolTokenDenom", wireType)
   813  			}
   814  			var stringLen uint64
   815  			for shift := uint(0); ; shift += 7 {
   816  				if shift >= 64 {
   817  					return ErrIntOverflowInsurance
   818  				}
   819  				if iNdEx >= l {
   820  					return io.ErrUnexpectedEOF
   821  				}
   822  				b := dAtA[iNdEx]
   823  				iNdEx++
   824  				stringLen |= uint64(b&0x7F) << shift
   825  				if b < 0x80 {
   826  					break
   827  				}
   828  			}
   829  			intStringLen := int(stringLen)
   830  			if intStringLen < 0 {
   831  				return ErrInvalidLengthInsurance
   832  			}
   833  			postIndex := iNdEx + intStringLen
   834  			if postIndex < 0 {
   835  				return ErrInvalidLengthInsurance
   836  			}
   837  			if postIndex > l {
   838  				return io.ErrUnexpectedEOF
   839  			}
   840  			m.InsurancePoolTokenDenom = string(dAtA[iNdEx:postIndex])
   841  			iNdEx = postIndex
   842  		case 3:
   843  			if wireType != 2 {
   844  				return fmt.Errorf("proto: wrong wireType = %d for field RedemptionNoticePeriodDuration", wireType)
   845  			}
   846  			var msglen int
   847  			for shift := uint(0); ; shift += 7 {
   848  				if shift >= 64 {
   849  					return ErrIntOverflowInsurance
   850  				}
   851  				if iNdEx >= l {
   852  					return io.ErrUnexpectedEOF
   853  				}
   854  				b := dAtA[iNdEx]
   855  				iNdEx++
   856  				msglen |= int(b&0x7F) << shift
   857  				if b < 0x80 {
   858  					break
   859  				}
   860  			}
   861  			if msglen < 0 {
   862  				return ErrInvalidLengthInsurance
   863  			}
   864  			postIndex := iNdEx + msglen
   865  			if postIndex < 0 {
   866  				return ErrInvalidLengthInsurance
   867  			}
   868  			if postIndex > l {
   869  				return io.ErrUnexpectedEOF
   870  			}
   871  			if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.RedemptionNoticePeriodDuration, dAtA[iNdEx:postIndex]); err != nil {
   872  				return err
   873  			}
   874  			iNdEx = postIndex
   875  		case 4:
   876  			if wireType != 2 {
   877  				return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType)
   878  			}
   879  			var stringLen uint64
   880  			for shift := uint(0); ; shift += 7 {
   881  				if shift >= 64 {
   882  					return ErrIntOverflowInsurance
   883  				}
   884  				if iNdEx >= l {
   885  					return io.ErrUnexpectedEOF
   886  				}
   887  				b := dAtA[iNdEx]
   888  				iNdEx++
   889  				stringLen |= uint64(b&0x7F) << shift
   890  				if b < 0x80 {
   891  					break
   892  				}
   893  			}
   894  			intStringLen := int(stringLen)
   895  			if intStringLen < 0 {
   896  				return ErrInvalidLengthInsurance
   897  			}
   898  			postIndex := iNdEx + intStringLen
   899  			if postIndex < 0 {
   900  				return ErrInvalidLengthInsurance
   901  			}
   902  			if postIndex > l {
   903  				return io.ErrUnexpectedEOF
   904  			}
   905  			if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   906  				return err
   907  			}
   908  			iNdEx = postIndex
   909  		case 5:
   910  			if wireType != 2 {
   911  				return fmt.Errorf("proto: wrong wireType = %d for field TotalShare", wireType)
   912  			}
   913  			var stringLen uint64
   914  			for shift := uint(0); ; shift += 7 {
   915  				if shift >= 64 {
   916  					return ErrIntOverflowInsurance
   917  				}
   918  				if iNdEx >= l {
   919  					return io.ErrUnexpectedEOF
   920  				}
   921  				b := dAtA[iNdEx]
   922  				iNdEx++
   923  				stringLen |= uint64(b&0x7F) << shift
   924  				if b < 0x80 {
   925  					break
   926  				}
   927  			}
   928  			intStringLen := int(stringLen)
   929  			if intStringLen < 0 {
   930  				return ErrInvalidLengthInsurance
   931  			}
   932  			postIndex := iNdEx + intStringLen
   933  			if postIndex < 0 {
   934  				return ErrInvalidLengthInsurance
   935  			}
   936  			if postIndex > l {
   937  				return io.ErrUnexpectedEOF
   938  			}
   939  			if err := m.TotalShare.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   940  				return err
   941  			}
   942  			iNdEx = postIndex
   943  		case 6:
   944  			if wireType != 2 {
   945  				return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType)
   946  			}
   947  			var stringLen uint64
   948  			for shift := uint(0); ; shift += 7 {
   949  				if shift >= 64 {
   950  					return ErrIntOverflowInsurance
   951  				}
   952  				if iNdEx >= l {
   953  					return io.ErrUnexpectedEOF
   954  				}
   955  				b := dAtA[iNdEx]
   956  				iNdEx++
   957  				stringLen |= uint64(b&0x7F) << shift
   958  				if b < 0x80 {
   959  					break
   960  				}
   961  			}
   962  			intStringLen := int(stringLen)
   963  			if intStringLen < 0 {
   964  				return ErrInvalidLengthInsurance
   965  			}
   966  			postIndex := iNdEx + intStringLen
   967  			if postIndex < 0 {
   968  				return ErrInvalidLengthInsurance
   969  			}
   970  			if postIndex > l {
   971  				return io.ErrUnexpectedEOF
   972  			}
   973  			m.MarketId = string(dAtA[iNdEx:postIndex])
   974  			iNdEx = postIndex
   975  		case 7:
   976  			if wireType != 2 {
   977  				return fmt.Errorf("proto: wrong wireType = %d for field MarketTicker", wireType)
   978  			}
   979  			var stringLen uint64
   980  			for shift := uint(0); ; shift += 7 {
   981  				if shift >= 64 {
   982  					return ErrIntOverflowInsurance
   983  				}
   984  				if iNdEx >= l {
   985  					return io.ErrUnexpectedEOF
   986  				}
   987  				b := dAtA[iNdEx]
   988  				iNdEx++
   989  				stringLen |= uint64(b&0x7F) << shift
   990  				if b < 0x80 {
   991  					break
   992  				}
   993  			}
   994  			intStringLen := int(stringLen)
   995  			if intStringLen < 0 {
   996  				return ErrInvalidLengthInsurance
   997  			}
   998  			postIndex := iNdEx + intStringLen
   999  			if postIndex < 0 {
  1000  				return ErrInvalidLengthInsurance
  1001  			}
  1002  			if postIndex > l {
  1003  				return io.ErrUnexpectedEOF
  1004  			}
  1005  			m.MarketTicker = string(dAtA[iNdEx:postIndex])
  1006  			iNdEx = postIndex
  1007  		case 8:
  1008  			if wireType != 2 {
  1009  				return fmt.Errorf("proto: wrong wireType = %d for field OracleBase", wireType)
  1010  			}
  1011  			var stringLen uint64
  1012  			for shift := uint(0); ; shift += 7 {
  1013  				if shift >= 64 {
  1014  					return ErrIntOverflowInsurance
  1015  				}
  1016  				if iNdEx >= l {
  1017  					return io.ErrUnexpectedEOF
  1018  				}
  1019  				b := dAtA[iNdEx]
  1020  				iNdEx++
  1021  				stringLen |= uint64(b&0x7F) << shift
  1022  				if b < 0x80 {
  1023  					break
  1024  				}
  1025  			}
  1026  			intStringLen := int(stringLen)
  1027  			if intStringLen < 0 {
  1028  				return ErrInvalidLengthInsurance
  1029  			}
  1030  			postIndex := iNdEx + intStringLen
  1031  			if postIndex < 0 {
  1032  				return ErrInvalidLengthInsurance
  1033  			}
  1034  			if postIndex > l {
  1035  				return io.ErrUnexpectedEOF
  1036  			}
  1037  			m.OracleBase = string(dAtA[iNdEx:postIndex])
  1038  			iNdEx = postIndex
  1039  		case 9:
  1040  			if wireType != 2 {
  1041  				return fmt.Errorf("proto: wrong wireType = %d for field OracleQuote", wireType)
  1042  			}
  1043  			var stringLen uint64
  1044  			for shift := uint(0); ; shift += 7 {
  1045  				if shift >= 64 {
  1046  					return ErrIntOverflowInsurance
  1047  				}
  1048  				if iNdEx >= l {
  1049  					return io.ErrUnexpectedEOF
  1050  				}
  1051  				b := dAtA[iNdEx]
  1052  				iNdEx++
  1053  				stringLen |= uint64(b&0x7F) << shift
  1054  				if b < 0x80 {
  1055  					break
  1056  				}
  1057  			}
  1058  			intStringLen := int(stringLen)
  1059  			if intStringLen < 0 {
  1060  				return ErrInvalidLengthInsurance
  1061  			}
  1062  			postIndex := iNdEx + intStringLen
  1063  			if postIndex < 0 {
  1064  				return ErrInvalidLengthInsurance
  1065  			}
  1066  			if postIndex > l {
  1067  				return io.ErrUnexpectedEOF
  1068  			}
  1069  			m.OracleQuote = string(dAtA[iNdEx:postIndex])
  1070  			iNdEx = postIndex
  1071  		case 10:
  1072  			if wireType != 0 {
  1073  				return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType)
  1074  			}
  1075  			m.OracleType = 0
  1076  			for shift := uint(0); ; shift += 7 {
  1077  				if shift >= 64 {
  1078  					return ErrIntOverflowInsurance
  1079  				}
  1080  				if iNdEx >= l {
  1081  					return io.ErrUnexpectedEOF
  1082  				}
  1083  				b := dAtA[iNdEx]
  1084  				iNdEx++
  1085  				m.OracleType |= types.OracleType(b&0x7F) << shift
  1086  				if b < 0x80 {
  1087  					break
  1088  				}
  1089  			}
  1090  		case 11:
  1091  			if wireType != 0 {
  1092  				return fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType)
  1093  			}
  1094  			m.Expiry = 0
  1095  			for shift := uint(0); ; shift += 7 {
  1096  				if shift >= 64 {
  1097  					return ErrIntOverflowInsurance
  1098  				}
  1099  				if iNdEx >= l {
  1100  					return io.ErrUnexpectedEOF
  1101  				}
  1102  				b := dAtA[iNdEx]
  1103  				iNdEx++
  1104  				m.Expiry |= int64(b&0x7F) << shift
  1105  				if b < 0x80 {
  1106  					break
  1107  				}
  1108  			}
  1109  		default:
  1110  			iNdEx = preIndex
  1111  			skippy, err := skipInsurance(dAtA[iNdEx:])
  1112  			if err != nil {
  1113  				return err
  1114  			}
  1115  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1116  				return ErrInvalidLengthInsurance
  1117  			}
  1118  			if (iNdEx + skippy) > l {
  1119  				return io.ErrUnexpectedEOF
  1120  			}
  1121  			iNdEx += skippy
  1122  		}
  1123  	}
  1124  
  1125  	if iNdEx > l {
  1126  		return io.ErrUnexpectedEOF
  1127  	}
  1128  	return nil
  1129  }
  1130  func (m *RedemptionSchedule) Unmarshal(dAtA []byte) error {
  1131  	l := len(dAtA)
  1132  	iNdEx := 0
  1133  	for iNdEx < l {
  1134  		preIndex := iNdEx
  1135  		var wire uint64
  1136  		for shift := uint(0); ; shift += 7 {
  1137  			if shift >= 64 {
  1138  				return ErrIntOverflowInsurance
  1139  			}
  1140  			if iNdEx >= l {
  1141  				return io.ErrUnexpectedEOF
  1142  			}
  1143  			b := dAtA[iNdEx]
  1144  			iNdEx++
  1145  			wire |= uint64(b&0x7F) << shift
  1146  			if b < 0x80 {
  1147  				break
  1148  			}
  1149  		}
  1150  		fieldNum := int32(wire >> 3)
  1151  		wireType := int(wire & 0x7)
  1152  		if wireType == 4 {
  1153  			return fmt.Errorf("proto: RedemptionSchedule: wiretype end group for non-group")
  1154  		}
  1155  		if fieldNum <= 0 {
  1156  			return fmt.Errorf("proto: RedemptionSchedule: illegal tag %d (wire type %d)", fieldNum, wire)
  1157  		}
  1158  		switch fieldNum {
  1159  		case 1:
  1160  			if wireType != 0 {
  1161  				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
  1162  			}
  1163  			m.Id = 0
  1164  			for shift := uint(0); ; shift += 7 {
  1165  				if shift >= 64 {
  1166  					return ErrIntOverflowInsurance
  1167  				}
  1168  				if iNdEx >= l {
  1169  					return io.ErrUnexpectedEOF
  1170  				}
  1171  				b := dAtA[iNdEx]
  1172  				iNdEx++
  1173  				m.Id |= uint64(b&0x7F) << shift
  1174  				if b < 0x80 {
  1175  					break
  1176  				}
  1177  			}
  1178  		case 2:
  1179  			if wireType != 2 {
  1180  				return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType)
  1181  			}
  1182  			var stringLen uint64
  1183  			for shift := uint(0); ; shift += 7 {
  1184  				if shift >= 64 {
  1185  					return ErrIntOverflowInsurance
  1186  				}
  1187  				if iNdEx >= l {
  1188  					return io.ErrUnexpectedEOF
  1189  				}
  1190  				b := dAtA[iNdEx]
  1191  				iNdEx++
  1192  				stringLen |= uint64(b&0x7F) << shift
  1193  				if b < 0x80 {
  1194  					break
  1195  				}
  1196  			}
  1197  			intStringLen := int(stringLen)
  1198  			if intStringLen < 0 {
  1199  				return ErrInvalidLengthInsurance
  1200  			}
  1201  			postIndex := iNdEx + intStringLen
  1202  			if postIndex < 0 {
  1203  				return ErrInvalidLengthInsurance
  1204  			}
  1205  			if postIndex > l {
  1206  				return io.ErrUnexpectedEOF
  1207  			}
  1208  			m.MarketId = string(dAtA[iNdEx:postIndex])
  1209  			iNdEx = postIndex
  1210  		case 3:
  1211  			if wireType != 2 {
  1212  				return fmt.Errorf("proto: wrong wireType = %d for field Redeemer", wireType)
  1213  			}
  1214  			var stringLen uint64
  1215  			for shift := uint(0); ; shift += 7 {
  1216  				if shift >= 64 {
  1217  					return ErrIntOverflowInsurance
  1218  				}
  1219  				if iNdEx >= l {
  1220  					return io.ErrUnexpectedEOF
  1221  				}
  1222  				b := dAtA[iNdEx]
  1223  				iNdEx++
  1224  				stringLen |= uint64(b&0x7F) << shift
  1225  				if b < 0x80 {
  1226  					break
  1227  				}
  1228  			}
  1229  			intStringLen := int(stringLen)
  1230  			if intStringLen < 0 {
  1231  				return ErrInvalidLengthInsurance
  1232  			}
  1233  			postIndex := iNdEx + intStringLen
  1234  			if postIndex < 0 {
  1235  				return ErrInvalidLengthInsurance
  1236  			}
  1237  			if postIndex > l {
  1238  				return io.ErrUnexpectedEOF
  1239  			}
  1240  			m.Redeemer = string(dAtA[iNdEx:postIndex])
  1241  			iNdEx = postIndex
  1242  		case 4:
  1243  			if wireType != 2 {
  1244  				return fmt.Errorf("proto: wrong wireType = %d for field ClaimableRedemptionTime", wireType)
  1245  			}
  1246  			var msglen int
  1247  			for shift := uint(0); ; shift += 7 {
  1248  				if shift >= 64 {
  1249  					return ErrIntOverflowInsurance
  1250  				}
  1251  				if iNdEx >= l {
  1252  					return io.ErrUnexpectedEOF
  1253  				}
  1254  				b := dAtA[iNdEx]
  1255  				iNdEx++
  1256  				msglen |= int(b&0x7F) << shift
  1257  				if b < 0x80 {
  1258  					break
  1259  				}
  1260  			}
  1261  			if msglen < 0 {
  1262  				return ErrInvalidLengthInsurance
  1263  			}
  1264  			postIndex := iNdEx + msglen
  1265  			if postIndex < 0 {
  1266  				return ErrInvalidLengthInsurance
  1267  			}
  1268  			if postIndex > l {
  1269  				return io.ErrUnexpectedEOF
  1270  			}
  1271  			if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.ClaimableRedemptionTime, dAtA[iNdEx:postIndex]); err != nil {
  1272  				return err
  1273  			}
  1274  			iNdEx = postIndex
  1275  		case 5:
  1276  			if wireType != 2 {
  1277  				return fmt.Errorf("proto: wrong wireType = %d for field RedemptionAmount", wireType)
  1278  			}
  1279  			var msglen int
  1280  			for shift := uint(0); ; shift += 7 {
  1281  				if shift >= 64 {
  1282  					return ErrIntOverflowInsurance
  1283  				}
  1284  				if iNdEx >= l {
  1285  					return io.ErrUnexpectedEOF
  1286  				}
  1287  				b := dAtA[iNdEx]
  1288  				iNdEx++
  1289  				msglen |= int(b&0x7F) << shift
  1290  				if b < 0x80 {
  1291  					break
  1292  				}
  1293  			}
  1294  			if msglen < 0 {
  1295  				return ErrInvalidLengthInsurance
  1296  			}
  1297  			postIndex := iNdEx + msglen
  1298  			if postIndex < 0 {
  1299  				return ErrInvalidLengthInsurance
  1300  			}
  1301  			if postIndex > l {
  1302  				return io.ErrUnexpectedEOF
  1303  			}
  1304  			if err := m.RedemptionAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1305  				return err
  1306  			}
  1307  			iNdEx = postIndex
  1308  		default:
  1309  			iNdEx = preIndex
  1310  			skippy, err := skipInsurance(dAtA[iNdEx:])
  1311  			if err != nil {
  1312  				return err
  1313  			}
  1314  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1315  				return ErrInvalidLengthInsurance
  1316  			}
  1317  			if (iNdEx + skippy) > l {
  1318  				return io.ErrUnexpectedEOF
  1319  			}
  1320  			iNdEx += skippy
  1321  		}
  1322  	}
  1323  
  1324  	if iNdEx > l {
  1325  		return io.ErrUnexpectedEOF
  1326  	}
  1327  	return nil
  1328  }
  1329  func skipInsurance(dAtA []byte) (n int, err error) {
  1330  	l := len(dAtA)
  1331  	iNdEx := 0
  1332  	depth := 0
  1333  	for iNdEx < l {
  1334  		var wire uint64
  1335  		for shift := uint(0); ; shift += 7 {
  1336  			if shift >= 64 {
  1337  				return 0, ErrIntOverflowInsurance
  1338  			}
  1339  			if iNdEx >= l {
  1340  				return 0, io.ErrUnexpectedEOF
  1341  			}
  1342  			b := dAtA[iNdEx]
  1343  			iNdEx++
  1344  			wire |= (uint64(b) & 0x7F) << shift
  1345  			if b < 0x80 {
  1346  				break
  1347  			}
  1348  		}
  1349  		wireType := int(wire & 0x7)
  1350  		switch wireType {
  1351  		case 0:
  1352  			for shift := uint(0); ; shift += 7 {
  1353  				if shift >= 64 {
  1354  					return 0, ErrIntOverflowInsurance
  1355  				}
  1356  				if iNdEx >= l {
  1357  					return 0, io.ErrUnexpectedEOF
  1358  				}
  1359  				iNdEx++
  1360  				if dAtA[iNdEx-1] < 0x80 {
  1361  					break
  1362  				}
  1363  			}
  1364  		case 1:
  1365  			iNdEx += 8
  1366  		case 2:
  1367  			var length int
  1368  			for shift := uint(0); ; shift += 7 {
  1369  				if shift >= 64 {
  1370  					return 0, ErrIntOverflowInsurance
  1371  				}
  1372  				if iNdEx >= l {
  1373  					return 0, io.ErrUnexpectedEOF
  1374  				}
  1375  				b := dAtA[iNdEx]
  1376  				iNdEx++
  1377  				length |= (int(b) & 0x7F) << shift
  1378  				if b < 0x80 {
  1379  					break
  1380  				}
  1381  			}
  1382  			if length < 0 {
  1383  				return 0, ErrInvalidLengthInsurance
  1384  			}
  1385  			iNdEx += length
  1386  		case 3:
  1387  			depth++
  1388  		case 4:
  1389  			if depth == 0 {
  1390  				return 0, ErrUnexpectedEndOfGroupInsurance
  1391  			}
  1392  			depth--
  1393  		case 5:
  1394  			iNdEx += 4
  1395  		default:
  1396  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1397  		}
  1398  		if iNdEx < 0 {
  1399  			return 0, ErrInvalidLengthInsurance
  1400  		}
  1401  		if depth == 0 {
  1402  			return iNdEx, nil
  1403  		}
  1404  	}
  1405  	return 0, io.ErrUnexpectedEOF
  1406  }
  1407  
  1408  var (
  1409  	ErrInvalidLengthInsurance        = fmt.Errorf("proto: negative length found during unmarshaling")
  1410  	ErrIntOverflowInsurance          = fmt.Errorf("proto: integer overflow")
  1411  	ErrUnexpectedEndOfGroupInsurance = fmt.Errorf("proto: unexpected end of group")
  1412  )