From 70fd43feb4b44156761a47d83d77feceb1c40f78 Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Sat, 21 Feb 2026 23:59:04 +0530 Subject: [PATCH 1/3] feat: Add oracle module --- .DS_Store | Bin 0 -> 10244 bytes api/multisig/module/v1/module.pulsar.go | 35 +- api/multisig/v1/genesis.pulsar.go | 21 +- api/multisig/v1/query.pulsar.go | 21 +- api/multisig/v1/state.pulsar.go | 21 +- api/multisig/v1/tx.pulsar.go | 21 +- api/oracle/module/v1/module.pulsar.go | 501 + api/oracle/v1/abci.pulsar.go | 1345 ++ api/oracle/v1/events.pulsar.go | 1201 ++ api/oracle/v1/genesis.pulsar.go | 2898 +++ api/oracle/v1/oracle.pulsar.go | 8262 ++++++++ api/oracle/v1/query.pulsar.go | 15821 ++++++++++++++++ api/oracle/v1/query_grpc.pb.go | 700 + api/oracle/v1/tx.pulsar.go | 10885 +++++++++++ api/oracle/v1/tx_grpc.pb.go | 431 + app/app.go | 76 +- app/params/app_settings.go | 34 + app/params/prefix.go | 26 + app/test_helpers.go | 4 + go.mod | 61 +- go.sum | 127 +- pricefeeder/config.go | 76 + pricefeeder/price-feeder.toml | 40 + pricefeeder/pricefeeder.go | 179 + proto/.DS_Store | Bin 0 -> 6148 bytes proto/oracle/module/v1/module.proto | 13 + proto/oracle/v1/abci.proto | 26 + proto/oracle/v1/events.proto | 28 + proto/oracle/v1/genesis.proto | 40 + proto/oracle/v1/oracle.proto | 201 + proto/oracle/v1/query.proto | 324 + proto/oracle/v1/tx.proto | 274 + util/bytes.go | 27 + util/bytes_test.go | 39 + util/checkers/doc.go | 3 + util/checkers/proposal.go | 37 + util/checkers/sign.go | 14 + util/cli/print.go | 15 + util/coin/math.go | 45 + util/decmath/decmath.go | 109 + util/decmath/decmath_test.go | 145 + util/genmap/doc.go | 2 + util/genmap/genmap.go | 14 + util/genmap/genmap_test.go | 29 + util/genmap/list.go | 11 + util/int_convert.go | 45 + util/metrics/metrics.go | 50 + util/ptr.go | 22 + util/reward/reward.go | 21 + util/sim/deliver.go | 46 + util/sim/params.go | 6 + util/strings.go | 17 + util/strings_test.go | 16 + x/.DS_Store | Bin 0 -> 6148 bytes x/multisig/types/genesis.pb.go | 13 +- x/multisig/types/query.pb.go | 36 +- x/multisig/types/state.pb.go | 62 +- x/multisig/types/tx.pb.go | 134 +- x/oracle/.DS_Store | Bin 0 -> 8196 bytes x/oracle/README.md | 3 + x/oracle/abci/endblocker.go | 231 + x/oracle/abci/proposal.go | 257 + x/oracle/abci/util.go | 23 + x/oracle/abci/voteextension.go | 159 + x/oracle/autocli.go | 31 + x/oracle/client/cli/query.go | 371 + x/oracle/client/cli/tx.go | 165 + x/oracle/client/tests/cli_test.go | 23 + x/oracle/client/tests/suite.go | 224 + x/oracle/depinject.go | 80 + x/oracle/genesis.go | 177 + x/oracle/keeper/alias_functions.go | 18 + x/oracle/keeper/averages.go | 258 + x/oracle/keeper/ballot.go | 68 + x/oracle/keeper/ballot_test.go | 75 + x/oracle/keeper/end_blocker.go | 58 + x/oracle/keeper/genesis.go | 94 + x/oracle/keeper/genesis_test.go | 123 + x/oracle/keeper/grpc_query.go | 397 + x/oracle/keeper/historic_price.go | 397 + x/oracle/keeper/historic_price_test.go | 100 + x/oracle/keeper/keeper.go | 414 + x/oracle/keeper/keeper_test.go | 286 + x/oracle/keeper/migrate_proposal.go | 72 + x/oracle/keeper/migrate_proposal_test.go | 55 + x/oracle/keeper/migrations.go | 627 + x/oracle/keeper/miss_counter.go | 37 + x/oracle/keeper/miss_counter_test.go | 57 + x/oracle/keeper/msg_server.go | 496 + x/oracle/keeper/msg_server_test.go | 1125 ++ x/oracle/keeper/param_update_plan.go | 216 + x/oracle/keeper/params.go | 256 + x/oracle/keeper/params_test.go | 21 + x/oracle/keeper/reward.go | 116 + x/oracle/keeper/reward_test.go | 146 + x/oracle/keeper/slash.go | 116 + x/oracle/keeper/slash_test.go | 145 + x/oracle/module.go | 191 + x/oracle/simulations/decoder.go | 52 + x/oracle/simulations/genesis.go | 193 + x/oracle/simulations/operations.go | 243 + x/oracle/types/abci.pb.go | 587 + x/oracle/types/asset.go | 60 + x/oracle/types/ballot.go | 216 + x/oracle/types/ballot_test.go | 420 + x/oracle/types/codec.go | 67 + .../types/currency_deviation_thresholds.go | 39 + .../currency_deviation_thresholds_test.go | 49 + x/oracle/types/currency_pair_providers.go | 48 + .../types/currency_pair_providers_test.go | 90 + x/oracle/types/denom.go | 67 + x/oracle/types/errors.go | 42 + x/oracle/types/events.go | 8 + x/oracle/types/events.pb.go | 580 + x/oracle/types/expected_keeper.go | 55 + x/oracle/types/genesis.go | 66 + x/oracle/types/genesis.pb.go | 1274 ++ x/oracle/types/genesis_test.go | 84 + x/oracle/types/hash.go | 122 + x/oracle/types/hash_test.go | 39 + x/oracle/types/keys.go | 108 + x/oracle/types/keys_test.go | 138 + x/oracle/types/msgs.go | 451 + x/oracle/types/msgs_test.go | 168 + x/oracle/types/oracle.pb.go | 3467 ++++ x/oracle/types/params.go | 652 + x/oracle/types/params_test.go | 322 + x/oracle/types/plan.go | 121 + x/oracle/types/price_stamp.go | 83 + x/oracle/types/proposal.go | 123 + x/oracle/types/query.pb.go | 6138 ++++++ x/oracle/types/query.pb.gw.go | 1492 ++ x/oracle/types/reward_band.go | 46 + x/oracle/types/reward_band_test.go | 63 + x/oracle/types/state.pb.go | 356 + x/oracle/types/tx.pb.go | 4869 +++++ x/oracle/types/utils_test.go | 252 + x/oracle/types/vote.go | 82 + 138 files changed, 75391 insertions(+), 299 deletions(-) create mode 100644 .DS_Store create mode 100644 api/oracle/module/v1/module.pulsar.go create mode 100644 api/oracle/v1/abci.pulsar.go create mode 100644 api/oracle/v1/events.pulsar.go create mode 100644 api/oracle/v1/genesis.pulsar.go create mode 100644 api/oracle/v1/oracle.pulsar.go create mode 100644 api/oracle/v1/query.pulsar.go create mode 100644 api/oracle/v1/query_grpc.pb.go create mode 100644 api/oracle/v1/tx.pulsar.go create mode 100644 api/oracle/v1/tx_grpc.pb.go create mode 100644 app/params/app_settings.go create mode 100644 app/params/prefix.go create mode 100644 pricefeeder/config.go create mode 100644 pricefeeder/price-feeder.toml create mode 100644 pricefeeder/pricefeeder.go create mode 100644 proto/.DS_Store create mode 100755 proto/oracle/module/v1/module.proto create mode 100644 proto/oracle/v1/abci.proto create mode 100644 proto/oracle/v1/events.proto create mode 100755 proto/oracle/v1/genesis.proto create mode 100644 proto/oracle/v1/oracle.proto create mode 100755 proto/oracle/v1/query.proto create mode 100755 proto/oracle/v1/tx.proto create mode 100644 util/bytes.go create mode 100644 util/bytes_test.go create mode 100644 util/checkers/doc.go create mode 100644 util/checkers/proposal.go create mode 100644 util/checkers/sign.go create mode 100644 util/cli/print.go create mode 100644 util/coin/math.go create mode 100644 util/decmath/decmath.go create mode 100644 util/decmath/decmath_test.go create mode 100644 util/genmap/doc.go create mode 100644 util/genmap/genmap.go create mode 100644 util/genmap/genmap_test.go create mode 100644 util/genmap/list.go create mode 100644 util/int_convert.go create mode 100644 util/metrics/metrics.go create mode 100644 util/ptr.go create mode 100644 util/reward/reward.go create mode 100644 util/sim/deliver.go create mode 100644 util/sim/params.go create mode 100644 util/strings.go create mode 100644 util/strings_test.go create mode 100644 x/.DS_Store create mode 100644 x/oracle/.DS_Store create mode 100755 x/oracle/README.md create mode 100644 x/oracle/abci/endblocker.go create mode 100644 x/oracle/abci/proposal.go create mode 100644 x/oracle/abci/util.go create mode 100644 x/oracle/abci/voteextension.go create mode 100755 x/oracle/autocli.go create mode 100755 x/oracle/client/cli/query.go create mode 100755 x/oracle/client/cli/tx.go create mode 100644 x/oracle/client/tests/cli_test.go create mode 100644 x/oracle/client/tests/suite.go create mode 100755 x/oracle/depinject.go create mode 100644 x/oracle/genesis.go create mode 100644 x/oracle/keeper/alias_functions.go create mode 100644 x/oracle/keeper/averages.go create mode 100644 x/oracle/keeper/ballot.go create mode 100644 x/oracle/keeper/ballot_test.go create mode 100644 x/oracle/keeper/end_blocker.go create mode 100644 x/oracle/keeper/genesis.go create mode 100755 x/oracle/keeper/genesis_test.go create mode 100644 x/oracle/keeper/grpc_query.go create mode 100644 x/oracle/keeper/historic_price.go create mode 100644 x/oracle/keeper/historic_price_test.go create mode 100755 x/oracle/keeper/keeper.go create mode 100755 x/oracle/keeper/keeper_test.go create mode 100644 x/oracle/keeper/migrate_proposal.go create mode 100644 x/oracle/keeper/migrate_proposal_test.go create mode 100644 x/oracle/keeper/migrations.go create mode 100644 x/oracle/keeper/miss_counter.go create mode 100644 x/oracle/keeper/miss_counter_test.go create mode 100755 x/oracle/keeper/msg_server.go create mode 100755 x/oracle/keeper/msg_server_test.go create mode 100644 x/oracle/keeper/param_update_plan.go create mode 100644 x/oracle/keeper/params.go create mode 100644 x/oracle/keeper/params_test.go create mode 100644 x/oracle/keeper/reward.go create mode 100644 x/oracle/keeper/reward_test.go create mode 100644 x/oracle/keeper/slash.go create mode 100644 x/oracle/keeper/slash_test.go create mode 100755 x/oracle/module.go create mode 100644 x/oracle/simulations/decoder.go create mode 100644 x/oracle/simulations/genesis.go create mode 100644 x/oracle/simulations/operations.go create mode 100644 x/oracle/types/abci.pb.go create mode 100644 x/oracle/types/asset.go create mode 100644 x/oracle/types/ballot.go create mode 100644 x/oracle/types/ballot_test.go create mode 100755 x/oracle/types/codec.go create mode 100644 x/oracle/types/currency_deviation_thresholds.go create mode 100644 x/oracle/types/currency_deviation_thresholds_test.go create mode 100644 x/oracle/types/currency_pair_providers.go create mode 100644 x/oracle/types/currency_pair_providers_test.go create mode 100644 x/oracle/types/denom.go create mode 100644 x/oracle/types/errors.go create mode 100644 x/oracle/types/events.go create mode 100644 x/oracle/types/events.pb.go create mode 100644 x/oracle/types/expected_keeper.go create mode 100755 x/oracle/types/genesis.go create mode 100644 x/oracle/types/genesis.pb.go create mode 100755 x/oracle/types/genesis_test.go create mode 100644 x/oracle/types/hash.go create mode 100644 x/oracle/types/hash_test.go create mode 100755 x/oracle/types/keys.go create mode 100644 x/oracle/types/keys_test.go create mode 100755 x/oracle/types/msgs.go create mode 100644 x/oracle/types/msgs_test.go create mode 100644 x/oracle/types/oracle.pb.go create mode 100755 x/oracle/types/params.go create mode 100644 x/oracle/types/params_test.go create mode 100644 x/oracle/types/plan.go create mode 100644 x/oracle/types/price_stamp.go create mode 100644 x/oracle/types/proposal.go create mode 100644 x/oracle/types/query.pb.go create mode 100644 x/oracle/types/query.pb.gw.go create mode 100644 x/oracle/types/reward_band.go create mode 100644 x/oracle/types/reward_band_test.go create mode 100644 x/oracle/types/state.pb.go create mode 100644 x/oracle/types/tx.pb.go create mode 100644 x/oracle/types/utils_test.go create mode 100644 x/oracle/types/vote.go diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..7eeb3c71a55901323bf68c3ec842377b8b686588 GIT binary patch literal 10244 zcmeHM&u<$=6n^8R@w#c!&971lNLGER)KJofwyHSbx`|MPP@*_$6D6&?yWY6ltar@r zI%$Z4e1;nrZU~7#0ErVv_ygd`l>`3(7tZ0EnRU9mZmLR^sw$d^X5Q?~_ukC=*6-Of zAtF}mHm?(viO4_|(maRe1x3t@I#3G9$R$Vyed3Poa~n_Q09FrZ1~dbj0nLDBKr`@m zFo5rDQH)U~b*mZB3}^<984&rQj4EU`kv%14>Odop0Fc8NmIZzJ;~%mt1|X}6>?w&6 z6sA-ml`2b)7%VwEFr|+9YJ%@6snm(dm0>4YnI$I_mK;4;S;C1`mDH_fKr=ANfH=Dk zkwqQymi)~5y@r`?gvX*kN>%P4->R=19tBl=Y$z=CGq_ELPaZ zif!_A;Yr+R5OPXJf~4b*anZ15s&OFTJo7iH(~Sm&E(L+$Cse(y{MDi>-=hW zd@qXU=Kf-Zq2V(lMWbkp8V~DF_+CA>;%-#4!cFnC#<_3z`<8v*bN3qN^gSNLmKV68 zRPdTEAX^W-pvm`Yyc;wlsasbQM#(5O%!>yH^EYnJmgjF@Kb$Qe+_^C~TmE?d*5P5v zn5lg9$!cTAZwLGvc!0u^F9#Y^&&Tbz=oRrPOmW~jyNOrqkG@xbn`Ymy(%I2-W8>$| ziOH#n>4}+{nG5e+e0TD__Z#MvZ8_uVjp9MDNr)zZ}$f9P{?N2QS3V<&yP| z<#<7>^69^d%u=O#MfFUo^!YWW`@KZ6%5Tn(vcDGaz=hI^nyFMjPap^7^iyKI$hvd7F~PnCY5|EfPo>?MLl=;U7Y zZaoZq9<(qcv?lRE;0T5tgnmdL%0Ox(0dkoPM3@c)sZ1^D5IIW=DI42JPCmKWu#)K@ ztuulo#*qfvX!GHXB*4Z~NuZC7s7vjvT|z3zV8>;$jioooA&$i0!k;*+D-uIS*Pt(u zlmrtm^g*P*4E_vw3bFr~c-FE=W9;jc2Pxz!NgyeYbn-a8$s_febBUuwtF(xuwSb^m zl!2TNV-cF^ASfaP9R!Sru)(j4Y{= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: oracle/module/v1/module.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Module is the app config object of the module. +// Learn more: https://docs.cosmos.network/main/building-modules/depinject +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_module_v1_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_oracle_module_v1_module_proto_rawDescGZIP(), []int{0} +} + +var File_oracle_module_v1_module_proto protoreflect.FileDescriptor + +var file_oracle_module_v1_module_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x10, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, + 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x30, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x26, 0xba, + 0xc0, 0x96, 0xda, 0x01, 0x20, 0x0a, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x44, 0x61, 0x65, 0x76, 0x4d, 0x69, 0x74, 0x68, 0x72, 0x61, 0x6e, 0x2f, 0x64, 0x6d, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x42, 0xc3, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x65, 0x76, 0x4d, 0x69, + 0x74, 0x68, 0x72, 0x61, 0x6e, 0x2f, 0x64, 0x6d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, + 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4d, + 0x58, 0xaa, 0x02, 0x10, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, + 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_oracle_module_v1_module_proto_rawDescOnce sync.Once + file_oracle_module_v1_module_proto_rawDescData = file_oracle_module_v1_module_proto_rawDesc +) + +func file_oracle_module_v1_module_proto_rawDescGZIP() []byte { + file_oracle_module_v1_module_proto_rawDescOnce.Do(func() { + file_oracle_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_module_v1_module_proto_rawDescData) + }) + return file_oracle_module_v1_module_proto_rawDescData +} + +var file_oracle_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_oracle_module_v1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: oracle.module.v1.Module +} +var file_oracle_module_v1_module_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_oracle_module_v1_module_proto_init() } +func file_oracle_module_v1_module_proto_init() { + if File_oracle_module_v1_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_oracle_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_oracle_module_v1_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_oracle_module_v1_module_proto_goTypes, + DependencyIndexes: file_oracle_module_v1_module_proto_depIdxs, + MessageInfos: file_oracle_module_v1_module_proto_msgTypes, + }.Build() + File_oracle_module_v1_module_proto = out.File + file_oracle_module_v1_module_proto_rawDesc = nil + file_oracle_module_v1_module_proto_goTypes = nil + file_oracle_module_v1_module_proto_depIdxs = nil +} diff --git a/api/oracle/v1/abci.pulsar.go b/api/oracle/v1/abci.pulsar.go new file mode 100644 index 0000000..96c2fa7 --- /dev/null +++ b/api/oracle/v1/abci.pulsar.go @@ -0,0 +1,1345 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package oraclev1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_OracleVoteExtension_2_list)(nil) + +type _OracleVoteExtension_2_list struct { + list *[]*v1beta1.DecCoin +} + +func (x *_OracleVoteExtension_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_OracleVoteExtension_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_OracleVoteExtension_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_OracleVoteExtension_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_OracleVoteExtension_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_OracleVoteExtension_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_OracleVoteExtension_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_OracleVoteExtension_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_OracleVoteExtension protoreflect.MessageDescriptor + fd_OracleVoteExtension_height protoreflect.FieldDescriptor + fd_OracleVoteExtension_exchange_rates protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_abci_proto_init() + md_OracleVoteExtension = File_oracle_v1_abci_proto.Messages().ByName("OracleVoteExtension") + fd_OracleVoteExtension_height = md_OracleVoteExtension.Fields().ByName("height") + fd_OracleVoteExtension_exchange_rates = md_OracleVoteExtension.Fields().ByName("exchange_rates") +} + +var _ protoreflect.Message = (*fastReflection_OracleVoteExtension)(nil) + +type fastReflection_OracleVoteExtension OracleVoteExtension + +func (x *OracleVoteExtension) ProtoReflect() protoreflect.Message { + return (*fastReflection_OracleVoteExtension)(x) +} + +func (x *OracleVoteExtension) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_abci_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_OracleVoteExtension_messageType fastReflection_OracleVoteExtension_messageType +var _ protoreflect.MessageType = fastReflection_OracleVoteExtension_messageType{} + +type fastReflection_OracleVoteExtension_messageType struct{} + +func (x fastReflection_OracleVoteExtension_messageType) Zero() protoreflect.Message { + return (*fastReflection_OracleVoteExtension)(nil) +} +func (x fastReflection_OracleVoteExtension_messageType) New() protoreflect.Message { + return new(fastReflection_OracleVoteExtension) +} +func (x fastReflection_OracleVoteExtension_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_OracleVoteExtension +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_OracleVoteExtension) Descriptor() protoreflect.MessageDescriptor { + return md_OracleVoteExtension +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_OracleVoteExtension) Type() protoreflect.MessageType { + return _fastReflection_OracleVoteExtension_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_OracleVoteExtension) New() protoreflect.Message { + return new(fastReflection_OracleVoteExtension) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_OracleVoteExtension) Interface() protoreflect.ProtoMessage { + return (*OracleVoteExtension)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_OracleVoteExtension) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Height != int64(0) { + value := protoreflect.ValueOfInt64(x.Height) + if !f(fd_OracleVoteExtension_height, value) { + return + } + } + if len(x.ExchangeRates) != 0 { + value := protoreflect.ValueOfList(&_OracleVoteExtension_2_list{list: &x.ExchangeRates}) + if !f(fd_OracleVoteExtension_exchange_rates, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_OracleVoteExtension) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.OracleVoteExtension.height": + return x.Height != int64(0) + case "oracle.v1.OracleVoteExtension.exchange_rates": + return len(x.ExchangeRates) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.OracleVoteExtension")) + } + panic(fmt.Errorf("message oracle.v1.OracleVoteExtension does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OracleVoteExtension) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.OracleVoteExtension.height": + x.Height = int64(0) + case "oracle.v1.OracleVoteExtension.exchange_rates": + x.ExchangeRates = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.OracleVoteExtension")) + } + panic(fmt.Errorf("message oracle.v1.OracleVoteExtension does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_OracleVoteExtension) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.OracleVoteExtension.height": + value := x.Height + return protoreflect.ValueOfInt64(value) + case "oracle.v1.OracleVoteExtension.exchange_rates": + if len(x.ExchangeRates) == 0 { + return protoreflect.ValueOfList(&_OracleVoteExtension_2_list{}) + } + listValue := &_OracleVoteExtension_2_list{list: &x.ExchangeRates} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.OracleVoteExtension")) + } + panic(fmt.Errorf("message oracle.v1.OracleVoteExtension does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OracleVoteExtension) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.OracleVoteExtension.height": + x.Height = value.Int() + case "oracle.v1.OracleVoteExtension.exchange_rates": + lv := value.List() + clv := lv.(*_OracleVoteExtension_2_list) + x.ExchangeRates = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.OracleVoteExtension")) + } + panic(fmt.Errorf("message oracle.v1.OracleVoteExtension does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OracleVoteExtension) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.OracleVoteExtension.exchange_rates": + if x.ExchangeRates == nil { + x.ExchangeRates = []*v1beta1.DecCoin{} + } + value := &_OracleVoteExtension_2_list{list: &x.ExchangeRates} + return protoreflect.ValueOfList(value) + case "oracle.v1.OracleVoteExtension.height": + panic(fmt.Errorf("field height of message oracle.v1.OracleVoteExtension is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.OracleVoteExtension")) + } + panic(fmt.Errorf("message oracle.v1.OracleVoteExtension does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_OracleVoteExtension) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.OracleVoteExtension.height": + return protoreflect.ValueOfInt64(int64(0)) + case "oracle.v1.OracleVoteExtension.exchange_rates": + list := []*v1beta1.DecCoin{} + return protoreflect.ValueOfList(&_OracleVoteExtension_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.OracleVoteExtension")) + } + panic(fmt.Errorf("message oracle.v1.OracleVoteExtension does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_OracleVoteExtension) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.OracleVoteExtension", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_OracleVoteExtension) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OracleVoteExtension) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_OracleVoteExtension) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_OracleVoteExtension) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*OracleVoteExtension) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Height != 0 { + n += 1 + runtime.Sov(uint64(x.Height)) + } + if len(x.ExchangeRates) > 0 { + for _, e := range x.ExchangeRates { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*OracleVoteExtension) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ExchangeRates) > 0 { + for iNdEx := len(x.ExchangeRates) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ExchangeRates[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if x.Height != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*OracleVoteExtension) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OracleVoteExtension: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OracleVoteExtension: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + x.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExchangeRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ExchangeRates = append(x.ExchangeRates, &v1beta1.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExchangeRates[len(x.ExchangeRates)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_InjectedVoteExtensionTx_1_list)(nil) + +type _InjectedVoteExtensionTx_1_list struct { + list *[]*AggregateExchangeRateVote +} + +func (x *_InjectedVoteExtensionTx_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_InjectedVoteExtensionTx_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_InjectedVoteExtensionTx_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AggregateExchangeRateVote) + (*x.list)[i] = concreteValue +} + +func (x *_InjectedVoteExtensionTx_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AggregateExchangeRateVote) + *x.list = append(*x.list, concreteValue) +} + +func (x *_InjectedVoteExtensionTx_1_list) AppendMutable() protoreflect.Value { + v := new(AggregateExchangeRateVote) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_InjectedVoteExtensionTx_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_InjectedVoteExtensionTx_1_list) NewElement() protoreflect.Value { + v := new(AggregateExchangeRateVote) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_InjectedVoteExtensionTx_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_InjectedVoteExtensionTx protoreflect.MessageDescriptor + fd_InjectedVoteExtensionTx_exchange_rate_votes protoreflect.FieldDescriptor + fd_InjectedVoteExtensionTx_extended_commit_info protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_abci_proto_init() + md_InjectedVoteExtensionTx = File_oracle_v1_abci_proto.Messages().ByName("InjectedVoteExtensionTx") + fd_InjectedVoteExtensionTx_exchange_rate_votes = md_InjectedVoteExtensionTx.Fields().ByName("exchange_rate_votes") + fd_InjectedVoteExtensionTx_extended_commit_info = md_InjectedVoteExtensionTx.Fields().ByName("extended_commit_info") +} + +var _ protoreflect.Message = (*fastReflection_InjectedVoteExtensionTx)(nil) + +type fastReflection_InjectedVoteExtensionTx InjectedVoteExtensionTx + +func (x *InjectedVoteExtensionTx) ProtoReflect() protoreflect.Message { + return (*fastReflection_InjectedVoteExtensionTx)(x) +} + +func (x *InjectedVoteExtensionTx) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_abci_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_InjectedVoteExtensionTx_messageType fastReflection_InjectedVoteExtensionTx_messageType +var _ protoreflect.MessageType = fastReflection_InjectedVoteExtensionTx_messageType{} + +type fastReflection_InjectedVoteExtensionTx_messageType struct{} + +func (x fastReflection_InjectedVoteExtensionTx_messageType) Zero() protoreflect.Message { + return (*fastReflection_InjectedVoteExtensionTx)(nil) +} +func (x fastReflection_InjectedVoteExtensionTx_messageType) New() protoreflect.Message { + return new(fastReflection_InjectedVoteExtensionTx) +} +func (x fastReflection_InjectedVoteExtensionTx_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_InjectedVoteExtensionTx +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_InjectedVoteExtensionTx) Descriptor() protoreflect.MessageDescriptor { + return md_InjectedVoteExtensionTx +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_InjectedVoteExtensionTx) Type() protoreflect.MessageType { + return _fastReflection_InjectedVoteExtensionTx_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_InjectedVoteExtensionTx) New() protoreflect.Message { + return new(fastReflection_InjectedVoteExtensionTx) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_InjectedVoteExtensionTx) Interface() protoreflect.ProtoMessage { + return (*InjectedVoteExtensionTx)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_InjectedVoteExtensionTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ExchangeRateVotes) != 0 { + value := protoreflect.ValueOfList(&_InjectedVoteExtensionTx_1_list{list: &x.ExchangeRateVotes}) + if !f(fd_InjectedVoteExtensionTx_exchange_rate_votes, value) { + return + } + } + if len(x.ExtendedCommitInfo) != 0 { + value := protoreflect.ValueOfBytes(x.ExtendedCommitInfo) + if !f(fd_InjectedVoteExtensionTx_extended_commit_info, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_InjectedVoteExtensionTx) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.InjectedVoteExtensionTx.exchange_rate_votes": + return len(x.ExchangeRateVotes) != 0 + case "oracle.v1.InjectedVoteExtensionTx.extended_commit_info": + return len(x.ExtendedCommitInfo) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.InjectedVoteExtensionTx")) + } + panic(fmt.Errorf("message oracle.v1.InjectedVoteExtensionTx does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_InjectedVoteExtensionTx) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.InjectedVoteExtensionTx.exchange_rate_votes": + x.ExchangeRateVotes = nil + case "oracle.v1.InjectedVoteExtensionTx.extended_commit_info": + x.ExtendedCommitInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.InjectedVoteExtensionTx")) + } + panic(fmt.Errorf("message oracle.v1.InjectedVoteExtensionTx does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_InjectedVoteExtensionTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.InjectedVoteExtensionTx.exchange_rate_votes": + if len(x.ExchangeRateVotes) == 0 { + return protoreflect.ValueOfList(&_InjectedVoteExtensionTx_1_list{}) + } + listValue := &_InjectedVoteExtensionTx_1_list{list: &x.ExchangeRateVotes} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.InjectedVoteExtensionTx.extended_commit_info": + value := x.ExtendedCommitInfo + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.InjectedVoteExtensionTx")) + } + panic(fmt.Errorf("message oracle.v1.InjectedVoteExtensionTx does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_InjectedVoteExtensionTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.InjectedVoteExtensionTx.exchange_rate_votes": + lv := value.List() + clv := lv.(*_InjectedVoteExtensionTx_1_list) + x.ExchangeRateVotes = *clv.list + case "oracle.v1.InjectedVoteExtensionTx.extended_commit_info": + x.ExtendedCommitInfo = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.InjectedVoteExtensionTx")) + } + panic(fmt.Errorf("message oracle.v1.InjectedVoteExtensionTx does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_InjectedVoteExtensionTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.InjectedVoteExtensionTx.exchange_rate_votes": + if x.ExchangeRateVotes == nil { + x.ExchangeRateVotes = []*AggregateExchangeRateVote{} + } + value := &_InjectedVoteExtensionTx_1_list{list: &x.ExchangeRateVotes} + return protoreflect.ValueOfList(value) + case "oracle.v1.InjectedVoteExtensionTx.extended_commit_info": + panic(fmt.Errorf("field extended_commit_info of message oracle.v1.InjectedVoteExtensionTx is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.InjectedVoteExtensionTx")) + } + panic(fmt.Errorf("message oracle.v1.InjectedVoteExtensionTx does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_InjectedVoteExtensionTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.InjectedVoteExtensionTx.exchange_rate_votes": + list := []*AggregateExchangeRateVote{} + return protoreflect.ValueOfList(&_InjectedVoteExtensionTx_1_list{list: &list}) + case "oracle.v1.InjectedVoteExtensionTx.extended_commit_info": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.InjectedVoteExtensionTx")) + } + panic(fmt.Errorf("message oracle.v1.InjectedVoteExtensionTx does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_InjectedVoteExtensionTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.InjectedVoteExtensionTx", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_InjectedVoteExtensionTx) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_InjectedVoteExtensionTx) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_InjectedVoteExtensionTx) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_InjectedVoteExtensionTx) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*InjectedVoteExtensionTx) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.ExchangeRateVotes) > 0 { + for _, e := range x.ExchangeRateVotes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.ExtendedCommitInfo) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*InjectedVoteExtensionTx) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ExtendedCommitInfo) > 0 { + i -= len(x.ExtendedCommitInfo) + copy(dAtA[i:], x.ExtendedCommitInfo) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ExtendedCommitInfo))) + i-- + dAtA[i] = 0x12 + } + if len(x.ExchangeRateVotes) > 0 { + for iNdEx := len(x.ExchangeRateVotes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ExchangeRateVotes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*InjectedVoteExtensionTx) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InjectedVoteExtensionTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InjectedVoteExtensionTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExchangeRateVotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ExchangeRateVotes = append(x.ExchangeRateVotes, &AggregateExchangeRateVote{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExchangeRateVotes[len(x.ExchangeRateVotes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExtendedCommitInfo", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ExtendedCommitInfo = append(x.ExtendedCommitInfo[:0], dAtA[iNdEx:postIndex]...) + if x.ExtendedCommitInfo == nil { + x.ExtendedCommitInfo = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: oracle/v1/abci.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// OracleVoteExtension defines the vote extension structure used by the oracle +// module. +type OracleVoteExtension struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + ExchangeRates []*v1beta1.DecCoin `protobuf:"bytes,2,rep,name=exchange_rates,json=exchangeRates,proto3" json:"exchange_rates,omitempty"` +} + +func (x *OracleVoteExtension) Reset() { + *x = OracleVoteExtension{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_abci_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OracleVoteExtension) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OracleVoteExtension) ProtoMessage() {} + +// Deprecated: Use OracleVoteExtension.ProtoReflect.Descriptor instead. +func (*OracleVoteExtension) Descriptor() ([]byte, []int) { + return file_oracle_v1_abci_proto_rawDescGZIP(), []int{0} +} + +func (x *OracleVoteExtension) GetHeight() int64 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *OracleVoteExtension) GetExchangeRates() []*v1beta1.DecCoin { + if x != nil { + return x.ExchangeRates + } + return nil +} + +// InjectedVoteExtensionTx defines the vote extension tx injected by the prepare +// proposal handler. +type InjectedVoteExtensionTx struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExchangeRateVotes []*AggregateExchangeRateVote `protobuf:"bytes,1,rep,name=exchange_rate_votes,json=exchangeRateVotes,proto3" json:"exchange_rate_votes,omitempty"` + ExtendedCommitInfo []byte `protobuf:"bytes,2,opt,name=extended_commit_info,json=extendedCommitInfo,proto3" json:"extended_commit_info,omitempty"` +} + +func (x *InjectedVoteExtensionTx) Reset() { + *x = InjectedVoteExtensionTx{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_abci_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InjectedVoteExtensionTx) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InjectedVoteExtensionTx) ProtoMessage() {} + +// Deprecated: Use InjectedVoteExtensionTx.ProtoReflect.Descriptor instead. +func (*InjectedVoteExtensionTx) Descriptor() ([]byte, []int) { + return file_oracle_v1_abci_proto_rawDescGZIP(), []int{1} +} + +func (x *InjectedVoteExtensionTx) GetExchangeRateVotes() []*AggregateExchangeRateVote { + if x != nil { + return x.ExchangeRateVotes + } + return nil +} + +func (x *InjectedVoteExtensionTx) GetExtendedCommitInfo() []byte { + if x != nil { + return x.ExtendedCommitInfo + } + return nil +} + +var File_oracle_v1_abci_proto protoreflect.FileDescriptor + +var file_oracle_v1_abci_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x62, 0x63, 0x69, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, + 0x31, 0x1a, 0x16, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, + 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xa7, 0x01, 0x0a, 0x13, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x78, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, + 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x17, 0x49, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x54, 0x78, 0x12, 0x5a, 0x0a, 0x13, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x11, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, + 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x12, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x42, 0x9a, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x41, 0x62, 0x63, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, + 0x61, 0x65, 0x76, 0x4d, 0x69, 0x74, 0x68, 0x72, 0x61, 0x6e, 0x2f, 0x64, 0x6d, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, + 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, + 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0xc8, 0xe1, 0x1e, 0x00, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_oracle_v1_abci_proto_rawDescOnce sync.Once + file_oracle_v1_abci_proto_rawDescData = file_oracle_v1_abci_proto_rawDesc +) + +func file_oracle_v1_abci_proto_rawDescGZIP() []byte { + file_oracle_v1_abci_proto_rawDescOnce.Do(func() { + file_oracle_v1_abci_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_v1_abci_proto_rawDescData) + }) + return file_oracle_v1_abci_proto_rawDescData +} + +var file_oracle_v1_abci_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_oracle_v1_abci_proto_goTypes = []interface{}{ + (*OracleVoteExtension)(nil), // 0: oracle.v1.OracleVoteExtension + (*InjectedVoteExtensionTx)(nil), // 1: oracle.v1.InjectedVoteExtensionTx + (*v1beta1.DecCoin)(nil), // 2: cosmos.base.v1beta1.DecCoin + (*AggregateExchangeRateVote)(nil), // 3: oracle.v1.AggregateExchangeRateVote +} +var file_oracle_v1_abci_proto_depIdxs = []int32{ + 2, // 0: oracle.v1.OracleVoteExtension.exchange_rates:type_name -> cosmos.base.v1beta1.DecCoin + 3, // 1: oracle.v1.InjectedVoteExtensionTx.exchange_rate_votes:type_name -> oracle.v1.AggregateExchangeRateVote + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_oracle_v1_abci_proto_init() } +func file_oracle_v1_abci_proto_init() { + if File_oracle_v1_abci_proto != nil { + return + } + file_oracle_v1_oracle_proto_init() + if !protoimpl.UnsafeEnabled { + file_oracle_v1_abci_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OracleVoteExtension); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_abci_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InjectedVoteExtensionTx); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_oracle_v1_abci_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_oracle_v1_abci_proto_goTypes, + DependencyIndexes: file_oracle_v1_abci_proto_depIdxs, + MessageInfos: file_oracle_v1_abci_proto_msgTypes, + }.Build() + File_oracle_v1_abci_proto = out.File + file_oracle_v1_abci_proto_rawDesc = nil + file_oracle_v1_abci_proto_goTypes = nil + file_oracle_v1_abci_proto_depIdxs = nil +} diff --git a/api/oracle/v1/events.pulsar.go b/api/oracle/v1/events.pulsar.go new file mode 100644 index 0000000..2680720 --- /dev/null +++ b/api/oracle/v1/events.pulsar.go @@ -0,0 +1,1201 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package oraclev1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_EventDelegateFeedConsent protoreflect.MessageDescriptor + fd_EventDelegateFeedConsent_operator protoreflect.FieldDescriptor + fd_EventDelegateFeedConsent_delegate protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_events_proto_init() + md_EventDelegateFeedConsent = File_oracle_v1_events_proto.Messages().ByName("EventDelegateFeedConsent") + fd_EventDelegateFeedConsent_operator = md_EventDelegateFeedConsent.Fields().ByName("operator") + fd_EventDelegateFeedConsent_delegate = md_EventDelegateFeedConsent.Fields().ByName("delegate") +} + +var _ protoreflect.Message = (*fastReflection_EventDelegateFeedConsent)(nil) + +type fastReflection_EventDelegateFeedConsent EventDelegateFeedConsent + +func (x *EventDelegateFeedConsent) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventDelegateFeedConsent)(x) +} + +func (x *EventDelegateFeedConsent) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_events_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventDelegateFeedConsent_messageType fastReflection_EventDelegateFeedConsent_messageType +var _ protoreflect.MessageType = fastReflection_EventDelegateFeedConsent_messageType{} + +type fastReflection_EventDelegateFeedConsent_messageType struct{} + +func (x fastReflection_EventDelegateFeedConsent_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventDelegateFeedConsent)(nil) +} +func (x fastReflection_EventDelegateFeedConsent_messageType) New() protoreflect.Message { + return new(fastReflection_EventDelegateFeedConsent) +} +func (x fastReflection_EventDelegateFeedConsent_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventDelegateFeedConsent +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventDelegateFeedConsent) Descriptor() protoreflect.MessageDescriptor { + return md_EventDelegateFeedConsent +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EventDelegateFeedConsent) Type() protoreflect.MessageType { + return _fastReflection_EventDelegateFeedConsent_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventDelegateFeedConsent) New() protoreflect.Message { + return new(fastReflection_EventDelegateFeedConsent) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventDelegateFeedConsent) Interface() protoreflect.ProtoMessage { + return (*EventDelegateFeedConsent)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EventDelegateFeedConsent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Operator != "" { + value := protoreflect.ValueOfString(x.Operator) + if !f(fd_EventDelegateFeedConsent_operator, value) { + return + } + } + if x.Delegate != "" { + value := protoreflect.ValueOfString(x.Delegate) + if !f(fd_EventDelegateFeedConsent_delegate, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventDelegateFeedConsent) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.EventDelegateFeedConsent.operator": + return x.Operator != "" + case "oracle.v1.EventDelegateFeedConsent.delegate": + return x.Delegate != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.EventDelegateFeedConsent does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDelegateFeedConsent) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.EventDelegateFeedConsent.operator": + x.Operator = "" + case "oracle.v1.EventDelegateFeedConsent.delegate": + x.Delegate = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.EventDelegateFeedConsent does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EventDelegateFeedConsent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.EventDelegateFeedConsent.operator": + value := x.Operator + return protoreflect.ValueOfString(value) + case "oracle.v1.EventDelegateFeedConsent.delegate": + value := x.Delegate + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.EventDelegateFeedConsent does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDelegateFeedConsent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.EventDelegateFeedConsent.operator": + x.Operator = value.Interface().(string) + case "oracle.v1.EventDelegateFeedConsent.delegate": + x.Delegate = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.EventDelegateFeedConsent does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDelegateFeedConsent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.EventDelegateFeedConsent.operator": + panic(fmt.Errorf("field operator of message oracle.v1.EventDelegateFeedConsent is not mutable")) + case "oracle.v1.EventDelegateFeedConsent.delegate": + panic(fmt.Errorf("field delegate of message oracle.v1.EventDelegateFeedConsent is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.EventDelegateFeedConsent does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EventDelegateFeedConsent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.EventDelegateFeedConsent.operator": + return protoreflect.ValueOfString("") + case "oracle.v1.EventDelegateFeedConsent.delegate": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.EventDelegateFeedConsent does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EventDelegateFeedConsent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.EventDelegateFeedConsent", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EventDelegateFeedConsent) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDelegateFeedConsent) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EventDelegateFeedConsent) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EventDelegateFeedConsent) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventDelegateFeedConsent) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Operator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Delegate) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventDelegateFeedConsent) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Delegate) > 0 { + i -= len(x.Delegate) + copy(dAtA[i:], x.Delegate) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Delegate))) + i-- + dAtA[i] = 0x12 + } + if len(x.Operator) > 0 { + i -= len(x.Operator) + copy(dAtA[i:], x.Operator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Operator))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventDelegateFeedConsent) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventDelegateFeedConsent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventDelegateFeedConsent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Delegate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Delegate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_EventSetFxRate protoreflect.MessageDescriptor + fd_EventSetFxRate_denom protoreflect.FieldDescriptor + fd_EventSetFxRate_rate protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_events_proto_init() + md_EventSetFxRate = File_oracle_v1_events_proto.Messages().ByName("EventSetFxRate") + fd_EventSetFxRate_denom = md_EventSetFxRate.Fields().ByName("denom") + fd_EventSetFxRate_rate = md_EventSetFxRate.Fields().ByName("rate") +} + +var _ protoreflect.Message = (*fastReflection_EventSetFxRate)(nil) + +type fastReflection_EventSetFxRate EventSetFxRate + +func (x *EventSetFxRate) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventSetFxRate)(x) +} + +func (x *EventSetFxRate) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_events_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventSetFxRate_messageType fastReflection_EventSetFxRate_messageType +var _ protoreflect.MessageType = fastReflection_EventSetFxRate_messageType{} + +type fastReflection_EventSetFxRate_messageType struct{} + +func (x fastReflection_EventSetFxRate_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventSetFxRate)(nil) +} +func (x fastReflection_EventSetFxRate_messageType) New() protoreflect.Message { + return new(fastReflection_EventSetFxRate) +} +func (x fastReflection_EventSetFxRate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventSetFxRate +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventSetFxRate) Descriptor() protoreflect.MessageDescriptor { + return md_EventSetFxRate +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EventSetFxRate) Type() protoreflect.MessageType { + return _fastReflection_EventSetFxRate_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventSetFxRate) New() protoreflect.Message { + return new(fastReflection_EventSetFxRate) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventSetFxRate) Interface() protoreflect.ProtoMessage { + return (*EventSetFxRate)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EventSetFxRate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_EventSetFxRate_denom, value) { + return + } + } + if x.Rate != "" { + value := protoreflect.ValueOfString(x.Rate) + if !f(fd_EventSetFxRate_rate, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventSetFxRate) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.EventSetFxRate.denom": + return x.Denom != "" + case "oracle.v1.EventSetFxRate.rate": + return x.Rate != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventSetFxRate")) + } + panic(fmt.Errorf("message oracle.v1.EventSetFxRate does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSetFxRate) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.EventSetFxRate.denom": + x.Denom = "" + case "oracle.v1.EventSetFxRate.rate": + x.Rate = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventSetFxRate")) + } + panic(fmt.Errorf("message oracle.v1.EventSetFxRate does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EventSetFxRate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.EventSetFxRate.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "oracle.v1.EventSetFxRate.rate": + value := x.Rate + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventSetFxRate")) + } + panic(fmt.Errorf("message oracle.v1.EventSetFxRate does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSetFxRate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.EventSetFxRate.denom": + x.Denom = value.Interface().(string) + case "oracle.v1.EventSetFxRate.rate": + x.Rate = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventSetFxRate")) + } + panic(fmt.Errorf("message oracle.v1.EventSetFxRate does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSetFxRate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.EventSetFxRate.denom": + panic(fmt.Errorf("field denom of message oracle.v1.EventSetFxRate is not mutable")) + case "oracle.v1.EventSetFxRate.rate": + panic(fmt.Errorf("field rate of message oracle.v1.EventSetFxRate is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventSetFxRate")) + } + panic(fmt.Errorf("message oracle.v1.EventSetFxRate does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EventSetFxRate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.EventSetFxRate.denom": + return protoreflect.ValueOfString("") + case "oracle.v1.EventSetFxRate.rate": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.EventSetFxRate")) + } + panic(fmt.Errorf("message oracle.v1.EventSetFxRate does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EventSetFxRate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.EventSetFxRate", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EventSetFxRate) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSetFxRate) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EventSetFxRate) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EventSetFxRate) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventSetFxRate) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Rate) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventSetFxRate) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Rate) > 0 { + i -= len(x.Rate) + copy(dAtA[i:], x.Rate) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Rate))) + i-- + dAtA[i] = 0x12 + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventSetFxRate) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventSetFxRate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventSetFxRate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Rate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: oracle/v1/events.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// EventDelegateFeedConsent is emitted on Msg/DelegateFeedConsent +type EventDelegateFeedConsent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operator bech32 address who delegates his feed consent + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // Delegate bech32 address + Delegate string `protobuf:"bytes,2,opt,name=delegate,proto3" json:"delegate,omitempty"` +} + +func (x *EventDelegateFeedConsent) Reset() { + *x = EventDelegateFeedConsent{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventDelegateFeedConsent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventDelegateFeedConsent) ProtoMessage() {} + +// Deprecated: Use EventDelegateFeedConsent.ProtoReflect.Descriptor instead. +func (*EventDelegateFeedConsent) Descriptor() ([]byte, []int) { + return file_oracle_v1_events_proto_rawDescGZIP(), []int{0} +} + +func (x *EventDelegateFeedConsent) GetOperator() string { + if x != nil { + return x.Operator + } + return "" +} + +func (x *EventDelegateFeedConsent) GetDelegate() string { + if x != nil { + return x.Delegate + } + return "" +} + +// EventSetFxRate is emitted on exchange rate update +type EventSetFxRate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // uToken denom + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // Exchange rate (based to USD) + Rate string `protobuf:"bytes,2,opt,name=rate,proto3" json:"rate,omitempty"` +} + +func (x *EventSetFxRate) Reset() { + *x = EventSetFxRate{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventSetFxRate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventSetFxRate) ProtoMessage() {} + +// Deprecated: Use EventSetFxRate.ProtoReflect.Descriptor instead. +func (*EventSetFxRate) Descriptor() ([]byte, []int) { + return file_oracle_v1_events_proto_rawDescGZIP(), []int{1} +} + +func (x *EventSetFxRate) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *EventSetFxRate) GetRate() string { + if x != nil { + return x.Rate + } + return "" +} + +var File_oracle_v1_events_proto protoreflect.FileDescriptor + +var file_oracle_v1_events_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, + 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x01, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x74, 0x12, 0x34, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x34, 0x0a, 0x08, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x08, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x22, 0x6d, 0x0a, + 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x46, 0x78, 0x52, 0x61, 0x74, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x45, 0x0a, 0x04, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x42, 0x9c, 0x01, 0x0a, + 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x65, 0x76, 0x4d, 0x69, + 0x74, 0x68, 0x72, 0x61, 0x6e, 0x2f, 0x64, 0x6d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_oracle_v1_events_proto_rawDescOnce sync.Once + file_oracle_v1_events_proto_rawDescData = file_oracle_v1_events_proto_rawDesc +) + +func file_oracle_v1_events_proto_rawDescGZIP() []byte { + file_oracle_v1_events_proto_rawDescOnce.Do(func() { + file_oracle_v1_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_v1_events_proto_rawDescData) + }) + return file_oracle_v1_events_proto_rawDescData +} + +var file_oracle_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_oracle_v1_events_proto_goTypes = []interface{}{ + (*EventDelegateFeedConsent)(nil), // 0: oracle.v1.EventDelegateFeedConsent + (*EventSetFxRate)(nil), // 1: oracle.v1.EventSetFxRate +} +var file_oracle_v1_events_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_oracle_v1_events_proto_init() } +func file_oracle_v1_events_proto_init() { + if File_oracle_v1_events_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_oracle_v1_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventDelegateFeedConsent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventSetFxRate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_oracle_v1_events_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_oracle_v1_events_proto_goTypes, + DependencyIndexes: file_oracle_v1_events_proto_depIdxs, + MessageInfos: file_oracle_v1_events_proto_msgTypes, + }.Build() + File_oracle_v1_events_proto = out.File + file_oracle_v1_events_proto_rawDesc = nil + file_oracle_v1_events_proto_goTypes = nil + file_oracle_v1_events_proto_depIdxs = nil +} diff --git a/api/oracle/v1/genesis.pulsar.go b/api/oracle/v1/genesis.pulsar.go new file mode 100644 index 0000000..40a6054 --- /dev/null +++ b/api/oracle/v1/genesis.pulsar.go @@ -0,0 +1,2898 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package oraclev1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_GenesisState_2_list)(nil) + +type _GenesisState_2_list struct { + list *[]*FeederDelegation +} + +func (x *_GenesisState_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*FeederDelegation) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*FeederDelegation) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { + v := new(FeederDelegation) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_2_list) NewElement() protoreflect.Value { + v := new(FeederDelegation) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_3_list)(nil) + +type _GenesisState_3_list struct { + list *[]*v1beta1.DecCoin +} + +func (x *_GenesisState_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_4_list)(nil) + +type _GenesisState_4_list struct { + list *[]*MissCounter +} + +func (x *_GenesisState_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*MissCounter) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*MissCounter) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { + v := new(MissCounter) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_4_list) NewElement() protoreflect.Value { + v := new(MissCounter) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_4_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_5_list)(nil) + +type _GenesisState_5_list struct { + list *[]*AggregateExchangeRatePrevote +} + +func (x *_GenesisState_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AggregateExchangeRatePrevote) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AggregateExchangeRatePrevote) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { + v := new(AggregateExchangeRatePrevote) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_5_list) NewElement() protoreflect.Value { + v := new(AggregateExchangeRatePrevote) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_5_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_6_list)(nil) + +type _GenesisState_6_list struct { + list *[]*AggregateExchangeRateVote +} + +func (x *_GenesisState_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AggregateExchangeRateVote) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AggregateExchangeRateVote) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_6_list) AppendMutable() protoreflect.Value { + v := new(AggregateExchangeRateVote) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_6_list) NewElement() protoreflect.Value { + v := new(AggregateExchangeRateVote) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_6_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_7_list)(nil) + +type _GenesisState_7_list struct { + list *[]*PriceStamp +} + +func (x *_GenesisState_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PriceStamp) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PriceStamp) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_7_list) AppendMutable() protoreflect.Value { + v := new(PriceStamp) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_7_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_7_list) NewElement() protoreflect.Value { + v := new(PriceStamp) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_7_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_8_list)(nil) + +type _GenesisState_8_list struct { + list *[]*PriceStamp +} + +func (x *_GenesisState_8_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PriceStamp) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PriceStamp) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_8_list) AppendMutable() protoreflect.Value { + v := new(PriceStamp) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_8_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_8_list) NewElement() protoreflect.Value { + v := new(PriceStamp) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_8_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_9_list)(nil) + +type _GenesisState_9_list struct { + list *[]*PriceStamp +} + +func (x *_GenesisState_9_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_9_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_9_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PriceStamp) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_9_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PriceStamp) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_9_list) AppendMutable() protoreflect.Value { + v := new(PriceStamp) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_9_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_9_list) NewElement() protoreflect.Value { + v := new(PriceStamp) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_9_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_feeder_delegations protoreflect.FieldDescriptor + fd_GenesisState_exchange_rates protoreflect.FieldDescriptor + fd_GenesisState_miss_counters protoreflect.FieldDescriptor + fd_GenesisState_aggregate_exchange_rate_prevotes protoreflect.FieldDescriptor + fd_GenesisState_aggregate_exchange_rate_votes protoreflect.FieldDescriptor + fd_GenesisState_medians protoreflect.FieldDescriptor + fd_GenesisState_historic_prices protoreflect.FieldDescriptor + fd_GenesisState_median_deviations protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_genesis_proto_init() + md_GenesisState = File_oracle_v1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") + fd_GenesisState_feeder_delegations = md_GenesisState.Fields().ByName("feeder_delegations") + fd_GenesisState_exchange_rates = md_GenesisState.Fields().ByName("exchange_rates") + fd_GenesisState_miss_counters = md_GenesisState.Fields().ByName("miss_counters") + fd_GenesisState_aggregate_exchange_rate_prevotes = md_GenesisState.Fields().ByName("aggregate_exchange_rate_prevotes") + fd_GenesisState_aggregate_exchange_rate_votes = md_GenesisState.Fields().ByName("aggregate_exchange_rate_votes") + fd_GenesisState_medians = md_GenesisState.Fields().ByName("medians") + fd_GenesisState_historic_prices = md_GenesisState.Fields().ByName("historic_prices") + fd_GenesisState_median_deviations = md_GenesisState.Fields().ByName("median_deviations") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_genesis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, value) { + return + } + } + if len(x.FeederDelegations) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.FeederDelegations}) + if !f(fd_GenesisState_feeder_delegations, value) { + return + } + } + if len(x.ExchangeRates) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.ExchangeRates}) + if !f(fd_GenesisState_exchange_rates, value) { + return + } + } + if len(x.MissCounters) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.MissCounters}) + if !f(fd_GenesisState_miss_counters, value) { + return + } + } + if len(x.AggregateExchangeRatePrevotes) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.AggregateExchangeRatePrevotes}) + if !f(fd_GenesisState_aggregate_exchange_rate_prevotes, value) { + return + } + } + if len(x.AggregateExchangeRateVotes) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_6_list{list: &x.AggregateExchangeRateVotes}) + if !f(fd_GenesisState_aggregate_exchange_rate_votes, value) { + return + } + } + if len(x.Medians) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_7_list{list: &x.Medians}) + if !f(fd_GenesisState_medians, value) { + return + } + } + if len(x.HistoricPrices) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_8_list{list: &x.HistoricPrices}) + if !f(fd_GenesisState_historic_prices, value) { + return + } + } + if len(x.MedianDeviations) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_9_list{list: &x.MedianDeviations}) + if !f(fd_GenesisState_median_deviations, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.GenesisState.params": + return x.Params != nil + case "oracle.v1.GenesisState.feeder_delegations": + return len(x.FeederDelegations) != 0 + case "oracle.v1.GenesisState.exchange_rates": + return len(x.ExchangeRates) != 0 + case "oracle.v1.GenesisState.miss_counters": + return len(x.MissCounters) != 0 + case "oracle.v1.GenesisState.aggregate_exchange_rate_prevotes": + return len(x.AggregateExchangeRatePrevotes) != 0 + case "oracle.v1.GenesisState.aggregate_exchange_rate_votes": + return len(x.AggregateExchangeRateVotes) != 0 + case "oracle.v1.GenesisState.medians": + return len(x.Medians) != 0 + case "oracle.v1.GenesisState.historic_prices": + return len(x.HistoricPrices) != 0 + case "oracle.v1.GenesisState.median_deviations": + return len(x.MedianDeviations) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + } + panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.GenesisState.params": + x.Params = nil + case "oracle.v1.GenesisState.feeder_delegations": + x.FeederDelegations = nil + case "oracle.v1.GenesisState.exchange_rates": + x.ExchangeRates = nil + case "oracle.v1.GenesisState.miss_counters": + x.MissCounters = nil + case "oracle.v1.GenesisState.aggregate_exchange_rate_prevotes": + x.AggregateExchangeRatePrevotes = nil + case "oracle.v1.GenesisState.aggregate_exchange_rate_votes": + x.AggregateExchangeRateVotes = nil + case "oracle.v1.GenesisState.medians": + x.Medians = nil + case "oracle.v1.GenesisState.historic_prices": + x.HistoricPrices = nil + case "oracle.v1.GenesisState.median_deviations": + x.MedianDeviations = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + } + panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "oracle.v1.GenesisState.feeder_delegations": + if len(x.FeederDelegations) == 0 { + return protoreflect.ValueOfList(&_GenesisState_2_list{}) + } + listValue := &_GenesisState_2_list{list: &x.FeederDelegations} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.GenesisState.exchange_rates": + if len(x.ExchangeRates) == 0 { + return protoreflect.ValueOfList(&_GenesisState_3_list{}) + } + listValue := &_GenesisState_3_list{list: &x.ExchangeRates} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.GenesisState.miss_counters": + if len(x.MissCounters) == 0 { + return protoreflect.ValueOfList(&_GenesisState_4_list{}) + } + listValue := &_GenesisState_4_list{list: &x.MissCounters} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.GenesisState.aggregate_exchange_rate_prevotes": + if len(x.AggregateExchangeRatePrevotes) == 0 { + return protoreflect.ValueOfList(&_GenesisState_5_list{}) + } + listValue := &_GenesisState_5_list{list: &x.AggregateExchangeRatePrevotes} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.GenesisState.aggregate_exchange_rate_votes": + if len(x.AggregateExchangeRateVotes) == 0 { + return protoreflect.ValueOfList(&_GenesisState_6_list{}) + } + listValue := &_GenesisState_6_list{list: &x.AggregateExchangeRateVotes} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.GenesisState.medians": + if len(x.Medians) == 0 { + return protoreflect.ValueOfList(&_GenesisState_7_list{}) + } + listValue := &_GenesisState_7_list{list: &x.Medians} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.GenesisState.historic_prices": + if len(x.HistoricPrices) == 0 { + return protoreflect.ValueOfList(&_GenesisState_8_list{}) + } + listValue := &_GenesisState_8_list{list: &x.HistoricPrices} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.GenesisState.median_deviations": + if len(x.MedianDeviations) == 0 { + return protoreflect.ValueOfList(&_GenesisState_9_list{}) + } + listValue := &_GenesisState_9_list{list: &x.MedianDeviations} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + } + panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.GenesisState.params": + x.Params = value.Message().Interface().(*Params) + case "oracle.v1.GenesisState.feeder_delegations": + lv := value.List() + clv := lv.(*_GenesisState_2_list) + x.FeederDelegations = *clv.list + case "oracle.v1.GenesisState.exchange_rates": + lv := value.List() + clv := lv.(*_GenesisState_3_list) + x.ExchangeRates = *clv.list + case "oracle.v1.GenesisState.miss_counters": + lv := value.List() + clv := lv.(*_GenesisState_4_list) + x.MissCounters = *clv.list + case "oracle.v1.GenesisState.aggregate_exchange_rate_prevotes": + lv := value.List() + clv := lv.(*_GenesisState_5_list) + x.AggregateExchangeRatePrevotes = *clv.list + case "oracle.v1.GenesisState.aggregate_exchange_rate_votes": + lv := value.List() + clv := lv.(*_GenesisState_6_list) + x.AggregateExchangeRateVotes = *clv.list + case "oracle.v1.GenesisState.medians": + lv := value.List() + clv := lv.(*_GenesisState_7_list) + x.Medians = *clv.list + case "oracle.v1.GenesisState.historic_prices": + lv := value.List() + clv := lv.(*_GenesisState_8_list) + x.HistoricPrices = *clv.list + case "oracle.v1.GenesisState.median_deviations": + lv := value.List() + clv := lv.(*_GenesisState_9_list) + x.MedianDeviations = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + } + panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "oracle.v1.GenesisState.feeder_delegations": + if x.FeederDelegations == nil { + x.FeederDelegations = []*FeederDelegation{} + } + value := &_GenesisState_2_list{list: &x.FeederDelegations} + return protoreflect.ValueOfList(value) + case "oracle.v1.GenesisState.exchange_rates": + if x.ExchangeRates == nil { + x.ExchangeRates = []*v1beta1.DecCoin{} + } + value := &_GenesisState_3_list{list: &x.ExchangeRates} + return protoreflect.ValueOfList(value) + case "oracle.v1.GenesisState.miss_counters": + if x.MissCounters == nil { + x.MissCounters = []*MissCounter{} + } + value := &_GenesisState_4_list{list: &x.MissCounters} + return protoreflect.ValueOfList(value) + case "oracle.v1.GenesisState.aggregate_exchange_rate_prevotes": + if x.AggregateExchangeRatePrevotes == nil { + x.AggregateExchangeRatePrevotes = []*AggregateExchangeRatePrevote{} + } + value := &_GenesisState_5_list{list: &x.AggregateExchangeRatePrevotes} + return protoreflect.ValueOfList(value) + case "oracle.v1.GenesisState.aggregate_exchange_rate_votes": + if x.AggregateExchangeRateVotes == nil { + x.AggregateExchangeRateVotes = []*AggregateExchangeRateVote{} + } + value := &_GenesisState_6_list{list: &x.AggregateExchangeRateVotes} + return protoreflect.ValueOfList(value) + case "oracle.v1.GenesisState.medians": + if x.Medians == nil { + x.Medians = []*PriceStamp{} + } + value := &_GenesisState_7_list{list: &x.Medians} + return protoreflect.ValueOfList(value) + case "oracle.v1.GenesisState.historic_prices": + if x.HistoricPrices == nil { + x.HistoricPrices = []*PriceStamp{} + } + value := &_GenesisState_8_list{list: &x.HistoricPrices} + return protoreflect.ValueOfList(value) + case "oracle.v1.GenesisState.median_deviations": + if x.MedianDeviations == nil { + x.MedianDeviations = []*PriceStamp{} + } + value := &_GenesisState_9_list{list: &x.MedianDeviations} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + } + panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "oracle.v1.GenesisState.feeder_delegations": + list := []*FeederDelegation{} + return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) + case "oracle.v1.GenesisState.exchange_rates": + list := []*v1beta1.DecCoin{} + return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) + case "oracle.v1.GenesisState.miss_counters": + list := []*MissCounter{} + return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) + case "oracle.v1.GenesisState.aggregate_exchange_rate_prevotes": + list := []*AggregateExchangeRatePrevote{} + return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) + case "oracle.v1.GenesisState.aggregate_exchange_rate_votes": + list := []*AggregateExchangeRateVote{} + return protoreflect.ValueOfList(&_GenesisState_6_list{list: &list}) + case "oracle.v1.GenesisState.medians": + list := []*PriceStamp{} + return protoreflect.ValueOfList(&_GenesisState_7_list{list: &list}) + case "oracle.v1.GenesisState.historic_prices": + list := []*PriceStamp{} + return protoreflect.ValueOfList(&_GenesisState_8_list{list: &list}) + case "oracle.v1.GenesisState.median_deviations": + list := []*PriceStamp{} + return protoreflect.ValueOfList(&_GenesisState_9_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + } + panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.GenesisState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GenesisState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.FeederDelegations) > 0 { + for _, e := range x.FeederDelegations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.ExchangeRates) > 0 { + for _, e := range x.ExchangeRates { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.MissCounters) > 0 { + for _, e := range x.MissCounters { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.AggregateExchangeRatePrevotes) > 0 { + for _, e := range x.AggregateExchangeRatePrevotes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.AggregateExchangeRateVotes) > 0 { + for _, e := range x.AggregateExchangeRateVotes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Medians) > 0 { + for _, e := range x.Medians { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.HistoricPrices) > 0 { + for _, e := range x.HistoricPrices { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.MedianDeviations) > 0 { + for _, e := range x.MedianDeviations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.MedianDeviations) > 0 { + for iNdEx := len(x.MedianDeviations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.MedianDeviations[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x4a + } + } + if len(x.HistoricPrices) > 0 { + for iNdEx := len(x.HistoricPrices) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.HistoricPrices[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x42 + } + } + if len(x.Medians) > 0 { + for iNdEx := len(x.Medians) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Medians[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } + } + if len(x.AggregateExchangeRateVotes) > 0 { + for iNdEx := len(x.AggregateExchangeRateVotes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AggregateExchangeRateVotes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + } + if len(x.AggregateExchangeRatePrevotes) > 0 { + for iNdEx := len(x.AggregateExchangeRatePrevotes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AggregateExchangeRatePrevotes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + } + if len(x.MissCounters) > 0 { + for iNdEx := len(x.MissCounters) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.MissCounters[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.ExchangeRates) > 0 { + for iNdEx := len(x.ExchangeRates) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ExchangeRates[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.FeederDelegations) > 0 { + for iNdEx := len(x.FeederDelegations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.FeederDelegations[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeederDelegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FeederDelegations = append(x.FeederDelegations, &FeederDelegation{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FeederDelegations[len(x.FeederDelegations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExchangeRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ExchangeRates = append(x.ExchangeRates, &v1beta1.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExchangeRates[len(x.ExchangeRates)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MissCounters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.MissCounters = append(x.MissCounters, &MissCounter{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MissCounters[len(x.MissCounters)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AggregateExchangeRatePrevotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AggregateExchangeRatePrevotes = append(x.AggregateExchangeRatePrevotes, &AggregateExchangeRatePrevote{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AggregateExchangeRatePrevotes[len(x.AggregateExchangeRatePrevotes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AggregateExchangeRateVotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AggregateExchangeRateVotes = append(x.AggregateExchangeRateVotes, &AggregateExchangeRateVote{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AggregateExchangeRateVotes[len(x.AggregateExchangeRateVotes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Medians", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Medians = append(x.Medians, &PriceStamp{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Medians[len(x.Medians)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HistoricPrices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.HistoricPrices = append(x.HistoricPrices, &PriceStamp{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HistoricPrices[len(x.HistoricPrices)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MedianDeviations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.MedianDeviations = append(x.MedianDeviations, &PriceStamp{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MedianDeviations[len(x.MedianDeviations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_FeederDelegation protoreflect.MessageDescriptor + fd_FeederDelegation_feeder_address protoreflect.FieldDescriptor + fd_FeederDelegation_validator_address protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_genesis_proto_init() + md_FeederDelegation = File_oracle_v1_genesis_proto.Messages().ByName("FeederDelegation") + fd_FeederDelegation_feeder_address = md_FeederDelegation.Fields().ByName("feeder_address") + fd_FeederDelegation_validator_address = md_FeederDelegation.Fields().ByName("validator_address") +} + +var _ protoreflect.Message = (*fastReflection_FeederDelegation)(nil) + +type fastReflection_FeederDelegation FeederDelegation + +func (x *FeederDelegation) ProtoReflect() protoreflect.Message { + return (*fastReflection_FeederDelegation)(x) +} + +func (x *FeederDelegation) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_genesis_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_FeederDelegation_messageType fastReflection_FeederDelegation_messageType +var _ protoreflect.MessageType = fastReflection_FeederDelegation_messageType{} + +type fastReflection_FeederDelegation_messageType struct{} + +func (x fastReflection_FeederDelegation_messageType) Zero() protoreflect.Message { + return (*fastReflection_FeederDelegation)(nil) +} +func (x fastReflection_FeederDelegation_messageType) New() protoreflect.Message { + return new(fastReflection_FeederDelegation) +} +func (x fastReflection_FeederDelegation_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_FeederDelegation +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_FeederDelegation) Descriptor() protoreflect.MessageDescriptor { + return md_FeederDelegation +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_FeederDelegation) Type() protoreflect.MessageType { + return _fastReflection_FeederDelegation_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_FeederDelegation) New() protoreflect.Message { + return new(fastReflection_FeederDelegation) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_FeederDelegation) Interface() protoreflect.ProtoMessage { + return (*FeederDelegation)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_FeederDelegation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.FeederAddress != "" { + value := protoreflect.ValueOfString(x.FeederAddress) + if !f(fd_FeederDelegation_feeder_address, value) { + return + } + } + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_FeederDelegation_validator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_FeederDelegation) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.FeederDelegation.feeder_address": + return x.FeederAddress != "" + case "oracle.v1.FeederDelegation.validator_address": + return x.ValidatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.FeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.FeederDelegation does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeederDelegation) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.FeederDelegation.feeder_address": + x.FeederAddress = "" + case "oracle.v1.FeederDelegation.validator_address": + x.ValidatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.FeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.FeederDelegation does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_FeederDelegation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.FeederDelegation.feeder_address": + value := x.FeederAddress + return protoreflect.ValueOfString(value) + case "oracle.v1.FeederDelegation.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.FeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.FeederDelegation does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeederDelegation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.FeederDelegation.feeder_address": + x.FeederAddress = value.Interface().(string) + case "oracle.v1.FeederDelegation.validator_address": + x.ValidatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.FeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.FeederDelegation does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeederDelegation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.FeederDelegation.feeder_address": + panic(fmt.Errorf("field feeder_address of message oracle.v1.FeederDelegation is not mutable")) + case "oracle.v1.FeederDelegation.validator_address": + panic(fmt.Errorf("field validator_address of message oracle.v1.FeederDelegation is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.FeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.FeederDelegation does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_FeederDelegation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.FeederDelegation.feeder_address": + return protoreflect.ValueOfString("") + case "oracle.v1.FeederDelegation.validator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.FeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.FeederDelegation does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_FeederDelegation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.FeederDelegation", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_FeederDelegation) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeederDelegation) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_FeederDelegation) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_FeederDelegation) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*FeederDelegation) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.FeederAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*FeederDelegation) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.FeederAddress) > 0 { + i -= len(x.FeederAddress) + copy(dAtA[i:], x.FeederAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeederAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*FeederDelegation) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FeederDelegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FeederDelegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeederAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FeederAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MissCounter protoreflect.MessageDescriptor + fd_MissCounter_validator_address protoreflect.FieldDescriptor + fd_MissCounter_miss_counter protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_genesis_proto_init() + md_MissCounter = File_oracle_v1_genesis_proto.Messages().ByName("MissCounter") + fd_MissCounter_validator_address = md_MissCounter.Fields().ByName("validator_address") + fd_MissCounter_miss_counter = md_MissCounter.Fields().ByName("miss_counter") +} + +var _ protoreflect.Message = (*fastReflection_MissCounter)(nil) + +type fastReflection_MissCounter MissCounter + +func (x *MissCounter) ProtoReflect() protoreflect.Message { + return (*fastReflection_MissCounter)(x) +} + +func (x *MissCounter) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_genesis_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MissCounter_messageType fastReflection_MissCounter_messageType +var _ protoreflect.MessageType = fastReflection_MissCounter_messageType{} + +type fastReflection_MissCounter_messageType struct{} + +func (x fastReflection_MissCounter_messageType) Zero() protoreflect.Message { + return (*fastReflection_MissCounter)(nil) +} +func (x fastReflection_MissCounter_messageType) New() protoreflect.Message { + return new(fastReflection_MissCounter) +} +func (x fastReflection_MissCounter_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MissCounter +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MissCounter) Descriptor() protoreflect.MessageDescriptor { + return md_MissCounter +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MissCounter) Type() protoreflect.MessageType { + return _fastReflection_MissCounter_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MissCounter) New() protoreflect.Message { + return new(fastReflection_MissCounter) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MissCounter) Interface() protoreflect.ProtoMessage { + return (*MissCounter)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MissCounter) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_MissCounter_validator_address, value) { + return + } + } + if x.MissCounter != uint64(0) { + value := protoreflect.ValueOfUint64(x.MissCounter) + if !f(fd_MissCounter_miss_counter, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MissCounter) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.MissCounter.validator_address": + return x.ValidatorAddress != "" + case "oracle.v1.MissCounter.miss_counter": + return x.MissCounter != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MissCounter")) + } + panic(fmt.Errorf("message oracle.v1.MissCounter does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MissCounter) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.MissCounter.validator_address": + x.ValidatorAddress = "" + case "oracle.v1.MissCounter.miss_counter": + x.MissCounter = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MissCounter")) + } + panic(fmt.Errorf("message oracle.v1.MissCounter does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MissCounter) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.MissCounter.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "oracle.v1.MissCounter.miss_counter": + value := x.MissCounter + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MissCounter")) + } + panic(fmt.Errorf("message oracle.v1.MissCounter does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MissCounter) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.MissCounter.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "oracle.v1.MissCounter.miss_counter": + x.MissCounter = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MissCounter")) + } + panic(fmt.Errorf("message oracle.v1.MissCounter does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MissCounter) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MissCounter.validator_address": + panic(fmt.Errorf("field validator_address of message oracle.v1.MissCounter is not mutable")) + case "oracle.v1.MissCounter.miss_counter": + panic(fmt.Errorf("field miss_counter of message oracle.v1.MissCounter is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MissCounter")) + } + panic(fmt.Errorf("message oracle.v1.MissCounter does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MissCounter) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MissCounter.validator_address": + return protoreflect.ValueOfString("") + case "oracle.v1.MissCounter.miss_counter": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MissCounter")) + } + panic(fmt.Errorf("message oracle.v1.MissCounter does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MissCounter) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MissCounter", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MissCounter) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MissCounter) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MissCounter) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MissCounter) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MissCounter) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.MissCounter != 0 { + n += 1 + runtime.Sov(uint64(x.MissCounter)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MissCounter) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.MissCounter != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MissCounter)) + i-- + dAtA[i] = 0x10 + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MissCounter) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MissCounter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MissCounter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MissCounter", wireType) + } + x.MissCounter = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.MissCounter |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: oracle/v1/genesis.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GenesisState defines the module genesis state +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Params defines all the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + FeederDelegations []*FeederDelegation `protobuf:"bytes,2,rep,name=feeder_delegations,json=feederDelegations,proto3" json:"feeder_delegations,omitempty"` + ExchangeRates []*v1beta1.DecCoin `protobuf:"bytes,3,rep,name=exchange_rates,json=exchangeRates,proto3" json:"exchange_rates,omitempty"` + MissCounters []*MissCounter `protobuf:"bytes,4,rep,name=miss_counters,json=missCounters,proto3" json:"miss_counters,omitempty"` + AggregateExchangeRatePrevotes []*AggregateExchangeRatePrevote `protobuf:"bytes,5,rep,name=aggregate_exchange_rate_prevotes,json=aggregateExchangeRatePrevotes,proto3" json:"aggregate_exchange_rate_prevotes,omitempty"` + AggregateExchangeRateVotes []*AggregateExchangeRateVote `protobuf:"bytes,6,rep,name=aggregate_exchange_rate_votes,json=aggregateExchangeRateVotes,proto3" json:"aggregate_exchange_rate_votes,omitempty"` + Medians []*PriceStamp `protobuf:"bytes,7,rep,name=medians,proto3" json:"medians,omitempty"` + HistoricPrices []*PriceStamp `protobuf:"bytes,8,rep,name=historic_prices,json=historicPrices,proto3" json:"historic_prices,omitempty"` + MedianDeviations []*PriceStamp `protobuf:"bytes,9,rep,name=median_deviations,json=medianDeviations,proto3" json:"median_deviations,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_oracle_v1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +func (x *GenesisState) GetFeederDelegations() []*FeederDelegation { + if x != nil { + return x.FeederDelegations + } + return nil +} + +func (x *GenesisState) GetExchangeRates() []*v1beta1.DecCoin { + if x != nil { + return x.ExchangeRates + } + return nil +} + +func (x *GenesisState) GetMissCounters() []*MissCounter { + if x != nil { + return x.MissCounters + } + return nil +} + +func (x *GenesisState) GetAggregateExchangeRatePrevotes() []*AggregateExchangeRatePrevote { + if x != nil { + return x.AggregateExchangeRatePrevotes + } + return nil +} + +func (x *GenesisState) GetAggregateExchangeRateVotes() []*AggregateExchangeRateVote { + if x != nil { + return x.AggregateExchangeRateVotes + } + return nil +} + +func (x *GenesisState) GetMedians() []*PriceStamp { + if x != nil { + return x.Medians + } + return nil +} + +func (x *GenesisState) GetHistoricPrices() []*PriceStamp { + if x != nil { + return x.HistoricPrices + } + return nil +} + +func (x *GenesisState) GetMedianDeviations() []*PriceStamp { + if x != nil { + return x.MedianDeviations + } + return nil +} + +// FeederDelegation is the address for where oracle feeder authority are +// delegated to. By default this struct is only used at genesis to feed in +// default feeder addresses. +type FeederDelegation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FeederAddress string `protobuf:"bytes,1,opt,name=feeder_address,json=feederAddress,proto3" json:"feeder_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (x *FeederDelegation) Reset() { + *x = FeederDelegation{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_genesis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FeederDelegation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeederDelegation) ProtoMessage() {} + +// Deprecated: Use FeederDelegation.ProtoReflect.Descriptor instead. +func (*FeederDelegation) Descriptor() ([]byte, []int) { + return file_oracle_v1_genesis_proto_rawDescGZIP(), []int{1} +} + +func (x *FeederDelegation) GetFeederAddress() string { + if x != nil { + return x.FeederAddress + } + return "" +} + +func (x *FeederDelegation) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +// MissCounter defines an miss counter and validator address pair used in +// oracle module's genesis state +type MissCounter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + MissCounter uint64 `protobuf:"varint,2,opt,name=miss_counter,json=missCounter,proto3" json:"miss_counter,omitempty"` +} + +func (x *MissCounter) Reset() { + *x = MissCounter{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_genesis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MissCounter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MissCounter) ProtoMessage() {} + +// Deprecated: Use MissCounter.ProtoReflect.Descriptor instead. +func (*MissCounter) Descriptor() ([]byte, []int) { + return file_oracle_v1_genesis_proto_rawDescGZIP(), []int{2} +} + +func (x *MissCounter) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *MissCounter) GetMissCounter() uint64 { + if x != nil { + return x.MissCounter + } + return 0 +} + +var File_oracle_v1_genesis_proto protoreflect.FileDescriptor + +var file_oracle_v1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xfc, 0x05, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x5f, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, + 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x11, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x78, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, + 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, + 0x73, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, + 0x12, 0x41, 0x0a, 0x0d, 0x6d, 0x69, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x6d, 0x69, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x73, 0x12, 0x76, 0x0a, 0x20, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x70, + 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, + 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x1d, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x6d, 0x0a, 0x1d, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x1a, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, + 0x73, 0x12, 0x44, 0x0a, 0x0f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, + 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x6e, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, + 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x66, 0x0a, 0x10, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, + 0x65, 0x65, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x11, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x5d, 0x0a, 0x0b, 0x4d, 0x69, 0x73, + 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x73, 0x73, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x69, 0x73, + 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x99, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, + 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x65, 0x76, 0x4d, 0x69, 0x74, 0x68, 0x72, + 0x61, 0x6e, 0x2f, 0x64, 0x6d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x15, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_oracle_v1_genesis_proto_rawDescOnce sync.Once + file_oracle_v1_genesis_proto_rawDescData = file_oracle_v1_genesis_proto_rawDesc +) + +func file_oracle_v1_genesis_proto_rawDescGZIP() []byte { + file_oracle_v1_genesis_proto_rawDescOnce.Do(func() { + file_oracle_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_v1_genesis_proto_rawDescData) + }) + return file_oracle_v1_genesis_proto_rawDescData +} + +var file_oracle_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_oracle_v1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: oracle.v1.GenesisState + (*FeederDelegation)(nil), // 1: oracle.v1.FeederDelegation + (*MissCounter)(nil), // 2: oracle.v1.MissCounter + (*Params)(nil), // 3: oracle.v1.Params + (*v1beta1.DecCoin)(nil), // 4: cosmos.base.v1beta1.DecCoin + (*AggregateExchangeRatePrevote)(nil), // 5: oracle.v1.AggregateExchangeRatePrevote + (*AggregateExchangeRateVote)(nil), // 6: oracle.v1.AggregateExchangeRateVote + (*PriceStamp)(nil), // 7: oracle.v1.PriceStamp +} +var file_oracle_v1_genesis_proto_depIdxs = []int32{ + 3, // 0: oracle.v1.GenesisState.params:type_name -> oracle.v1.Params + 1, // 1: oracle.v1.GenesisState.feeder_delegations:type_name -> oracle.v1.FeederDelegation + 4, // 2: oracle.v1.GenesisState.exchange_rates:type_name -> cosmos.base.v1beta1.DecCoin + 2, // 3: oracle.v1.GenesisState.miss_counters:type_name -> oracle.v1.MissCounter + 5, // 4: oracle.v1.GenesisState.aggregate_exchange_rate_prevotes:type_name -> oracle.v1.AggregateExchangeRatePrevote + 6, // 5: oracle.v1.GenesisState.aggregate_exchange_rate_votes:type_name -> oracle.v1.AggregateExchangeRateVote + 7, // 6: oracle.v1.GenesisState.medians:type_name -> oracle.v1.PriceStamp + 7, // 7: oracle.v1.GenesisState.historic_prices:type_name -> oracle.v1.PriceStamp + 7, // 8: oracle.v1.GenesisState.median_deviations:type_name -> oracle.v1.PriceStamp + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_oracle_v1_genesis_proto_init() } +func file_oracle_v1_genesis_proto_init() { + if File_oracle_v1_genesis_proto != nil { + return + } + file_oracle_v1_oracle_proto_init() + if !protoimpl.UnsafeEnabled { + file_oracle_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FeederDelegation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MissCounter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_oracle_v1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_oracle_v1_genesis_proto_goTypes, + DependencyIndexes: file_oracle_v1_genesis_proto_depIdxs, + MessageInfos: file_oracle_v1_genesis_proto_msgTypes, + }.Build() + File_oracle_v1_genesis_proto = out.File + file_oracle_v1_genesis_proto_rawDesc = nil + file_oracle_v1_genesis_proto_goTypes = nil + file_oracle_v1_genesis_proto_depIdxs = nil +} diff --git a/api/oracle/v1/oracle.pulsar.go b/api/oracle/v1/oracle.pulsar.go new file mode 100644 index 0000000..733914a --- /dev/null +++ b/api/oracle/v1/oracle.pulsar.go @@ -0,0 +1,8262 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package oraclev1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_Params_3_list)(nil) + +type _Params_3_list struct { + list *[]*RewardBand +} + +func (x *_Params_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*RewardBand) + (*x.list)[i] = concreteValue +} + +func (x *_Params_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*RewardBand) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_3_list) AppendMutable() protoreflect.Value { + v := new(RewardBand) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_3_list) NewElement() protoreflect.Value { + v := new(RewardBand) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Params_5_list)(nil) + +type _Params_5_list struct { + list *[]*Denom +} + +func (x *_Params_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Denom) + (*x.list)[i] = concreteValue +} + +func (x *_Params_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Denom) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_5_list) AppendMutable() protoreflect.Value { + v := new(Denom) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_5_list) NewElement() protoreflect.Value { + v := new(Denom) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_5_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Params_9_list)(nil) + +type _Params_9_list struct { + list *[]*Denom +} + +func (x *_Params_9_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_9_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_9_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Denom) + (*x.list)[i] = concreteValue +} + +func (x *_Params_9_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Denom) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_9_list) AppendMutable() protoreflect.Value { + v := new(Denom) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_9_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_9_list) NewElement() protoreflect.Value { + v := new(Denom) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_9_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Params_14_list)(nil) + +type _Params_14_list struct { + list *[]*CurrencyPairProviders +} + +func (x *_Params_14_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_14_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_14_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyPairProviders) + (*x.list)[i] = concreteValue +} + +func (x *_Params_14_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyPairProviders) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_14_list) AppendMutable() protoreflect.Value { + v := new(CurrencyPairProviders) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_14_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_14_list) NewElement() protoreflect.Value { + v := new(CurrencyPairProviders) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_14_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Params_15_list)(nil) + +type _Params_15_list struct { + list *[]*CurrencyDeviationThreshold +} + +func (x *_Params_15_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_15_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_15_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyDeviationThreshold) + (*x.list)[i] = concreteValue +} + +func (x *_Params_15_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyDeviationThreshold) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_15_list) AppendMutable() protoreflect.Value { + v := new(CurrencyDeviationThreshold) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_15_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_15_list) NewElement() protoreflect.Value { + v := new(CurrencyDeviationThreshold) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_15_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Params protoreflect.MessageDescriptor + fd_Params_vote_period protoreflect.FieldDescriptor + fd_Params_vote_threshold protoreflect.FieldDescriptor + fd_Params_reward_bands protoreflect.FieldDescriptor + fd_Params_reward_distribution_window protoreflect.FieldDescriptor + fd_Params_accept_list protoreflect.FieldDescriptor + fd_Params_slash_fraction protoreflect.FieldDescriptor + fd_Params_slash_window protoreflect.FieldDescriptor + fd_Params_min_valid_per_window protoreflect.FieldDescriptor + fd_Params_mandatory_list protoreflect.FieldDescriptor + fd_Params_historic_stamp_period protoreflect.FieldDescriptor + fd_Params_median_stamp_period protoreflect.FieldDescriptor + fd_Params_maximum_price_stamps protoreflect.FieldDescriptor + fd_Params_maximum_median_stamps protoreflect.FieldDescriptor + fd_Params_currency_pair_providers protoreflect.FieldDescriptor + fd_Params_currency_deviation_thresholds protoreflect.FieldDescriptor + fd_Params_usdc_ibc_denom protoreflect.FieldDescriptor + fd_Params_slashing_enabled protoreflect.FieldDescriptor + fd_Params_averaging_window protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_oracle_proto_init() + md_Params = File_oracle_v1_oracle_proto.Messages().ByName("Params") + fd_Params_vote_period = md_Params.Fields().ByName("vote_period") + fd_Params_vote_threshold = md_Params.Fields().ByName("vote_threshold") + fd_Params_reward_bands = md_Params.Fields().ByName("reward_bands") + fd_Params_reward_distribution_window = md_Params.Fields().ByName("reward_distribution_window") + fd_Params_accept_list = md_Params.Fields().ByName("accept_list") + fd_Params_slash_fraction = md_Params.Fields().ByName("slash_fraction") + fd_Params_slash_window = md_Params.Fields().ByName("slash_window") + fd_Params_min_valid_per_window = md_Params.Fields().ByName("min_valid_per_window") + fd_Params_mandatory_list = md_Params.Fields().ByName("mandatory_list") + fd_Params_historic_stamp_period = md_Params.Fields().ByName("historic_stamp_period") + fd_Params_median_stamp_period = md_Params.Fields().ByName("median_stamp_period") + fd_Params_maximum_price_stamps = md_Params.Fields().ByName("maximum_price_stamps") + fd_Params_maximum_median_stamps = md_Params.Fields().ByName("maximum_median_stamps") + fd_Params_currency_pair_providers = md_Params.Fields().ByName("currency_pair_providers") + fd_Params_currency_deviation_thresholds = md_Params.Fields().ByName("currency_deviation_thresholds") + fd_Params_usdc_ibc_denom = md_Params.Fields().ByName("usdc_ibc_denom") + fd_Params_slashing_enabled = md_Params.Fields().ByName("slashing_enabled") + fd_Params_averaging_window = md_Params.Fields().ByName("averaging_window") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_oracle_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.VotePeriod != uint64(0) { + value := protoreflect.ValueOfUint64(x.VotePeriod) + if !f(fd_Params_vote_period, value) { + return + } + } + if x.VoteThreshold != "" { + value := protoreflect.ValueOfString(x.VoteThreshold) + if !f(fd_Params_vote_threshold, value) { + return + } + } + if len(x.RewardBands) != 0 { + value := protoreflect.ValueOfList(&_Params_3_list{list: &x.RewardBands}) + if !f(fd_Params_reward_bands, value) { + return + } + } + if x.RewardDistributionWindow != uint64(0) { + value := protoreflect.ValueOfUint64(x.RewardDistributionWindow) + if !f(fd_Params_reward_distribution_window, value) { + return + } + } + if len(x.AcceptList) != 0 { + value := protoreflect.ValueOfList(&_Params_5_list{list: &x.AcceptList}) + if !f(fd_Params_accept_list, value) { + return + } + } + if x.SlashFraction != "" { + value := protoreflect.ValueOfString(x.SlashFraction) + if !f(fd_Params_slash_fraction, value) { + return + } + } + if x.SlashWindow != uint64(0) { + value := protoreflect.ValueOfUint64(x.SlashWindow) + if !f(fd_Params_slash_window, value) { + return + } + } + if x.MinValidPerWindow != "" { + value := protoreflect.ValueOfString(x.MinValidPerWindow) + if !f(fd_Params_min_valid_per_window, value) { + return + } + } + if len(x.MandatoryList) != 0 { + value := protoreflect.ValueOfList(&_Params_9_list{list: &x.MandatoryList}) + if !f(fd_Params_mandatory_list, value) { + return + } + } + if x.HistoricStampPeriod != uint64(0) { + value := protoreflect.ValueOfUint64(x.HistoricStampPeriod) + if !f(fd_Params_historic_stamp_period, value) { + return + } + } + if x.MedianStampPeriod != uint64(0) { + value := protoreflect.ValueOfUint64(x.MedianStampPeriod) + if !f(fd_Params_median_stamp_period, value) { + return + } + } + if x.MaximumPriceStamps != uint64(0) { + value := protoreflect.ValueOfUint64(x.MaximumPriceStamps) + if !f(fd_Params_maximum_price_stamps, value) { + return + } + } + if x.MaximumMedianStamps != uint64(0) { + value := protoreflect.ValueOfUint64(x.MaximumMedianStamps) + if !f(fd_Params_maximum_median_stamps, value) { + return + } + } + if len(x.CurrencyPairProviders) != 0 { + value := protoreflect.ValueOfList(&_Params_14_list{list: &x.CurrencyPairProviders}) + if !f(fd_Params_currency_pair_providers, value) { + return + } + } + if len(x.CurrencyDeviationThresholds) != 0 { + value := protoreflect.ValueOfList(&_Params_15_list{list: &x.CurrencyDeviationThresholds}) + if !f(fd_Params_currency_deviation_thresholds, value) { + return + } + } + if x.UsdcIbcDenom != "" { + value := protoreflect.ValueOfString(x.UsdcIbcDenom) + if !f(fd_Params_usdc_ibc_denom, value) { + return + } + } + if x.SlashingEnabled != false { + value := protoreflect.ValueOfBool(x.SlashingEnabled) + if !f(fd_Params_slashing_enabled, value) { + return + } + } + if x.AveragingWindow != uint64(0) { + value := protoreflect.ValueOfUint64(x.AveragingWindow) + if !f(fd_Params_averaging_window, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.Params.vote_period": + return x.VotePeriod != uint64(0) + case "oracle.v1.Params.vote_threshold": + return x.VoteThreshold != "" + case "oracle.v1.Params.reward_bands": + return len(x.RewardBands) != 0 + case "oracle.v1.Params.reward_distribution_window": + return x.RewardDistributionWindow != uint64(0) + case "oracle.v1.Params.accept_list": + return len(x.AcceptList) != 0 + case "oracle.v1.Params.slash_fraction": + return x.SlashFraction != "" + case "oracle.v1.Params.slash_window": + return x.SlashWindow != uint64(0) + case "oracle.v1.Params.min_valid_per_window": + return x.MinValidPerWindow != "" + case "oracle.v1.Params.mandatory_list": + return len(x.MandatoryList) != 0 + case "oracle.v1.Params.historic_stamp_period": + return x.HistoricStampPeriod != uint64(0) + case "oracle.v1.Params.median_stamp_period": + return x.MedianStampPeriod != uint64(0) + case "oracle.v1.Params.maximum_price_stamps": + return x.MaximumPriceStamps != uint64(0) + case "oracle.v1.Params.maximum_median_stamps": + return x.MaximumMedianStamps != uint64(0) + case "oracle.v1.Params.currency_pair_providers": + return len(x.CurrencyPairProviders) != 0 + case "oracle.v1.Params.currency_deviation_thresholds": + return len(x.CurrencyDeviationThresholds) != 0 + case "oracle.v1.Params.usdc_ibc_denom": + return x.UsdcIbcDenom != "" + case "oracle.v1.Params.slashing_enabled": + return x.SlashingEnabled != false + case "oracle.v1.Params.averaging_window": + return x.AveragingWindow != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Params")) + } + panic(fmt.Errorf("message oracle.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.Params.vote_period": + x.VotePeriod = uint64(0) + case "oracle.v1.Params.vote_threshold": + x.VoteThreshold = "" + case "oracle.v1.Params.reward_bands": + x.RewardBands = nil + case "oracle.v1.Params.reward_distribution_window": + x.RewardDistributionWindow = uint64(0) + case "oracle.v1.Params.accept_list": + x.AcceptList = nil + case "oracle.v1.Params.slash_fraction": + x.SlashFraction = "" + case "oracle.v1.Params.slash_window": + x.SlashWindow = uint64(0) + case "oracle.v1.Params.min_valid_per_window": + x.MinValidPerWindow = "" + case "oracle.v1.Params.mandatory_list": + x.MandatoryList = nil + case "oracle.v1.Params.historic_stamp_period": + x.HistoricStampPeriod = uint64(0) + case "oracle.v1.Params.median_stamp_period": + x.MedianStampPeriod = uint64(0) + case "oracle.v1.Params.maximum_price_stamps": + x.MaximumPriceStamps = uint64(0) + case "oracle.v1.Params.maximum_median_stamps": + x.MaximumMedianStamps = uint64(0) + case "oracle.v1.Params.currency_pair_providers": + x.CurrencyPairProviders = nil + case "oracle.v1.Params.currency_deviation_thresholds": + x.CurrencyDeviationThresholds = nil + case "oracle.v1.Params.usdc_ibc_denom": + x.UsdcIbcDenom = "" + case "oracle.v1.Params.slashing_enabled": + x.SlashingEnabled = false + case "oracle.v1.Params.averaging_window": + x.AveragingWindow = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Params")) + } + panic(fmt.Errorf("message oracle.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.Params.vote_period": + value := x.VotePeriod + return protoreflect.ValueOfUint64(value) + case "oracle.v1.Params.vote_threshold": + value := x.VoteThreshold + return protoreflect.ValueOfString(value) + case "oracle.v1.Params.reward_bands": + if len(x.RewardBands) == 0 { + return protoreflect.ValueOfList(&_Params_3_list{}) + } + listValue := &_Params_3_list{list: &x.RewardBands} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.Params.reward_distribution_window": + value := x.RewardDistributionWindow + return protoreflect.ValueOfUint64(value) + case "oracle.v1.Params.accept_list": + if len(x.AcceptList) == 0 { + return protoreflect.ValueOfList(&_Params_5_list{}) + } + listValue := &_Params_5_list{list: &x.AcceptList} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.Params.slash_fraction": + value := x.SlashFraction + return protoreflect.ValueOfString(value) + case "oracle.v1.Params.slash_window": + value := x.SlashWindow + return protoreflect.ValueOfUint64(value) + case "oracle.v1.Params.min_valid_per_window": + value := x.MinValidPerWindow + return protoreflect.ValueOfString(value) + case "oracle.v1.Params.mandatory_list": + if len(x.MandatoryList) == 0 { + return protoreflect.ValueOfList(&_Params_9_list{}) + } + listValue := &_Params_9_list{list: &x.MandatoryList} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.Params.historic_stamp_period": + value := x.HistoricStampPeriod + return protoreflect.ValueOfUint64(value) + case "oracle.v1.Params.median_stamp_period": + value := x.MedianStampPeriod + return protoreflect.ValueOfUint64(value) + case "oracle.v1.Params.maximum_price_stamps": + value := x.MaximumPriceStamps + return protoreflect.ValueOfUint64(value) + case "oracle.v1.Params.maximum_median_stamps": + value := x.MaximumMedianStamps + return protoreflect.ValueOfUint64(value) + case "oracle.v1.Params.currency_pair_providers": + if len(x.CurrencyPairProviders) == 0 { + return protoreflect.ValueOfList(&_Params_14_list{}) + } + listValue := &_Params_14_list{list: &x.CurrencyPairProviders} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.Params.currency_deviation_thresholds": + if len(x.CurrencyDeviationThresholds) == 0 { + return protoreflect.ValueOfList(&_Params_15_list{}) + } + listValue := &_Params_15_list{list: &x.CurrencyDeviationThresholds} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.Params.usdc_ibc_denom": + value := x.UsdcIbcDenom + return protoreflect.ValueOfString(value) + case "oracle.v1.Params.slashing_enabled": + value := x.SlashingEnabled + return protoreflect.ValueOfBool(value) + case "oracle.v1.Params.averaging_window": + value := x.AveragingWindow + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Params")) + } + panic(fmt.Errorf("message oracle.v1.Params does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.Params.vote_period": + x.VotePeriod = value.Uint() + case "oracle.v1.Params.vote_threshold": + x.VoteThreshold = value.Interface().(string) + case "oracle.v1.Params.reward_bands": + lv := value.List() + clv := lv.(*_Params_3_list) + x.RewardBands = *clv.list + case "oracle.v1.Params.reward_distribution_window": + x.RewardDistributionWindow = value.Uint() + case "oracle.v1.Params.accept_list": + lv := value.List() + clv := lv.(*_Params_5_list) + x.AcceptList = *clv.list + case "oracle.v1.Params.slash_fraction": + x.SlashFraction = value.Interface().(string) + case "oracle.v1.Params.slash_window": + x.SlashWindow = value.Uint() + case "oracle.v1.Params.min_valid_per_window": + x.MinValidPerWindow = value.Interface().(string) + case "oracle.v1.Params.mandatory_list": + lv := value.List() + clv := lv.(*_Params_9_list) + x.MandatoryList = *clv.list + case "oracle.v1.Params.historic_stamp_period": + x.HistoricStampPeriod = value.Uint() + case "oracle.v1.Params.median_stamp_period": + x.MedianStampPeriod = value.Uint() + case "oracle.v1.Params.maximum_price_stamps": + x.MaximumPriceStamps = value.Uint() + case "oracle.v1.Params.maximum_median_stamps": + x.MaximumMedianStamps = value.Uint() + case "oracle.v1.Params.currency_pair_providers": + lv := value.List() + clv := lv.(*_Params_14_list) + x.CurrencyPairProviders = *clv.list + case "oracle.v1.Params.currency_deviation_thresholds": + lv := value.List() + clv := lv.(*_Params_15_list) + x.CurrencyDeviationThresholds = *clv.list + case "oracle.v1.Params.usdc_ibc_denom": + x.UsdcIbcDenom = value.Interface().(string) + case "oracle.v1.Params.slashing_enabled": + x.SlashingEnabled = value.Bool() + case "oracle.v1.Params.averaging_window": + x.AveragingWindow = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Params")) + } + panic(fmt.Errorf("message oracle.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.Params.reward_bands": + if x.RewardBands == nil { + x.RewardBands = []*RewardBand{} + } + value := &_Params_3_list{list: &x.RewardBands} + return protoreflect.ValueOfList(value) + case "oracle.v1.Params.accept_list": + if x.AcceptList == nil { + x.AcceptList = []*Denom{} + } + value := &_Params_5_list{list: &x.AcceptList} + return protoreflect.ValueOfList(value) + case "oracle.v1.Params.mandatory_list": + if x.MandatoryList == nil { + x.MandatoryList = []*Denom{} + } + value := &_Params_9_list{list: &x.MandatoryList} + return protoreflect.ValueOfList(value) + case "oracle.v1.Params.currency_pair_providers": + if x.CurrencyPairProviders == nil { + x.CurrencyPairProviders = []*CurrencyPairProviders{} + } + value := &_Params_14_list{list: &x.CurrencyPairProviders} + return protoreflect.ValueOfList(value) + case "oracle.v1.Params.currency_deviation_thresholds": + if x.CurrencyDeviationThresholds == nil { + x.CurrencyDeviationThresholds = []*CurrencyDeviationThreshold{} + } + value := &_Params_15_list{list: &x.CurrencyDeviationThresholds} + return protoreflect.ValueOfList(value) + case "oracle.v1.Params.vote_period": + panic(fmt.Errorf("field vote_period of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.vote_threshold": + panic(fmt.Errorf("field vote_threshold of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.reward_distribution_window": + panic(fmt.Errorf("field reward_distribution_window of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.slash_fraction": + panic(fmt.Errorf("field slash_fraction of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.slash_window": + panic(fmt.Errorf("field slash_window of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.min_valid_per_window": + panic(fmt.Errorf("field min_valid_per_window of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.historic_stamp_period": + panic(fmt.Errorf("field historic_stamp_period of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.median_stamp_period": + panic(fmt.Errorf("field median_stamp_period of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.maximum_price_stamps": + panic(fmt.Errorf("field maximum_price_stamps of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.maximum_median_stamps": + panic(fmt.Errorf("field maximum_median_stamps of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.usdc_ibc_denom": + panic(fmt.Errorf("field usdc_ibc_denom of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.slashing_enabled": + panic(fmt.Errorf("field slashing_enabled of message oracle.v1.Params is not mutable")) + case "oracle.v1.Params.averaging_window": + panic(fmt.Errorf("field averaging_window of message oracle.v1.Params is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Params")) + } + panic(fmt.Errorf("message oracle.v1.Params does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.Params.vote_period": + return protoreflect.ValueOfUint64(uint64(0)) + case "oracle.v1.Params.vote_threshold": + return protoreflect.ValueOfString("") + case "oracle.v1.Params.reward_bands": + list := []*RewardBand{} + return protoreflect.ValueOfList(&_Params_3_list{list: &list}) + case "oracle.v1.Params.reward_distribution_window": + return protoreflect.ValueOfUint64(uint64(0)) + case "oracle.v1.Params.accept_list": + list := []*Denom{} + return protoreflect.ValueOfList(&_Params_5_list{list: &list}) + case "oracle.v1.Params.slash_fraction": + return protoreflect.ValueOfString("") + case "oracle.v1.Params.slash_window": + return protoreflect.ValueOfUint64(uint64(0)) + case "oracle.v1.Params.min_valid_per_window": + return protoreflect.ValueOfString("") + case "oracle.v1.Params.mandatory_list": + list := []*Denom{} + return protoreflect.ValueOfList(&_Params_9_list{list: &list}) + case "oracle.v1.Params.historic_stamp_period": + return protoreflect.ValueOfUint64(uint64(0)) + case "oracle.v1.Params.median_stamp_period": + return protoreflect.ValueOfUint64(uint64(0)) + case "oracle.v1.Params.maximum_price_stamps": + return protoreflect.ValueOfUint64(uint64(0)) + case "oracle.v1.Params.maximum_median_stamps": + return protoreflect.ValueOfUint64(uint64(0)) + case "oracle.v1.Params.currency_pair_providers": + list := []*CurrencyPairProviders{} + return protoreflect.ValueOfList(&_Params_14_list{list: &list}) + case "oracle.v1.Params.currency_deviation_thresholds": + list := []*CurrencyDeviationThreshold{} + return protoreflect.ValueOfList(&_Params_15_list{list: &list}) + case "oracle.v1.Params.usdc_ibc_denom": + return protoreflect.ValueOfString("") + case "oracle.v1.Params.slashing_enabled": + return protoreflect.ValueOfBool(false) + case "oracle.v1.Params.averaging_window": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Params")) + } + panic(fmt.Errorf("message oracle.v1.Params does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.Params", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Params) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.VotePeriod != 0 { + n += 1 + runtime.Sov(uint64(x.VotePeriod)) + } + l = len(x.VoteThreshold) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.RewardBands) > 0 { + for _, e := range x.RewardBands { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.RewardDistributionWindow != 0 { + n += 1 + runtime.Sov(uint64(x.RewardDistributionWindow)) + } + if len(x.AcceptList) > 0 { + for _, e := range x.AcceptList { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.SlashFraction) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.SlashWindow != 0 { + n += 1 + runtime.Sov(uint64(x.SlashWindow)) + } + l = len(x.MinValidPerWindow) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.MandatoryList) > 0 { + for _, e := range x.MandatoryList { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.HistoricStampPeriod != 0 { + n += 1 + runtime.Sov(uint64(x.HistoricStampPeriod)) + } + if x.MedianStampPeriod != 0 { + n += 1 + runtime.Sov(uint64(x.MedianStampPeriod)) + } + if x.MaximumPriceStamps != 0 { + n += 1 + runtime.Sov(uint64(x.MaximumPriceStamps)) + } + if x.MaximumMedianStamps != 0 { + n += 1 + runtime.Sov(uint64(x.MaximumMedianStamps)) + } + if len(x.CurrencyPairProviders) > 0 { + for _, e := range x.CurrencyPairProviders { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.CurrencyDeviationThresholds) > 0 { + for _, e := range x.CurrencyDeviationThresholds { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.UsdcIbcDenom) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } + if x.SlashingEnabled { + n += 3 + } + if x.AveragingWindow != 0 { + n += 2 + runtime.Sov(uint64(x.AveragingWindow)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.AveragingWindow != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.AveragingWindow)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if x.SlashingEnabled { + i-- + if x.SlashingEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + if len(x.UsdcIbcDenom) > 0 { + i -= len(x.UsdcIbcDenom) + copy(dAtA[i:], x.UsdcIbcDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UsdcIbcDenom))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if len(x.CurrencyDeviationThresholds) > 0 { + for iNdEx := len(x.CurrencyDeviationThresholds) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.CurrencyDeviationThresholds[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x7a + } + } + if len(x.CurrencyPairProviders) > 0 { + for iNdEx := len(x.CurrencyPairProviders) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.CurrencyPairProviders[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x72 + } + } + if x.MaximumMedianStamps != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MaximumMedianStamps)) + i-- + dAtA[i] = 0x68 + } + if x.MaximumPriceStamps != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MaximumPriceStamps)) + i-- + dAtA[i] = 0x60 + } + if x.MedianStampPeriod != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MedianStampPeriod)) + i-- + dAtA[i] = 0x58 + } + if x.HistoricStampPeriod != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.HistoricStampPeriod)) + i-- + dAtA[i] = 0x50 + } + if len(x.MandatoryList) > 0 { + for iNdEx := len(x.MandatoryList) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.MandatoryList[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x4a + } + } + if len(x.MinValidPerWindow) > 0 { + i -= len(x.MinValidPerWindow) + copy(dAtA[i:], x.MinValidPerWindow) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinValidPerWindow))) + i-- + dAtA[i] = 0x42 + } + if x.SlashWindow != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.SlashWindow)) + i-- + dAtA[i] = 0x38 + } + if len(x.SlashFraction) > 0 { + i -= len(x.SlashFraction) + copy(dAtA[i:], x.SlashFraction) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SlashFraction))) + i-- + dAtA[i] = 0x32 + } + if len(x.AcceptList) > 0 { + for iNdEx := len(x.AcceptList) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AcceptList[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + } + if x.RewardDistributionWindow != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.RewardDistributionWindow)) + i-- + dAtA[i] = 0x20 + } + if len(x.RewardBands) > 0 { + for iNdEx := len(x.RewardBands) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.RewardBands[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.VoteThreshold) > 0 { + i -= len(x.VoteThreshold) + copy(dAtA[i:], x.VoteThreshold) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VoteThreshold))) + i-- + dAtA[i] = 0x12 + } + if x.VotePeriod != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.VotePeriod)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotePeriod", wireType) + } + x.VotePeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.VotePeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VoteThreshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.VoteThreshold = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardBands", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RewardBands = append(x.RewardBands, &RewardBand{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RewardBands[len(x.RewardBands)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardDistributionWindow", wireType) + } + x.RewardDistributionWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.RewardDistributionWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AcceptList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AcceptList = append(x.AcceptList, &Denom{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AcceptList[len(x.AcceptList)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SlashFraction", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SlashFraction = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SlashWindow", wireType) + } + x.SlashWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.SlashWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinValidPerWindow", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.MinValidPerWindow = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MandatoryList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.MandatoryList = append(x.MandatoryList, &Denom{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MandatoryList[len(x.MandatoryList)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HistoricStampPeriod", wireType) + } + x.HistoricStampPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.HistoricStampPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MedianStampPeriod", wireType) + } + x.MedianStampPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.MedianStampPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaximumPriceStamps", wireType) + } + x.MaximumPriceStamps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.MaximumPriceStamps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaximumMedianStamps", wireType) + } + x.MaximumMedianStamps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.MaximumMedianStamps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrencyPairProviders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CurrencyPairProviders = append(x.CurrencyPairProviders, &CurrencyPairProviders{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CurrencyPairProviders[len(x.CurrencyPairProviders)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrencyDeviationThresholds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CurrencyDeviationThresholds = append(x.CurrencyDeviationThresholds, &CurrencyDeviationThreshold{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CurrencyDeviationThresholds[len(x.CurrencyDeviationThresholds)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UsdcIbcDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.UsdcIbcDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 17: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SlashingEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.SlashingEnabled = bool(v != 0) + case 18: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AveragingWindow", wireType) + } + x.AveragingWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.AveragingWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Denom protoreflect.MessageDescriptor + fd_Denom_base_denom protoreflect.FieldDescriptor + fd_Denom_symbol_denom protoreflect.FieldDescriptor + fd_Denom_exponent protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_oracle_proto_init() + md_Denom = File_oracle_v1_oracle_proto.Messages().ByName("Denom") + fd_Denom_base_denom = md_Denom.Fields().ByName("base_denom") + fd_Denom_symbol_denom = md_Denom.Fields().ByName("symbol_denom") + fd_Denom_exponent = md_Denom.Fields().ByName("exponent") +} + +var _ protoreflect.Message = (*fastReflection_Denom)(nil) + +type fastReflection_Denom Denom + +func (x *Denom) ProtoReflect() protoreflect.Message { + return (*fastReflection_Denom)(x) +} + +func (x *Denom) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_oracle_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Denom_messageType fastReflection_Denom_messageType +var _ protoreflect.MessageType = fastReflection_Denom_messageType{} + +type fastReflection_Denom_messageType struct{} + +func (x fastReflection_Denom_messageType) Zero() protoreflect.Message { + return (*fastReflection_Denom)(nil) +} +func (x fastReflection_Denom_messageType) New() protoreflect.Message { + return new(fastReflection_Denom) +} +func (x fastReflection_Denom_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Denom +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Denom) Descriptor() protoreflect.MessageDescriptor { + return md_Denom +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Denom) Type() protoreflect.MessageType { + return _fastReflection_Denom_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Denom) New() protoreflect.Message { + return new(fastReflection_Denom) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Denom) Interface() protoreflect.ProtoMessage { + return (*Denom)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Denom) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BaseDenom != "" { + value := protoreflect.ValueOfString(x.BaseDenom) + if !f(fd_Denom_base_denom, value) { + return + } + } + if x.SymbolDenom != "" { + value := protoreflect.ValueOfString(x.SymbolDenom) + if !f(fd_Denom_symbol_denom, value) { + return + } + } + if x.Exponent != uint32(0) { + value := protoreflect.ValueOfUint32(x.Exponent) + if !f(fd_Denom_exponent, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Denom) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.Denom.base_denom": + return x.BaseDenom != "" + case "oracle.v1.Denom.symbol_denom": + return x.SymbolDenom != "" + case "oracle.v1.Denom.exponent": + return x.Exponent != uint32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Denom")) + } + panic(fmt.Errorf("message oracle.v1.Denom does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Denom) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.Denom.base_denom": + x.BaseDenom = "" + case "oracle.v1.Denom.symbol_denom": + x.SymbolDenom = "" + case "oracle.v1.Denom.exponent": + x.Exponent = uint32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Denom")) + } + panic(fmt.Errorf("message oracle.v1.Denom does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Denom) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.Denom.base_denom": + value := x.BaseDenom + return protoreflect.ValueOfString(value) + case "oracle.v1.Denom.symbol_denom": + value := x.SymbolDenom + return protoreflect.ValueOfString(value) + case "oracle.v1.Denom.exponent": + value := x.Exponent + return protoreflect.ValueOfUint32(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Denom")) + } + panic(fmt.Errorf("message oracle.v1.Denom does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Denom) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.Denom.base_denom": + x.BaseDenom = value.Interface().(string) + case "oracle.v1.Denom.symbol_denom": + x.SymbolDenom = value.Interface().(string) + case "oracle.v1.Denom.exponent": + x.Exponent = uint32(value.Uint()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Denom")) + } + panic(fmt.Errorf("message oracle.v1.Denom does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Denom) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.Denom.base_denom": + panic(fmt.Errorf("field base_denom of message oracle.v1.Denom is not mutable")) + case "oracle.v1.Denom.symbol_denom": + panic(fmt.Errorf("field symbol_denom of message oracle.v1.Denom is not mutable")) + case "oracle.v1.Denom.exponent": + panic(fmt.Errorf("field exponent of message oracle.v1.Denom is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Denom")) + } + panic(fmt.Errorf("message oracle.v1.Denom does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Denom) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.Denom.base_denom": + return protoreflect.ValueOfString("") + case "oracle.v1.Denom.symbol_denom": + return protoreflect.ValueOfString("") + case "oracle.v1.Denom.exponent": + return protoreflect.ValueOfUint32(uint32(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.Denom")) + } + panic(fmt.Errorf("message oracle.v1.Denom does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Denom) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.Denom", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Denom) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Denom) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Denom) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Denom) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Denom) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.BaseDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SymbolDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Exponent != 0 { + n += 1 + runtime.Sov(uint64(x.Exponent)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Denom) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Exponent != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Exponent)) + i-- + dAtA[i] = 0x18 + } + if len(x.SymbolDenom) > 0 { + i -= len(x.SymbolDenom) + copy(dAtA[i:], x.SymbolDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SymbolDenom))) + i-- + dAtA[i] = 0x12 + } + if len(x.BaseDenom) > 0 { + i -= len(x.BaseDenom) + copy(dAtA[i:], x.BaseDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Denom) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Denom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Denom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SymbolDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SymbolDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType) + } + x.Exponent = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Exponent |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_RewardBand protoreflect.MessageDescriptor + fd_RewardBand_symbol_denom protoreflect.FieldDescriptor + fd_RewardBand_reward_band protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_oracle_proto_init() + md_RewardBand = File_oracle_v1_oracle_proto.Messages().ByName("RewardBand") + fd_RewardBand_symbol_denom = md_RewardBand.Fields().ByName("symbol_denom") + fd_RewardBand_reward_band = md_RewardBand.Fields().ByName("reward_band") +} + +var _ protoreflect.Message = (*fastReflection_RewardBand)(nil) + +type fastReflection_RewardBand RewardBand + +func (x *RewardBand) ProtoReflect() protoreflect.Message { + return (*fastReflection_RewardBand)(x) +} + +func (x *RewardBand) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_oracle_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_RewardBand_messageType fastReflection_RewardBand_messageType +var _ protoreflect.MessageType = fastReflection_RewardBand_messageType{} + +type fastReflection_RewardBand_messageType struct{} + +func (x fastReflection_RewardBand_messageType) Zero() protoreflect.Message { + return (*fastReflection_RewardBand)(nil) +} +func (x fastReflection_RewardBand_messageType) New() protoreflect.Message { + return new(fastReflection_RewardBand) +} +func (x fastReflection_RewardBand_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_RewardBand +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_RewardBand) Descriptor() protoreflect.MessageDescriptor { + return md_RewardBand +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_RewardBand) Type() protoreflect.MessageType { + return _fastReflection_RewardBand_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_RewardBand) New() protoreflect.Message { + return new(fastReflection_RewardBand) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_RewardBand) Interface() protoreflect.ProtoMessage { + return (*RewardBand)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_RewardBand) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SymbolDenom != "" { + value := protoreflect.ValueOfString(x.SymbolDenom) + if !f(fd_RewardBand_symbol_denom, value) { + return + } + } + if x.RewardBand != "" { + value := protoreflect.ValueOfString(x.RewardBand) + if !f(fd_RewardBand_reward_band, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_RewardBand) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.RewardBand.symbol_denom": + return x.SymbolDenom != "" + case "oracle.v1.RewardBand.reward_band": + return x.RewardBand != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.RewardBand")) + } + panic(fmt.Errorf("message oracle.v1.RewardBand does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RewardBand) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.RewardBand.symbol_denom": + x.SymbolDenom = "" + case "oracle.v1.RewardBand.reward_band": + x.RewardBand = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.RewardBand")) + } + panic(fmt.Errorf("message oracle.v1.RewardBand does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_RewardBand) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.RewardBand.symbol_denom": + value := x.SymbolDenom + return protoreflect.ValueOfString(value) + case "oracle.v1.RewardBand.reward_band": + value := x.RewardBand + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.RewardBand")) + } + panic(fmt.Errorf("message oracle.v1.RewardBand does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RewardBand) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.RewardBand.symbol_denom": + x.SymbolDenom = value.Interface().(string) + case "oracle.v1.RewardBand.reward_band": + x.RewardBand = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.RewardBand")) + } + panic(fmt.Errorf("message oracle.v1.RewardBand does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RewardBand) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.RewardBand.symbol_denom": + panic(fmt.Errorf("field symbol_denom of message oracle.v1.RewardBand is not mutable")) + case "oracle.v1.RewardBand.reward_band": + panic(fmt.Errorf("field reward_band of message oracle.v1.RewardBand is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.RewardBand")) + } + panic(fmt.Errorf("message oracle.v1.RewardBand does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_RewardBand) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.RewardBand.symbol_denom": + return protoreflect.ValueOfString("") + case "oracle.v1.RewardBand.reward_band": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.RewardBand")) + } + panic(fmt.Errorf("message oracle.v1.RewardBand does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_RewardBand) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.RewardBand", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_RewardBand) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RewardBand) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_RewardBand) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_RewardBand) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*RewardBand) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.SymbolDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RewardBand) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*RewardBand) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.RewardBand) > 0 { + i -= len(x.RewardBand) + copy(dAtA[i:], x.RewardBand) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardBand))) + i-- + dAtA[i] = 0x12 + } + if len(x.SymbolDenom) > 0 { + i -= len(x.SymbolDenom) + copy(dAtA[i:], x.SymbolDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SymbolDenom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*RewardBand) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RewardBand: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RewardBand: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SymbolDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SymbolDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardBand", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RewardBand = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_AggregateExchangeRatePrevote protoreflect.MessageDescriptor + fd_AggregateExchangeRatePrevote_hash protoreflect.FieldDescriptor + fd_AggregateExchangeRatePrevote_voter protoreflect.FieldDescriptor + fd_AggregateExchangeRatePrevote_submit_block protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_oracle_proto_init() + md_AggregateExchangeRatePrevote = File_oracle_v1_oracle_proto.Messages().ByName("AggregateExchangeRatePrevote") + fd_AggregateExchangeRatePrevote_hash = md_AggregateExchangeRatePrevote.Fields().ByName("hash") + fd_AggregateExchangeRatePrevote_voter = md_AggregateExchangeRatePrevote.Fields().ByName("voter") + fd_AggregateExchangeRatePrevote_submit_block = md_AggregateExchangeRatePrevote.Fields().ByName("submit_block") +} + +var _ protoreflect.Message = (*fastReflection_AggregateExchangeRatePrevote)(nil) + +type fastReflection_AggregateExchangeRatePrevote AggregateExchangeRatePrevote + +func (x *AggregateExchangeRatePrevote) ProtoReflect() protoreflect.Message { + return (*fastReflection_AggregateExchangeRatePrevote)(x) +} + +func (x *AggregateExchangeRatePrevote) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_oracle_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_AggregateExchangeRatePrevote_messageType fastReflection_AggregateExchangeRatePrevote_messageType +var _ protoreflect.MessageType = fastReflection_AggregateExchangeRatePrevote_messageType{} + +type fastReflection_AggregateExchangeRatePrevote_messageType struct{} + +func (x fastReflection_AggregateExchangeRatePrevote_messageType) Zero() protoreflect.Message { + return (*fastReflection_AggregateExchangeRatePrevote)(nil) +} +func (x fastReflection_AggregateExchangeRatePrevote_messageType) New() protoreflect.Message { + return new(fastReflection_AggregateExchangeRatePrevote) +} +func (x fastReflection_AggregateExchangeRatePrevote_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AggregateExchangeRatePrevote +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AggregateExchangeRatePrevote) Descriptor() protoreflect.MessageDescriptor { + return md_AggregateExchangeRatePrevote +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_AggregateExchangeRatePrevote) Type() protoreflect.MessageType { + return _fastReflection_AggregateExchangeRatePrevote_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AggregateExchangeRatePrevote) New() protoreflect.Message { + return new(fastReflection_AggregateExchangeRatePrevote) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AggregateExchangeRatePrevote) Interface() protoreflect.ProtoMessage { + return (*AggregateExchangeRatePrevote)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_AggregateExchangeRatePrevote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Hash != "" { + value := protoreflect.ValueOfString(x.Hash) + if !f(fd_AggregateExchangeRatePrevote_hash, value) { + return + } + } + if x.Voter != "" { + value := protoreflect.ValueOfString(x.Voter) + if !f(fd_AggregateExchangeRatePrevote_voter, value) { + return + } + } + if x.SubmitBlock != uint64(0) { + value := protoreflect.ValueOfUint64(x.SubmitBlock) + if !f(fd_AggregateExchangeRatePrevote_submit_block, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_AggregateExchangeRatePrevote) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.AggregateExchangeRatePrevote.hash": + return x.Hash != "" + case "oracle.v1.AggregateExchangeRatePrevote.voter": + return x.Voter != "" + case "oracle.v1.AggregateExchangeRatePrevote.submit_block": + return x.SubmitBlock != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRatePrevote does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AggregateExchangeRatePrevote) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.AggregateExchangeRatePrevote.hash": + x.Hash = "" + case "oracle.v1.AggregateExchangeRatePrevote.voter": + x.Voter = "" + case "oracle.v1.AggregateExchangeRatePrevote.submit_block": + x.SubmitBlock = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRatePrevote does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_AggregateExchangeRatePrevote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.AggregateExchangeRatePrevote.hash": + value := x.Hash + return protoreflect.ValueOfString(value) + case "oracle.v1.AggregateExchangeRatePrevote.voter": + value := x.Voter + return protoreflect.ValueOfString(value) + case "oracle.v1.AggregateExchangeRatePrevote.submit_block": + value := x.SubmitBlock + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRatePrevote does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AggregateExchangeRatePrevote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.AggregateExchangeRatePrevote.hash": + x.Hash = value.Interface().(string) + case "oracle.v1.AggregateExchangeRatePrevote.voter": + x.Voter = value.Interface().(string) + case "oracle.v1.AggregateExchangeRatePrevote.submit_block": + x.SubmitBlock = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRatePrevote does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AggregateExchangeRatePrevote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.AggregateExchangeRatePrevote.hash": + panic(fmt.Errorf("field hash of message oracle.v1.AggregateExchangeRatePrevote is not mutable")) + case "oracle.v1.AggregateExchangeRatePrevote.voter": + panic(fmt.Errorf("field voter of message oracle.v1.AggregateExchangeRatePrevote is not mutable")) + case "oracle.v1.AggregateExchangeRatePrevote.submit_block": + panic(fmt.Errorf("field submit_block of message oracle.v1.AggregateExchangeRatePrevote is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRatePrevote does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_AggregateExchangeRatePrevote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.AggregateExchangeRatePrevote.hash": + return protoreflect.ValueOfString("") + case "oracle.v1.AggregateExchangeRatePrevote.voter": + return protoreflect.ValueOfString("") + case "oracle.v1.AggregateExchangeRatePrevote.submit_block": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRatePrevote does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_AggregateExchangeRatePrevote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.AggregateExchangeRatePrevote", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_AggregateExchangeRatePrevote) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AggregateExchangeRatePrevote) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_AggregateExchangeRatePrevote) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_AggregateExchangeRatePrevote) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AggregateExchangeRatePrevote) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Hash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Voter) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.SubmitBlock != 0 { + n += 1 + runtime.Sov(uint64(x.SubmitBlock)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*AggregateExchangeRatePrevote) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.SubmitBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.SubmitBlock)) + i-- + dAtA[i] = 0x18 + } + if len(x.Voter) > 0 { + i -= len(x.Voter) + copy(dAtA[i:], x.Voter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) + i-- + dAtA[i] = 0x12 + } + if len(x.Hash) > 0 { + i -= len(x.Hash) + copy(dAtA[i:], x.Hash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*AggregateExchangeRatePrevote) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AggregateExchangeRatePrevote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AggregateExchangeRatePrevote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Voter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SubmitBlock", wireType) + } + x.SubmitBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.SubmitBlock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_AggregateExchangeRateVote_1_list)(nil) + +type _AggregateExchangeRateVote_1_list struct { + list *[]*v1beta1.DecCoin +} + +func (x *_AggregateExchangeRateVote_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_AggregateExchangeRateVote_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_AggregateExchangeRateVote_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_AggregateExchangeRateVote_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_AggregateExchangeRateVote_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AggregateExchangeRateVote_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_AggregateExchangeRateVote_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AggregateExchangeRateVote_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_AggregateExchangeRateVote protoreflect.MessageDescriptor + fd_AggregateExchangeRateVote_exchange_rates protoreflect.FieldDescriptor + fd_AggregateExchangeRateVote_voter protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_oracle_proto_init() + md_AggregateExchangeRateVote = File_oracle_v1_oracle_proto.Messages().ByName("AggregateExchangeRateVote") + fd_AggregateExchangeRateVote_exchange_rates = md_AggregateExchangeRateVote.Fields().ByName("exchange_rates") + fd_AggregateExchangeRateVote_voter = md_AggregateExchangeRateVote.Fields().ByName("voter") +} + +var _ protoreflect.Message = (*fastReflection_AggregateExchangeRateVote)(nil) + +type fastReflection_AggregateExchangeRateVote AggregateExchangeRateVote + +func (x *AggregateExchangeRateVote) ProtoReflect() protoreflect.Message { + return (*fastReflection_AggregateExchangeRateVote)(x) +} + +func (x *AggregateExchangeRateVote) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_oracle_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_AggregateExchangeRateVote_messageType fastReflection_AggregateExchangeRateVote_messageType +var _ protoreflect.MessageType = fastReflection_AggregateExchangeRateVote_messageType{} + +type fastReflection_AggregateExchangeRateVote_messageType struct{} + +func (x fastReflection_AggregateExchangeRateVote_messageType) Zero() protoreflect.Message { + return (*fastReflection_AggregateExchangeRateVote)(nil) +} +func (x fastReflection_AggregateExchangeRateVote_messageType) New() protoreflect.Message { + return new(fastReflection_AggregateExchangeRateVote) +} +func (x fastReflection_AggregateExchangeRateVote_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AggregateExchangeRateVote +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AggregateExchangeRateVote) Descriptor() protoreflect.MessageDescriptor { + return md_AggregateExchangeRateVote +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_AggregateExchangeRateVote) Type() protoreflect.MessageType { + return _fastReflection_AggregateExchangeRateVote_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AggregateExchangeRateVote) New() protoreflect.Message { + return new(fastReflection_AggregateExchangeRateVote) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AggregateExchangeRateVote) Interface() protoreflect.ProtoMessage { + return (*AggregateExchangeRateVote)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_AggregateExchangeRateVote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ExchangeRates) != 0 { + value := protoreflect.ValueOfList(&_AggregateExchangeRateVote_1_list{list: &x.ExchangeRates}) + if !f(fd_AggregateExchangeRateVote_exchange_rates, value) { + return + } + } + if x.Voter != "" { + value := protoreflect.ValueOfString(x.Voter) + if !f(fd_AggregateExchangeRateVote_voter, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_AggregateExchangeRateVote) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.AggregateExchangeRateVote.exchange_rates": + return len(x.ExchangeRates) != 0 + case "oracle.v1.AggregateExchangeRateVote.voter": + return x.Voter != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRateVote does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AggregateExchangeRateVote) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.AggregateExchangeRateVote.exchange_rates": + x.ExchangeRates = nil + case "oracle.v1.AggregateExchangeRateVote.voter": + x.Voter = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRateVote does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_AggregateExchangeRateVote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.AggregateExchangeRateVote.exchange_rates": + if len(x.ExchangeRates) == 0 { + return protoreflect.ValueOfList(&_AggregateExchangeRateVote_1_list{}) + } + listValue := &_AggregateExchangeRateVote_1_list{list: &x.ExchangeRates} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.AggregateExchangeRateVote.voter": + value := x.Voter + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRateVote does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AggregateExchangeRateVote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.AggregateExchangeRateVote.exchange_rates": + lv := value.List() + clv := lv.(*_AggregateExchangeRateVote_1_list) + x.ExchangeRates = *clv.list + case "oracle.v1.AggregateExchangeRateVote.voter": + x.Voter = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRateVote does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AggregateExchangeRateVote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.AggregateExchangeRateVote.exchange_rates": + if x.ExchangeRates == nil { + x.ExchangeRates = []*v1beta1.DecCoin{} + } + value := &_AggregateExchangeRateVote_1_list{list: &x.ExchangeRates} + return protoreflect.ValueOfList(value) + case "oracle.v1.AggregateExchangeRateVote.voter": + panic(fmt.Errorf("field voter of message oracle.v1.AggregateExchangeRateVote is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRateVote does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_AggregateExchangeRateVote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.AggregateExchangeRateVote.exchange_rates": + list := []*v1beta1.DecCoin{} + return protoreflect.ValueOfList(&_AggregateExchangeRateVote_1_list{list: &list}) + case "oracle.v1.AggregateExchangeRateVote.voter": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.AggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.AggregateExchangeRateVote does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_AggregateExchangeRateVote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.AggregateExchangeRateVote", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_AggregateExchangeRateVote) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AggregateExchangeRateVote) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_AggregateExchangeRateVote) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_AggregateExchangeRateVote) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AggregateExchangeRateVote) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.ExchangeRates) > 0 { + for _, e := range x.ExchangeRates { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Voter) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*AggregateExchangeRateVote) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Voter) > 0 { + i -= len(x.Voter) + copy(dAtA[i:], x.Voter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) + i-- + dAtA[i] = 0x12 + } + if len(x.ExchangeRates) > 0 { + for iNdEx := len(x.ExchangeRates) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ExchangeRates[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*AggregateExchangeRateVote) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AggregateExchangeRateVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AggregateExchangeRateVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExchangeRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ExchangeRates = append(x.ExchangeRates, &v1beta1.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExchangeRates[len(x.ExchangeRates)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Voter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_PriceStamp protoreflect.MessageDescriptor + fd_PriceStamp_exchange_rate protoreflect.FieldDescriptor + fd_PriceStamp_block_num protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_oracle_proto_init() + md_PriceStamp = File_oracle_v1_oracle_proto.Messages().ByName("PriceStamp") + fd_PriceStamp_exchange_rate = md_PriceStamp.Fields().ByName("exchange_rate") + fd_PriceStamp_block_num = md_PriceStamp.Fields().ByName("block_num") +} + +var _ protoreflect.Message = (*fastReflection_PriceStamp)(nil) + +type fastReflection_PriceStamp PriceStamp + +func (x *PriceStamp) ProtoReflect() protoreflect.Message { + return (*fastReflection_PriceStamp)(x) +} + +func (x *PriceStamp) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_oracle_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_PriceStamp_messageType fastReflection_PriceStamp_messageType +var _ protoreflect.MessageType = fastReflection_PriceStamp_messageType{} + +type fastReflection_PriceStamp_messageType struct{} + +func (x fastReflection_PriceStamp_messageType) Zero() protoreflect.Message { + return (*fastReflection_PriceStamp)(nil) +} +func (x fastReflection_PriceStamp_messageType) New() protoreflect.Message { + return new(fastReflection_PriceStamp) +} +func (x fastReflection_PriceStamp_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_PriceStamp +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_PriceStamp) Descriptor() protoreflect.MessageDescriptor { + return md_PriceStamp +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_PriceStamp) Type() protoreflect.MessageType { + return _fastReflection_PriceStamp_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_PriceStamp) New() protoreflect.Message { + return new(fastReflection_PriceStamp) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_PriceStamp) Interface() protoreflect.ProtoMessage { + return (*PriceStamp)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_PriceStamp) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ExchangeRate != nil { + value := protoreflect.ValueOfMessage(x.ExchangeRate.ProtoReflect()) + if !f(fd_PriceStamp_exchange_rate, value) { + return + } + } + if x.BlockNum != uint64(0) { + value := protoreflect.ValueOfUint64(x.BlockNum) + if !f(fd_PriceStamp_block_num, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_PriceStamp) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.PriceStamp.exchange_rate": + return x.ExchangeRate != nil + case "oracle.v1.PriceStamp.block_num": + return x.BlockNum != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PriceStamp")) + } + panic(fmt.Errorf("message oracle.v1.PriceStamp does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PriceStamp) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.PriceStamp.exchange_rate": + x.ExchangeRate = nil + case "oracle.v1.PriceStamp.block_num": + x.BlockNum = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PriceStamp")) + } + panic(fmt.Errorf("message oracle.v1.PriceStamp does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_PriceStamp) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.PriceStamp.exchange_rate": + value := x.ExchangeRate + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "oracle.v1.PriceStamp.block_num": + value := x.BlockNum + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PriceStamp")) + } + panic(fmt.Errorf("message oracle.v1.PriceStamp does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PriceStamp) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.PriceStamp.exchange_rate": + x.ExchangeRate = value.Message().Interface().(*v1beta1.DecCoin) + case "oracle.v1.PriceStamp.block_num": + x.BlockNum = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PriceStamp")) + } + panic(fmt.Errorf("message oracle.v1.PriceStamp does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PriceStamp) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.PriceStamp.exchange_rate": + if x.ExchangeRate == nil { + x.ExchangeRate = new(v1beta1.DecCoin) + } + return protoreflect.ValueOfMessage(x.ExchangeRate.ProtoReflect()) + case "oracle.v1.PriceStamp.block_num": + panic(fmt.Errorf("field block_num of message oracle.v1.PriceStamp is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PriceStamp")) + } + panic(fmt.Errorf("message oracle.v1.PriceStamp does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_PriceStamp) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.PriceStamp.exchange_rate": + m := new(v1beta1.DecCoin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "oracle.v1.PriceStamp.block_num": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PriceStamp")) + } + panic(fmt.Errorf("message oracle.v1.PriceStamp does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_PriceStamp) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.PriceStamp", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_PriceStamp) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PriceStamp) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_PriceStamp) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_PriceStamp) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*PriceStamp) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.ExchangeRate != nil { + l = options.Size(x.ExchangeRate) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.BlockNum != 0 { + n += 1 + runtime.Sov(uint64(x.BlockNum)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*PriceStamp) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.BlockNum != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockNum)) + i-- + dAtA[i] = 0x10 + } + if x.ExchangeRate != nil { + encoded, err := options.Marshal(x.ExchangeRate) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*PriceStamp) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PriceStamp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PriceStamp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExchangeRate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ExchangeRate == nil { + x.ExchangeRate = &v1beta1.DecCoin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExchangeRate); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockNum", wireType) + } + x.BlockNum = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.BlockNum |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ValidatorRewardSet_1_list)(nil) + +type _ValidatorRewardSet_1_list struct { + list *[]string +} + +func (x *_ValidatorRewardSet_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ValidatorRewardSet_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_ValidatorRewardSet_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_ValidatorRewardSet_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_ValidatorRewardSet_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message ValidatorRewardSet at list field ValidatorSet as it is not of Message kind")) +} + +func (x *_ValidatorRewardSet_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_ValidatorRewardSet_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_ValidatorRewardSet_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ValidatorRewardSet protoreflect.MessageDescriptor + fd_ValidatorRewardSet_validator_set protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_oracle_proto_init() + md_ValidatorRewardSet = File_oracle_v1_oracle_proto.Messages().ByName("ValidatorRewardSet") + fd_ValidatorRewardSet_validator_set = md_ValidatorRewardSet.Fields().ByName("validator_set") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorRewardSet)(nil) + +type fastReflection_ValidatorRewardSet ValidatorRewardSet + +func (x *ValidatorRewardSet) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorRewardSet)(x) +} + +func (x *ValidatorRewardSet) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_oracle_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorRewardSet_messageType fastReflection_ValidatorRewardSet_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorRewardSet_messageType{} + +type fastReflection_ValidatorRewardSet_messageType struct{} + +func (x fastReflection_ValidatorRewardSet_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorRewardSet)(nil) +} +func (x fastReflection_ValidatorRewardSet_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorRewardSet) +} +func (x fastReflection_ValidatorRewardSet_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorRewardSet +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorRewardSet) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorRewardSet +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorRewardSet) Type() protoreflect.MessageType { + return _fastReflection_ValidatorRewardSet_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorRewardSet) New() protoreflect.Message { + return new(fastReflection_ValidatorRewardSet) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorRewardSet) Interface() protoreflect.ProtoMessage { + return (*ValidatorRewardSet)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorRewardSet) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ValidatorSet) != 0 { + value := protoreflect.ValueOfList(&_ValidatorRewardSet_1_list{list: &x.ValidatorSet}) + if !f(fd_ValidatorRewardSet_validator_set, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorRewardSet) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.ValidatorRewardSet.validator_set": + return len(x.ValidatorSet) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.ValidatorRewardSet does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorRewardSet) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.ValidatorRewardSet.validator_set": + x.ValidatorSet = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.ValidatorRewardSet does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorRewardSet) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.ValidatorRewardSet.validator_set": + if len(x.ValidatorSet) == 0 { + return protoreflect.ValueOfList(&_ValidatorRewardSet_1_list{}) + } + listValue := &_ValidatorRewardSet_1_list{list: &x.ValidatorSet} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.ValidatorRewardSet does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorRewardSet) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.ValidatorRewardSet.validator_set": + lv := value.List() + clv := lv.(*_ValidatorRewardSet_1_list) + x.ValidatorSet = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.ValidatorRewardSet does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorRewardSet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.ValidatorRewardSet.validator_set": + if x.ValidatorSet == nil { + x.ValidatorSet = []string{} + } + value := &_ValidatorRewardSet_1_list{list: &x.ValidatorSet} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.ValidatorRewardSet does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorRewardSet) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.ValidatorRewardSet.validator_set": + list := []string{} + return protoreflect.ValueOfList(&_ValidatorRewardSet_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.ValidatorRewardSet does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorRewardSet) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.ValidatorRewardSet", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorRewardSet) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorRewardSet) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorRewardSet) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorRewardSet) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorRewardSet) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.ValidatorSet) > 0 { + for _, s := range x.ValidatorSet { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorRewardSet) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorSet) > 0 { + for iNdEx := len(x.ValidatorSet) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.ValidatorSet[iNdEx]) + copy(dAtA[i:], x.ValidatorSet[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorSet[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorRewardSet) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorRewardSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorRewardSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSet", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorSet = append(x.ValidatorSet, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_CurrencyPairProviders_3_list)(nil) + +type _CurrencyPairProviders_3_list struct { + list *[]*PairAddressProvider +} + +func (x *_CurrencyPairProviders_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_CurrencyPairProviders_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_CurrencyPairProviders_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PairAddressProvider) + (*x.list)[i] = concreteValue +} + +func (x *_CurrencyPairProviders_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PairAddressProvider) + *x.list = append(*x.list, concreteValue) +} + +func (x *_CurrencyPairProviders_3_list) AppendMutable() protoreflect.Value { + v := new(PairAddressProvider) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_CurrencyPairProviders_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_CurrencyPairProviders_3_list) NewElement() protoreflect.Value { + v := new(PairAddressProvider) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_CurrencyPairProviders_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_CurrencyPairProviders_4_list)(nil) + +type _CurrencyPairProviders_4_list struct { + list *[]string +} + +func (x *_CurrencyPairProviders_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_CurrencyPairProviders_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_CurrencyPairProviders_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_CurrencyPairProviders_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_CurrencyPairProviders_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message CurrencyPairProviders at list field Providers as it is not of Message kind")) +} + +func (x *_CurrencyPairProviders_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_CurrencyPairProviders_4_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_CurrencyPairProviders_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_CurrencyPairProviders protoreflect.MessageDescriptor + fd_CurrencyPairProviders_base_denom protoreflect.FieldDescriptor + fd_CurrencyPairProviders_quote_denom protoreflect.FieldDescriptor + fd_CurrencyPairProviders_pair_address protoreflect.FieldDescriptor + fd_CurrencyPairProviders_providers protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_oracle_proto_init() + md_CurrencyPairProviders = File_oracle_v1_oracle_proto.Messages().ByName("CurrencyPairProviders") + fd_CurrencyPairProviders_base_denom = md_CurrencyPairProviders.Fields().ByName("base_denom") + fd_CurrencyPairProviders_quote_denom = md_CurrencyPairProviders.Fields().ByName("quote_denom") + fd_CurrencyPairProviders_pair_address = md_CurrencyPairProviders.Fields().ByName("pair_address") + fd_CurrencyPairProviders_providers = md_CurrencyPairProviders.Fields().ByName("providers") +} + +var _ protoreflect.Message = (*fastReflection_CurrencyPairProviders)(nil) + +type fastReflection_CurrencyPairProviders CurrencyPairProviders + +func (x *CurrencyPairProviders) ProtoReflect() protoreflect.Message { + return (*fastReflection_CurrencyPairProviders)(x) +} + +func (x *CurrencyPairProviders) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_oracle_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_CurrencyPairProviders_messageType fastReflection_CurrencyPairProviders_messageType +var _ protoreflect.MessageType = fastReflection_CurrencyPairProviders_messageType{} + +type fastReflection_CurrencyPairProviders_messageType struct{} + +func (x fastReflection_CurrencyPairProviders_messageType) Zero() protoreflect.Message { + return (*fastReflection_CurrencyPairProviders)(nil) +} +func (x fastReflection_CurrencyPairProviders_messageType) New() protoreflect.Message { + return new(fastReflection_CurrencyPairProviders) +} +func (x fastReflection_CurrencyPairProviders_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_CurrencyPairProviders +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_CurrencyPairProviders) Descriptor() protoreflect.MessageDescriptor { + return md_CurrencyPairProviders +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_CurrencyPairProviders) Type() protoreflect.MessageType { + return _fastReflection_CurrencyPairProviders_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_CurrencyPairProviders) New() protoreflect.Message { + return new(fastReflection_CurrencyPairProviders) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_CurrencyPairProviders) Interface() protoreflect.ProtoMessage { + return (*CurrencyPairProviders)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_CurrencyPairProviders) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BaseDenom != "" { + value := protoreflect.ValueOfString(x.BaseDenom) + if !f(fd_CurrencyPairProviders_base_denom, value) { + return + } + } + if x.QuoteDenom != "" { + value := protoreflect.ValueOfString(x.QuoteDenom) + if !f(fd_CurrencyPairProviders_quote_denom, value) { + return + } + } + if len(x.PairAddress) != 0 { + value := protoreflect.ValueOfList(&_CurrencyPairProviders_3_list{list: &x.PairAddress}) + if !f(fd_CurrencyPairProviders_pair_address, value) { + return + } + } + if len(x.Providers) != 0 { + value := protoreflect.ValueOfList(&_CurrencyPairProviders_4_list{list: &x.Providers}) + if !f(fd_CurrencyPairProviders_providers, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_CurrencyPairProviders) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.CurrencyPairProviders.base_denom": + return x.BaseDenom != "" + case "oracle.v1.CurrencyPairProviders.quote_denom": + return x.QuoteDenom != "" + case "oracle.v1.CurrencyPairProviders.pair_address": + return len(x.PairAddress) != 0 + case "oracle.v1.CurrencyPairProviders.providers": + return len(x.Providers) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyPairProviders does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyPairProviders) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.CurrencyPairProviders.base_denom": + x.BaseDenom = "" + case "oracle.v1.CurrencyPairProviders.quote_denom": + x.QuoteDenom = "" + case "oracle.v1.CurrencyPairProviders.pair_address": + x.PairAddress = nil + case "oracle.v1.CurrencyPairProviders.providers": + x.Providers = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyPairProviders does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_CurrencyPairProviders) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.CurrencyPairProviders.base_denom": + value := x.BaseDenom + return protoreflect.ValueOfString(value) + case "oracle.v1.CurrencyPairProviders.quote_denom": + value := x.QuoteDenom + return protoreflect.ValueOfString(value) + case "oracle.v1.CurrencyPairProviders.pair_address": + if len(x.PairAddress) == 0 { + return protoreflect.ValueOfList(&_CurrencyPairProviders_3_list{}) + } + listValue := &_CurrencyPairProviders_3_list{list: &x.PairAddress} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.CurrencyPairProviders.providers": + if len(x.Providers) == 0 { + return protoreflect.ValueOfList(&_CurrencyPairProviders_4_list{}) + } + listValue := &_CurrencyPairProviders_4_list{list: &x.Providers} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyPairProviders does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyPairProviders) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.CurrencyPairProviders.base_denom": + x.BaseDenom = value.Interface().(string) + case "oracle.v1.CurrencyPairProviders.quote_denom": + x.QuoteDenom = value.Interface().(string) + case "oracle.v1.CurrencyPairProviders.pair_address": + lv := value.List() + clv := lv.(*_CurrencyPairProviders_3_list) + x.PairAddress = *clv.list + case "oracle.v1.CurrencyPairProviders.providers": + lv := value.List() + clv := lv.(*_CurrencyPairProviders_4_list) + x.Providers = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyPairProviders does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyPairProviders) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.CurrencyPairProviders.pair_address": + if x.PairAddress == nil { + x.PairAddress = []*PairAddressProvider{} + } + value := &_CurrencyPairProviders_3_list{list: &x.PairAddress} + return protoreflect.ValueOfList(value) + case "oracle.v1.CurrencyPairProviders.providers": + if x.Providers == nil { + x.Providers = []string{} + } + value := &_CurrencyPairProviders_4_list{list: &x.Providers} + return protoreflect.ValueOfList(value) + case "oracle.v1.CurrencyPairProviders.base_denom": + panic(fmt.Errorf("field base_denom of message oracle.v1.CurrencyPairProviders is not mutable")) + case "oracle.v1.CurrencyPairProviders.quote_denom": + panic(fmt.Errorf("field quote_denom of message oracle.v1.CurrencyPairProviders is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyPairProviders does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_CurrencyPairProviders) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.CurrencyPairProviders.base_denom": + return protoreflect.ValueOfString("") + case "oracle.v1.CurrencyPairProviders.quote_denom": + return protoreflect.ValueOfString("") + case "oracle.v1.CurrencyPairProviders.pair_address": + list := []*PairAddressProvider{} + return protoreflect.ValueOfList(&_CurrencyPairProviders_3_list{list: &list}) + case "oracle.v1.CurrencyPairProviders.providers": + list := []string{} + return protoreflect.ValueOfList(&_CurrencyPairProviders_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyPairProviders does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_CurrencyPairProviders) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.CurrencyPairProviders", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_CurrencyPairProviders) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyPairProviders) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_CurrencyPairProviders) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_CurrencyPairProviders) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*CurrencyPairProviders) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.BaseDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.QuoteDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.PairAddress) > 0 { + for _, e := range x.PairAddress { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Providers) > 0 { + for _, s := range x.Providers { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*CurrencyPairProviders) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Providers) > 0 { + for iNdEx := len(x.Providers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Providers[iNdEx]) + copy(dAtA[i:], x.Providers[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Providers[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.PairAddress) > 0 { + for iNdEx := len(x.PairAddress) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.PairAddress[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.QuoteDenom) > 0 { + i -= len(x.QuoteDenom) + copy(dAtA[i:], x.QuoteDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QuoteDenom))) + i-- + dAtA[i] = 0x12 + } + if len(x.BaseDenom) > 0 { + i -= len(x.BaseDenom) + copy(dAtA[i:], x.BaseDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*CurrencyPairProviders) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CurrencyPairProviders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CurrencyPairProviders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PairAddress", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.PairAddress = append(x.PairAddress, &PairAddressProvider{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PairAddress[len(x.PairAddress)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Providers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Providers = append(x.Providers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_PairAddressProvider protoreflect.MessageDescriptor + fd_PairAddressProvider_address protoreflect.FieldDescriptor + fd_PairAddressProvider_address_provider protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_oracle_proto_init() + md_PairAddressProvider = File_oracle_v1_oracle_proto.Messages().ByName("PairAddressProvider") + fd_PairAddressProvider_address = md_PairAddressProvider.Fields().ByName("address") + fd_PairAddressProvider_address_provider = md_PairAddressProvider.Fields().ByName("address_provider") +} + +var _ protoreflect.Message = (*fastReflection_PairAddressProvider)(nil) + +type fastReflection_PairAddressProvider PairAddressProvider + +func (x *PairAddressProvider) ProtoReflect() protoreflect.Message { + return (*fastReflection_PairAddressProvider)(x) +} + +func (x *PairAddressProvider) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_oracle_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_PairAddressProvider_messageType fastReflection_PairAddressProvider_messageType +var _ protoreflect.MessageType = fastReflection_PairAddressProvider_messageType{} + +type fastReflection_PairAddressProvider_messageType struct{} + +func (x fastReflection_PairAddressProvider_messageType) Zero() protoreflect.Message { + return (*fastReflection_PairAddressProvider)(nil) +} +func (x fastReflection_PairAddressProvider_messageType) New() protoreflect.Message { + return new(fastReflection_PairAddressProvider) +} +func (x fastReflection_PairAddressProvider_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_PairAddressProvider +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_PairAddressProvider) Descriptor() protoreflect.MessageDescriptor { + return md_PairAddressProvider +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_PairAddressProvider) Type() protoreflect.MessageType { + return _fastReflection_PairAddressProvider_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_PairAddressProvider) New() protoreflect.Message { + return new(fastReflection_PairAddressProvider) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_PairAddressProvider) Interface() protoreflect.ProtoMessage { + return (*PairAddressProvider)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_PairAddressProvider) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_PairAddressProvider_address, value) { + return + } + } + if x.AddressProvider != "" { + value := protoreflect.ValueOfString(x.AddressProvider) + if !f(fd_PairAddressProvider_address_provider, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_PairAddressProvider) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.PairAddressProvider.address": + return x.Address != "" + case "oracle.v1.PairAddressProvider.address_provider": + return x.AddressProvider != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PairAddressProvider")) + } + panic(fmt.Errorf("message oracle.v1.PairAddressProvider does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PairAddressProvider) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.PairAddressProvider.address": + x.Address = "" + case "oracle.v1.PairAddressProvider.address_provider": + x.AddressProvider = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PairAddressProvider")) + } + panic(fmt.Errorf("message oracle.v1.PairAddressProvider does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_PairAddressProvider) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.PairAddressProvider.address": + value := x.Address + return protoreflect.ValueOfString(value) + case "oracle.v1.PairAddressProvider.address_provider": + value := x.AddressProvider + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PairAddressProvider")) + } + panic(fmt.Errorf("message oracle.v1.PairAddressProvider does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PairAddressProvider) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.PairAddressProvider.address": + x.Address = value.Interface().(string) + case "oracle.v1.PairAddressProvider.address_provider": + x.AddressProvider = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PairAddressProvider")) + } + panic(fmt.Errorf("message oracle.v1.PairAddressProvider does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PairAddressProvider) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.PairAddressProvider.address": + panic(fmt.Errorf("field address of message oracle.v1.PairAddressProvider is not mutable")) + case "oracle.v1.PairAddressProvider.address_provider": + panic(fmt.Errorf("field address_provider of message oracle.v1.PairAddressProvider is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PairAddressProvider")) + } + panic(fmt.Errorf("message oracle.v1.PairAddressProvider does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_PairAddressProvider) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.PairAddressProvider.address": + return protoreflect.ValueOfString("") + case "oracle.v1.PairAddressProvider.address_provider": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.PairAddressProvider")) + } + panic(fmt.Errorf("message oracle.v1.PairAddressProvider does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_PairAddressProvider) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.PairAddressProvider", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_PairAddressProvider) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PairAddressProvider) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_PairAddressProvider) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_PairAddressProvider) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*PairAddressProvider) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AddressProvider) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*PairAddressProvider) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.AddressProvider) > 0 { + i -= len(x.AddressProvider) + copy(dAtA[i:], x.AddressProvider) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressProvider))) + i-- + dAtA[i] = 0x12 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*PairAddressProvider) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PairAddressProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PairAddressProvider: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AddressProvider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AddressProvider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_CurrencyDeviationThreshold protoreflect.MessageDescriptor + fd_CurrencyDeviationThreshold_base_denom protoreflect.FieldDescriptor + fd_CurrencyDeviationThreshold_threshold protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_oracle_proto_init() + md_CurrencyDeviationThreshold = File_oracle_v1_oracle_proto.Messages().ByName("CurrencyDeviationThreshold") + fd_CurrencyDeviationThreshold_base_denom = md_CurrencyDeviationThreshold.Fields().ByName("base_denom") + fd_CurrencyDeviationThreshold_threshold = md_CurrencyDeviationThreshold.Fields().ByName("threshold") +} + +var _ protoreflect.Message = (*fastReflection_CurrencyDeviationThreshold)(nil) + +type fastReflection_CurrencyDeviationThreshold CurrencyDeviationThreshold + +func (x *CurrencyDeviationThreshold) ProtoReflect() protoreflect.Message { + return (*fastReflection_CurrencyDeviationThreshold)(x) +} + +func (x *CurrencyDeviationThreshold) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_oracle_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_CurrencyDeviationThreshold_messageType fastReflection_CurrencyDeviationThreshold_messageType +var _ protoreflect.MessageType = fastReflection_CurrencyDeviationThreshold_messageType{} + +type fastReflection_CurrencyDeviationThreshold_messageType struct{} + +func (x fastReflection_CurrencyDeviationThreshold_messageType) Zero() protoreflect.Message { + return (*fastReflection_CurrencyDeviationThreshold)(nil) +} +func (x fastReflection_CurrencyDeviationThreshold_messageType) New() protoreflect.Message { + return new(fastReflection_CurrencyDeviationThreshold) +} +func (x fastReflection_CurrencyDeviationThreshold_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_CurrencyDeviationThreshold +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_CurrencyDeviationThreshold) Descriptor() protoreflect.MessageDescriptor { + return md_CurrencyDeviationThreshold +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_CurrencyDeviationThreshold) Type() protoreflect.MessageType { + return _fastReflection_CurrencyDeviationThreshold_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_CurrencyDeviationThreshold) New() protoreflect.Message { + return new(fastReflection_CurrencyDeviationThreshold) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_CurrencyDeviationThreshold) Interface() protoreflect.ProtoMessage { + return (*CurrencyDeviationThreshold)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_CurrencyDeviationThreshold) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BaseDenom != "" { + value := protoreflect.ValueOfString(x.BaseDenom) + if !f(fd_CurrencyDeviationThreshold_base_denom, value) { + return + } + } + if x.Threshold != "" { + value := protoreflect.ValueOfString(x.Threshold) + if !f(fd_CurrencyDeviationThreshold_threshold, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_CurrencyDeviationThreshold) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.CurrencyDeviationThreshold.base_denom": + return x.BaseDenom != "" + case "oracle.v1.CurrencyDeviationThreshold.threshold": + return x.Threshold != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyDeviationThreshold")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyDeviationThreshold does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyDeviationThreshold) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.CurrencyDeviationThreshold.base_denom": + x.BaseDenom = "" + case "oracle.v1.CurrencyDeviationThreshold.threshold": + x.Threshold = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyDeviationThreshold")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyDeviationThreshold does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_CurrencyDeviationThreshold) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.CurrencyDeviationThreshold.base_denom": + value := x.BaseDenom + return protoreflect.ValueOfString(value) + case "oracle.v1.CurrencyDeviationThreshold.threshold": + value := x.Threshold + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyDeviationThreshold")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyDeviationThreshold does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyDeviationThreshold) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.CurrencyDeviationThreshold.base_denom": + x.BaseDenom = value.Interface().(string) + case "oracle.v1.CurrencyDeviationThreshold.threshold": + x.Threshold = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyDeviationThreshold")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyDeviationThreshold does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyDeviationThreshold) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.CurrencyDeviationThreshold.base_denom": + panic(fmt.Errorf("field base_denom of message oracle.v1.CurrencyDeviationThreshold is not mutable")) + case "oracle.v1.CurrencyDeviationThreshold.threshold": + panic(fmt.Errorf("field threshold of message oracle.v1.CurrencyDeviationThreshold is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyDeviationThreshold")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyDeviationThreshold does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_CurrencyDeviationThreshold) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.CurrencyDeviationThreshold.base_denom": + return protoreflect.ValueOfString("") + case "oracle.v1.CurrencyDeviationThreshold.threshold": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.CurrencyDeviationThreshold")) + } + panic(fmt.Errorf("message oracle.v1.CurrencyDeviationThreshold does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_CurrencyDeviationThreshold) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.CurrencyDeviationThreshold", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_CurrencyDeviationThreshold) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyDeviationThreshold) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_CurrencyDeviationThreshold) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_CurrencyDeviationThreshold) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*CurrencyDeviationThreshold) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.BaseDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Threshold) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*CurrencyDeviationThreshold) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Threshold) > 0 { + i -= len(x.Threshold) + copy(dAtA[i:], x.Threshold) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Threshold))) + i-- + dAtA[i] = 0x12 + } + if len(x.BaseDenom) > 0 { + i -= len(x.BaseDenom) + copy(dAtA[i:], x.BaseDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*CurrencyDeviationThreshold) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CurrencyDeviationThreshold: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CurrencyDeviationThreshold: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Threshold = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ParamUpdatePlan_1_list)(nil) + +type _ParamUpdatePlan_1_list struct { + list *[]string +} + +func (x *_ParamUpdatePlan_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ParamUpdatePlan_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_ParamUpdatePlan_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_ParamUpdatePlan_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_ParamUpdatePlan_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message ParamUpdatePlan at list field Keys as it is not of Message kind")) +} + +func (x *_ParamUpdatePlan_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_ParamUpdatePlan_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_ParamUpdatePlan_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ParamUpdatePlan protoreflect.MessageDescriptor + fd_ParamUpdatePlan_keys protoreflect.FieldDescriptor + fd_ParamUpdatePlan_height protoreflect.FieldDescriptor + fd_ParamUpdatePlan_changes protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_oracle_proto_init() + md_ParamUpdatePlan = File_oracle_v1_oracle_proto.Messages().ByName("ParamUpdatePlan") + fd_ParamUpdatePlan_keys = md_ParamUpdatePlan.Fields().ByName("keys") + fd_ParamUpdatePlan_height = md_ParamUpdatePlan.Fields().ByName("height") + fd_ParamUpdatePlan_changes = md_ParamUpdatePlan.Fields().ByName("changes") +} + +var _ protoreflect.Message = (*fastReflection_ParamUpdatePlan)(nil) + +type fastReflection_ParamUpdatePlan ParamUpdatePlan + +func (x *ParamUpdatePlan) ProtoReflect() protoreflect.Message { + return (*fastReflection_ParamUpdatePlan)(x) +} + +func (x *ParamUpdatePlan) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_oracle_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ParamUpdatePlan_messageType fastReflection_ParamUpdatePlan_messageType +var _ protoreflect.MessageType = fastReflection_ParamUpdatePlan_messageType{} + +type fastReflection_ParamUpdatePlan_messageType struct{} + +func (x fastReflection_ParamUpdatePlan_messageType) Zero() protoreflect.Message { + return (*fastReflection_ParamUpdatePlan)(nil) +} +func (x fastReflection_ParamUpdatePlan_messageType) New() protoreflect.Message { + return new(fastReflection_ParamUpdatePlan) +} +func (x fastReflection_ParamUpdatePlan_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ParamUpdatePlan +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ParamUpdatePlan) Descriptor() protoreflect.MessageDescriptor { + return md_ParamUpdatePlan +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ParamUpdatePlan) Type() protoreflect.MessageType { + return _fastReflection_ParamUpdatePlan_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ParamUpdatePlan) New() protoreflect.Message { + return new(fastReflection_ParamUpdatePlan) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ParamUpdatePlan) Interface() protoreflect.ProtoMessage { + return (*ParamUpdatePlan)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ParamUpdatePlan) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Keys) != 0 { + value := protoreflect.ValueOfList(&_ParamUpdatePlan_1_list{list: &x.Keys}) + if !f(fd_ParamUpdatePlan_keys, value) { + return + } + } + if x.Height != int64(0) { + value := protoreflect.ValueOfInt64(x.Height) + if !f(fd_ParamUpdatePlan_height, value) { + return + } + } + if x.Changes != nil { + value := protoreflect.ValueOfMessage(x.Changes.ProtoReflect()) + if !f(fd_ParamUpdatePlan_changes, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ParamUpdatePlan) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.ParamUpdatePlan.keys": + return len(x.Keys) != 0 + case "oracle.v1.ParamUpdatePlan.height": + return x.Height != int64(0) + case "oracle.v1.ParamUpdatePlan.changes": + return x.Changes != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ParamUpdatePlan")) + } + panic(fmt.Errorf("message oracle.v1.ParamUpdatePlan does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ParamUpdatePlan) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.ParamUpdatePlan.keys": + x.Keys = nil + case "oracle.v1.ParamUpdatePlan.height": + x.Height = int64(0) + case "oracle.v1.ParamUpdatePlan.changes": + x.Changes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ParamUpdatePlan")) + } + panic(fmt.Errorf("message oracle.v1.ParamUpdatePlan does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ParamUpdatePlan) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.ParamUpdatePlan.keys": + if len(x.Keys) == 0 { + return protoreflect.ValueOfList(&_ParamUpdatePlan_1_list{}) + } + listValue := &_ParamUpdatePlan_1_list{list: &x.Keys} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.ParamUpdatePlan.height": + value := x.Height + return protoreflect.ValueOfInt64(value) + case "oracle.v1.ParamUpdatePlan.changes": + value := x.Changes + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ParamUpdatePlan")) + } + panic(fmt.Errorf("message oracle.v1.ParamUpdatePlan does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ParamUpdatePlan) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.ParamUpdatePlan.keys": + lv := value.List() + clv := lv.(*_ParamUpdatePlan_1_list) + x.Keys = *clv.list + case "oracle.v1.ParamUpdatePlan.height": + x.Height = value.Int() + case "oracle.v1.ParamUpdatePlan.changes": + x.Changes = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ParamUpdatePlan")) + } + panic(fmt.Errorf("message oracle.v1.ParamUpdatePlan does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ParamUpdatePlan) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.ParamUpdatePlan.keys": + if x.Keys == nil { + x.Keys = []string{} + } + value := &_ParamUpdatePlan_1_list{list: &x.Keys} + return protoreflect.ValueOfList(value) + case "oracle.v1.ParamUpdatePlan.changes": + if x.Changes == nil { + x.Changes = new(Params) + } + return protoreflect.ValueOfMessage(x.Changes.ProtoReflect()) + case "oracle.v1.ParamUpdatePlan.height": + panic(fmt.Errorf("field height of message oracle.v1.ParamUpdatePlan is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ParamUpdatePlan")) + } + panic(fmt.Errorf("message oracle.v1.ParamUpdatePlan does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ParamUpdatePlan) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.ParamUpdatePlan.keys": + list := []string{} + return protoreflect.ValueOfList(&_ParamUpdatePlan_1_list{list: &list}) + case "oracle.v1.ParamUpdatePlan.height": + return protoreflect.ValueOfInt64(int64(0)) + case "oracle.v1.ParamUpdatePlan.changes": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.ParamUpdatePlan")) + } + panic(fmt.Errorf("message oracle.v1.ParamUpdatePlan does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ParamUpdatePlan) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.ParamUpdatePlan", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ParamUpdatePlan) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ParamUpdatePlan) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ParamUpdatePlan) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ParamUpdatePlan) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ParamUpdatePlan) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Keys) > 0 { + for _, s := range x.Keys { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Height != 0 { + n += 1 + runtime.Sov(uint64(x.Height)) + } + if x.Changes != nil { + l = options.Size(x.Changes) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ParamUpdatePlan) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Changes != nil { + encoded, err := options.Marshal(x.Changes) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.Height != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) + i-- + dAtA[i] = 0x10 + } + if len(x.Keys) > 0 { + for iNdEx := len(x.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Keys[iNdEx]) + copy(dAtA[i:], x.Keys[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keys[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ParamUpdatePlan) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ParamUpdatePlan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ParamUpdatePlan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Keys = append(x.Keys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + x.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Changes == nil { + x.Changes = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Changes); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: oracle/v1/oracle.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Params defines the parameters for the oracle module. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VotePeriod uint64 `protobuf:"varint,1,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty"` + VoteThreshold string `protobuf:"bytes,2,opt,name=vote_threshold,json=voteThreshold,proto3" json:"vote_threshold,omitempty"` + RewardBands []*RewardBand `protobuf:"bytes,3,rep,name=reward_bands,json=rewardBands,proto3" json:"reward_bands,omitempty"` + RewardDistributionWindow uint64 `protobuf:"varint,4,opt,name=reward_distribution_window,json=rewardDistributionWindow,proto3" json:"reward_distribution_window,omitempty"` + AcceptList []*Denom `protobuf:"bytes,5,rep,name=accept_list,json=acceptList,proto3" json:"accept_list,omitempty"` + SlashFraction string `protobuf:"bytes,6,opt,name=slash_fraction,json=slashFraction,proto3" json:"slash_fraction,omitempty"` + SlashWindow uint64 `protobuf:"varint,7,opt,name=slash_window,json=slashWindow,proto3" json:"slash_window,omitempty"` + MinValidPerWindow string `protobuf:"bytes,8,opt,name=min_valid_per_window,json=minValidPerWindow,proto3" json:"min_valid_per_window,omitempty"` + MandatoryList []*Denom `protobuf:"bytes,9,rep,name=mandatory_list,json=mandatoryList,proto3" json:"mandatory_list,omitempty"` + // Historic Stamp Period represents the amount of blocks the oracle + // module waits before recording a new historic price. + HistoricStampPeriod uint64 `protobuf:"varint,10,opt,name=historic_stamp_period,json=historicStampPeriod,proto3" json:"historic_stamp_period,omitempty"` + // Median Stamp Period represents the amount blocks the oracle module + // waits between calculating and stamping a new median and standard + // deviation of that median. + MedianStampPeriod uint64 `protobuf:"varint,11,opt,name=median_stamp_period,json=medianStampPeriod,proto3" json:"median_stamp_period,omitempty"` + // Maximum Price Stamps represents the maximum amount of historic prices + // the oracle module will store before pruning via FIFO. + MaximumPriceStamps uint64 `protobuf:"varint,12,opt,name=maximum_price_stamps,json=maximumPriceStamps,proto3" json:"maximum_price_stamps,omitempty"` + // Maximum Median Stamps represents the maximum amount of medians the + // oracle module will store before pruning via FIFO. + MaximumMedianStamps uint64 `protobuf:"varint,13,opt,name=maximum_median_stamps,json=maximumMedianStamps,proto3" json:"maximum_median_stamps,omitempty"` + // Currency Pair Providers defines the currency provider pairs the + // price feeder uses upon start up for pricing data. + CurrencyPairProviders []*CurrencyPairProviders `protobuf:"bytes,14,rep,name=currency_pair_providers,json=currencyPairProviders,proto3" json:"currency_pair_providers,omitempty"` + // Currency Deviation Thresholds defines the deviation thresholds + // for each base currency the price feeder uses upon start up. + CurrencyDeviationThresholds []*CurrencyDeviationThreshold `protobuf:"bytes,15,rep,name=currency_deviation_thresholds,json=currencyDeviationThresholds,proto3" json:"currency_deviation_thresholds,omitempty"` + // usdc ibc denom + UsdcIbcDenom string `protobuf:"bytes,16,opt,name=usdc_ibc_denom,json=usdcIbcDenom,proto3" json:"usdc_ibc_denom,omitempty"` + SlashingEnabled bool `protobuf:"varint,17,opt,name=slashing_enabled,json=slashingEnabled,proto3" json:"slashing_enabled,omitempty"` + AveragingWindow uint64 `protobuf:"varint,18,opt,name=averaging_window,json=averagingWindow,proto3" json:"averaging_window,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_oracle_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_oracle_v1_oracle_proto_rawDescGZIP(), []int{0} +} + +func (x *Params) GetVotePeriod() uint64 { + if x != nil { + return x.VotePeriod + } + return 0 +} + +func (x *Params) GetVoteThreshold() string { + if x != nil { + return x.VoteThreshold + } + return "" +} + +func (x *Params) GetRewardBands() []*RewardBand { + if x != nil { + return x.RewardBands + } + return nil +} + +func (x *Params) GetRewardDistributionWindow() uint64 { + if x != nil { + return x.RewardDistributionWindow + } + return 0 +} + +func (x *Params) GetAcceptList() []*Denom { + if x != nil { + return x.AcceptList + } + return nil +} + +func (x *Params) GetSlashFraction() string { + if x != nil { + return x.SlashFraction + } + return "" +} + +func (x *Params) GetSlashWindow() uint64 { + if x != nil { + return x.SlashWindow + } + return 0 +} + +func (x *Params) GetMinValidPerWindow() string { + if x != nil { + return x.MinValidPerWindow + } + return "" +} + +func (x *Params) GetMandatoryList() []*Denom { + if x != nil { + return x.MandatoryList + } + return nil +} + +func (x *Params) GetHistoricStampPeriod() uint64 { + if x != nil { + return x.HistoricStampPeriod + } + return 0 +} + +func (x *Params) GetMedianStampPeriod() uint64 { + if x != nil { + return x.MedianStampPeriod + } + return 0 +} + +func (x *Params) GetMaximumPriceStamps() uint64 { + if x != nil { + return x.MaximumPriceStamps + } + return 0 +} + +func (x *Params) GetMaximumMedianStamps() uint64 { + if x != nil { + return x.MaximumMedianStamps + } + return 0 +} + +func (x *Params) GetCurrencyPairProviders() []*CurrencyPairProviders { + if x != nil { + return x.CurrencyPairProviders + } + return nil +} + +func (x *Params) GetCurrencyDeviationThresholds() []*CurrencyDeviationThreshold { + if x != nil { + return x.CurrencyDeviationThresholds + } + return nil +} + +func (x *Params) GetUsdcIbcDenom() string { + if x != nil { + return x.UsdcIbcDenom + } + return "" +} + +func (x *Params) GetSlashingEnabled() bool { + if x != nil { + return x.SlashingEnabled + } + return false +} + +func (x *Params) GetAveragingWindow() uint64 { + if x != nil { + return x.AveragingWindow + } + return 0 +} + +// Denom - the object to hold configurations of each denom +type Denom struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + SymbolDenom string `protobuf:"bytes,2,opt,name=symbol_denom,json=symbolDenom,proto3" json:"symbol_denom,omitempty"` + Exponent uint32 `protobuf:"varint,3,opt,name=exponent,proto3" json:"exponent,omitempty"` +} + +func (x *Denom) Reset() { + *x = Denom{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_oracle_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Denom) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Denom) ProtoMessage() {} + +// Deprecated: Use Denom.ProtoReflect.Descriptor instead. +func (*Denom) Descriptor() ([]byte, []int) { + return file_oracle_v1_oracle_proto_rawDescGZIP(), []int{1} +} + +func (x *Denom) GetBaseDenom() string { + if x != nil { + return x.BaseDenom + } + return "" +} + +func (x *Denom) GetSymbolDenom() string { + if x != nil { + return x.SymbolDenom + } + return "" +} + +func (x *Denom) GetExponent() uint32 { + if x != nil { + return x.Exponent + } + return 0 +} + +// RewardBand - the object to hold the reward band configuration for a given denom. +type RewardBand struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SymbolDenom string `protobuf:"bytes,1,opt,name=symbol_denom,json=symbolDenom,proto3" json:"symbol_denom,omitempty"` + RewardBand string `protobuf:"bytes,2,opt,name=reward_band,json=rewardBand,proto3" json:"reward_band,omitempty"` +} + +func (x *RewardBand) Reset() { + *x = RewardBand{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_oracle_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RewardBand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RewardBand) ProtoMessage() {} + +// Deprecated: Use RewardBand.ProtoReflect.Descriptor instead. +func (*RewardBand) Descriptor() ([]byte, []int) { + return file_oracle_v1_oracle_proto_rawDescGZIP(), []int{2} +} + +func (x *RewardBand) GetSymbolDenom() string { + if x != nil { + return x.SymbolDenom + } + return "" +} + +func (x *RewardBand) GetRewardBand() string { + if x != nil { + return x.RewardBand + } + return "" +} + +// AggregateExchangeRatePrevote - +// struct for aggregate prevoting on the ExchangeRateVote. +// The purpose of aggregate prevote is to hide vote exchange rates with hash +// which is formatted as hex string in SHA256("{salt}:{exchange +// rate}{denom},...,{exchange rate}{denom}:{voter}") +type AggregateExchangeRatePrevote struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` + SubmitBlock uint64 `protobuf:"varint,3,opt,name=submit_block,json=submitBlock,proto3" json:"submit_block,omitempty"` +} + +func (x *AggregateExchangeRatePrevote) Reset() { + *x = AggregateExchangeRatePrevote{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_oracle_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AggregateExchangeRatePrevote) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AggregateExchangeRatePrevote) ProtoMessage() {} + +// Deprecated: Use AggregateExchangeRatePrevote.ProtoReflect.Descriptor instead. +func (*AggregateExchangeRatePrevote) Descriptor() ([]byte, []int) { + return file_oracle_v1_oracle_proto_rawDescGZIP(), []int{3} +} + +func (x *AggregateExchangeRatePrevote) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *AggregateExchangeRatePrevote) GetVoter() string { + if x != nil { + return x.Voter + } + return "" +} + +func (x *AggregateExchangeRatePrevote) GetSubmitBlock() uint64 { + if x != nil { + return x.SubmitBlock + } + return 0 +} + +// AggregateExchangeRateVote - struct for voting on +// the exchange rates of USD denominated in various assets. +type AggregateExchangeRateVote struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExchangeRates []*v1beta1.DecCoin `protobuf:"bytes,1,rep,name=exchange_rates,json=exchangeRates,proto3" json:"exchange_rates,omitempty"` + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` +} + +func (x *AggregateExchangeRateVote) Reset() { + *x = AggregateExchangeRateVote{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_oracle_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AggregateExchangeRateVote) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AggregateExchangeRateVote) ProtoMessage() {} + +// Deprecated: Use AggregateExchangeRateVote.ProtoReflect.Descriptor instead. +func (*AggregateExchangeRateVote) Descriptor() ([]byte, []int) { + return file_oracle_v1_oracle_proto_rawDescGZIP(), []int{4} +} + +func (x *AggregateExchangeRateVote) GetExchangeRates() []*v1beta1.DecCoin { + if x != nil { + return x.ExchangeRates + } + return nil +} + +func (x *AggregateExchangeRateVote) GetVoter() string { + if x != nil { + return x.Voter + } + return "" +} + +// PriceStamp defines a stamp of a denom's exchange rate +// at the block number it was calculated in. +type PriceStamp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExchangeRate *v1beta1.DecCoin `protobuf:"bytes,1,opt,name=exchange_rate,json=exchangeRate,proto3" json:"exchange_rate,omitempty"` + BlockNum uint64 `protobuf:"varint,2,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` +} + +func (x *PriceStamp) Reset() { + *x = PriceStamp{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_oracle_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PriceStamp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PriceStamp) ProtoMessage() {} + +// Deprecated: Use PriceStamp.ProtoReflect.Descriptor instead. +func (*PriceStamp) Descriptor() ([]byte, []int) { + return file_oracle_v1_oracle_proto_rawDescGZIP(), []int{5} +} + +func (x *PriceStamp) GetExchangeRate() *v1beta1.DecCoin { + if x != nil { + return x.ExchangeRate + } + return nil +} + +func (x *PriceStamp) GetBlockNum() uint64 { + if x != nil { + return x.BlockNum + } + return 0 +} + +// ValidatorRewardSet is the set of validators that is earning +// rewards for voting on exchange rates based on their misscounter +// in a given Slash Window. This set gets updated every Slash Window. +type ValidatorRewardSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValidatorSet []string `protobuf:"bytes,1,rep,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"` +} + +func (x *ValidatorRewardSet) Reset() { + *x = ValidatorRewardSet{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_oracle_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorRewardSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorRewardSet) ProtoMessage() {} + +// Deprecated: Use ValidatorRewardSet.ProtoReflect.Descriptor instead. +func (*ValidatorRewardSet) Descriptor() ([]byte, []int) { + return file_oracle_v1_oracle_proto_rawDescGZIP(), []int{6} +} + +func (x *ValidatorRewardSet) GetValidatorSet() []string { + if x != nil { + return x.ValidatorSet + } + return nil +} + +// CurrencyPairProviders defines a list of currency providers for the +// currency pair defined by base and quote. +type CurrencyPairProviders struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + QuoteDenom string `protobuf:"bytes,2,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + PairAddress []*PairAddressProvider `protobuf:"bytes,3,rep,name=pair_address,json=pairAddress,proto3" json:"pair_address,omitempty"` + Providers []string `protobuf:"bytes,4,rep,name=providers,proto3" json:"providers,omitempty"` +} + +func (x *CurrencyPairProviders) Reset() { + *x = CurrencyPairProviders{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_oracle_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CurrencyPairProviders) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CurrencyPairProviders) ProtoMessage() {} + +// Deprecated: Use CurrencyPairProviders.ProtoReflect.Descriptor instead. +func (*CurrencyPairProviders) Descriptor() ([]byte, []int) { + return file_oracle_v1_oracle_proto_rawDescGZIP(), []int{7} +} + +func (x *CurrencyPairProviders) GetBaseDenom() string { + if x != nil { + return x.BaseDenom + } + return "" +} + +func (x *CurrencyPairProviders) GetQuoteDenom() string { + if x != nil { + return x.QuoteDenom + } + return "" +} + +func (x *CurrencyPairProviders) GetPairAddress() []*PairAddressProvider { + if x != nil { + return x.PairAddress + } + return nil +} + +func (x *CurrencyPairProviders) GetProviders() []string { + if x != nil { + return x.Providers + } + return nil +} + +// PairAddressProvider defines the uniswap pair address and provider +// for uniswap currency pair. +type PairAddressProvider struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + AddressProvider string `protobuf:"bytes,2,opt,name=address_provider,json=addressProvider,proto3" json:"address_provider,omitempty"` +} + +func (x *PairAddressProvider) Reset() { + *x = PairAddressProvider{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_oracle_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PairAddressProvider) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PairAddressProvider) ProtoMessage() {} + +// Deprecated: Use PairAddressProvider.ProtoReflect.Descriptor instead. +func (*PairAddressProvider) Descriptor() ([]byte, []int) { + return file_oracle_v1_oracle_proto_rawDescGZIP(), []int{8} +} + +func (x *PairAddressProvider) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *PairAddressProvider) GetAddressProvider() string { + if x != nil { + return x.AddressProvider + } + return "" +} + +// CurrencyDeviationThreshold defines a deviation theshold for a +// base denom. +type CurrencyDeviationThreshold struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + Threshold string `protobuf:"bytes,2,opt,name=threshold,proto3" json:"threshold,omitempty"` +} + +func (x *CurrencyDeviationThreshold) Reset() { + *x = CurrencyDeviationThreshold{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_oracle_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CurrencyDeviationThreshold) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CurrencyDeviationThreshold) ProtoMessage() {} + +// Deprecated: Use CurrencyDeviationThreshold.ProtoReflect.Descriptor instead. +func (*CurrencyDeviationThreshold) Descriptor() ([]byte, []int) { + return file_oracle_v1_oracle_proto_rawDescGZIP(), []int{9} +} + +func (x *CurrencyDeviationThreshold) GetBaseDenom() string { + if x != nil { + return x.BaseDenom + } + return "" +} + +func (x *CurrencyDeviationThreshold) GetThreshold() string { + if x != nil { + return x.Threshold + } + return "" +} + +// ParamUpdatePlan specifies updates to the Oracle module parameters +// and at which block height they should occur. +type ParamUpdatePlan struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Store keys of the Oracle params getting updated. + Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` + // The height at which the param update must be performed. + Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + // Changes to the oracle parameters. + Changes *Params `protobuf:"bytes,3,opt,name=changes,proto3" json:"changes,omitempty"` +} + +func (x *ParamUpdatePlan) Reset() { + *x = ParamUpdatePlan{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_oracle_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParamUpdatePlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParamUpdatePlan) ProtoMessage() {} + +// Deprecated: Use ParamUpdatePlan.ProtoReflect.Descriptor instead. +func (*ParamUpdatePlan) Descriptor() ([]byte, []int) { + return file_oracle_v1_oracle_proto_rawDescGZIP(), []int{10} +} + +func (x *ParamUpdatePlan) GetKeys() []string { + if x != nil { + return x.Keys + } + return nil +} + +func (x *ParamUpdatePlan) GetHeight() int64 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *ParamUpdatePlan) GetChanges() *Params { + if x != nil { + return x.Changes + } + return nil +} + +var File_oracle_v1_oracle_proto protoreflect.FileDescriptor + +var file_oracle_v1_oracle_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x0b, 0x0a, 0x06, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x16, 0xf2, 0xde, 0x1f, 0x12, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x22, 0x52, 0x0a, 0x76, 0x6f, 0x74, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x63, 0x0a, + 0x0e, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, + 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x22, 0x52, 0x0d, 0x76, 0x6f, 0x74, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x12, 0x67, 0x0a, 0x0c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x62, 0x61, 0x6e, + 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x61, 0x6e, 0x64, 0x42, + 0x2d, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x73, 0x22, 0xaa, 0xdf, 0x1f, 0x0e, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0b, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x63, 0x0a, 0x1a, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x25, 0xf2, 0xde, 0x1f, 0x21, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0x52, 0x18, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x12, 0x5a, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x42, 0x27, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, + 0x12, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x22, 0xaa, 0xdf, 0x1f, 0x09, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x63, 0x0a, 0x0e, + 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, + 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x52, 0x0d, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, + 0x52, 0x0b, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x73, 0x0a, + 0x14, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x77, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x42, 0xc8, 0xde, 0x1f, + 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, + 0xf2, 0xde, 0x1f, 0x1b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0x52, + 0x11, 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x50, 0x65, 0x72, 0x57, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x12, 0x63, 0x0a, 0x0e, 0x6d, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x5f, + 0x6c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x42, 0x2a, 0xc8, 0xde, + 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x61, 0x6e, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xaa, 0xdf, 0x1f, 0x09, 0x44, + 0x65, 0x6e, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0d, 0x6d, 0x61, 0x6e, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x68, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, + 0x53, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, + 0x53, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x6d, + 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x32, 0x0a, + 0x15, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x5f, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6d, 0x61, + 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x6d, 0x70, + 0x73, 0x12, 0x9d, 0x01, 0x0a, 0x17, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x70, + 0x61, 0x69, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0e, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x42, 0x43, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x1e, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x70, 0x61, + 0x69, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0xaa, 0xdf, 0x1f, + 0x19, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x15, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x73, 0x12, 0xb9, 0x01, 0x0a, 0x1d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x64, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, + 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x42, 0x4e, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x24, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x22, 0xaa, 0xdf, + 0x1f, 0x1e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x1b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x12, 0x24, 0x0a, + 0x0e, 0x75, 0x73, 0x64, 0x63, 0x5f, 0x69, 0x62, 0x63, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x75, 0x73, 0x64, 0x63, 0x49, 0x62, 0x63, 0x44, 0x65, + 0x6e, 0x6f, 0x6d, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, + 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x29, + 0x0a, 0x10, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, + 0x69, 0x6e, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, + 0xa0, 0x1f, 0x01, 0x22, 0xb8, 0x01, 0x0a, 0x05, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x34, 0x0a, + 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x15, 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x44, 0x65, + 0x6e, 0x6f, 0x6d, 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x64, 0x65, + 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x64, 0x65, 0x6e, 0x6f, + 0x6d, 0x22, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, + 0x2f, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x42, 0x13, 0xf2, 0xde, 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x65, 0x78, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x3a, 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xb2, + 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x61, 0x6e, 0x64, 0x12, 0x3a, 0x0a, + 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x52, 0x0b, 0x73, 0x79, + 0x6d, 0x62, 0x6f, 0x6c, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x5a, 0x0a, 0x0b, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x39, + 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x12, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x22, 0x52, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, + 0xa0, 0x1f, 0x00, 0x22, 0xb5, 0x01, 0x0a, 0x1c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, + 0x76, 0x6f, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0f, 0xf2, 0xde, 0x1f, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x68, 0x61, + 0x73, 0x68, 0x22, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x6f, 0x74, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0xf2, 0xde, 0x1f, 0x0c, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, + 0x72, 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, + 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x0c, 0x88, + 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xcb, 0x01, 0x0a, 0x19, + 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x78, 0x0a, 0x0e, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, + 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x10, 0xf2, 0xde, 0x1f, 0x0c, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x6f, + 0x74, 0x65, 0x72, 0x22, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x3a, 0x0c, 0x88, 0xa0, 0x1f, + 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x6c, 0x0a, 0x0a, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x41, 0x0a, 0x0d, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0c, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x22, 0x53, 0x0a, 0x12, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x65, 0x74, 0x12, 0x3d, 0x0a, + 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x42, 0x18, 0xf2, 0xde, 0x1f, 0x14, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x22, 0x52, 0x0c, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x22, 0xa8, 0x02, 0x0a, + 0x15, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, + 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0xf2, 0xde, 0x1f, 0x11, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x22, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x37, 0x0a, 0x0b, + 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x16, 0xf2, 0xde, 0x1f, 0x12, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x71, 0x75, 0x6f, + 0x74, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x52, 0x0a, 0x71, 0x75, 0x6f, 0x74, 0x65, + 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x5e, 0x0a, 0x0c, 0x70, 0x61, 0x69, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x69, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x1b, 0xc8, 0xde, 0x1f, + 0x00, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x61, 0x69, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x0b, 0x70, 0x61, 0x69, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x8b, 0x01, 0x0a, 0x13, 0x50, 0x61, 0x69, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, + 0x2c, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x12, 0xf2, 0xde, 0x1f, 0x0e, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, + 0x10, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x22, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x94, 0x01, 0x0a, 0x1a, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x6e, + 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x52, + 0x09, 0x62, 0x61, 0x73, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x32, 0x0a, 0x09, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, + 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x22, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x0c, + 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x7e, 0x0a, 0x0f, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, + 0x65, 0x79, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x0c, + 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0x9c, 0x01, 0x0a, + 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, + 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x65, 0x76, 0x4d, 0x69, + 0x74, 0x68, 0x72, 0x61, 0x6e, 0x2f, 0x64, 0x6d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_oracle_v1_oracle_proto_rawDescOnce sync.Once + file_oracle_v1_oracle_proto_rawDescData = file_oracle_v1_oracle_proto_rawDesc +) + +func file_oracle_v1_oracle_proto_rawDescGZIP() []byte { + file_oracle_v1_oracle_proto_rawDescOnce.Do(func() { + file_oracle_v1_oracle_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_v1_oracle_proto_rawDescData) + }) + return file_oracle_v1_oracle_proto_rawDescData +} + +var file_oracle_v1_oracle_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_oracle_v1_oracle_proto_goTypes = []interface{}{ + (*Params)(nil), // 0: oracle.v1.Params + (*Denom)(nil), // 1: oracle.v1.Denom + (*RewardBand)(nil), // 2: oracle.v1.RewardBand + (*AggregateExchangeRatePrevote)(nil), // 3: oracle.v1.AggregateExchangeRatePrevote + (*AggregateExchangeRateVote)(nil), // 4: oracle.v1.AggregateExchangeRateVote + (*PriceStamp)(nil), // 5: oracle.v1.PriceStamp + (*ValidatorRewardSet)(nil), // 6: oracle.v1.ValidatorRewardSet + (*CurrencyPairProviders)(nil), // 7: oracle.v1.CurrencyPairProviders + (*PairAddressProvider)(nil), // 8: oracle.v1.PairAddressProvider + (*CurrencyDeviationThreshold)(nil), // 9: oracle.v1.CurrencyDeviationThreshold + (*ParamUpdatePlan)(nil), // 10: oracle.v1.ParamUpdatePlan + (*v1beta1.DecCoin)(nil), // 11: cosmos.base.v1beta1.DecCoin +} +var file_oracle_v1_oracle_proto_depIdxs = []int32{ + 2, // 0: oracle.v1.Params.reward_bands:type_name -> oracle.v1.RewardBand + 1, // 1: oracle.v1.Params.accept_list:type_name -> oracle.v1.Denom + 1, // 2: oracle.v1.Params.mandatory_list:type_name -> oracle.v1.Denom + 7, // 3: oracle.v1.Params.currency_pair_providers:type_name -> oracle.v1.CurrencyPairProviders + 9, // 4: oracle.v1.Params.currency_deviation_thresholds:type_name -> oracle.v1.CurrencyDeviationThreshold + 11, // 5: oracle.v1.AggregateExchangeRateVote.exchange_rates:type_name -> cosmos.base.v1beta1.DecCoin + 11, // 6: oracle.v1.PriceStamp.exchange_rate:type_name -> cosmos.base.v1beta1.DecCoin + 8, // 7: oracle.v1.CurrencyPairProviders.pair_address:type_name -> oracle.v1.PairAddressProvider + 0, // 8: oracle.v1.ParamUpdatePlan.changes:type_name -> oracle.v1.Params + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_oracle_v1_oracle_proto_init() } +func file_oracle_v1_oracle_proto_init() { + if File_oracle_v1_oracle_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_oracle_v1_oracle_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_oracle_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Denom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_oracle_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RewardBand); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_oracle_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AggregateExchangeRatePrevote); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_oracle_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AggregateExchangeRateVote); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_oracle_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PriceStamp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_oracle_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorRewardSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_oracle_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CurrencyPairProviders); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_oracle_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PairAddressProvider); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_oracle_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CurrencyDeviationThreshold); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_oracle_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParamUpdatePlan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_oracle_v1_oracle_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_oracle_v1_oracle_proto_goTypes, + DependencyIndexes: file_oracle_v1_oracle_proto_depIdxs, + MessageInfos: file_oracle_v1_oracle_proto_msgTypes, + }.Build() + File_oracle_v1_oracle_proto = out.File + file_oracle_v1_oracle_proto_rawDesc = nil + file_oracle_v1_oracle_proto_goTypes = nil + file_oracle_v1_oracle_proto_depIdxs = nil +} diff --git a/api/oracle/v1/query.pulsar.go b/api/oracle/v1/query.pulsar.go new file mode 100644 index 0000000..d584db3 --- /dev/null +++ b/api/oracle/v1/query.pulsar.go @@ -0,0 +1,15821 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package oraclev1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryExchangeRates protoreflect.MessageDescriptor + fd_QueryExchangeRates_denom protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryExchangeRates = File_oracle_v1_query_proto.Messages().ByName("QueryExchangeRates") + fd_QueryExchangeRates_denom = md_QueryExchangeRates.Fields().ByName("denom") +} + +var _ protoreflect.Message = (*fastReflection_QueryExchangeRates)(nil) + +type fastReflection_QueryExchangeRates QueryExchangeRates + +func (x *QueryExchangeRates) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryExchangeRates)(x) +} + +func (x *QueryExchangeRates) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryExchangeRates_messageType fastReflection_QueryExchangeRates_messageType +var _ protoreflect.MessageType = fastReflection_QueryExchangeRates_messageType{} + +type fastReflection_QueryExchangeRates_messageType struct{} + +func (x fastReflection_QueryExchangeRates_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryExchangeRates)(nil) +} +func (x fastReflection_QueryExchangeRates_messageType) New() protoreflect.Message { + return new(fastReflection_QueryExchangeRates) +} +func (x fastReflection_QueryExchangeRates_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryExchangeRates +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryExchangeRates) Descriptor() protoreflect.MessageDescriptor { + return md_QueryExchangeRates +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryExchangeRates) Type() protoreflect.MessageType { + return _fastReflection_QueryExchangeRates_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryExchangeRates) New() protoreflect.Message { + return new(fastReflection_QueryExchangeRates) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryExchangeRates) Interface() protoreflect.ProtoMessage { + return (*QueryExchangeRates)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryExchangeRates) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_QueryExchangeRates_denom, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryExchangeRates) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryExchangeRates.denom": + return x.Denom != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRates does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryExchangeRates) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryExchangeRates.denom": + x.Denom = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRates does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryExchangeRates) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryExchangeRates.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRates does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryExchangeRates) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryExchangeRates.denom": + x.Denom = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRates does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryExchangeRates) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryExchangeRates.denom": + panic(fmt.Errorf("field denom of message oracle.v1.QueryExchangeRates is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRates does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryExchangeRates) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryExchangeRates.denom": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRates does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryExchangeRates) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryExchangeRates", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryExchangeRates) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryExchangeRates) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryExchangeRates) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryExchangeRates) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryExchangeRates) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryExchangeRates) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryExchangeRates) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryExchangeRates: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryExchangeRates: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryExchangeRatesResponse_1_list)(nil) + +type _QueryExchangeRatesResponse_1_list struct { + list *[]*v1beta1.DecCoin +} + +func (x *_QueryExchangeRatesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryExchangeRatesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryExchangeRatesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryExchangeRatesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryExchangeRatesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryExchangeRatesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryExchangeRatesResponse_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryExchangeRatesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryExchangeRatesResponse protoreflect.MessageDescriptor + fd_QueryExchangeRatesResponse_exchange_rates protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryExchangeRatesResponse = File_oracle_v1_query_proto.Messages().ByName("QueryExchangeRatesResponse") + fd_QueryExchangeRatesResponse_exchange_rates = md_QueryExchangeRatesResponse.Fields().ByName("exchange_rates") +} + +var _ protoreflect.Message = (*fastReflection_QueryExchangeRatesResponse)(nil) + +type fastReflection_QueryExchangeRatesResponse QueryExchangeRatesResponse + +func (x *QueryExchangeRatesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryExchangeRatesResponse)(x) +} + +func (x *QueryExchangeRatesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryExchangeRatesResponse_messageType fastReflection_QueryExchangeRatesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryExchangeRatesResponse_messageType{} + +type fastReflection_QueryExchangeRatesResponse_messageType struct{} + +func (x fastReflection_QueryExchangeRatesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryExchangeRatesResponse)(nil) +} +func (x fastReflection_QueryExchangeRatesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryExchangeRatesResponse) +} +func (x fastReflection_QueryExchangeRatesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryExchangeRatesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryExchangeRatesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryExchangeRatesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryExchangeRatesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryExchangeRatesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryExchangeRatesResponse) New() protoreflect.Message { + return new(fastReflection_QueryExchangeRatesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryExchangeRatesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryExchangeRatesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryExchangeRatesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ExchangeRates) != 0 { + value := protoreflect.ValueOfList(&_QueryExchangeRatesResponse_1_list{list: &x.ExchangeRates}) + if !f(fd_QueryExchangeRatesResponse_exchange_rates, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryExchangeRatesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryExchangeRatesResponse.exchange_rates": + return len(x.ExchangeRates) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRatesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryExchangeRatesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryExchangeRatesResponse.exchange_rates": + x.ExchangeRates = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRatesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryExchangeRatesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryExchangeRatesResponse.exchange_rates": + if len(x.ExchangeRates) == 0 { + return protoreflect.ValueOfList(&_QueryExchangeRatesResponse_1_list{}) + } + listValue := &_QueryExchangeRatesResponse_1_list{list: &x.ExchangeRates} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRatesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryExchangeRatesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryExchangeRatesResponse.exchange_rates": + lv := value.List() + clv := lv.(*_QueryExchangeRatesResponse_1_list) + x.ExchangeRates = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRatesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryExchangeRatesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryExchangeRatesResponse.exchange_rates": + if x.ExchangeRates == nil { + x.ExchangeRates = []*v1beta1.DecCoin{} + } + value := &_QueryExchangeRatesResponse_1_list{list: &x.ExchangeRates} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRatesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryExchangeRatesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryExchangeRatesResponse.exchange_rates": + list := []*v1beta1.DecCoin{} + return protoreflect.ValueOfList(&_QueryExchangeRatesResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryExchangeRatesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryExchangeRatesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryExchangeRatesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryExchangeRatesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryExchangeRatesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryExchangeRatesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryExchangeRatesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryExchangeRatesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.ExchangeRates) > 0 { + for _, e := range x.ExchangeRates { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryExchangeRatesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ExchangeRates) > 0 { + for iNdEx := len(x.ExchangeRates) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ExchangeRates[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryExchangeRatesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryExchangeRatesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryExchangeRatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExchangeRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ExchangeRates = append(x.ExchangeRates, &v1beta1.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExchangeRates[len(x.ExchangeRates)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryActiveExchangeRates protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryActiveExchangeRates = File_oracle_v1_query_proto.Messages().ByName("QueryActiveExchangeRates") +} + +var _ protoreflect.Message = (*fastReflection_QueryActiveExchangeRates)(nil) + +type fastReflection_QueryActiveExchangeRates QueryActiveExchangeRates + +func (x *QueryActiveExchangeRates) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryActiveExchangeRates)(x) +} + +func (x *QueryActiveExchangeRates) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryActiveExchangeRates_messageType fastReflection_QueryActiveExchangeRates_messageType +var _ protoreflect.MessageType = fastReflection_QueryActiveExchangeRates_messageType{} + +type fastReflection_QueryActiveExchangeRates_messageType struct{} + +func (x fastReflection_QueryActiveExchangeRates_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryActiveExchangeRates)(nil) +} +func (x fastReflection_QueryActiveExchangeRates_messageType) New() protoreflect.Message { + return new(fastReflection_QueryActiveExchangeRates) +} +func (x fastReflection_QueryActiveExchangeRates_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryActiveExchangeRates +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryActiveExchangeRates) Descriptor() protoreflect.MessageDescriptor { + return md_QueryActiveExchangeRates +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryActiveExchangeRates) Type() protoreflect.MessageType { + return _fastReflection_QueryActiveExchangeRates_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryActiveExchangeRates) New() protoreflect.Message { + return new(fastReflection_QueryActiveExchangeRates) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryActiveExchangeRates) Interface() protoreflect.ProtoMessage { + return (*QueryActiveExchangeRates)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryActiveExchangeRates) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryActiveExchangeRates) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRates does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryActiveExchangeRates) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRates does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryActiveExchangeRates) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRates does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryActiveExchangeRates) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRates does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryActiveExchangeRates) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRates does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryActiveExchangeRates) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRates")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRates does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryActiveExchangeRates) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryActiveExchangeRates", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryActiveExchangeRates) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryActiveExchangeRates) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryActiveExchangeRates) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryActiveExchangeRates) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryActiveExchangeRates) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryActiveExchangeRates) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryActiveExchangeRates) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryActiveExchangeRates: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryActiveExchangeRates: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryActiveExchangeRatesResponse_1_list)(nil) + +type _QueryActiveExchangeRatesResponse_1_list struct { + list *[]string +} + +func (x *_QueryActiveExchangeRatesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryActiveExchangeRatesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_QueryActiveExchangeRatesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryActiveExchangeRatesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryActiveExchangeRatesResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryActiveExchangeRatesResponse at list field ActiveRates as it is not of Message kind")) +} + +func (x *_QueryActiveExchangeRatesResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryActiveExchangeRatesResponse_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_QueryActiveExchangeRatesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryActiveExchangeRatesResponse protoreflect.MessageDescriptor + fd_QueryActiveExchangeRatesResponse_active_rates protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryActiveExchangeRatesResponse = File_oracle_v1_query_proto.Messages().ByName("QueryActiveExchangeRatesResponse") + fd_QueryActiveExchangeRatesResponse_active_rates = md_QueryActiveExchangeRatesResponse.Fields().ByName("active_rates") +} + +var _ protoreflect.Message = (*fastReflection_QueryActiveExchangeRatesResponse)(nil) + +type fastReflection_QueryActiveExchangeRatesResponse QueryActiveExchangeRatesResponse + +func (x *QueryActiveExchangeRatesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryActiveExchangeRatesResponse)(x) +} + +func (x *QueryActiveExchangeRatesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryActiveExchangeRatesResponse_messageType fastReflection_QueryActiveExchangeRatesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryActiveExchangeRatesResponse_messageType{} + +type fastReflection_QueryActiveExchangeRatesResponse_messageType struct{} + +func (x fastReflection_QueryActiveExchangeRatesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryActiveExchangeRatesResponse)(nil) +} +func (x fastReflection_QueryActiveExchangeRatesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryActiveExchangeRatesResponse) +} +func (x fastReflection_QueryActiveExchangeRatesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryActiveExchangeRatesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryActiveExchangeRatesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryActiveExchangeRatesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryActiveExchangeRatesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryActiveExchangeRatesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryActiveExchangeRatesResponse) New() protoreflect.Message { + return new(fastReflection_QueryActiveExchangeRatesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryActiveExchangeRatesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryActiveExchangeRatesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryActiveExchangeRatesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ActiveRates) != 0 { + value := protoreflect.ValueOfList(&_QueryActiveExchangeRatesResponse_1_list{list: &x.ActiveRates}) + if !f(fd_QueryActiveExchangeRatesResponse_active_rates, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryActiveExchangeRatesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryActiveExchangeRatesResponse.active_rates": + return len(x.ActiveRates) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRatesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryActiveExchangeRatesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryActiveExchangeRatesResponse.active_rates": + x.ActiveRates = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRatesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryActiveExchangeRatesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryActiveExchangeRatesResponse.active_rates": + if len(x.ActiveRates) == 0 { + return protoreflect.ValueOfList(&_QueryActiveExchangeRatesResponse_1_list{}) + } + listValue := &_QueryActiveExchangeRatesResponse_1_list{list: &x.ActiveRates} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRatesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryActiveExchangeRatesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryActiveExchangeRatesResponse.active_rates": + lv := value.List() + clv := lv.(*_QueryActiveExchangeRatesResponse_1_list) + x.ActiveRates = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRatesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryActiveExchangeRatesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryActiveExchangeRatesResponse.active_rates": + if x.ActiveRates == nil { + x.ActiveRates = []string{} + } + value := &_QueryActiveExchangeRatesResponse_1_list{list: &x.ActiveRates} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRatesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryActiveExchangeRatesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryActiveExchangeRatesResponse.active_rates": + list := []string{} + return protoreflect.ValueOfList(&_QueryActiveExchangeRatesResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryActiveExchangeRatesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryActiveExchangeRatesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryActiveExchangeRatesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryActiveExchangeRatesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryActiveExchangeRatesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryActiveExchangeRatesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryActiveExchangeRatesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryActiveExchangeRatesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryActiveExchangeRatesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.ActiveRates) > 0 { + for _, s := range x.ActiveRates { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryActiveExchangeRatesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ActiveRates) > 0 { + for iNdEx := len(x.ActiveRates) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.ActiveRates[iNdEx]) + copy(dAtA[i:], x.ActiveRates[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ActiveRates[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryActiveExchangeRatesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryActiveExchangeRatesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryActiveExchangeRatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ActiveRates", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ActiveRates = append(x.ActiveRates, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryFeederDelegation protoreflect.MessageDescriptor + fd_QueryFeederDelegation_validator_addr protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryFeederDelegation = File_oracle_v1_query_proto.Messages().ByName("QueryFeederDelegation") + fd_QueryFeederDelegation_validator_addr = md_QueryFeederDelegation.Fields().ByName("validator_addr") +} + +var _ protoreflect.Message = (*fastReflection_QueryFeederDelegation)(nil) + +type fastReflection_QueryFeederDelegation QueryFeederDelegation + +func (x *QueryFeederDelegation) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryFeederDelegation)(x) +} + +func (x *QueryFeederDelegation) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryFeederDelegation_messageType fastReflection_QueryFeederDelegation_messageType +var _ protoreflect.MessageType = fastReflection_QueryFeederDelegation_messageType{} + +type fastReflection_QueryFeederDelegation_messageType struct{} + +func (x fastReflection_QueryFeederDelegation_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryFeederDelegation)(nil) +} +func (x fastReflection_QueryFeederDelegation_messageType) New() protoreflect.Message { + return new(fastReflection_QueryFeederDelegation) +} +func (x fastReflection_QueryFeederDelegation_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryFeederDelegation +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryFeederDelegation) Descriptor() protoreflect.MessageDescriptor { + return md_QueryFeederDelegation +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryFeederDelegation) Type() protoreflect.MessageType { + return _fastReflection_QueryFeederDelegation_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryFeederDelegation) New() protoreflect.Message { + return new(fastReflection_QueryFeederDelegation) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryFeederDelegation) Interface() protoreflect.ProtoMessage { + return (*QueryFeederDelegation)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryFeederDelegation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddr != "" { + value := protoreflect.ValueOfString(x.ValidatorAddr) + if !f(fd_QueryFeederDelegation_validator_addr, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryFeederDelegation) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryFeederDelegation.validator_addr": + return x.ValidatorAddr != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegation does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryFeederDelegation) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryFeederDelegation.validator_addr": + x.ValidatorAddr = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegation does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryFeederDelegation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryFeederDelegation.validator_addr": + value := x.ValidatorAddr + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegation does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryFeederDelegation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryFeederDelegation.validator_addr": + x.ValidatorAddr = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegation does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryFeederDelegation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryFeederDelegation.validator_addr": + panic(fmt.Errorf("field validator_addr of message oracle.v1.QueryFeederDelegation is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegation does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryFeederDelegation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryFeederDelegation.validator_addr": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegation")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegation does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryFeederDelegation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryFeederDelegation", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryFeederDelegation) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryFeederDelegation) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryFeederDelegation) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryFeederDelegation) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryFeederDelegation) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryFeederDelegation) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorAddr) > 0 { + i -= len(x.ValidatorAddr) + copy(dAtA[i:], x.ValidatorAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddr))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryFeederDelegation) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFeederDelegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFeederDelegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryFeederDelegationResponse protoreflect.MessageDescriptor + fd_QueryFeederDelegationResponse_feeder_addr protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryFeederDelegationResponse = File_oracle_v1_query_proto.Messages().ByName("QueryFeederDelegationResponse") + fd_QueryFeederDelegationResponse_feeder_addr = md_QueryFeederDelegationResponse.Fields().ByName("feeder_addr") +} + +var _ protoreflect.Message = (*fastReflection_QueryFeederDelegationResponse)(nil) + +type fastReflection_QueryFeederDelegationResponse QueryFeederDelegationResponse + +func (x *QueryFeederDelegationResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryFeederDelegationResponse)(x) +} + +func (x *QueryFeederDelegationResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryFeederDelegationResponse_messageType fastReflection_QueryFeederDelegationResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryFeederDelegationResponse_messageType{} + +type fastReflection_QueryFeederDelegationResponse_messageType struct{} + +func (x fastReflection_QueryFeederDelegationResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryFeederDelegationResponse)(nil) +} +func (x fastReflection_QueryFeederDelegationResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryFeederDelegationResponse) +} +func (x fastReflection_QueryFeederDelegationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryFeederDelegationResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryFeederDelegationResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryFeederDelegationResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryFeederDelegationResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryFeederDelegationResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryFeederDelegationResponse) New() protoreflect.Message { + return new(fastReflection_QueryFeederDelegationResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryFeederDelegationResponse) Interface() protoreflect.ProtoMessage { + return (*QueryFeederDelegationResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryFeederDelegationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.FeederAddr != "" { + value := protoreflect.ValueOfString(x.FeederAddr) + if !f(fd_QueryFeederDelegationResponse_feeder_addr, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryFeederDelegationResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryFeederDelegationResponse.feeder_addr": + return x.FeederAddr != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegationResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegationResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryFeederDelegationResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryFeederDelegationResponse.feeder_addr": + x.FeederAddr = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegationResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegationResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryFeederDelegationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryFeederDelegationResponse.feeder_addr": + value := x.FeederAddr + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegationResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegationResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryFeederDelegationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryFeederDelegationResponse.feeder_addr": + x.FeederAddr = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegationResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegationResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryFeederDelegationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryFeederDelegationResponse.feeder_addr": + panic(fmt.Errorf("field feeder_addr of message oracle.v1.QueryFeederDelegationResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegationResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegationResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryFeederDelegationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryFeederDelegationResponse.feeder_addr": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryFeederDelegationResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryFeederDelegationResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryFeederDelegationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryFeederDelegationResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryFeederDelegationResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryFeederDelegationResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryFeederDelegationResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryFeederDelegationResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryFeederDelegationResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.FeederAddr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryFeederDelegationResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.FeederAddr) > 0 { + i -= len(x.FeederAddr) + copy(dAtA[i:], x.FeederAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeederAddr))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryFeederDelegationResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFeederDelegationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFeederDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeederAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FeederAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryMissCounter protoreflect.MessageDescriptor + fd_QueryMissCounter_validator_addr protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryMissCounter = File_oracle_v1_query_proto.Messages().ByName("QueryMissCounter") + fd_QueryMissCounter_validator_addr = md_QueryMissCounter.Fields().ByName("validator_addr") +} + +var _ protoreflect.Message = (*fastReflection_QueryMissCounter)(nil) + +type fastReflection_QueryMissCounter QueryMissCounter + +func (x *QueryMissCounter) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryMissCounter)(x) +} + +func (x *QueryMissCounter) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryMissCounter_messageType fastReflection_QueryMissCounter_messageType +var _ protoreflect.MessageType = fastReflection_QueryMissCounter_messageType{} + +type fastReflection_QueryMissCounter_messageType struct{} + +func (x fastReflection_QueryMissCounter_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryMissCounter)(nil) +} +func (x fastReflection_QueryMissCounter_messageType) New() protoreflect.Message { + return new(fastReflection_QueryMissCounter) +} +func (x fastReflection_QueryMissCounter_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMissCounter +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryMissCounter) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMissCounter +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryMissCounter) Type() protoreflect.MessageType { + return _fastReflection_QueryMissCounter_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryMissCounter) New() protoreflect.Message { + return new(fastReflection_QueryMissCounter) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryMissCounter) Interface() protoreflect.ProtoMessage { + return (*QueryMissCounter)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryMissCounter) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddr != "" { + value := protoreflect.ValueOfString(x.ValidatorAddr) + if !f(fd_QueryMissCounter_validator_addr, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryMissCounter) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryMissCounter.validator_addr": + return x.ValidatorAddr != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounter")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounter does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMissCounter) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryMissCounter.validator_addr": + x.ValidatorAddr = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounter")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounter does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryMissCounter) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryMissCounter.validator_addr": + value := x.ValidatorAddr + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounter")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounter does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMissCounter) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryMissCounter.validator_addr": + x.ValidatorAddr = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounter")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounter does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMissCounter) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMissCounter.validator_addr": + panic(fmt.Errorf("field validator_addr of message oracle.v1.QueryMissCounter is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounter")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounter does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryMissCounter) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMissCounter.validator_addr": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounter")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounter does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryMissCounter) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryMissCounter", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryMissCounter) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMissCounter) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryMissCounter) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryMissCounter) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryMissCounter) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryMissCounter) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorAddr) > 0 { + i -= len(x.ValidatorAddr) + copy(dAtA[i:], x.ValidatorAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddr))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryMissCounter) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMissCounter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMissCounter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryMissCounterResponse protoreflect.MessageDescriptor + fd_QueryMissCounterResponse_miss_counter protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryMissCounterResponse = File_oracle_v1_query_proto.Messages().ByName("QueryMissCounterResponse") + fd_QueryMissCounterResponse_miss_counter = md_QueryMissCounterResponse.Fields().ByName("miss_counter") +} + +var _ protoreflect.Message = (*fastReflection_QueryMissCounterResponse)(nil) + +type fastReflection_QueryMissCounterResponse QueryMissCounterResponse + +func (x *QueryMissCounterResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryMissCounterResponse)(x) +} + +func (x *QueryMissCounterResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryMissCounterResponse_messageType fastReflection_QueryMissCounterResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryMissCounterResponse_messageType{} + +type fastReflection_QueryMissCounterResponse_messageType struct{} + +func (x fastReflection_QueryMissCounterResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryMissCounterResponse)(nil) +} +func (x fastReflection_QueryMissCounterResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryMissCounterResponse) +} +func (x fastReflection_QueryMissCounterResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMissCounterResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryMissCounterResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMissCounterResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryMissCounterResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryMissCounterResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryMissCounterResponse) New() protoreflect.Message { + return new(fastReflection_QueryMissCounterResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryMissCounterResponse) Interface() protoreflect.ProtoMessage { + return (*QueryMissCounterResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryMissCounterResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.MissCounter != uint64(0) { + value := protoreflect.ValueOfUint64(x.MissCounter) + if !f(fd_QueryMissCounterResponse_miss_counter, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryMissCounterResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryMissCounterResponse.miss_counter": + return x.MissCounter != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounterResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounterResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMissCounterResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryMissCounterResponse.miss_counter": + x.MissCounter = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounterResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounterResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryMissCounterResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryMissCounterResponse.miss_counter": + value := x.MissCounter + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounterResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounterResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMissCounterResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryMissCounterResponse.miss_counter": + x.MissCounter = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounterResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounterResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMissCounterResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMissCounterResponse.miss_counter": + panic(fmt.Errorf("field miss_counter of message oracle.v1.QueryMissCounterResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounterResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounterResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryMissCounterResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMissCounterResponse.miss_counter": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMissCounterResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMissCounterResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryMissCounterResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryMissCounterResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryMissCounterResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMissCounterResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryMissCounterResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryMissCounterResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryMissCounterResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.MissCounter != 0 { + n += 1 + runtime.Sov(uint64(x.MissCounter)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryMissCounterResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.MissCounter != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MissCounter)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryMissCounterResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMissCounterResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMissCounterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MissCounter", wireType) + } + x.MissCounter = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.MissCounter |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QuerySlashWindow protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QuerySlashWindow = File_oracle_v1_query_proto.Messages().ByName("QuerySlashWindow") +} + +var _ protoreflect.Message = (*fastReflection_QuerySlashWindow)(nil) + +type fastReflection_QuerySlashWindow QuerySlashWindow + +func (x *QuerySlashWindow) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySlashWindow)(x) +} + +func (x *QuerySlashWindow) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QuerySlashWindow_messageType fastReflection_QuerySlashWindow_messageType +var _ protoreflect.MessageType = fastReflection_QuerySlashWindow_messageType{} + +type fastReflection_QuerySlashWindow_messageType struct{} + +func (x fastReflection_QuerySlashWindow_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySlashWindow)(nil) +} +func (x fastReflection_QuerySlashWindow_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySlashWindow) +} +func (x fastReflection_QuerySlashWindow_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySlashWindow +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySlashWindow) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySlashWindow +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QuerySlashWindow) Type() protoreflect.MessageType { + return _fastReflection_QuerySlashWindow_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySlashWindow) New() protoreflect.Message { + return new(fastReflection_QuerySlashWindow) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySlashWindow) Interface() protoreflect.ProtoMessage { + return (*QuerySlashWindow)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QuerySlashWindow) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QuerySlashWindow) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindow")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindow does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySlashWindow) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindow")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindow does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QuerySlashWindow) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindow")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindow does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySlashWindow) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindow")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindow does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySlashWindow) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindow")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindow does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QuerySlashWindow) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindow")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindow does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QuerySlashWindow) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QuerySlashWindow", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QuerySlashWindow) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySlashWindow) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QuerySlashWindow) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QuerySlashWindow) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySlashWindow) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QuerySlashWindow) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QuerySlashWindow) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySlashWindow: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySlashWindow: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QuerySlashWindowResponse protoreflect.MessageDescriptor + fd_QuerySlashWindowResponse_window_progress protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QuerySlashWindowResponse = File_oracle_v1_query_proto.Messages().ByName("QuerySlashWindowResponse") + fd_QuerySlashWindowResponse_window_progress = md_QuerySlashWindowResponse.Fields().ByName("window_progress") +} + +var _ protoreflect.Message = (*fastReflection_QuerySlashWindowResponse)(nil) + +type fastReflection_QuerySlashWindowResponse QuerySlashWindowResponse + +func (x *QuerySlashWindowResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySlashWindowResponse)(x) +} + +func (x *QuerySlashWindowResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QuerySlashWindowResponse_messageType fastReflection_QuerySlashWindowResponse_messageType +var _ protoreflect.MessageType = fastReflection_QuerySlashWindowResponse_messageType{} + +type fastReflection_QuerySlashWindowResponse_messageType struct{} + +func (x fastReflection_QuerySlashWindowResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySlashWindowResponse)(nil) +} +func (x fastReflection_QuerySlashWindowResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySlashWindowResponse) +} +func (x fastReflection_QuerySlashWindowResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySlashWindowResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySlashWindowResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySlashWindowResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QuerySlashWindowResponse) Type() protoreflect.MessageType { + return _fastReflection_QuerySlashWindowResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySlashWindowResponse) New() protoreflect.Message { + return new(fastReflection_QuerySlashWindowResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySlashWindowResponse) Interface() protoreflect.ProtoMessage { + return (*QuerySlashWindowResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QuerySlashWindowResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.WindowProgress != uint64(0) { + value := protoreflect.ValueOfUint64(x.WindowProgress) + if !f(fd_QuerySlashWindowResponse_window_progress, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QuerySlashWindowResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QuerySlashWindowResponse.window_progress": + return x.WindowProgress != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindowResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindowResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySlashWindowResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QuerySlashWindowResponse.window_progress": + x.WindowProgress = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindowResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindowResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QuerySlashWindowResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QuerySlashWindowResponse.window_progress": + value := x.WindowProgress + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindowResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindowResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySlashWindowResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QuerySlashWindowResponse.window_progress": + x.WindowProgress = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindowResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindowResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySlashWindowResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QuerySlashWindowResponse.window_progress": + panic(fmt.Errorf("field window_progress of message oracle.v1.QuerySlashWindowResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindowResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindowResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QuerySlashWindowResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QuerySlashWindowResponse.window_progress": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySlashWindowResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySlashWindowResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QuerySlashWindowResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QuerySlashWindowResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QuerySlashWindowResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySlashWindowResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QuerySlashWindowResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QuerySlashWindowResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySlashWindowResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.WindowProgress != 0 { + n += 1 + runtime.Sov(uint64(x.WindowProgress)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QuerySlashWindowResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.WindowProgress != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.WindowProgress)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QuerySlashWindowResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySlashWindowResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySlashWindowResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WindowProgress", wireType) + } + x.WindowProgress = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.WindowProgress |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAggregatePrevote protoreflect.MessageDescriptor + fd_QueryAggregatePrevote_validator_addr protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryAggregatePrevote = File_oracle_v1_query_proto.Messages().ByName("QueryAggregatePrevote") + fd_QueryAggregatePrevote_validator_addr = md_QueryAggregatePrevote.Fields().ByName("validator_addr") +} + +var _ protoreflect.Message = (*fastReflection_QueryAggregatePrevote)(nil) + +type fastReflection_QueryAggregatePrevote QueryAggregatePrevote + +func (x *QueryAggregatePrevote) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAggregatePrevote)(x) +} + +func (x *QueryAggregatePrevote) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAggregatePrevote_messageType fastReflection_QueryAggregatePrevote_messageType +var _ protoreflect.MessageType = fastReflection_QueryAggregatePrevote_messageType{} + +type fastReflection_QueryAggregatePrevote_messageType struct{} + +func (x fastReflection_QueryAggregatePrevote_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAggregatePrevote)(nil) +} +func (x fastReflection_QueryAggregatePrevote_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAggregatePrevote) +} +func (x fastReflection_QueryAggregatePrevote_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregatePrevote +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAggregatePrevote) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregatePrevote +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAggregatePrevote) Type() protoreflect.MessageType { + return _fastReflection_QueryAggregatePrevote_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAggregatePrevote) New() protoreflect.Message { + return new(fastReflection_QueryAggregatePrevote) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAggregatePrevote) Interface() protoreflect.ProtoMessage { + return (*QueryAggregatePrevote)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAggregatePrevote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddr != "" { + value := protoreflect.ValueOfString(x.ValidatorAddr) + if !f(fd_QueryAggregatePrevote_validator_addr, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAggregatePrevote) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevote.validator_addr": + return x.ValidatorAddr != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevote does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevote) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevote.validator_addr": + x.ValidatorAddr = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevote does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAggregatePrevote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryAggregatePrevote.validator_addr": + value := x.ValidatorAddr + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevote does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevote.validator_addr": + x.ValidatorAddr = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevote does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevote.validator_addr": + panic(fmt.Errorf("field validator_addr of message oracle.v1.QueryAggregatePrevote is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevote does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAggregatePrevote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevote.validator_addr": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevote does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAggregatePrevote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryAggregatePrevote", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAggregatePrevote) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevote) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAggregatePrevote) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAggregatePrevote) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAggregatePrevote) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregatePrevote) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorAddr) > 0 { + i -= len(x.ValidatorAddr) + copy(dAtA[i:], x.ValidatorAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddr))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregatePrevote) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregatePrevote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregatePrevote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAggregatePrevoteResponse protoreflect.MessageDescriptor + fd_QueryAggregatePrevoteResponse_aggregate_prevote protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryAggregatePrevoteResponse = File_oracle_v1_query_proto.Messages().ByName("QueryAggregatePrevoteResponse") + fd_QueryAggregatePrevoteResponse_aggregate_prevote = md_QueryAggregatePrevoteResponse.Fields().ByName("aggregate_prevote") +} + +var _ protoreflect.Message = (*fastReflection_QueryAggregatePrevoteResponse)(nil) + +type fastReflection_QueryAggregatePrevoteResponse QueryAggregatePrevoteResponse + +func (x *QueryAggregatePrevoteResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAggregatePrevoteResponse)(x) +} + +func (x *QueryAggregatePrevoteResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAggregatePrevoteResponse_messageType fastReflection_QueryAggregatePrevoteResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAggregatePrevoteResponse_messageType{} + +type fastReflection_QueryAggregatePrevoteResponse_messageType struct{} + +func (x fastReflection_QueryAggregatePrevoteResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAggregatePrevoteResponse)(nil) +} +func (x fastReflection_QueryAggregatePrevoteResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAggregatePrevoteResponse) +} +func (x fastReflection_QueryAggregatePrevoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregatePrevoteResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAggregatePrevoteResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregatePrevoteResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAggregatePrevoteResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAggregatePrevoteResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAggregatePrevoteResponse) New() protoreflect.Message { + return new(fastReflection_QueryAggregatePrevoteResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAggregatePrevoteResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAggregatePrevoteResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAggregatePrevoteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AggregatePrevote != nil { + value := protoreflect.ValueOfMessage(x.AggregatePrevote.ProtoReflect()) + if !f(fd_QueryAggregatePrevoteResponse_aggregate_prevote, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAggregatePrevoteResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevoteResponse.aggregate_prevote": + return x.AggregatePrevote != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevoteResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevoteResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevoteResponse.aggregate_prevote": + x.AggregatePrevote = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevoteResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAggregatePrevoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryAggregatePrevoteResponse.aggregate_prevote": + value := x.AggregatePrevote + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevoteResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevoteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevoteResponse.aggregate_prevote": + x.AggregatePrevote = value.Message().Interface().(*AggregateExchangeRatePrevote) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevoteResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevoteResponse.aggregate_prevote": + if x.AggregatePrevote == nil { + x.AggregatePrevote = new(AggregateExchangeRatePrevote) + } + return protoreflect.ValueOfMessage(x.AggregatePrevote.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevoteResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAggregatePrevoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevoteResponse.aggregate_prevote": + m := new(AggregateExchangeRatePrevote) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevoteResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAggregatePrevoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryAggregatePrevoteResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAggregatePrevoteResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevoteResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAggregatePrevoteResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAggregatePrevoteResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAggregatePrevoteResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.AggregatePrevote != nil { + l = options.Size(x.AggregatePrevote) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregatePrevoteResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.AggregatePrevote != nil { + encoded, err := options.Marshal(x.AggregatePrevote) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregatePrevoteResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregatePrevoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregatePrevoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AggregatePrevote", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.AggregatePrevote == nil { + x.AggregatePrevote = &AggregateExchangeRatePrevote{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AggregatePrevote); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAggregatePrevotes protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryAggregatePrevotes = File_oracle_v1_query_proto.Messages().ByName("QueryAggregatePrevotes") +} + +var _ protoreflect.Message = (*fastReflection_QueryAggregatePrevotes)(nil) + +type fastReflection_QueryAggregatePrevotes QueryAggregatePrevotes + +func (x *QueryAggregatePrevotes) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAggregatePrevotes)(x) +} + +func (x *QueryAggregatePrevotes) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAggregatePrevotes_messageType fastReflection_QueryAggregatePrevotes_messageType +var _ protoreflect.MessageType = fastReflection_QueryAggregatePrevotes_messageType{} + +type fastReflection_QueryAggregatePrevotes_messageType struct{} + +func (x fastReflection_QueryAggregatePrevotes_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAggregatePrevotes)(nil) +} +func (x fastReflection_QueryAggregatePrevotes_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAggregatePrevotes) +} +func (x fastReflection_QueryAggregatePrevotes_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregatePrevotes +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAggregatePrevotes) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregatePrevotes +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAggregatePrevotes) Type() protoreflect.MessageType { + return _fastReflection_QueryAggregatePrevotes_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAggregatePrevotes) New() protoreflect.Message { + return new(fastReflection_QueryAggregatePrevotes) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAggregatePrevotes) Interface() protoreflect.ProtoMessage { + return (*QueryAggregatePrevotes)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAggregatePrevotes) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAggregatePrevotes) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotes does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevotes) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotes does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAggregatePrevotes) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotes does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevotes) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotes does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevotes) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotes does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAggregatePrevotes) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotes does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAggregatePrevotes) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryAggregatePrevotes", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAggregatePrevotes) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevotes) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAggregatePrevotes) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAggregatePrevotes) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAggregatePrevotes) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregatePrevotes) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregatePrevotes) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregatePrevotes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregatePrevotes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryAggregatePrevotesResponse_1_list)(nil) + +type _QueryAggregatePrevotesResponse_1_list struct { + list *[]*AggregateExchangeRatePrevote +} + +func (x *_QueryAggregatePrevotesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAggregatePrevotesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAggregatePrevotesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AggregateExchangeRatePrevote) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAggregatePrevotesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AggregateExchangeRatePrevote) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAggregatePrevotesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(AggregateExchangeRatePrevote) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAggregatePrevotesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAggregatePrevotesResponse_1_list) NewElement() protoreflect.Value { + v := new(AggregateExchangeRatePrevote) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAggregatePrevotesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAggregatePrevotesResponse protoreflect.MessageDescriptor + fd_QueryAggregatePrevotesResponse_aggregate_prevotes protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryAggregatePrevotesResponse = File_oracle_v1_query_proto.Messages().ByName("QueryAggregatePrevotesResponse") + fd_QueryAggregatePrevotesResponse_aggregate_prevotes = md_QueryAggregatePrevotesResponse.Fields().ByName("aggregate_prevotes") +} + +var _ protoreflect.Message = (*fastReflection_QueryAggregatePrevotesResponse)(nil) + +type fastReflection_QueryAggregatePrevotesResponse QueryAggregatePrevotesResponse + +func (x *QueryAggregatePrevotesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAggregatePrevotesResponse)(x) +} + +func (x *QueryAggregatePrevotesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAggregatePrevotesResponse_messageType fastReflection_QueryAggregatePrevotesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAggregatePrevotesResponse_messageType{} + +type fastReflection_QueryAggregatePrevotesResponse_messageType struct{} + +func (x fastReflection_QueryAggregatePrevotesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAggregatePrevotesResponse)(nil) +} +func (x fastReflection_QueryAggregatePrevotesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAggregatePrevotesResponse) +} +func (x fastReflection_QueryAggregatePrevotesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregatePrevotesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAggregatePrevotesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregatePrevotesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAggregatePrevotesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAggregatePrevotesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAggregatePrevotesResponse) New() protoreflect.Message { + return new(fastReflection_QueryAggregatePrevotesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAggregatePrevotesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAggregatePrevotesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAggregatePrevotesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.AggregatePrevotes) != 0 { + value := protoreflect.ValueOfList(&_QueryAggregatePrevotesResponse_1_list{list: &x.AggregatePrevotes}) + if !f(fd_QueryAggregatePrevotesResponse_aggregate_prevotes, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAggregatePrevotesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevotesResponse.aggregate_prevotes": + return len(x.AggregatePrevotes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevotesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevotesResponse.aggregate_prevotes": + x.AggregatePrevotes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAggregatePrevotesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryAggregatePrevotesResponse.aggregate_prevotes": + if len(x.AggregatePrevotes) == 0 { + return protoreflect.ValueOfList(&_QueryAggregatePrevotesResponse_1_list{}) + } + listValue := &_QueryAggregatePrevotesResponse_1_list{list: &x.AggregatePrevotes} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevotesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevotesResponse.aggregate_prevotes": + lv := value.List() + clv := lv.(*_QueryAggregatePrevotesResponse_1_list) + x.AggregatePrevotes = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevotesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevotesResponse.aggregate_prevotes": + if x.AggregatePrevotes == nil { + x.AggregatePrevotes = []*AggregateExchangeRatePrevote{} + } + value := &_QueryAggregatePrevotesResponse_1_list{list: &x.AggregatePrevotes} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAggregatePrevotesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregatePrevotesResponse.aggregate_prevotes": + list := []*AggregateExchangeRatePrevote{} + return protoreflect.ValueOfList(&_QueryAggregatePrevotesResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregatePrevotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregatePrevotesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAggregatePrevotesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryAggregatePrevotesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAggregatePrevotesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregatePrevotesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAggregatePrevotesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAggregatePrevotesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAggregatePrevotesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.AggregatePrevotes) > 0 { + for _, e := range x.AggregatePrevotes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregatePrevotesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.AggregatePrevotes) > 0 { + for iNdEx := len(x.AggregatePrevotes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AggregatePrevotes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregatePrevotesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregatePrevotesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregatePrevotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AggregatePrevotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AggregatePrevotes = append(x.AggregatePrevotes, &AggregateExchangeRatePrevote{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AggregatePrevotes[len(x.AggregatePrevotes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAggregateVote protoreflect.MessageDescriptor + fd_QueryAggregateVote_validator_addr protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryAggregateVote = File_oracle_v1_query_proto.Messages().ByName("QueryAggregateVote") + fd_QueryAggregateVote_validator_addr = md_QueryAggregateVote.Fields().ByName("validator_addr") +} + +var _ protoreflect.Message = (*fastReflection_QueryAggregateVote)(nil) + +type fastReflection_QueryAggregateVote QueryAggregateVote + +func (x *QueryAggregateVote) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAggregateVote)(x) +} + +func (x *QueryAggregateVote) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAggregateVote_messageType fastReflection_QueryAggregateVote_messageType +var _ protoreflect.MessageType = fastReflection_QueryAggregateVote_messageType{} + +type fastReflection_QueryAggregateVote_messageType struct{} + +func (x fastReflection_QueryAggregateVote_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAggregateVote)(nil) +} +func (x fastReflection_QueryAggregateVote_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAggregateVote) +} +func (x fastReflection_QueryAggregateVote_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregateVote +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAggregateVote) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregateVote +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAggregateVote) Type() protoreflect.MessageType { + return _fastReflection_QueryAggregateVote_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAggregateVote) New() protoreflect.Message { + return new(fastReflection_QueryAggregateVote) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAggregateVote) Interface() protoreflect.ProtoMessage { + return (*QueryAggregateVote)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAggregateVote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddr != "" { + value := protoreflect.ValueOfString(x.ValidatorAddr) + if !f(fd_QueryAggregateVote_validator_addr, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAggregateVote) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVote.validator_addr": + return x.ValidatorAddr != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVote does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVote) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVote.validator_addr": + x.ValidatorAddr = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVote does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAggregateVote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryAggregateVote.validator_addr": + value := x.ValidatorAddr + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVote does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVote.validator_addr": + x.ValidatorAddr = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVote does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVote.validator_addr": + panic(fmt.Errorf("field validator_addr of message oracle.v1.QueryAggregateVote is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVote does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAggregateVote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVote.validator_addr": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVote")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVote does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAggregateVote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryAggregateVote", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAggregateVote) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVote) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAggregateVote) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAggregateVote) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAggregateVote) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregateVote) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorAddr) > 0 { + i -= len(x.ValidatorAddr) + copy(dAtA[i:], x.ValidatorAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddr))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregateVote) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregateVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregateVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAggregateVoteResponse protoreflect.MessageDescriptor + fd_QueryAggregateVoteResponse_aggregate_vote protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryAggregateVoteResponse = File_oracle_v1_query_proto.Messages().ByName("QueryAggregateVoteResponse") + fd_QueryAggregateVoteResponse_aggregate_vote = md_QueryAggregateVoteResponse.Fields().ByName("aggregate_vote") +} + +var _ protoreflect.Message = (*fastReflection_QueryAggregateVoteResponse)(nil) + +type fastReflection_QueryAggregateVoteResponse QueryAggregateVoteResponse + +func (x *QueryAggregateVoteResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAggregateVoteResponse)(x) +} + +func (x *QueryAggregateVoteResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAggregateVoteResponse_messageType fastReflection_QueryAggregateVoteResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAggregateVoteResponse_messageType{} + +type fastReflection_QueryAggregateVoteResponse_messageType struct{} + +func (x fastReflection_QueryAggregateVoteResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAggregateVoteResponse)(nil) +} +func (x fastReflection_QueryAggregateVoteResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAggregateVoteResponse) +} +func (x fastReflection_QueryAggregateVoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregateVoteResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAggregateVoteResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregateVoteResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAggregateVoteResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAggregateVoteResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAggregateVoteResponse) New() protoreflect.Message { + return new(fastReflection_QueryAggregateVoteResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAggregateVoteResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAggregateVoteResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAggregateVoteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AggregateVote != nil { + value := protoreflect.ValueOfMessage(x.AggregateVote.ProtoReflect()) + if !f(fd_QueryAggregateVoteResponse_aggregate_vote, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAggregateVoteResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVoteResponse.aggregate_vote": + return x.AggregateVote != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVoteResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVoteResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVoteResponse.aggregate_vote": + x.AggregateVote = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVoteResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAggregateVoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryAggregateVoteResponse.aggregate_vote": + value := x.AggregateVote + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVoteResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVoteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVoteResponse.aggregate_vote": + x.AggregateVote = value.Message().Interface().(*AggregateExchangeRateVote) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVoteResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVoteResponse.aggregate_vote": + if x.AggregateVote == nil { + x.AggregateVote = new(AggregateExchangeRateVote) + } + return protoreflect.ValueOfMessage(x.AggregateVote.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVoteResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAggregateVoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVoteResponse.aggregate_vote": + m := new(AggregateExchangeRateVote) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVoteResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAggregateVoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryAggregateVoteResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAggregateVoteResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVoteResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAggregateVoteResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAggregateVoteResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAggregateVoteResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.AggregateVote != nil { + l = options.Size(x.AggregateVote) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregateVoteResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.AggregateVote != nil { + encoded, err := options.Marshal(x.AggregateVote) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregateVoteResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregateVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregateVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AggregateVote", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.AggregateVote == nil { + x.AggregateVote = &AggregateExchangeRateVote{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AggregateVote); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAggregateVotes protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryAggregateVotes = File_oracle_v1_query_proto.Messages().ByName("QueryAggregateVotes") +} + +var _ protoreflect.Message = (*fastReflection_QueryAggregateVotes)(nil) + +type fastReflection_QueryAggregateVotes QueryAggregateVotes + +func (x *QueryAggregateVotes) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAggregateVotes)(x) +} + +func (x *QueryAggregateVotes) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAggregateVotes_messageType fastReflection_QueryAggregateVotes_messageType +var _ protoreflect.MessageType = fastReflection_QueryAggregateVotes_messageType{} + +type fastReflection_QueryAggregateVotes_messageType struct{} + +func (x fastReflection_QueryAggregateVotes_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAggregateVotes)(nil) +} +func (x fastReflection_QueryAggregateVotes_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAggregateVotes) +} +func (x fastReflection_QueryAggregateVotes_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregateVotes +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAggregateVotes) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregateVotes +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAggregateVotes) Type() protoreflect.MessageType { + return _fastReflection_QueryAggregateVotes_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAggregateVotes) New() protoreflect.Message { + return new(fastReflection_QueryAggregateVotes) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAggregateVotes) Interface() protoreflect.ProtoMessage { + return (*QueryAggregateVotes)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAggregateVotes) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAggregateVotes) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotes does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVotes) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotes does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAggregateVotes) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotes does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVotes) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotes does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVotes) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotes does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAggregateVotes) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotes")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotes does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAggregateVotes) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryAggregateVotes", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAggregateVotes) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVotes) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAggregateVotes) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAggregateVotes) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAggregateVotes) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregateVotes) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregateVotes) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregateVotes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregateVotes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryAggregateVotesResponse_1_list)(nil) + +type _QueryAggregateVotesResponse_1_list struct { + list *[]*AggregateExchangeRateVote +} + +func (x *_QueryAggregateVotesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAggregateVotesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAggregateVotesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AggregateExchangeRateVote) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAggregateVotesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AggregateExchangeRateVote) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAggregateVotesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(AggregateExchangeRateVote) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAggregateVotesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAggregateVotesResponse_1_list) NewElement() protoreflect.Value { + v := new(AggregateExchangeRateVote) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAggregateVotesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAggregateVotesResponse protoreflect.MessageDescriptor + fd_QueryAggregateVotesResponse_aggregate_votes protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryAggregateVotesResponse = File_oracle_v1_query_proto.Messages().ByName("QueryAggregateVotesResponse") + fd_QueryAggregateVotesResponse_aggregate_votes = md_QueryAggregateVotesResponse.Fields().ByName("aggregate_votes") +} + +var _ protoreflect.Message = (*fastReflection_QueryAggregateVotesResponse)(nil) + +type fastReflection_QueryAggregateVotesResponse QueryAggregateVotesResponse + +func (x *QueryAggregateVotesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAggregateVotesResponse)(x) +} + +func (x *QueryAggregateVotesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAggregateVotesResponse_messageType fastReflection_QueryAggregateVotesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAggregateVotesResponse_messageType{} + +type fastReflection_QueryAggregateVotesResponse_messageType struct{} + +func (x fastReflection_QueryAggregateVotesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAggregateVotesResponse)(nil) +} +func (x fastReflection_QueryAggregateVotesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAggregateVotesResponse) +} +func (x fastReflection_QueryAggregateVotesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregateVotesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAggregateVotesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAggregateVotesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAggregateVotesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAggregateVotesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAggregateVotesResponse) New() protoreflect.Message { + return new(fastReflection_QueryAggregateVotesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAggregateVotesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAggregateVotesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAggregateVotesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.AggregateVotes) != 0 { + value := protoreflect.ValueOfList(&_QueryAggregateVotesResponse_1_list{list: &x.AggregateVotes}) + if !f(fd_QueryAggregateVotesResponse_aggregate_votes, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAggregateVotesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVotesResponse.aggregate_votes": + return len(x.AggregateVotes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVotesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVotesResponse.aggregate_votes": + x.AggregateVotes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAggregateVotesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryAggregateVotesResponse.aggregate_votes": + if len(x.AggregateVotes) == 0 { + return protoreflect.ValueOfList(&_QueryAggregateVotesResponse_1_list{}) + } + listValue := &_QueryAggregateVotesResponse_1_list{list: &x.AggregateVotes} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVotesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVotesResponse.aggregate_votes": + lv := value.List() + clv := lv.(*_QueryAggregateVotesResponse_1_list) + x.AggregateVotes = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVotesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVotesResponse.aggregate_votes": + if x.AggregateVotes == nil { + x.AggregateVotes = []*AggregateExchangeRateVote{} + } + value := &_QueryAggregateVotesResponse_1_list{list: &x.AggregateVotes} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAggregateVotesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryAggregateVotesResponse.aggregate_votes": + list := []*AggregateExchangeRateVote{} + return protoreflect.ValueOfList(&_QueryAggregateVotesResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryAggregateVotesResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryAggregateVotesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAggregateVotesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryAggregateVotesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAggregateVotesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAggregateVotesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAggregateVotesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAggregateVotesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAggregateVotesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.AggregateVotes) > 0 { + for _, e := range x.AggregateVotes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregateVotesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.AggregateVotes) > 0 { + for iNdEx := len(x.AggregateVotes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AggregateVotes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAggregateVotesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregateVotesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAggregateVotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AggregateVotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AggregateVotes = append(x.AggregateVotes, &AggregateExchangeRateVote{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AggregateVotes[len(x.AggregateVotes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryParams protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryParams = File_oracle_v1_query_proto.Messages().ByName("QueryParams") +} + +var _ protoreflect.Message = (*fastReflection_QueryParams)(nil) + +type fastReflection_QueryParams QueryParams + +func (x *QueryParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParams)(x) +} + +func (x *QueryParams) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParams_messageType fastReflection_QueryParams_messageType +var _ protoreflect.MessageType = fastReflection_QueryParams_messageType{} + +type fastReflection_QueryParams_messageType struct{} + +func (x fastReflection_QueryParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParams)(nil) +} +func (x fastReflection_QueryParams_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParams) +} +func (x fastReflection_QueryParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParams) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParams +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryParams) Type() protoreflect.MessageType { + return _fastReflection_QueryParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParams) New() protoreflect.Message { + return new(fastReflection_QueryParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParams) Interface() protoreflect.ProtoMessage { + return (*QueryParams)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParams")) + } + panic(fmt.Errorf("message oracle.v1.QueryParams does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParams")) + } + panic(fmt.Errorf("message oracle.v1.QueryParams does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParams")) + } + panic(fmt.Errorf("message oracle.v1.QueryParams does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParams")) + } + panic(fmt.Errorf("message oracle.v1.QueryParams does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParams")) + } + panic(fmt.Errorf("message oracle.v1.QueryParams does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParams")) + } + panic(fmt.Errorf("message oracle.v1.QueryParams does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryParams", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryParams) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParams) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryParams) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParams) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryParams) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParams) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryParamsResponse = File_oracle_v1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) + +type fastReflection_QueryParamsResponse QueryParamsResponse + +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) +} + +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} + +type fastReflection_QueryParamsResponse_messageType struct{} + +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) +} +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryParamsResponse.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryParamsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryParamsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryMedians protoreflect.MessageDescriptor + fd_QueryMedians_denom protoreflect.FieldDescriptor + fd_QueryMedians_num_stamps protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryMedians = File_oracle_v1_query_proto.Messages().ByName("QueryMedians") + fd_QueryMedians_denom = md_QueryMedians.Fields().ByName("denom") + fd_QueryMedians_num_stamps = md_QueryMedians.Fields().ByName("num_stamps") +} + +var _ protoreflect.Message = (*fastReflection_QueryMedians)(nil) + +type fastReflection_QueryMedians QueryMedians + +func (x *QueryMedians) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryMedians)(x) +} + +func (x *QueryMedians) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryMedians_messageType fastReflection_QueryMedians_messageType +var _ protoreflect.MessageType = fastReflection_QueryMedians_messageType{} + +type fastReflection_QueryMedians_messageType struct{} + +func (x fastReflection_QueryMedians_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryMedians)(nil) +} +func (x fastReflection_QueryMedians_messageType) New() protoreflect.Message { + return new(fastReflection_QueryMedians) +} +func (x fastReflection_QueryMedians_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMedians +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryMedians) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMedians +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryMedians) Type() protoreflect.MessageType { + return _fastReflection_QueryMedians_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryMedians) New() protoreflect.Message { + return new(fastReflection_QueryMedians) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryMedians) Interface() protoreflect.ProtoMessage { + return (*QueryMedians)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryMedians) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_QueryMedians_denom, value) { + return + } + } + if x.NumStamps != uint32(0) { + value := protoreflect.ValueOfUint32(x.NumStamps) + if !f(fd_QueryMedians_num_stamps, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryMedians) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryMedians.denom": + return x.Denom != "" + case "oracle.v1.QueryMedians.num_stamps": + return x.NumStamps != uint32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedians")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedians does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedians) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryMedians.denom": + x.Denom = "" + case "oracle.v1.QueryMedians.num_stamps": + x.NumStamps = uint32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedians")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedians does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryMedians) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryMedians.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "oracle.v1.QueryMedians.num_stamps": + value := x.NumStamps + return protoreflect.ValueOfUint32(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedians")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedians does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedians) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryMedians.denom": + x.Denom = value.Interface().(string) + case "oracle.v1.QueryMedians.num_stamps": + x.NumStamps = uint32(value.Uint()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedians")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedians does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedians) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMedians.denom": + panic(fmt.Errorf("field denom of message oracle.v1.QueryMedians is not mutable")) + case "oracle.v1.QueryMedians.num_stamps": + panic(fmt.Errorf("field num_stamps of message oracle.v1.QueryMedians is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedians")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedians does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryMedians) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMedians.denom": + return protoreflect.ValueOfString("") + case "oracle.v1.QueryMedians.num_stamps": + return protoreflect.ValueOfUint32(uint32(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedians")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedians does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryMedians) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryMedians", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryMedians) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedians) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryMedians) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryMedians) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryMedians) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.NumStamps != 0 { + n += 1 + runtime.Sov(uint64(x.NumStamps)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryMedians) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.NumStamps != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.NumStamps)) + i-- + dAtA[i] = 0x10 + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryMedians) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMedians: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMedians: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NumStamps", wireType) + } + x.NumStamps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.NumStamps |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryMediansResponse_1_list)(nil) + +type _QueryMediansResponse_1_list struct { + list *[]*PriceStamp +} + +func (x *_QueryMediansResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryMediansResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryMediansResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PriceStamp) + (*x.list)[i] = concreteValue +} + +func (x *_QueryMediansResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PriceStamp) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryMediansResponse_1_list) AppendMutable() protoreflect.Value { + v := new(PriceStamp) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryMediansResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryMediansResponse_1_list) NewElement() protoreflect.Value { + v := new(PriceStamp) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryMediansResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryMediansResponse protoreflect.MessageDescriptor + fd_QueryMediansResponse_medians protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryMediansResponse = File_oracle_v1_query_proto.Messages().ByName("QueryMediansResponse") + fd_QueryMediansResponse_medians = md_QueryMediansResponse.Fields().ByName("medians") +} + +var _ protoreflect.Message = (*fastReflection_QueryMediansResponse)(nil) + +type fastReflection_QueryMediansResponse QueryMediansResponse + +func (x *QueryMediansResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryMediansResponse)(x) +} + +func (x *QueryMediansResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryMediansResponse_messageType fastReflection_QueryMediansResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryMediansResponse_messageType{} + +type fastReflection_QueryMediansResponse_messageType struct{} + +func (x fastReflection_QueryMediansResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryMediansResponse)(nil) +} +func (x fastReflection_QueryMediansResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryMediansResponse) +} +func (x fastReflection_QueryMediansResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMediansResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryMediansResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMediansResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryMediansResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryMediansResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryMediansResponse) New() protoreflect.Message { + return new(fastReflection_QueryMediansResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryMediansResponse) Interface() protoreflect.ProtoMessage { + return (*QueryMediansResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryMediansResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Medians) != 0 { + value := protoreflect.ValueOfList(&_QueryMediansResponse_1_list{list: &x.Medians}) + if !f(fd_QueryMediansResponse_medians, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryMediansResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryMediansResponse.medians": + return len(x.Medians) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMediansResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMediansResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMediansResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryMediansResponse.medians": + x.Medians = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMediansResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMediansResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryMediansResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryMediansResponse.medians": + if len(x.Medians) == 0 { + return protoreflect.ValueOfList(&_QueryMediansResponse_1_list{}) + } + listValue := &_QueryMediansResponse_1_list{list: &x.Medians} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMediansResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMediansResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMediansResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryMediansResponse.medians": + lv := value.List() + clv := lv.(*_QueryMediansResponse_1_list) + x.Medians = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMediansResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMediansResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMediansResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMediansResponse.medians": + if x.Medians == nil { + x.Medians = []*PriceStamp{} + } + value := &_QueryMediansResponse_1_list{list: &x.Medians} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMediansResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMediansResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryMediansResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMediansResponse.medians": + list := []*PriceStamp{} + return protoreflect.ValueOfList(&_QueryMediansResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMediansResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMediansResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryMediansResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryMediansResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryMediansResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMediansResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryMediansResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryMediansResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryMediansResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Medians) > 0 { + for _, e := range x.Medians { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryMediansResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Medians) > 0 { + for iNdEx := len(x.Medians) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Medians[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryMediansResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMediansResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMediansResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Medians", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Medians = append(x.Medians, &PriceStamp{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Medians[len(x.Medians)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryMedianDeviations protoreflect.MessageDescriptor + fd_QueryMedianDeviations_denom protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryMedianDeviations = File_oracle_v1_query_proto.Messages().ByName("QueryMedianDeviations") + fd_QueryMedianDeviations_denom = md_QueryMedianDeviations.Fields().ByName("denom") +} + +var _ protoreflect.Message = (*fastReflection_QueryMedianDeviations)(nil) + +type fastReflection_QueryMedianDeviations QueryMedianDeviations + +func (x *QueryMedianDeviations) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryMedianDeviations)(x) +} + +func (x *QueryMedianDeviations) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryMedianDeviations_messageType fastReflection_QueryMedianDeviations_messageType +var _ protoreflect.MessageType = fastReflection_QueryMedianDeviations_messageType{} + +type fastReflection_QueryMedianDeviations_messageType struct{} + +func (x fastReflection_QueryMedianDeviations_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryMedianDeviations)(nil) +} +func (x fastReflection_QueryMedianDeviations_messageType) New() protoreflect.Message { + return new(fastReflection_QueryMedianDeviations) +} +func (x fastReflection_QueryMedianDeviations_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMedianDeviations +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryMedianDeviations) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMedianDeviations +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryMedianDeviations) Type() protoreflect.MessageType { + return _fastReflection_QueryMedianDeviations_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryMedianDeviations) New() protoreflect.Message { + return new(fastReflection_QueryMedianDeviations) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryMedianDeviations) Interface() protoreflect.ProtoMessage { + return (*QueryMedianDeviations)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryMedianDeviations) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_QueryMedianDeviations_denom, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryMedianDeviations) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryMedianDeviations.denom": + return x.Denom != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviations")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviations does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedianDeviations) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryMedianDeviations.denom": + x.Denom = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviations")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviations does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryMedianDeviations) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryMedianDeviations.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviations")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviations does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedianDeviations) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryMedianDeviations.denom": + x.Denom = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviations")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviations does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedianDeviations) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMedianDeviations.denom": + panic(fmt.Errorf("field denom of message oracle.v1.QueryMedianDeviations is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviations")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviations does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryMedianDeviations) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMedianDeviations.denom": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviations")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviations does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryMedianDeviations) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryMedianDeviations", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryMedianDeviations) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedianDeviations) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryMedianDeviations) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryMedianDeviations) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryMedianDeviations) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryMedianDeviations) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryMedianDeviations) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMedianDeviations: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMedianDeviations: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryMedianDeviationsResponse_1_list)(nil) + +type _QueryMedianDeviationsResponse_1_list struct { + list *[]*PriceStamp +} + +func (x *_QueryMedianDeviationsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryMedianDeviationsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryMedianDeviationsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PriceStamp) + (*x.list)[i] = concreteValue +} + +func (x *_QueryMedianDeviationsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PriceStamp) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryMedianDeviationsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(PriceStamp) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryMedianDeviationsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryMedianDeviationsResponse_1_list) NewElement() protoreflect.Value { + v := new(PriceStamp) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryMedianDeviationsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryMedianDeviationsResponse protoreflect.MessageDescriptor + fd_QueryMedianDeviationsResponse_median_deviations protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryMedianDeviationsResponse = File_oracle_v1_query_proto.Messages().ByName("QueryMedianDeviationsResponse") + fd_QueryMedianDeviationsResponse_median_deviations = md_QueryMedianDeviationsResponse.Fields().ByName("median_deviations") +} + +var _ protoreflect.Message = (*fastReflection_QueryMedianDeviationsResponse)(nil) + +type fastReflection_QueryMedianDeviationsResponse QueryMedianDeviationsResponse + +func (x *QueryMedianDeviationsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryMedianDeviationsResponse)(x) +} + +func (x *QueryMedianDeviationsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryMedianDeviationsResponse_messageType fastReflection_QueryMedianDeviationsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryMedianDeviationsResponse_messageType{} + +type fastReflection_QueryMedianDeviationsResponse_messageType struct{} + +func (x fastReflection_QueryMedianDeviationsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryMedianDeviationsResponse)(nil) +} +func (x fastReflection_QueryMedianDeviationsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryMedianDeviationsResponse) +} +func (x fastReflection_QueryMedianDeviationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMedianDeviationsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryMedianDeviationsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryMedianDeviationsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryMedianDeviationsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryMedianDeviationsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryMedianDeviationsResponse) New() protoreflect.Message { + return new(fastReflection_QueryMedianDeviationsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryMedianDeviationsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryMedianDeviationsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryMedianDeviationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.MedianDeviations) != 0 { + value := protoreflect.ValueOfList(&_QueryMedianDeviationsResponse_1_list{list: &x.MedianDeviations}) + if !f(fd_QueryMedianDeviationsResponse_median_deviations, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryMedianDeviationsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryMedianDeviationsResponse.median_deviations": + return len(x.MedianDeviations) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviationsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviationsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedianDeviationsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryMedianDeviationsResponse.median_deviations": + x.MedianDeviations = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviationsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviationsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryMedianDeviationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryMedianDeviationsResponse.median_deviations": + if len(x.MedianDeviations) == 0 { + return protoreflect.ValueOfList(&_QueryMedianDeviationsResponse_1_list{}) + } + listValue := &_QueryMedianDeviationsResponse_1_list{list: &x.MedianDeviations} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviationsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviationsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedianDeviationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryMedianDeviationsResponse.median_deviations": + lv := value.List() + clv := lv.(*_QueryMedianDeviationsResponse_1_list) + x.MedianDeviations = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviationsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviationsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedianDeviationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMedianDeviationsResponse.median_deviations": + if x.MedianDeviations == nil { + x.MedianDeviations = []*PriceStamp{} + } + value := &_QueryMedianDeviationsResponse_1_list{list: &x.MedianDeviations} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviationsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviationsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryMedianDeviationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryMedianDeviationsResponse.median_deviations": + list := []*PriceStamp{} + return protoreflect.ValueOfList(&_QueryMedianDeviationsResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryMedianDeviationsResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryMedianDeviationsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryMedianDeviationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryMedianDeviationsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryMedianDeviationsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryMedianDeviationsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryMedianDeviationsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryMedianDeviationsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryMedianDeviationsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.MedianDeviations) > 0 { + for _, e := range x.MedianDeviations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryMedianDeviationsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.MedianDeviations) > 0 { + for iNdEx := len(x.MedianDeviations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.MedianDeviations[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryMedianDeviationsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMedianDeviationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMedianDeviationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MedianDeviations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.MedianDeviations = append(x.MedianDeviations, &PriceStamp{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MedianDeviations[len(x.MedianDeviations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryValidatorRewardSet protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryValidatorRewardSet = File_oracle_v1_query_proto.Messages().ByName("QueryValidatorRewardSet") +} + +var _ protoreflect.Message = (*fastReflection_QueryValidatorRewardSet)(nil) + +type fastReflection_QueryValidatorRewardSet QueryValidatorRewardSet + +func (x *QueryValidatorRewardSet) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryValidatorRewardSet)(x) +} + +func (x *QueryValidatorRewardSet) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryValidatorRewardSet_messageType fastReflection_QueryValidatorRewardSet_messageType +var _ protoreflect.MessageType = fastReflection_QueryValidatorRewardSet_messageType{} + +type fastReflection_QueryValidatorRewardSet_messageType struct{} + +func (x fastReflection_QueryValidatorRewardSet_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryValidatorRewardSet)(nil) +} +func (x fastReflection_QueryValidatorRewardSet_messageType) New() protoreflect.Message { + return new(fastReflection_QueryValidatorRewardSet) +} +func (x fastReflection_QueryValidatorRewardSet_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorRewardSet +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryValidatorRewardSet) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorRewardSet +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryValidatorRewardSet) Type() protoreflect.MessageType { + return _fastReflection_QueryValidatorRewardSet_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryValidatorRewardSet) New() protoreflect.Message { + return new(fastReflection_QueryValidatorRewardSet) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryValidatorRewardSet) Interface() protoreflect.ProtoMessage { + return (*QueryValidatorRewardSet)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryValidatorRewardSet) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryValidatorRewardSet) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSet does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorRewardSet) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSet does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryValidatorRewardSet) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSet does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorRewardSet) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSet does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorRewardSet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSet does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryValidatorRewardSet) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSet")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSet does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryValidatorRewardSet) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryValidatorRewardSet", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryValidatorRewardSet) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorRewardSet) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryValidatorRewardSet) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryValidatorRewardSet) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryValidatorRewardSet) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorRewardSet) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorRewardSet) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorRewardSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorRewardSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryValidatorRewardSetResponse protoreflect.MessageDescriptor + fd_QueryValidatorRewardSetResponse_validators protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryValidatorRewardSetResponse = File_oracle_v1_query_proto.Messages().ByName("QueryValidatorRewardSetResponse") + fd_QueryValidatorRewardSetResponse_validators = md_QueryValidatorRewardSetResponse.Fields().ByName("validators") +} + +var _ protoreflect.Message = (*fastReflection_QueryValidatorRewardSetResponse)(nil) + +type fastReflection_QueryValidatorRewardSetResponse QueryValidatorRewardSetResponse + +func (x *QueryValidatorRewardSetResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryValidatorRewardSetResponse)(x) +} + +func (x *QueryValidatorRewardSetResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryValidatorRewardSetResponse_messageType fastReflection_QueryValidatorRewardSetResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryValidatorRewardSetResponse_messageType{} + +type fastReflection_QueryValidatorRewardSetResponse_messageType struct{} + +func (x fastReflection_QueryValidatorRewardSetResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryValidatorRewardSetResponse)(nil) +} +func (x fastReflection_QueryValidatorRewardSetResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryValidatorRewardSetResponse) +} +func (x fastReflection_QueryValidatorRewardSetResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorRewardSetResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryValidatorRewardSetResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorRewardSetResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryValidatorRewardSetResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryValidatorRewardSetResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryValidatorRewardSetResponse) New() protoreflect.Message { + return new(fastReflection_QueryValidatorRewardSetResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryValidatorRewardSetResponse) Interface() protoreflect.ProtoMessage { + return (*QueryValidatorRewardSetResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryValidatorRewardSetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Validators != nil { + value := protoreflect.ValueOfMessage(x.Validators.ProtoReflect()) + if !f(fd_QueryValidatorRewardSetResponse_validators, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryValidatorRewardSetResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryValidatorRewardSetResponse.validators": + return x.Validators != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSetResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSetResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorRewardSetResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryValidatorRewardSetResponse.validators": + x.Validators = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSetResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSetResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryValidatorRewardSetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryValidatorRewardSetResponse.validators": + value := x.Validators + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSetResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSetResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorRewardSetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryValidatorRewardSetResponse.validators": + x.Validators = value.Message().Interface().(*ValidatorRewardSet) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSetResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSetResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorRewardSetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryValidatorRewardSetResponse.validators": + if x.Validators == nil { + x.Validators = new(ValidatorRewardSet) + } + return protoreflect.ValueOfMessage(x.Validators.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSetResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSetResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryValidatorRewardSetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryValidatorRewardSetResponse.validators": + m := new(ValidatorRewardSet) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryValidatorRewardSetResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryValidatorRewardSetResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryValidatorRewardSetResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryValidatorRewardSetResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryValidatorRewardSetResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorRewardSetResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryValidatorRewardSetResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryValidatorRewardSetResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryValidatorRewardSetResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Validators != nil { + l = options.Size(x.Validators) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorRewardSetResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Validators != nil { + encoded, err := options.Marshal(x.Validators) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorRewardSetResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorRewardSetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorRewardSetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Validators == nil { + x.Validators = &ValidatorRewardSet{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryEMARequest protoreflect.MessageDescriptor + fd_QueryEMARequest_denom protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryEMARequest = File_oracle_v1_query_proto.Messages().ByName("QueryEMARequest") + fd_QueryEMARequest_denom = md_QueryEMARequest.Fields().ByName("denom") +} + +var _ protoreflect.Message = (*fastReflection_QueryEMARequest)(nil) + +type fastReflection_QueryEMARequest QueryEMARequest + +func (x *QueryEMARequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryEMARequest)(x) +} + +func (x *QueryEMARequest) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryEMARequest_messageType fastReflection_QueryEMARequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryEMARequest_messageType{} + +type fastReflection_QueryEMARequest_messageType struct{} + +func (x fastReflection_QueryEMARequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryEMARequest)(nil) +} +func (x fastReflection_QueryEMARequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryEMARequest) +} +func (x fastReflection_QueryEMARequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryEMARequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryEMARequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryEMARequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryEMARequest) Type() protoreflect.MessageType { + return _fastReflection_QueryEMARequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryEMARequest) New() protoreflect.Message { + return new(fastReflection_QueryEMARequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryEMARequest) Interface() protoreflect.ProtoMessage { + return (*QueryEMARequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryEMARequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_QueryEMARequest_denom, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryEMARequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryEMARequest.denom": + return x.Denom != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMARequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryEMARequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryEMARequest.denom": + x.Denom = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMARequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryEMARequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryEMARequest.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMARequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryEMARequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryEMARequest.denom": + x.Denom = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMARequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryEMARequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryEMARequest.denom": + panic(fmt.Errorf("field denom of message oracle.v1.QueryEMARequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMARequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryEMARequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryEMARequest.denom": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMARequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryEMARequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryEMARequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryEMARequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryEMARequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryEMARequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryEMARequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryEMARequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryEMARequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryEMARequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEMARequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEMARequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryEMAResponse protoreflect.MessageDescriptor + fd_QueryEMAResponse_price protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryEMAResponse = File_oracle_v1_query_proto.Messages().ByName("QueryEMAResponse") + fd_QueryEMAResponse_price = md_QueryEMAResponse.Fields().ByName("price") +} + +var _ protoreflect.Message = (*fastReflection_QueryEMAResponse)(nil) + +type fastReflection_QueryEMAResponse QueryEMAResponse + +func (x *QueryEMAResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryEMAResponse)(x) +} + +func (x *QueryEMAResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryEMAResponse_messageType fastReflection_QueryEMAResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryEMAResponse_messageType{} + +type fastReflection_QueryEMAResponse_messageType struct{} + +func (x fastReflection_QueryEMAResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryEMAResponse)(nil) +} +func (x fastReflection_QueryEMAResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryEMAResponse) +} +func (x fastReflection_QueryEMAResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryEMAResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryEMAResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryEMAResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryEMAResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryEMAResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryEMAResponse) New() protoreflect.Message { + return new(fastReflection_QueryEMAResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryEMAResponse) Interface() protoreflect.ProtoMessage { + return (*QueryEMAResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryEMAResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Price != "" { + value := protoreflect.ValueOfString(x.Price) + if !f(fd_QueryEMAResponse_price, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryEMAResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryEMAResponse.price": + return x.Price != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMAResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryEMAResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryEMAResponse.price": + x.Price = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMAResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryEMAResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryEMAResponse.price": + value := x.Price + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMAResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryEMAResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryEMAResponse.price": + x.Price = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMAResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryEMAResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryEMAResponse.price": + panic(fmt.Errorf("field price of message oracle.v1.QueryEMAResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMAResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryEMAResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryEMAResponse.price": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryEMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryEMAResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryEMAResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryEMAResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryEMAResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryEMAResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryEMAResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryEMAResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryEMAResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Price) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryEMAResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Price) > 0 { + i -= len(x.Price) + copy(dAtA[i:], x.Price) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Price))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryEMAResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEMAResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEMAResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Price = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryWMARequest_3_list)(nil) + +type _QueryWMARequest_3_list struct { + list *[]int64 +} + +func (x *_QueryWMARequest_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryWMARequest_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfInt64((*x.list)[i]) +} + +func (x *_QueryWMARequest_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Int() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryWMARequest_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Int() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryWMARequest_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryWMARequest at list field CustomWeights as it is not of Message kind")) +} + +func (x *_QueryWMARequest_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryWMARequest_3_list) NewElement() protoreflect.Value { + v := int64(0) + return protoreflect.ValueOfInt64(v) +} + +func (x *_QueryWMARequest_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryWMARequest protoreflect.MessageDescriptor + fd_QueryWMARequest_denom protoreflect.FieldDescriptor + fd_QueryWMARequest_strategy protoreflect.FieldDescriptor + fd_QueryWMARequest_custom_weights protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryWMARequest = File_oracle_v1_query_proto.Messages().ByName("QueryWMARequest") + fd_QueryWMARequest_denom = md_QueryWMARequest.Fields().ByName("denom") + fd_QueryWMARequest_strategy = md_QueryWMARequest.Fields().ByName("strategy") + fd_QueryWMARequest_custom_weights = md_QueryWMARequest.Fields().ByName("custom_weights") +} + +var _ protoreflect.Message = (*fastReflection_QueryWMARequest)(nil) + +type fastReflection_QueryWMARequest QueryWMARequest + +func (x *QueryWMARequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryWMARequest)(x) +} + +func (x *QueryWMARequest) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryWMARequest_messageType fastReflection_QueryWMARequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryWMARequest_messageType{} + +type fastReflection_QueryWMARequest_messageType struct{} + +func (x fastReflection_QueryWMARequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryWMARequest)(nil) +} +func (x fastReflection_QueryWMARequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryWMARequest) +} +func (x fastReflection_QueryWMARequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryWMARequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryWMARequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryWMARequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryWMARequest) Type() protoreflect.MessageType { + return _fastReflection_QueryWMARequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryWMARequest) New() protoreflect.Message { + return new(fastReflection_QueryWMARequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryWMARequest) Interface() protoreflect.ProtoMessage { + return (*QueryWMARequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryWMARequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_QueryWMARequest_denom, value) { + return + } + } + if x.Strategy != "" { + value := protoreflect.ValueOfString(x.Strategy) + if !f(fd_QueryWMARequest_strategy, value) { + return + } + } + if len(x.CustomWeights) != 0 { + value := protoreflect.ValueOfList(&_QueryWMARequest_3_list{list: &x.CustomWeights}) + if !f(fd_QueryWMARequest_custom_weights, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryWMARequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryWMARequest.denom": + return x.Denom != "" + case "oracle.v1.QueryWMARequest.strategy": + return x.Strategy != "" + case "oracle.v1.QueryWMARequest.custom_weights": + return len(x.CustomWeights) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMARequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryWMARequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryWMARequest.denom": + x.Denom = "" + case "oracle.v1.QueryWMARequest.strategy": + x.Strategy = "" + case "oracle.v1.QueryWMARequest.custom_weights": + x.CustomWeights = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMARequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryWMARequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryWMARequest.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "oracle.v1.QueryWMARequest.strategy": + value := x.Strategy + return protoreflect.ValueOfString(value) + case "oracle.v1.QueryWMARequest.custom_weights": + if len(x.CustomWeights) == 0 { + return protoreflect.ValueOfList(&_QueryWMARequest_3_list{}) + } + listValue := &_QueryWMARequest_3_list{list: &x.CustomWeights} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMARequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryWMARequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryWMARequest.denom": + x.Denom = value.Interface().(string) + case "oracle.v1.QueryWMARequest.strategy": + x.Strategy = value.Interface().(string) + case "oracle.v1.QueryWMARequest.custom_weights": + lv := value.List() + clv := lv.(*_QueryWMARequest_3_list) + x.CustomWeights = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMARequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryWMARequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryWMARequest.custom_weights": + if x.CustomWeights == nil { + x.CustomWeights = []int64{} + } + value := &_QueryWMARequest_3_list{list: &x.CustomWeights} + return protoreflect.ValueOfList(value) + case "oracle.v1.QueryWMARequest.denom": + panic(fmt.Errorf("field denom of message oracle.v1.QueryWMARequest is not mutable")) + case "oracle.v1.QueryWMARequest.strategy": + panic(fmt.Errorf("field strategy of message oracle.v1.QueryWMARequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMARequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryWMARequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryWMARequest.denom": + return protoreflect.ValueOfString("") + case "oracle.v1.QueryWMARequest.strategy": + return protoreflect.ValueOfString("") + case "oracle.v1.QueryWMARequest.custom_weights": + list := []int64{} + return protoreflect.ValueOfList(&_QueryWMARequest_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMARequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryWMARequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryWMARequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryWMARequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryWMARequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryWMARequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryWMARequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryWMARequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Strategy) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.CustomWeights) > 0 { + l = 0 + for _, e := range x.CustomWeights { + l += runtime.Sov(uint64(e)) + } + n += 1 + runtime.Sov(uint64(l)) + l + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryWMARequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.CustomWeights) > 0 { + var pksize2 int + for _, num := range x.CustomWeights { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range x.CustomWeights { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x1a + } + if len(x.Strategy) > 0 { + i -= len(x.Strategy) + copy(dAtA[i:], x.Strategy) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Strategy))) + i-- + dAtA[i] = 0x12 + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryWMARequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWMARequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWMARequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Strategy = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.CustomWeights = append(x.CustomWeights, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(x.CustomWeights) == 0 { + x.CustomWeights = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.CustomWeights = append(x.CustomWeights, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CustomWeights", wireType) + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryWMAResponse protoreflect.MessageDescriptor + fd_QueryWMAResponse_price protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QueryWMAResponse = File_oracle_v1_query_proto.Messages().ByName("QueryWMAResponse") + fd_QueryWMAResponse_price = md_QueryWMAResponse.Fields().ByName("price") +} + +var _ protoreflect.Message = (*fastReflection_QueryWMAResponse)(nil) + +type fastReflection_QueryWMAResponse QueryWMAResponse + +func (x *QueryWMAResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryWMAResponse)(x) +} + +func (x *QueryWMAResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryWMAResponse_messageType fastReflection_QueryWMAResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryWMAResponse_messageType{} + +type fastReflection_QueryWMAResponse_messageType struct{} + +func (x fastReflection_QueryWMAResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryWMAResponse)(nil) +} +func (x fastReflection_QueryWMAResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryWMAResponse) +} +func (x fastReflection_QueryWMAResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryWMAResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryWMAResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryWMAResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryWMAResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryWMAResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryWMAResponse) New() protoreflect.Message { + return new(fastReflection_QueryWMAResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryWMAResponse) Interface() protoreflect.ProtoMessage { + return (*QueryWMAResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryWMAResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Price != "" { + value := protoreflect.ValueOfString(x.Price) + if !f(fd_QueryWMAResponse_price, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryWMAResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QueryWMAResponse.price": + return x.Price != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMAResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryWMAResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QueryWMAResponse.price": + x.Price = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMAResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryWMAResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QueryWMAResponse.price": + value := x.Price + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMAResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryWMAResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QueryWMAResponse.price": + x.Price = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMAResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryWMAResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryWMAResponse.price": + panic(fmt.Errorf("field price of message oracle.v1.QueryWMAResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMAResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryWMAResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QueryWMAResponse.price": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryWMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QueryWMAResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryWMAResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryWMAResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryWMAResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryWMAResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryWMAResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryWMAResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryWMAResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Price) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryWMAResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Price) > 0 { + i -= len(x.Price) + copy(dAtA[i:], x.Price) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Price))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryWMAResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWMAResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWMAResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Price = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QuerySMARequest protoreflect.MessageDescriptor + fd_QuerySMARequest_denom protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QuerySMARequest = File_oracle_v1_query_proto.Messages().ByName("QuerySMARequest") + fd_QuerySMARequest_denom = md_QuerySMARequest.Fields().ByName("denom") +} + +var _ protoreflect.Message = (*fastReflection_QuerySMARequest)(nil) + +type fastReflection_QuerySMARequest QuerySMARequest + +func (x *QuerySMARequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySMARequest)(x) +} + +func (x *QuerySMARequest) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QuerySMARequest_messageType fastReflection_QuerySMARequest_messageType +var _ protoreflect.MessageType = fastReflection_QuerySMARequest_messageType{} + +type fastReflection_QuerySMARequest_messageType struct{} + +func (x fastReflection_QuerySMARequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySMARequest)(nil) +} +func (x fastReflection_QuerySMARequest_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySMARequest) +} +func (x fastReflection_QuerySMARequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySMARequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySMARequest) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySMARequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QuerySMARequest) Type() protoreflect.MessageType { + return _fastReflection_QuerySMARequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySMARequest) New() protoreflect.Message { + return new(fastReflection_QuerySMARequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySMARequest) Interface() protoreflect.ProtoMessage { + return (*QuerySMARequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QuerySMARequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_QuerySMARequest_denom, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QuerySMARequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QuerySMARequest.denom": + return x.Denom != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMARequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySMARequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QuerySMARequest.denom": + x.Denom = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMARequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QuerySMARequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QuerySMARequest.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMARequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySMARequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QuerySMARequest.denom": + x.Denom = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMARequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySMARequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QuerySMARequest.denom": + panic(fmt.Errorf("field denom of message oracle.v1.QuerySMARequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMARequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QuerySMARequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QuerySMARequest.denom": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMARequest")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMARequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QuerySMARequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QuerySMARequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QuerySMARequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySMARequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QuerySMARequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QuerySMARequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySMARequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QuerySMARequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QuerySMARequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySMARequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySMARequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QuerySMAResponse protoreflect.MessageDescriptor + fd_QuerySMAResponse_price protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_query_proto_init() + md_QuerySMAResponse = File_oracle_v1_query_proto.Messages().ByName("QuerySMAResponse") + fd_QuerySMAResponse_price = md_QuerySMAResponse.Fields().ByName("price") +} + +var _ protoreflect.Message = (*fastReflection_QuerySMAResponse)(nil) + +type fastReflection_QuerySMAResponse QuerySMAResponse + +func (x *QuerySMAResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySMAResponse)(x) +} + +func (x *QuerySMAResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_query_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QuerySMAResponse_messageType fastReflection_QuerySMAResponse_messageType +var _ protoreflect.MessageType = fastReflection_QuerySMAResponse_messageType{} + +type fastReflection_QuerySMAResponse_messageType struct{} + +func (x fastReflection_QuerySMAResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySMAResponse)(nil) +} +func (x fastReflection_QuerySMAResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySMAResponse) +} +func (x fastReflection_QuerySMAResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySMAResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySMAResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySMAResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QuerySMAResponse) Type() protoreflect.MessageType { + return _fastReflection_QuerySMAResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySMAResponse) New() protoreflect.Message { + return new(fastReflection_QuerySMAResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySMAResponse) Interface() protoreflect.ProtoMessage { + return (*QuerySMAResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QuerySMAResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Price != "" { + value := protoreflect.ValueOfString(x.Price) + if !f(fd_QuerySMAResponse_price, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QuerySMAResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.QuerySMAResponse.price": + return x.Price != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMAResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySMAResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.QuerySMAResponse.price": + x.Price = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMAResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QuerySMAResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.QuerySMAResponse.price": + value := x.Price + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMAResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySMAResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.QuerySMAResponse.price": + x.Price = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMAResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySMAResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QuerySMAResponse.price": + panic(fmt.Errorf("field price of message oracle.v1.QuerySMAResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMAResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QuerySMAResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.QuerySMAResponse.price": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QuerySMAResponse")) + } + panic(fmt.Errorf("message oracle.v1.QuerySMAResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QuerySMAResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QuerySMAResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QuerySMAResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySMAResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QuerySMAResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QuerySMAResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySMAResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Price) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QuerySMAResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Price) > 0 { + i -= len(x.Price) + copy(dAtA[i:], x.Price) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Price))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QuerySMAResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySMAResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySMAResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Price = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: oracle/v1/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryExchangeRates is the request type for the Query/ExchangeRate RPC +// method. +type QueryExchangeRates struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // denom defines the denomination to query for. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (x *QueryExchangeRates) Reset() { + *x = QueryExchangeRates{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryExchangeRates) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryExchangeRates) ProtoMessage() {} + +// Deprecated: Use QueryExchangeRates.ProtoReflect.Descriptor instead. +func (*QueryExchangeRates) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{0} +} + +func (x *QueryExchangeRates) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +// QueryExchangeRatesResponse is response type for the +// Query/ExchangeRates RPC method. +type QueryExchangeRatesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // exchange_rates defines a list of the exchange rate for all whitelisted + // denoms. + ExchangeRates []*v1beta1.DecCoin `protobuf:"bytes,1,rep,name=exchange_rates,json=exchangeRates,proto3" json:"exchange_rates,omitempty"` +} + +func (x *QueryExchangeRatesResponse) Reset() { + *x = QueryExchangeRatesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryExchangeRatesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryExchangeRatesResponse) ProtoMessage() {} + +// Deprecated: Use QueryExchangeRatesResponse.ProtoReflect.Descriptor instead. +func (*QueryExchangeRatesResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryExchangeRatesResponse) GetExchangeRates() []*v1beta1.DecCoin { + if x != nil { + return x.ExchangeRates + } + return nil +} + +// QueryActiveExchangeRates is the request type for the +// Query/ActiveExchangeRates RPC method. +type QueryActiveExchangeRates struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryActiveExchangeRates) Reset() { + *x = QueryActiveExchangeRates{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryActiveExchangeRates) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryActiveExchangeRates) ProtoMessage() {} + +// Deprecated: Use QueryActiveExchangeRates.ProtoReflect.Descriptor instead. +func (*QueryActiveExchangeRates) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{2} +} + +// QueryActiveExchangeRatesResponse is response type for the +// Query/ActiveExchangeRates RPC method. +type QueryActiveExchangeRatesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // activeRates defines a list of the denomination which oracle prices aggreed + // upon. + ActiveRates []string `protobuf:"bytes,1,rep,name=active_rates,json=activeRates,proto3" json:"active_rates,omitempty"` +} + +func (x *QueryActiveExchangeRatesResponse) Reset() { + *x = QueryActiveExchangeRatesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryActiveExchangeRatesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryActiveExchangeRatesResponse) ProtoMessage() {} + +// Deprecated: Use QueryActiveExchangeRatesResponse.ProtoReflect.Descriptor instead. +func (*QueryActiveExchangeRatesResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryActiveExchangeRatesResponse) GetActiveRates() []string { + if x != nil { + return x.ActiveRates + } + return nil +} + +// QueryFeederDelegation is the request type for the +// Query/FeederDelegation RPC method. +type QueryFeederDelegation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator defines the validator address to query for. + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` +} + +func (x *QueryFeederDelegation) Reset() { + *x = QueryFeederDelegation{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryFeederDelegation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryFeederDelegation) ProtoMessage() {} + +// Deprecated: Use QueryFeederDelegation.ProtoReflect.Descriptor instead. +func (*QueryFeederDelegation) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryFeederDelegation) GetValidatorAddr() string { + if x != nil { + return x.ValidatorAddr + } + return "" +} + +// QueryFeederDelegationResponse is response type for the +// Query/FeederDelegation RPC method. +type QueryFeederDelegationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // feeder_addr defines the feeder delegation of a validator + FeederAddr string `protobuf:"bytes,1,opt,name=feeder_addr,json=feederAddr,proto3" json:"feeder_addr,omitempty"` +} + +func (x *QueryFeederDelegationResponse) Reset() { + *x = QueryFeederDelegationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryFeederDelegationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryFeederDelegationResponse) ProtoMessage() {} + +// Deprecated: Use QueryFeederDelegationResponse.ProtoReflect.Descriptor instead. +func (*QueryFeederDelegationResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryFeederDelegationResponse) GetFeederAddr() string { + if x != nil { + return x.FeederAddr + } + return "" +} + +// QueryMissCounter is the request type for the Query/MissCounter RPC +// method. +type QueryMissCounter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator defines the validator address to query for. + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` +} + +func (x *QueryMissCounter) Reset() { + *x = QueryMissCounter{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryMissCounter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryMissCounter) ProtoMessage() {} + +// Deprecated: Use QueryMissCounter.ProtoReflect.Descriptor instead. +func (*QueryMissCounter) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryMissCounter) GetValidatorAddr() string { + if x != nil { + return x.ValidatorAddr + } + return "" +} + +// QueryMissCounterResponse is response type for the +// Query/MissCounter RPC method. +type QueryMissCounterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // miss_counter defines the oracle miss counter of a validator + MissCounter uint64 `protobuf:"varint,1,opt,name=miss_counter,json=missCounter,proto3" json:"miss_counter,omitempty"` +} + +func (x *QueryMissCounterResponse) Reset() { + *x = QueryMissCounterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryMissCounterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryMissCounterResponse) ProtoMessage() {} + +// Deprecated: Use QueryMissCounterResponse.ProtoReflect.Descriptor instead. +func (*QueryMissCounterResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryMissCounterResponse) GetMissCounter() uint64 { + if x != nil { + return x.MissCounter + } + return 0 +} + +// QuerySlashWindow is the request type for the +// Query/SlashWindow RPC method. +type QuerySlashWindow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QuerySlashWindow) Reset() { + *x = QuerySlashWindow{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySlashWindow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySlashWindow) ProtoMessage() {} + +// Deprecated: Use QuerySlashWindow.ProtoReflect.Descriptor instead. +func (*QuerySlashWindow) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{8} +} + +// QuerySlashWindowResponse is response type for the +// Query/SlashWindow RPC method. +type QuerySlashWindowResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // window_progress defines the number of voting periods + // since the last slashing event would have taken place. + WindowProgress uint64 `protobuf:"varint,1,opt,name=window_progress,json=windowProgress,proto3" json:"window_progress,omitempty"` +} + +func (x *QuerySlashWindowResponse) Reset() { + *x = QuerySlashWindowResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySlashWindowResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySlashWindowResponse) ProtoMessage() {} + +// Deprecated: Use QuerySlashWindowResponse.ProtoReflect.Descriptor instead. +func (*QuerySlashWindowResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QuerySlashWindowResponse) GetWindowProgress() uint64 { + if x != nil { + return x.WindowProgress + } + return 0 +} + +// QueryAggregatePrevote is the request type for the +// Query/AggregatePrevote RPC method. +type QueryAggregatePrevote struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator defines the validator address to query for. + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` +} + +func (x *QueryAggregatePrevote) Reset() { + *x = QueryAggregatePrevote{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAggregatePrevote) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAggregatePrevote) ProtoMessage() {} + +// Deprecated: Use QueryAggregatePrevote.ProtoReflect.Descriptor instead. +func (*QueryAggregatePrevote) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{10} +} + +func (x *QueryAggregatePrevote) GetValidatorAddr() string { + if x != nil { + return x.ValidatorAddr + } + return "" +} + +// QueryAggregatePrevoteResponse is response type for the +// Query/AggregatePrevote RPC method. +type QueryAggregatePrevoteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // aggregate_prevote defines oracle aggregate prevote submitted by a validator + // in the current vote period + AggregatePrevote *AggregateExchangeRatePrevote `protobuf:"bytes,1,opt,name=aggregate_prevote,json=aggregatePrevote,proto3" json:"aggregate_prevote,omitempty"` +} + +func (x *QueryAggregatePrevoteResponse) Reset() { + *x = QueryAggregatePrevoteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAggregatePrevoteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAggregatePrevoteResponse) ProtoMessage() {} + +// Deprecated: Use QueryAggregatePrevoteResponse.ProtoReflect.Descriptor instead. +func (*QueryAggregatePrevoteResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryAggregatePrevoteResponse) GetAggregatePrevote() *AggregateExchangeRatePrevote { + if x != nil { + return x.AggregatePrevote + } + return nil +} + +// QueryAggregatePrevotes is the request type for the +// Query/AggregatePrevotes RPC method. +type QueryAggregatePrevotes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryAggregatePrevotes) Reset() { + *x = QueryAggregatePrevotes{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAggregatePrevotes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAggregatePrevotes) ProtoMessage() {} + +// Deprecated: Use QueryAggregatePrevotes.ProtoReflect.Descriptor instead. +func (*QueryAggregatePrevotes) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{12} +} + +// QueryAggregatePrevotesResponse is response type for the +// Query/AggregatePrevotes RPC method. +type QueryAggregatePrevotesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // aggregate_prevotes defines all oracle aggregate prevotes submitted in the + // current vote period + AggregatePrevotes []*AggregateExchangeRatePrevote `protobuf:"bytes,1,rep,name=aggregate_prevotes,json=aggregatePrevotes,proto3" json:"aggregate_prevotes,omitempty"` +} + +func (x *QueryAggregatePrevotesResponse) Reset() { + *x = QueryAggregatePrevotesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAggregatePrevotesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAggregatePrevotesResponse) ProtoMessage() {} + +// Deprecated: Use QueryAggregatePrevotesResponse.ProtoReflect.Descriptor instead. +func (*QueryAggregatePrevotesResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{13} +} + +func (x *QueryAggregatePrevotesResponse) GetAggregatePrevotes() []*AggregateExchangeRatePrevote { + if x != nil { + return x.AggregatePrevotes + } + return nil +} + +// QueryAggregateVote is the request type for the Query/AggregateVote RPC +// method. +type QueryAggregateVote struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator defines the validator address to query for. + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` +} + +func (x *QueryAggregateVote) Reset() { + *x = QueryAggregateVote{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAggregateVote) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAggregateVote) ProtoMessage() {} + +// Deprecated: Use QueryAggregateVote.ProtoReflect.Descriptor instead. +func (*QueryAggregateVote) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{14} +} + +func (x *QueryAggregateVote) GetValidatorAddr() string { + if x != nil { + return x.ValidatorAddr + } + return "" +} + +// QueryAggregateVoteResponse is response type for the +// Query/AggregateVote RPC method. +type QueryAggregateVoteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // aggregate_vote defines oracle aggregate vote submitted by a validator in + // the current vote period + AggregateVote *AggregateExchangeRateVote `protobuf:"bytes,1,opt,name=aggregate_vote,json=aggregateVote,proto3" json:"aggregate_vote,omitempty"` +} + +func (x *QueryAggregateVoteResponse) Reset() { + *x = QueryAggregateVoteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAggregateVoteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAggregateVoteResponse) ProtoMessage() {} + +// Deprecated: Use QueryAggregateVoteResponse.ProtoReflect.Descriptor instead. +func (*QueryAggregateVoteResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{15} +} + +func (x *QueryAggregateVoteResponse) GetAggregateVote() *AggregateExchangeRateVote { + if x != nil { + return x.AggregateVote + } + return nil +} + +// QueryAggregateVotes is the request type for the Query/AggregateVotes +// RPC method. +type QueryAggregateVotes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryAggregateVotes) Reset() { + *x = QueryAggregateVotes{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAggregateVotes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAggregateVotes) ProtoMessage() {} + +// Deprecated: Use QueryAggregateVotes.ProtoReflect.Descriptor instead. +func (*QueryAggregateVotes) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{16} +} + +// QueryAggregateVotesResponse is response type for the +// Query/AggregateVotes RPC method. +type QueryAggregateVotesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // aggregate_votes defines all oracle aggregate votes submitted in the current + // vote period + AggregateVotes []*AggregateExchangeRateVote `protobuf:"bytes,1,rep,name=aggregate_votes,json=aggregateVotes,proto3" json:"aggregate_votes,omitempty"` +} + +func (x *QueryAggregateVotesResponse) Reset() { + *x = QueryAggregateVotesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAggregateVotesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAggregateVotesResponse) ProtoMessage() {} + +// Deprecated: Use QueryAggregateVotesResponse.ProtoReflect.Descriptor instead. +func (*QueryAggregateVotesResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{17} +} + +func (x *QueryAggregateVotesResponse) GetAggregateVotes() []*AggregateExchangeRateVote { + if x != nil { + return x.AggregateVotes + } + return nil +} + +// QueryParams is the request type for the Query/Params RPC method. +type QueryParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryParams) Reset() { + *x = QueryParams{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParams) ProtoMessage() {} + +// Deprecated: Use QueryParams.ProtoReflect.Descriptor instead. +func (*QueryParams) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{18} +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // params defines the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsResponse) ProtoMessage() {} + +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{19} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// QueryMedians is the request type for the Query/Medians RPC Response. +type QueryMedians struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // denom defines the denomination to query for. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // numStamps defines the number of median stamps to query for. numStamps + // must be greater than 0. + NumStamps uint32 `protobuf:"varint,2,opt,name=num_stamps,json=numStamps,proto3" json:"num_stamps,omitempty"` +} + +func (x *QueryMedians) Reset() { + *x = QueryMedians{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryMedians) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryMedians) ProtoMessage() {} + +// Deprecated: Use QueryMedians.ProtoReflect.Descriptor instead. +func (*QueryMedians) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{20} +} + +func (x *QueryMedians) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *QueryMedians) GetNumStamps() uint32 { + if x != nil { + return x.NumStamps + } + return 0 +} + +// QueryMediansResponse is response type for the +// Query/Medians RPC method. +type QueryMediansResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // medians defines a list of the medians for all stamped denoms. + Medians []*PriceStamp `protobuf:"bytes,1,rep,name=medians,proto3" json:"medians,omitempty"` +} + +func (x *QueryMediansResponse) Reset() { + *x = QueryMediansResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryMediansResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryMediansResponse) ProtoMessage() {} + +// Deprecated: Use QueryMediansResponse.ProtoReflect.Descriptor instead. +func (*QueryMediansResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{21} +} + +func (x *QueryMediansResponse) GetMedians() []*PriceStamp { + if x != nil { + return x.Medians + } + return nil +} + +// QueryMedianDeviations is the request type for the Query/MedianDeviations RPC +// Response. +type QueryMedianDeviations struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // denom defines the denomination to query for. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (x *QueryMedianDeviations) Reset() { + *x = QueryMedianDeviations{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryMedianDeviations) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryMedianDeviations) ProtoMessage() {} + +// Deprecated: Use QueryMedianDeviations.ProtoReflect.Descriptor instead. +func (*QueryMedianDeviations) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{22} +} + +func (x *QueryMedianDeviations) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +// QueryMedianDeviationsResponse is response type for the +// Query/MedianDeviations RPC method. +type QueryMedianDeviationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // medians defines a list of the median deviations for all stamped denoms. + MedianDeviations []*PriceStamp `protobuf:"bytes,1,rep,name=median_deviations,json=medianDeviations,proto3" json:"median_deviations,omitempty"` +} + +func (x *QueryMedianDeviationsResponse) Reset() { + *x = QueryMedianDeviationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryMedianDeviationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryMedianDeviationsResponse) ProtoMessage() {} + +// Deprecated: Use QueryMedianDeviationsResponse.ProtoReflect.Descriptor instead. +func (*QueryMedianDeviationsResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{23} +} + +func (x *QueryMedianDeviationsResponse) GetMedianDeviations() []*PriceStamp { + if x != nil { + return x.MedianDeviations + } + return nil +} + +// QueryValidatorRewardSet is the request type for the Query/ValidatorRewardSet RPC method. +type QueryValidatorRewardSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryValidatorRewardSet) Reset() { + *x = QueryValidatorRewardSet{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryValidatorRewardSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryValidatorRewardSet) ProtoMessage() {} + +// Deprecated: Use QueryValidatorRewardSet.ProtoReflect.Descriptor instead. +func (*QueryValidatorRewardSet) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{24} +} + +// QueryValidatorRewardSetResponse is the response type for the Query/ValidatorRewardSet RPC method. +type QueryValidatorRewardSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Validators *ValidatorRewardSet `protobuf:"bytes,1,opt,name=validators,proto3" json:"validators,omitempty"` +} + +func (x *QueryValidatorRewardSetResponse) Reset() { + *x = QueryValidatorRewardSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryValidatorRewardSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryValidatorRewardSetResponse) ProtoMessage() {} + +// Deprecated: Use QueryValidatorRewardSetResponse.ProtoReflect.Descriptor instead. +func (*QueryValidatorRewardSetResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{25} +} + +func (x *QueryValidatorRewardSetResponse) GetValidators() *ValidatorRewardSet { + if x != nil { + return x.Validators + } + return nil +} + +type QueryEMARequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (x *QueryEMARequest) Reset() { + *x = QueryEMARequest{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryEMARequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryEMARequest) ProtoMessage() {} + +// Deprecated: Use QueryEMARequest.ProtoReflect.Descriptor instead. +func (*QueryEMARequest) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{26} +} + +func (x *QueryEMARequest) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +type QueryEMAResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` +} + +func (x *QueryEMAResponse) Reset() { + *x = QueryEMAResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryEMAResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryEMAResponse) ProtoMessage() {} + +// Deprecated: Use QueryEMAResponse.ProtoReflect.Descriptor instead. +func (*QueryEMAResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{27} +} + +func (x *QueryEMAResponse) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +type QueryWMARequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Strategy string `protobuf:"bytes,2,opt,name=strategy,proto3" json:"strategy,omitempty"` // "BALANCED", "RECENT", etc. + CustomWeights []int64 `protobuf:"varint,3,rep,packed,name=custom_weights,json=customWeights,proto3" json:"custom_weights,omitempty"` // Only used if strategy == "CUSTOM" +} + +func (x *QueryWMARequest) Reset() { + *x = QueryWMARequest{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryWMARequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryWMARequest) ProtoMessage() {} + +// Deprecated: Use QueryWMARequest.ProtoReflect.Descriptor instead. +func (*QueryWMARequest) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{28} +} + +func (x *QueryWMARequest) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *QueryWMARequest) GetStrategy() string { + if x != nil { + return x.Strategy + } + return "" +} + +func (x *QueryWMARequest) GetCustomWeights() []int64 { + if x != nil { + return x.CustomWeights + } + return nil +} + +type QueryWMAResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` +} + +func (x *QueryWMAResponse) Reset() { + *x = QueryWMAResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryWMAResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryWMAResponse) ProtoMessage() {} + +// Deprecated: Use QueryWMAResponse.ProtoReflect.Descriptor instead. +func (*QueryWMAResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{29} +} + +func (x *QueryWMAResponse) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +type QuerySMARequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (x *QuerySMARequest) Reset() { + *x = QuerySMARequest{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySMARequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySMARequest) ProtoMessage() {} + +// Deprecated: Use QuerySMARequest.ProtoReflect.Descriptor instead. +func (*QuerySMARequest) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{30} +} + +func (x *QuerySMARequest) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +type QuerySMAResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` +} + +func (x *QuerySMAResponse) Reset() { + *x = QuerySMAResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_query_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySMAResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySMAResponse) ProtoMessage() {} + +// Deprecated: Use QuerySMAResponse.ProtoReflect.Descriptor instead. +func (*QuerySMAResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_query_proto_rawDescGZIP(), []int{31} +} + +func (x *QuerySMAResponse) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +var File_oracle_v1_query_proto protoreflect.FileDescriptor + +var file_oracle_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, + 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x16, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, + 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x12, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, + 0x96, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, + 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, + 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x61, 0x74, 0x65, 0x73, 0x22, 0x45, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, 0x22, 0x48, 0x0a, 0x15, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, + 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x40, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x65, + 0x65, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x65, 0x65, + 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x22, 0x43, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x4d, 0x69, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x3d, 0x0a, 0x18, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x69, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x73, 0x73, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x6d, 0x69, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x12, 0x0a, 0x10, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, + 0x43, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x57, 0x69, 0x6e, + 0x64, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x77, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x22, 0x48, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x25, 0x0a, + 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x7b, + 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5a, 0x0a, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x65, + 0x76, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, + 0x6f, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, + 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x7e, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x12, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, + 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x45, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x6f, 0x0a, 0x1a, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x6f, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x22, 0x15, 0x0a, + 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, + 0x6f, 0x74, 0x65, 0x73, 0x22, 0x72, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, + 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x0d, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x46, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, + 0x4d, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x53, 0x74, + 0x61, 0x6d, 0x70, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x4d, + 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x22, 0x37, 0x0a, + 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x44, 0x65, 0x76, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x3a, 0x08, 0x88, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x69, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, + 0x65, 0x64, 0x69, 0x61, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x11, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x6e, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, + 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x19, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x65, 0x74, 0x22, 0x66, 0x0a, 0x1f, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x43, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, + 0x65, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x22, 0x27, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x4d, 0x41, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x5b, 0x0a, + 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x4d, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x47, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, + 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x44, 0x65, 0x63, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0x6a, 0x0a, 0x0f, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x57, 0x4d, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, + 0x6e, 0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, + 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x57, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x22, 0x5b, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, + 0x4d, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x05, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, + 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, + 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x05, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x22, 0x27, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x4d, 0x41, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x5b, 0x0a, 0x10, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x4d, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x47, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, + 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x32, 0xb8, 0x10, 0x0a, 0x05, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x12, 0x87, 0x01, 0x0a, 0x0d, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x61, 0x74, 0x65, 0x73, 0x1a, 0x25, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, + 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x7d, 0x12, 0x98, 0x01, + 0x0a, 0x13, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x2b, 0x2e, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, + 0x27, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x6e, 0x6f, + 0x6d, 0x73, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x10, 0x46, 0x65, 0x65, + 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, + 0x65, 0x65, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, + 0x28, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2f, 0x12, 0x2d, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, + 0x12, 0x84, 0x01, 0x0a, 0x0b, 0x4d, 0x69, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x12, 0x1b, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4d, 0x69, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x1a, 0x23, 0x2e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, + 0x69, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x7d, 0x2f, 0x6d, 0x69, 0x73, 0x73, 0x12, 0x70, 0x0a, 0x0b, 0x53, 0x6c, 0x61, 0x73, 0x68, + 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x1b, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x57, 0x69, 0x6e, + 0x64, 0x6f, 0x77, 0x1a, 0x23, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, + 0x12, 0x17, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6c, 0x61, + 0x73, 0x68, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0xa0, 0x01, 0x0a, 0x10, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x20, + 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, + 0x1a, 0x28, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x93, 0x01, 0x0a, + 0x11, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, + 0x65, 0x73, 0x12, 0x21, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, + 0x76, 0x6f, 0x74, 0x65, 0x73, 0x1a, 0x29, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x6f, 0x74, + 0x65, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, + 0x6f, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x6f, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x37, 0x12, 0x35, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, + 0x61, 0x6c, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x0e, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x1a, 0x26, 0x2e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x6f, + 0x74, 0x65, 0x73, 0x12, 0x5b, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, 0x2e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1e, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x6a, 0x0a, 0x07, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x12, 0x17, 0x2e, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x64, + 0x69, 0x61, 0x6e, 0x73, 0x1a, 0x1f, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, + 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, + 0x6e, 0x6f, 0x6d, 0x73, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x12, 0x8f, 0x01, 0x0a, + 0x10, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x20, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x1a, 0x28, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x2f, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x6e, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x98, + 0x01, 0x0a, 0x12, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x53, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x65, 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x12, 0x5e, 0x0a, 0x03, 0x45, 0x4d, 0x41, + 0x12, 0x1a, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x45, 0x4d, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x4d, + 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x18, 0x12, 0x16, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6d, + 0x61, 0x2f, 0x7b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x7d, 0x12, 0x69, 0x0a, 0x03, 0x57, 0x4d, 0x41, + 0x12, 0x1a, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x57, 0x4d, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x4d, + 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x23, 0x12, 0x21, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6d, + 0x61, 0x2f, 0x7b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x7d, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x7d, 0x12, 0x5e, 0x0a, 0x03, 0x53, 0x4d, 0x41, 0x12, 0x1a, 0x2e, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x4d, 0x41, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x4d, 0x41, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6d, 0x61, 0x2f, 0x7b, 0x64, 0x65, + 0x6e, 0x6f, 0x6d, 0x7d, 0x42, 0x9b, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x44, 0x61, 0x65, 0x76, 0x4d, 0x69, 0x74, 0x68, 0x72, 0x61, 0x6e, 0x2f, 0x64, 0x6d, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, + 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, + 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, + 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0xc8, 0xe1, + 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_oracle_v1_query_proto_rawDescOnce sync.Once + file_oracle_v1_query_proto_rawDescData = file_oracle_v1_query_proto_rawDesc +) + +func file_oracle_v1_query_proto_rawDescGZIP() []byte { + file_oracle_v1_query_proto_rawDescOnce.Do(func() { + file_oracle_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_v1_query_proto_rawDescData) + }) + return file_oracle_v1_query_proto_rawDescData +} + +var file_oracle_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_oracle_v1_query_proto_goTypes = []interface{}{ + (*QueryExchangeRates)(nil), // 0: oracle.v1.QueryExchangeRates + (*QueryExchangeRatesResponse)(nil), // 1: oracle.v1.QueryExchangeRatesResponse + (*QueryActiveExchangeRates)(nil), // 2: oracle.v1.QueryActiveExchangeRates + (*QueryActiveExchangeRatesResponse)(nil), // 3: oracle.v1.QueryActiveExchangeRatesResponse + (*QueryFeederDelegation)(nil), // 4: oracle.v1.QueryFeederDelegation + (*QueryFeederDelegationResponse)(nil), // 5: oracle.v1.QueryFeederDelegationResponse + (*QueryMissCounter)(nil), // 6: oracle.v1.QueryMissCounter + (*QueryMissCounterResponse)(nil), // 7: oracle.v1.QueryMissCounterResponse + (*QuerySlashWindow)(nil), // 8: oracle.v1.QuerySlashWindow + (*QuerySlashWindowResponse)(nil), // 9: oracle.v1.QuerySlashWindowResponse + (*QueryAggregatePrevote)(nil), // 10: oracle.v1.QueryAggregatePrevote + (*QueryAggregatePrevoteResponse)(nil), // 11: oracle.v1.QueryAggregatePrevoteResponse + (*QueryAggregatePrevotes)(nil), // 12: oracle.v1.QueryAggregatePrevotes + (*QueryAggregatePrevotesResponse)(nil), // 13: oracle.v1.QueryAggregatePrevotesResponse + (*QueryAggregateVote)(nil), // 14: oracle.v1.QueryAggregateVote + (*QueryAggregateVoteResponse)(nil), // 15: oracle.v1.QueryAggregateVoteResponse + (*QueryAggregateVotes)(nil), // 16: oracle.v1.QueryAggregateVotes + (*QueryAggregateVotesResponse)(nil), // 17: oracle.v1.QueryAggregateVotesResponse + (*QueryParams)(nil), // 18: oracle.v1.QueryParams + (*QueryParamsResponse)(nil), // 19: oracle.v1.QueryParamsResponse + (*QueryMedians)(nil), // 20: oracle.v1.QueryMedians + (*QueryMediansResponse)(nil), // 21: oracle.v1.QueryMediansResponse + (*QueryMedianDeviations)(nil), // 22: oracle.v1.QueryMedianDeviations + (*QueryMedianDeviationsResponse)(nil), // 23: oracle.v1.QueryMedianDeviationsResponse + (*QueryValidatorRewardSet)(nil), // 24: oracle.v1.QueryValidatorRewardSet + (*QueryValidatorRewardSetResponse)(nil), // 25: oracle.v1.QueryValidatorRewardSetResponse + (*QueryEMARequest)(nil), // 26: oracle.v1.QueryEMARequest + (*QueryEMAResponse)(nil), // 27: oracle.v1.QueryEMAResponse + (*QueryWMARequest)(nil), // 28: oracle.v1.QueryWMARequest + (*QueryWMAResponse)(nil), // 29: oracle.v1.QueryWMAResponse + (*QuerySMARequest)(nil), // 30: oracle.v1.QuerySMARequest + (*QuerySMAResponse)(nil), // 31: oracle.v1.QuerySMAResponse + (*v1beta1.DecCoin)(nil), // 32: cosmos.base.v1beta1.DecCoin + (*AggregateExchangeRatePrevote)(nil), // 33: oracle.v1.AggregateExchangeRatePrevote + (*AggregateExchangeRateVote)(nil), // 34: oracle.v1.AggregateExchangeRateVote + (*Params)(nil), // 35: oracle.v1.Params + (*PriceStamp)(nil), // 36: oracle.v1.PriceStamp + (*ValidatorRewardSet)(nil), // 37: oracle.v1.ValidatorRewardSet +} +var file_oracle_v1_query_proto_depIdxs = []int32{ + 32, // 0: oracle.v1.QueryExchangeRatesResponse.exchange_rates:type_name -> cosmos.base.v1beta1.DecCoin + 33, // 1: oracle.v1.QueryAggregatePrevoteResponse.aggregate_prevote:type_name -> oracle.v1.AggregateExchangeRatePrevote + 33, // 2: oracle.v1.QueryAggregatePrevotesResponse.aggregate_prevotes:type_name -> oracle.v1.AggregateExchangeRatePrevote + 34, // 3: oracle.v1.QueryAggregateVoteResponse.aggregate_vote:type_name -> oracle.v1.AggregateExchangeRateVote + 34, // 4: oracle.v1.QueryAggregateVotesResponse.aggregate_votes:type_name -> oracle.v1.AggregateExchangeRateVote + 35, // 5: oracle.v1.QueryParamsResponse.params:type_name -> oracle.v1.Params + 36, // 6: oracle.v1.QueryMediansResponse.medians:type_name -> oracle.v1.PriceStamp + 36, // 7: oracle.v1.QueryMedianDeviationsResponse.median_deviations:type_name -> oracle.v1.PriceStamp + 37, // 8: oracle.v1.QueryValidatorRewardSetResponse.validators:type_name -> oracle.v1.ValidatorRewardSet + 0, // 9: oracle.v1.Query.ExchangeRates:input_type -> oracle.v1.QueryExchangeRates + 2, // 10: oracle.v1.Query.ActiveExchangeRates:input_type -> oracle.v1.QueryActiveExchangeRates + 4, // 11: oracle.v1.Query.FeederDelegation:input_type -> oracle.v1.QueryFeederDelegation + 6, // 12: oracle.v1.Query.MissCounter:input_type -> oracle.v1.QueryMissCounter + 8, // 13: oracle.v1.Query.SlashWindow:input_type -> oracle.v1.QuerySlashWindow + 10, // 14: oracle.v1.Query.AggregatePrevote:input_type -> oracle.v1.QueryAggregatePrevote + 12, // 15: oracle.v1.Query.AggregatePrevotes:input_type -> oracle.v1.QueryAggregatePrevotes + 14, // 16: oracle.v1.Query.AggregateVote:input_type -> oracle.v1.QueryAggregateVote + 16, // 17: oracle.v1.Query.AggregateVotes:input_type -> oracle.v1.QueryAggregateVotes + 18, // 18: oracle.v1.Query.Params:input_type -> oracle.v1.QueryParams + 20, // 19: oracle.v1.Query.Medians:input_type -> oracle.v1.QueryMedians + 22, // 20: oracle.v1.Query.MedianDeviations:input_type -> oracle.v1.QueryMedianDeviations + 24, // 21: oracle.v1.Query.ValidatorRewardSet:input_type -> oracle.v1.QueryValidatorRewardSet + 26, // 22: oracle.v1.Query.EMA:input_type -> oracle.v1.QueryEMARequest + 28, // 23: oracle.v1.Query.WMA:input_type -> oracle.v1.QueryWMARequest + 30, // 24: oracle.v1.Query.SMA:input_type -> oracle.v1.QuerySMARequest + 1, // 25: oracle.v1.Query.ExchangeRates:output_type -> oracle.v1.QueryExchangeRatesResponse + 3, // 26: oracle.v1.Query.ActiveExchangeRates:output_type -> oracle.v1.QueryActiveExchangeRatesResponse + 5, // 27: oracle.v1.Query.FeederDelegation:output_type -> oracle.v1.QueryFeederDelegationResponse + 7, // 28: oracle.v1.Query.MissCounter:output_type -> oracle.v1.QueryMissCounterResponse + 9, // 29: oracle.v1.Query.SlashWindow:output_type -> oracle.v1.QuerySlashWindowResponse + 11, // 30: oracle.v1.Query.AggregatePrevote:output_type -> oracle.v1.QueryAggregatePrevoteResponse + 13, // 31: oracle.v1.Query.AggregatePrevotes:output_type -> oracle.v1.QueryAggregatePrevotesResponse + 15, // 32: oracle.v1.Query.AggregateVote:output_type -> oracle.v1.QueryAggregateVoteResponse + 17, // 33: oracle.v1.Query.AggregateVotes:output_type -> oracle.v1.QueryAggregateVotesResponse + 19, // 34: oracle.v1.Query.Params:output_type -> oracle.v1.QueryParamsResponse + 21, // 35: oracle.v1.Query.Medians:output_type -> oracle.v1.QueryMediansResponse + 23, // 36: oracle.v1.Query.MedianDeviations:output_type -> oracle.v1.QueryMedianDeviationsResponse + 25, // 37: oracle.v1.Query.ValidatorRewardSet:output_type -> oracle.v1.QueryValidatorRewardSetResponse + 27, // 38: oracle.v1.Query.EMA:output_type -> oracle.v1.QueryEMAResponse + 29, // 39: oracle.v1.Query.WMA:output_type -> oracle.v1.QueryWMAResponse + 31, // 40: oracle.v1.Query.SMA:output_type -> oracle.v1.QuerySMAResponse + 25, // [25:41] is the sub-list for method output_type + 9, // [9:25] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_oracle_v1_query_proto_init() } +func file_oracle_v1_query_proto_init() { + if File_oracle_v1_query_proto != nil { + return + } + file_oracle_v1_oracle_proto_init() + if !protoimpl.UnsafeEnabled { + file_oracle_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryExchangeRates); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryExchangeRatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryActiveExchangeRates); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryActiveExchangeRatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryFeederDelegation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryFeederDelegationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryMissCounter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryMissCounterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySlashWindow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySlashWindowResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAggregatePrevote); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAggregatePrevoteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAggregatePrevotes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAggregatePrevotesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAggregateVote); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAggregateVoteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAggregateVotes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAggregateVotesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryMedians); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryMediansResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryMedianDeviations); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryMedianDeviationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryValidatorRewardSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryValidatorRewardSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryEMARequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryEMAResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryWMARequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryWMAResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySMARequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_query_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySMAResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_oracle_v1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 32, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_oracle_v1_query_proto_goTypes, + DependencyIndexes: file_oracle_v1_query_proto_depIdxs, + MessageInfos: file_oracle_v1_query_proto_msgTypes, + }.Build() + File_oracle_v1_query_proto = out.File + file_oracle_v1_query_proto_rawDesc = nil + file_oracle_v1_query_proto_goTypes = nil + file_oracle_v1_query_proto_depIdxs = nil +} diff --git a/api/oracle/v1/query_grpc.pb.go b/api/oracle/v1/query_grpc.pb.go new file mode 100644 index 0000000..5a44eaa --- /dev/null +++ b/api/oracle/v1/query_grpc.pb.go @@ -0,0 +1,700 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: oracle/v1/query.proto + +package oraclev1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Query_ExchangeRates_FullMethodName = "/oracle.v1.Query/ExchangeRates" + Query_ActiveExchangeRates_FullMethodName = "/oracle.v1.Query/ActiveExchangeRates" + Query_FeederDelegation_FullMethodName = "/oracle.v1.Query/FeederDelegation" + Query_MissCounter_FullMethodName = "/oracle.v1.Query/MissCounter" + Query_SlashWindow_FullMethodName = "/oracle.v1.Query/SlashWindow" + Query_AggregatePrevote_FullMethodName = "/oracle.v1.Query/AggregatePrevote" + Query_AggregatePrevotes_FullMethodName = "/oracle.v1.Query/AggregatePrevotes" + Query_AggregateVote_FullMethodName = "/oracle.v1.Query/AggregateVote" + Query_AggregateVotes_FullMethodName = "/oracle.v1.Query/AggregateVotes" + Query_Params_FullMethodName = "/oracle.v1.Query/Params" + Query_Medians_FullMethodName = "/oracle.v1.Query/Medians" + Query_MedianDeviations_FullMethodName = "/oracle.v1.Query/MedianDeviations" + Query_ValidatorRewardSet_FullMethodName = "/oracle.v1.Query/ValidatorRewardSet" + Query_EMA_FullMethodName = "/oracle.v1.Query/EMA" + Query_WMA_FullMethodName = "/oracle.v1.Query/WMA" + Query_SMA_FullMethodName = "/oracle.v1.Query/SMA" +) + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QueryClient interface { + // ExchangeRates returns exchange rates of all denoms, + // or, if specified, returns a single denom + ExchangeRates(ctx context.Context, in *QueryExchangeRates, opts ...grpc.CallOption) (*QueryExchangeRatesResponse, error) + // ActiveExchangeRates returns all active denoms + ActiveExchangeRates(ctx context.Context, in *QueryActiveExchangeRates, opts ...grpc.CallOption) (*QueryActiveExchangeRatesResponse, error) + // FeederDelegation returns feeder delegation of a validator + FeederDelegation(ctx context.Context, in *QueryFeederDelegation, opts ...grpc.CallOption) (*QueryFeederDelegationResponse, error) + // MissCounter returns oracle miss counter of a validator + MissCounter(ctx context.Context, in *QueryMissCounter, opts ...grpc.CallOption) (*QueryMissCounterResponse, error) + // SlashWindow returns slash window information + SlashWindow(ctx context.Context, in *QuerySlashWindow, opts ...grpc.CallOption) (*QuerySlashWindowResponse, error) + // AggregatePrevote returns an aggregate prevote of a validator + AggregatePrevote(ctx context.Context, in *QueryAggregatePrevote, opts ...grpc.CallOption) (*QueryAggregatePrevoteResponse, error) + // AggregatePrevotes returns aggregate prevotes of all validators + AggregatePrevotes(ctx context.Context, in *QueryAggregatePrevotes, opts ...grpc.CallOption) (*QueryAggregatePrevotesResponse, error) + // AggregateVote returns an aggregate vote of a validator + AggregateVote(ctx context.Context, in *QueryAggregateVote, opts ...grpc.CallOption) (*QueryAggregateVoteResponse, error) + // AggregateVotes returns aggregate votes of all validators + AggregateVotes(ctx context.Context, in *QueryAggregateVotes, opts ...grpc.CallOption) (*QueryAggregateVotesResponse, error) + // Params queries all parameters. + Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Medians returns medians of all denoms, + // or, if specified, returns a single median + Medians(ctx context.Context, in *QueryMedians, opts ...grpc.CallOption) (*QueryMediansResponse, error) + // MedianDeviations returns median deviations of all denoms, + // or, if specified, returns a single median deviation + MedianDeviations(ctx context.Context, in *QueryMedianDeviations, opts ...grpc.CallOption) (*QueryMedianDeviationsResponse, error) + // ValidatorRewardSet returns the set of validators that is + // earning rewards for voting on exchange rates based on their + // misscounter in a given Slash Window + ValidatorRewardSet(ctx context.Context, in *QueryValidatorRewardSet, opts ...grpc.CallOption) (*QueryValidatorRewardSetResponse, error) + EMA(ctx context.Context, in *QueryEMARequest, opts ...grpc.CallOption) (*QueryEMAResponse, error) + WMA(ctx context.Context, in *QueryWMARequest, opts ...grpc.CallOption) (*QueryWMAResponse, error) + SMA(ctx context.Context, in *QuerySMARequest, opts ...grpc.CallOption) (*QuerySMAResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) ExchangeRates(ctx context.Context, in *QueryExchangeRates, opts ...grpc.CallOption) (*QueryExchangeRatesResponse, error) { + out := new(QueryExchangeRatesResponse) + err := c.cc.Invoke(ctx, Query_ExchangeRates_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ActiveExchangeRates(ctx context.Context, in *QueryActiveExchangeRates, opts ...grpc.CallOption) (*QueryActiveExchangeRatesResponse, error) { + out := new(QueryActiveExchangeRatesResponse) + err := c.cc.Invoke(ctx, Query_ActiveExchangeRates_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) FeederDelegation(ctx context.Context, in *QueryFeederDelegation, opts ...grpc.CallOption) (*QueryFeederDelegationResponse, error) { + out := new(QueryFeederDelegationResponse) + err := c.cc.Invoke(ctx, Query_FeederDelegation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) MissCounter(ctx context.Context, in *QueryMissCounter, opts ...grpc.CallOption) (*QueryMissCounterResponse, error) { + out := new(QueryMissCounterResponse) + err := c.cc.Invoke(ctx, Query_MissCounter_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SlashWindow(ctx context.Context, in *QuerySlashWindow, opts ...grpc.CallOption) (*QuerySlashWindowResponse, error) { + out := new(QuerySlashWindowResponse) + err := c.cc.Invoke(ctx, Query_SlashWindow_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregatePrevote(ctx context.Context, in *QueryAggregatePrevote, opts ...grpc.CallOption) (*QueryAggregatePrevoteResponse, error) { + out := new(QueryAggregatePrevoteResponse) + err := c.cc.Invoke(ctx, Query_AggregatePrevote_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregatePrevotes(ctx context.Context, in *QueryAggregatePrevotes, opts ...grpc.CallOption) (*QueryAggregatePrevotesResponse, error) { + out := new(QueryAggregatePrevotesResponse) + err := c.cc.Invoke(ctx, Query_AggregatePrevotes_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregateVote(ctx context.Context, in *QueryAggregateVote, opts ...grpc.CallOption) (*QueryAggregateVoteResponse, error) { + out := new(QueryAggregateVoteResponse) + err := c.cc.Invoke(ctx, Query_AggregateVote_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregateVotes(ctx context.Context, in *QueryAggregateVotes, opts ...grpc.CallOption) (*QueryAggregateVotesResponse, error) { + out := new(QueryAggregateVotesResponse) + err := c.cc.Invoke(ctx, Query_AggregateVotes_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Medians(ctx context.Context, in *QueryMedians, opts ...grpc.CallOption) (*QueryMediansResponse, error) { + out := new(QueryMediansResponse) + err := c.cc.Invoke(ctx, Query_Medians_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) MedianDeviations(ctx context.Context, in *QueryMedianDeviations, opts ...grpc.CallOption) (*QueryMedianDeviationsResponse, error) { + out := new(QueryMedianDeviationsResponse) + err := c.cc.Invoke(ctx, Query_MedianDeviations_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorRewardSet(ctx context.Context, in *QueryValidatorRewardSet, opts ...grpc.CallOption) (*QueryValidatorRewardSetResponse, error) { + out := new(QueryValidatorRewardSetResponse) + err := c.cc.Invoke(ctx, Query_ValidatorRewardSet_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) EMA(ctx context.Context, in *QueryEMARequest, opts ...grpc.CallOption) (*QueryEMAResponse, error) { + out := new(QueryEMAResponse) + err := c.cc.Invoke(ctx, Query_EMA_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) WMA(ctx context.Context, in *QueryWMARequest, opts ...grpc.CallOption) (*QueryWMAResponse, error) { + out := new(QueryWMAResponse) + err := c.cc.Invoke(ctx, Query_WMA_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SMA(ctx context.Context, in *QuerySMARequest, opts ...grpc.CallOption) (*QuerySMAResponse, error) { + out := new(QuerySMAResponse) + err := c.cc.Invoke(ctx, Query_SMA_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + // ExchangeRates returns exchange rates of all denoms, + // or, if specified, returns a single denom + ExchangeRates(context.Context, *QueryExchangeRates) (*QueryExchangeRatesResponse, error) + // ActiveExchangeRates returns all active denoms + ActiveExchangeRates(context.Context, *QueryActiveExchangeRates) (*QueryActiveExchangeRatesResponse, error) + // FeederDelegation returns feeder delegation of a validator + FeederDelegation(context.Context, *QueryFeederDelegation) (*QueryFeederDelegationResponse, error) + // MissCounter returns oracle miss counter of a validator + MissCounter(context.Context, *QueryMissCounter) (*QueryMissCounterResponse, error) + // SlashWindow returns slash window information + SlashWindow(context.Context, *QuerySlashWindow) (*QuerySlashWindowResponse, error) + // AggregatePrevote returns an aggregate prevote of a validator + AggregatePrevote(context.Context, *QueryAggregatePrevote) (*QueryAggregatePrevoteResponse, error) + // AggregatePrevotes returns aggregate prevotes of all validators + AggregatePrevotes(context.Context, *QueryAggregatePrevotes) (*QueryAggregatePrevotesResponse, error) + // AggregateVote returns an aggregate vote of a validator + AggregateVote(context.Context, *QueryAggregateVote) (*QueryAggregateVoteResponse, error) + // AggregateVotes returns aggregate votes of all validators + AggregateVotes(context.Context, *QueryAggregateVotes) (*QueryAggregateVotesResponse, error) + // Params queries all parameters. + Params(context.Context, *QueryParams) (*QueryParamsResponse, error) + // Medians returns medians of all denoms, + // or, if specified, returns a single median + Medians(context.Context, *QueryMedians) (*QueryMediansResponse, error) + // MedianDeviations returns median deviations of all denoms, + // or, if specified, returns a single median deviation + MedianDeviations(context.Context, *QueryMedianDeviations) (*QueryMedianDeviationsResponse, error) + // ValidatorRewardSet returns the set of validators that is + // earning rewards for voting on exchange rates based on their + // misscounter in a given Slash Window + ValidatorRewardSet(context.Context, *QueryValidatorRewardSet) (*QueryValidatorRewardSetResponse, error) + EMA(context.Context, *QueryEMARequest) (*QueryEMAResponse, error) + WMA(context.Context, *QueryWMARequest) (*QueryWMAResponse, error) + SMA(context.Context, *QuerySMARequest) (*QuerySMAResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) ExchangeRates(context.Context, *QueryExchangeRates) (*QueryExchangeRatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExchangeRates not implemented") +} +func (UnimplementedQueryServer) ActiveExchangeRates(context.Context, *QueryActiveExchangeRates) (*QueryActiveExchangeRatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ActiveExchangeRates not implemented") +} +func (UnimplementedQueryServer) FeederDelegation(context.Context, *QueryFeederDelegation) (*QueryFeederDelegationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FeederDelegation not implemented") +} +func (UnimplementedQueryServer) MissCounter(context.Context, *QueryMissCounter) (*QueryMissCounterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MissCounter not implemented") +} +func (UnimplementedQueryServer) SlashWindow(context.Context, *QuerySlashWindow) (*QuerySlashWindowResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SlashWindow not implemented") +} +func (UnimplementedQueryServer) AggregatePrevote(context.Context, *QueryAggregatePrevote) (*QueryAggregatePrevoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregatePrevote not implemented") +} +func (UnimplementedQueryServer) AggregatePrevotes(context.Context, *QueryAggregatePrevotes) (*QueryAggregatePrevotesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregatePrevotes not implemented") +} +func (UnimplementedQueryServer) AggregateVote(context.Context, *QueryAggregateVote) (*QueryAggregateVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateVote not implemented") +} +func (UnimplementedQueryServer) AggregateVotes(context.Context, *QueryAggregateVotes) (*QueryAggregateVotesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateVotes not implemented") +} +func (UnimplementedQueryServer) Params(context.Context, *QueryParams) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) Medians(context.Context, *QueryMedians) (*QueryMediansResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Medians not implemented") +} +func (UnimplementedQueryServer) MedianDeviations(context.Context, *QueryMedianDeviations) (*QueryMedianDeviationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MedianDeviations not implemented") +} +func (UnimplementedQueryServer) ValidatorRewardSet(context.Context, *QueryValidatorRewardSet) (*QueryValidatorRewardSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorRewardSet not implemented") +} +func (UnimplementedQueryServer) EMA(context.Context, *QueryEMARequest) (*QueryEMAResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EMA not implemented") +} +func (UnimplementedQueryServer) WMA(context.Context, *QueryWMARequest) (*QueryWMAResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WMA not implemented") +} +func (UnimplementedQueryServer) SMA(context.Context, *QuerySMARequest) (*QuerySMAResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SMA not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_ExchangeRates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryExchangeRates) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ExchangeRates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ExchangeRates_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ExchangeRates(ctx, req.(*QueryExchangeRates)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ActiveExchangeRates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryActiveExchangeRates) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ActiveExchangeRates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ActiveExchangeRates_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ActiveExchangeRates(ctx, req.(*QueryActiveExchangeRates)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_FeederDelegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFeederDelegation) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).FeederDelegation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_FeederDelegation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).FeederDelegation(ctx, req.(*QueryFeederDelegation)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_MissCounter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMissCounter) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MissCounter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_MissCounter_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MissCounter(ctx, req.(*QueryMissCounter)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SlashWindow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySlashWindow) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SlashWindow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_SlashWindow_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SlashWindow(ctx, req.(*QuerySlashWindow)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregatePrevote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregatePrevote) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregatePrevote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AggregatePrevote_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregatePrevote(ctx, req.(*QueryAggregatePrevote)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregatePrevotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregatePrevotes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregatePrevotes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AggregatePrevotes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregatePrevotes(ctx, req.(*QueryAggregatePrevotes)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregateVote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregateVote) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregateVote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AggregateVote_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregateVote(ctx, req.(*QueryAggregateVote)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregateVotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregateVotes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregateVotes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AggregateVotes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregateVotes(ctx, req.(*QueryAggregateVotes)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Medians_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMedians) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Medians(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Medians_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Medians(ctx, req.(*QueryMedians)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_MedianDeviations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMedianDeviations) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MedianDeviations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_MedianDeviations_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MedianDeviations(ctx, req.(*QueryMedianDeviations)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorRewardSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorRewardSet) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorRewardSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ValidatorRewardSet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorRewardSet(ctx, req.(*QueryValidatorRewardSet)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_EMA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEMARequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EMA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_EMA_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EMA(ctx, req.(*QueryEMARequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_WMA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWMARequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).WMA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_WMA_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).WMA(ctx, req.(*QueryWMARequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SMA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySMARequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SMA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_SMA_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SMA(ctx, req.(*QuerySMARequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "oracle.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ExchangeRates", + Handler: _Query_ExchangeRates_Handler, + }, + { + MethodName: "ActiveExchangeRates", + Handler: _Query_ActiveExchangeRates_Handler, + }, + { + MethodName: "FeederDelegation", + Handler: _Query_FeederDelegation_Handler, + }, + { + MethodName: "MissCounter", + Handler: _Query_MissCounter_Handler, + }, + { + MethodName: "SlashWindow", + Handler: _Query_SlashWindow_Handler, + }, + { + MethodName: "AggregatePrevote", + Handler: _Query_AggregatePrevote_Handler, + }, + { + MethodName: "AggregatePrevotes", + Handler: _Query_AggregatePrevotes_Handler, + }, + { + MethodName: "AggregateVote", + Handler: _Query_AggregateVote_Handler, + }, + { + MethodName: "AggregateVotes", + Handler: _Query_AggregateVotes_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Medians", + Handler: _Query_Medians_Handler, + }, + { + MethodName: "MedianDeviations", + Handler: _Query_MedianDeviations_Handler, + }, + { + MethodName: "ValidatorRewardSet", + Handler: _Query_ValidatorRewardSet_Handler, + }, + { + MethodName: "EMA", + Handler: _Query_EMA_Handler, + }, + { + MethodName: "WMA", + Handler: _Query_WMA_Handler, + }, + { + MethodName: "SMA", + Handler: _Query_SMA_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "oracle/v1/query.proto", +} diff --git a/api/oracle/v1/tx.pulsar.go b/api/oracle/v1/tx.pulsar.go new file mode 100644 index 0000000..58d9384 --- /dev/null +++ b/api/oracle/v1/tx.pulsar.go @@ -0,0 +1,10885 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package oraclev1 + +import ( + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgAggregateExchangeRatePrevote protoreflect.MessageDescriptor + fd_MsgAggregateExchangeRatePrevote_hash protoreflect.FieldDescriptor + fd_MsgAggregateExchangeRatePrevote_feeder protoreflect.FieldDescriptor + fd_MsgAggregateExchangeRatePrevote_validator protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgAggregateExchangeRatePrevote = File_oracle_v1_tx_proto.Messages().ByName("MsgAggregateExchangeRatePrevote") + fd_MsgAggregateExchangeRatePrevote_hash = md_MsgAggregateExchangeRatePrevote.Fields().ByName("hash") + fd_MsgAggregateExchangeRatePrevote_feeder = md_MsgAggregateExchangeRatePrevote.Fields().ByName("feeder") + fd_MsgAggregateExchangeRatePrevote_validator = md_MsgAggregateExchangeRatePrevote.Fields().ByName("validator") +} + +var _ protoreflect.Message = (*fastReflection_MsgAggregateExchangeRatePrevote)(nil) + +type fastReflection_MsgAggregateExchangeRatePrevote MsgAggregateExchangeRatePrevote + +func (x *MsgAggregateExchangeRatePrevote) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAggregateExchangeRatePrevote)(x) +} + +func (x *MsgAggregateExchangeRatePrevote) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAggregateExchangeRatePrevote_messageType fastReflection_MsgAggregateExchangeRatePrevote_messageType +var _ protoreflect.MessageType = fastReflection_MsgAggregateExchangeRatePrevote_messageType{} + +type fastReflection_MsgAggregateExchangeRatePrevote_messageType struct{} + +func (x fastReflection_MsgAggregateExchangeRatePrevote_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAggregateExchangeRatePrevote)(nil) +} +func (x fastReflection_MsgAggregateExchangeRatePrevote_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAggregateExchangeRatePrevote) +} +func (x fastReflection_MsgAggregateExchangeRatePrevote_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAggregateExchangeRatePrevote +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAggregateExchangeRatePrevote +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) Type() protoreflect.MessageType { + return _fastReflection_MsgAggregateExchangeRatePrevote_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) New() protoreflect.Message { + return new(fastReflection_MsgAggregateExchangeRatePrevote) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) Interface() protoreflect.ProtoMessage { + return (*MsgAggregateExchangeRatePrevote)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Hash != "" { + value := protoreflect.ValueOfString(x.Hash) + if !f(fd_MsgAggregateExchangeRatePrevote_hash, value) { + return + } + } + if x.Feeder != "" { + value := protoreflect.ValueOfString(x.Feeder) + if !f(fd_MsgAggregateExchangeRatePrevote_feeder, value) { + return + } + } + if x.Validator != "" { + value := protoreflect.ValueOfString(x.Validator) + if !f(fd_MsgAggregateExchangeRatePrevote_validator, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.MsgAggregateExchangeRatePrevote.hash": + return x.Hash != "" + case "oracle.v1.MsgAggregateExchangeRatePrevote.feeder": + return x.Feeder != "" + case "oracle.v1.MsgAggregateExchangeRatePrevote.validator": + return x.Validator != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevote does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.MsgAggregateExchangeRatePrevote.hash": + x.Hash = "" + case "oracle.v1.MsgAggregateExchangeRatePrevote.feeder": + x.Feeder = "" + case "oracle.v1.MsgAggregateExchangeRatePrevote.validator": + x.Validator = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevote does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.MsgAggregateExchangeRatePrevote.hash": + value := x.Hash + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgAggregateExchangeRatePrevote.feeder": + value := x.Feeder + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgAggregateExchangeRatePrevote.validator": + value := x.Validator + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevote does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.MsgAggregateExchangeRatePrevote.hash": + x.Hash = value.Interface().(string) + case "oracle.v1.MsgAggregateExchangeRatePrevote.feeder": + x.Feeder = value.Interface().(string) + case "oracle.v1.MsgAggregateExchangeRatePrevote.validator": + x.Validator = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevote does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgAggregateExchangeRatePrevote.hash": + panic(fmt.Errorf("field hash of message oracle.v1.MsgAggregateExchangeRatePrevote is not mutable")) + case "oracle.v1.MsgAggregateExchangeRatePrevote.feeder": + panic(fmt.Errorf("field feeder of message oracle.v1.MsgAggregateExchangeRatePrevote is not mutable")) + case "oracle.v1.MsgAggregateExchangeRatePrevote.validator": + panic(fmt.Errorf("field validator of message oracle.v1.MsgAggregateExchangeRatePrevote is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevote does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgAggregateExchangeRatePrevote.hash": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgAggregateExchangeRatePrevote.feeder": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgAggregateExchangeRatePrevote.validator": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevote does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgAggregateExchangeRatePrevote", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgAggregateExchangeRatePrevote) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAggregateExchangeRatePrevote) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Hash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Feeder) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Validator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgAggregateExchangeRatePrevote) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Validator) > 0 { + i -= len(x.Validator) + copy(dAtA[i:], x.Validator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Validator))) + i-- + dAtA[i] = 0x1a + } + if len(x.Feeder) > 0 { + i -= len(x.Feeder) + copy(dAtA[i:], x.Feeder) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Feeder))) + i-- + dAtA[i] = 0x12 + } + if len(x.Hash) > 0 { + i -= len(x.Hash) + copy(dAtA[i:], x.Hash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgAggregateExchangeRatePrevote) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAggregateExchangeRatePrevote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAggregateExchangeRatePrevote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Feeder", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Feeder = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Validator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgAggregateExchangeRatePrevoteResponse protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgAggregateExchangeRatePrevoteResponse = File_oracle_v1_tx_proto.Messages().ByName("MsgAggregateExchangeRatePrevoteResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgAggregateExchangeRatePrevoteResponse)(nil) + +type fastReflection_MsgAggregateExchangeRatePrevoteResponse MsgAggregateExchangeRatePrevoteResponse + +func (x *MsgAggregateExchangeRatePrevoteResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAggregateExchangeRatePrevoteResponse)(x) +} + +func (x *MsgAggregateExchangeRatePrevoteResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAggregateExchangeRatePrevoteResponse_messageType fastReflection_MsgAggregateExchangeRatePrevoteResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAggregateExchangeRatePrevoteResponse_messageType{} + +type fastReflection_MsgAggregateExchangeRatePrevoteResponse_messageType struct{} + +func (x fastReflection_MsgAggregateExchangeRatePrevoteResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAggregateExchangeRatePrevoteResponse)(nil) +} +func (x fastReflection_MsgAggregateExchangeRatePrevoteResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAggregateExchangeRatePrevoteResponse) +} +func (x fastReflection_MsgAggregateExchangeRatePrevoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAggregateExchangeRatePrevoteResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAggregateExchangeRatePrevoteResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAggregateExchangeRatePrevoteResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) New() protoreflect.Message { + return new(fastReflection_MsgAggregateExchangeRatePrevoteResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAggregateExchangeRatePrevoteResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevoteResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevoteResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevoteResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevoteResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevoteResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRatePrevoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRatePrevoteResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgAggregateExchangeRatePrevoteResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgAggregateExchangeRatePrevoteResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAggregateExchangeRatePrevoteResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgAggregateExchangeRatePrevoteResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgAggregateExchangeRatePrevoteResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAggregateExchangeRatePrevoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAggregateExchangeRatePrevoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgAggregateExchangeRateVote protoreflect.MessageDescriptor + fd_MsgAggregateExchangeRateVote_salt protoreflect.FieldDescriptor + fd_MsgAggregateExchangeRateVote_exchange_rates protoreflect.FieldDescriptor + fd_MsgAggregateExchangeRateVote_feeder protoreflect.FieldDescriptor + fd_MsgAggregateExchangeRateVote_validator protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgAggregateExchangeRateVote = File_oracle_v1_tx_proto.Messages().ByName("MsgAggregateExchangeRateVote") + fd_MsgAggregateExchangeRateVote_salt = md_MsgAggregateExchangeRateVote.Fields().ByName("salt") + fd_MsgAggregateExchangeRateVote_exchange_rates = md_MsgAggregateExchangeRateVote.Fields().ByName("exchange_rates") + fd_MsgAggregateExchangeRateVote_feeder = md_MsgAggregateExchangeRateVote.Fields().ByName("feeder") + fd_MsgAggregateExchangeRateVote_validator = md_MsgAggregateExchangeRateVote.Fields().ByName("validator") +} + +var _ protoreflect.Message = (*fastReflection_MsgAggregateExchangeRateVote)(nil) + +type fastReflection_MsgAggregateExchangeRateVote MsgAggregateExchangeRateVote + +func (x *MsgAggregateExchangeRateVote) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAggregateExchangeRateVote)(x) +} + +func (x *MsgAggregateExchangeRateVote) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAggregateExchangeRateVote_messageType fastReflection_MsgAggregateExchangeRateVote_messageType +var _ protoreflect.MessageType = fastReflection_MsgAggregateExchangeRateVote_messageType{} + +type fastReflection_MsgAggregateExchangeRateVote_messageType struct{} + +func (x fastReflection_MsgAggregateExchangeRateVote_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAggregateExchangeRateVote)(nil) +} +func (x fastReflection_MsgAggregateExchangeRateVote_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAggregateExchangeRateVote) +} +func (x fastReflection_MsgAggregateExchangeRateVote_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAggregateExchangeRateVote +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAggregateExchangeRateVote) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAggregateExchangeRateVote +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgAggregateExchangeRateVote) Type() protoreflect.MessageType { + return _fastReflection_MsgAggregateExchangeRateVote_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAggregateExchangeRateVote) New() protoreflect.Message { + return new(fastReflection_MsgAggregateExchangeRateVote) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAggregateExchangeRateVote) Interface() protoreflect.ProtoMessage { + return (*MsgAggregateExchangeRateVote)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgAggregateExchangeRateVote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Salt != "" { + value := protoreflect.ValueOfString(x.Salt) + if !f(fd_MsgAggregateExchangeRateVote_salt, value) { + return + } + } + if x.ExchangeRates != "" { + value := protoreflect.ValueOfString(x.ExchangeRates) + if !f(fd_MsgAggregateExchangeRateVote_exchange_rates, value) { + return + } + } + if x.Feeder != "" { + value := protoreflect.ValueOfString(x.Feeder) + if !f(fd_MsgAggregateExchangeRateVote_feeder, value) { + return + } + } + if x.Validator != "" { + value := protoreflect.ValueOfString(x.Validator) + if !f(fd_MsgAggregateExchangeRateVote_validator, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgAggregateExchangeRateVote) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.MsgAggregateExchangeRateVote.salt": + return x.Salt != "" + case "oracle.v1.MsgAggregateExchangeRateVote.exchange_rates": + return x.ExchangeRates != "" + case "oracle.v1.MsgAggregateExchangeRateVote.feeder": + return x.Feeder != "" + case "oracle.v1.MsgAggregateExchangeRateVote.validator": + return x.Validator != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVote does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRateVote) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.MsgAggregateExchangeRateVote.salt": + x.Salt = "" + case "oracle.v1.MsgAggregateExchangeRateVote.exchange_rates": + x.ExchangeRates = "" + case "oracle.v1.MsgAggregateExchangeRateVote.feeder": + x.Feeder = "" + case "oracle.v1.MsgAggregateExchangeRateVote.validator": + x.Validator = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVote does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgAggregateExchangeRateVote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.MsgAggregateExchangeRateVote.salt": + value := x.Salt + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgAggregateExchangeRateVote.exchange_rates": + value := x.ExchangeRates + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgAggregateExchangeRateVote.feeder": + value := x.Feeder + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgAggregateExchangeRateVote.validator": + value := x.Validator + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVote does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRateVote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.MsgAggregateExchangeRateVote.salt": + x.Salt = value.Interface().(string) + case "oracle.v1.MsgAggregateExchangeRateVote.exchange_rates": + x.ExchangeRates = value.Interface().(string) + case "oracle.v1.MsgAggregateExchangeRateVote.feeder": + x.Feeder = value.Interface().(string) + case "oracle.v1.MsgAggregateExchangeRateVote.validator": + x.Validator = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVote does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRateVote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgAggregateExchangeRateVote.salt": + panic(fmt.Errorf("field salt of message oracle.v1.MsgAggregateExchangeRateVote is not mutable")) + case "oracle.v1.MsgAggregateExchangeRateVote.exchange_rates": + panic(fmt.Errorf("field exchange_rates of message oracle.v1.MsgAggregateExchangeRateVote is not mutable")) + case "oracle.v1.MsgAggregateExchangeRateVote.feeder": + panic(fmt.Errorf("field feeder of message oracle.v1.MsgAggregateExchangeRateVote is not mutable")) + case "oracle.v1.MsgAggregateExchangeRateVote.validator": + panic(fmt.Errorf("field validator of message oracle.v1.MsgAggregateExchangeRateVote is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVote does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgAggregateExchangeRateVote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgAggregateExchangeRateVote.salt": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgAggregateExchangeRateVote.exchange_rates": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgAggregateExchangeRateVote.feeder": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgAggregateExchangeRateVote.validator": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVote")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVote does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgAggregateExchangeRateVote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgAggregateExchangeRateVote", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgAggregateExchangeRateVote) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRateVote) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgAggregateExchangeRateVote) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgAggregateExchangeRateVote) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAggregateExchangeRateVote) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Salt) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ExchangeRates) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Feeder) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Validator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgAggregateExchangeRateVote) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Validator) > 0 { + i -= len(x.Validator) + copy(dAtA[i:], x.Validator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Validator))) + i-- + dAtA[i] = 0x22 + } + if len(x.Feeder) > 0 { + i -= len(x.Feeder) + copy(dAtA[i:], x.Feeder) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Feeder))) + i-- + dAtA[i] = 0x1a + } + if len(x.ExchangeRates) > 0 { + i -= len(x.ExchangeRates) + copy(dAtA[i:], x.ExchangeRates) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ExchangeRates))) + i-- + dAtA[i] = 0x12 + } + if len(x.Salt) > 0 { + i -= len(x.Salt) + copy(dAtA[i:], x.Salt) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Salt))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgAggregateExchangeRateVote) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAggregateExchangeRateVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAggregateExchangeRateVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Salt", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Salt = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExchangeRates", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ExchangeRates = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Feeder", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Feeder = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Validator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgAggregateExchangeRateVoteResponse protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgAggregateExchangeRateVoteResponse = File_oracle_v1_tx_proto.Messages().ByName("MsgAggregateExchangeRateVoteResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgAggregateExchangeRateVoteResponse)(nil) + +type fastReflection_MsgAggregateExchangeRateVoteResponse MsgAggregateExchangeRateVoteResponse + +func (x *MsgAggregateExchangeRateVoteResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAggregateExchangeRateVoteResponse)(x) +} + +func (x *MsgAggregateExchangeRateVoteResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAggregateExchangeRateVoteResponse_messageType fastReflection_MsgAggregateExchangeRateVoteResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAggregateExchangeRateVoteResponse_messageType{} + +type fastReflection_MsgAggregateExchangeRateVoteResponse_messageType struct{} + +func (x fastReflection_MsgAggregateExchangeRateVoteResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAggregateExchangeRateVoteResponse)(nil) +} +func (x fastReflection_MsgAggregateExchangeRateVoteResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAggregateExchangeRateVoteResponse) +} +func (x fastReflection_MsgAggregateExchangeRateVoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAggregateExchangeRateVoteResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAggregateExchangeRateVoteResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAggregateExchangeRateVoteResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) New() protoreflect.Message { + return new(fastReflection_MsgAggregateExchangeRateVoteResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAggregateExchangeRateVoteResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVoteResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVoteResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVoteResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVoteResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVoteResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgAggregateExchangeRateVoteResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgAggregateExchangeRateVoteResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgAggregateExchangeRateVoteResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgAggregateExchangeRateVoteResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAggregateExchangeRateVoteResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgAggregateExchangeRateVoteResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgAggregateExchangeRateVoteResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAggregateExchangeRateVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAggregateExchangeRateVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgDelegateFeedConsent protoreflect.MessageDescriptor + fd_MsgDelegateFeedConsent_operator protoreflect.FieldDescriptor + fd_MsgDelegateFeedConsent_delegate protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgDelegateFeedConsent = File_oracle_v1_tx_proto.Messages().ByName("MsgDelegateFeedConsent") + fd_MsgDelegateFeedConsent_operator = md_MsgDelegateFeedConsent.Fields().ByName("operator") + fd_MsgDelegateFeedConsent_delegate = md_MsgDelegateFeedConsent.Fields().ByName("delegate") +} + +var _ protoreflect.Message = (*fastReflection_MsgDelegateFeedConsent)(nil) + +type fastReflection_MsgDelegateFeedConsent MsgDelegateFeedConsent + +func (x *MsgDelegateFeedConsent) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDelegateFeedConsent)(x) +} + +func (x *MsgDelegateFeedConsent) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgDelegateFeedConsent_messageType fastReflection_MsgDelegateFeedConsent_messageType +var _ protoreflect.MessageType = fastReflection_MsgDelegateFeedConsent_messageType{} + +type fastReflection_MsgDelegateFeedConsent_messageType struct{} + +func (x fastReflection_MsgDelegateFeedConsent_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDelegateFeedConsent)(nil) +} +func (x fastReflection_MsgDelegateFeedConsent_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDelegateFeedConsent) +} +func (x fastReflection_MsgDelegateFeedConsent_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDelegateFeedConsent +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDelegateFeedConsent) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDelegateFeedConsent +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDelegateFeedConsent) Type() protoreflect.MessageType { + return _fastReflection_MsgDelegateFeedConsent_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDelegateFeedConsent) New() protoreflect.Message { + return new(fastReflection_MsgDelegateFeedConsent) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDelegateFeedConsent) Interface() protoreflect.ProtoMessage { + return (*MsgDelegateFeedConsent)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDelegateFeedConsent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Operator != "" { + value := protoreflect.ValueOfString(x.Operator) + if !f(fd_MsgDelegateFeedConsent_operator, value) { + return + } + } + if x.Delegate != "" { + value := protoreflect.ValueOfString(x.Delegate) + if !f(fd_MsgDelegateFeedConsent_delegate, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDelegateFeedConsent) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.MsgDelegateFeedConsent.operator": + return x.Operator != "" + case "oracle.v1.MsgDelegateFeedConsent.delegate": + return x.Delegate != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsent does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegateFeedConsent) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.MsgDelegateFeedConsent.operator": + x.Operator = "" + case "oracle.v1.MsgDelegateFeedConsent.delegate": + x.Delegate = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsent does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDelegateFeedConsent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.MsgDelegateFeedConsent.operator": + value := x.Operator + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgDelegateFeedConsent.delegate": + value := x.Delegate + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsent does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegateFeedConsent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.MsgDelegateFeedConsent.operator": + x.Operator = value.Interface().(string) + case "oracle.v1.MsgDelegateFeedConsent.delegate": + x.Delegate = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsent does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegateFeedConsent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgDelegateFeedConsent.operator": + panic(fmt.Errorf("field operator of message oracle.v1.MsgDelegateFeedConsent is not mutable")) + case "oracle.v1.MsgDelegateFeedConsent.delegate": + panic(fmt.Errorf("field delegate of message oracle.v1.MsgDelegateFeedConsent is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsent does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDelegateFeedConsent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgDelegateFeedConsent.operator": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgDelegateFeedConsent.delegate": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsent")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsent does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDelegateFeedConsent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgDelegateFeedConsent", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDelegateFeedConsent) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegateFeedConsent) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDelegateFeedConsent) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDelegateFeedConsent) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDelegateFeedConsent) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Operator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Delegate) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDelegateFeedConsent) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Delegate) > 0 { + i -= len(x.Delegate) + copy(dAtA[i:], x.Delegate) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Delegate))) + i-- + dAtA[i] = 0x12 + } + if len(x.Operator) > 0 { + i -= len(x.Operator) + copy(dAtA[i:], x.Operator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Operator))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDelegateFeedConsent) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegateFeedConsent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegateFeedConsent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Delegate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Delegate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgDelegateFeedConsentResponse protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgDelegateFeedConsentResponse = File_oracle_v1_tx_proto.Messages().ByName("MsgDelegateFeedConsentResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgDelegateFeedConsentResponse)(nil) + +type fastReflection_MsgDelegateFeedConsentResponse MsgDelegateFeedConsentResponse + +func (x *MsgDelegateFeedConsentResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDelegateFeedConsentResponse)(x) +} + +func (x *MsgDelegateFeedConsentResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgDelegateFeedConsentResponse_messageType fastReflection_MsgDelegateFeedConsentResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgDelegateFeedConsentResponse_messageType{} + +type fastReflection_MsgDelegateFeedConsentResponse_messageType struct{} + +func (x fastReflection_MsgDelegateFeedConsentResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDelegateFeedConsentResponse)(nil) +} +func (x fastReflection_MsgDelegateFeedConsentResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDelegateFeedConsentResponse) +} +func (x fastReflection_MsgDelegateFeedConsentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDelegateFeedConsentResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDelegateFeedConsentResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDelegateFeedConsentResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDelegateFeedConsentResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgDelegateFeedConsentResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDelegateFeedConsentResponse) New() protoreflect.Message { + return new(fastReflection_MsgDelegateFeedConsentResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDelegateFeedConsentResponse) Interface() protoreflect.ProtoMessage { + return (*MsgDelegateFeedConsentResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDelegateFeedConsentResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDelegateFeedConsentResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsentResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsentResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegateFeedConsentResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsentResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsentResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDelegateFeedConsentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsentResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsentResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegateFeedConsentResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsentResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsentResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegateFeedConsentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsentResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsentResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDelegateFeedConsentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgDelegateFeedConsentResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgDelegateFeedConsentResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDelegateFeedConsentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgDelegateFeedConsentResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDelegateFeedConsentResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDelegateFeedConsentResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDelegateFeedConsentResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDelegateFeedConsentResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDelegateFeedConsentResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDelegateFeedConsentResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDelegateFeedConsentResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegateFeedConsentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegateFeedConsentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgLegacyGovUpdateParams_4_list)(nil) + +type _MsgLegacyGovUpdateParams_4_list struct { + list *[]string +} + +func (x *_MsgLegacyGovUpdateParams_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgLegacyGovUpdateParams_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgLegacyGovUpdateParams_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgLegacyGovUpdateParams_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgLegacyGovUpdateParams_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgLegacyGovUpdateParams at list field Keys as it is not of Message kind")) +} + +func (x *_MsgLegacyGovUpdateParams_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgLegacyGovUpdateParams_4_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgLegacyGovUpdateParams_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgLegacyGovUpdateParams protoreflect.MessageDescriptor + fd_MsgLegacyGovUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgLegacyGovUpdateParams_title protoreflect.FieldDescriptor + fd_MsgLegacyGovUpdateParams_description protoreflect.FieldDescriptor + fd_MsgLegacyGovUpdateParams_keys protoreflect.FieldDescriptor + fd_MsgLegacyGovUpdateParams_changes protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgLegacyGovUpdateParams = File_oracle_v1_tx_proto.Messages().ByName("MsgLegacyGovUpdateParams") + fd_MsgLegacyGovUpdateParams_authority = md_MsgLegacyGovUpdateParams.Fields().ByName("authority") + fd_MsgLegacyGovUpdateParams_title = md_MsgLegacyGovUpdateParams.Fields().ByName("title") + fd_MsgLegacyGovUpdateParams_description = md_MsgLegacyGovUpdateParams.Fields().ByName("description") + fd_MsgLegacyGovUpdateParams_keys = md_MsgLegacyGovUpdateParams.Fields().ByName("keys") + fd_MsgLegacyGovUpdateParams_changes = md_MsgLegacyGovUpdateParams.Fields().ByName("changes") +} + +var _ protoreflect.Message = (*fastReflection_MsgLegacyGovUpdateParams)(nil) + +type fastReflection_MsgLegacyGovUpdateParams MsgLegacyGovUpdateParams + +func (x *MsgLegacyGovUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLegacyGovUpdateParams)(x) +} + +func (x *MsgLegacyGovUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgLegacyGovUpdateParams_messageType fastReflection_MsgLegacyGovUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgLegacyGovUpdateParams_messageType{} + +type fastReflection_MsgLegacyGovUpdateParams_messageType struct{} + +func (x fastReflection_MsgLegacyGovUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLegacyGovUpdateParams)(nil) +} +func (x fastReflection_MsgLegacyGovUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLegacyGovUpdateParams) +} +func (x fastReflection_MsgLegacyGovUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLegacyGovUpdateParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgLegacyGovUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLegacyGovUpdateParams +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgLegacyGovUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgLegacyGovUpdateParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgLegacyGovUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgLegacyGovUpdateParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgLegacyGovUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgLegacyGovUpdateParams)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgLegacyGovUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgLegacyGovUpdateParams_authority, value) { + return + } + } + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_MsgLegacyGovUpdateParams_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_MsgLegacyGovUpdateParams_description, value) { + return + } + } + if len(x.Keys) != 0 { + value := protoreflect.ValueOfList(&_MsgLegacyGovUpdateParams_4_list{list: &x.Keys}) + if !f(fd_MsgLegacyGovUpdateParams_keys, value) { + return + } + } + if x.Changes != nil { + value := protoreflect.ValueOfMessage(x.Changes.ProtoReflect()) + if !f(fd_MsgLegacyGovUpdateParams_changes, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgLegacyGovUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.MsgLegacyGovUpdateParams.authority": + return x.Authority != "" + case "oracle.v1.MsgLegacyGovUpdateParams.title": + return x.Title != "" + case "oracle.v1.MsgLegacyGovUpdateParams.description": + return x.Description != "" + case "oracle.v1.MsgLegacyGovUpdateParams.keys": + return len(x.Keys) != 0 + case "oracle.v1.MsgLegacyGovUpdateParams.changes": + return x.Changes != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLegacyGovUpdateParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.MsgLegacyGovUpdateParams.authority": + x.Authority = "" + case "oracle.v1.MsgLegacyGovUpdateParams.title": + x.Title = "" + case "oracle.v1.MsgLegacyGovUpdateParams.description": + x.Description = "" + case "oracle.v1.MsgLegacyGovUpdateParams.keys": + x.Keys = nil + case "oracle.v1.MsgLegacyGovUpdateParams.changes": + x.Changes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgLegacyGovUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.MsgLegacyGovUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgLegacyGovUpdateParams.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgLegacyGovUpdateParams.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgLegacyGovUpdateParams.keys": + if len(x.Keys) == 0 { + return protoreflect.ValueOfList(&_MsgLegacyGovUpdateParams_4_list{}) + } + listValue := &_MsgLegacyGovUpdateParams_4_list{list: &x.Keys} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.MsgLegacyGovUpdateParams.changes": + value := x.Changes + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParams does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLegacyGovUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.MsgLegacyGovUpdateParams.authority": + x.Authority = value.Interface().(string) + case "oracle.v1.MsgLegacyGovUpdateParams.title": + x.Title = value.Interface().(string) + case "oracle.v1.MsgLegacyGovUpdateParams.description": + x.Description = value.Interface().(string) + case "oracle.v1.MsgLegacyGovUpdateParams.keys": + lv := value.List() + clv := lv.(*_MsgLegacyGovUpdateParams_4_list) + x.Keys = *clv.list + case "oracle.v1.MsgLegacyGovUpdateParams.changes": + x.Changes = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLegacyGovUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgLegacyGovUpdateParams.keys": + if x.Keys == nil { + x.Keys = []string{} + } + value := &_MsgLegacyGovUpdateParams_4_list{list: &x.Keys} + return protoreflect.ValueOfList(value) + case "oracle.v1.MsgLegacyGovUpdateParams.changes": + if x.Changes == nil { + x.Changes = new(Params) + } + return protoreflect.ValueOfMessage(x.Changes.ProtoReflect()) + case "oracle.v1.MsgLegacyGovUpdateParams.authority": + panic(fmt.Errorf("field authority of message oracle.v1.MsgLegacyGovUpdateParams is not mutable")) + case "oracle.v1.MsgLegacyGovUpdateParams.title": + panic(fmt.Errorf("field title of message oracle.v1.MsgLegacyGovUpdateParams is not mutable")) + case "oracle.v1.MsgLegacyGovUpdateParams.description": + panic(fmt.Errorf("field description of message oracle.v1.MsgLegacyGovUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParams does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgLegacyGovUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgLegacyGovUpdateParams.authority": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgLegacyGovUpdateParams.title": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgLegacyGovUpdateParams.description": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgLegacyGovUpdateParams.keys": + list := []string{} + return protoreflect.ValueOfList(&_MsgLegacyGovUpdateParams_4_list{list: &list}) + case "oracle.v1.MsgLegacyGovUpdateParams.changes": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParams does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgLegacyGovUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgLegacyGovUpdateParams", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgLegacyGovUpdateParams) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLegacyGovUpdateParams) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgLegacyGovUpdateParams) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgLegacyGovUpdateParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgLegacyGovUpdateParams) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Keys) > 0 { + for _, s := range x.Keys { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Changes != nil { + l = options.Size(x.Changes) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgLegacyGovUpdateParams) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Changes != nil { + encoded, err := options.Marshal(x.Changes) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if len(x.Keys) > 0 { + for iNdEx := len(x.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Keys[iNdEx]) + copy(dAtA[i:], x.Keys[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keys[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x1a + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgLegacyGovUpdateParams) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLegacyGovUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLegacyGovUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Keys = append(x.Keys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Changes == nil { + x.Changes = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Changes); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgLegacyGovUpdateParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgLegacyGovUpdateParamsResponse = File_oracle_v1_tx_proto.Messages().ByName("MsgLegacyGovUpdateParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgLegacyGovUpdateParamsResponse)(nil) + +type fastReflection_MsgLegacyGovUpdateParamsResponse MsgLegacyGovUpdateParamsResponse + +func (x *MsgLegacyGovUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLegacyGovUpdateParamsResponse)(x) +} + +func (x *MsgLegacyGovUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgLegacyGovUpdateParamsResponse_messageType fastReflection_MsgLegacyGovUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgLegacyGovUpdateParamsResponse_messageType{} + +type fastReflection_MsgLegacyGovUpdateParamsResponse_messageType struct{} + +func (x fastReflection_MsgLegacyGovUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLegacyGovUpdateParamsResponse)(nil) +} +func (x fastReflection_MsgLegacyGovUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLegacyGovUpdateParamsResponse) +} +func (x fastReflection_MsgLegacyGovUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLegacyGovUpdateParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLegacyGovUpdateParamsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgLegacyGovUpdateParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgLegacyGovUpdateParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgLegacyGovUpdateParamsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParamsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgLegacyGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgLegacyGovUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgLegacyGovUpdateParamsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgLegacyGovUpdateParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgLegacyGovUpdateParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgLegacyGovUpdateParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgLegacyGovUpdateParamsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLegacyGovUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLegacyGovUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgGovUpdateParams protoreflect.MessageDescriptor + fd_MsgGovUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgGovUpdateParams_title protoreflect.FieldDescriptor + fd_MsgGovUpdateParams_description protoreflect.FieldDescriptor + fd_MsgGovUpdateParams_plan protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgGovUpdateParams = File_oracle_v1_tx_proto.Messages().ByName("MsgGovUpdateParams") + fd_MsgGovUpdateParams_authority = md_MsgGovUpdateParams.Fields().ByName("authority") + fd_MsgGovUpdateParams_title = md_MsgGovUpdateParams.Fields().ByName("title") + fd_MsgGovUpdateParams_description = md_MsgGovUpdateParams.Fields().ByName("description") + fd_MsgGovUpdateParams_plan = md_MsgGovUpdateParams.Fields().ByName("plan") +} + +var _ protoreflect.Message = (*fastReflection_MsgGovUpdateParams)(nil) + +type fastReflection_MsgGovUpdateParams MsgGovUpdateParams + +func (x *MsgGovUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgGovUpdateParams)(x) +} + +func (x *MsgGovUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgGovUpdateParams_messageType fastReflection_MsgGovUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgGovUpdateParams_messageType{} + +type fastReflection_MsgGovUpdateParams_messageType struct{} + +func (x fastReflection_MsgGovUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgGovUpdateParams)(nil) +} +func (x fastReflection_MsgGovUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgGovUpdateParams) +} +func (x fastReflection_MsgGovUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovUpdateParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgGovUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovUpdateParams +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgGovUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgGovUpdateParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgGovUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgGovUpdateParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgGovUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgGovUpdateParams)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgGovUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgGovUpdateParams_authority, value) { + return + } + } + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_MsgGovUpdateParams_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_MsgGovUpdateParams_description, value) { + return + } + } + if x.Plan != nil { + value := protoreflect.ValueOfMessage(x.Plan.ProtoReflect()) + if !f(fd_MsgGovUpdateParams_plan, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgGovUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.MsgGovUpdateParams.authority": + return x.Authority != "" + case "oracle.v1.MsgGovUpdateParams.title": + return x.Title != "" + case "oracle.v1.MsgGovUpdateParams.description": + return x.Description != "" + case "oracle.v1.MsgGovUpdateParams.plan": + return x.Plan != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovUpdateParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.MsgGovUpdateParams.authority": + x.Authority = "" + case "oracle.v1.MsgGovUpdateParams.title": + x.Title = "" + case "oracle.v1.MsgGovUpdateParams.description": + x.Description = "" + case "oracle.v1.MsgGovUpdateParams.plan": + x.Plan = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgGovUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.MsgGovUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovUpdateParams.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovUpdateParams.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovUpdateParams.plan": + value := x.Plan + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParams does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.MsgGovUpdateParams.authority": + x.Authority = value.Interface().(string) + case "oracle.v1.MsgGovUpdateParams.title": + x.Title = value.Interface().(string) + case "oracle.v1.MsgGovUpdateParams.description": + x.Description = value.Interface().(string) + case "oracle.v1.MsgGovUpdateParams.plan": + x.Plan = value.Message().Interface().(*ParamUpdatePlan) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgGovUpdateParams.plan": + if x.Plan == nil { + x.Plan = new(ParamUpdatePlan) + } + return protoreflect.ValueOfMessage(x.Plan.ProtoReflect()) + case "oracle.v1.MsgGovUpdateParams.authority": + panic(fmt.Errorf("field authority of message oracle.v1.MsgGovUpdateParams is not mutable")) + case "oracle.v1.MsgGovUpdateParams.title": + panic(fmt.Errorf("field title of message oracle.v1.MsgGovUpdateParams is not mutable")) + case "oracle.v1.MsgGovUpdateParams.description": + panic(fmt.Errorf("field description of message oracle.v1.MsgGovUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParams does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgGovUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgGovUpdateParams.authority": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovUpdateParams.title": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovUpdateParams.description": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovUpdateParams.plan": + m := new(ParamUpdatePlan) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParams")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParams does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgGovUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgGovUpdateParams", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgGovUpdateParams) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovUpdateParams) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgGovUpdateParams) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgGovUpdateParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgGovUpdateParams) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Plan != nil { + l = options.Size(x.Plan) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgGovUpdateParams) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Plan != nil { + encoded, err := options.Marshal(x.Plan) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x1a + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgGovUpdateParams) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Plan == nil { + x.Plan = &ParamUpdatePlan{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Plan); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgGovUpdateParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgGovUpdateParamsResponse = File_oracle_v1_tx_proto.Messages().ByName("MsgGovUpdateParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgGovUpdateParamsResponse)(nil) + +type fastReflection_MsgGovUpdateParamsResponse MsgGovUpdateParamsResponse + +func (x *MsgGovUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgGovUpdateParamsResponse)(x) +} + +func (x *MsgGovUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgGovUpdateParamsResponse_messageType fastReflection_MsgGovUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgGovUpdateParamsResponse_messageType{} + +type fastReflection_MsgGovUpdateParamsResponse_messageType struct{} + +func (x fastReflection_MsgGovUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgGovUpdateParamsResponse)(nil) +} +func (x fastReflection_MsgGovUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgGovUpdateParamsResponse) +} +func (x fastReflection_MsgGovUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovUpdateParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgGovUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovUpdateParamsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgGovUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgGovUpdateParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgGovUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgGovUpdateParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgGovUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgGovUpdateParamsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgGovUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgGovUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgGovUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParamsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgGovUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovUpdateParamsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgGovUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgGovUpdateParamsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgGovUpdateParamsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgGovUpdateParamsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgGovUpdateParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgGovUpdateParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgGovUpdateParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgGovUpdateParamsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgGovAddDenoms_5_list)(nil) + +type _MsgGovAddDenoms_5_list struct { + list *[]*Denom +} + +func (x *_MsgGovAddDenoms_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgGovAddDenoms_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgGovAddDenoms_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Denom) + (*x.list)[i] = concreteValue +} + +func (x *_MsgGovAddDenoms_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Denom) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgGovAddDenoms_5_list) AppendMutable() protoreflect.Value { + v := new(Denom) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgGovAddDenoms_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgGovAddDenoms_5_list) NewElement() protoreflect.Value { + v := new(Denom) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgGovAddDenoms_5_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_MsgGovAddDenoms_8_list)(nil) + +type _MsgGovAddDenoms_8_list struct { + list *[]*CurrencyPairProviders +} + +func (x *_MsgGovAddDenoms_8_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgGovAddDenoms_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgGovAddDenoms_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyPairProviders) + (*x.list)[i] = concreteValue +} + +func (x *_MsgGovAddDenoms_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyPairProviders) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgGovAddDenoms_8_list) AppendMutable() protoreflect.Value { + v := new(CurrencyPairProviders) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgGovAddDenoms_8_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgGovAddDenoms_8_list) NewElement() protoreflect.Value { + v := new(CurrencyPairProviders) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgGovAddDenoms_8_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_MsgGovAddDenoms_9_list)(nil) + +type _MsgGovAddDenoms_9_list struct { + list *[]*CurrencyDeviationThreshold +} + +func (x *_MsgGovAddDenoms_9_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgGovAddDenoms_9_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgGovAddDenoms_9_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyDeviationThreshold) + (*x.list)[i] = concreteValue +} + +func (x *_MsgGovAddDenoms_9_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyDeviationThreshold) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgGovAddDenoms_9_list) AppendMutable() protoreflect.Value { + v := new(CurrencyDeviationThreshold) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgGovAddDenoms_9_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgGovAddDenoms_9_list) NewElement() protoreflect.Value { + v := new(CurrencyDeviationThreshold) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgGovAddDenoms_9_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgGovAddDenoms protoreflect.MessageDescriptor + fd_MsgGovAddDenoms_authority protoreflect.FieldDescriptor + fd_MsgGovAddDenoms_title protoreflect.FieldDescriptor + fd_MsgGovAddDenoms_description protoreflect.FieldDescriptor + fd_MsgGovAddDenoms_height protoreflect.FieldDescriptor + fd_MsgGovAddDenoms_denom_list protoreflect.FieldDescriptor + fd_MsgGovAddDenoms_mandatory protoreflect.FieldDescriptor + fd_MsgGovAddDenoms_reward_band protoreflect.FieldDescriptor + fd_MsgGovAddDenoms_currency_pair_providers protoreflect.FieldDescriptor + fd_MsgGovAddDenoms_currency_deviation_thresholds protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgGovAddDenoms = File_oracle_v1_tx_proto.Messages().ByName("MsgGovAddDenoms") + fd_MsgGovAddDenoms_authority = md_MsgGovAddDenoms.Fields().ByName("authority") + fd_MsgGovAddDenoms_title = md_MsgGovAddDenoms.Fields().ByName("title") + fd_MsgGovAddDenoms_description = md_MsgGovAddDenoms.Fields().ByName("description") + fd_MsgGovAddDenoms_height = md_MsgGovAddDenoms.Fields().ByName("height") + fd_MsgGovAddDenoms_denom_list = md_MsgGovAddDenoms.Fields().ByName("denom_list") + fd_MsgGovAddDenoms_mandatory = md_MsgGovAddDenoms.Fields().ByName("mandatory") + fd_MsgGovAddDenoms_reward_band = md_MsgGovAddDenoms.Fields().ByName("reward_band") + fd_MsgGovAddDenoms_currency_pair_providers = md_MsgGovAddDenoms.Fields().ByName("currency_pair_providers") + fd_MsgGovAddDenoms_currency_deviation_thresholds = md_MsgGovAddDenoms.Fields().ByName("currency_deviation_thresholds") +} + +var _ protoreflect.Message = (*fastReflection_MsgGovAddDenoms)(nil) + +type fastReflection_MsgGovAddDenoms MsgGovAddDenoms + +func (x *MsgGovAddDenoms) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgGovAddDenoms)(x) +} + +func (x *MsgGovAddDenoms) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgGovAddDenoms_messageType fastReflection_MsgGovAddDenoms_messageType +var _ protoreflect.MessageType = fastReflection_MsgGovAddDenoms_messageType{} + +type fastReflection_MsgGovAddDenoms_messageType struct{} + +func (x fastReflection_MsgGovAddDenoms_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgGovAddDenoms)(nil) +} +func (x fastReflection_MsgGovAddDenoms_messageType) New() protoreflect.Message { + return new(fastReflection_MsgGovAddDenoms) +} +func (x fastReflection_MsgGovAddDenoms_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovAddDenoms +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgGovAddDenoms) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovAddDenoms +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgGovAddDenoms) Type() protoreflect.MessageType { + return _fastReflection_MsgGovAddDenoms_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgGovAddDenoms) New() protoreflect.Message { + return new(fastReflection_MsgGovAddDenoms) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgGovAddDenoms) Interface() protoreflect.ProtoMessage { + return (*MsgGovAddDenoms)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgGovAddDenoms) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgGovAddDenoms_authority, value) { + return + } + } + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_MsgGovAddDenoms_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_MsgGovAddDenoms_description, value) { + return + } + } + if x.Height != int64(0) { + value := protoreflect.ValueOfInt64(x.Height) + if !f(fd_MsgGovAddDenoms_height, value) { + return + } + } + if len(x.DenomList) != 0 { + value := protoreflect.ValueOfList(&_MsgGovAddDenoms_5_list{list: &x.DenomList}) + if !f(fd_MsgGovAddDenoms_denom_list, value) { + return + } + } + if x.Mandatory != false { + value := protoreflect.ValueOfBool(x.Mandatory) + if !f(fd_MsgGovAddDenoms_mandatory, value) { + return + } + } + if x.RewardBand != "" { + value := protoreflect.ValueOfString(x.RewardBand) + if !f(fd_MsgGovAddDenoms_reward_band, value) { + return + } + } + if len(x.CurrencyPairProviders) != 0 { + value := protoreflect.ValueOfList(&_MsgGovAddDenoms_8_list{list: &x.CurrencyPairProviders}) + if !f(fd_MsgGovAddDenoms_currency_pair_providers, value) { + return + } + } + if len(x.CurrencyDeviationThresholds) != 0 { + value := protoreflect.ValueOfList(&_MsgGovAddDenoms_9_list{list: &x.CurrencyDeviationThresholds}) + if !f(fd_MsgGovAddDenoms_currency_deviation_thresholds, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgGovAddDenoms) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.MsgGovAddDenoms.authority": + return x.Authority != "" + case "oracle.v1.MsgGovAddDenoms.title": + return x.Title != "" + case "oracle.v1.MsgGovAddDenoms.description": + return x.Description != "" + case "oracle.v1.MsgGovAddDenoms.height": + return x.Height != int64(0) + case "oracle.v1.MsgGovAddDenoms.denom_list": + return len(x.DenomList) != 0 + case "oracle.v1.MsgGovAddDenoms.mandatory": + return x.Mandatory != false + case "oracle.v1.MsgGovAddDenoms.reward_band": + return x.RewardBand != "" + case "oracle.v1.MsgGovAddDenoms.currency_pair_providers": + return len(x.CurrencyPairProviders) != 0 + case "oracle.v1.MsgGovAddDenoms.currency_deviation_thresholds": + return len(x.CurrencyDeviationThresholds) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenoms")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenoms does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovAddDenoms) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.MsgGovAddDenoms.authority": + x.Authority = "" + case "oracle.v1.MsgGovAddDenoms.title": + x.Title = "" + case "oracle.v1.MsgGovAddDenoms.description": + x.Description = "" + case "oracle.v1.MsgGovAddDenoms.height": + x.Height = int64(0) + case "oracle.v1.MsgGovAddDenoms.denom_list": + x.DenomList = nil + case "oracle.v1.MsgGovAddDenoms.mandatory": + x.Mandatory = false + case "oracle.v1.MsgGovAddDenoms.reward_band": + x.RewardBand = "" + case "oracle.v1.MsgGovAddDenoms.currency_pair_providers": + x.CurrencyPairProviders = nil + case "oracle.v1.MsgGovAddDenoms.currency_deviation_thresholds": + x.CurrencyDeviationThresholds = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenoms")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenoms does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgGovAddDenoms) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.MsgGovAddDenoms.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovAddDenoms.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovAddDenoms.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovAddDenoms.height": + value := x.Height + return protoreflect.ValueOfInt64(value) + case "oracle.v1.MsgGovAddDenoms.denom_list": + if len(x.DenomList) == 0 { + return protoreflect.ValueOfList(&_MsgGovAddDenoms_5_list{}) + } + listValue := &_MsgGovAddDenoms_5_list{list: &x.DenomList} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.MsgGovAddDenoms.mandatory": + value := x.Mandatory + return protoreflect.ValueOfBool(value) + case "oracle.v1.MsgGovAddDenoms.reward_band": + value := x.RewardBand + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovAddDenoms.currency_pair_providers": + if len(x.CurrencyPairProviders) == 0 { + return protoreflect.ValueOfList(&_MsgGovAddDenoms_8_list{}) + } + listValue := &_MsgGovAddDenoms_8_list{list: &x.CurrencyPairProviders} + return protoreflect.ValueOfList(listValue) + case "oracle.v1.MsgGovAddDenoms.currency_deviation_thresholds": + if len(x.CurrencyDeviationThresholds) == 0 { + return protoreflect.ValueOfList(&_MsgGovAddDenoms_9_list{}) + } + listValue := &_MsgGovAddDenoms_9_list{list: &x.CurrencyDeviationThresholds} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenoms")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenoms does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovAddDenoms) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.MsgGovAddDenoms.authority": + x.Authority = value.Interface().(string) + case "oracle.v1.MsgGovAddDenoms.title": + x.Title = value.Interface().(string) + case "oracle.v1.MsgGovAddDenoms.description": + x.Description = value.Interface().(string) + case "oracle.v1.MsgGovAddDenoms.height": + x.Height = value.Int() + case "oracle.v1.MsgGovAddDenoms.denom_list": + lv := value.List() + clv := lv.(*_MsgGovAddDenoms_5_list) + x.DenomList = *clv.list + case "oracle.v1.MsgGovAddDenoms.mandatory": + x.Mandatory = value.Bool() + case "oracle.v1.MsgGovAddDenoms.reward_band": + x.RewardBand = value.Interface().(string) + case "oracle.v1.MsgGovAddDenoms.currency_pair_providers": + lv := value.List() + clv := lv.(*_MsgGovAddDenoms_8_list) + x.CurrencyPairProviders = *clv.list + case "oracle.v1.MsgGovAddDenoms.currency_deviation_thresholds": + lv := value.List() + clv := lv.(*_MsgGovAddDenoms_9_list) + x.CurrencyDeviationThresholds = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenoms")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenoms does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovAddDenoms) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgGovAddDenoms.denom_list": + if x.DenomList == nil { + x.DenomList = []*Denom{} + } + value := &_MsgGovAddDenoms_5_list{list: &x.DenomList} + return protoreflect.ValueOfList(value) + case "oracle.v1.MsgGovAddDenoms.currency_pair_providers": + if x.CurrencyPairProviders == nil { + x.CurrencyPairProviders = []*CurrencyPairProviders{} + } + value := &_MsgGovAddDenoms_8_list{list: &x.CurrencyPairProviders} + return protoreflect.ValueOfList(value) + case "oracle.v1.MsgGovAddDenoms.currency_deviation_thresholds": + if x.CurrencyDeviationThresholds == nil { + x.CurrencyDeviationThresholds = []*CurrencyDeviationThreshold{} + } + value := &_MsgGovAddDenoms_9_list{list: &x.CurrencyDeviationThresholds} + return protoreflect.ValueOfList(value) + case "oracle.v1.MsgGovAddDenoms.authority": + panic(fmt.Errorf("field authority of message oracle.v1.MsgGovAddDenoms is not mutable")) + case "oracle.v1.MsgGovAddDenoms.title": + panic(fmt.Errorf("field title of message oracle.v1.MsgGovAddDenoms is not mutable")) + case "oracle.v1.MsgGovAddDenoms.description": + panic(fmt.Errorf("field description of message oracle.v1.MsgGovAddDenoms is not mutable")) + case "oracle.v1.MsgGovAddDenoms.height": + panic(fmt.Errorf("field height of message oracle.v1.MsgGovAddDenoms is not mutable")) + case "oracle.v1.MsgGovAddDenoms.mandatory": + panic(fmt.Errorf("field mandatory of message oracle.v1.MsgGovAddDenoms is not mutable")) + case "oracle.v1.MsgGovAddDenoms.reward_band": + panic(fmt.Errorf("field reward_band of message oracle.v1.MsgGovAddDenoms is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenoms")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenoms does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgGovAddDenoms) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgGovAddDenoms.authority": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovAddDenoms.title": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovAddDenoms.description": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovAddDenoms.height": + return protoreflect.ValueOfInt64(int64(0)) + case "oracle.v1.MsgGovAddDenoms.denom_list": + list := []*Denom{} + return protoreflect.ValueOfList(&_MsgGovAddDenoms_5_list{list: &list}) + case "oracle.v1.MsgGovAddDenoms.mandatory": + return protoreflect.ValueOfBool(false) + case "oracle.v1.MsgGovAddDenoms.reward_band": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovAddDenoms.currency_pair_providers": + list := []*CurrencyPairProviders{} + return protoreflect.ValueOfList(&_MsgGovAddDenoms_8_list{list: &list}) + case "oracle.v1.MsgGovAddDenoms.currency_deviation_thresholds": + list := []*CurrencyDeviationThreshold{} + return protoreflect.ValueOfList(&_MsgGovAddDenoms_9_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenoms")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenoms does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgGovAddDenoms) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgGovAddDenoms", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgGovAddDenoms) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovAddDenoms) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgGovAddDenoms) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgGovAddDenoms) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgGovAddDenoms) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Height != 0 { + n += 1 + runtime.Sov(uint64(x.Height)) + } + if len(x.DenomList) > 0 { + for _, e := range x.DenomList { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Mandatory { + n += 2 + } + l = len(x.RewardBand) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.CurrencyPairProviders) > 0 { + for _, e := range x.CurrencyPairProviders { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.CurrencyDeviationThresholds) > 0 { + for _, e := range x.CurrencyDeviationThresholds { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgGovAddDenoms) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.CurrencyDeviationThresholds) > 0 { + for iNdEx := len(x.CurrencyDeviationThresholds) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.CurrencyDeviationThresholds[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x4a + } + } + if len(x.CurrencyPairProviders) > 0 { + for iNdEx := len(x.CurrencyPairProviders) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.CurrencyPairProviders[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x42 + } + } + if len(x.RewardBand) > 0 { + i -= len(x.RewardBand) + copy(dAtA[i:], x.RewardBand) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardBand))) + i-- + dAtA[i] = 0x3a + } + if x.Mandatory { + i-- + if x.Mandatory { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if len(x.DenomList) > 0 { + for iNdEx := len(x.DenomList) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.DenomList[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + } + if x.Height != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) + i-- + dAtA[i] = 0x20 + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x1a + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgGovAddDenoms) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovAddDenoms: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovAddDenoms: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + x.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DenomList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DenomList = append(x.DenomList, &Denom{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DenomList[len(x.DenomList)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Mandatory", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Mandatory = bool(v != 0) + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardBand", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RewardBand = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrencyPairProviders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CurrencyPairProviders = append(x.CurrencyPairProviders, &CurrencyPairProviders{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CurrencyPairProviders[len(x.CurrencyPairProviders)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrencyDeviationThresholds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CurrencyDeviationThresholds = append(x.CurrencyDeviationThresholds, &CurrencyDeviationThreshold{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CurrencyDeviationThresholds[len(x.CurrencyDeviationThresholds)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgGovAddDenomsResponse protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgGovAddDenomsResponse = File_oracle_v1_tx_proto.Messages().ByName("MsgGovAddDenomsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgGovAddDenomsResponse)(nil) + +type fastReflection_MsgGovAddDenomsResponse MsgGovAddDenomsResponse + +func (x *MsgGovAddDenomsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgGovAddDenomsResponse)(x) +} + +func (x *MsgGovAddDenomsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgGovAddDenomsResponse_messageType fastReflection_MsgGovAddDenomsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgGovAddDenomsResponse_messageType{} + +type fastReflection_MsgGovAddDenomsResponse_messageType struct{} + +func (x fastReflection_MsgGovAddDenomsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgGovAddDenomsResponse)(nil) +} +func (x fastReflection_MsgGovAddDenomsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgGovAddDenomsResponse) +} +func (x fastReflection_MsgGovAddDenomsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovAddDenomsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgGovAddDenomsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovAddDenomsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgGovAddDenomsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgGovAddDenomsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgGovAddDenomsResponse) New() protoreflect.Message { + return new(fastReflection_MsgGovAddDenomsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgGovAddDenomsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgGovAddDenomsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgGovAddDenomsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgGovAddDenomsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenomsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenomsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovAddDenomsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenomsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenomsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgGovAddDenomsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenomsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenomsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovAddDenomsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenomsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenomsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovAddDenomsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenomsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenomsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgGovAddDenomsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovAddDenomsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovAddDenomsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgGovAddDenomsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgGovAddDenomsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgGovAddDenomsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovAddDenomsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgGovAddDenomsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgGovAddDenomsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgGovAddDenomsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgGovAddDenomsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgGovAddDenomsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovAddDenomsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovAddDenomsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgGovRemoveCurrencyPairProviders_5_list)(nil) + +type _MsgGovRemoveCurrencyPairProviders_5_list struct { + list *[]*CurrencyPairProviders +} + +func (x *_MsgGovRemoveCurrencyPairProviders_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgGovRemoveCurrencyPairProviders_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgGovRemoveCurrencyPairProviders_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyPairProviders) + (*x.list)[i] = concreteValue +} + +func (x *_MsgGovRemoveCurrencyPairProviders_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyPairProviders) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgGovRemoveCurrencyPairProviders_5_list) AppendMutable() protoreflect.Value { + v := new(CurrencyPairProviders) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgGovRemoveCurrencyPairProviders_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgGovRemoveCurrencyPairProviders_5_list) NewElement() protoreflect.Value { + v := new(CurrencyPairProviders) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgGovRemoveCurrencyPairProviders_5_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgGovRemoveCurrencyPairProviders protoreflect.MessageDescriptor + fd_MsgGovRemoveCurrencyPairProviders_authority protoreflect.FieldDescriptor + fd_MsgGovRemoveCurrencyPairProviders_title protoreflect.FieldDescriptor + fd_MsgGovRemoveCurrencyPairProviders_description protoreflect.FieldDescriptor + fd_MsgGovRemoveCurrencyPairProviders_height protoreflect.FieldDescriptor + fd_MsgGovRemoveCurrencyPairProviders_currency_pair_providers protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgGovRemoveCurrencyPairProviders = File_oracle_v1_tx_proto.Messages().ByName("MsgGovRemoveCurrencyPairProviders") + fd_MsgGovRemoveCurrencyPairProviders_authority = md_MsgGovRemoveCurrencyPairProviders.Fields().ByName("authority") + fd_MsgGovRemoveCurrencyPairProviders_title = md_MsgGovRemoveCurrencyPairProviders.Fields().ByName("title") + fd_MsgGovRemoveCurrencyPairProviders_description = md_MsgGovRemoveCurrencyPairProviders.Fields().ByName("description") + fd_MsgGovRemoveCurrencyPairProviders_height = md_MsgGovRemoveCurrencyPairProviders.Fields().ByName("height") + fd_MsgGovRemoveCurrencyPairProviders_currency_pair_providers = md_MsgGovRemoveCurrencyPairProviders.Fields().ByName("currency_pair_providers") +} + +var _ protoreflect.Message = (*fastReflection_MsgGovRemoveCurrencyPairProviders)(nil) + +type fastReflection_MsgGovRemoveCurrencyPairProviders MsgGovRemoveCurrencyPairProviders + +func (x *MsgGovRemoveCurrencyPairProviders) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgGovRemoveCurrencyPairProviders)(x) +} + +func (x *MsgGovRemoveCurrencyPairProviders) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgGovRemoveCurrencyPairProviders_messageType fastReflection_MsgGovRemoveCurrencyPairProviders_messageType +var _ protoreflect.MessageType = fastReflection_MsgGovRemoveCurrencyPairProviders_messageType{} + +type fastReflection_MsgGovRemoveCurrencyPairProviders_messageType struct{} + +func (x fastReflection_MsgGovRemoveCurrencyPairProviders_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgGovRemoveCurrencyPairProviders)(nil) +} +func (x fastReflection_MsgGovRemoveCurrencyPairProviders_messageType) New() protoreflect.Message { + return new(fastReflection_MsgGovRemoveCurrencyPairProviders) +} +func (x fastReflection_MsgGovRemoveCurrencyPairProviders_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovRemoveCurrencyPairProviders +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovRemoveCurrencyPairProviders +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) Type() protoreflect.MessageType { + return _fastReflection_MsgGovRemoveCurrencyPairProviders_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) New() protoreflect.Message { + return new(fastReflection_MsgGovRemoveCurrencyPairProviders) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) Interface() protoreflect.ProtoMessage { + return (*MsgGovRemoveCurrencyPairProviders)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgGovRemoveCurrencyPairProviders_authority, value) { + return + } + } + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_MsgGovRemoveCurrencyPairProviders_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_MsgGovRemoveCurrencyPairProviders_description, value) { + return + } + } + if x.Height != int64(0) { + value := protoreflect.ValueOfInt64(x.Height) + if !f(fd_MsgGovRemoveCurrencyPairProviders_height, value) { + return + } + } + if len(x.CurrencyPairProviders) != 0 { + value := protoreflect.ValueOfList(&_MsgGovRemoveCurrencyPairProviders_5_list{list: &x.CurrencyPairProviders}) + if !f(fd_MsgGovRemoveCurrencyPairProviders_currency_pair_providers, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.authority": + return x.Authority != "" + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.title": + return x.Title != "" + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.description": + return x.Description != "" + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.height": + return x.Height != int64(0) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.currency_pair_providers": + return len(x.CurrencyPairProviders) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProviders does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.authority": + x.Authority = "" + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.title": + x.Title = "" + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.description": + x.Description = "" + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.height": + x.Height = int64(0) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.currency_pair_providers": + x.CurrencyPairProviders = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProviders does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.height": + value := x.Height + return protoreflect.ValueOfInt64(value) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.currency_pair_providers": + if len(x.CurrencyPairProviders) == 0 { + return protoreflect.ValueOfList(&_MsgGovRemoveCurrencyPairProviders_5_list{}) + } + listValue := &_MsgGovRemoveCurrencyPairProviders_5_list{list: &x.CurrencyPairProviders} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProviders does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.authority": + x.Authority = value.Interface().(string) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.title": + x.Title = value.Interface().(string) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.description": + x.Description = value.Interface().(string) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.height": + x.Height = value.Int() + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.currency_pair_providers": + lv := value.List() + clv := lv.(*_MsgGovRemoveCurrencyPairProviders_5_list) + x.CurrencyPairProviders = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProviders does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.currency_pair_providers": + if x.CurrencyPairProviders == nil { + x.CurrencyPairProviders = []*CurrencyPairProviders{} + } + value := &_MsgGovRemoveCurrencyPairProviders_5_list{list: &x.CurrencyPairProviders} + return protoreflect.ValueOfList(value) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.authority": + panic(fmt.Errorf("field authority of message oracle.v1.MsgGovRemoveCurrencyPairProviders is not mutable")) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.title": + panic(fmt.Errorf("field title of message oracle.v1.MsgGovRemoveCurrencyPairProviders is not mutable")) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.description": + panic(fmt.Errorf("field description of message oracle.v1.MsgGovRemoveCurrencyPairProviders is not mutable")) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.height": + panic(fmt.Errorf("field height of message oracle.v1.MsgGovRemoveCurrencyPairProviders is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProviders does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.authority": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.title": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.description": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.height": + return protoreflect.ValueOfInt64(int64(0)) + case "oracle.v1.MsgGovRemoveCurrencyPairProviders.currency_pair_providers": + list := []*CurrencyPairProviders{} + return protoreflect.ValueOfList(&_MsgGovRemoveCurrencyPairProviders_5_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProviders")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProviders does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgGovRemoveCurrencyPairProviders", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgGovRemoveCurrencyPairProviders) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgGovRemoveCurrencyPairProviders) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Height != 0 { + n += 1 + runtime.Sov(uint64(x.Height)) + } + if len(x.CurrencyPairProviders) > 0 { + for _, e := range x.CurrencyPairProviders { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgGovRemoveCurrencyPairProviders) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.CurrencyPairProviders) > 0 { + for iNdEx := len(x.CurrencyPairProviders) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.CurrencyPairProviders[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + } + if x.Height != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) + i-- + dAtA[i] = 0x20 + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x1a + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgGovRemoveCurrencyPairProviders) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovRemoveCurrencyPairProviders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovRemoveCurrencyPairProviders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + x.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrencyPairProviders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CurrencyPairProviders = append(x.CurrencyPairProviders, &CurrencyPairProviders{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CurrencyPairProviders[len(x.CurrencyPairProviders)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgGovRemoveCurrencyPairProvidersResponse protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgGovRemoveCurrencyPairProvidersResponse = File_oracle_v1_tx_proto.Messages().ByName("MsgGovRemoveCurrencyPairProvidersResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgGovRemoveCurrencyPairProvidersResponse)(nil) + +type fastReflection_MsgGovRemoveCurrencyPairProvidersResponse MsgGovRemoveCurrencyPairProvidersResponse + +func (x *MsgGovRemoveCurrencyPairProvidersResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgGovRemoveCurrencyPairProvidersResponse)(x) +} + +func (x *MsgGovRemoveCurrencyPairProvidersResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgGovRemoveCurrencyPairProvidersResponse_messageType fastReflection_MsgGovRemoveCurrencyPairProvidersResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgGovRemoveCurrencyPairProvidersResponse_messageType{} + +type fastReflection_MsgGovRemoveCurrencyPairProvidersResponse_messageType struct{} + +func (x fastReflection_MsgGovRemoveCurrencyPairProvidersResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgGovRemoveCurrencyPairProvidersResponse)(nil) +} +func (x fastReflection_MsgGovRemoveCurrencyPairProvidersResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) +} +func (x fastReflection_MsgGovRemoveCurrencyPairProvidersResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovRemoveCurrencyPairProvidersResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovRemoveCurrencyPairProvidersResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgGovRemoveCurrencyPairProvidersResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) New() protoreflect.Message { + return new(fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) Interface() protoreflect.ProtoMessage { + return (*MsgGovRemoveCurrencyPairProvidersResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgGovRemoveCurrencyPairProvidersResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgGovRemoveCurrencyPairProvidersResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgGovRemoveCurrencyPairProvidersResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgGovRemoveCurrencyPairProvidersResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovRemoveCurrencyPairProvidersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovRemoveCurrencyPairProvidersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgGovRemoveCurrencyDeviationThresholds_5_list)(nil) + +type _MsgGovRemoveCurrencyDeviationThresholds_5_list struct { + list *[]string +} + +func (x *_MsgGovRemoveCurrencyDeviationThresholds_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgGovRemoveCurrencyDeviationThresholds_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgGovRemoveCurrencyDeviationThresholds_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgGovRemoveCurrencyDeviationThresholds_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgGovRemoveCurrencyDeviationThresholds_5_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgGovRemoveCurrencyDeviationThresholds at list field Currencies as it is not of Message kind")) +} + +func (x *_MsgGovRemoveCurrencyDeviationThresholds_5_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgGovRemoveCurrencyDeviationThresholds_5_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgGovRemoveCurrencyDeviationThresholds_5_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgGovRemoveCurrencyDeviationThresholds protoreflect.MessageDescriptor + fd_MsgGovRemoveCurrencyDeviationThresholds_authority protoreflect.FieldDescriptor + fd_MsgGovRemoveCurrencyDeviationThresholds_title protoreflect.FieldDescriptor + fd_MsgGovRemoveCurrencyDeviationThresholds_description protoreflect.FieldDescriptor + fd_MsgGovRemoveCurrencyDeviationThresholds_height protoreflect.FieldDescriptor + fd_MsgGovRemoveCurrencyDeviationThresholds_currencies protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgGovRemoveCurrencyDeviationThresholds = File_oracle_v1_tx_proto.Messages().ByName("MsgGovRemoveCurrencyDeviationThresholds") + fd_MsgGovRemoveCurrencyDeviationThresholds_authority = md_MsgGovRemoveCurrencyDeviationThresholds.Fields().ByName("authority") + fd_MsgGovRemoveCurrencyDeviationThresholds_title = md_MsgGovRemoveCurrencyDeviationThresholds.Fields().ByName("title") + fd_MsgGovRemoveCurrencyDeviationThresholds_description = md_MsgGovRemoveCurrencyDeviationThresholds.Fields().ByName("description") + fd_MsgGovRemoveCurrencyDeviationThresholds_height = md_MsgGovRemoveCurrencyDeviationThresholds.Fields().ByName("height") + fd_MsgGovRemoveCurrencyDeviationThresholds_currencies = md_MsgGovRemoveCurrencyDeviationThresholds.Fields().ByName("currencies") +} + +var _ protoreflect.Message = (*fastReflection_MsgGovRemoveCurrencyDeviationThresholds)(nil) + +type fastReflection_MsgGovRemoveCurrencyDeviationThresholds MsgGovRemoveCurrencyDeviationThresholds + +func (x *MsgGovRemoveCurrencyDeviationThresholds) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgGovRemoveCurrencyDeviationThresholds)(x) +} + +func (x *MsgGovRemoveCurrencyDeviationThresholds) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgGovRemoveCurrencyDeviationThresholds_messageType fastReflection_MsgGovRemoveCurrencyDeviationThresholds_messageType +var _ protoreflect.MessageType = fastReflection_MsgGovRemoveCurrencyDeviationThresholds_messageType{} + +type fastReflection_MsgGovRemoveCurrencyDeviationThresholds_messageType struct{} + +func (x fastReflection_MsgGovRemoveCurrencyDeviationThresholds_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgGovRemoveCurrencyDeviationThresholds)(nil) +} +func (x fastReflection_MsgGovRemoveCurrencyDeviationThresholds_messageType) New() protoreflect.Message { + return new(fastReflection_MsgGovRemoveCurrencyDeviationThresholds) +} +func (x fastReflection_MsgGovRemoveCurrencyDeviationThresholds_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovRemoveCurrencyDeviationThresholds +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovRemoveCurrencyDeviationThresholds +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) Type() protoreflect.MessageType { + return _fastReflection_MsgGovRemoveCurrencyDeviationThresholds_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) New() protoreflect.Message { + return new(fastReflection_MsgGovRemoveCurrencyDeviationThresholds) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) Interface() protoreflect.ProtoMessage { + return (*MsgGovRemoveCurrencyDeviationThresholds)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgGovRemoveCurrencyDeviationThresholds_authority, value) { + return + } + } + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_MsgGovRemoveCurrencyDeviationThresholds_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_MsgGovRemoveCurrencyDeviationThresholds_description, value) { + return + } + } + if x.Height != int64(0) { + value := protoreflect.ValueOfInt64(x.Height) + if !f(fd_MsgGovRemoveCurrencyDeviationThresholds_height, value) { + return + } + } + if len(x.Currencies) != 0 { + value := protoreflect.ValueOfList(&_MsgGovRemoveCurrencyDeviationThresholds_5_list{list: &x.Currencies}) + if !f(fd_MsgGovRemoveCurrencyDeviationThresholds_currencies, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.authority": + return x.Authority != "" + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.title": + return x.Title != "" + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.description": + return x.Description != "" + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.height": + return x.Height != int64(0) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.currencies": + return len(x.Currencies) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholds")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholds does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.authority": + x.Authority = "" + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.title": + x.Title = "" + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.description": + x.Description = "" + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.height": + x.Height = int64(0) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.currencies": + x.Currencies = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholds")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholds does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.height": + value := x.Height + return protoreflect.ValueOfInt64(value) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.currencies": + if len(x.Currencies) == 0 { + return protoreflect.ValueOfList(&_MsgGovRemoveCurrencyDeviationThresholds_5_list{}) + } + listValue := &_MsgGovRemoveCurrencyDeviationThresholds_5_list{list: &x.Currencies} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholds")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholds does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.authority": + x.Authority = value.Interface().(string) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.title": + x.Title = value.Interface().(string) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.description": + x.Description = value.Interface().(string) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.height": + x.Height = value.Int() + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.currencies": + lv := value.List() + clv := lv.(*_MsgGovRemoveCurrencyDeviationThresholds_5_list) + x.Currencies = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholds")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholds does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.currencies": + if x.Currencies == nil { + x.Currencies = []string{} + } + value := &_MsgGovRemoveCurrencyDeviationThresholds_5_list{list: &x.Currencies} + return protoreflect.ValueOfList(value) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.authority": + panic(fmt.Errorf("field authority of message oracle.v1.MsgGovRemoveCurrencyDeviationThresholds is not mutable")) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.title": + panic(fmt.Errorf("field title of message oracle.v1.MsgGovRemoveCurrencyDeviationThresholds is not mutable")) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.description": + panic(fmt.Errorf("field description of message oracle.v1.MsgGovRemoveCurrencyDeviationThresholds is not mutable")) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.height": + panic(fmt.Errorf("field height of message oracle.v1.MsgGovRemoveCurrencyDeviationThresholds is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholds")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholds does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.authority": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.title": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.description": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.height": + return protoreflect.ValueOfInt64(int64(0)) + case "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds.currencies": + list := []string{} + return protoreflect.ValueOfList(&_MsgGovRemoveCurrencyDeviationThresholds_5_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholds")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholds does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgGovRemoveCurrencyDeviationThresholds", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholds) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgGovRemoveCurrencyDeviationThresholds) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Height != 0 { + n += 1 + runtime.Sov(uint64(x.Height)) + } + if len(x.Currencies) > 0 { + for _, s := range x.Currencies { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgGovRemoveCurrencyDeviationThresholds) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Currencies) > 0 { + for iNdEx := len(x.Currencies) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Currencies[iNdEx]) + copy(dAtA[i:], x.Currencies[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Currencies[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if x.Height != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) + i-- + dAtA[i] = 0x20 + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x1a + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgGovRemoveCurrencyDeviationThresholds) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovRemoveCurrencyDeviationThresholds: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovRemoveCurrencyDeviationThresholds: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + x.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Currencies", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Currencies = append(x.Currencies, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgGovRemoveCurrencyDeviationThresholdsResponse protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgGovRemoveCurrencyDeviationThresholdsResponse = File_oracle_v1_tx_proto.Messages().ByName("MsgGovRemoveCurrencyDeviationThresholdsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse)(nil) + +type fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse MsgGovRemoveCurrencyDeviationThresholdsResponse + +func (x *MsgGovRemoveCurrencyDeviationThresholdsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse)(x) +} + +func (x *MsgGovRemoveCurrencyDeviationThresholdsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse_messageType fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse_messageType{} + +type fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse_messageType struct{} + +func (x fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse)(nil) +} +func (x fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) +} +func (x fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovRemoveCurrencyDeviationThresholdsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovRemoveCurrencyDeviationThresholdsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) New() protoreflect.Message { + return new(fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgGovRemoveCurrencyDeviationThresholdsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgGovRemoveCurrencyDeviationThresholdsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgGovRemoveCurrencyDeviationThresholdsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgGovRemoveCurrencyDeviationThresholdsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgGovRemoveCurrencyDeviationThresholdsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovRemoveCurrencyDeviationThresholdsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovRemoveCurrencyDeviationThresholdsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgGovCancelUpdateParamPlan protoreflect.MessageDescriptor + fd_MsgGovCancelUpdateParamPlan_authority protoreflect.FieldDescriptor + fd_MsgGovCancelUpdateParamPlan_title protoreflect.FieldDescriptor + fd_MsgGovCancelUpdateParamPlan_description protoreflect.FieldDescriptor + fd_MsgGovCancelUpdateParamPlan_height protoreflect.FieldDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgGovCancelUpdateParamPlan = File_oracle_v1_tx_proto.Messages().ByName("MsgGovCancelUpdateParamPlan") + fd_MsgGovCancelUpdateParamPlan_authority = md_MsgGovCancelUpdateParamPlan.Fields().ByName("authority") + fd_MsgGovCancelUpdateParamPlan_title = md_MsgGovCancelUpdateParamPlan.Fields().ByName("title") + fd_MsgGovCancelUpdateParamPlan_description = md_MsgGovCancelUpdateParamPlan.Fields().ByName("description") + fd_MsgGovCancelUpdateParamPlan_height = md_MsgGovCancelUpdateParamPlan.Fields().ByName("height") +} + +var _ protoreflect.Message = (*fastReflection_MsgGovCancelUpdateParamPlan)(nil) + +type fastReflection_MsgGovCancelUpdateParamPlan MsgGovCancelUpdateParamPlan + +func (x *MsgGovCancelUpdateParamPlan) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgGovCancelUpdateParamPlan)(x) +} + +func (x *MsgGovCancelUpdateParamPlan) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgGovCancelUpdateParamPlan_messageType fastReflection_MsgGovCancelUpdateParamPlan_messageType +var _ protoreflect.MessageType = fastReflection_MsgGovCancelUpdateParamPlan_messageType{} + +type fastReflection_MsgGovCancelUpdateParamPlan_messageType struct{} + +func (x fastReflection_MsgGovCancelUpdateParamPlan_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgGovCancelUpdateParamPlan)(nil) +} +func (x fastReflection_MsgGovCancelUpdateParamPlan_messageType) New() protoreflect.Message { + return new(fastReflection_MsgGovCancelUpdateParamPlan) +} +func (x fastReflection_MsgGovCancelUpdateParamPlan_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovCancelUpdateParamPlan +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovCancelUpdateParamPlan +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) Type() protoreflect.MessageType { + return _fastReflection_MsgGovCancelUpdateParamPlan_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) New() protoreflect.Message { + return new(fastReflection_MsgGovCancelUpdateParamPlan) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) Interface() protoreflect.ProtoMessage { + return (*MsgGovCancelUpdateParamPlan)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgGovCancelUpdateParamPlan_authority, value) { + return + } + } + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_MsgGovCancelUpdateParamPlan_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_MsgGovCancelUpdateParamPlan_description, value) { + return + } + } + if x.Height != int64(0) { + value := protoreflect.ValueOfInt64(x.Height) + if !f(fd_MsgGovCancelUpdateParamPlan_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "oracle.v1.MsgGovCancelUpdateParamPlan.authority": + return x.Authority != "" + case "oracle.v1.MsgGovCancelUpdateParamPlan.title": + return x.Title != "" + case "oracle.v1.MsgGovCancelUpdateParamPlan.description": + return x.Description != "" + case "oracle.v1.MsgGovCancelUpdateParamPlan.height": + return x.Height != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlan")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlan does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "oracle.v1.MsgGovCancelUpdateParamPlan.authority": + x.Authority = "" + case "oracle.v1.MsgGovCancelUpdateParamPlan.title": + x.Title = "" + case "oracle.v1.MsgGovCancelUpdateParamPlan.description": + x.Description = "" + case "oracle.v1.MsgGovCancelUpdateParamPlan.height": + x.Height = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlan")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlan does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "oracle.v1.MsgGovCancelUpdateParamPlan.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovCancelUpdateParamPlan.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovCancelUpdateParamPlan.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "oracle.v1.MsgGovCancelUpdateParamPlan.height": + value := x.Height + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlan")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlan does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "oracle.v1.MsgGovCancelUpdateParamPlan.authority": + x.Authority = value.Interface().(string) + case "oracle.v1.MsgGovCancelUpdateParamPlan.title": + x.Title = value.Interface().(string) + case "oracle.v1.MsgGovCancelUpdateParamPlan.description": + x.Description = value.Interface().(string) + case "oracle.v1.MsgGovCancelUpdateParamPlan.height": + x.Height = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlan")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlan does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgGovCancelUpdateParamPlan.authority": + panic(fmt.Errorf("field authority of message oracle.v1.MsgGovCancelUpdateParamPlan is not mutable")) + case "oracle.v1.MsgGovCancelUpdateParamPlan.title": + panic(fmt.Errorf("field title of message oracle.v1.MsgGovCancelUpdateParamPlan is not mutable")) + case "oracle.v1.MsgGovCancelUpdateParamPlan.description": + panic(fmt.Errorf("field description of message oracle.v1.MsgGovCancelUpdateParamPlan is not mutable")) + case "oracle.v1.MsgGovCancelUpdateParamPlan.height": + panic(fmt.Errorf("field height of message oracle.v1.MsgGovCancelUpdateParamPlan is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlan")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlan does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "oracle.v1.MsgGovCancelUpdateParamPlan.authority": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovCancelUpdateParamPlan.title": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovCancelUpdateParamPlan.description": + return protoreflect.ValueOfString("") + case "oracle.v1.MsgGovCancelUpdateParamPlan.height": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlan")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlan does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgGovCancelUpdateParamPlan", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgGovCancelUpdateParamPlan) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgGovCancelUpdateParamPlan) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Height != 0 { + n += 1 + runtime.Sov(uint64(x.Height)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgGovCancelUpdateParamPlan) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Height != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) + i-- + dAtA[i] = 0x20 + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x1a + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgGovCancelUpdateParamPlan) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovCancelUpdateParamPlan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovCancelUpdateParamPlan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + x.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgGovCancelUpdateParamPlanResponse protoreflect.MessageDescriptor +) + +func init() { + file_oracle_v1_tx_proto_init() + md_MsgGovCancelUpdateParamPlanResponse = File_oracle_v1_tx_proto.Messages().ByName("MsgGovCancelUpdateParamPlanResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgGovCancelUpdateParamPlanResponse)(nil) + +type fastReflection_MsgGovCancelUpdateParamPlanResponse MsgGovCancelUpdateParamPlanResponse + +func (x *MsgGovCancelUpdateParamPlanResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgGovCancelUpdateParamPlanResponse)(x) +} + +func (x *MsgGovCancelUpdateParamPlanResponse) slowProtoReflect() protoreflect.Message { + mi := &file_oracle_v1_tx_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgGovCancelUpdateParamPlanResponse_messageType fastReflection_MsgGovCancelUpdateParamPlanResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgGovCancelUpdateParamPlanResponse_messageType{} + +type fastReflection_MsgGovCancelUpdateParamPlanResponse_messageType struct{} + +func (x fastReflection_MsgGovCancelUpdateParamPlanResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgGovCancelUpdateParamPlanResponse)(nil) +} +func (x fastReflection_MsgGovCancelUpdateParamPlanResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgGovCancelUpdateParamPlanResponse) +} +func (x fastReflection_MsgGovCancelUpdateParamPlanResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovCancelUpdateParamPlanResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgGovCancelUpdateParamPlanResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgGovCancelUpdateParamPlanResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) New() protoreflect.Message { + return new(fastReflection_MsgGovCancelUpdateParamPlanResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) Interface() protoreflect.ProtoMessage { + return (*MsgGovCancelUpdateParamPlanResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlanResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlanResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlanResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlanResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlanResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlanResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlanResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlanResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlanResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlanResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.MsgGovCancelUpdateParamPlanResponse")) + } + panic(fmt.Errorf("message oracle.v1.MsgGovCancelUpdateParamPlanResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in oracle.v1.MsgGovCancelUpdateParamPlanResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgGovCancelUpdateParamPlanResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgGovCancelUpdateParamPlanResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgGovCancelUpdateParamPlanResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgGovCancelUpdateParamPlanResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovCancelUpdateParamPlanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgGovCancelUpdateParamPlanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: oracle/v1/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgAggregateExchangeRatePrevote represents a message to submit an aggregate +// exchange rate prevote. +type MsgAggregateExchangeRatePrevote struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // Feeder is the author and the signer of the message. + Feeder string `protobuf:"bytes,2,opt,name=feeder,proto3" json:"feeder,omitempty"` + Validator string `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"` +} + +func (x *MsgAggregateExchangeRatePrevote) Reset() { + *x = MsgAggregateExchangeRatePrevote{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAggregateExchangeRatePrevote) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAggregateExchangeRatePrevote) ProtoMessage() {} + +// Deprecated: Use MsgAggregateExchangeRatePrevote.ProtoReflect.Descriptor instead. +func (*MsgAggregateExchangeRatePrevote) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgAggregateExchangeRatePrevote) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *MsgAggregateExchangeRatePrevote) GetFeeder() string { + if x != nil { + return x.Feeder + } + return "" +} + +func (x *MsgAggregateExchangeRatePrevote) GetValidator() string { + if x != nil { + return x.Validator + } + return "" +} + +// MsgAggregateExchangeRatePrevoteResponse defines the +// Msg/AggregateExchangeRatePrevote response type. +type MsgAggregateExchangeRatePrevoteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgAggregateExchangeRatePrevoteResponse) Reset() { + *x = MsgAggregateExchangeRatePrevoteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAggregateExchangeRatePrevoteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAggregateExchangeRatePrevoteResponse) ProtoMessage() {} + +// Deprecated: Use MsgAggregateExchangeRatePrevoteResponse.ProtoReflect.Descriptor instead. +func (*MsgAggregateExchangeRatePrevoteResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{1} +} + +// MsgAggregateExchangeRateVote represents a message to submit anaggregate +// exchange rate vote. +type MsgAggregateExchangeRateVote struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Salt string `protobuf:"bytes,1,opt,name=salt,proto3" json:"salt,omitempty"` + ExchangeRates string `protobuf:"bytes,2,opt,name=exchange_rates,json=exchangeRates,proto3" json:"exchange_rates,omitempty"` + // Feeder is the author and the signer of the message. + Feeder string `protobuf:"bytes,3,opt,name=feeder,proto3" json:"feeder,omitempty"` + Validator string `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` +} + +func (x *MsgAggregateExchangeRateVote) Reset() { + *x = MsgAggregateExchangeRateVote{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAggregateExchangeRateVote) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAggregateExchangeRateVote) ProtoMessage() {} + +// Deprecated: Use MsgAggregateExchangeRateVote.ProtoReflect.Descriptor instead. +func (*MsgAggregateExchangeRateVote) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgAggregateExchangeRateVote) GetSalt() string { + if x != nil { + return x.Salt + } + return "" +} + +func (x *MsgAggregateExchangeRateVote) GetExchangeRates() string { + if x != nil { + return x.ExchangeRates + } + return "" +} + +func (x *MsgAggregateExchangeRateVote) GetFeeder() string { + if x != nil { + return x.Feeder + } + return "" +} + +func (x *MsgAggregateExchangeRateVote) GetValidator() string { + if x != nil { + return x.Validator + } + return "" +} + +// MsgAggregateExchangeRateVoteResponse defines the +// Msg/AggregateExchangeRateVote response type. +type MsgAggregateExchangeRateVoteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgAggregateExchangeRateVoteResponse) Reset() { + *x = MsgAggregateExchangeRateVoteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAggregateExchangeRateVoteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAggregateExchangeRateVoteResponse) ProtoMessage() {} + +// Deprecated: Use MsgAggregateExchangeRateVoteResponse.ProtoReflect.Descriptor instead. +func (*MsgAggregateExchangeRateVoteResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{3} +} + +// MsgDelegateFeedConsent represents a message to delegate oracle voting rights +// to another address. +type MsgDelegateFeedConsent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operator is the author and the signer of the message. + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + Delegate string `protobuf:"bytes,2,opt,name=delegate,proto3" json:"delegate,omitempty"` +} + +func (x *MsgDelegateFeedConsent) Reset() { + *x = MsgDelegateFeedConsent{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDelegateFeedConsent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDelegateFeedConsent) ProtoMessage() {} + +// Deprecated: Use MsgDelegateFeedConsent.ProtoReflect.Descriptor instead. +func (*MsgDelegateFeedConsent) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgDelegateFeedConsent) GetOperator() string { + if x != nil { + return x.Operator + } + return "" +} + +func (x *MsgDelegateFeedConsent) GetDelegate() string { + if x != nil { + return x.Delegate + } + return "" +} + +// MsgDelegateFeedConsentResponse defines the Msg/DelegateFeedConsent response +// type. +type MsgDelegateFeedConsentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgDelegateFeedConsentResponse) Reset() { + *x = MsgDelegateFeedConsentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDelegateFeedConsentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDelegateFeedConsentResponse) ProtoMessage() {} + +// Deprecated: Use MsgDelegateFeedConsentResponse.ProtoReflect.Descriptor instead. +func (*MsgDelegateFeedConsentResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{5} +} + +// MsgLegacyGovUpdateParams defines the Msg/MsgLegacyGovUpdateParams request type. +type MsgLegacyGovUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Keys []string `protobuf:"bytes,4,rep,name=keys,proto3" json:"keys,omitempty"` + Changes *Params `protobuf:"bytes,5,opt,name=changes,proto3" json:"changes,omitempty"` +} + +func (x *MsgLegacyGovUpdateParams) Reset() { + *x = MsgLegacyGovUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgLegacyGovUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgLegacyGovUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgLegacyGovUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgLegacyGovUpdateParams) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgLegacyGovUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgLegacyGovUpdateParams) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MsgLegacyGovUpdateParams) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MsgLegacyGovUpdateParams) GetKeys() []string { + if x != nil { + return x.Keys + } + return nil +} + +func (x *MsgLegacyGovUpdateParams) GetChanges() *Params { + if x != nil { + return x.Changes + } + return nil +} + +// MsgLegacyGovUpdateParams defines the Msg/MsgLegacyGovUpdateParams response type. +type MsgLegacyGovUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgLegacyGovUpdateParamsResponse) Reset() { + *x = MsgLegacyGovUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgLegacyGovUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgLegacyGovUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgLegacyGovUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgLegacyGovUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{7} +} + +// MsgGovUpdateParams defines the Msg/GovUpdateParams request type. +type MsgGovUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // title of the proposal + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // plan is the param update plan + Plan *ParamUpdatePlan `protobuf:"bytes,4,opt,name=plan,proto3" json:"plan,omitempty"` +} + +func (x *MsgGovUpdateParams) Reset() { + *x = MsgGovUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgGovUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgGovUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgGovUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgGovUpdateParams) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgGovUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgGovUpdateParams) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MsgGovUpdateParams) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MsgGovUpdateParams) GetPlan() *ParamUpdatePlan { + if x != nil { + return x.Plan + } + return nil +} + +// MsgGovUpdateParamsResponse defines the Msg/GovUpdateParams response type. +type MsgGovUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgGovUpdateParamsResponse) Reset() { + *x = MsgGovUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgGovUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgGovUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgGovUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgGovUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{9} +} + +// MsgGovAddDenoms defines the Msg/GovAddDenoms request type. +type MsgGovAddDenoms struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // title of the proposal + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // height at which the param update must be performed + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + // denom_list is the list of denoms to add to the oracle registry + DenomList []*Denom `protobuf:"bytes,5,rep,name=denom_list,json=denomList,proto3" json:"denom_list,omitempty"` + // whether or not the assets should be mandatory + Mandatory bool `protobuf:"varint,6,opt,name=mandatory,proto3" json:"mandatory,omitempty"` + // reward_band determines what the reward_band will be for every + // asset in the proposal. If not provided, it will default. + RewardBand string `protobuf:"bytes,7,opt,name=reward_band,json=rewardBand,proto3" json:"reward_band,omitempty"` + // currency_pair_providers defines the currency provider pairs for + // each denom being added. + CurrencyPairProviders []*CurrencyPairProviders `protobuf:"bytes,8,rep,name=currency_pair_providers,json=currencyPairProviders,proto3" json:"currency_pair_providers,omitempty"` + // currency_deviation_thresholds defines the deviation thresholds + // for each denom being added. + CurrencyDeviationThresholds []*CurrencyDeviationThreshold `protobuf:"bytes,9,rep,name=currency_deviation_thresholds,json=currencyDeviationThresholds,proto3" json:"currency_deviation_thresholds,omitempty"` +} + +func (x *MsgGovAddDenoms) Reset() { + *x = MsgGovAddDenoms{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgGovAddDenoms) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgGovAddDenoms) ProtoMessage() {} + +// Deprecated: Use MsgGovAddDenoms.ProtoReflect.Descriptor instead. +func (*MsgGovAddDenoms) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgGovAddDenoms) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgGovAddDenoms) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MsgGovAddDenoms) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MsgGovAddDenoms) GetHeight() int64 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *MsgGovAddDenoms) GetDenomList() []*Denom { + if x != nil { + return x.DenomList + } + return nil +} + +func (x *MsgGovAddDenoms) GetMandatory() bool { + if x != nil { + return x.Mandatory + } + return false +} + +func (x *MsgGovAddDenoms) GetRewardBand() string { + if x != nil { + return x.RewardBand + } + return "" +} + +func (x *MsgGovAddDenoms) GetCurrencyPairProviders() []*CurrencyPairProviders { + if x != nil { + return x.CurrencyPairProviders + } + return nil +} + +func (x *MsgGovAddDenoms) GetCurrencyDeviationThresholds() []*CurrencyDeviationThreshold { + if x != nil { + return x.CurrencyDeviationThresholds + } + return nil +} + +// MsgGovAddDenomResponse defines the Msg/GovAddDenomResponse response type. +type MsgGovAddDenomsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgGovAddDenomsResponse) Reset() { + *x = MsgGovAddDenomsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgGovAddDenomsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgGovAddDenomsResponse) ProtoMessage() {} + +// Deprecated: Use MsgGovAddDenomsResponse.ProtoReflect.Descriptor instead. +func (*MsgGovAddDenomsResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{11} +} + +// MsgGovRemoveCurrencyPairProviders defines the Msg/GovRemoveCurrencyPairProviders request type. +type MsgGovRemoveCurrencyPairProviders struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // title of the proposal + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // height at which the param update must be performed + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + // currency_pair_providers to remove from the current CurrencyPairProvidersList + CurrencyPairProviders []*CurrencyPairProviders `protobuf:"bytes,5,rep,name=currency_pair_providers,json=currencyPairProviders,proto3" json:"currency_pair_providers,omitempty"` +} + +func (x *MsgGovRemoveCurrencyPairProviders) Reset() { + *x = MsgGovRemoveCurrencyPairProviders{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgGovRemoveCurrencyPairProviders) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgGovRemoveCurrencyPairProviders) ProtoMessage() {} + +// Deprecated: Use MsgGovRemoveCurrencyPairProviders.ProtoReflect.Descriptor instead. +func (*MsgGovRemoveCurrencyPairProviders) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{12} +} + +func (x *MsgGovRemoveCurrencyPairProviders) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgGovRemoveCurrencyPairProviders) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MsgGovRemoveCurrencyPairProviders) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MsgGovRemoveCurrencyPairProviders) GetHeight() int64 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *MsgGovRemoveCurrencyPairProviders) GetCurrencyPairProviders() []*CurrencyPairProviders { + if x != nil { + return x.CurrencyPairProviders + } + return nil +} + +// MsgGovRemoveCurrencyPairProvidersResponse defines the Msg/GovRemoveCurrencyPairProvidersResponse response type. +type MsgGovRemoveCurrencyPairProvidersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgGovRemoveCurrencyPairProvidersResponse) Reset() { + *x = MsgGovRemoveCurrencyPairProvidersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgGovRemoveCurrencyPairProvidersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgGovRemoveCurrencyPairProvidersResponse) ProtoMessage() {} + +// Deprecated: Use MsgGovRemoveCurrencyPairProvidersResponse.ProtoReflect.Descriptor instead. +func (*MsgGovRemoveCurrencyPairProvidersResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{13} +} + +// MsgGovRemoveCurrencyDeviationThresholds defines the Msg/GovRemoveCurrencyDeviationThresholds request type. +type MsgGovRemoveCurrencyDeviationThresholds struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // title of the proposal + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // height at which the param update must be performed + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + // currencies to remove from the current CurrencyDeviationThresholdsList + Currencies []string `protobuf:"bytes,5,rep,name=currencies,proto3" json:"currencies,omitempty"` +} + +func (x *MsgGovRemoveCurrencyDeviationThresholds) Reset() { + *x = MsgGovRemoveCurrencyDeviationThresholds{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgGovRemoveCurrencyDeviationThresholds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgGovRemoveCurrencyDeviationThresholds) ProtoMessage() {} + +// Deprecated: Use MsgGovRemoveCurrencyDeviationThresholds.ProtoReflect.Descriptor instead. +func (*MsgGovRemoveCurrencyDeviationThresholds) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{14} +} + +func (x *MsgGovRemoveCurrencyDeviationThresholds) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgGovRemoveCurrencyDeviationThresholds) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MsgGovRemoveCurrencyDeviationThresholds) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MsgGovRemoveCurrencyDeviationThresholds) GetHeight() int64 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *MsgGovRemoveCurrencyDeviationThresholds) GetCurrencies() []string { + if x != nil { + return x.Currencies + } + return nil +} + +// MsgGovRemoveCurrencyDeviationThresholdsResponse defines the Msg/GovRemoveCurrencyDeviationThresholdsResponse response type. +type MsgGovRemoveCurrencyDeviationThresholdsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgGovRemoveCurrencyDeviationThresholdsResponse) Reset() { + *x = MsgGovRemoveCurrencyDeviationThresholdsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgGovRemoveCurrencyDeviationThresholdsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgGovRemoveCurrencyDeviationThresholdsResponse) ProtoMessage() {} + +// Deprecated: Use MsgGovRemoveCurrencyDeviationThresholdsResponse.ProtoReflect.Descriptor instead. +func (*MsgGovRemoveCurrencyDeviationThresholdsResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{15} +} + +// MsgGovCancelUpdateParamPlan defines the Msg/GovCancelUpdateParamPlan request type. +type MsgGovCancelUpdateParamPlan struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // title of the proposal + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // height of param update plan to cancel + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *MsgGovCancelUpdateParamPlan) Reset() { + *x = MsgGovCancelUpdateParamPlan{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgGovCancelUpdateParamPlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgGovCancelUpdateParamPlan) ProtoMessage() {} + +// Deprecated: Use MsgGovCancelUpdateParamPlan.ProtoReflect.Descriptor instead. +func (*MsgGovCancelUpdateParamPlan) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{16} +} + +func (x *MsgGovCancelUpdateParamPlan) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgGovCancelUpdateParamPlan) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MsgGovCancelUpdateParamPlan) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MsgGovCancelUpdateParamPlan) GetHeight() int64 { + if x != nil { + return x.Height + } + return 0 +} + +// MsgGovCancelUpdateParamPlanResponse defines the Msg/GovCancelUpdateParamPlanResponse response type. +type MsgGovCancelUpdateParamPlanResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgGovCancelUpdateParamPlanResponse) Reset() { + *x = MsgGovCancelUpdateParamPlanResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_oracle_v1_tx_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgGovCancelUpdateParamPlanResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgGovCancelUpdateParamPlanResponse) ProtoMessage() {} + +// Deprecated: Use MsgGovCancelUpdateParamPlanResponse.ProtoReflect.Descriptor instead. +func (*MsgGovCancelUpdateParamPlanResponse) Descriptor() ([]byte, []int) { + return file_oracle_v1_tx_proto_rawDescGZIP(), []int{17} +} + +var File_oracle_v1_tx_proto protoreflect.FileDescriptor + +var file_oracle_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, + 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, + 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xce, 0x01, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0f, 0xf2, 0xde, 0x1f, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x68, + 0x61, 0x73, 0x68, 0x22, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x30, 0x0a, 0x06, 0x66, 0x65, + 0x65, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x09, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x13, 0x88, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x66, 0x65, 0x65, 0x64, + 0x65, 0x72, 0x22, 0x29, 0x0a, 0x27, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x65, 0x76, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8d, 0x02, + 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x23, + 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xf2, 0xde, + 0x1f, 0x0b, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x61, 0x6c, 0x74, 0x22, 0x52, 0x04, 0x73, + 0x61, 0x6c, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, 0xde, 0x1f, + 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x73, 0x22, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x22, 0x26, 0x0a, + 0x24, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, + 0x12, 0x3d, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x3d, 0x0a, 0x08, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x3a, 0x15, + 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xed, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x47, 0x6f, 0x76, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x1a, 0x88, 0xa0, 0x1f, + 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x47, 0x6f, 0x76, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd6, 0x01, 0x0a, 0x12, + 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x3a, 0x1a, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xd2, 0x05, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x41, 0x64, 0x64, + 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x42, + 0x0a, 0x0a, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x6e, 0x6f, 0x6d, 0x42, 0x11, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x09, 0x44, 0x65, + 0x6e, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x09, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6d, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x5d, 0x0a, 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, + 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x22, 0x52, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x61, 0x6e, 0x64, 0x12, + 0x9d, 0x01, 0x0a, 0x17, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x70, 0x61, 0x69, + 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x73, 0x42, 0x43, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x1e, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x70, 0x61, 0x69, 0x72, + 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0xaa, 0xdf, 0x1f, 0x19, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, + 0xb9, 0x01, 0x0a, 0x1d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x64, 0x65, 0x76, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x76, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x4e, + 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x24, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x22, 0xaa, 0xdf, 0x1f, 0x1e, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x1b, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x3a, 0x1a, 0x88, 0xa0, 0x1f, + 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x47, 0x6f, + 0x76, 0x41, 0x64, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xe7, 0x02, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x9d, 0x01, 0x0a, 0x17, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x70, 0x61, + 0x69, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x73, 0x42, 0x43, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x1e, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x70, 0x61, 0x69, + 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0xaa, 0xdf, 0x1f, 0x19, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, + 0x3a, 0x1a, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x82, 0xe7, + 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x2b, 0x0a, 0x29, + 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xed, 0x01, 0x0a, 0x27, 0x4d, 0x73, + 0x67, 0x47, 0x6f, 0x76, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1e, 0x0a, + 0x0a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x3a, 0x1a, 0x88, + 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x82, 0xe7, 0xb0, 0x2a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x31, 0x0a, 0x2f, 0x4d, 0x73, 0x67, + 0x47, 0x6f, 0x76, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc1, 0x01, 0x0a, + 0x1b, 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x36, 0x0a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x3a, 0x1a, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x01, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x50, 0x6c, 0x61, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x90, 0x08, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x7e, 0x0a, 0x1c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, + 0x2a, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x1a, 0x32, 0x2e, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, + 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x75, 0x0a, 0x19, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, + 0x65, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x2f, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x45, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x2e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, + 0x1a, 0x29, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x15, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x47, 0x6f, 0x76, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x47, 0x6f, 0x76, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2b, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x47, + 0x6f, 0x76, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0f, 0x47, 0x6f, 0x76, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4e, 0x0a, 0x0c, 0x47, 0x6f, 0x76, 0x41, 0x64, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x12, + 0x1a, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, + 0x6f, 0x76, 0x41, 0x64, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x1a, 0x22, 0x2e, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x41, 0x64, + 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x84, 0x01, 0x0a, 0x1e, 0x47, 0x6f, 0x76, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x2c, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x47, 0x6f, 0x76, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, + 0x1a, 0x34, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x47, 0x6f, 0x76, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x24, 0x47, 0x6f, 0x76, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x76, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x12, + 0x32, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, + 0x6f, 0x76, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x73, 0x1a, 0x3a, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x72, 0x0a, 0x18, 0x47, 0x6f, 0x76, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x26, 0x2e, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x50, + 0x6c, 0x61, 0x6e, 0x1a, 0x2e, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x47, 0x6f, 0x76, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x98, 0x01, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x65, 0x76, 0x4d, 0x69, 0x74, 0x68, 0x72, 0x61, 0x6e, 0x2f, + 0x64, 0x6d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, + 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_oracle_v1_tx_proto_rawDescOnce sync.Once + file_oracle_v1_tx_proto_rawDescData = file_oracle_v1_tx_proto_rawDesc +) + +func file_oracle_v1_tx_proto_rawDescGZIP() []byte { + file_oracle_v1_tx_proto_rawDescOnce.Do(func() { + file_oracle_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_v1_tx_proto_rawDescData) + }) + return file_oracle_v1_tx_proto_rawDescData +} + +var file_oracle_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_oracle_v1_tx_proto_goTypes = []interface{}{ + (*MsgAggregateExchangeRatePrevote)(nil), // 0: oracle.v1.MsgAggregateExchangeRatePrevote + (*MsgAggregateExchangeRatePrevoteResponse)(nil), // 1: oracle.v1.MsgAggregateExchangeRatePrevoteResponse + (*MsgAggregateExchangeRateVote)(nil), // 2: oracle.v1.MsgAggregateExchangeRateVote + (*MsgAggregateExchangeRateVoteResponse)(nil), // 3: oracle.v1.MsgAggregateExchangeRateVoteResponse + (*MsgDelegateFeedConsent)(nil), // 4: oracle.v1.MsgDelegateFeedConsent + (*MsgDelegateFeedConsentResponse)(nil), // 5: oracle.v1.MsgDelegateFeedConsentResponse + (*MsgLegacyGovUpdateParams)(nil), // 6: oracle.v1.MsgLegacyGovUpdateParams + (*MsgLegacyGovUpdateParamsResponse)(nil), // 7: oracle.v1.MsgLegacyGovUpdateParamsResponse + (*MsgGovUpdateParams)(nil), // 8: oracle.v1.MsgGovUpdateParams + (*MsgGovUpdateParamsResponse)(nil), // 9: oracle.v1.MsgGovUpdateParamsResponse + (*MsgGovAddDenoms)(nil), // 10: oracle.v1.MsgGovAddDenoms + (*MsgGovAddDenomsResponse)(nil), // 11: oracle.v1.MsgGovAddDenomsResponse + (*MsgGovRemoveCurrencyPairProviders)(nil), // 12: oracle.v1.MsgGovRemoveCurrencyPairProviders + (*MsgGovRemoveCurrencyPairProvidersResponse)(nil), // 13: oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse + (*MsgGovRemoveCurrencyDeviationThresholds)(nil), // 14: oracle.v1.MsgGovRemoveCurrencyDeviationThresholds + (*MsgGovRemoveCurrencyDeviationThresholdsResponse)(nil), // 15: oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse + (*MsgGovCancelUpdateParamPlan)(nil), // 16: oracle.v1.MsgGovCancelUpdateParamPlan + (*MsgGovCancelUpdateParamPlanResponse)(nil), // 17: oracle.v1.MsgGovCancelUpdateParamPlanResponse + (*Params)(nil), // 18: oracle.v1.Params + (*ParamUpdatePlan)(nil), // 19: oracle.v1.ParamUpdatePlan + (*Denom)(nil), // 20: oracle.v1.Denom + (*CurrencyPairProviders)(nil), // 21: oracle.v1.CurrencyPairProviders + (*CurrencyDeviationThreshold)(nil), // 22: oracle.v1.CurrencyDeviationThreshold +} +var file_oracle_v1_tx_proto_depIdxs = []int32{ + 18, // 0: oracle.v1.MsgLegacyGovUpdateParams.changes:type_name -> oracle.v1.Params + 19, // 1: oracle.v1.MsgGovUpdateParams.plan:type_name -> oracle.v1.ParamUpdatePlan + 20, // 2: oracle.v1.MsgGovAddDenoms.denom_list:type_name -> oracle.v1.Denom + 21, // 3: oracle.v1.MsgGovAddDenoms.currency_pair_providers:type_name -> oracle.v1.CurrencyPairProviders + 22, // 4: oracle.v1.MsgGovAddDenoms.currency_deviation_thresholds:type_name -> oracle.v1.CurrencyDeviationThreshold + 21, // 5: oracle.v1.MsgGovRemoveCurrencyPairProviders.currency_pair_providers:type_name -> oracle.v1.CurrencyPairProviders + 0, // 6: oracle.v1.Msg.AggregateExchangeRatePrevote:input_type -> oracle.v1.MsgAggregateExchangeRatePrevote + 2, // 7: oracle.v1.Msg.AggregateExchangeRateVote:input_type -> oracle.v1.MsgAggregateExchangeRateVote + 4, // 8: oracle.v1.Msg.DelegateFeedConsent:input_type -> oracle.v1.MsgDelegateFeedConsent + 6, // 9: oracle.v1.Msg.LegacyGovUpdateParams:input_type -> oracle.v1.MsgLegacyGovUpdateParams + 8, // 10: oracle.v1.Msg.GovUpdateParams:input_type -> oracle.v1.MsgGovUpdateParams + 10, // 11: oracle.v1.Msg.GovAddDenoms:input_type -> oracle.v1.MsgGovAddDenoms + 12, // 12: oracle.v1.Msg.GovRemoveCurrencyPairProviders:input_type -> oracle.v1.MsgGovRemoveCurrencyPairProviders + 14, // 13: oracle.v1.Msg.GovRemoveCurrencyDeviationThresholds:input_type -> oracle.v1.MsgGovRemoveCurrencyDeviationThresholds + 16, // 14: oracle.v1.Msg.GovCancelUpdateParamPlan:input_type -> oracle.v1.MsgGovCancelUpdateParamPlan + 1, // 15: oracle.v1.Msg.AggregateExchangeRatePrevote:output_type -> oracle.v1.MsgAggregateExchangeRatePrevoteResponse + 3, // 16: oracle.v1.Msg.AggregateExchangeRateVote:output_type -> oracle.v1.MsgAggregateExchangeRateVoteResponse + 5, // 17: oracle.v1.Msg.DelegateFeedConsent:output_type -> oracle.v1.MsgDelegateFeedConsentResponse + 7, // 18: oracle.v1.Msg.LegacyGovUpdateParams:output_type -> oracle.v1.MsgLegacyGovUpdateParamsResponse + 9, // 19: oracle.v1.Msg.GovUpdateParams:output_type -> oracle.v1.MsgGovUpdateParamsResponse + 11, // 20: oracle.v1.Msg.GovAddDenoms:output_type -> oracle.v1.MsgGovAddDenomsResponse + 13, // 21: oracle.v1.Msg.GovRemoveCurrencyPairProviders:output_type -> oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse + 15, // 22: oracle.v1.Msg.GovRemoveCurrencyDeviationThresholds:output_type -> oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse + 17, // 23: oracle.v1.Msg.GovCancelUpdateParamPlan:output_type -> oracle.v1.MsgGovCancelUpdateParamPlanResponse + 15, // [15:24] is the sub-list for method output_type + 6, // [6:15] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_oracle_v1_tx_proto_init() } +func file_oracle_v1_tx_proto_init() { + if File_oracle_v1_tx_proto != nil { + return + } + file_oracle_v1_oracle_proto_init() + if !protoimpl.UnsafeEnabled { + file_oracle_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAggregateExchangeRatePrevote); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAggregateExchangeRatePrevoteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAggregateExchangeRateVote); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAggregateExchangeRateVoteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDelegateFeedConsent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDelegateFeedConsentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgLegacyGovUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgLegacyGovUpdateParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgGovUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgGovUpdateParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgGovAddDenoms); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgGovAddDenomsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgGovRemoveCurrencyPairProviders); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgGovRemoveCurrencyPairProvidersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgGovRemoveCurrencyDeviationThresholds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgGovRemoveCurrencyDeviationThresholdsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgGovCancelUpdateParamPlan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_oracle_v1_tx_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgGovCancelUpdateParamPlanResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_oracle_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_oracle_v1_tx_proto_goTypes, + DependencyIndexes: file_oracle_v1_tx_proto_depIdxs, + MessageInfos: file_oracle_v1_tx_proto_msgTypes, + }.Build() + File_oracle_v1_tx_proto = out.File + file_oracle_v1_tx_proto_rawDesc = nil + file_oracle_v1_tx_proto_goTypes = nil + file_oracle_v1_tx_proto_depIdxs = nil +} diff --git a/api/oracle/v1/tx_grpc.pb.go b/api/oracle/v1/tx_grpc.pb.go new file mode 100644 index 0000000..17bf4b4 --- /dev/null +++ b/api/oracle/v1/tx_grpc.pb.go @@ -0,0 +1,431 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: oracle/v1/tx.proto + +package oraclev1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Msg_AggregateExchangeRatePrevote_FullMethodName = "/oracle.v1.Msg/AggregateExchangeRatePrevote" + Msg_AggregateExchangeRateVote_FullMethodName = "/oracle.v1.Msg/AggregateExchangeRateVote" + Msg_DelegateFeedConsent_FullMethodName = "/oracle.v1.Msg/DelegateFeedConsent" + Msg_LegacyGovUpdateParams_FullMethodName = "/oracle.v1.Msg/LegacyGovUpdateParams" + Msg_GovUpdateParams_FullMethodName = "/oracle.v1.Msg/GovUpdateParams" + Msg_GovAddDenoms_FullMethodName = "/oracle.v1.Msg/GovAddDenoms" + Msg_GovRemoveCurrencyPairProviders_FullMethodName = "/oracle.v1.Msg/GovRemoveCurrencyPairProviders" + Msg_GovRemoveCurrencyDeviationThresholds_FullMethodName = "/oracle.v1.Msg/GovRemoveCurrencyDeviationThresholds" + Msg_GovCancelUpdateParamPlan_FullMethodName = "/oracle.v1.Msg/GovCancelUpdateParamPlan" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MsgClient interface { + // AggregateExchangeRatePrevote defines a method for submitting an aggregate + // exchange rate prevote. + AggregateExchangeRatePrevote(ctx context.Context, in *MsgAggregateExchangeRatePrevote, opts ...grpc.CallOption) (*MsgAggregateExchangeRatePrevoteResponse, error) + // AggregateExchangeRateVote defines a method for submitting an aggregate + // exchange rate vote. + AggregateExchangeRateVote(ctx context.Context, in *MsgAggregateExchangeRateVote, opts ...grpc.CallOption) (*MsgAggregateExchangeRateVoteResponse, error) + // DelegateFeedConsent defines a method for setting the feeder delegation. + DelegateFeedConsent(ctx context.Context, in *MsgDelegateFeedConsent, opts ...grpc.CallOption) (*MsgDelegateFeedConsentResponse, error) + // LegacyGovUpdateParams defines the legacy message that updates the oracle parameters. + LegacyGovUpdateParams(ctx context.Context, in *MsgLegacyGovUpdateParams, opts ...grpc.CallOption) (*MsgLegacyGovUpdateParamsResponse, error) + // GovUpdateParams updates the oracle parameters. + GovUpdateParams(ctx context.Context, in *MsgGovUpdateParams, opts ...grpc.CallOption) (*MsgGovUpdateParamsResponse, error) + // GovAddDenoms updates the oracle parameters to include a new tokens. + GovAddDenoms(ctx context.Context, in *MsgGovAddDenoms, opts ...grpc.CallOption) (*MsgGovAddDenomsResponse, error) + // GovRemoveCurrencyPairProviders updates the oracle parameters to remove a list of + // currency pair providers. + GovRemoveCurrencyPairProviders(ctx context.Context, in *MsgGovRemoveCurrencyPairProviders, opts ...grpc.CallOption) (*MsgGovRemoveCurrencyPairProvidersResponse, error) + // GovRemoveCurrencyDeviationThresholds updates the oracle parameters to remove a list + // of currency deviation thresholds. + GovRemoveCurrencyDeviationThresholds(ctx context.Context, in *MsgGovRemoveCurrencyDeviationThresholds, opts ...grpc.CallOption) (*MsgGovRemoveCurrencyDeviationThresholdsResponse, error) + // GovCancelUpdateParamPlan cancels a plan to update the oracle parameters. + GovCancelUpdateParamPlan(ctx context.Context, in *MsgGovCancelUpdateParamPlan, opts ...grpc.CallOption) (*MsgGovCancelUpdateParamPlanResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) AggregateExchangeRatePrevote(ctx context.Context, in *MsgAggregateExchangeRatePrevote, opts ...grpc.CallOption) (*MsgAggregateExchangeRatePrevoteResponse, error) { + out := new(MsgAggregateExchangeRatePrevoteResponse) + err := c.cc.Invoke(ctx, Msg_AggregateExchangeRatePrevote_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) AggregateExchangeRateVote(ctx context.Context, in *MsgAggregateExchangeRateVote, opts ...grpc.CallOption) (*MsgAggregateExchangeRateVoteResponse, error) { + out := new(MsgAggregateExchangeRateVoteResponse) + err := c.cc.Invoke(ctx, Msg_AggregateExchangeRateVote_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DelegateFeedConsent(ctx context.Context, in *MsgDelegateFeedConsent, opts ...grpc.CallOption) (*MsgDelegateFeedConsentResponse, error) { + out := new(MsgDelegateFeedConsentResponse) + err := c.cc.Invoke(ctx, Msg_DelegateFeedConsent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) LegacyGovUpdateParams(ctx context.Context, in *MsgLegacyGovUpdateParams, opts ...grpc.CallOption) (*MsgLegacyGovUpdateParamsResponse, error) { + out := new(MsgLegacyGovUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_LegacyGovUpdateParams_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovUpdateParams(ctx context.Context, in *MsgGovUpdateParams, opts ...grpc.CallOption) (*MsgGovUpdateParamsResponse, error) { + out := new(MsgGovUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_GovUpdateParams_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovAddDenoms(ctx context.Context, in *MsgGovAddDenoms, opts ...grpc.CallOption) (*MsgGovAddDenomsResponse, error) { + out := new(MsgGovAddDenomsResponse) + err := c.cc.Invoke(ctx, Msg_GovAddDenoms_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovRemoveCurrencyPairProviders(ctx context.Context, in *MsgGovRemoveCurrencyPairProviders, opts ...grpc.CallOption) (*MsgGovRemoveCurrencyPairProvidersResponse, error) { + out := new(MsgGovRemoveCurrencyPairProvidersResponse) + err := c.cc.Invoke(ctx, Msg_GovRemoveCurrencyPairProviders_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovRemoveCurrencyDeviationThresholds(ctx context.Context, in *MsgGovRemoveCurrencyDeviationThresholds, opts ...grpc.CallOption) (*MsgGovRemoveCurrencyDeviationThresholdsResponse, error) { + out := new(MsgGovRemoveCurrencyDeviationThresholdsResponse) + err := c.cc.Invoke(ctx, Msg_GovRemoveCurrencyDeviationThresholds_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovCancelUpdateParamPlan(ctx context.Context, in *MsgGovCancelUpdateParamPlan, opts ...grpc.CallOption) (*MsgGovCancelUpdateParamPlanResponse, error) { + out := new(MsgGovCancelUpdateParamPlanResponse) + err := c.cc.Invoke(ctx, Msg_GovCancelUpdateParamPlan_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +type MsgServer interface { + // AggregateExchangeRatePrevote defines a method for submitting an aggregate + // exchange rate prevote. + AggregateExchangeRatePrevote(context.Context, *MsgAggregateExchangeRatePrevote) (*MsgAggregateExchangeRatePrevoteResponse, error) + // AggregateExchangeRateVote defines a method for submitting an aggregate + // exchange rate vote. + AggregateExchangeRateVote(context.Context, *MsgAggregateExchangeRateVote) (*MsgAggregateExchangeRateVoteResponse, error) + // DelegateFeedConsent defines a method for setting the feeder delegation. + DelegateFeedConsent(context.Context, *MsgDelegateFeedConsent) (*MsgDelegateFeedConsentResponse, error) + // LegacyGovUpdateParams defines the legacy message that updates the oracle parameters. + LegacyGovUpdateParams(context.Context, *MsgLegacyGovUpdateParams) (*MsgLegacyGovUpdateParamsResponse, error) + // GovUpdateParams updates the oracle parameters. + GovUpdateParams(context.Context, *MsgGovUpdateParams) (*MsgGovUpdateParamsResponse, error) + // GovAddDenoms updates the oracle parameters to include a new tokens. + GovAddDenoms(context.Context, *MsgGovAddDenoms) (*MsgGovAddDenomsResponse, error) + // GovRemoveCurrencyPairProviders updates the oracle parameters to remove a list of + // currency pair providers. + GovRemoveCurrencyPairProviders(context.Context, *MsgGovRemoveCurrencyPairProviders) (*MsgGovRemoveCurrencyPairProvidersResponse, error) + // GovRemoveCurrencyDeviationThresholds updates the oracle parameters to remove a list + // of currency deviation thresholds. + GovRemoveCurrencyDeviationThresholds(context.Context, *MsgGovRemoveCurrencyDeviationThresholds) (*MsgGovRemoveCurrencyDeviationThresholdsResponse, error) + // GovCancelUpdateParamPlan cancels a plan to update the oracle parameters. + GovCancelUpdateParamPlan(context.Context, *MsgGovCancelUpdateParamPlan) (*MsgGovCancelUpdateParamPlanResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) AggregateExchangeRatePrevote(context.Context, *MsgAggregateExchangeRatePrevote) (*MsgAggregateExchangeRatePrevoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateExchangeRatePrevote not implemented") +} +func (UnimplementedMsgServer) AggregateExchangeRateVote(context.Context, *MsgAggregateExchangeRateVote) (*MsgAggregateExchangeRateVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateExchangeRateVote not implemented") +} +func (UnimplementedMsgServer) DelegateFeedConsent(context.Context, *MsgDelegateFeedConsent) (*MsgDelegateFeedConsentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegateFeedConsent not implemented") +} +func (UnimplementedMsgServer) LegacyGovUpdateParams(context.Context, *MsgLegacyGovUpdateParams) (*MsgLegacyGovUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LegacyGovUpdateParams not implemented") +} +func (UnimplementedMsgServer) GovUpdateParams(context.Context, *MsgGovUpdateParams) (*MsgGovUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovUpdateParams not implemented") +} +func (UnimplementedMsgServer) GovAddDenoms(context.Context, *MsgGovAddDenoms) (*MsgGovAddDenomsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovAddDenoms not implemented") +} +func (UnimplementedMsgServer) GovRemoveCurrencyPairProviders(context.Context, *MsgGovRemoveCurrencyPairProviders) (*MsgGovRemoveCurrencyPairProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovRemoveCurrencyPairProviders not implemented") +} +func (UnimplementedMsgServer) GovRemoveCurrencyDeviationThresholds(context.Context, *MsgGovRemoveCurrencyDeviationThresholds) (*MsgGovRemoveCurrencyDeviationThresholdsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovRemoveCurrencyDeviationThresholds not implemented") +} +func (UnimplementedMsgServer) GovCancelUpdateParamPlan(context.Context, *MsgGovCancelUpdateParamPlan) (*MsgGovCancelUpdateParamPlanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovCancelUpdateParamPlan not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_AggregateExchangeRatePrevote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAggregateExchangeRatePrevote) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AggregateExchangeRatePrevote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_AggregateExchangeRatePrevote_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AggregateExchangeRatePrevote(ctx, req.(*MsgAggregateExchangeRatePrevote)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_AggregateExchangeRateVote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAggregateExchangeRateVote) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AggregateExchangeRateVote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_AggregateExchangeRateVote_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AggregateExchangeRateVote(ctx, req.(*MsgAggregateExchangeRateVote)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DelegateFeedConsent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDelegateFeedConsent) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DelegateFeedConsent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_DelegateFeedConsent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DelegateFeedConsent(ctx, req.(*MsgDelegateFeedConsent)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_LegacyGovUpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLegacyGovUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LegacyGovUpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_LegacyGovUpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LegacyGovUpdateParams(ctx, req.(*MsgLegacyGovUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovUpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovUpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_GovUpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovUpdateParams(ctx, req.(*MsgGovUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovAddDenoms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovAddDenoms) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovAddDenoms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_GovAddDenoms_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovAddDenoms(ctx, req.(*MsgGovAddDenoms)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovRemoveCurrencyPairProviders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovRemoveCurrencyPairProviders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovRemoveCurrencyPairProviders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_GovRemoveCurrencyPairProviders_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovRemoveCurrencyPairProviders(ctx, req.(*MsgGovRemoveCurrencyPairProviders)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovRemoveCurrencyDeviationThresholds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovRemoveCurrencyDeviationThresholds) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovRemoveCurrencyDeviationThresholds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_GovRemoveCurrencyDeviationThresholds_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovRemoveCurrencyDeviationThresholds(ctx, req.(*MsgGovRemoveCurrencyDeviationThresholds)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovCancelUpdateParamPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovCancelUpdateParamPlan) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovCancelUpdateParamPlan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_GovCancelUpdateParamPlan_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovCancelUpdateParamPlan(ctx, req.(*MsgGovCancelUpdateParamPlan)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "oracle.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AggregateExchangeRatePrevote", + Handler: _Msg_AggregateExchangeRatePrevote_Handler, + }, + { + MethodName: "AggregateExchangeRateVote", + Handler: _Msg_AggregateExchangeRateVote_Handler, + }, + { + MethodName: "DelegateFeedConsent", + Handler: _Msg_DelegateFeedConsent_Handler, + }, + { + MethodName: "LegacyGovUpdateParams", + Handler: _Msg_LegacyGovUpdateParams_Handler, + }, + { + MethodName: "GovUpdateParams", + Handler: _Msg_GovUpdateParams_Handler, + }, + { + MethodName: "GovAddDenoms", + Handler: _Msg_GovAddDenoms_Handler, + }, + { + MethodName: "GovRemoveCurrencyPairProviders", + Handler: _Msg_GovRemoveCurrencyPairProviders_Handler, + }, + { + MethodName: "GovRemoveCurrencyDeviationThresholds", + Handler: _Msg_GovRemoveCurrencyDeviationThresholds_Handler, + }, + { + MethodName: "GovCancelUpdateParamPlan", + Handler: _Msg_GovCancelUpdateParamPlan_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "oracle/v1/tx.proto", +} diff --git a/app/app.go b/app/app.go index cd3b0ad..e6a0cf9 100755 --- a/app/app.go +++ b/app/app.go @@ -34,6 +34,10 @@ import ( multisig "github.com/DaevMithran/dmchain/x/multisig" multisigkeeper "github.com/DaevMithran/dmchain/x/multisig/keeper" multisigtypes "github.com/DaevMithran/dmchain/x/multisig/types" + oracle "github.com/DaevMithran/dmchain/x/oracle" + oracleabci "github.com/DaevMithran/dmchain/x/oracle/abci" + oraclekeeper "github.com/DaevMithran/dmchain/x/oracle/keeper" + oracletypes "github.com/DaevMithran/dmchain/x/oracle/types" abci "github.com/cometbft/cometbft/abci/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" @@ -240,7 +244,8 @@ type ChainApp struct { ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper ScopedIBCFeeKeeper capabilitykeeper.ScopedKeeper - MultisigKeeper multisigkeeper.Keeper + MultisigKeeper multisigkeeper.Keeper + OracleKeeper oraclekeeper.Keeper // the module manager ModuleManager *module.Manager @@ -284,39 +289,6 @@ func NewChainApp( std.RegisterLegacyAminoCodec(legacyAmino) std.RegisterInterfaces(interfaceRegistry) - // Below we could construct and set an application specific mempool and - // ABCI 1.0 PrepareProposal and ProcessProposal handlers. These defaults are - // already set in the SDK's BaseApp, this shows an example of how to override - // them. - // - // Example: - // - // bApp := baseapp.NewBaseApp(...) - // nonceMempool := mempool.NewSenderNonceMempool() - // abciPropHandler := NewDefaultProposalHandler(nonceMempool, bApp) - // - // bApp.SetMempool(nonceMempool) - // bApp.SetPrepareProposal(abciPropHandler.PrepareProposalHandler()) - // bApp.SetProcessProposal(abciPropHandler.ProcessProposalHandler()) - // - // Alternatively, you can construct BaseApp options, append those to - // baseAppOptions and pass them to NewBaseApp. - // - // Example: - // - // prepareOpt = func(app *baseapp.BaseApp) { - // abciPropHandler := baseapp.NewDefaultProposalHandler(nonceMempool, app) - // app.SetPrepareProposal(abciPropHandler.PrepareProposalHandler()) - // } - // baseAppOptions = append(baseAppOptions, prepareOpt) - - // create and set dummy vote extension handler - // voteExtOp := func(bApp *baseapp.BaseApp) { - // voteExtHandler := NewVoteExtensionHandler() - // voteExtHandler.SetHandlers(bApp) - // } - // baseAppOptions = append(baseAppOptions, voteExtOp) - baseAppOptions = append(baseAppOptions, baseapp.SetOptimisticExecution()) bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseAppOptions...) @@ -351,6 +323,7 @@ func NewChainApp( icahosttypes.StoreKey, icacontrollertypes.StoreKey, multisigtypes.StoreKey, + oracletypes.StoreKey, ) tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey) @@ -595,6 +568,20 @@ func NewChainApp( // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper + // Create the oracle Keeper + app.OracleKeeper = oraclekeeper.NewKeeper( + appCodec, + runtime.NewKVStoreService(keys[oracletypes.StoreKey]), + app.GetSubspace(oracletypes.ModuleName), + app.AccountKeeper, + app.BankKeeper, + app.DistrKeeper, + app.StakingKeeper, + distrtypes.ModuleName, + cast.ToBool(appOpts.Get("telemetry.enabled")), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + // Create the multisig Keeper app.MultisigKeeper = multisigkeeper.NewKeeper( appCodec, @@ -733,6 +720,7 @@ func NewChainApp( // custom multisig.NewAppModule(appCodec, app.MultisigKeeper), + oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper), ) // BasicModuleManager defines the module BasicManager is in charge of setting up basic, @@ -771,6 +759,7 @@ func NewChainApp( icatypes.ModuleName, ibcfeetypes.ModuleName, multisigtypes.ModuleName, + oracletypes.ModuleName, ) app.ModuleManager.SetOrderEndBlockers( @@ -787,6 +776,7 @@ func NewChainApp( icatypes.ModuleName, ibcfeetypes.ModuleName, multisigtypes.ModuleName, + oracletypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are @@ -825,6 +815,7 @@ func NewChainApp( icatypes.ModuleName, ibcfeetypes.ModuleName, multisigtypes.ModuleName, + oracletypes.ModuleName, } app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...) app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...) @@ -862,9 +853,23 @@ func NewChainApp( authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), } app.sm = module.NewSimulationManagerFromAppModules(app.ModuleManager.Modules, overrideModules) - app.sm.RegisterStoreDecoders() + proposalHandler := oracleabci.NewProposalHandler( + app.Logger(), + app.OracleKeeper, + app.StakingKeeper, + ) + app.SetPrepareProposal(proposalHandler.PrepareProposalHandler()) + app.SetProcessProposal(proposalHandler.ProcessProposalHandler()) + + voteExtensionsHandler := oracleabci.NewVoteExtensionHandler( + app.Logger(), + app.OracleKeeper, + ) + app.SetExtendVoteHandler(voteExtensionsHandler.ExtendVoteHandler()) + app.SetVerifyVoteExtensionHandler(voteExtensionsHandler.VerifyVoteExtensionHandler()) + // initialize stores app.MountKVStores(keys) app.MountTransientStores(tkeys) @@ -1211,6 +1216,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(icacontrollertypes.SubModuleName).WithKeyTable(icacontrollertypes.ParamKeyTable()) paramsKeeper.Subspace(icahosttypes.SubModuleName).WithKeyTable(icahosttypes.ParamKeyTable()) paramsKeeper.Subspace(multisigtypes.ModuleName) + paramsKeeper.Subspace(oracletypes.ModuleName) return paramsKeeper } diff --git a/app/params/app_settings.go b/app/params/app_settings.go new file mode 100644 index 0000000..95feb0a --- /dev/null +++ b/app/params/app_settings.go @@ -0,0 +1,34 @@ +package params + +import ( + "time" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + // Name defines the application name of the Ojo network. + Name = "dm" + + // BondDenom defines the native staking token denomination. + BondDenom = "udm" + + // DisplayDenom defines the name, symbol, and display value of the ojo token. + DisplayDenom = "DM" + + // DefaultGasLimit - set to the same value as cosmos-sdk flags.DefaultGasLimit + // this value is currently only used in tests. + DefaultGasLimit = 200000 +) + +var ( + // ProtocolMinGasPrice is a consensus controlled gas price. Each validator must set his + // `minimum-gas-prices` in app.toml config to value above ProtocolMinGasPrice. + // Transactions with gas-price smaller than ProtocolMinGasPrice will fail during DeliverTx. + ProtocolMinGasPrice = sdk.NewDecCoinFromDec(BondDenom, math.LegacyMustNewDecFromStr("0.00")) + + // DefaultGovPeriod is 3 days. This should be long enough for validators to react, + // and short enough for the team to list new assets competitively. + DefaultGovPeriod = time.Hour * 24 * 3 +) diff --git a/app/params/prefix.go b/app/params/prefix.go new file mode 100644 index 0000000..d02b9c3 --- /dev/null +++ b/app/params/prefix.go @@ -0,0 +1,26 @@ +package params + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// AccountAddressPrefix defines the Ojo network's Bech32 address prefix. +const AccountAddressPrefix = "dm" + +// Account specific Bech32 prefixes. +var ( + AccountPubKeyPrefix = AccountAddressPrefix + "pub" + ValidatorAddressPrefix = AccountAddressPrefix + "valoper" + ValidatorPubKeyPrefix = AccountAddressPrefix + "valoperpub" + ConsNodeAddressPrefix = AccountAddressPrefix + "valcons" + ConsNodePubKeyPrefix = AccountAddressPrefix + "valconspub" +) + +// SetAddressConfig sets Ojo's address configuration. +func SetAddressConfig() { + config := sdk.GetConfig() + config.SetBech32PrefixForAccount(AccountAddressPrefix, AccountPubKeyPrefix) + config.SetBech32PrefixForValidator(ValidatorAddressPrefix, ValidatorPubKeyPrefix) + config.SetBech32PrefixForConsensusNode(ConsNodeAddressPrefix, ConsNodePubKeyPrefix) + config.Seal() +} diff --git a/app/test_helpers.go b/app/test_helpers.go index 9dea8f6..e88a867 100755 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -46,6 +46,10 @@ import ( const chainID = "testing" +type TestApp struct { + ChainApp +} + // SetupOptions defines arguments that are passed into `ChainApp` constructor. type SetupOptions struct { Logger log.Logger diff --git a/go.mod b/go.mod index 8087bb6..6c1d4bd 100755 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/DaevMithran/dmchain -go 1.22.11 +go 1.23 -toolchain go1.23.1 +toolchain go1.23.12 // overrides replace ( @@ -20,8 +20,13 @@ replace ( // See: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.8.1 + github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 + + github.com/ojo-network/price-feeder => github.com/DaevMithran/price-feeder v0.50.14-dm + // pin version! 126854af5e6d has issues with the store so that queries fail github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 + ) require ( @@ -42,6 +47,7 @@ require ( cosmossdk.io/x/nft v0.1.0 cosmossdk.io/x/tx v0.13.7 cosmossdk.io/x/upgrade v0.1.4 + github.com/armon/go-metrics v0.4.1 github.com/cometbft/cometbft v0.38.17 github.com/cosmos/cosmos-db v1.1.1 github.com/cosmos/cosmos-proto v1.0.0-beta.5 @@ -52,35 +58,41 @@ require ( github.com/golang/protobuf v1.5.4 github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/mitchellh/mapstructure v1.5.0 + github.com/ojo-network/ojo v0.5.1 + github.com/ojo-network/price-feeder v0.2.1-rc1 + github.com/rs/zerolog v1.33.0 github.com/spf13/cast v1.7.1 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.10.0 golang.org/x/crypto v0.32.0 + golang.org/x/sync v0.10.0 google.golang.org/genproto/googleapis/api v0.0.0-20241202173237-19429a94021a google.golang.org/grpc v1.70.0 google.golang.org/protobuf v1.36.4 + gopkg.in/yaml.v3 v3.0.1 ) require ( cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.6.0 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect + cloud.google.com/go/auth v0.8.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect cloud.google.com/go/compute/metadata v0.5.2 // indirect - cloud.google.com/go/iam v1.1.9 // indirect + cloud.google.com/go/iam v1.1.12 // indirect cloud.google.com/go/storage v1.41.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/aws/aws-sdk-go v1.44.224 // indirect + github.com/aws/aws-sdk-go v1.44.245 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/bits-and-blooms/bitset v1.8.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/bits-and-blooms/bitset v1.10.0 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect @@ -100,7 +112,7 @@ require ( github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect github.com/creachadair/atomicfile v0.3.1 // indirect github.com/creachadair/tomledit v0.0.24 // indirect - github.com/danieljoos/wincred v1.1.2 // indirect + github.com/danieljoos/wincred v1.2.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect @@ -109,18 +121,22 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/emicklei/dot v1.6.2 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.15.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect + github.com/gogo/protobuf v1.3.3 // indirect github.com/golang/glog v1.2.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect @@ -129,10 +145,10 @@ require ( github.com/google/flatbuffers v2.0.8+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.7 // indirect + github.com/google/s2a-go v0.1.8 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.5 // indirect + github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect @@ -145,7 +161,7 @@ require ( github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect @@ -157,9 +173,11 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect + github.com/justinas/alice v1.2.0 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect + github.com/leodido/go-urn v1.2.4 // indirect github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect @@ -169,7 +187,6 @@ require ( github.com/minio/highwayhash v1.0.3 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect @@ -185,7 +202,7 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.11.1 // indirect - github.com/rs/zerolog v1.33.0 // indirect + github.com/rs/xid v1.5.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.5 // indirect @@ -200,8 +217,8 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect go.opentelemetry.io/otel v1.32.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/otel/trace v1.32.0 // indirect @@ -209,17 +226,15 @@ require ( golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/net v0.34.0 // indirect golang.org/x/oauth2 v0.24.0 // indirect - golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.29.0 // indirect golang.org/x/term v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect - golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.186.0 // indirect - google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect + golang.org/x/time v0.6.0 // indirect + google.golang.org/api v0.192.0 // indirect + google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.10 // indirect pgregory.net/rapid v1.1.0 // indirect diff --git a/go.sum b/go.sum index 18c5da0..3c39600 100755 --- a/go.sum +++ b/go.sum @@ -46,10 +46,10 @@ cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjby cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= -cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= +cloud.google.com/go/auth v0.8.1 h1:QZW9FjC5lZzN864p13YxvAtGUlQ+KgRL+8Sg45Z6vxo= +cloud.google.com/go/auth v0.8.1/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc= +cloud.google.com/go/auth/oauth2adapt v0.2.3 h1:MlxF+Pd3OmSudg/b1yZ5lJwoXCEaeedAguodky1PcKI= +cloud.google.com/go/auth/oauth2adapt v0.2.3/go.mod h1:tMQXOfZzFuNuUxOypHlQEXgdfX5cuhwU+ffUuXRJE8I= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -111,8 +111,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= -cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= +cloud.google.com/go/iam v1.1.12 h1:JixGLimRrNGcxvJEQ8+clfLxPlbeZA6MuRJ+qJNQ5Xw= +cloud.google.com/go/iam v1.1.12/go.mod h1:9LDX8J7dN5YRyzVHxwQzrQs9opFFqn0Mxs9nAeB+Hhg= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -229,6 +229,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25 github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DaevMithran/price-feeder v0.50.14-dm h1:q8SHfWIXpi9DJa5WSWGe8O3n6Uqdab3GfltDcLOOQV4= +github.com/DaevMithran/price-feeder v0.50.14-dm/go.mod h1:CSdgh7XiOMLGQwRW8OqbL5FlkE5Mc3+fDZEMRN8JkYY= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= @@ -258,13 +260,15 @@ github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= -github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.245 h1:KtY2s4q31/kn33AdV63R5t77mdxsI7rq3YT7Mgo805M= +github.com/aws/aws-sdk-go v1.44.245/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -276,20 +280,20 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= -github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= +github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= -github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= -github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= +github.com/bufbuild/protocompile v0.9.0 h1:DI8qLG5PEO0Mu1Oj51YFPqtx6I3qYXUAhJVJ/IzAVl0= +github.com/bufbuild/protocompile v0.9.0/go.mod h1:s89m1O8CqSYpyE/YaSGtg1r1YFMF5nLTwh4vlj6O444= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -342,8 +346,8 @@ github.com/cometbft/cometbft v0.38.17 h1:FkrQNbAjiFqXydeAO81FUzriL4Bz0abYxN/eOHr github.com/cometbft/cometbft v0.38.17/go.mod h1:5l0SkgeLRXi6bBfQuevXjKqML1jjfJJlvI1Ulp02/o4= github.com/cometbft/cometbft-db v0.14.1 h1:SxoamPghqICBAIcGpleHbmoPqy+crij/++eZz3DlerQ= github.com/cometbft/cometbft-db v0.14.1/go.mod h1:KHP1YghilyGV/xjD5DP3+2hyigWx0WTp9X+0Gnx0RxQ= -github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= -github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU= +github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -385,8 +389,8 @@ github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbd github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2EohgUadLkAbhoC4IyCFi89u/JQI= -github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= -github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= +github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -404,8 +408,8 @@ github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkz github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -433,8 +437,8 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -447,6 +451,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -476,9 +482,17 @@ github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ4 github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= +github.com/go-playground/validator/v10 v10.15.0 h1:nDU5XeOKtB3GEa+uB7GNYwhVKsgjAR7VgKoNB6ryXfw= +github.com/go-playground/validator/v10 v10.15.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -494,12 +508,6 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.2.3 h1:oDTdz9f5VGVVNGu/Q7UXKWYsD0873HXLHdJUNBsSEKM= @@ -596,8 +604,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= +github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -617,8 +625,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= -github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= +github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= +github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -673,8 +681,9 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -730,8 +739,8 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo= +github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -754,6 +763,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -823,6 +834,8 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/ojo-network/ojo v0.5.1 h1:WacNbXAyo4b3cR8Rt29IN78TJe4rMzK8eHXjt5wFXo4= +github.com/ojo-network/ojo v0.5.1/go.mod h1:Vg+kFS788VzLNJyKOMaEUiMfGcz8jTWqLc36JmysHYA= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -832,8 +845,8 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -842,8 +855,8 @@ github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdM github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= -github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= @@ -918,6 +931,8 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= +github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= +github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -931,6 +946,7 @@ github.com/rollchains/cosmos-sdk v0.50.11/go.mod h1:hrWEFMU1eoXqLJeE6VVESpJDQH67 github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= @@ -990,6 +1006,7 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= @@ -1037,10 +1054,10 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= @@ -1118,8 +1135,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1290,7 +1307,6 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1342,12 +1358,10 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1406,8 +1420,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= -golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1467,8 +1481,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= -google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= +google.golang.org/api v0.192.0 h1:PljqpNAfZaaSpS+TnANfnNAXKdzHM/B9bKhwRlo7JP0= +google.golang.org/api v0.192.0/go.mod h1:9VcphjvAxPKLmSxVSzPlSRXy/5ARMEw5bf58WoVXafQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1499,6 +1513,7 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1583,8 +1598,8 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= +google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf h1:OqdXDEakZCVtDiZTjcxfwbHPCT11ycCEsTKesBVKvyY= +google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:mCr1K1c8kX+1iSBREvU3Juo11CB+QOEWxbRS01wWl5M= google.golang.org/genproto/googleapis/api v0.0.0-20241202173237-19429a94021a h1:OAiGFfOiA0v9MRYsSidp3ubZaBnteRUyn3xB2ZQ5G/E= google.golang.org/genproto/googleapis/api v0.0.0-20241202173237-19429a94021a/go.mod h1:jehYqy3+AhJU9ve55aNOaSml7wUXjF9x6z2LcCfpAhY= google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a h1:hgh8P4EuoxpsuKMXX/To36nOFD7vixReXgn8lPGnt+o= diff --git a/pricefeeder/config.go b/pricefeeder/config.go new file mode 100644 index 0000000..71007a9 --- /dev/null +++ b/pricefeeder/config.go @@ -0,0 +1,76 @@ +package pricefeeder + +import ( + "fmt" + + servertypes "github.com/cosmos/cosmos-sdk/server/types" + "github.com/spf13/cast" +) + +const ( + DefaultConfigTemplate = ` +[pricefeeder] +# Path to price feeder config file. +config_path = "" + +# Log level of price feeder process. +log_level = "info" + +# Enable the price feeder. +enable = false +` +) + +const ( + FlagConfigPath = "pricefeeder.config_path" + FlagLogLevel = "pricefeeder.log_level" + FlagEnablePriceFeeder = "pricefeeder.enable" +) + +// AppConfig defines the app configuration for the price feeder that must be set in the app.toml file. +type AppConfig struct { + ConfigPath string `mapstructure:"config_path"` + LogLevel string `mapstructure:"log_level"` + Enable bool `mapstructure:"enable"` +} + +// ValidateBasic performs basic validation of the price feeder app config. +func (c *AppConfig) ValidateBasic() error { + if c.ConfigPath == "" { + return fmt.Errorf("path to price feeder config must be set") + } + + return nil +} + +// ReadConfigFromAppOpts reads the config parameters from the AppOptions and returns the config. +func ReadConfigFromAppOpts(opts servertypes.AppOptions) (AppConfig, error) { + var ( + cfg AppConfig + err error + ) + + if v := opts.Get(FlagConfigPath); v != nil { + if cfg.ConfigPath, err = cast.ToStringE(v); err != nil { + return cfg, err + } + } + + if v := opts.Get(FlagLogLevel); v != nil { + if cfg.LogLevel, err = cast.ToStringE(v); err != nil { + return cfg, err + } + } + + if v := opts.Get(FlagEnablePriceFeeder); v != nil { + if cfg.Enable, err = cast.ToBoolE(v); err != nil { + return cfg, err + } + } + + if err := cfg.ValidateBasic(); err != nil { + return cfg, err + } + + return cfg, err +} diff --git a/pricefeeder/price-feeder.toml b/pricefeeder/price-feeder.toml new file mode 100644 index 0000000..ee39a01 --- /dev/null +++ b/pricefeeder/price-feeder.toml @@ -0,0 +1,40 @@ +gas_adjustment = 1 +provider_timeout = "1000000s" + +[server] +listen_addr = "0.0.0.0:7171" +read_timeout = "20s" +verbose_cors = true +write_timeout = "20s" + +[rpc] +grpc_endpoint = "localhost:9090" +rpc_timeout = "100ms" +tmrpc_endpoint = "http://localhost:26657" + +[telemetry] +enable-hostname = true +enable-hostname-label = true +enable-service-label = true +# This will not be enabled if default telemetry is already enabled in the cheqd app config +# and the pricefeeder is not running as a separate process (i.e., it is running within the app binary). +# Pricefeeder metrics will still be recorded regardless. +enabled = true +global-labels = [["chain_id", "cheqd"]] +# This service-name will not be used if default telemetry is already enabled in the cheqd app config +# and the pricefeeder is not running as a separate process (i.e., it is running within the app binary). +service-name = "price-feeder" +prometheus-retention-time = 100 + +[[provider_endpoints]] +name = "mexc" +rest = "https://api.mexc.com/" +websocket = "wbs-api.mexc.com" + +[[provider_endpoints]] +name = "coinbase" +rest = "https://api.exchange.coinbase.com" +websocket = "ws-feed.exchange.coinbase.com" + +## The application currently uses two providers: MEXC and Coinbase. +## You can update the rest and websocket endpoints for these providers as needed. diff --git a/pricefeeder/pricefeeder.go b/pricefeeder/pricefeeder.go new file mode 100644 index 0000000..5fbc05c --- /dev/null +++ b/pricefeeder/pricefeeder.go @@ -0,0 +1,179 @@ +package pricefeeder + +import ( + "context" + "fmt" + "net/http" + "os" + "os/signal" + "syscall" + "time" + + "github.com/mitchellh/mapstructure" + + "github.com/gorilla/mux" + "github.com/rs/zerolog" + "golang.org/x/sync/errgroup" + + "github.com/cosmos/cosmos-sdk/telemetry" + + "github.com/DaevMithran/dmchain/x/oracle/types" + + "github.com/ojo-network/price-feeder/config" + "github.com/ojo-network/price-feeder/oracle" + "github.com/ojo-network/price-feeder/oracle/client" + v1 "github.com/ojo-network/price-feeder/router/v1" +) + +type PriceFeeder struct { + Oracle *oracle.Oracle + AppConfig AppConfig +} + +func (pf *PriceFeeder) Start(currentBlockHeight int64, oracleParams types.Params) error { + logWriter := zerolog.ConsoleWriter{Out: os.Stderr} + logLevel, err := zerolog.ParseLevel(pf.AppConfig.LogLevel) + if err != nil { + return err + } + logger := zerolog.New(logWriter).Level(logLevel).With().Timestamp().Logger() + cfg, err := config.LoadConfigFromFlags(pf.AppConfig.ConfigPath, "") + if err != nil { + return err + } + // listen for and trap any OS signal to gracefully shutdown and exit + ctx, cancel := context.WithCancel(context.TODO()) + g, ctx := errgroup.WithContext(ctx) + + trapSignal(cancel, logger) + + providerTimeout, err := time.ParseDuration(cfg.ProviderTimeout) + if err != nil { + return fmt.Errorf("failed to parse provider timeout: %w", err) + } + + providers := oracle.CreatePairProvidersFromCurrencyPairProvidersList(oracleParams.CurrencyPairProviders) + deviations, err := oracle.CreateDeviationsFromCurrencyDeviationThresholdList(oracleParams.CurrencyDeviationThresholds) + if err != nil { + return err + } + o := oracle.New( + logger, + client.OracleClient{}, + providers, + providerTimeout, + deviations, + cfg.ProviderEndpointsMap(), + true, + ) + pf.SetOracle(o) + + var metrics *telemetry.Metrics + + // check if app telemetry is already running + if !telemetry.IsTelemetryEnabled() { + telemetryCfg := telemetry.Config{} + err = mapstructure.Decode(cfg.Telemetry, &telemetryCfg) + if err != nil { + return err + } + + metrics, err = telemetry.New(telemetryCfg) + if err != nil { + return err + } + } else { + // disable price feeder telemetry and use app telemetry instead + cfg.Telemetry.Enabled = false + metrics = nil + } + + g.Go(func() error { + // start the process that observes and publishes exchange prices + return startPriceFeeder(ctx, logger, cfg, pf.Oracle, metrics) + }) + + // Block main process until all spawned goroutines have gracefully exited and + // signal has been captured in the main process or if an error occurs. + return g.Wait() +} + +// trapSignal will listen for any OS signal and invoke Done on the main +// WaitGroup allowing the main process to gracefully exit. +func trapSignal(cancel context.CancelFunc, logger zerolog.Logger) { + sigCh := make(chan os.Signal, 1) + + signal.Notify(sigCh, syscall.SIGTERM) + signal.Notify(sigCh, syscall.SIGINT) + + go func() { + sig := <-sigCh + logger.Info().Str("signal", sig.String()).Msg("caught signal; shutting down...") + cancel() + }() +} + +func (pf *PriceFeeder) SetOracle(o *oracle.Oracle) { + pf.Oracle = o +} + +func (pf *PriceFeeder) GetOracle() *oracle.Oracle { + return pf.Oracle +} + +// startPriceFeeder starts the price feeder server which listens to websocket connections +// from price providers. +func startPriceFeeder( + ctx context.Context, + logger zerolog.Logger, + cfg config.Config, + oracle *oracle.Oracle, + metrics *telemetry.Metrics, +) error { + rtr := mux.NewRouter() + v1Router := v1.New(logger, cfg, oracle, metrics) + v1Router.RegisterRoutes(rtr, v1.APIPathPrefix) + + writeTimeout, err := time.ParseDuration(cfg.Server.WriteTimeout) + if err != nil { + return err + } + readTimeout, err := time.ParseDuration(cfg.Server.ReadTimeout) + if err != nil { + return err + } + + srvErrCh := make(chan error, 1) + srv := &http.Server{ + Handler: rtr, + Addr: cfg.Server.ListenAddr, + WriteTimeout: writeTimeout, + ReadTimeout: readTimeout, + ReadHeaderTimeout: readTimeout, + } + + go func() { + logger.Info().Str("listen_addr", cfg.Server.ListenAddr).Msg("starting price-feeder server...") + srvErrCh <- srv.ListenAndServe() + }() + + for { + select { + case <-ctx.Done(): + shutdownCtx, cancel := context.WithTimeout(ctx, 15*time.Second) + defer cancel() + + logger.Info().Str("listen_addr", cfg.Server.ListenAddr).Msg("shutting down price-feeder server...") + if err := srv.Shutdown(shutdownCtx); err != nil { + logger.Error().Err(err).Msg("failed to gracefully shutdown price-feeder server") + return err + } + + return nil + + case err := <-srvErrCh: + logger.Error().Err(err).Msg("failed to start price-feeder server") + return err + } + } +} diff --git a/proto/.DS_Store b/proto/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..028d882867029d32c0c4b2a5b47cf9597d543f80 GIT binary patch literal 6148 zcmeHKOHRWu5PcJh6vU>84af?dwQQMe$y@mPV7W{XfY zBaNRwGh_QX%Gdy;+}>RPa{wt-F*#zfLv&nqBuVT!Bua=;;~tO5QKKDMd&hrdK+o<3 z6}ET?=k|SmdWJdPaElF^tEOF6O9L`g&VV!E z4D<}>{~@C)77;tc@atfqS0){wDXOrp7evJ@ViB=3bIt#k)9?SGlee4!XJD@wklEsTQF2Q$ yw~jWaxi+KTP*v2fGwfYh38|R2nu^b;LD-*Zg;+%F4B12Ri$I{k3uoX@8TbM gov1b1.MaxTitleLength { + return fmt.Errorf("proposal title is longer than max length of %d", gov1b1.MaxTitleLength) + } + + if len(description) == 0 { + return errors.New("proposal description cannot be blank") + } + if len(description) > gov1b1.MaxDescriptionLength { + return fmt.Errorf( + "proposal description is longer than max length of %d", + gov1b1.MaxDescriptionLength, + ) + } + + return nil +} diff --git a/util/checkers/sign.go b/util/checkers/sign.go new file mode 100644 index 0000000..de324cc --- /dev/null +++ b/util/checkers/sign.go @@ -0,0 +1,14 @@ +package checkers + +import sdk "github.com/cosmos/cosmos-sdk/types" + +// Signers converts signer bech32 addresses to sdk.AccAddress list. The function +// ignores errors. It is supposed to be used within Msg.GetSigners implementation. +func Signers(signers ...string) []sdk.AccAddress { + as := make([]sdk.AccAddress, len(signers)) + for i := range signers { + a, _ := sdk.AccAddressFromBech32(signers[i]) + as[i] = a + } + return as +} diff --git a/util/cli/print.go b/util/cli/print.go new file mode 100644 index 0000000..ea96e61 --- /dev/null +++ b/util/cli/print.go @@ -0,0 +1,15 @@ +package cli + +import ( + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/gogoproto/proto" +) + +// PrintOrErr formats and print proto message to the standard output, unless the error +// is not nil. +func PrintOrErr(resp proto.Message, err error, cctx client.Context) error { + if err != nil { + return err + } + return cctx.PrintProto(resp) +} diff --git a/util/coin/math.go b/util/coin/math.go new file mode 100644 index 0000000..9fd5e16 --- /dev/null +++ b/util/coin/math.go @@ -0,0 +1,45 @@ +package coin + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// TODO: add unit tests for `util/coin/math.go` +// DecBld is a Builder pattern for dec coin +type DecBld struct { + D sdk.DecCoin +} + +// NewDecBld is a constructor for DecBld type +func NewDecBld(d sdk.DecCoin) *DecBld { + return &DecBld{D: d} +} + +// Scale scales dec coin by given factor +func (d *DecBld) Scale(f int64) *DecBld { + d.D = sdk.DecCoin{Denom: d.D.Denom, Amount: d.D.Amount.MulInt64(f)} + return d +} + +// Scale scales dec coin by given factor provided as string. +// Panics if f is not a correct decimal number. +func (d *DecBld) ScaleStr(f string) *DecBld { + d.D = sdk.DecCoin{Denom: d.D.Denom, Amount: d.D.Amount.Mul(math.LegacyMustNewDecFromStr(f))} + return d +} + +// ToCoin converts DecCoin to sdk.Coin rounding up +func (d *DecBld) ToCoin() sdk.Coin { + return sdk.NewCoin(d.D.Denom, d.D.Amount.Ceil().RoundInt()) +} + +// ToCoins converts DecCoin to sdk.Coins rounding up +func (d *DecBld) ToCoins() sdk.Coins { + return sdk.Coins{d.ToCoin()} +} + +// ToCoin converts DecCoin to sdk.DecCoins +func (d *DecBld) ToDecCoins() sdk.DecCoins { + return sdk.DecCoins{d.D} +} diff --git a/util/decmath/decmath.go b/util/decmath/decmath.go new file mode 100644 index 0000000..8fedf09 --- /dev/null +++ b/util/decmath/decmath.go @@ -0,0 +1,109 @@ +package decmath + +import ( + "fmt" + "sort" + "strconv" + + "cosmossdk.io/math" +) + +var ErrEmptyList = fmt.Errorf("empty price list passed in") + +// Median returns the median of a list of math.LegacyDec. Returns error +// if ds is empty list. +func Median(ds []math.LegacyDec) (math.LegacyDec, error) { + if len(ds) == 0 { + return math.LegacyZeroDec(), ErrEmptyList + } + + sort.Slice(ds, func(i, j int) bool { + return ds[i].BigInt(). + Cmp(ds[j].BigInt()) < 0 + }) + + if len(ds)%2 == 0 { + return ds[len(ds)/2-1]. + Add(ds[len(ds)/2]). + QuoInt64(2), nil + } + return ds[len(ds)/2], nil +} + +// MedianDeviation returns the standard deviation around the +// median of a list of math.LegacyDec. Returns error if ds is empty list. +// MedianDeviation = ∑((d - median)^2 / len(ds)) +func MedianDeviation(median math.LegacyDec, ds []math.LegacyDec) (math.LegacyDec, error) { + if len(ds) == 0 { + return math.LegacyZeroDec(), ErrEmptyList + } + + variance := math.LegacyZeroDec() + for _, d := range ds { + variance = variance.Add( + d.Sub(median).Abs().Power(2).QuoInt64(int64(len(ds)))) + } + + medianDeviation, err := variance.ApproxSqrt() + if err != nil { + return math.LegacyZeroDec(), err + } + + return medianDeviation, nil +} + +// Average returns the average value of a list of math.LegacyDec. Returns error +// if ds is empty list. +func Average(ds []math.LegacyDec) (math.LegacyDec, error) { + if len(ds) == 0 { + return math.LegacyZeroDec(), ErrEmptyList + } + + sumPrices := math.LegacyZeroDec() + for _, d := range ds { + sumPrices = sumPrices.Add(d) + } + + return sumPrices.QuoInt64(int64(len(ds))), nil +} + +// Max returns the max value of a list of math.LegacyDec. Returns error +// if ds is empty list. +func Max(ds []math.LegacyDec) (math.LegacyDec, error) { + if len(ds) == 0 { + return math.LegacyZeroDec(), ErrEmptyList + } + + max := ds[0] + for _, d := range ds[1:] { + if d.GT(max) { + max = d + } + } + + return max, nil +} + +// Min returns the min value of a list of math.LegacyDec. Returns error +// if ds is empty list. +func Min(ds []math.LegacyDec) (math.LegacyDec, error) { + if len(ds) == 0 { + return math.LegacyZeroDec(), ErrEmptyList + } + + min := ds[0] + for _, d := range ds[1:] { + if d.LT(min) { + min = d + } + } + + return min, nil +} + +// NewDecFromFloat converts a float64 into a math.LegacyDec. Returns error +// if float64 cannot be converted into a string, or into a subsequent +// math.LegacyDec. +func NewDecFromFloat(f float64) (math.LegacyDec, error) { + return math.LegacyNewDecFromStr(strconv.FormatFloat(f, 'f', -1, 64)) +} diff --git a/util/decmath/decmath_test.go b/util/decmath/decmath_test.go new file mode 100644 index 0000000..2d69fff --- /dev/null +++ b/util/decmath/decmath_test.go @@ -0,0 +1,145 @@ +package decmath + +import ( + "testing" + + "cosmossdk.io/math" + "github.com/stretchr/testify/require" +) + +func TestMedian(t *testing.T) { + require := require.New(t) + prices := []math.LegacyDec{ + math.LegacyMustNewDecFromStr("1.12"), + math.LegacyMustNewDecFromStr("1.07"), + math.LegacyMustNewDecFromStr("1.11"), + math.LegacyMustNewDecFromStr("1.2"), + } + + median, err := Median(prices) + require.NoError(err) + require.Equal(math.LegacyMustNewDecFromStr("1.115"), median) + + // test empty prices list + _, err = Median([]math.LegacyDec{}) + require.ErrorIs(err, ErrEmptyList) +} + +func TestMedianDeviation(t *testing.T) { + require := require.New(t) + prices := []math.LegacyDec{ + math.LegacyMustNewDecFromStr("1.12"), + math.LegacyMustNewDecFromStr("1.07"), + math.LegacyMustNewDecFromStr("1.11"), + math.LegacyMustNewDecFromStr("1.2"), + } + median := math.LegacyMustNewDecFromStr("1.115") + + medianDeviation, err := MedianDeviation(median, prices) + require.NoError(err) + require.Equal(math.LegacyMustNewDecFromStr("0.048218253804964775"), medianDeviation) + + // test empty prices list + _, err = MedianDeviation(median, []math.LegacyDec{}) + require.ErrorIs(err, ErrEmptyList) +} + +func TestAverage(t *testing.T) { + require := require.New(t) + prices := []math.LegacyDec{ + math.LegacyMustNewDecFromStr("1.12"), + math.LegacyMustNewDecFromStr("1.07"), + math.LegacyMustNewDecFromStr("1.11"), + math.LegacyMustNewDecFromStr("1.2"), + } + + average, err := Average(prices) + require.NoError(err) + require.Equal(math.LegacyMustNewDecFromStr("1.125"), average) + + // test empty prices list + _, err = Average([]math.LegacyDec{}) + require.ErrorIs(err, ErrEmptyList) +} + +func TestMin(t *testing.T) { + require := require.New(t) + prices := []math.LegacyDec{ + math.LegacyMustNewDecFromStr("1.12"), + math.LegacyMustNewDecFromStr("1.07"), + math.LegacyMustNewDecFromStr("1.11"), + math.LegacyMustNewDecFromStr("1.2"), + } + + min, err := Min(prices) + require.NoError(err) + require.Equal(math.LegacyMustNewDecFromStr("1.07"), min) + + // test empty prices list + _, err = Min([]math.LegacyDec{}) + require.ErrorIs(err, ErrEmptyList) +} + +func TestMax(t *testing.T) { + require := require.New(t) + prices := []math.LegacyDec{ + math.LegacyMustNewDecFromStr("1.12"), + math.LegacyMustNewDecFromStr("1.07"), + math.LegacyMustNewDecFromStr("1.11"), + math.LegacyMustNewDecFromStr("1.2"), + } + + max, err := Max(prices) + require.NoError(err) + require.Equal(math.LegacyMustNewDecFromStr("1.2"), max) + + // test empty prices list + _, err = Max([]math.LegacyDec{}) + require.ErrorIs(err, ErrEmptyList) +} + +func TestNewDecFromFloat(t *testing.T) { + testCases := []struct { + name string + float float64 + dec math.LegacyDec + expectPass bool + }{ + { + name: "max float64 precision", + float: 1.000_000_000_000_001, + dec: math.LegacyMustNewDecFromStr("1.000000000000001"), + expectPass: true, + }, + { + name: "over max float64 precision", + float: 1.000_000_000_000_000_1, + dec: math.LegacyMustNewDecFromStr("1"), + expectPass: true, + }, + { + name: "simple float", + float: 2999999.9, + dec: math.LegacyMustNewDecFromStr("2999999.9"), + expectPass: true, + }, + { + name: "negative float", + float: -10.598, + dec: math.LegacyMustNewDecFromStr("-10.598"), + expectPass: true, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + dec, err := NewDecFromFloat(tc.float) + if tc.expectPass { + require.NoError(t, err) + require.Equal(t, tc.dec, dec) + } else { + require.Error(t, err) + } + }) + } +} diff --git a/util/genmap/doc.go b/util/genmap/doc.go new file mode 100644 index 0000000..17a6022 --- /dev/null +++ b/util/genmap/doc.go @@ -0,0 +1,2 @@ +// Package genmap provides generic functions for manipulating maps. +package genmap diff --git a/util/genmap/genmap.go b/util/genmap/genmap.go new file mode 100644 index 0000000..c50ddda --- /dev/null +++ b/util/genmap/genmap.go @@ -0,0 +1,14 @@ +package genmap + +// Pick creats a new map based on `m` by selecting entries from `keys`. +// If a key is in keys, but not map, then it's not included. +// Map keys and values are copied. +func Pick[K comparable, V any](m map[K]V, keys []K) map[K]V { + picked := make(map[K]V) + for i := range keys { + if v, ok := m[keys[i]]; ok { + picked[keys[i]] = v + } + } + return picked +} diff --git a/util/genmap/genmap_test.go b/util/genmap/genmap_test.go new file mode 100644 index 0000000..6115e3f --- /dev/null +++ b/util/genmap/genmap_test.go @@ -0,0 +1,29 @@ +package genmap + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestPick(t *testing.T) { + require := require.New(t) + m := map[string]int{ + "one": 1, "two": 2, "three": 3, + } + + m2 := Pick(m, []string{"one"}) + require.Equal(map[string]int{"one": 1}, m2) + + m2 = Pick(m, []string{"two"}) + require.Equal(map[string]int{"two": 2}, m2) + + m2 = Pick(m, []string{"one", "three"}) + require.Equal(map[string]int{"one": 1, "three": 3}, m2) + + m2 = Pick(m, []string{}) + require.Equal(map[string]int{}, m2) + + m2 = Pick(m, []string{"other"}) + require.Equal(map[string]int{}, m2) +} diff --git a/util/genmap/list.go b/util/genmap/list.go new file mode 100644 index 0000000..610c40b --- /dev/null +++ b/util/genmap/list.go @@ -0,0 +1,11 @@ +package genmap + +// Contains returns true if x is in ls +func Contains[T comparable](x T, ls []T) bool { + for i := range ls { + if ls[i] == x { + return true + } + } + return false +} diff --git a/util/int_convert.go b/util/int_convert.go new file mode 100644 index 0000000..d822c28 --- /dev/null +++ b/util/int_convert.go @@ -0,0 +1,45 @@ +package util + +import ( + "math" +) + +func SafeIntToUint32(i int) uint32 { + if i < 0 { + return 0 + } + if i > math.MaxUint32 { + return math.MaxUint32 + } + return uint32(i) +} + +func SafeIntToUint64(i int) uint64 { + if i < 0 { + return 0 + } + + return uint64(i) +} + +func SafeInt64ToUint64(i int64) uint64 { + if i < 0 { + return 0 + } + + return uint64(i) +} + +func SafeUint64ToUint32(i uint64) uint32 { + if i > math.MaxUint32 { + return math.MaxUint32 + } + return uint32(i) +} + +func SafeUint64ToInt64(i uint64) int64 { + if i > math.MaxInt64 { + return math.MaxInt64 + } + return int64(i) +} diff --git a/util/metrics/metrics.go b/util/metrics/metrics.go new file mode 100644 index 0000000..18e8e68 --- /dev/null +++ b/util/metrics/metrics.go @@ -0,0 +1,50 @@ +package metrics + +import ( + "cosmossdk.io/math" + "github.com/armon/go-metrics" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + missCounterLabel = "miss_counter" + exchangeRateLabel = "exchange_rate" + medianPriceLabel = "median_price" + medianDeviationPriceLabel = "median_deviation_price" +) + +// RecordMissCounter records the miss counter gauge for a validator +func RecordMissCounter(operator sdk.ValAddress, missCounter uint64) { + metrics.SetGaugeWithLabels( + []string{missCounterLabel}, + float32(missCounter), + []metrics.Label{{Name: "address", Value: operator.String()}}, + ) +} + +// RecordExchangeRate records the exchange rate gauge for a denom +func RecordExchangeRate(denom string, exchangeRate math.LegacyDec) { + metrics.SetGaugeWithLabels( + []string{exchangeRateLabel}, + float32(exchangeRate.MustFloat64()), + []metrics.Label{{Name: "denom", Value: denom}}, + ) +} + +// RecordAggregateExchangeRate records the median price gauge for a denom +func RecordMedianPrice(denom string, price math.LegacyDec) { + metrics.SetGaugeWithLabels( + []string{medianPriceLabel}, + float32(price.MustFloat64()), + []metrics.Label{{Name: "denom", Value: denom}}, + ) +} + +// RecordAggregateExchangeRate records the median deviation price gauge for a denom +func RecordMedianDeviationPrice(denom string, price math.LegacyDec) { + metrics.SetGaugeWithLabels( + []string{medianDeviationPriceLabel}, + float32(price.MustFloat64()), + []metrics.Label{{Name: "denom", Value: denom}}, + ) +} diff --git a/util/ptr.go b/util/ptr.go new file mode 100644 index 0000000..89ab595 --- /dev/null +++ b/util/ptr.go @@ -0,0 +1,22 @@ +package util + +import ( + sdkmath "cosmossdk.io/math" +) + +const ( + CheqExponent = 9 + UsdScaleExponent = 6 +) + +var ( + CheqScale = sdkmath.NewIntWithDecimal(1, CheqExponent) + UsdScale = sdkmath.NewIntWithDecimal(1, UsdScaleExponent) + UsdFrom18To6 = sdkmath.NewInt(1_000_000_000_000) + UsdExponent = sdkmath.NewIntWithDecimal(1, 18) +) + +func PtrInt(val int64) *sdkmath.Int { + i := sdkmath.NewInt(val) + return &i +} diff --git a/util/reward/reward.go b/util/reward/reward.go new file mode 100644 index 0000000..9319397 --- /dev/null +++ b/util/reward/reward.go @@ -0,0 +1,21 @@ +package reward + +import ( + "math" +) + +// CalculateRewardFactor returns the reward factor calculated using a logarmithic +// model based on miss counters. missCount is the current miss count, m is the +// maximum possible miss counts, and s is the smallest miss count in the period. +// If the logarimthic function returns NaN or Inf the Reward Factor returned will be 0. +// rewardFactor = 1 - logₘ₋ₛ₊₁(missCount - s + 1) +func CalculateRewardFactor(missCount, m, s int64) float64 { + logBase := float64(m-s) + 1 + logKey := float64(missCount-s) + 1 + rewardFactor := 1 - (math.Log(logKey) / math.Log(logBase)) + if math.IsNaN(rewardFactor) || math.IsInf(rewardFactor, 0) { + rewardFactor = 0 + } + + return rewardFactor +} diff --git a/util/sim/deliver.go b/util/sim/deliver.go new file mode 100644 index 0000000..6be3781 --- /dev/null +++ b/util/sim/deliver.go @@ -0,0 +1,46 @@ +package sim + +import ( + "fmt" + + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" + "github.com/cosmos/cosmos-sdk/x/simulation" + + "github.com/DaevMithran/dmchain/util" + "github.com/DaevMithran/dmchain/util/coin" +) + +// GenAndDeliverTxWithRandFees generates a transaction with a random fee and delivers it. +// If gasLimit==0 then appparams default gas limit is used. +func GenAndDeliver(bk bankkeeper.Keeper, o simulation.OperationInput, gasLimit storetypes.Gas, +) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + if gasLimit == 0 { + gasLimit = 10 + } + account := o.AccountKeeper.GetAccount(o.Context, o.SimAccount.Address) + spendable := o.Bankkeeper.SpendableCoins(o.Context, account.GetAddress()) + + _, hasNeg := spendable.SafeSub(o.CoinsSpentInMsg...) + if hasNeg { + return simtypes.NoOpMsg(o.ModuleName, o.Msg.String(), "message doesn't leave room for fees"), nil, nil + } + + fees := coin.NewDecBld(types.NewDecCoin("ncheq", math.NewInt(10))). + Scale(util.SafeUint64ToInt64(gasLimit)).ToCoins() + if _, hasNeg = spendable.SafeSub(fees...); hasNeg { + fund := coin.NewDecBld(types.NewDecCoin("ncheq", math.NewInt(10))). + Scale(util.SafeUint64ToInt64(gasLimit * 1000)).ToCoins() + err := banktestutil.FundAccount(o.Context, bk, o.SimAccount.Address, fund) + if err != nil { + return simtypes.NewOperationMsg(o.Msg, false, o.ModuleName), nil, + fmt.Errorf("can't fund account [%s] to pay fees; [%w]", o.SimAccount.Address, err) + } + } + + return simulation.GenAndDeliverTx(o, fees) +} diff --git a/util/sim/params.go b/util/sim/params.go new file mode 100644 index 0000000..c26b1bf --- /dev/null +++ b/util/sim/params.go @@ -0,0 +1,6 @@ +package sim + +const ( + DefaultWeightMsgSend = 100 // from simappparams.DefaultWeightMsgSend + DefaultWeightMsgSetWithdrawAddress = 50 // from simappparams.DefaultWeightMsgSetWithdrawAddress +) diff --git a/util/strings.go b/util/strings.go new file mode 100644 index 0000000..6d80f00 --- /dev/null +++ b/util/strings.go @@ -0,0 +1,17 @@ +package util + +// AppendUniqueString will append a string to a slice +// if and only if the string is not already in +// the slice. +func AppendUniqueString(keys []string, key string) []string { + duplicate := false + for _, v := range keys { + if key == v { + duplicate = true + } + } + if !duplicate { + keys = append(keys, key) + } + return keys +} diff --git a/util/strings_test.go b/util/strings_test.go new file mode 100644 index 0000000..eaef414 --- /dev/null +++ b/util/strings_test.go @@ -0,0 +1,16 @@ +package util + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestAppendString(t *testing.T) { + list := []string{"foo", "bar"} + + appended := AppendUniqueString(list, "baz") + require.Equal(t, appended[2], "baz") + appended = AppendUniqueString(list, "baz") + require.Equal(t, len(appended), 3) +} diff --git a/x/.DS_Store b/x/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..57418f2f76c335367a9847dfdadac11a238f7676 GIT binary patch literal 6148 zcmeHKPfrs;6n_I%wji=Vix@T8*oz5GME+=u2bY2|!~=vSSOQpf+o7&3Gj(@MMMBcE zegLl~egLl?^#kb9s|UY;7ti|UPXiUb8e`@qGrza*&&<5vW@mN)fRviG8vr%{Sl9$+ z`my_s2)}5jq(@tN5s4fl0vfcEMiBAfRJ1V|1`GrL8Uy0nJqsLS@SzIb-|xGi5rs)Q zIr*9N^k&YS?X&u<0c*>9%v)aSr_H3~#~b2lmGda*=zg#k(pJUJ&2yIeA)~QO2x}BW zHXnwp##<%cWVJ-*ddgvCt!%{}KRleCohdrgGgC)J=kWH_WYL+KzIk+%wep4QcUCI9 z(H`S36o~})94UhuJMa>fuA0K?zTT6_$4*UOY`arcwtwK<;Q1kYcw}@qH=NJs$1aRt z9JzG4Vvh!Xb+;ai)z0&X$EB!AEA~)=H7`~=;Kv(yWpqif`sgcVwQbZlBZ zXkbk4*dPbJA5+RU>Ty_G+Sy5HT0Wt#i`l9%kD_IsglWjx`lg&crF)BPhvST51xpR# zO4ewcAfC!8ulsTAvpOvuY(;)Rqa{}2Y0CG?Ayy$)E~oSwel=wE!rgC*$!x*BrZgK0 z9dfN)N7G0O@2jt+zREbGn6#`s1^0mtv0wt`z=KVA3T=1=Z{RI_fKTuhzQYePNXE!j zGC_)DmfRvPnIkJ?gKQI@JW=^QofmyYkEekosC2#PeJ^GaXLYo9a=KH@(+LJNMb^Lx zn^6q|h5^HXU_k5-jz(8wTcO-Ku#;B+#0;9Hpf2tbBG=LAYHTY+4+>GKh$@xnD+W>N zXm@m+tFf(6r32BI529x#`i4T}>^Qz7!-2R8O>Y=540JOf{{2yGasJ=?^Zj22na(g^ z82CRKAejYkp@g;Rv-MP!;;ePBZDSK6;@S#j3U>N9mWnuv$FWI4pCc4RS7TctT2Rc7 NfTY26hJnAzz)u;C%Xt6* literal 0 HcmV?d00001 diff --git a/x/multisig/types/genesis.pb.go b/x/multisig/types/genesis.pb.go index da5e133..92b6c3a 100644 --- a/x/multisig/types/genesis.pb.go +++ b/x/multisig/types/genesis.pb.go @@ -122,7 +122,7 @@ func init() { func init() { proto.RegisterFile("multisig/v1/genesis.proto", fileDescriptor_8e8f892d9f3b1e70) } var fileDescriptor_8e8f892d9f3b1e70 = []byte{ - // 263 bytes of a gzipped FileDescriptorProto + // 256 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x2d, 0xcd, 0x29, 0xc9, 0x2c, 0xce, 0x4c, 0xd7, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x86, 0x49, 0xe9, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, @@ -133,13 +133,12 @@ var fileDescriptor_8e8f892d9f3b1e70 = []byte{ 0x20, 0xa8, 0x42, 0x25, 0x57, 0x2e, 0x36, 0x88, 0xb8, 0x90, 0x2c, 0x17, 0x57, 0x71, 0x7e, 0x6e, 0x6a, 0x7c, 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x47, 0x10, 0x27, 0x48, 0x24, 0x0c, 0x24, 0x60, 0x25, 0x33, 0x63, 0x81, 0x3c, 0xc3, 0x8b, 0x05, 0xf2, 0x8c, 0x5d, 0xcf, - 0x37, 0x68, 0xf1, 0xc3, 0x7d, 0x02, 0x31, 0xc6, 0x29, 0xe0, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, + 0x37, 0x68, 0xf1, 0xc3, 0x7d, 0x02, 0x31, 0xc6, 0xc9, 0xf3, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, - 0x8f, 0xe5, 0x18, 0xa2, 0xcc, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, - 0x5d, 0x12, 0x53, 0xcb, 0x7c, 0x33, 0x4b, 0x32, 0x8a, 0x12, 0xf3, 0xf4, 0x93, 0xf3, 0x8b, 0x73, - 0xf3, 0x8b, 0x75, 0x73, 0xf3, 0x53, 0x4a, 0x73, 0x52, 0x8b, 0xf5, 0x2b, 0xf4, 0xe1, 0x46, 0x96, - 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xbd, 0x68, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x3e, - 0x7a, 0x9d, 0x36, 0x35, 0x01, 0x00, 0x00, + 0x8f, 0xe5, 0x18, 0xa2, 0xf4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, + 0x5d, 0x12, 0x53, 0xcb, 0x7c, 0x33, 0x4b, 0x32, 0x8a, 0x12, 0xf3, 0xf4, 0x53, 0x72, 0x93, 0x33, + 0x12, 0x33, 0xf3, 0xf4, 0x2b, 0xf4, 0xe1, 0x66, 0x95, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, + 0xfd, 0x66, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xef, 0x20, 0xe4, 0x2e, 0x01, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/multisig/types/query.pb.go b/x/multisig/types/query.pb.go index b7ff03c..996af58 100644 --- a/x/multisig/types/query.pb.go +++ b/x/multisig/types/query.pb.go @@ -119,24 +119,24 @@ func init() { func init() { proto.RegisterFile("multisig/v1/query.proto", fileDescriptor_9222e50498641f83) } var fileDescriptor_9222e50498641f83 = []byte{ - // 270 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xc1, 0x4a, 0xc3, 0x40, - 0x14, 0x45, 0x1b, 0xc1, 0x2c, 0xa6, 0xbb, 0x89, 0xa2, 0x46, 0x19, 0x4b, 0x56, 0x82, 0x98, 0xa1, - 0x15, 0xfc, 0x80, 0xe2, 0x56, 0xa8, 0x2e, 0xdd, 0x4d, 0xeb, 0x23, 0x19, 0x48, 0xe6, 0x25, 0x79, - 0x93, 0x60, 0xb7, 0x7e, 0x81, 0xe0, 0x4f, 0xb9, 0x2c, 0xb8, 0x71, 0x29, 0x89, 0x1f, 0x22, 0x26, - 0x11, 0x53, 0xc4, 0xed, 0xbb, 0x87, 0x73, 0xef, 0x0c, 0x3b, 0x48, 0xcb, 0xc4, 0x6a, 0xd2, 0x91, - 0xac, 0xa6, 0x32, 0x2f, 0xa1, 0x58, 0x87, 0x59, 0x81, 0x16, 0xf9, 0xf8, 0x27, 0x08, 0xab, 0xa9, - 0x7f, 0x12, 0x21, 0x46, 0x09, 0x48, 0x95, 0x69, 0xa9, 0x8c, 0x41, 0xab, 0xac, 0x46, 0x43, 0x1d, - 0xea, 0x1f, 0x0d, 0x1d, 0x11, 0x18, 0x20, 0xdd, 0x47, 0xc1, 0x1e, 0xe3, 0xb7, 0xdf, 0xd2, 0x85, - 0x2a, 0x54, 0x4a, 0x77, 0x90, 0x97, 0x40, 0x36, 0x98, 0x33, 0x6f, 0xeb, 0x4a, 0x19, 0x1a, 0x02, - 0x7e, 0xce, 0xdc, 0xac, 0xbd, 0x1c, 0x3a, 0x13, 0xe7, 0x6c, 0x3c, 0xf3, 0xc2, 0xc1, 0x86, 0xb0, - 0x87, 0x7b, 0x64, 0x96, 0xb3, 0xdd, 0xd6, 0xc1, 0x63, 0xe6, 0x76, 0x11, 0x3f, 0xdd, 0xe2, 0xff, - 0xf6, 0xfa, 0x93, 0xff, 0x81, 0x6e, 0x42, 0x70, 0xfc, 0xf4, 0xf6, 0xf9, 0xb2, 0xb3, 0xcf, 0x3d, - 0x39, 0x7c, 0x53, 0x57, 0x39, 0x5f, 0xbc, 0xd6, 0xc2, 0xd9, 0xd4, 0xc2, 0xf9, 0xa8, 0x85, 0xf3, - 0xdc, 0x88, 0xd1, 0xa6, 0x11, 0xa3, 0xf7, 0x46, 0x8c, 0xee, 0xaf, 0x22, 0x6d, 0xe3, 0x72, 0x19, - 0xae, 0x30, 0x95, 0xd7, 0x0a, 0xaa, 0x1b, 0x6d, 0xe3, 0x42, 0x19, 0xb9, 0x42, 0x4a, 0x91, 0x2e, - 0x52, 0x7c, 0x28, 0x13, 0x20, 0xf9, 0xf8, 0x6b, 0xb5, 0xeb, 0x0c, 0x68, 0xe9, 0xb6, 0xbf, 0x74, - 0xf9, 0x15, 0x00, 0x00, 0xff, 0xff, 0x9d, 0xb3, 0x14, 0xa0, 0x86, 0x01, 0x00, 0x00, + // 264 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x2d, 0xcd, 0x29, + 0xc9, 0x2c, 0xce, 0x4c, 0xd7, 0x2f, 0x33, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x86, 0x49, 0xe8, 0x95, 0x19, 0x4a, 0xc9, 0xa4, 0xe7, 0xe7, 0xa7, + 0xe7, 0xa4, 0xea, 0x27, 0x16, 0x64, 0xea, 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x24, 0x96, 0x64, 0xe6, + 0xe7, 0x15, 0x43, 0x94, 0x4a, 0x49, 0x22, 0x9b, 0x91, 0x9e, 0x9a, 0x97, 0x5a, 0x9c, 0x09, 0x95, + 0x52, 0x12, 0xe1, 0x12, 0x0a, 0x04, 0x19, 0x1a, 0x90, 0x58, 0x94, 0x98, 0x5b, 0x1c, 0x94, 0x5a, + 0x58, 0x9a, 0x5a, 0x5c, 0xa2, 0xe4, 0xc4, 0x25, 0x8c, 0x22, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, + 0x2a, 0xa4, 0xcd, 0xc5, 0x56, 0x00, 0x16, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x12, 0xd6, + 0x43, 0x72, 0x83, 0x1e, 0x54, 0x31, 0x54, 0x89, 0x51, 0x21, 0x17, 0x2b, 0xd8, 0x0c, 0xa1, 0x0c, + 0x2e, 0x36, 0x88, 0x94, 0x90, 0x3c, 0x8a, 0x7a, 0x4c, 0x7b, 0xa5, 0x14, 0x70, 0x2b, 0x80, 0x38, + 0x41, 0x49, 0xba, 0xe9, 0xf2, 0x93, 0xc9, 0x4c, 0xa2, 0x42, 0xc2, 0xfa, 0xc8, 0x7e, 0x82, 0x58, + 0xe9, 0xe4, 0x79, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, + 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xfa, 0xe9, 0x99, + 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x2e, 0x89, 0xa9, 0x65, 0xbe, 0x99, 0x25, + 0x19, 0x45, 0x89, 0x79, 0xfa, 0x29, 0xb9, 0xc9, 0x19, 0x89, 0x99, 0x79, 0xfa, 0x15, 0x08, 0xe3, + 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xc1, 0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, + 0x7e, 0xa4, 0x66, 0x3d, 0x7f, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/multisig/types/state.pb.go b/x/multisig/types/state.pb.go index 11b0eaf..19fad51 100644 --- a/x/multisig/types/state.pb.go +++ b/x/multisig/types/state.pb.go @@ -219,37 +219,37 @@ func init() { func init() { proto.RegisterFile("multisig/v1/state.proto", fileDescriptor_a87be96daf13cd0b) } var fileDescriptor_a87be96daf13cd0b = []byte{ - // 479 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4f, 0x8b, 0xd3, 0x40, - 0x18, 0xc6, 0x3b, 0xed, 0x5a, 0x77, 0xc7, 0xee, 0x1a, 0x06, 0x71, 0x87, 0x55, 0x42, 0x2c, 0xb2, - 0xc4, 0x45, 0x13, 0x56, 0xc1, 0x83, 0x9e, 0xe2, 0x36, 0xab, 0x85, 0xfe, 0x09, 0x69, 0x16, 0x5c, - 0x2f, 0x61, 0x36, 0x19, 0x9a, 0x81, 0xa4, 0x13, 0x66, 0xa6, 0xc5, 0xfd, 0x12, 0x22, 0xe8, 0xd9, - 0xcf, 0xe3, 0x71, 0xc1, 0x8b, 0x47, 0x69, 0xbf, 0x81, 0x57, 0x2f, 0x92, 0x74, 0xd3, 0x16, 0x71, - 0x8f, 0xef, 0xf3, 0x3e, 0xef, 0xcc, 0xef, 0x7d, 0x79, 0xe0, 0x7e, 0x36, 0x4d, 0x15, 0x93, 0x6c, - 0x6c, 0xcf, 0x8e, 0x6d, 0xa9, 0x88, 0xa2, 0x56, 0x2e, 0xb8, 0xe2, 0xe8, 0x4e, 0xd5, 0xb0, 0x66, - 0xc7, 0x07, 0xfb, 0x11, 0x97, 0x19, 0x97, 0x36, 0x17, 0x59, 0xe1, 0xe3, 0x22, 0x5b, 0xba, 0xda, - 0x5f, 0x00, 0xbc, 0xdf, 0xbf, 0x36, 0x3a, 0x51, 0xc4, 0xa7, 0x13, 0xd5, 0xa1, 0x8a, 0xb0, 0x54, - 0x22, 0x0c, 0x6f, 0x4b, 0x36, 0x9e, 0x50, 0x21, 0x31, 0x30, 0x1a, 0x66, 0xcb, 0xaf, 0x4a, 0xf4, - 0x10, 0xee, 0xa8, 0x44, 0x50, 0x99, 0xf0, 0x34, 0xc6, 0x75, 0x03, 0x98, 0xbb, 0xfe, 0x5a, 0x40, - 0x0e, 0x84, 0x39, 0x15, 0x19, 0x93, 0x92, 0xf1, 0x09, 0x6e, 0x18, 0xc0, 0xdc, 0x7b, 0xfe, 0xc8, - 0xda, 0xa0, 0xb1, 0xaa, 0x0f, 0x3d, 0xc1, 0x73, 0x2e, 0x49, 0x1a, 0x5c, 0xe6, 0xd4, 0xdf, 0x18, - 0x6a, 0xff, 0x01, 0x70, 0xbb, 0x6a, 0xa2, 0x3d, 0x58, 0x67, 0x31, 0x06, 0x06, 0x30, 0xb7, 0xfc, - 0x3a, 0x8b, 0xd1, 0x13, 0xa8, 0x55, 0x8f, 0x85, 0x24, 0x8e, 0x05, 0x95, 0xb2, 0x84, 0x68, 0xf9, - 0x77, 0x2b, 0xdd, 0x59, 0xca, 0xe8, 0x01, 0xdc, 0x89, 0x48, 0x9a, 0x86, 0x09, 0x91, 0x49, 0x49, - 0xd2, 0xf2, 0xb7, 0x0b, 0xe1, 0x1d, 0x91, 0x49, 0xb1, 0x45, 0x4c, 0x73, 0x2e, 0x99, 0xe2, 0x02, - 0x6f, 0x95, 0xcd, 0xb5, 0x50, 0x6c, 0x7f, 0x5d, 0xe0, 0x5b, 0xe5, 0xd7, 0x55, 0x59, 0xcc, 0x91, - 0x3c, 0x17, 0x7c, 0x46, 0x52, 0x89, 0x9b, 0xe5, 0x65, 0xd6, 0xc2, 0x2b, 0xe7, 0xf7, 0xb7, 0x1f, - 0x9f, 0x1a, 0xaf, 0x61, 0xb3, 0xa0, 0xd6, 0x00, 0x32, 0xe0, 0xc1, 0xbf, 0xb4, 0x4f, 0x57, 0x4c, - 0x1a, 0xc0, 0x00, 0xed, 0x6e, 0x70, 0x68, 0x75, 0x0c, 0x8e, 0xbe, 0x02, 0x78, 0xef, 0x7f, 0x27, - 0x42, 0x87, 0xb0, 0xdd, 0x3f, 0xeb, 0x05, 0xdd, 0x51, 0xf7, 0x6d, 0xe8, 0xf9, 0x43, 0x6f, 0x38, - 0x72, 0x7a, 0x61, 0x70, 0xee, 0xb9, 0xe1, 0xd9, 0x60, 0xe4, 0xb9, 0x27, 0xdd, 0xd3, 0xae, 0xdb, - 0xd1, 0x6a, 0xc8, 0x84, 0x8f, 0x6f, 0xf0, 0x05, 0xbe, 0x33, 0x18, 0x9d, 0xba, 0x7e, 0x38, 0x1c, - 0xf4, 0xce, 0x35, 0x80, 0x8e, 0xe0, 0xe1, 0x0d, 0x4e, 0xf7, 0xfd, 0x89, 0xeb, 0x05, 0xab, 0x01, - 0xad, 0xfe, 0xc6, 0xfb, 0x3e, 0xd7, 0xc1, 0xd5, 0x5c, 0x07, 0xbf, 0xe6, 0x3a, 0xf8, 0xbc, 0xd0, - 0x6b, 0x57, 0x0b, 0xbd, 0xf6, 0x73, 0xa1, 0xd7, 0x3e, 0xbc, 0x1c, 0x33, 0x95, 0x4c, 0x2f, 0xac, - 0x88, 0x67, 0x76, 0x87, 0xd0, 0x59, 0x9f, 0xa9, 0x44, 0x90, 0x89, 0xbd, 0x0c, 0xdd, 0xb3, 0x8c, - 0xc7, 0xd3, 0x94, 0x4a, 0xfb, 0xa3, 0xbd, 0xca, 0xaa, 0xba, 0xcc, 0xa9, 0xbc, 0x68, 0x96, 0x19, - 0x7c, 0xf1, 0x37, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xf0, 0xf5, 0x8a, 0xc4, 0x02, 0x00, 0x00, + // 475 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4f, 0x6b, 0xd4, 0x40, + 0x18, 0xc6, 0x77, 0x76, 0xeb, 0xda, 0x8e, 0xdb, 0x1a, 0x06, 0xb1, 0x43, 0x95, 0xb0, 0x2e, 0x52, + 0x62, 0x91, 0x84, 0xea, 0x4d, 0x4f, 0xb1, 0x9b, 0x6a, 0x60, 0xff, 0x84, 0x6c, 0x0a, 0xd6, 0x4b, + 0x98, 0x26, 0xc3, 0x66, 0x20, 0xc9, 0x84, 0x99, 0xd9, 0xc5, 0x7e, 0x09, 0x11, 0xf4, 0xec, 0xe7, + 0xf1, 0x58, 0xf0, 0xe2, 0x51, 0x76, 0xbf, 0x81, 0x57, 0x2f, 0x92, 0xb4, 0xd9, 0x5d, 0xc4, 0x1e, + 0xdf, 0xe7, 0x7d, 0x9e, 0x99, 0xdf, 0xfb, 0xf2, 0xc2, 0xfd, 0x6c, 0x96, 0x2a, 0x26, 0xd9, 0xd4, + 0x9a, 0x1f, 0x5b, 0x52, 0x11, 0x45, 0xcd, 0x42, 0x70, 0xc5, 0xd1, 0xbd, 0xba, 0x61, 0xce, 0x8f, + 0x0f, 0xf6, 0x23, 0x2e, 0x33, 0x2e, 0x2d, 0x2e, 0xb2, 0xd2, 0xc7, 0x45, 0x76, 0xed, 0xea, 0x7d, + 0x01, 0xf0, 0xe1, 0xf0, 0xc6, 0x68, 0x47, 0x11, 0x9f, 0xe5, 0xaa, 0x4f, 0x15, 0x61, 0xa9, 0x44, + 0x18, 0xde, 0x95, 0x6c, 0x9a, 0x53, 0x21, 0x31, 0xe8, 0xb6, 0x8c, 0x8e, 0x5f, 0x97, 0xe8, 0x31, + 0xdc, 0x51, 0x89, 0xa0, 0x32, 0xe1, 0x69, 0x8c, 0x9b, 0x5d, 0x60, 0xec, 0xfa, 0x6b, 0x01, 0xd9, + 0x10, 0x16, 0x54, 0x64, 0x4c, 0x4a, 0xc6, 0x73, 0xdc, 0xea, 0x02, 0x63, 0xef, 0xc5, 0x13, 0x73, + 0x83, 0xc6, 0xac, 0x3f, 0xf4, 0x04, 0x2f, 0xb8, 0x24, 0x69, 0x70, 0x59, 0x50, 0x7f, 0x23, 0xd4, + 0xfb, 0x03, 0xe0, 0x76, 0xdd, 0x44, 0x7b, 0xb0, 0xc9, 0x62, 0x0c, 0xba, 0xc0, 0xd8, 0xf2, 0x9b, + 0x2c, 0x46, 0xcf, 0xa0, 0x56, 0x3f, 0x16, 0x92, 0x38, 0x16, 0x54, 0xca, 0x0a, 0xa2, 0xe3, 0xdf, + 0xaf, 0x75, 0xfb, 0x5a, 0x46, 0x8f, 0xe0, 0x4e, 0x44, 0xd2, 0x34, 0x4c, 0x88, 0x4c, 0x2a, 0x92, + 0x8e, 0xbf, 0x5d, 0x0a, 0xef, 0x88, 0x4c, 0xca, 0x29, 0x62, 0x5a, 0x70, 0xc9, 0x14, 0x17, 0x78, + 0xab, 0x6a, 0xae, 0x85, 0x72, 0xfa, 0x9b, 0x02, 0xdf, 0xa9, 0xbe, 0xae, 0xcb, 0x32, 0x47, 0x8a, + 0x42, 0xf0, 0x39, 0x49, 0x25, 0x6e, 0x57, 0x9b, 0x59, 0x0b, 0xaf, 0xec, 0xdf, 0xdf, 0x7e, 0x7c, + 0x6a, 0xbd, 0x86, 0xed, 0x92, 0x5a, 0x03, 0xa8, 0x0b, 0x0f, 0xfe, 0xa5, 0x7d, 0xbe, 0x62, 0xd2, + 0x00, 0x06, 0x68, 0x77, 0x83, 0x43, 0x6b, 0x62, 0x70, 0xf4, 0x15, 0xc0, 0x07, 0xff, 0x5b, 0x11, + 0x3a, 0x84, 0xbd, 0xe1, 0xd9, 0x20, 0x70, 0x27, 0xee, 0xdb, 0xd0, 0xf3, 0xc7, 0xde, 0x78, 0x62, + 0x0f, 0xc2, 0xe0, 0xdc, 0x73, 0xc2, 0xb3, 0xd1, 0xc4, 0x73, 0x4e, 0xdc, 0x53, 0xd7, 0xe9, 0x6b, + 0x0d, 0x64, 0xc0, 0xa7, 0xb7, 0xf8, 0x02, 0xdf, 0x1e, 0x4d, 0x4e, 0x1d, 0x3f, 0x1c, 0x8f, 0x06, + 0xe7, 0x1a, 0x40, 0x47, 0xf0, 0xf0, 0x16, 0xa7, 0xf3, 0xfe, 0xc4, 0xf1, 0x82, 0x55, 0x40, 0x6b, + 0xbe, 0x71, 0xbf, 0x2f, 0x74, 0x70, 0xb5, 0xd0, 0xc1, 0xaf, 0x85, 0x0e, 0x3e, 0x2f, 0xf5, 0xc6, + 0xd5, 0x52, 0x6f, 0xfc, 0x5c, 0xea, 0x8d, 0x0f, 0xd6, 0x94, 0xa9, 0x64, 0x76, 0x61, 0x46, 0x3c, + 0xb3, 0xfa, 0x84, 0xce, 0x87, 0x4c, 0x25, 0x82, 0xe4, 0x56, 0x9c, 0x45, 0x09, 0x61, 0xb9, 0xf5, + 0xd1, 0x5a, 0x1d, 0xa9, 0xba, 0x2c, 0xa8, 0xbc, 0x68, 0x57, 0xc7, 0xf7, 0xf2, 0x6f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x6d, 0x67, 0x68, 0x57, 0xbd, 0x02, 0x00, 0x00, } func (m *MultisigAccountDetails) Marshal() (dAtA []byte, err error) { diff --git a/x/multisig/types/tx.pb.go b/x/multisig/types/tx.pb.go index 2866884..aae3b6f 100644 --- a/x/multisig/types/tx.pb.go +++ b/x/multisig/types/tx.pb.go @@ -1115,73 +1115,73 @@ func init() { func init() { proto.RegisterFile("multisig/v1/tx.proto", fileDescriptor_f023d0392a638bd4) } var fileDescriptor_f023d0392a638bd4 = []byte{ - // 1055 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xbf, 0x6f, 0xdb, 0x46, - 0x14, 0x16, 0x65, 0xd9, 0xae, 0x9e, 0x1c, 0xdb, 0xbd, 0x2a, 0xb5, 0xc2, 0xba, 0xb2, 0xcc, 0x04, - 0xa8, 0xe2, 0x44, 0x64, 0xa4, 0x16, 0x41, 0x91, 0xa9, 0x52, 0x32, 0x24, 0x28, 0x04, 0x18, 0x74, - 0xba, 0x64, 0x11, 0x4e, 0xe2, 0x85, 0x64, 0x21, 0xfe, 0x00, 0xef, 0xa4, 0x44, 0x99, 0xda, 0x4c, - 0x1d, 0x3a, 0x74, 0xea, 0xd0, 0xbd, 0x9d, 0x33, 0x64, 0x6c, 0x3b, 0x07, 0x5d, 0x1a, 0x74, 0xea, - 0x54, 0x14, 0xf6, 0x90, 0x7f, 0xa3, 0x10, 0x7f, 0x9c, 0x25, 0x4a, 0xa4, 0x54, 0x54, 0x85, 0x91, - 0x8d, 0x77, 0xef, 0xbb, 0xf7, 0xde, 0x7d, 0xf7, 0xdd, 0xbb, 0x47, 0x28, 0x5a, 0x83, 0x3e, 0x33, - 0xa9, 0xa9, 0x2b, 0xc3, 0xba, 0xc2, 0x9e, 0xca, 0xae, 0xe7, 0x30, 0x07, 0x15, 0xa2, 0x59, 0x79, - 0x58, 0x17, 0xf7, 0x7a, 0x0e, 0xb5, 0x1c, 0xaa, 0x58, 0xd4, 0x07, 0x59, 0x54, 0x0f, 0x50, 0xe2, - 0x15, 0xdd, 0x71, 0xf4, 0x3e, 0x51, 0xfc, 0x51, 0x77, 0xf0, 0x58, 0xc1, 0xf6, 0x28, 0x32, 0x4d, - 0xba, 0xd5, 0x89, 0x4d, 0xa8, 0x49, 0x43, 0xd3, 0xde, 0xa4, 0x89, 0x32, 0xcc, 0x48, 0x68, 0x28, - 0xea, 0x8e, 0xee, 0xf8, 0x9f, 0xca, 0xf8, 0x2b, 0xf2, 0x14, 0x44, 0xef, 0x04, 0x86, 0x60, 0x10, - 0x98, 0xa4, 0x6f, 0x05, 0xd8, 0x69, 0x53, 0xfd, 0x0b, 0x57, 0xc3, 0x8c, 0x1c, 0x63, 0x0f, 0x5b, - 0x14, 0xdd, 0x86, 0x3c, 0x1e, 0x30, 0xc3, 0xf1, 0x4c, 0x36, 0x2a, 0x09, 0x15, 0xa1, 0x9a, 0x6f, - 0x95, 0xfe, 0x78, 0x59, 0x2b, 0x86, 0x0b, 0x9b, 0x9a, 0xe6, 0x11, 0x4a, 0x4f, 0x98, 0x67, 0xda, - 0xba, 0x7a, 0x0e, 0x45, 0x75, 0xd8, 0x70, 0x7d, 0x0f, 0xa5, 0x6c, 0x45, 0xa8, 0x16, 0x1a, 0xef, - 0xc9, 0x13, 0x14, 0xc8, 0x81, 0xf3, 0x56, 0xee, 0xd5, 0x5f, 0x07, 0x19, 0x35, 0x04, 0xde, 0xd9, - 0x7e, 0xfe, 0xe6, 0xc5, 0xd1, 0xb9, 0x0b, 0xe9, 0x0a, 0xec, 0xc5, 0xb2, 0x51, 0x09, 0x75, 0x1d, - 0x9b, 0x12, 0xe9, 0xeb, 0x2c, 0x94, 0xdb, 0x54, 0xbf, 0xeb, 0x11, 0xcc, 0x48, 0x3b, 0x74, 0xdc, - 0xec, 0xf5, 0x9c, 0x81, 0xcd, 0xfe, 0x63, 0xe2, 0x08, 0x72, 0x94, 0x10, 0xcd, 0x4f, 0xfb, 0x92, - 0xea, 0x7f, 0xa3, 0x7d, 0xc8, 0x33, 0xc3, 0x23, 0xd4, 0x70, 0xfa, 0x5a, 0x69, 0xcd, 0x37, 0x9c, - 0x4f, 0xa0, 0x06, 0x6c, 0x52, 0x53, 0xb7, 0x89, 0x47, 0x4b, 0xb9, 0xca, 0x5a, 0x75, 0x2b, 0x25, - 0x4e, 0x04, 0x44, 0x4d, 0x00, 0x97, 0x78, 0x96, 0x49, 0xa9, 0xe9, 0xd8, 0xa5, 0xf5, 0x8a, 0x50, - 0xdd, 0x6e, 0x1c, 0x4e, 0x51, 0x14, 0xed, 0xea, 0xd8, 0x73, 0x5c, 0x87, 0xe2, 0xfe, 0xc3, 0x91, - 0x4b, 0xd4, 0x89, 0x45, 0x92, 0x0e, 0x95, 0x24, 0x0a, 0x22, 0x9e, 0xd0, 0x5d, 0xd8, 0x8d, 0x7c, - 0x76, 0x70, 0x90, 0xc9, 0x42, 0x2e, 0x76, 0xa2, 0x15, 0xe1, 0xb4, 0xf4, 0xbb, 0x00, 0x62, 0x9b, - 0x8e, 0x87, 0x51, 0x98, 0x13, 0x7f, 0x17, 0x21, 0xd1, 0xab, 0x88, 0x81, 0x6e, 0xc1, 0x46, 0x40, - 0x8d, 0xcf, 0x7b, 0xda, 0xd2, 0x10, 0x87, 0xaa, 0x70, 0xc9, 0x26, 0x4f, 0x3a, 0xb1, 0x73, 0xb9, - 0x9f, 0x51, 0xb7, 0x6c, 0xf2, 0xe4, 0x61, 0x34, 0xfb, 0x8d, 0x20, 0xb4, 0x76, 0x61, 0xbb, 0x33, - 0x05, 0x95, 0xca, 0xb0, 0x3f, 0x6f, 0x43, 0x5c, 0x5e, 0x8f, 0xe1, 0x60, 0x4c, 0x6d, 0x9f, 0x60, - 0x7b, 0xe0, 0xce, 0x97, 0xd7, 0x4a, 0x98, 0xbd, 0x0a, 0x87, 0x89, 0x71, 0x78, 0x32, 0xcf, 0x05, - 0xf8, 0xb0, 0x4d, 0xf5, 0x13, 0xc2, 0x22, 0x04, 0xdf, 0xdd, 0x2a, 0x4f, 0x60, 0x4a, 0xe3, 0xd9, - 0x98, 0xc6, 0xa5, 0x43, 0x9f, 0x91, 0x79, 0x39, 0xf0, 0x3c, 0x7f, 0xcc, 0xc2, 0xd5, 0x36, 0xd5, - 0x1f, 0xd8, 0x26, 0x33, 0x71, 0xdf, 0x7c, 0x46, 0xe2, 0x0a, 0x5e, 0x65, 0xb6, 0x9f, 0xc0, 0x3b, - 0xae, 0xef, 0x76, 0x09, 0xc5, 0x70, 0x24, 0x2a, 0xc2, 0x3a, 0x33, 0x59, 0x9f, 0xf8, 0x5a, 0xc9, - 0xab, 0xc1, 0x00, 0x55, 0xa0, 0xa0, 0x11, 0xda, 0xf3, 0x4c, 0x97, 0x8d, 0x2f, 0x63, 0xce, 0xb7, - 0x4d, 0x4e, 0xa1, 0xcf, 0x61, 0xd3, 0x22, 0x94, 0x62, 0x9d, 0xf8, 0x57, 0xb5, 0xd0, 0x28, 0xca, - 0x41, 0xa9, 0x96, 0xa3, 0x52, 0x2d, 0x37, 0xed, 0x51, 0xeb, 0x83, 0xdf, 0x5e, 0xd6, 0xc2, 0xe2, - 0x2e, 0x77, 0x31, 0x25, 0xf2, 0xb0, 0xde, 0x25, 0x0c, 0xd7, 0xe5, 0x36, 0xd5, 0xd5, 0xc8, 0x83, - 0xf4, 0x99, 0x7f, 0x9c, 0xb3, 0x34, 0xf1, 0x4b, 0x7b, 0x00, 0x05, 0x37, 0xa4, 0xac, 0x63, 0x6a, - 0x3e, 0x37, 0x39, 0x15, 0xa2, 0xa9, 0x07, 0x9a, 0xf4, 0xab, 0xe0, 0x5f, 0xfd, 0xa6, 0xeb, 0x7a, - 0xce, 0xf0, 0x7f, 0xa5, 0x39, 0x96, 0x4a, 0x36, 0x9e, 0xca, 0xf8, 0x1c, 0x70, 0x90, 0x86, 0x17, - 0x90, 0x9a, 0x76, 0x0e, 0x11, 0x52, 0xba, 0x06, 0x52, 0x72, 0xfe, 0x5c, 0x50, 0xdf, 0x67, 0xe1, - 0xc6, 0x39, 0xac, 0x69, 0x6b, 0xf7, 0x4c, 0xea, 0x62, 0xd6, 0x33, 0xde, 0xbe, 0x1d, 0xaf, 0x56, - 0x41, 0x8f, 0xa0, 0xb6, 0x14, 0x2f, 0x5c, 0x51, 0xd7, 0x61, 0x97, 0x79, 0xd8, 0xa6, 0xb8, 0x37, - 0x96, 0x73, 0xc7, 0xc0, 0xd4, 0x08, 0x98, 0x51, 0x77, 0x26, 0xe6, 0xef, 0x63, 0x6a, 0x48, 0xbf, - 0x08, 0x41, 0xed, 0xc3, 0x76, 0x8f, 0xf4, 0x2f, 0x9a, 0x68, 0x8f, 0x7c, 0x49, 0x7a, 0x6c, 0x19, - 0xa2, 0x23, 0x64, 0x54, 0x52, 0xe7, 0xa6, 0xcf, 0x95, 0xf5, 0x73, 0x70, 0x81, 0x62, 0x85, 0xf7, - 0x42, 0x76, 0xd9, 0x80, 0x4d, 0x8f, 0x58, 0x4b, 0xa9, 0x29, 0x02, 0x86, 0xd7, 0x27, 0x21, 0xfb, - 0x68, 0x93, 0x8d, 0x9f, 0xf2, 0xb0, 0xd6, 0xa6, 0x3a, 0x52, 0x61, 0x6b, 0xaa, 0xa3, 0xdb, 0x9f, - 0x6e, 0x33, 0xa6, 0x3b, 0x2c, 0xf1, 0x5a, 0x9a, 0x95, 0x0b, 0x8a, 0xc2, 0xe5, 0xb9, 0x8d, 0x07, - 0xba, 0x11, 0x5f, 0x9e, 0xd2, 0xa2, 0x89, 0xb5, 0xa5, 0xc0, 0x3c, 0xa8, 0x0e, 0xef, 0xce, 0x3c, - 0xd9, 0xe8, 0xa3, 0xb8, 0x8f, 0x84, 0x36, 0x45, 0xbc, 0xbe, 0x10, 0xc8, 0x03, 0x0d, 0xe0, 0x72, - 0x8c, 0xdc, 0x30, 0xd8, 0xcd, 0x99, 0x84, 0x53, 0x5a, 0x04, 0x51, 0x5e, 0x0e, 0xcd, 0xc3, 0x1a, - 0xb0, 0x75, 0x42, 0x18, 0x7f, 0x58, 0xd1, 0x51, 0x7c, 0x7d, 0x72, 0x0b, 0x20, 0xde, 0x5c, 0x06, - 0xcb, 0x23, 0x3d, 0x03, 0x31, 0xf9, 0x99, 0x46, 0xb7, 0xe2, 0xbe, 0x16, 0x3d, 0xe9, 0xe2, 0xd1, - 0xe2, 0x15, 0x3c, 0xf6, 0x08, 0xf6, 0x12, 0x0a, 0x3f, 0x9a, 0xd1, 0x43, 0xea, 0x0b, 0x27, 0x2a, - 0x4b, 0xc2, 0x79, 0xe8, 0x1f, 0x04, 0x90, 0x16, 0x57, 0x4d, 0xf4, 0x69, 0x82, 0xdf, 0x85, 0x2f, - 0x90, 0x78, 0xe7, 0xdf, 0xaf, 0xe4, 0xc9, 0x0d, 0xe1, 0xfd, 0xf9, 0x55, 0x6b, 0x8e, 0xea, 0x52, - 0x8a, 0xf3, 0x1c, 0xd5, 0xa5, 0xd6, 0xc2, 0xf1, 0x79, 0x24, 0x54, 0x92, 0xd9, 0xf3, 0x48, 0x2d, - 0x98, 0xb3, 0xe7, 0xb1, 0xa0, 0x42, 0x89, 0xeb, 0x5f, 0xbd, 0x79, 0x71, 0x24, 0xb4, 0x8e, 0x5f, - 0x9d, 0x96, 0x85, 0xd7, 0xa7, 0x65, 0xe1, 0xef, 0xd3, 0xb2, 0xf0, 0xdd, 0x59, 0x39, 0xf3, 0xfa, - 0xac, 0x9c, 0xf9, 0xf3, 0xac, 0x9c, 0x79, 0x74, 0x5b, 0x37, 0x99, 0x31, 0xe8, 0xca, 0x3d, 0xc7, - 0x52, 0xee, 0x61, 0x32, 0x6c, 0x9b, 0xcc, 0xf0, 0xb0, 0x1d, 0xfe, 0xb5, 0xd6, 0x2c, 0x47, 0x1b, - 0xf4, 0x09, 0x55, 0x9e, 0x2a, 0xfc, 0x17, 0x98, 0x8d, 0x5c, 0x42, 0xbb, 0x1b, 0xfe, 0xa3, 0xfa, - 0xf1, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x14, 0x9a, 0x56, 0x8d, 0x0f, 0x00, 0x00, + // 1051 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xbf, 0x8f, 0x1b, 0x45, + 0x14, 0xf6, 0xfa, 0x7c, 0x77, 0xf8, 0xf9, 0x72, 0x77, 0x0c, 0x0e, 0xe7, 0x2c, 0x87, 0xcf, 0xb7, + 0x89, 0x84, 0x73, 0xc9, 0xed, 0xc6, 0x06, 0x21, 0x94, 0x0a, 0x3b, 0x29, 0x72, 0x42, 0x96, 0xa2, + 0xbd, 0xd0, 0xa4, 0xb1, 0xc6, 0xbb, 0x93, 0xdd, 0x45, 0xde, 0x1f, 0xda, 0x19, 0x3b, 0x71, 0x2a, + 0x48, 0x45, 0x41, 0x41, 0x45, 0x41, 0x0f, 0x75, 0x8a, 0x94, 0x40, 0x1d, 0xd1, 0x10, 0x51, 0x51, + 0x21, 0x74, 0x57, 0xe4, 0xdf, 0x40, 0xde, 0x1f, 0x73, 0xf6, 0xda, 0xbb, 0x36, 0xc2, 0x28, 0xa2, + 0xf3, 0xce, 0xfb, 0xe6, 0xbd, 0x6f, 0xbe, 0xf9, 0xe6, 0xcd, 0x18, 0xca, 0xf6, 0xa0, 0xcf, 0x2c, + 0x6a, 0x19, 0xca, 0xb0, 0xa1, 0xb0, 0x27, 0xb2, 0xe7, 0xbb, 0xcc, 0x45, 0xa5, 0x78, 0x54, 0x1e, + 0x36, 0xc4, 0x3d, 0xcd, 0xa5, 0xb6, 0x4b, 0x15, 0x9b, 0x06, 0x20, 0x9b, 0x1a, 0x21, 0x4a, 0xbc, + 0x62, 0xb8, 0xae, 0xd1, 0x27, 0x4a, 0xf0, 0xd5, 0x1b, 0x3c, 0x52, 0xb0, 0x33, 0x8a, 0x43, 0x93, + 0x69, 0x0d, 0xe2, 0x10, 0x6a, 0xd1, 0x28, 0xb4, 0x37, 0x19, 0xa2, 0x0c, 0x33, 0x12, 0x05, 0xca, + 0x86, 0x6b, 0xb8, 0xc1, 0x4f, 0x65, 0xfc, 0x2b, 0xce, 0x14, 0x56, 0xef, 0x86, 0x81, 0xf0, 0x23, + 0x0c, 0x49, 0xdf, 0x08, 0xb0, 0xd3, 0xa1, 0xc6, 0xe7, 0x9e, 0x8e, 0x19, 0xb9, 0x8f, 0x7d, 0x6c, + 0x53, 0xf4, 0x31, 0x14, 0xf1, 0x80, 0x99, 0xae, 0x6f, 0xb1, 0x51, 0x45, 0xa8, 0x09, 0xf5, 0x62, + 0xbb, 0xf2, 0xfb, 0x8b, 0xe3, 0x72, 0x34, 0xb1, 0xa5, 0xeb, 0x3e, 0xa1, 0xf4, 0x94, 0xf9, 0x96, + 0x63, 0xa8, 0x17, 0x50, 0xd4, 0x80, 0x0d, 0x2f, 0xc8, 0x50, 0xc9, 0xd7, 0x84, 0x7a, 0xa9, 0xf9, + 0x8e, 0x3c, 0x21, 0x81, 0x1c, 0x26, 0x6f, 0x17, 0x5e, 0xfe, 0x79, 0x90, 0x53, 0x23, 0xe0, 0xed, + 0xed, 0x67, 0xaf, 0x9f, 0x1f, 0x5d, 0xa4, 0x90, 0xae, 0xc0, 0x5e, 0x82, 0x8d, 0x4a, 0xa8, 0xe7, + 0x3a, 0x94, 0x48, 0x5f, 0xe5, 0xa1, 0xda, 0xa1, 0xc6, 0x1d, 0x9f, 0x60, 0x46, 0x3a, 0x51, 0xe2, + 0x96, 0xa6, 0xb9, 0x03, 0x87, 0xfd, 0x4b, 0xe2, 0x08, 0x0a, 0x94, 0x10, 0x3d, 0xa0, 0x7d, 0x49, + 0x0d, 0x7e, 0xa3, 0x7d, 0x28, 0x32, 0xd3, 0x27, 0xd4, 0x74, 0xfb, 0x7a, 0x65, 0x2d, 0x08, 0x5c, + 0x0c, 0xa0, 0x26, 0x6c, 0x52, 0xcb, 0x70, 0x88, 0x4f, 0x2b, 0x85, 0xda, 0x5a, 0x7d, 0x2b, 0xa3, + 0x4e, 0x0c, 0x44, 0x2d, 0x00, 0x8f, 0xf8, 0xb6, 0x45, 0xa9, 0xe5, 0x3a, 0x95, 0xf5, 0x9a, 0x50, + 0xdf, 0x6e, 0x1e, 0x4e, 0x49, 0x14, 0xaf, 0xea, 0xbe, 0xef, 0x7a, 0x2e, 0xc5, 0xfd, 0x07, 0x23, + 0x8f, 0xa8, 0x13, 0x93, 0x24, 0x03, 0x6a, 0x69, 0x12, 0xc4, 0x3a, 0xa1, 0x3b, 0xb0, 0x1b, 0xe7, + 0xec, 0xe2, 0x90, 0xc9, 0x42, 0x2d, 0x76, 0xe2, 0x19, 0xd1, 0xb0, 0xf4, 0x9b, 0x00, 0x62, 0x87, + 0x8e, 0x3f, 0xe3, 0x32, 0xa7, 0xc1, 0x2a, 0x22, 0xa1, 0x57, 0x51, 0x03, 0xdd, 0x82, 0x8d, 0x50, + 0x9a, 0x40, 0xf7, 0xac, 0xa9, 0x11, 0x0e, 0xd5, 0xe1, 0x92, 0x43, 0x1e, 0x77, 0x13, 0xfb, 0x72, + 0x2f, 0xa7, 0x6e, 0x39, 0xe4, 0xf1, 0x83, 0x78, 0xf4, 0x6b, 0x41, 0x68, 0xef, 0xc2, 0x76, 0x77, + 0x0a, 0x2a, 0x55, 0x61, 0x7f, 0xde, 0x82, 0xb8, 0xbd, 0x1e, 0xc1, 0xc1, 0x58, 0xda, 0x3e, 0xc1, + 0xce, 0xc0, 0x9b, 0x6f, 0xaf, 0x95, 0x28, 0x7b, 0x15, 0x0e, 0x53, 0xeb, 0x70, 0x32, 0xcf, 0x04, + 0x78, 0xbf, 0x43, 0x8d, 0x53, 0xc2, 0x62, 0x04, 0x5f, 0xdd, 0x2a, 0x77, 0x60, 0xca, 0xe3, 0xf9, + 0x84, 0xc7, 0xa5, 0xc3, 0x40, 0x91, 0x79, 0x1c, 0x38, 0xcf, 0x1f, 0xf2, 0x70, 0xb5, 0x43, 0x8d, + 0x13, 0xc7, 0x62, 0x16, 0xee, 0x5b, 0x4f, 0x49, 0xd2, 0xc1, 0xab, 0x64, 0xfb, 0x11, 0xbc, 0xe5, + 0x05, 0x69, 0x97, 0x70, 0x0c, 0x47, 0xa2, 0x32, 0xac, 0x33, 0x8b, 0xf5, 0x49, 0xe0, 0x95, 0xa2, + 0x1a, 0x7e, 0xa0, 0x1a, 0x94, 0x74, 0x42, 0x35, 0xdf, 0xf2, 0xd8, 0xf8, 0x30, 0x16, 0x82, 0xd8, + 0xe4, 0x10, 0xfa, 0x0c, 0x36, 0x6d, 0x42, 0x29, 0x36, 0x48, 0x70, 0x54, 0x4b, 0xcd, 0xb2, 0x1c, + 0xb6, 0x6a, 0x39, 0x6e, 0xd5, 0x72, 0xcb, 0x19, 0xb5, 0xdf, 0xfb, 0xf5, 0xc5, 0x71, 0xd4, 0xdc, + 0xe5, 0x1e, 0xa6, 0x44, 0x1e, 0x36, 0x7a, 0x84, 0xe1, 0x86, 0xdc, 0xa1, 0x86, 0x1a, 0x67, 0x90, + 0x3e, 0x0d, 0xb6, 0x73, 0x56, 0x26, 0x7e, 0x68, 0x0f, 0xa0, 0xe4, 0x45, 0x92, 0x75, 0x2d, 0x3d, + 0xd0, 0xa6, 0xa0, 0x42, 0x3c, 0x74, 0xa2, 0x4b, 0xbf, 0x08, 0xc1, 0xd1, 0x6f, 0x79, 0x9e, 0xef, + 0x0e, 0xff, 0x53, 0x99, 0x13, 0x54, 0xf2, 0x49, 0x2a, 0xe3, 0x7d, 0xc0, 0x21, 0x0d, 0x3f, 0x14, + 0x35, 0x6b, 0x1f, 0x62, 0xa4, 0x74, 0x0d, 0xa4, 0x74, 0xfe, 0xdc, 0x50, 0xdf, 0xe5, 0xe1, 0xc6, + 0x05, 0xac, 0xe5, 0xe8, 0x77, 0x2d, 0xea, 0x61, 0xa6, 0x99, 0xff, 0xbf, 0x15, 0xaf, 0xd6, 0x41, + 0x0f, 0xe1, 0x78, 0x29, 0x5d, 0xb8, 0xa3, 0xae, 0xc3, 0x2e, 0xf3, 0xb1, 0x43, 0xb1, 0x36, 0xb6, + 0x73, 0xd7, 0xc4, 0xd4, 0x0c, 0x95, 0x51, 0x77, 0x26, 0xc6, 0xef, 0x61, 0x6a, 0x4a, 0x3f, 0x0b, + 0x61, 0xef, 0xc3, 0x8e, 0x46, 0xfa, 0x6f, 0x5a, 0x68, 0x9f, 0x7c, 0x41, 0x34, 0xb6, 0x8c, 0xd0, + 0x31, 0x32, 0x6e, 0xa9, 0x73, 0xe9, 0x73, 0x67, 0xfd, 0x14, 0x1e, 0xa0, 0x44, 0xe3, 0x7d, 0x23, + 0xab, 0x6c, 0xc2, 0xa6, 0x4f, 0xec, 0xa5, 0xdc, 0x14, 0x03, 0xa3, 0xe3, 0x93, 0xc2, 0x3e, 0x5e, + 0x64, 0xf3, 0xc7, 0x22, 0xac, 0x75, 0xa8, 0x81, 0x54, 0xd8, 0x9a, 0x7a, 0xd1, 0xed, 0x4f, 0x3f, + 0x33, 0xa6, 0x5f, 0x58, 0xe2, 0xb5, 0xac, 0x28, 0x37, 0x14, 0x85, 0xcb, 0x73, 0x1f, 0x1e, 0xe8, + 0x46, 0x72, 0x7a, 0xc6, 0x13, 0x4d, 0x3c, 0x5e, 0x0a, 0xcc, 0x8b, 0x1a, 0xf0, 0xf6, 0xcc, 0x95, + 0x8d, 0x3e, 0x48, 0xe6, 0x48, 0x79, 0xa6, 0x88, 0xd7, 0x17, 0x02, 0x79, 0xa1, 0x01, 0x5c, 0x4e, + 0x88, 0x1b, 0x15, 0xbb, 0x39, 0x43, 0x38, 0xe3, 0x89, 0x20, 0xca, 0xcb, 0xa1, 0x79, 0x59, 0x13, + 0xb6, 0x4e, 0x09, 0xe3, 0x17, 0x2b, 0x3a, 0x4a, 0xce, 0x4f, 0x7f, 0x02, 0x88, 0x37, 0x97, 0xc1, + 0xf2, 0x4a, 0x4f, 0x41, 0x4c, 0xbf, 0xa6, 0xd1, 0xad, 0x64, 0xae, 0x45, 0x57, 0xba, 0x78, 0xb4, + 0x78, 0x06, 0xaf, 0x3d, 0x82, 0xbd, 0x94, 0xc6, 0x8f, 0x66, 0xfc, 0x90, 0x79, 0xc3, 0x89, 0xca, + 0x92, 0x70, 0x5e, 0xfa, 0x7b, 0x01, 0xa4, 0xc5, 0x5d, 0x13, 0x7d, 0x92, 0x92, 0x77, 0xe1, 0x0d, + 0x24, 0xde, 0xfe, 0xe7, 0x33, 0x39, 0xb9, 0x21, 0xbc, 0x3b, 0xbf, 0x6b, 0xcd, 0x71, 0x5d, 0x46, + 0x73, 0x9e, 0xe3, 0xba, 0xcc, 0x5e, 0x38, 0xde, 0x8f, 0x94, 0x4e, 0x32, 0xbb, 0x1f, 0x99, 0x0d, + 0x73, 0x76, 0x3f, 0x16, 0x74, 0x28, 0x71, 0xfd, 0xcb, 0xd7, 0xcf, 0x8f, 0x84, 0xf6, 0xc9, 0xcb, + 0xb3, 0xaa, 0xf0, 0xea, 0xac, 0x2a, 0xfc, 0x75, 0x56, 0x15, 0xbe, 0x3d, 0xaf, 0xe6, 0x5e, 0x9d, + 0x57, 0x73, 0x7f, 0x9c, 0x57, 0x73, 0x0f, 0x15, 0xc3, 0x62, 0xe6, 0xa0, 0x27, 0x6b, 0xae, 0xad, + 0xdc, 0xc5, 0x64, 0xd8, 0xb1, 0x98, 0xe9, 0x63, 0x47, 0xd1, 0x6d, 0xcd, 0xc4, 0x96, 0xa3, 0x3c, + 0x51, 0xf8, 0x7f, 0x5f, 0x36, 0xf2, 0x08, 0xed, 0x6d, 0x04, 0xb7, 0xe9, 0x87, 0x7f, 0x07, 0x00, + 0x00, 0xff, 0xff, 0x91, 0xe8, 0x21, 0x5f, 0x86, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/oracle/.DS_Store b/x/oracle/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..e6d163075f2fbf62b9dea93e36beffe6d338098d GIT binary patch literal 8196 zcmeHMOK%fN5Uw&Ij0ssLA%P%3vap1Zh>}2fXtjqmCJ03fnAw?wBFtZtu)E zAw-dUh8q`d2#Ftn#EIkb1K`M&!~TK2?3t~882ktv(Q4_EroWo%`lhD8ard}w0Kj6S zau#3=0313bx&zegVzOTzJ(e+%K|&-x%tj*cBjMAz+mmerRspMkRlq7>6|f5Y7Zjj( zwlwD}?|t2CTdROo;D=N|t`9jnBo+)dHL9h98np!=?4z(U^3_*=!ki2c77R8uQiKdO zl~7aBY%$R698lA#zhLs48Z{kIRi^8h%4l{dXf__0Q|W*OjkdK4SOt0&kbCz&@W6)v z!mj;$k@_Y+DO1G#l-Gb11m#8$!UR-7ba7sHar#Xz0}g3tE}rblJpdJ8P^T+%ctBo2 zwRWk2PrG>iuuj>M$sq2mk%_;R>u)A?^Lxb`zaE82IyLnHGkf~>_V07{IRnm}(tWX6 zO1-p^6uo#wo-GOy`7Ph`Z-s2L?2cR!JoQ4(Vnqlmj8ax_hrA*-i=x3RiQ<-Yhm&=( zWp`|Qd-~jk@!a&KvpeIt?Vrz0jpxo!U)%mOYTqtKFW^ zNyqrZV8e_F-?hf{(REv+%I+UHF!<9!cWC&~(8$o}=;+}iV@HRN9WT3wd@oq9#`12j zh)Bf6sKLta!Gy*<8wfrhvke;SQpz5trSK7T4R;Y1Smo}Q(Bf8|az?%c)J3nwjPaFf z99HJm))JO3wfW1kS`dpUniol!hJr7zs_H4L&GI!t73Cew)n!+5i^U0H4`*rFi(`*h zS#j%53|aHeWccJs0vVft`_-XAtv$1}~Jq z$OUIan%6z~!fz(UfirL!O0WulKog$9OLzru;XV8X|G+04#KU+J&)_&-z)M)b%ea6m zcn>{%p!u2BgFa!dX8;p&Iv#XA^{+RQRDQru!A(fyho9O>nnWJ?8&IQ(l)`fqMn*&lkkvYLgmOw&FHMR&hMs9NB!=+jZ(}b!K)OPW5`l9K{Xrds=G{Mkju;S zw&f)Y3viXRn}HjI6U47{PG*pcOFLsPjc-d$`=m2dEiLVtM6_lVunM#*ut%Sa$^HM; zumAqvPO-jKz$)-RQvmyBN;C3p-1_d(J-!SDa&+9ILz>KMYE%?zWQvTd?Kt7*KMcvw YnZAO-rbg-^vp)nV8Ej(}_^t~43nQ#f?EnA( literal 0 HcmV?d00001 diff --git a/x/oracle/README.md b/x/oracle/README.md new file mode 100755 index 0000000..17c8d11 --- /dev/null +++ b/x/oracle/README.md @@ -0,0 +1,3 @@ +# Example Module + +This is a module base generated with [`spawn`](https://github.com/rollchains/spawn). \ No newline at end of file diff --git a/x/oracle/abci/endblocker.go b/x/oracle/abci/endblocker.go new file mode 100644 index 0000000..9dc910b --- /dev/null +++ b/x/oracle/abci/endblocker.go @@ -0,0 +1,231 @@ +package abci + +import ( + "context" + "time" + + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/telemetry" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DaevMithran/dmchain/util" + "github.com/DaevMithran/dmchain/x/oracle/keeper" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// EndBlocker is called at the end of every block +func EndBlocker(ctx context.Context, k keeper.Keeper) error { + defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) + + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // Check for Oracle parameter update plans and execute plans that are + // at their plan height. + plans := k.GetParamUpdatePlans(sdkCtx) + for _, plan := range plans { + if plan.ShouldExecute(sdkCtx) { + if err := k.ExecuteParamUpdatePlan(sdkCtx, plan); err != nil { + return err + } + } + } + + params := k.GetParams(sdkCtx) + + // Start price feeder if it hasn't been started, and it is enabled. + if k.PriceFeeder.Oracle == nil && k.PriceFeeder.AppConfig.Enable { + go func() { + err := k.PriceFeeder.Start(sdkCtx.BlockHeight(), params) + if err != nil { + sdkCtx.Logger().Error("Error starting Oracle Keeper price feeder", "err", err) + } + }() + } + + // Set all current active validators into the ValidatorRewardSet at + // the beginning of a new Slash Window. + if k.IsPeriodLastBlock(sdkCtx, params.SlashWindow+1) { + if err := k.SetValidatorRewardSet(sdkCtx); err != nil { + return err + } + } + + if k.IsPeriodLastBlock(sdkCtx, params.VotePeriod) { + if k.PriceFeeder.Oracle != nil && k.PriceFeeder.AppConfig.Enable { + // Update price feeder oracle with latest params. + k.PriceFeeder.Oracle.ParamCache.UpdateParamCache(sdkCtx.BlockHeight(), k.GetParams(sdkCtx), nil) + + // Execute price feeder oracle tick. + if err := k.PriceFeeder.Oracle.TickClientless(ctx); err != nil { + sdkCtx.Logger().Error("Error in Oracle Keeper price feeder clientless tick", "err", err) + } + } + + // Update oracle module with prices. + if err := CalcPrices(sdkCtx, params, k); err != nil { + return err + } + } + + // Slash oracle providers who missed voting over the threshold and reset + // miss counters of all validators at the last block of slash window. + if k.IsPeriodLastBlock(sdkCtx, params.SlashWindow) { + k.SlashAndResetMissCounters(sdkCtx) + } + k.PruneAllPrices(sdkCtx) + return nil +} + +func CalcPrices(ctx sdk.Context, params types.Params, k keeper.Keeper) error { + // Build claim map over all validators in active set + validatorClaimMap := make(map[string]types.Claim) + powerReduction := k.StakingKeeper.PowerReduction(ctx) + // Calculate total validator power + var totalBondedPower int64 + vals, err := k.StakingKeeper.GetBondedValidatorsByPower(ctx) + if err != nil { + return err + } + for _, v := range vals { + addrString := v.GetOperator() + addr, err := sdk.ValAddressFromBech32(addrString) + if err != nil { + return err + } + power := v.GetConsensusPower(powerReduction) + totalBondedPower += power + validatorClaimMap[addrString] = types.NewClaim(power, 0, 0, addr) + } + + // voteTargets defines the symbol (ticker) denoms that we require votes on + voteTargetDenoms := make([]string, 0) + for _, v := range params.AcceptList { + voteTargetDenoms = append(voteTargetDenoms, v.BaseDenom) + } + + k.ClearExchangeRates(ctx) + + // NOTE: it filters out inactive or jailed validators + ballotDenomSlice := k.OrganizeBallotByDenom(ctx, validatorClaimMap) + threshold := k.VoteThreshold(ctx).MulInt64(types.MaxVoteThresholdMultiplier).TruncateInt64() + + // Iterate through ballots and update exchange rates; drop if not enough votes have been achieved. + for _, ballotDenom := range ballotDenomSlice { + // Increment Mandatory Win count if Denom in Mandatory list + incrementWin := params.MandatoryList.Contains(ballotDenom.Denom) + + // If the asset is not in the mandatory or accept list, continue + if !incrementWin && !params.AcceptList.Contains(ballotDenom.Denom) { + ctx.Logger().Info("Unsupported denom, dropping ballot", "denom", ballotDenom) + continue + } + + // Calculate the portion of votes received as an integer, scaled up using the + // same multiplier as the `threshold` computed above + support := ballotDenom.Ballot.Power() * types.MaxVoteThresholdMultiplier / totalBondedPower + if support < threshold { + ctx.Logger().Info("Ballot voting power is under vote threshold, dropping ballot", "denom", ballotDenom) + continue + } + + // Get the current denom's reward band + rewardBand, err := params.RewardBands.GetBandFromDenom(ballotDenom.Denom) + if err != nil { + return err + } + + // Get weighted median of exchange rates + exchangeRate, err := Tally(ballotDenom.Ballot, rewardBand, validatorClaimMap, incrementWin) + if err != nil { + return err + } + + // Set the exchange rate, emit ABCI event + if err = k.SetExchangeRateWithEvent(ctx, ballotDenom.Denom, exchangeRate); err != nil { + return err + } + + if k.IsPeriodLastBlock(ctx, params.HistoricStampPeriod) { + k.AddHistoricPrice(ctx, ballotDenom.Denom, exchangeRate) + } + + // Calculate and stamp median/median deviation if median stamp period has passed + if k.IsPeriodLastBlock(ctx, params.MedianStampPeriod) { + if err = k.CalcAndSetHistoricMedian(ctx, ballotDenom.Denom); err != nil { + return err + } + } + } + + // Get the validators which can earn rewards in this Slash Window. + validatorRewardSet := k.GetValidatorRewardSet(ctx) + + // update miss counting & slashing + voteTargetsLen := len(params.MandatoryList) + claimSlice, rewardSlice := types.ClaimMapToSlices(validatorClaimMap, validatorRewardSet.ValidatorSet) + for _, claim := range claimSlice { + misses := util.SafeIntToUint64(voteTargetsLen - int(claim.MandatoryWinCount)) + if misses == 0 { + continue + } + + // Increase miss counter + k.SetMissCounter(ctx, claim.Recipient, k.GetMissCounter(ctx, claim.Recipient)+misses) + } + + // Distribute rewards to ballot winners + k.RewardBallotWinners( + ctx, + util.SafeUint64ToInt64(params.VotePeriod), + util.SafeUint64ToInt64(params.RewardDistributionWindow), + voteTargetDenoms, + rewardSlice, + ) + + // Clear the ballot + k.ClearBallots(ctx, params.VotePeriod) + return nil +} + +// Tally calculates and returns the median. It sets the set of voters to be +// rewarded, i.e. voted within a reasonable spread from the weighted median to +// the store. Note, the ballot is sorted by ExchangeRate. +func Tally( + ballot types.ExchangeRateBallot, + rewardBand math.LegacyDec, + validatorClaimMap map[string]types.Claim, + incrementWin bool, +) (math.LegacyDec, error) { + weightedMedian, err := ballot.WeightedMedian() + if err != nil { + return math.LegacyZeroDec(), err + } + standardDeviation, err := ballot.StandardDeviation() + if err != nil { + return math.LegacyZeroDec(), err + } + + // rewardSpread is the MAX((weightedMedian * (rewardBand/2)), standardDeviation) + rewardSpread := weightedMedian.Mul(rewardBand.QuoInt64(2)) + rewardSpread = math.LegacyMaxDec(rewardSpread, standardDeviation) + + for _, tallyVote := range ballot { + // Filter ballot winners. For voters, we filter out the tally vote iff: + // (weightedMedian - rewardSpread) <= ExchangeRate <= (weightedMedian + rewardSpread) + if (tallyVote.ExchangeRate.GTE(weightedMedian.Sub(rewardSpread)) && + tallyVote.ExchangeRate.LTE(weightedMedian.Add(rewardSpread))) || + !tallyVote.ExchangeRate.IsPositive() { + + key := tallyVote.Voter.String() + claim := validatorClaimMap[key] + + if incrementWin { + claim.MandatoryWinCount++ + } + claim.Weight += tallyVote.Power + validatorClaimMap[key] = claim + } + } + + return weightedMedian, nil +} diff --git a/x/oracle/abci/proposal.go b/x/oracle/abci/proposal.go new file mode 100644 index 0000000..0a7d75b --- /dev/null +++ b/x/oracle/abci/proposal.go @@ -0,0 +1,257 @@ +package abci + +import ( + "fmt" + "sort" + + "cosmossdk.io/log" + cometabci "github.com/cometbft/cometbft/abci/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + + oraclekeeper "github.com/DaevMithran/dmchain/x/oracle/keeper" + oracletypes "github.com/DaevMithran/dmchain/x/oracle/types" +) + +type ProposalHandler struct { + logger log.Logger + oracleKeeper oraclekeeper.Keeper + stakingKeeper *stakingkeeper.Keeper +} + +func NewProposalHandler( + logger log.Logger, + oracleKeeper oraclekeeper.Keeper, + stakingKeeper *stakingkeeper.Keeper, +) *ProposalHandler { + return &ProposalHandler{ + logger: logger, + oracleKeeper: oracleKeeper, + stakingKeeper: stakingKeeper, + } +} + +// PrepareProposalHandler is called only on the selected validator as "block proposer" (selected by CometBFT, read +// more about this process here: https://docs.cometbft.com/v0.38/spec/consensus/proposer-selection). The block +// proposer is in charge of creating the next block by selecting the transactions from the mempool, and in this +// method it will create an extra transaction using the vote extension from the previous block which are only +// available on the next height at which vote extensions were enabled. +func (h *ProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { + return func(ctx sdk.Context, req *cometabci.RequestPrepareProposal) (*cometabci.ResponsePrepareProposal, error) { + if req == nil { + err := fmt.Errorf("prepare proposal received a nil request") + h.logger.Error(err.Error()) + return nil, err + } + err := baseapp.ValidateVoteExtensions(ctx, h.stakingKeeper, req.Height, ctx.ChainID(), req.LocalLastCommit) + if err != nil { + return &cometabci.ResponsePrepareProposal{Txs: make([][]byte, 0)}, err + } + if req.Txs == nil { + err := fmt.Errorf("prepare proposal received a request with nil Txs") + h.logger.Error( + "height", req.Height, + err.Error(), + ) + return &cometabci.ResponsePrepareProposal{Txs: make([][]byte, 0)}, err + } + proposalTxs := req.Txs + + voteExtensionsEnabled := VoteExtensionsEnabled(ctx) + if voteExtensionsEnabled { + exchangeRateVotes, err := h.generateExchangeRateVotes(ctx, req.LocalLastCommit) + if err != nil { + return &cometabci.ResponsePrepareProposal{Txs: make([][]byte, 0)}, err + } + extendedCommitInfoBz, err := req.LocalLastCommit.Marshal() + if err != nil { + return &cometabci.ResponsePrepareProposal{Txs: make([][]byte, 0)}, err + } + + injectedVoteExtTx := oracletypes.InjectedVoteExtensionTx{ + ExchangeRateVotes: exchangeRateVotes, + ExtendedCommitInfo: extendedCommitInfoBz, + } + + bz, err := injectedVoteExtTx.Marshal() + if err != nil { + h.logger.Error("failed to encode injected vote extension tx", "err", err) + return &cometabci.ResponsePrepareProposal{Txs: make([][]byte, 0)}, oracletypes.ErrEncodeInjVoteExt + } + + // Inject a placeholder tx into the proposal s.t. validators can decode, verify, + // and store the oracle exchange rate votes. + proposalTxs = append([][]byte{bz}, proposalTxs...) + } + + h.logger.Info( + "prepared proposal", + "txs", len(proposalTxs), + "vote_extensions_enabled", voteExtensionsEnabled, + ) + + return &cometabci.ResponsePrepareProposal{ + Txs: proposalTxs, + }, nil + } +} + +// ProcessProposalHandler is called on all validators, and they can verify if the proposed block is valid. In case an +// invalid block is being proposed validators can reject it, causing a new round of PrepareProposal to happen. This +// step MUST be deterministic. +func (h *ProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { + return func(ctx sdk.Context, req *cometabci.RequestProcessProposal) (*cometabci.ResponseProcessProposal, error) { + if req == nil { + err := fmt.Errorf("process proposal received a nil request") + h.logger.Error(err.Error()) + return nil, err + } + + if req.Txs == nil { + err := fmt.Errorf("process proposal received a request with nil Txs") + h.logger.Error("height", req.Height, err.Error()) + return rejectProposal(), err + } + + if VoteExtensionsEnabled(ctx) { + result, err := h.handleVoteExtensions(ctx, req) + if err != nil { + h.logger.Error("vote extension validation failed", "err", err) + } + if result.Status != cometabci.ResponseProcessProposal_ACCEPT { + return result, err + } + } + + h.logger.Info("processed proposal", + "txs", len(req.Txs), + "vote_extensions_enabled", VoteExtensionsEnabled(ctx), + ) + + return &cometabci.ResponseProcessProposal{Status: cometabci.ResponseProcessProposal_ACCEPT}, nil + } +} + +func (h *ProposalHandler) handleVoteExtensions( + ctx sdk.Context, + req *cometabci.RequestProcessProposal, +) (*cometabci.ResponseProcessProposal, error) { + if len(req.Txs) < 1 { + h.logger.Error("got process proposal request with no commit info") + return rejectProposal(), oracletypes.ErrNoCommitInfo + } + + injectedTx, err := h.extractInjectedVoteExtensionTx(req.Txs) + if err != nil { + h.logger.Error("failed to extract injected vote extension tx", "err", err) + return rejectProposal(), err + } + + var extendedCommitInfo cometabci.ExtendedCommitInfo + if err := extendedCommitInfo.Unmarshal(injectedTx.ExtendedCommitInfo); err != nil { + h.logger.Error("failed to decode extended commit info", "err", err) + return rejectProposal(), err + } + + if err := baseapp.ValidateVoteExtensions(ctx, h.stakingKeeper, req.Height, ctx.ChainID(), extendedCommitInfo); err != nil { + return rejectProposal(), err + } + + expectedVotes, err := h.generateExchangeRateVotes(ctx, extendedCommitInfo) + if err != nil { + return rejectProposal(), err + } + + if err := h.verifyExchangeRateVotes(injectedTx.ExchangeRateVotes, expectedVotes); err != nil { + return rejectProposal(), err + } + + return &cometabci.ResponseProcessProposal{Status: cometabci.ResponseProcessProposal_ACCEPT}, nil +} + +func (h *ProposalHandler) extractInjectedVoteExtensionTx(txs [][]byte) (oracletypes.InjectedVoteExtensionTx, error) { + for _, tx := range txs { + var injected oracletypes.InjectedVoteExtensionTx + if err := injected.Unmarshal(tx); err == nil { + return injected, nil + } + } + return oracletypes.InjectedVoteExtensionTx{}, fmt.Errorf("failed to decode injected vote extension tx") +} + +func rejectProposal() *cometabci.ResponseProcessProposal { + return &cometabci.ResponseProcessProposal{Status: cometabci.ResponseProcessProposal_REJECT} +} + +func (h *ProposalHandler) generateExchangeRateVotes( + ctx sdk.Context, + ci cometabci.ExtendedCommitInfo, +) (votes []oracletypes.AggregateExchangeRateVote, err error) { + for _, vote := range ci.Votes { + if vote.BlockIdFlag != cmtproto.BlockIDFlagCommit { + continue + } + + var voteExt oracletypes.OracleVoteExtension + if err := voteExt.Unmarshal(vote.VoteExtension); err != nil { + h.logger.Error( + "failed to decode vote extension", + "err", err, + ) + return nil, err + } + + var valConsAddr sdk.ConsAddress + if err := valConsAddr.Unmarshal(vote.Validator.Address); err != nil { + h.logger.Error( + "failed to unmarshal validator consensus address", + "err", err, + ) + return nil, err + } + val, err := h.stakingKeeper.GetValidatorByConsAddr(ctx, valConsAddr) + if err != nil { + h.logger.Error( + "failed to get consensus validator from staking keeper", + "err", err, + ) + return nil, err + } + valAddr, err := sdk.ValAddressFromBech32(val.OperatorAddress) + if err != nil { + return nil, err + } + + exchangeRateVote := oracletypes.NewAggregateExchangeRateVote(voteExt.ExchangeRates, valAddr) + votes = append(votes, exchangeRateVote) + } + + // sort votes so they are verified in the same order in ProcessProposalHandler + sort.Slice(votes, func(i, j int) bool { + return votes[i].Voter < votes[j].Voter + }) + + return votes, nil +} + +func (h *ProposalHandler) verifyExchangeRateVotes( + injectedVotes []oracletypes.AggregateExchangeRateVote, + generatedVotes []oracletypes.AggregateExchangeRateVote, +) error { + if len(injectedVotes) != len(generatedVotes) { + return oracletypes.ErrNonEqualInjVotesLen + } + + for i := range injectedVotes { + injectedVote := injectedVotes[i] + generatedVote := generatedVotes[i] + + if injectedVote.Voter != generatedVote.Voter || !injectedVote.ExchangeRates.Equal(generatedVote.ExchangeRates) { + return oracletypes.ErrNonEqualInjVotesRates + } + } + + return nil +} diff --git a/x/oracle/abci/util.go b/x/oracle/abci/util.go new file mode 100644 index 0000000..1875823 --- /dev/null +++ b/x/oracle/abci/util.go @@ -0,0 +1,23 @@ +package abci + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// VoteExtensionsEnabled determines if vote extensions are enabled for the current block. +func VoteExtensionsEnabled(ctx sdk.Context) bool { + cp := ctx.ConsensusParams() + if cp.Abci == nil || cp.Abci.VoteExtensionsEnableHeight == 0 { + return false + } + + // Per the cosmos sdk, the first block should not utilize the latest finalize block state. This means + // vote extensions should NOT be making state changes. + // + // Ref: https://github.com/cosmos/cosmos-sdk/blob/2100a73dcea634ce914977dbddb4991a020ee345/baseapp/baseapp.go#L488-L495 + if ctx.BlockHeight() <= 1 { + return false + } + + return cp.Abci.VoteExtensionsEnableHeight < ctx.BlockHeight() +} diff --git a/x/oracle/abci/voteextension.go b/x/oracle/abci/voteextension.go new file mode 100644 index 0000000..fd6fcb4 --- /dev/null +++ b/x/oracle/abci/voteextension.go @@ -0,0 +1,159 @@ +package abci + +import ( + "fmt" + + "cosmossdk.io/log" + cometabci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DaevMithran/dmchain/x/oracle/keeper" + "github.com/DaevMithran/dmchain/x/oracle/types" + + "github.com/ojo-network/price-feeder/oracle" +) + +type VoteExtensionHandler struct { + logger log.Logger + oracleKeeper keeper.Keeper +} + +// NewVoteExtensionHandler returns a new VoteExtensionHandler. +func NewVoteExtensionHandler( + logger log.Logger, + oracleKeeper keeper.Keeper, +) *VoteExtensionHandler { + return &VoteExtensionHandler{ + logger: logger, + oracleKeeper: oracleKeeper, + } +} + +// ExtendVoteHandler creates an OracleVoteExtension using the prices fetched from the price feeder +// service. It will filter out exchange rates that are not part of the oracle module's accept list. +func (h *VoteExtensionHandler) ExtendVoteHandler() sdk.ExtendVoteHandler { + return func(ctx sdk.Context, req *cometabci.RequestExtendVote) (resp *cometabci.ResponseExtendVote, err error) { + defer func() { + // catch panics if possible + if r := recover(); r != nil { + h.logger.Error( + "recovered from panic in ExtendVoteHandler", + "err", r, + ) + + resp, err = &cometabci.ResponseExtendVote{VoteExtension: []byte{}}, + fmt.Errorf("recovered application panic in ExtendVote: %v", r) + } + }() + + if req == nil { + err := fmt.Errorf("extend vote handler received a nil request") + h.logger.Error(err.Error()) + return nil, err + } + + // Get prices from Oracle Keeper's pricefeeder and generate vote msg + if h.oracleKeeper.PriceFeeder.Oracle == nil { + err := fmt.Errorf("price feeder oracle not set") + h.logger.Error(err.Error()) + return &cometabci.ResponseExtendVote{VoteExtension: []byte{}}, err + } + + prices := h.oracleKeeper.PriceFeeder.Oracle.GetPrices() + exchangeRatesStr := oracle.GenerateExchangeRatesString(prices) + + // Parse as DecCoins + exchangeRates, err := types.ParseExchangeRateDecCoins(exchangeRatesStr) + if err != nil { + err := fmt.Errorf("extend vote handler received invalid exchange rate %w", types.ErrInvalidExchangeRate) + h.logger.Error( + "height", req.Height, + err.Error(), + ) + return &cometabci.ResponseExtendVote{VoteExtension: []byte{}}, err + } + + // Filter out rates which aren't included in the AcceptList. + acceptList := h.oracleKeeper.AcceptList(ctx) + filteredDecCoins := []sdk.DecCoin{} + for _, decCoin := range exchangeRates { + if acceptList.Contains(decCoin.Denom) { + filteredDecCoins = append(filteredDecCoins, decCoin) + } + } + + voteExt := types.OracleVoteExtension{ + Height: req.Height, + ExchangeRates: filteredDecCoins, + } + + bz, err := voteExt.Marshal() + if err != nil { + err := fmt.Errorf("failed to marshal vote extension: %w", err) + h.logger.Error( + "height", req.Height, + err.Error(), + ) + return &cometabci.ResponseExtendVote{VoteExtension: []byte{}}, err + } + + h.logger.Info( + "created vote extension", + "height", req.Height, + ) + return &cometabci.ResponseExtendVote{VoteExtension: bz}, nil + } +} + +// VerifyVoteExtensionHandler validates the OracleVoteExtension created by the ExtendVoteHandler. It +// verifies that the vote extension can unmarshal correctly and is for the correct height. +func (h *VoteExtensionHandler) VerifyVoteExtensionHandler() sdk.VerifyVoteExtensionHandler { + return func(ctx sdk.Context, req *cometabci.RequestVerifyVoteExtension) ( + *cometabci.ResponseVerifyVoteExtension, + error, + ) { + if req == nil { + err := fmt.Errorf("verify vote extension handler received a nil request") + h.logger.Error(err.Error()) + return nil, err + } + + if len(req.VoteExtension) == 0 { + h.logger.Info( + "verify vote extension handler received empty vote extension", + "height", req.Height, + ) + + return &cometabci.ResponseVerifyVoteExtension{Status: cometabci.ResponseVerifyVoteExtension_ACCEPT}, nil + } + + var voteExt types.OracleVoteExtension + err := voteExt.Unmarshal(req.VoteExtension) + if err != nil { + err := fmt.Errorf("verify vote extension handler failed to unmarshal vote extension: %w", err) + h.logger.Error( + "height", req.Height, + err.Error(), + ) + return &cometabci.ResponseVerifyVoteExtension{Status: cometabci.ResponseVerifyVoteExtension_REJECT}, err + } + + if voteExt.Height != req.Height { + err := fmt.Errorf( + "verify vote extension handler received vote extension height that doesn't"+ + "match request height; expected: %d, got: %d", + req.Height, + voteExt.Height, + ) + h.logger.Error(err.Error()) + return &cometabci.ResponseVerifyVoteExtension{Status: cometabci.ResponseVerifyVoteExtension_REJECT}, err + } + + h.logger.Info( + "verfied vote extension", + "height", req.Height, + ) + + return &cometabci.ResponseVerifyVoteExtension{Status: cometabci.ResponseVerifyVoteExtension_ACCEPT}, nil + } +} diff --git a/x/oracle/autocli.go b/x/oracle/autocli.go new file mode 100755 index 0000000..b2370f0 --- /dev/null +++ b/x/oracle/autocli.go @@ -0,0 +1,31 @@ +package module + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + modulev1 "github.com/DaevMithran/dmchain/api/oracle/v1" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: modulev1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current consensus parameters", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: modulev1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "UpdateParams", + Skip: false, // set to true if authority gated + }, + }, + }, + } +} diff --git a/x/oracle/client/cli/query.go b/x/oracle/client/cli/query.go new file mode 100755 index 0000000..71fe621 --- /dev/null +++ b/x/oracle/client/cli/query.go @@ -0,0 +1,371 @@ +package cli + +import ( + "fmt" + "strconv" + "strings" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/spf13/cobra" + + "github.com/DaevMithran/dmchain/util/cli" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// GetQueryCmd returns the CLI query commands for the x/oracle module. +func GetQueryCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: types.ModuleName, + Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + cmd.AddCommand( + GetCmdQueryAggregatePrevote(), + GetCmdQueryAggregateVote(), + GetCmdQueryParams(), + GetCmdQueryExchangeRates(), + GetCmdQueryExchangeRate(), + GetCmdQueryFeederDelegation(), + GetCmdQueryMissCounter(), + GetCmdQuerySlashWindow(), + CmdQueryEMA(), + CmdQueryWMA(), + CmdQuerySMA(), + ) + + return cmd +} + +// GetCmdQueryParams implements the query params command. +func GetCmdQueryParams() *cobra.Command { + cmd := &cobra.Command{ + Use: "params", + Args: cobra.NoArgs, + Short: "Query the current Oracle params", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.Params(cmd.Context(), &types.QueryParams{}) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// GetCmdQueryAggregateVote implements the query aggregate prevote of the +// validator command. +func GetCmdQueryAggregateVote() *cobra.Command { + cmd := &cobra.Command{ + Use: "aggregate-votes [validator]", + Args: cobra.RangeArgs(0, 1), + Short: "Query outstanding oracle aggregate votes", + Long: strings.TrimSpace(` +Query outstanding oracle aggregate vote. + +$ cheqd-noded query oracle aggregate-votes + +Or, you can filter with voter address + +$ cheqd-noded query oracle aggregate-votes cheqdvaloper... +`), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + query := types.QueryAggregateVote{} + + if len(args) > 0 { + validator, err := sdk.ValAddressFromBech32(args[0]) + if err != nil { + return err + } + query.ValidatorAddr = validator.String() + } + + res, err := queryClient.AggregateVote(cmd.Context(), &query) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// GetCmdQueryAggregatePrevote implements the query aggregate prevote of the +// validator command. +func GetCmdQueryAggregatePrevote() *cobra.Command { + cmd := &cobra.Command{ + Use: "aggregate-prevotes [validator]", + Args: cobra.RangeArgs(0, 1), + Short: "Query outstanding oracle aggregate prevotes", + Long: strings.TrimSpace(` +Query outstanding oracle aggregate prevotes. + +$ cheqd-noded query oracle aggregate-prevotes + +Or, can filter with voter address + +$ cheqd-noded query oracle aggregate-prevotes cheqdvaloper... +`), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + query := types.QueryAggregatePrevote{} + + if len(args) > 0 { + validator, err := sdk.ValAddressFromBech32(args[0]) + if err != nil { + return err + } + query.ValidatorAddr = validator.String() + } + + res, err := queryClient.AggregatePrevote(cmd.Context(), &query) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// GetCmdQueryExchangeRates implements the query rate command. +func GetCmdQueryExchangeRates() *cobra.Command { + cmd := &cobra.Command{ + Use: "exchange-rates", + Args: cobra.NoArgs, + Short: "Query the exchange rates", + Long: strings.TrimSpace(` +Query the current exchange rates of assets based on USD. +You can find the current list of active denoms by running + +$ cheqd-noded query oracle exchange-rates +`), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.ExchangeRates(cmd.Context(), &types.QueryExchangeRates{}) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// GetCmdQueryExchangeRates implements the query rate command. +func GetCmdQueryExchangeRate() *cobra.Command { + cmd := &cobra.Command{ + Use: "exchange-rate [denom]", + Args: cobra.ExactArgs(1), + Short: "Query the exchange rates", + Long: strings.TrimSpace(` +Query the current exchange rates of an asset based on USD. + +$ cheqd-noded query oracle exchange-rate ATOM +`), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + res, err := queryClient.ExchangeRates( + cmd.Context(), + &types.QueryExchangeRates{ + Denom: args[0], + }, + ) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// GetCmdQueryFeederDelegation implements the query feeder delegation command. +func GetCmdQueryFeederDelegation() *cobra.Command { + cmd := &cobra.Command{ + Use: "feeder-delegation [validator]", + Args: cobra.ExactArgs(1), + Short: "Query the current delegate for a given validator address", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + if _, err = sdk.ValAddressFromBech32(args[0]); err != nil { + return err + } + res, err := queryClient.FeederDelegation(cmd.Context(), &types.QueryFeederDelegation{ + ValidatorAddr: args[0], + }) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// GetCmdQueryMissCounter implements the miss counter query command. +func GetCmdQueryMissCounter() *cobra.Command { + cmd := &cobra.Command{ + Use: "miss-counter [validator]", + Args: cobra.ExactArgs(1), + Short: "Query the current miss counter for a given validator address", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + if _, err = sdk.ValAddressFromBech32(args[0]); err != nil { + return err + } + res, err := queryClient.MissCounter(cmd.Context(), &types.QueryMissCounter{ + ValidatorAddr: args[0], + }) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// GetCmdQuerySlashWindow implements the slash window query command. +func GetCmdQuerySlashWindow() *cobra.Command { + cmd := &cobra.Command{ + Use: "slash-window", + Short: "Query the current slash window progress", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.SlashWindow(cmd.Context(), &types.QuerySlashWindow{}) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdQueryEMA() *cobra.Command { + cmd := &cobra.Command{ + Use: "ema [denom]", + Args: cobra.ExactArgs(1), + Short: "Query the ema of the given denom", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + denom := strings.ToUpper(args[0]) // Convert denom to uppercase + req := &types.QueryEMARequest{Denom: denom} + res, err := queryClient.EMA(cmd.Context(), req) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdQueryWMA() *cobra.Command { + cmd := &cobra.Command{ + Use: "wma [denom]", + Short: "Query WMA price for a denom with specified strategy", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + denom := args[0] + strategy, _ := cmd.Flags().GetString("strategy") + weightsStr, _ := cmd.Flags().GetString("weights") + + var weights []int64 + if weightsStr != "" { + for _, w := range strings.Split(weightsStr, ",") { + val, err := strconv.ParseInt(strings.TrimSpace(w), 10, 64) + if err != nil { + return err + } + weights = append(weights, val) + } + } + + queryClient := types.NewQueryClient(clientCtx) + res, err := queryClient.WMA(cmd.Context(), &types.QueryWMARequest{ + Denom: denom, + Strategy: strategy, + CustomWeights: weights, + }) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + cmd.Flags().String("strategy", "BALANCED", "WMA strategy: BALANCED | OLDEST | RECENT | CUSTOM") + cmd.Flags().String("weights", "", "Custom weights (comma-separated, e.g. 10,9,8...)") + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdQuerySMA() *cobra.Command { + cmd := &cobra.Command{ + Use: "sma [denom]", + Args: cobra.ExactArgs(1), + Short: "Query the SMA of the given denom", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + denom := strings.ToUpper(args[0]) // Convert denom to uppercase + req := &types.QuerySMARequest{Denom: denom} + res, err := queryClient.SMA(cmd.Context(), req) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} diff --git a/x/oracle/client/cli/tx.go b/x/oracle/client/cli/tx.go new file mode 100755 index 0000000..148ca86 --- /dev/null +++ b/x/oracle/client/cli/tx.go @@ -0,0 +1,165 @@ +package cli + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/spf13/cobra" + + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// GetTxCmd returns the CLI transaction commands for the x/oracle module. +func GetTxCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: types.ModuleName, + Short: fmt.Sprintf("Transaction commands for the %s module", types.ModuleName), + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + cmd.AddCommand( + GetCmdDelegateFeedConsent(), + GetCmdAggregateExchangeRatePrevote(), + GetCmdAggregateExchangeRateVote(), + ) + + return cmd +} + +// GetCmdDelegateFeedConsent creates a Cobra command to generate or +// broadcast a transaction with a MsgDelegateFeedConsent message. +func GetCmdDelegateFeedConsent() *cobra.Command { + cmd := &cobra.Command{ + Use: "delegate-feed-consent [operator] [feeder]", + Args: cobra.ExactArgs(2), + Short: "Delegate oracle feed consent from an operator to another feeder address", + RunE: func(cmd *cobra.Command, args []string) error { + if err := cmd.Flags().Set(flags.FlagFrom, args[0]); err != nil { + return err + } + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + feederAddr, err := sdk.AccAddressFromBech32(args[1]) + if err != nil { + return err + } + + msg := types.NewMsgDelegateFeedConsent(sdk.ValAddress(clientCtx.GetFromAddress()), feederAddr) + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// GetCmdAggregateExchangeRatePrevote creates a Cobra command to generate or +// broadcast a transaction with a MsgAggregateExchangeRatePrevote message. +func GetCmdAggregateExchangeRatePrevote() *cobra.Command { + cmd := &cobra.Command{ + Use: "exchange-rate-prevote [hash] [validator-address]", + Args: cobra.MinimumNArgs(1), + Short: "Submit an exchange rate prevote with a hash", + Long: fmt.Sprintf(`Submit an exchange rate prevote with a hash as a hex string + representation of a byte array. + Ex: dmchain tx oracle exchange-rate-prevote %s --from alice`, + "19c30cf9ea8aa0e0b03904162cadec0f2024a76d"), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + hash, err := types.AggregateVoteHashFromHexString(args[0]) + if err != nil { + return err + } + + valAddress := sdk.ValAddress(clientCtx.GetFromAddress()) + if len(args) > 1 { + valAddress, err = sdk.ValAddressFromBech32(args[1]) + if err != nil { + return err + } + } + + msg := types.NewMsgAggregateExchangeRatePrevote( + hash, + clientCtx.GetFromAddress(), + valAddress, + ) + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// GetCmdAggregateExchangeRateVote creates a Cobra command to generate or +// broadcast a transaction with a NewMsgAggregateExchangeRateVote message. +func GetCmdAggregateExchangeRateVote() *cobra.Command { + cmd := &cobra.Command{ + Use: "exchange-rate-vote [salt] [exchange-rates] [validator-address]", + Args: cobra.MinimumNArgs(2), + Short: "Submit an exchange rate vote with the salt and exchange rate string", + Long: fmt.Sprintf(`Submit an exchange rate vote with the salt of the previous hash, and the + exchange rate string previously used in the hash. + Ex: dmchain tx oracle exchange-rate-vote %s %s --from alice`, + "0cf33fb528b388660c3a42c3f3250e983395290b75fef255050fb5bc48a6025f", + "foo:1.0,bar:1232.123", + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + valAddress := sdk.ValAddress(clientCtx.GetFromAddress()) + if len(args) > 2 { + valAddress, err = sdk.ValAddressFromBech32(args[2]) + if err != nil { + return err + } + } + + msg := types.NewMsgAggregateExchangeRateVote( + args[0], + args[1], + clientCtx.GetFromAddress(), + valAddress, + ) + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/oracle/client/tests/cli_test.go b/x/oracle/client/tests/cli_test.go new file mode 100644 index 0000000..97a2e35 --- /dev/null +++ b/x/oracle/client/tests/cli_test.go @@ -0,0 +1,23 @@ +//go:build norace +// +build norace + +package tests + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + app "github.com/DaevMithran/dmchain/app" +) + +func TestIntegrationTestSuite(t *testing.T) { + cfg := app.IntegrationTestNetworkConfig() + cfg.NumValidators = 2 + cfg.Mnemonics = []string{ + "empower ridge mystery shrimp predict alarm swear brick across funny vendor essay antique vote place lava proof gaze crush head east arch twin lady", + "clean target advice dirt onion correct original vibrant actor upon waste eternal color barely shrimp aspect fall material wait repeat bench demise length seven", + } + + suite.Run(t, NewIntegrationTestSuite(cfg)) +} diff --git a/x/oracle/client/tests/suite.go b/x/oracle/client/tests/suite.go new file mode 100644 index 0000000..b019b79 --- /dev/null +++ b/x/oracle/client/tests/suite.go @@ -0,0 +1,224 @@ +package tests + +import ( + "fmt" + + "github.com/cometbft/cometbft/crypto/secp256k1" + cmtcli "github.com/cometbft/cometbft/libs/cli" + "github.com/cosmos/cosmos-sdk/client/flags" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/testutil/network" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/gogoproto/proto" + "github.com/stretchr/testify/suite" + + "github.com/DaevMithran/dmchain/x/oracle/client/cli" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +type IntegrationTestSuite struct { + suite.Suite + + cfg network.Config + network *network.Network +} + +func NewIntegrationTestSuite(cfg network.Config) *IntegrationTestSuite { + return &IntegrationTestSuite{cfg: cfg} +} + +func (s *IntegrationTestSuite) SetupSuite() { + t := s.T() + t.Log("setting up integration test suite") + + var err error + s.network, err = network.New(t, t.TempDir(), s.cfg) + s.Require().NoError(err) + + _, err = s.network.WaitForHeight(1) + s.Require().NoError(err) +} + +func (s *IntegrationTestSuite) TearDownSuite() { + s.T().Log("tearing down integration test suite") + + s.network.Cleanup() +} + +func (s *IntegrationTestSuite) TestDelegateFeedConsent() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + expectedCode uint32 + respType proto.Message + }{ + { + name: "invalid operator address", + args: []string{ + "foo", + s.network.Validators[1].Address.String(), + }, + expectErr: true, + respType: &sdk.TxResponse{}, + }, + { + name: "invalid feeder address", + args: []string{ + val.Address.String(), + "foo", + }, + expectErr: true, + respType: &sdk.TxResponse{}, + }, + { + name: "valid transaction", + args: []string{ + val.Address.String(), + s.network.Validators[1].Address.String(), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + }, + expectErr: false, + expectedCode: 0, + respType: &sdk.TxResponse{}, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cli.GetCmdDelegateFeedConsent(), tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + + txResp := tc.respType.(*sdk.TxResponse) + s.Require().Equal(tc.expectedCode, txResp.Code) + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryFeedDelegate() { + val := s.network.Validators[0] + inactiveVal := sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()) + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + respType proto.Message + }{ + { + name: "valid request", + args: []string{ + val.ValAddress.String(), + }, + expectErr: false, + respType: &types.QueryFeederDelegationResponse{}, + }, + { + name: "invalid address", + args: []string{ + "invalid_address", + }, + expectErr: true, + respType: &types.QueryFeederDelegationResponse{}, + }, + { + name: "non-existent validator", + args: []string{ + inactiveVal.String(), + }, + expectErr: true, + respType: &types.QueryFeederDelegationResponse{}, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + tc.args = append(tc.args, fmt.Sprintf("--%s=json", cmtcli.OutputFlag)) + out, err := clitestutil.ExecTestCLICmd(clientCtx, cli.GetCmdQueryFeederDelegation(), tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryExchangeRates() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + args := []string{ + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), + } + out, err := clitestutil.ExecTestCLICmd(clientCtx, cli.GetCmdQueryExchangeRates(), args) + s.Require().NoError(err) + + var res types.QueryExchangeRatesResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + + s.Require().Len(res.ExchangeRates, 1) + s.Require().False(res.ExchangeRates[0].Amount.IsZero()) +} + +func (s *IntegrationTestSuite) TestQueryParams() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + args := []string{ + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), + } + out, err := clitestutil.ExecTestCLICmd(clientCtx, cli.GetCmdQueryParams(), args) + s.Require().NoError(err) + + var res types.QueryParamsResponse + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + + s.Require().NotEmpty(res.Params.AcceptList) +} + +func (s *IntegrationTestSuite) TestQueryExchangeRate() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + testCases := []struct { + name string + args []string + expectErr bool + respType proto.Message + }{ + { + name: "valid denom", + args: []string{ + "OJO", + fmt.Sprintf("--%s=json", cmtcli.OutputFlag), + }, + expectErr: false, + respType: &types.QueryExchangeRatesResponse{}, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + out, err := clitestutil.ExecTestCLICmd(clientCtx, cli.GetCmdQueryExchangeRate(), tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + } + }) + } +} diff --git a/x/oracle/depinject.go b/x/oracle/depinject.go new file mode 100755 index 0000000..483428d --- /dev/null +++ b/x/oracle/depinject.go @@ -0,0 +1,80 @@ +package module + +import ( + "github.com/cosmos/cosmos-sdk/codec" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" + + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + + "cosmossdk.io/core/address" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + + modulev1 "github.com/DaevMithran/dmchain/api/oracle/module/v1" + "github.com/DaevMithran/dmchain/x/oracle/keeper" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +var _ appmodule.AppModule = AppModule{} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +func init() { + appmodule.Register( + &modulev1.Module{}, + appmodule.Provide(ProvideModule), + ) +} + +type ModuleInputs struct { + depinject.In + + Cdc codec.Codec + StoreService store.KVStoreService + AddressCodec address.Codec + + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper + StakingKeeper stakingkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + DistrKeeper types.DistributionKeeper + + ParamSpace paramstypes.Subspace +} + +type ModuleOutputs struct { + depinject.Out + + Module appmodule.AppModule + Keeper keeper.Keeper +} + +func ProvideModule(in ModuleInputs) ModuleOutputs { + govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() + + k := keeper.NewKeeper( + in.Cdc, + in.StoreService, + in.ParamSpace, + in.AccountKeeper, + in.BankKeeper, + in.DistrKeeper, + in.StakingKeeper, + types.ModuleName, + true, + govAddr, + ) + m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.BankKeeper) + + return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}} +} diff --git a/x/oracle/genesis.go b/x/oracle/genesis.go new file mode 100644 index 0000000..31ed31b --- /dev/null +++ b/x/oracle/genesis.go @@ -0,0 +1,177 @@ +package module + +import ( + "fmt" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DaevMithran/dmchain/x/oracle/keeper" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// InitGenesis initializes the x/oracle module's state from a provided genesis +// state. +func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, genState types.GenesisState) { + for _, d := range genState.FeederDelegations { + voter, err := sdk.ValAddressFromBech32(d.ValidatorAddress) + if err != nil { + panic(err) + } + + feeder, err := sdk.AccAddressFromBech32(d.FeederAddress) + if err != nil { + panic(err) + } + + keeper.SetFeederDelegation(ctx, voter, feeder) + } + + for _, ex := range genState.ExchangeRates { + keeper.SetExchangeRate(ctx, ex.Denom, ex.Amount) + } + + for _, mc := range genState.MissCounters { + operator, err := sdk.ValAddressFromBech32(mc.ValidatorAddress) + if err != nil { + panic(err) + } + + keeper.SetMissCounter(ctx, operator, mc.MissCounter) + } + + for _, ap := range genState.AggregateExchangeRatePrevotes { + valAddr, err := sdk.ValAddressFromBech32(ap.Voter) + if err != nil { + panic(err) + } + + keeper.SetAggregateExchangeRatePrevote(ctx, valAddr, ap) + } + + for _, av := range genState.AggregateExchangeRateVotes { + valAddr, err := sdk.ValAddressFromBech32(av.Voter) + if err != nil { + panic(err) + } + + keeper.SetAggregateExchangeRateVote(ctx, valAddr, av) + } + + for _, hp := range genState.HistoricPrices { + keeper.SetHistoricPrice(ctx, hp.ExchangeRate.Denom, hp.BlockNum, hp.ExchangeRate.Amount) + } + + for _, median := range genState.Medians { + keeper.SetHistoricMedian(ctx, median.ExchangeRate.Denom, median.BlockNum, median.ExchangeRate.Amount) + } + + for _, medianDeviation := range genState.MedianDeviations { + keeper.SetHistoricMedianDeviation( + ctx, + medianDeviation.ExchangeRate.Denom, + medianDeviation.BlockNum, + medianDeviation.ExchangeRate.Amount, + ) + } + + keeper.SetParams(ctx, genState.Params) + + // check if the module account exists + moduleAcc := keeper.GetOracleAccount(ctx) + if moduleAcc == nil { + panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) + } +} + +// ExportGenesis returns the x/oracle module's exported genesis. +func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { + params := keeper.GetParams(ctx) + + feederDelegations := []types.FeederDelegation{} + keeper.IterateFeederDelegations(ctx, func(valAddr sdk.ValAddress, feederAddr sdk.AccAddress) (stop bool) { + feederDelegations = append(feederDelegations, types.FeederDelegation{ + ValidatorAddress: valAddr.String(), + FeederAddress: feederAddr.String(), + }) + + return false + }) + + exchangeRates := sdk.DecCoins{} + keeper.IterateExchangeRates(ctx, func(denom string, rate math.LegacyDec) (stop bool) { + exchangeRates = append(exchangeRates, sdk.DecCoin{ + Denom: denom, + Amount: rate, + }) + + return false + }) + + missCounters := []types.MissCounter{} + keeper.IterateMissCounters(ctx, func(operator sdk.ValAddress, missCounter uint64) (stop bool) { + missCounters = append(missCounters, types.MissCounter{ + ValidatorAddress: operator.String(), + MissCounter: missCounter, + }) + + return false + }) + + aggregateExchangeRatePrevotes := []types.AggregateExchangeRatePrevote{} + keeper.IterateAggregateExchangeRatePrevotes( + ctx, + func(_ sdk.ValAddress, aggregatePrevote types.AggregateExchangeRatePrevote) (stop bool) { + aggregateExchangeRatePrevotes = append(aggregateExchangeRatePrevotes, aggregatePrevote) + return false + }, + ) + + aggregateExchangeRateVotes := []types.AggregateExchangeRateVote{} + keeper.IterateAggregateExchangeRateVotes( + ctx, + func(_ sdk.ValAddress, aggregateVote types.AggregateExchangeRateVote) bool { + aggregateExchangeRateVotes = append(aggregateExchangeRateVotes, aggregateVote) + return false + }, + ) + + historicPrices := []types.PriceStamp{} + keeper.IterateAllHistoricPrices( + ctx, + func(historicPrice types.PriceStamp) bool { + historicPrices = append(historicPrices, historicPrice) + return false + }, + ) + + medianPrices := []types.PriceStamp{} + keeper.IterateAllMedianPrices( + ctx, + func(medianPrice types.PriceStamp) bool { + medianPrices = append(medianPrices, medianPrice) + return false + }, + ) + + medianDeviationPrices := []types.PriceStamp{} + keeper.IterateAllMedianDeviationPrices( + ctx, + func(medianDeviationPrice types.PriceStamp) bool { + medianDeviationPrices = append(medianDeviationPrices, medianDeviationPrice) + return false + }, + ) + + return types.NewGenesisState( + params, + exchangeRates, + feederDelegations, + missCounters, + aggregateExchangeRatePrevotes, + aggregateExchangeRateVotes, + historicPrices, + medianPrices, + medianDeviationPrices, + ) +} diff --git a/x/oracle/keeper/alias_functions.go b/x/oracle/keeper/alias_functions.go new file mode 100644 index 0000000..656837f --- /dev/null +++ b/x/oracle/keeper/alias_functions.go @@ -0,0 +1,18 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// GetOracleAccount returns oracle ModuleAccount. +func (k Keeper) GetOracleAccount(ctx sdk.Context) sdk.ModuleAccountI { + return k.accountKeeper.GetModuleAccount(ctx, types.ModuleName) +} + +// GetRewardPool retrieves the balance of the oracle module account. +func (k Keeper) GetRewardPool(ctx sdk.Context, denom string) sdk.Coin { + acc := k.accountKeeper.GetModuleAccount(ctx, types.ModuleName) + return k.bankKeeper.GetBalance(ctx, acc.GetAddress(), denom) +} diff --git a/x/oracle/keeper/averages.go b/x/oracle/keeper/averages.go new file mode 100644 index 0000000..e78b9b7 --- /dev/null +++ b/x/oracle/keeper/averages.go @@ -0,0 +1,258 @@ +package keeper + +import ( + "errors" + "fmt" + + "cosmossdk.io/collections" + "cosmossdk.io/math" + "github.com/DaevMithran/dmchain/util" + "github.com/DaevMithran/dmchain/x/oracle/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type WmaStrategy string + +const ( + WmaStrategyOldest WmaStrategy = "OLDEST" + WmaStrategyRecent WmaStrategy = "RECENT" + WmaStrategyBalanced WmaStrategy = "BALANCED" + WmaStrategyCustom WmaStrategy = "CUSTOM" +) + +const ( + AvgTypeSMA = "sma" + AvgTypeEMA = "ema" + AvgTypeWMA = "wma" +) + +func (k Keeper) ComputeAverages(ctx sdk.Context, denom string) error { + currentBlock := util.SafeInt64ToUint64(ctx.BlockHeight()) + + // Collect last N prices + prices, err := CalculateHistoricPrices(ctx, denom, currentBlock, k) + if err != nil { + ctx.Logger().Error("Failed to calculate historic prices", "denom", denom, "error", err) + return nil + } + if len(prices) == 0 { + ctx.Logger().Error("No historic prices for denom", "denom", denom) + return nil + } + // calculate sma and store it + sma := CalculateSMA(prices) + k.SetSMA(ctx, denom, sma) + + // Calculate WMA for all strategies + strategies := []string{string(WmaStrategyBalanced), string(WmaStrategyOldest), string(WmaStrategyRecent)} + + for _, strategy := range strategies { + if !IsValidWmaStrategy(strategy) { + return types.ErrInvalidWmaStrategy.Wrapf("invalid WMA strategy: %s", strategy) + } + wma := CalculateWMA(prices, string(strategy), nil) + // Key: "denom", "wma:BALANCED" + key := collections.Join(denom, fmt.Sprintf("%s:%s", AvgTypeWMA, strategy)) + _ = k.Averages.Set(ctx, key, wma) + } + + // 3. EMA (smoothing factor α = 2 / (N + 1)) + prevEMA, present := k.GetEMA(ctx, denom) + + ema := CalculateEMA(prevEMA, present, prices) + k.SetEMA(ctx, denom, ema) + return nil +} + +func CalculateHistoricPrices(ctx sdk.Context, denom string, currentBlock uint64, k Keeper) ([]math.LegacyDec, error) { + var prices []math.LegacyDec + // Get the last recorded block for this denom + lastBlock, err := k.LastHistoricPriceBlock.Get(ctx, denom) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + k.Logger(ctx).Error("No historic prices recorded", "denom", denom) + return []math.LegacyDec{}, nil + } + return nil, err + } + + params := k.GetParams(ctx) + averagingWindow := params.AveragingWindow + stampPeriod := types.DefaultParams().HistoricStampPeriod + + // Iterate through the window and fetch prices + for i := uint64(0); i < averagingWindow; i++ { + // Calculate the specific block height we are looking for + targetBlock := lastBlock - (i * stampPeriod) + // Use the Pair key: Pair(denom, targetBlock) + price, err := k.HistoricPrices.Get(ctx, collections.Join(denom, targetBlock)) + if err != nil { + // If a specific stamp is missing, we continue (matching original logic) + if errors.Is(err, collections.ErrNotFound) { + continue + } + return nil, err + } + + prices = append(prices, price) + } + return prices, nil +} + +func CalculateEMA(previousEMA math.LegacyDec, present bool, prices []math.LegacyDec) math.LegacyDec { + if len(prices) == 0 { + return math.LegacyZeroDec() + } + + // Initialize EMA with previous value or first price + ema := previousEMA + if !present { + ema = prices[0] + } + + alpha := math.LegacyNewDecWithPrec(2, 0).QuoInt64(int64(len(prices) + 1)) + + for i := 1; i < len(prices); i++ { + ema = prices[i].Mul(alpha).Add(ema.Mul(math.LegacyOneDec().Sub(alpha))) + } + + return ema +} + +func (k Keeper) SetSMA(ctx sdk.Context, denom string, value math.LegacyDec) { + _ = k.Averages.Set(ctx, collections.Join(denom, AvgTypeSMA), value) +} + +func (k Keeper) SetEMA(ctx sdk.Context, denom string, value math.LegacyDec) { + _ = k.Averages.Set(ctx, collections.Join(denom, AvgTypeEMA), value) +} + +func (k Keeper) SetWMA(ctx sdk.Context, denom string, strategy WmaStrategy, value math.LegacyDec) { + _ = k.Averages.Set(ctx, collections.Join(denom, fmt.Sprintf("wma:%s:%s", AvgTypeWMA, strategy)), value) +} + +func (k Keeper) GetSMA(ctx sdk.Context, denom string) (math.LegacyDec, bool) { + val, err := k.Averages.Get(ctx, collections.Join(denom, AvgTypeSMA)) + return val, err == nil +} + +func (k Keeper) GetEMA(ctx sdk.Context, denom string) (math.LegacyDec, bool) { + val, err := k.Averages.Get(ctx, collections.Join(denom, AvgTypeEMA)) + return val, err == nil +} + +func (k Keeper) GetWMA(ctx sdk.Context, denom string, strategy string) (math.LegacyDec, bool) { + val, err := k.Averages.Get(ctx, collections.Join(denom, AvgTypeWMA)) + return val, err == nil +} + +func CalculateSMA(prices []math.LegacyDec) math.LegacyDec { + sum := math.LegacyZeroDec() + for _, p := range prices { + sum = sum.Add(p) + } + sma := sum.QuoInt64(int64(len(prices))) + return sma +} + +func CalculateWMA(prices []math.LegacyDec, strategy string, customWeights []int64) math.LegacyDec { + n := len(prices) + if n == 0 { + return math.LegacyZeroDec() + } + + weightedSum := math.LegacyZeroDec() + weightTotal := int64(0) + + switch strategy { + case "OLDEST": + // Weights: [N, N-1, ..., 1] + for i := 0; i < n; i++ { + weight := int64(n - i) + weightedSum = weightedSum.Add(prices[i].MulInt64(weight)) + weightTotal += weight + } + + case "RECENT": + // Weights: [1, 2, ..., N] + for i := 0; i < n; i++ { + weight := int64(i + 1) + weightedSum = weightedSum.Add(prices[i].MulInt64(weight)) + weightTotal += weight + } + + case "BALANCED": + // Weights: [1–10], then ten × 10s, then [9–1] to make 30 entries + // Adapt to whatever len(prices) is, but assume 30 ideal entries + weights := make([]int64, n) + for i := 0; i < n; i++ { + switch { + case i < 10: + weights[i] = int64(i + 1) + case i < 20: + weights[i] = 10 + default: + weights[i] = int64(30 - i) + } + } + + for i := 0; i < n; i++ { + weightedSum = weightedSum.Add(prices[i].MulInt64(weights[i])) + weightTotal += weights[i] + } + + case "CUSTOM": + // Use customWeights array provided by governance param or config + if len(customWeights) != n { + panic(fmt.Sprintf("custom weight length %d does not match price list length %d", len(customWeights), n)) + } + + for i := 0; i < n; i++ { + weight := customWeights[i] + weightedSum = weightedSum.Add(prices[i].MulInt64(weight)) + weightTotal += weight + } + + default: + panic(fmt.Sprintf("unsupported WMA strategy: %s", strategy)) + } + + return weightedSum.QuoInt64(weightTotal) +} + +func IsValidWmaStrategy(s string) bool { + switch WmaStrategy(s) { + case WmaStrategyOldest, WmaStrategyRecent, WmaStrategyBalanced, WmaStrategyCustom: + return true + default: + return false + } +} + +func (k Keeper) GetPriceHistory(ctx sdk.Context, denom string) []math.LegacyDec { + currentBlock := util.SafeInt64ToUint64(ctx.BlockHeight()) + + prices, err := CalculateHistoricPrices(ctx, denom, currentBlock, k) + if err != nil { + ctx.Logger().Error("Failed to fetch price history", "denom", denom, "error", err) + return nil + } + return prices +} + +func (k Keeper) GetCustomWMA(ctx sdk.Context, denom string, weights []int32) (math.LegacyDec, error) { + prices := k.GetPriceHistory(ctx, denom) + if len(prices) == 0 { + return math.LegacyZeroDec(), fmt.Errorf("no price history for %s", denom) + } + if len(prices) != len(weights) { + return math.LegacyZeroDec(), fmt.Errorf("weights length %d ≠ prices %d", len(weights), len(prices)) + } + + wInt64 := make([]int64, len(weights)) + for i, w := range weights { + wInt64[i] = int64(w) + } + + return CalculateWMA(prices, "CUSTOM", wInt64), nil +} diff --git a/x/oracle/keeper/ballot.go b/x/oracle/keeper/ballot.go new file mode 100644 index 0000000..8c01881 --- /dev/null +++ b/x/oracle/keeper/ballot.go @@ -0,0 +1,68 @@ +package keeper + +import ( + "sort" + + "github.com/DaevMithran/dmchain/util" + "github.com/DaevMithran/dmchain/x/oracle/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// OrganizeBallotByDenom collects all oracle votes for the current vote period, +// categorized by the votes' denom parameter. +func (k Keeper) OrganizeBallotByDenom( + ctx sdk.Context, + validatorClaimMap map[string]types.Claim, +) []types.BallotDenom { + votes := map[string]types.ExchangeRateBallot{} + + // collect aggregate votes + aggregateHandler := func(voterAddr sdk.ValAddress, vote types.AggregateExchangeRateVote) bool { + // organize ballot only for the active validators + claim, ok := validatorClaimMap[vote.Voter] + if ok { + for _, decCoin := range vote.ExchangeRates { + votes[decCoin.Denom] = append( + votes[decCoin.Denom], + types.NewVoteForTally(decCoin.Amount, decCoin.Denom, voterAddr, claim.Power), + ) + } + } + + return false + } + + k.IterateAggregateExchangeRateVotes(ctx, aggregateHandler) + + // sort created ballots + for denom, ballot := range votes { + sort.Sort(ballot) + votes[denom] = ballot + } + return types.BallotMapToSlice(votes) +} + +// ClearBallots clears all tallied prevotes and votes from the store. +func (k Keeper) ClearBallots(ctx sdk.Context, votePeriod uint64) { + // clear all aggregate prevotes + k.IterateAggregateExchangeRatePrevotes( + ctx, + func(voterAddr sdk.ValAddress, aggPrevote types.AggregateExchangeRatePrevote) bool { + if util.SafeInt64ToUint64(ctx.BlockHeight()) > aggPrevote.SubmitBlock+votePeriod { + k.DeleteAggregateExchangeRatePrevote(ctx, voterAddr) + } + + return false + }, + ) + + // clear all aggregate votes + k.IterateAggregateExchangeRateVotes( + ctx, + func(voterAddr sdk.ValAddress, _ types.AggregateExchangeRateVote) bool { + k.DeleteAggregateExchangeRateVote(ctx, voterAddr) + return false + }, + ) +} diff --git a/x/oracle/keeper/ballot_test.go b/x/oracle/keeper/ballot_test.go new file mode 100644 index 0000000..22a2a49 --- /dev/null +++ b/x/oracle/keeper/ballot_test.go @@ -0,0 +1,75 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + "github.com/DaevMithran/dmchain/x/oracle/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (s *IntegrationTestSuite) TestBallot_OrganizeBallotByDenom() { + require := s.Require() + s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, math.LegacyOneDec()) + claimMap := make(map[string]types.Claim) + + // Empty Map + res := s.app.OracleKeeper.OrganizeBallotByDenom(s.ctx, claimMap) + require.Empty(res) + + s.app.OracleKeeper.SetAggregateExchangeRateVote( + s.ctx, valAddr, types.AggregateExchangeRateVote{ + ExchangeRates: sdk.DecCoins{ + sdk.DecCoin{ + Denom: "DM", + Amount: math.LegacyOneDec(), + }, + }, + Voter: valAddr.String(), + }, + ) + + claimMap[valAddr.String()] = types.Claim{ + Power: 1, + Weight: 1, + MandatoryWinCount: 1, + Recipient: valAddr, + } + res = s.app.OracleKeeper.OrganizeBallotByDenom(s.ctx, claimMap) + require.Equal([]types.BallotDenom{ + { + Ballot: types.ExchangeRateBallot{types.NewVoteForTally(math.LegacyOneDec(), "OJO", valAddr, 1)}, + Denom: "DM", + }, + }, res) +} + +func (s *IntegrationTestSuite) TestBallot_ClearBallots() { + prevote := types.AggregateExchangeRatePrevote{ + Hash: "hash", + Voter: addr.String(), + SubmitBlock: 0, + } + s.app.OracleKeeper.SetAggregateExchangeRatePrevote(s.ctx, valAddr, prevote) + prevoteRes, err := s.app.OracleKeeper.GetAggregateExchangeRatePrevote(s.ctx, valAddr) + s.Require().NoError(err) + s.Require().Equal(prevoteRes, prevote) + + var decCoins sdk.DecCoins + decCoins = append(decCoins, sdk.DecCoin{ + Denom: "DM", + Amount: math.LegacyZeroDec(), + }) + vote := types.AggregateExchangeRateVote{ + ExchangeRates: decCoins, + Voter: addr.String(), + } + s.app.OracleKeeper.SetAggregateExchangeRateVote(s.ctx, valAddr, vote) + voteRes, err := s.app.OracleKeeper.GetAggregateExchangeRateVote(s.ctx, valAddr) + s.Require().NoError(err) + s.Require().Equal(voteRes, vote) + + s.app.OracleKeeper.ClearBallots(s.ctx, 0) + _, err = s.app.OracleKeeper.GetAggregateExchangeRatePrevote(s.ctx, valAddr) + s.Require().Error(err) + _, err = s.app.OracleKeeper.GetAggregateExchangeRateVote(s.ctx, valAddr) + s.Require().Error(err) +} diff --git a/x/oracle/keeper/end_blocker.go b/x/oracle/keeper/end_blocker.go new file mode 100644 index 0000000..fbcfedd --- /dev/null +++ b/x/oracle/keeper/end_blocker.go @@ -0,0 +1,58 @@ +package keeper + +import ( + "github.com/DaevMithran/dmchain/util" + "github.com/DaevMithran/dmchain/util/metrics" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// PruneAllPrices deletes all historic prices, medians, and median deviations +// outside pruning period determined by the stamp period multiplied by the maximum stamps. +func (k *Keeper) PruneAllPrices(ctx sdk.Context) { + params := k.GetParams(ctx) + blockHeight := util.SafeInt64ToUint64(ctx.BlockHeight()) + + if k.IsPeriodLastBlock(ctx, params.HistoricStampPeriod) { + pruneHistoricPeriod := params.HistoricStampPeriod * params.MaximumPriceStamps + if pruneHistoricPeriod < blockHeight { + k.PruneHistoricPricesBeforeBlock(ctx, blockHeight-pruneHistoricPeriod) + } + + if k.IsPeriodLastBlock(ctx, params.MedianStampPeriod) { + pruneMedianPeriod := params.MedianStampPeriod * params.MaximumMedianStamps + if pruneMedianPeriod < blockHeight { + k.PruneMediansBeforeBlock(ctx, blockHeight-pruneMedianPeriod) + k.PruneMedianDeviationsBeforeBlock(ctx, blockHeight-pruneMedianPeriod) + } + } + } +} + +// IsPeriodLastBlock returns true if we are at the last block of the period +func (k *Keeper) IsPeriodLastBlock(ctx sdk.Context, blocksPerPeriod uint64) bool { + return (util.SafeInt64ToUint64(ctx.BlockHeight())+1)%blocksPerPeriod == 0 +} + +// RecordEndBlockMetrics records miss counter and price metrics at the end of the block +func (k *Keeper) RecordEndBlockMetrics(ctx sdk.Context) { + if !k.telemetryEnabled { + return + } + + k.IterateMissCounters(ctx, func(operator sdk.ValAddress, missCounter uint64) bool { + metrics.RecordMissCounter(operator, missCounter) + return false + }) + + medians := k.AllMedianPrices(ctx) + medians = *medians.NewestPrices() + for _, median := range medians { + metrics.RecordMedianPrice(median.ExchangeRate.Denom, median.ExchangeRate.Amount) + } + + medianDeviations := k.AllMedianDeviationPrices(ctx) + medianDeviations = *medianDeviations.NewestPrices() + for _, medianDeviation := range medianDeviations { + metrics.RecordMedianDeviationPrice(medianDeviation.ExchangeRate.Denom, medianDeviation.ExchangeRate.Amount) + } +} diff --git a/x/oracle/keeper/genesis.go b/x/oracle/keeper/genesis.go new file mode 100644 index 0000000..40c3856 --- /dev/null +++ b/x/oracle/keeper/genesis.go @@ -0,0 +1,94 @@ +package keeper + +import ( + "cosmossdk.io/collections" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// IterateAllHistoricPrices iterates over all historic prices. +// Iterator stops when exhausting the source, or when the handler returns `true`. +func (k Keeper) IterateAllHistoricPrices( + ctx sdk.Context, + handler func(types.PriceStamp) bool, +) { + err := k.HistoricPrices.Walk(ctx, nil, func(key collections.Pair[string, uint64], value math.LegacyDec) (stop bool, err error) { + denom := key.K1() + blockNum := key.K2() + + historicPrice := types.PriceStamp{ + ExchangeRate: &sdk.DecCoin{Denom: denom, Amount: value}, + BlockNum: blockNum, + } + return handler(historicPrice), nil + }) + if err != nil { + k.Logger(ctx).Error("failed to iterate historic prices", "error", err) + } +} + +// AllHistoricPrices collects and returns all historic prices. +func (k Keeper) AllHistoricPrices(ctx sdk.Context) types.PriceStamps { + prices := types.PriceStamps{} + k.IterateAllHistoricPrices(ctx, func(price types.PriceStamp) (stop bool) { + prices = append(prices, price) + return false + }) + return prices +} + +// IterateAllMedianPrices iterates over all median prices. +func (k Keeper) IterateAllMedianPrices( + ctx sdk.Context, + handler func(types.PriceStamp) bool, +) { + err := k.MedianPrices.Walk(ctx, nil, func(key collections.Pair[string, uint64], value math.LegacyDec) (stop bool, err error) { + median := types.PriceStamp{ + ExchangeRate: &sdk.DecCoin{Denom: key.K1(), Amount: value}, + BlockNum: key.K2(), + } + return handler(median), nil + }) + if err != nil { + k.Logger(ctx).Error("failed to iterate median prices", "error", err) + } +} + +// AllMedianPrices collects and returns all median prices. +func (k Keeper) AllMedianPrices(ctx sdk.Context) types.PriceStamps { + prices := types.PriceStamps{} + k.IterateAllMedianPrices(ctx, func(median types.PriceStamp) (stop bool) { + prices = append(prices, median) + return false + }) + return prices +} + +// IterateAllMedianDeviationPrices iterates over all median deviation prices. +func (k Keeper) IterateAllMedianDeviationPrices( + ctx sdk.Context, + handler func(types.PriceStamp) bool, +) { + err := k.MedianDeviations.Walk(ctx, nil, func(key collections.Pair[string, uint64], value math.LegacyDec) (stop bool, err error) { + medianDeviation := types.PriceStamp{ + ExchangeRate: &sdk.DecCoin{Denom: key.K1(), Amount: value}, + BlockNum: key.K2(), + } + return handler(medianDeviation), nil + }) + if err != nil { + k.Logger(ctx).Error("failed to iterate median deviation prices", "error", err) + } +} + +// AllMedianDeviationPrices collects and returns all median deviation prices. +func (k Keeper) AllMedianDeviationPrices(ctx sdk.Context) types.PriceStamps { + prices := types.PriceStamps{} + k.IterateAllMedianDeviationPrices(ctx, func(median types.PriceStamp) (stop bool) { + prices = append(prices, median) + return false + }) + return prices +} diff --git a/x/oracle/keeper/genesis_test.go b/x/oracle/keeper/genesis_test.go new file mode 100755 index 0000000..51da4fa --- /dev/null +++ b/x/oracle/keeper/genesis_test.go @@ -0,0 +1,123 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + "github.com/DaevMithran/dmchain/x/oracle/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" +) + +func (s *IntegrationTestSuite) TestIterateAllHistoricPrices() { + keeper, ctx := s.app.OracleKeeper, s.ctx + + historicPrices := []types.PriceStamp{ + {BlockNum: 10, ExchangeRate: &sdk.DecCoin{ + Denom: "dm", Amount: math.LegacyMustNewDecFromStr("20.45"), + }}, + {BlockNum: 11, ExchangeRate: &sdk.DecCoin{ + Denom: "dm", Amount: math.LegacyMustNewDecFromStr("20.44"), + }}, + {BlockNum: 10, ExchangeRate: &sdk.DecCoin{ + Denom: "btc", Amount: math.LegacyMustNewDecFromStr("1200.56"), + }}, + {BlockNum: 11, ExchangeRate: &sdk.DecCoin{ + Denom: "btc", Amount: math.LegacyMustNewDecFromStr("1200.19"), + }}, + } + + for _, hp := range historicPrices { + keeper.SetHistoricPrice(ctx, hp.ExchangeRate.Denom, hp.BlockNum, hp.ExchangeRate.Amount) + } + + newPrices := []types.PriceStamp{} + keeper.IterateAllHistoricPrices( + ctx, + func(historicPrice types.PriceStamp) bool { + newPrices = append(newPrices, historicPrice) + return false + }, + ) + + s.Require().Equal(len(historicPrices), len(newPrices)) + + // Verify that the historic prices from IterateAllHistoricPrices equal + // the ones set by SetHistoricPrice +FOUND: + for _, oldPrice := range historicPrices { + for _, newPrice := range newPrices { + if oldPrice.BlockNum == newPrice.BlockNum && oldPrice.ExchangeRate.Denom == newPrice.ExchangeRate.Denom { + s.Require().Equal(oldPrice.ExchangeRate.Amount, newPrice.ExchangeRate.Amount) + continue FOUND + } + } + s.T().Errorf("did not find match for historic price: %+v", oldPrice) + } +} + +func (s *IntegrationTestSuite) TestIterateAllMedianPrices() { + keeper, ctx := s.app.OracleKeeper, s.ctx + medians := sdk.DecCoins{ + {Denom: "dm", Amount: math.LegacyMustNewDecFromStr("20.44")}, + {Denom: "atom", Amount: math.LegacyMustNewDecFromStr("2.66")}, + {Denom: "osmo", Amount: math.LegacyMustNewDecFromStr("13.64")}, + } + + for _, m := range medians { + keeper.SetHistoricMedian(ctx, m.Denom, uint64(s.ctx.BlockHeight()), m.Amount) + } + + newMedians := []types.PriceStamp{} + keeper.IterateAllMedianPrices( + ctx, + func(median types.PriceStamp) bool { + newMedians = append(newMedians, median) + return false + }, + ) + require.Equal(s.T(), len(medians), len(newMedians)) + +FOUND: + for _, oldMedian := range medians { + for _, newMedian := range newMedians { + if oldMedian.Denom == newMedian.ExchangeRate.Denom { + s.Require().Equal(oldMedian.Amount, newMedian.ExchangeRate.Amount) + continue FOUND + } + } + s.T().Errorf("did not find match for median price: %+v", oldMedian) + } +} + +func (s *IntegrationTestSuite) TestIterateAllMedianDeviationPrices() { + keeper, ctx := s.app.OracleKeeper, s.ctx + medians := sdk.DecCoins{ + {Denom: "dm", Amount: math.LegacyMustNewDecFromStr("21.44")}, + {Denom: "atom", Amount: math.LegacyMustNewDecFromStr("3.66")}, + {Denom: "osmo", Amount: math.LegacyMustNewDecFromStr("14.64")}, + } + + for _, m := range medians { + keeper.SetHistoricMedianDeviation(ctx, m.Denom, uint64(s.ctx.BlockHeight()), m.Amount) + } + + newMedians := []types.PriceStamp{} + keeper.IterateAllMedianDeviationPrices( + ctx, + func(median types.PriceStamp) bool { + newMedians = append(newMedians, median) + return false + }, + ) + require.Equal(s.T(), len(medians), len(newMedians)) + +FOUND: + for _, oldMedian := range medians { + for _, newMedian := range newMedians { + if oldMedian.Denom == newMedian.ExchangeRate.Denom { + s.Require().Equal(oldMedian.Amount, newMedian.ExchangeRate.Amount) + continue FOUND + } + } + s.T().Errorf("did not find match for median price: %+v", oldMedian) + } +} diff --git a/x/oracle/keeper/grpc_query.go b/x/oracle/keeper/grpc_query.go new file mode 100644 index 0000000..c9f1d45 --- /dev/null +++ b/x/oracle/keeper/grpc_query.go @@ -0,0 +1,397 @@ +package keeper + +import ( + "context" + "errors" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/DaevMithran/dmchain/util" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +var _ types.QueryServer = Querier{} + +// Querier implements a QueryServer for the x/oracle module. +type Querier struct { + Keeper +} + +// NewQuerier returns an implementation of the oracle QueryServer interface +// for the provided Keeper. +func NewQuerier(keeper Keeper) types.QueryServer { + return &Querier{Keeper: keeper} +} + +// Params queries params of x/oracle module. +func (q Querier) Params( + goCtx context.Context, + req *types.QueryParams, +) (*types.QueryParamsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + params := q.GetParams(ctx) + + return &types.QueryParamsResponse{Params: params}, nil +} + +// ExchangeRates queries exchange rates of all denoms, or, if specified, returns +// a single denom. +func (q Querier) ExchangeRates( + goCtx context.Context, + req *types.QueryExchangeRates, +) (*types.QueryExchangeRatesResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + var exchangeRates sdk.DecCoins + + if len(req.Denom) > 0 { + exchangeRate, err := q.GetExchangeRate(ctx, req.Denom) + if err != nil { + return nil, err + } + + exchangeRates = exchangeRates.Add(sdk.NewDecCoinFromDec(req.Denom, exchangeRate)) + } else { + q.IterateExchangeRates(ctx, func(denom string, rate math.LegacyDec) (stop bool) { + exchangeRates = exchangeRates.Add(sdk.NewDecCoinFromDec(denom, rate)) + return false + }) + } + + return &types.QueryExchangeRatesResponse{ExchangeRates: exchangeRates}, nil +} + +// ActiveExchangeRates queries all denoms for which exchange rates exist. +func (q Querier) ActiveExchangeRates( + goCtx context.Context, + req *types.QueryActiveExchangeRates, +) (*types.QueryActiveExchangeRatesResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + denoms := []string{} + q.IterateExchangeRates(ctx, func(denom string, _ math.LegacyDec) (stop bool) { + denoms = append(denoms, denom) + return false + }) + + return &types.QueryActiveExchangeRatesResponse{ActiveRates: denoms}, nil +} + +// FeederDelegation queries the account address to which the validator operator +// delegated oracle vote rights. +func (q Querier) FeederDelegation( + goCtx context.Context, + req *types.QueryFeederDelegation, +) (*types.QueryFeederDelegationResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + feederAddr, err := q.GetFeederDelegation(ctx, valAddr) + if err != nil { + return nil, err + } + + return &types.QueryFeederDelegationResponse{ + FeederAddr: feederAddr.String(), + }, nil +} + +// MissCounter queries oracle miss counter of a validator. +func (q Querier) MissCounter( + goCtx context.Context, + req *types.QueryMissCounter, +) (*types.QueryMissCounterResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + return &types.QueryMissCounterResponse{ + MissCounter: q.GetMissCounter(ctx, valAddr), + }, nil +} + +// SlashWindow queries the current slash window progress of the oracle. +func (q Querier) SlashWindow( + goCtx context.Context, + req *types.QuerySlashWindow, +) (*types.QuerySlashWindowResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + params := q.GetParams(ctx) + + return &types.QuerySlashWindowResponse{ + WindowProgress: (util.SafeInt64ToUint64(ctx.BlockHeight()) % params.SlashWindow) / + params.VotePeriod, + }, nil +} + +// AggregatePrevote queries an aggregate prevote of a validator. +func (q Querier) AggregatePrevote( + goCtx context.Context, + req *types.QueryAggregatePrevote, +) (*types.QueryAggregatePrevoteResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + prevote, err := q.GetAggregateExchangeRatePrevote(ctx, valAddr) + if err != nil { + return nil, err + } + + return &types.QueryAggregatePrevoteResponse{ + AggregatePrevote: prevote, + }, nil +} + +// AggregatePrevotes queries aggregate prevotes of all validators +func (q Querier) AggregatePrevotes( + goCtx context.Context, + req *types.QueryAggregatePrevotes, +) (*types.QueryAggregatePrevotesResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + var prevotes []types.AggregateExchangeRatePrevote + q.IterateAggregateExchangeRatePrevotes(ctx, func(_ sdk.ValAddress, prevote types.AggregateExchangeRatePrevote) bool { + prevotes = append(prevotes, prevote) + return false + }) + + return &types.QueryAggregatePrevotesResponse{ + AggregatePrevotes: prevotes, + }, nil +} + +// AggregateVote queries an aggregate vote of a validator +func (q Querier) AggregateVote( + goCtx context.Context, + req *types.QueryAggregateVote, +) (*types.QueryAggregateVoteResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddr) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + vote, err := q.GetAggregateExchangeRateVote(ctx, valAddr) + if err != nil { + return nil, err + } + + return &types.QueryAggregateVoteResponse{ + AggregateVote: vote, + }, nil +} + +// AggregateVotes queries aggregate votes of all validators +func (q Querier) AggregateVotes( + goCtx context.Context, + req *types.QueryAggregateVotes, +) (*types.QueryAggregateVotesResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + var votes []types.AggregateExchangeRateVote + q.IterateAggregateExchangeRateVotes(ctx, func(_ sdk.ValAddress, vote types.AggregateExchangeRateVote) bool { + votes = append(votes, vote) + return false + }) + + return &types.QueryAggregateVotesResponse{ + AggregateVotes: votes, + }, nil +} + +// Medians queries medians of all denoms, or, if specified, returns +// a single median. +func (q Querier) Medians( + goCtx context.Context, + req *types.QueryMedians, +) (*types.QueryMediansResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + medians := types.PriceStamps{} + + if len(req.Denom) > 0 { + if req.NumStamps == 0 { + return nil, status.Error(codes.InvalidArgument, "parameter NumStamps must be greater than 0") + } + + if req.NumStamps > util.SafeUint64ToUint32(q.MaximumMedianStamps(ctx)) { + req.NumStamps = util.SafeUint64ToUint32(q.MaximumMedianStamps(ctx)) + } + + medians = q.HistoricMedians(ctx, req.Denom, uint64(req.NumStamps)) + } else { + medians = q.AllMedianPrices(ctx) + } + + return &types.QueryMediansResponse{Medians: *medians.Sort()}, nil +} + +// MedianDeviations queries median deviations of all denoms, or, if specified, returns +// a single median deviation. +func (q Querier) MedianDeviations( + goCtx context.Context, + req *types.QueryMedianDeviations, +) (*types.QueryMedianDeviationsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + medianDeviations := types.PriceStamps{} + + if len(req.Denom) > 0 { + price, err := q.HistoricMedianDeviation(ctx, req.Denom) + if err != nil { + return nil, err + } + medianDeviations = append(medianDeviations, *price) + } else { + medianDeviations = q.AllMedianDeviationPrices(ctx) + } + + return &types.QueryMedianDeviationsResponse{MedianDeviations: *medianDeviations.Sort()}, nil +} + +// ValidatorRewardSet queries the list of validators that can earn rewards in +// the current Slash Window. +func (q Querier) ValidatorRewardSet( + goCtx context.Context, + req *types.QueryValidatorRewardSet, +) (*types.QueryValidatorRewardSetResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + validatorRewardSet := q.GetValidatorRewardSet(ctx) + + return &types.QueryValidatorRewardSetResponse{ + Validators: validatorRewardSet, + }, nil +} + +func (q Querier) EMA(ctx context.Context, req *types.QueryEMARequest) (*types.QueryEMAResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + sdkCtx := sdk.UnwrapSDKContext(ctx) + price, present := q.GetEMA(sdkCtx, req.Denom) + if !present { + return nil, errors.New("ema not present") + } + return &types.QueryEMAResponse{ + Price: price, + }, nil +} + +func (q Querier) WMA(goCtx context.Context, req *types.QueryWMARequest) (*types.QueryWMAResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + params := q.GetParams(ctx) + averagingWindow := params.AveragingWindow + if req == nil { + return nil, status.Error(codes.InvalidArgument, "request cannot be nil") + } + + if !IsValidWmaStrategy(req.Strategy) { + return nil, types.ErrInvalidWmaStrategy.Wrapf("invalid strategy: %s", req.Strategy) + } + + // Handle custom strategy separately (needs live price data + weights) + if req.Strategy == string(WmaStrategyCustom) { + prices, err := CalculateHistoricPrices(ctx, req.Denom, uint64(ctx.BlockHeight()), q.Keeper) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to get historic prices: %v", err) + } + if len(prices) == 0 { + return nil, status.Errorf(codes.NotFound, "no historic prices found for denom: %s", req.Denom) + } + if uint64(len(req.CustomWeights)) != averagingWindow { + return nil, status.Errorf(codes.InvalidArgument, + "custom_weights must have exactly %d elements (one per period)", averagingWindow) + } + + result := CalculateWMA(prices, req.Strategy, req.CustomWeights) + return &types.QueryWMAResponse{Price: result}, nil + } + result, found := q.Keeper.GetWMA(ctx, req.Denom, req.Strategy) + if !found { + return nil, status.Errorf(codes.NotFound, "no WMA found for denom: %s with strategy: %s", req.Denom, req.Strategy) + } + + return &types.QueryWMAResponse{Price: result}, nil +} + +func (q Querier) SMA(ctx context.Context, req *types.QuerySMARequest) (*types.QuerySMAResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + sdkCtx := sdk.UnwrapSDKContext(ctx) + price, present := q.GetSMA(sdkCtx, req.Denom) + if !present { + return nil, errors.New("sma not present") + } + return &types.QuerySMAResponse{ + Price: price, + }, nil +} diff --git a/x/oracle/keeper/historic_price.go b/x/oracle/keeper/historic_price.go new file mode 100644 index 0000000..d01c056 --- /dev/null +++ b/x/oracle/keeper/historic_price.go @@ -0,0 +1,397 @@ +package keeper + +import ( + "cosmossdk.io/collections" + "cosmossdk.io/errors" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DaevMithran/dmchain/util" + "github.com/DaevMithran/dmchain/util/decmath" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +const denomErr = "denom: " + +// HistoricMedians returns a list of a given denom's last numStamps medians. +func (k Keeper) HistoricMedians( + ctx sdk.Context, + denom string, + numStamps uint64, +) types.PriceStamps { + medians := types.PriceStamps{} + + k.IterateHistoricMedians(ctx, denom, uint(numStamps), func(median types.PriceStamp) bool { + medians = append(medians, median) + return false + }) + + return medians +} + +func (k Keeper) HistoricDeviations( + ctx sdk.Context, + denom string, + numStamps uint64, +) types.PriceStamps { + deviations := types.PriceStamps{} + + k.IterateHistoricDeviations(ctx, denom, uint(numStamps), func(median types.PriceStamp) bool { + deviations = append(deviations, median) + return false + }) + + return deviations +} + +// CalcAndSetHistoricMedian uses all the historic prices of a given denom to +// calculate its median price at the current block and set it to the store. +// It will also call setMedianDeviation with the calculated median. +func (k Keeper) CalcAndSetHistoricMedian( + ctx sdk.Context, + denom string, +) error { + historicPrices := k.historicPrices(ctx, denom, k.MaximumPriceStamps(ctx)) + median, err := decmath.Median(historicPrices) + if err != nil { + return errors.Wrap(err, denomErr+denom) + } + + block := util.SafeInt64ToUint64(ctx.BlockHeight()) + k.SetHistoricMedian(ctx, denom, block, median) + + return k.calcAndSetHistoricMedianDeviation(ctx, denom, median, historicPrices) +} + +func (k Keeper) SetHistoricMedian( + ctx sdk.Context, + denom string, + blockNum uint64, + median math.LegacyDec, +) { + k.MedianPrices.Set(ctx, collections.Join(denom, blockNum), median) +} + +// HistoricMedianDeviation returns a given denom's most recently stamped +// standard deviation around its median price at a given block. +func (k Keeper) HistoricMedianDeviation( + ctx sdk.Context, + denom string, +) (*types.PriceStamp, error) { + blockDiff := util.SafeInt64ToUint64(ctx.BlockHeight())%k.MedianStampPeriod(ctx) + 1 + blockNum := util.SafeInt64ToUint64(ctx.BlockHeight()) - blockDiff + median, err := k.MedianDeviations.Get(ctx, collections.Join(denom, blockNum)) + if err != nil { + return &types.PriceStamp{}, types.ErrNoMedianDeviation.Wrap(denomErr + denom) + } + + return types.NewPriceStamp(median, denom, blockNum), nil +} + +// WithinHistoricMedianDeviation returns whether or not the current price of a +// given denom is within the latest stamped Standard Deviation around +// the Median. +func (k Keeper) WithinHistoricMedianDeviation( + ctx sdk.Context, + denom string, +) (bool, error) { + // get latest median + medians := k.HistoricMedians(ctx, denom, 1) + if len(medians) == 0 { + return false, types.ErrNoMedian.Wrap(denomErr + denom) + } + median := medians[0].ExchangeRate.Amount + + // get latest historic price + prices := k.historicPrices(ctx, denom, 1) + if len(prices) == 0 { + return false, types.ErrNoHistoricPrice.Wrap(denomErr + denom) + } + price := prices[0] + + medianDeviation, err := k.HistoricMedianDeviation(ctx, denom) + if err != nil { + return false, err + } + + return price.Sub(median).Abs().LTE(medianDeviation.ExchangeRate.Amount), nil +} + +// calcAndSetHistoricMedianDeviation calculates and sets a given denom's standard +// deviation around its median price in the current block. +func (k Keeper) calcAndSetHistoricMedianDeviation( + ctx sdk.Context, + denom string, + median math.LegacyDec, + prices []math.LegacyDec, +) error { + medianDeviation, err := decmath.MedianDeviation(median, prices) + if err != nil { + return errors.Wrap(err, denomErr+denom) + } + + block := util.SafeInt64ToUint64(ctx.BlockHeight()) + k.SetHistoricMedianDeviation(ctx, denom, block, medianDeviation) + return nil +} + +func (k Keeper) SetHistoricMedianDeviation( + ctx sdk.Context, + denom string, + blockNum uint64, + medianDeviation math.LegacyDec, +) { + k.MedianDeviations.Set(ctx, collections.Join(denom, blockNum), medianDeviation) +} + +// MedianOfHistoricMedians calculates and returns the median of the last stampNum +// historic medians as well as the amount of medians used to calculate that median. +// If no medians are available, all returns are zero and error is nil. +func (k Keeper) MedianOfHistoricMedians( + ctx sdk.Context, + denom string, + numStamps uint64, +) (math.LegacyDec, uint32, error) { + medians := k.HistoricMedians(ctx, denom, numStamps) + if len(medians) == 0 { + return math.LegacyZeroDec(), 0, nil + } + median, err := decmath.Median(medians.Decs()) + if err != nil { + return math.LegacyZeroDec(), 0, errors.Wrap(err, denomErr+denom) + } + + return median, util.SafeIntToUint32(len(medians)), nil +} + +// AverageOfHistoricMedians calculates and returns the average of the last stampNum +// historic medians as well as the amount of medians used to calculate that average. +// If no medians are available, all returns are zero and error is nil. +func (k Keeper) AverageOfHistoricMedians( + ctx sdk.Context, + denom string, + numStamps uint64, +) (math.LegacyDec, uint32, error) { + medians := k.HistoricMedians(ctx, denom, numStamps) + if len(medians) == 0 { + return math.LegacyZeroDec(), 0, nil + } + average, err := decmath.Average(medians.Decs()) + if err != nil { + return math.LegacyZeroDec(), 0, errors.Wrap(err, denomErr+denom) + } + + return average, util.SafeIntToUint32(len(medians)), nil +} + +// MaxOfHistoricMedians calculates and returns the maximum value of the last stampNum +// historic medians as well as the amount of medians used to calculate that maximum. +// If no medians are available, all returns are zero and error is nil. +func (k Keeper) MaxOfHistoricMedians( + ctx sdk.Context, + denom string, + numStamps uint64, +) (math.LegacyDec, uint32, error) { + medians := k.HistoricMedians(ctx, denom, numStamps) + if len(medians) == 0 { + return math.LegacyZeroDec(), 0, nil + } + max, err := decmath.Max(medians.Decs()) + if err != nil { + return math.LegacyZeroDec(), 0, errors.Wrap(err, denomErr+denom) + } + + return max, util.SafeIntToUint32(len(medians)), nil +} + +// MinOfHistoricMedians calculates and returns the minimum value of the last stampNum +// historic medians as well as the amount of medians used to calculate that minimum. +// If no medians are available, all returns are zero and error is nil. +func (k Keeper) MinOfHistoricMedians( + ctx sdk.Context, + denom string, + numStamps uint64, +) (math.LegacyDec, uint32, error) { + medians := k.HistoricMedians(ctx, denom, numStamps) + if len(medians) == 0 { + return math.LegacyZeroDec(), 0, nil + } + min, err := decmath.Min(medians.Decs()) + if err != nil { + return math.LegacyZeroDec(), 0, errors.Wrap(err, denomErr+denom) + } + + return min, util.SafeIntToUint32(len(medians)), nil +} + +// historicPrices returns all the historic prices of a given denom. +func (k Keeper) historicPrices( + ctx sdk.Context, + denom string, + numStamps uint64, +) []math.LegacyDec { + // calculate start block to iterate from + historicPrices := []math.LegacyDec{} + + k.IterateHistoricPrices(ctx, denom, uint(numStamps), func(exchangeRate math.LegacyDec) bool { + historicPrices = append(historicPrices, exchangeRate) + return false + }) + + return historicPrices +} + +// IterateHistoricPrices iterates over historic prices of a given +// denom in the store in reverse. +// Iterator stops when exhausting the source, or when the handler returns `true`. +func (k Keeper) IterateHistoricPrices( + ctx sdk.Context, + denom string, + numStamps uint, + handler func(math.LegacyDec) bool, +) { + // Create a range that only looks at keys starting with the specific denom + // and iterates in descending order + prefix := collections.NewPrefixedPairRange[string, uint64](denom).Descending() + err := k.HistoricPrices.Walk(ctx, prefix, func(key collections.Pair[string, uint64], value math.LegacyDec) (stop bool, err error) { + if numStamps == 0 { + return true, nil + } + + numStamps-- + return handler(value), nil + }) + + if err != nil { + k.Logger(ctx).Error("failed to walk historic prices", "denom", denom, "error", err) + } +} + +// IterateHistoricMedians iterates over medians of a given +// denom in the store in reverse. +// Iterator stops when exhausting the source, or when the handler returns `true`. +func (k Keeper) IterateHistoricMedians( + ctx sdk.Context, + denom string, + numStamps uint, + handler func(types.PriceStamp) bool, +) { + prefix := collections.NewPrefixedPairRange[string, uint64](denom).Descending() + err := k.HistoricPrices.Walk(ctx, prefix, func(key collections.Pair[string, uint64], value math.LegacyDec) (stop bool, err error) { + if numStamps == 0 { + return true, nil + } + + price := types.NewPriceStamp(value, key.K1(), key.K2()) + + numStamps-- + return handler(*price), nil + }) + + if err != nil { + k.Logger(ctx).Error("failed to walk historic medians", "denom", denom, "error", err) + } +} + +// IterateHistoricDeviations iterates over medians of a given +// denom in the store in reverse. +// Iterator stops when exhausting the source, or when the handler returns `true`. +func (k Keeper) IterateHistoricDeviations( + ctx sdk.Context, + denom string, + numStamps uint, + handler func(types.PriceStamp) bool, +) { + prefix := collections.NewPrefixedPairRange[string, uint64](denom).Descending() + err := k.MedianDeviations.Walk(ctx, prefix, func(key collections.Pair[string, uint64], value math.LegacyDec) (stop bool, err error) { + if numStamps == 0 { + return true, nil + } + + price := types.NewPriceStamp(value, key.K1(), key.K2()) + + numStamps-- + return handler(*price), nil + }) + + if err != nil { + k.Logger(ctx).Error("failed to walk historic deviations", "denom", denom, "error", err) + } +} + +// AddHistoricPrice adds the historic price of a denom at the current +// block height. +func (k Keeper) AddHistoricPrice( + ctx sdk.Context, + denom string, + exchangeRate math.LegacyDec, +) { + block := util.SafeInt64ToUint64(ctx.BlockHeight()) + k.SetHistoricPrice(ctx, denom, block, exchangeRate) +} + +func (k Keeper) SetHistoricPrice( + ctx sdk.Context, + denom string, + blockNum uint64, + exchangeRate math.LegacyDec, +) { + _ = k.HistoricPrices.Set(ctx, collections.Join(denom, blockNum), exchangeRate) + _ = k.LastHistoricPriceBlock.Set(ctx, denom, blockNum) +} + +// DeleteHistoricPrice deletes the historic price of a denom at a +// given block. +func (k Keeper) DeleteHistoricPrice( + ctx sdk.Context, + denom string, + blockNum uint64, +) { + _ = k.HistoricPrices.Remove(ctx, collections.Join(denom, blockNum)) +} + +// DeleteHistoricMedian deletes a given denom's median price at a given block. +func (k Keeper) DeleteHistoricMedian( + ctx sdk.Context, + denom string, + blockNum uint64, +) { + _ = k.MedianPrices.Remove(ctx, collections.Join(denom, blockNum)) +} + +// DeleteHistoricMedianDeviation deletes a given denom's standard deviation +// around its median price at a given block. +func (k Keeper) DeleteHistoricMedianDeviation( + ctx sdk.Context, + denom string, + blockNum uint64, +) { + _ = k.MedianDeviations.Remove(ctx, collections.Join(denom, blockNum)) +} + +func (k Keeper) PruneHistoricPricesBeforeBlock(ctx sdk.Context, blockNum uint64) { + k.IterateAllHistoricPrices(ctx, func(price types.PriceStamp) (stop bool) { + if price.BlockNum <= blockNum { + k.DeleteHistoricPrice(ctx, price.ExchangeRate.Denom, price.BlockNum) + } + return false + }) +} + +func (k Keeper) PruneMediansBeforeBlock(ctx sdk.Context, blockNum uint64) { + k.IterateAllMedianPrices(ctx, func(price types.PriceStamp) (stop bool) { + if price.BlockNum <= blockNum { + k.DeleteHistoricMedian(ctx, price.ExchangeRate.Denom, price.BlockNum) + } + return false + }) +} + +func (k Keeper) PruneMedianDeviationsBeforeBlock(ctx sdk.Context, blockNum uint64) { + k.IterateAllMedianDeviationPrices(ctx, func(price types.PriceStamp) (stop bool) { + if price.BlockNum <= blockNum { + k.DeleteHistoricMedianDeviation(ctx, price.ExchangeRate.Denom, price.BlockNum) + } + return false + }) +} diff --git a/x/oracle/keeper/historic_price_test.go b/x/oracle/keeper/historic_price_test.go new file mode 100644 index 0000000..ff48a3f --- /dev/null +++ b/x/oracle/keeper/historic_price_test.go @@ -0,0 +1,100 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +func (s *IntegrationTestSuite) TestSetHistoraclePricing() { + app, ctx := s.app, s.ctx + + ctx = ctx.WithBlockHeight(9) + // update stamp params + app.OracleKeeper.SetHistoricStampPeriod(ctx, 1) + app.OracleKeeper.SetMedianStampPeriod(ctx, 3) + + // set historic prices and medians for denom with a similar + // prefix to test unique prefix safety when iterating for + // similar prefixes + displayDenomVariation := displayDenom + "test" + + // add multiple historic prices to store + exchangeRates := []string{"1.0", "1.2", "1.1", "1.4", "1.1", "1.15", "1.2", "1.3", "1.2"} + for i, exchangeRate := range exchangeRates { + app.OracleKeeper.AddHistoricPrice(ctx, displayDenom, math.LegacyMustNewDecFromStr(exchangeRate)) + app.OracleKeeper.AddHistoricPrice(ctx, displayDenomVariation, math.LegacyMustNewDecFromStr(exchangeRate)) + if ((i + 1) % int(app.OracleKeeper.MedianStampPeriod(ctx))) == 0 { + err := app.OracleKeeper.CalcAndSetHistoricMedian(ctx, displayDenom) + s.Require().NoError(err) + err = app.OracleKeeper.CalcAndSetHistoricMedian(ctx, displayDenomVariation) + s.Require().NoError(err) + } + + // update blockheight + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + } + + // check medians, num of available medians, and median standard deviation + medians := app.OracleKeeper.HistoricMedians(ctx, displayDenom, 3) + s.Require().Equal(len(medians), 3) + s.Require().Equal(medians[0], *types.NewPriceStamp(math.LegacyMustNewDecFromStr("1.2"), displayDenom, 17)) + s.Require().Equal(medians[1], *types.NewPriceStamp(math.LegacyMustNewDecFromStr("1.125"), displayDenom, 14)) + s.Require().Equal(medians[2], *types.NewPriceStamp(math.LegacyMustNewDecFromStr("1.1"), displayDenom, 11)) + + medianDeviation, err := app.OracleKeeper.HistoricMedianDeviation(ctx, displayDenom) + s.Require().NoError(err) + + s.Require().Equal(medianDeviation, types.NewPriceStamp(math.LegacyMustNewDecFromStr("0.111803398874989476"), displayDenom, 17)) + + // check current price is within the median deviation + result, err := app.OracleKeeper.WithinHistoricMedianDeviation(ctx, displayDenom) + s.Require().Equal(result, true) + s.Require().NoError(err) + + // check median stats of last 3 stamps + medianOfMedians, numMedians, err := app.OracleKeeper.MedianOfHistoricMedians(ctx, displayDenom, 3) + s.Require().NoError(err) + s.Require().Equal(numMedians, uint32(3)) + s.Require().Equal(medianOfMedians, math.LegacyMustNewDecFromStr("1.125")) + averageOfMedians, numMedians, err := app.OracleKeeper.AverageOfHistoricMedians(ctx, displayDenom, 3) + s.Require().NoError(err) + s.Require().Equal(numMedians, uint32(3)) + s.Require().Equal(averageOfMedians, math.LegacyMustNewDecFromStr("1.141666666666666666")) + maxMedian, numMedians, err := app.OracleKeeper.MaxOfHistoricMedians(ctx, displayDenom, 3) + s.Require().NoError(err) + s.Require().Equal(numMedians, uint32(3)) + s.Require().Equal(maxMedian, math.LegacyMustNewDecFromStr("1.2")) + minMedian, numMedians, err := app.OracleKeeper.MinOfHistoricMedians(ctx, displayDenom, 3) + s.Require().NoError(err) + s.Require().Equal(numMedians, uint32(3)) + s.Require().Equal(minMedian, math.LegacyMustNewDecFromStr("1.1")) + + // check median stats of last 1 stamps + medianOfMedians, numMedians, err = app.OracleKeeper.MedianOfHistoricMedians(ctx, displayDenom, 1) + s.Require().NoError(err) + s.Require().Equal(numMedians, uint32(1)) + s.Require().Equal(medianOfMedians, math.LegacyMustNewDecFromStr("1.2")) + averageOfMedians, numMedians, err = app.OracleKeeper.AverageOfHistoricMedians(ctx, displayDenom, 1) + s.Require().NoError(err) + s.Require().Equal(numMedians, uint32(1)) + s.Require().Equal(averageOfMedians, math.LegacyMustNewDecFromStr("1.2")) + maxMedian, numMedians, err = app.OracleKeeper.MaxOfHistoricMedians(ctx, displayDenom, 1) + s.Require().NoError(err) + s.Require().Equal(numMedians, uint32(1)) + s.Require().Equal(maxMedian, math.LegacyMustNewDecFromStr("1.2")) + minMedian, numMedians, err = app.OracleKeeper.MinOfHistoricMedians(ctx, displayDenom, 1) + s.Require().NoError(err) + s.Require().Equal(numMedians, uint32(1)) + s.Require().Equal(minMedian, math.LegacyMustNewDecFromStr("1.2")) + + // delete first median + blockPeriod := (3 - 1) * app.OracleKeeper.MedianStampPeriod(ctx) + lastStampBlock := uint64(ctx.BlockHeight()) - (uint64(ctx.BlockHeight())%app.OracleKeeper.MedianStampPeriod(ctx) + 1) + firstStampBlock := lastStampBlock - blockPeriod + app.OracleKeeper.DeleteHistoricMedian(ctx, displayDenom, firstStampBlock) + + medians = app.OracleKeeper.HistoricMedians(ctx, displayDenom, 3) + s.Require().Equal(len(medians), 2) + s.Require().Equal(medians[0], *types.NewPriceStamp(math.LegacyMustNewDecFromStr("1.2"), displayDenom, 17)) + s.Require().Equal(medians[1], *types.NewPriceStamp(math.LegacyMustNewDecFromStr("1.125"), displayDenom, 14)) +} diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go new file mode 100755 index 0000000..d83d00d --- /dev/null +++ b/x/oracle/keeper/keeper.go @@ -0,0 +1,414 @@ +package keeper + +import ( + "errors" + "fmt" + "strings" + + "github.com/DaevMithran/dmchain/pricefeeder" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/ojo-network/ojo/util/metrics" + + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "cosmossdk.io/collections" + storetypes "cosmossdk.io/core/store" + "cosmossdk.io/log" + "cosmossdk.io/math" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +var ten = math.LegacyMustNewDecFromStr("10") + +type Keeper struct { + cdc codec.BinaryCodec + paramSpace paramstypes.Subspace + + // Collections Schema + Schema collections.Schema + + // Map: denom -> ExchangeRate (math.LegacyDec) + ExchangeRates collections.Map[string, math.LegacyDec] + + // Map: Validator (sdk.ValAddress) -> Feeder (sdk.AccAddress) + FeederDelegations collections.Map[sdk.ValAddress, []byte] + + // Map: Voter (sdk.ValAddress) -> Prevote + Prevotes collections.Map[sdk.ValAddress, types.AggregateExchangeRatePrevote] + + // Map: Voter (sdk.ValAddress) -> Vote + Votes collections.Map[sdk.ValAddress, types.AggregateExchangeRateVote] + + // Map: Pair(Denom, BlockHeight) -> Price (math.LegacyDec) + HistoricPrices collections.Map[collections.Pair[string, uint64], math.LegacyDec] + MedianPrices collections.Map[collections.Pair[string, uint64], math.LegacyDec] + MedianDeviations collections.Map[collections.Pair[string, uint64], math.LegacyDec] + + // Map: Denom (string) -> Last Block Height (uint64) + LastHistoricPriceBlock collections.Map[string, uint64] + + // Map: Pair(Denom, AvgType) -> Value (math.LegacyDec) + // AvgType example: "sma", "ema", "wma:BALANCED" + Averages collections.Map[collections.Pair[string, string], math.LegacyDec] + + // Map: Validator Address -> Miss Counter (uint64) + MissCounters collections.Map[sdk.ValAddress, uint64] + + // Item: ValidatorRewardSet + ValidatorRewardSet collections.Item[types.ValidatorRewardSet] + + // Map: Block Height (uint64) -> ParamUpdatePlan + ParamUpdatePlans collections.Map[uint64, types.ParamUpdatePlan] + + accountKeeper types.AccountKeeper + bankKeeper types.BankKeeper + distrKeeper types.DistributionKeeper + StakingKeeper types.StakingKeeper + + PriceFeeder *pricefeeder.PriceFeeder + + distrName string + telemetryEnabled bool + // the address capable of executing a MsgUpdateParams message. Typically, this + // should be the x/gov module account. + authority string +} + +// NewKeeper creates a new Keeper instance +func NewKeeper( + cdc codec.BinaryCodec, + storeService storetypes.KVStoreService, + paramspace paramstypes.Subspace, + accountKeeper types.AccountKeeper, + bankKeeper types.BankKeeper, + distrKeeper types.DistributionKeeper, + stakingKeeper types.StakingKeeper, + distrName string, + telemetryEnabled bool, + authority string, +) Keeper { + + // ensure oracle module account is set + if addr := accountKeeper.GetModuleAddress(types.ModuleName); addr == nil { + panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) + } + + // set KeyTable if it has not already been set + if !paramspace.HasKeyTable() { + paramspace = paramspace.WithKeyTable(types.ParamKeyTable()) + } + + sb := collections.NewSchemaBuilder(storeService) + + if authority == "" { + authority = authtypes.NewModuleAddress(govtypes.ModuleName).String() + } + + k := Keeper{ + cdc: cdc, + + authority: authority, + ExchangeRates: collections.NewMap( + sb, + types.KeyPrefixExchangeRate, + "exchange_rates", + collections.StringKey, + sdk.LegacyDecValue, // Built-in codec for math.LegacyDec + ), + FeederDelegations: collections.NewMap( + sb, + types.KeyPrefixFeederDelegation, + "feeder_delegations", + sdk.ValAddressKey, + collections.BytesValue, + ), + Prevotes: collections.NewMap( + sb, + types.KeyPrefixAggregateExchangeRatePrevote, + "prevotes", + sdk.ValAddressKey, + codec.CollValue[types.AggregateExchangeRatePrevote](cdc), + ), + Votes: collections.NewMap( + sb, + types.KeyPrefixAggregateExchangeRateVote, + "votes", + sdk.ValAddressKey, + codec.CollValue[types.AggregateExchangeRateVote](cdc), + ), + HistoricPrices: collections.NewMap( + sb, + types.KeyPrefixHistoricPrice, + "historic_prices", + collections.PairKeyCodec(collections.StringKey, collections.Uint64Key), + sdk.LegacyDecValue, + ), + MedianPrices: collections.NewMap( + sb, + types.KeyPrefixMedian, + "median_prices", + collections.PairKeyCodec(collections.StringKey, collections.Uint64Key), + sdk.LegacyDecValue, + ), + MedianDeviations: collections.NewMap( + sb, + types.KeyPrefixMedianDeviation, + "median_deviation_prices", + collections.PairKeyCodec(collections.StringKey, collections.Uint64Key), + sdk.LegacyDecValue, + ), + LastHistoricPriceBlock: collections.NewMap( + sb, + types.KeyPrefixLastHistoricPriceBlock, + "last_historic_block", + collections.StringKey, + collections.Uint64Value, + ), + Averages: collections.NewMap( + sb, + types.KeyPrefixAverages, + "averages", + collections.PairKeyCodec(collections.StringKey, collections.StringKey), + sdk.LegacyDecValue, + ), + MissCounters: collections.NewMap( + sb, + types.KeyPrefixMissCounter, + "miss_counters", + sdk.ValAddressKey, + collections.Uint64Value, + ), + ValidatorRewardSet: collections.NewItem( + sb, + types.KeyPrefixValidatorRewardSet, + "validator_reward_set", + codec.CollValue[types.ValidatorRewardSet](cdc), + ), + ParamUpdatePlans: collections.NewMap( + sb, + types.KeyPrefixParamUpdatePlan, + "param_update_plans", + collections.Uint64Key, // Replaces manual byte formatting for uint64 + codec.CollValue[types.ParamUpdatePlan](cdc), + ), + } + + schema, err := sb.Build() + if err != nil { + panic(err) + } + + k.Schema = schema + + return k +} + +// Logger returns a module-specific logger. +func (k Keeper) Logger(ctx sdk.Context) log.Logger { + return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) +} + +// Exchange Rate + +// GetExchangeRateBase gets the consensus exchange rate of an asset +// in the base denom (e.g. ATOM -> uatom) +func (k Keeper) GetExchangeRate(ctx sdk.Context, symbol string) (math.LegacyDec, error) { + rate, err := k.ExchangeRates.Get(ctx, strings.ToUpper(symbol)) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return math.LegacyZeroDec(), types.ErrUnknownDenom.Wrap(symbol) + } + return math.LegacyZeroDec(), err + } + return rate, nil +} + +// GetExchangeRateBase gets the consensus exchange rate of an asset +// in the base denom (e.g. ATOM -> uatom) +func (k Keeper) GetExchangeRateBase(ctx sdk.Context, denom string) (math.LegacyDec, error) { + var symbol string + var exponent uint64 + // Translate the base denom -> symbol + params := k.GetParams(ctx) + for _, listDenom := range params.AcceptList { + if listDenom.BaseDenom == denom { + symbol = listDenom.SymbolDenom + exponent = uint64(listDenom.Exponent) + break + } + } + if len(symbol) == 0 { + return math.LegacyZeroDec(), types.ErrUnknownDenom.Wrap(denom) + } + + exchangeRate, err := k.GetExchangeRate(ctx, symbol) + if err != nil { + return math.LegacyZeroDec(), err + } + + powerReduction := ten.Power(exponent) + return exchangeRate.Quo(powerReduction), nil +} + +// SetExchangeRate sets the consensus exchange rate of USD denominated in the +// denom asset to the store. +func (k Keeper) SetExchangeRate(ctx sdk.Context, denom string, exchangeRate math.LegacyDec) { + _ = k.ExchangeRates.Set(ctx, strings.ToUpper(denom), exchangeRate) + go metrics.RecordExchangeRate(denom, exchangeRate) +} + +// SetExchangeRateWithEvent sets an consensus +// exchange rate to the store with ABCI event +func (k Keeper) SetExchangeRateWithEvent(ctx sdk.Context, denom string, exchangeRate math.LegacyDec) error { + k.SetExchangeRate(ctx, denom, exchangeRate) + return ctx.EventManager().EmitTypedEvent(&types.EventSetFxRate{ + Denom: denom, Rate: exchangeRate, + }) +} + +// IterateExchangeRates iterates over USD rates in the store. +func (k Keeper) IterateExchangeRates(ctx sdk.Context, handler func(string, math.LegacyDec) bool) { + err := k.ExchangeRates.Walk(ctx, nil, func(key string, value math.LegacyDec) (bool, error) { + return handler(key, value), nil + }) + if err != nil { + k.Logger(ctx).Error("failed to iterate exchange rates", "err", err) + } +} + +func (k Keeper) ClearExchangeRates(ctx sdk.Context) { + _ = k.ExchangeRates.Clear(ctx, nil) // Efficiently deletes all entries in prefix +} + +// Feeder Delegation + +// GetFeederDelegation gets the account address to which the validator operator +// delegated oracle vote rights. +func (k Keeper) GetFeederDelegation(ctx sdk.Context, vAddr sdk.ValAddress) (sdk.AccAddress, error) { + val, err := k.StakingKeeper.Validator(ctx, vAddr) + if err != nil { + return nil, err + } + // check that the given validator exists + if val == nil || !val.IsBonded() { + return nil, stakingtypes.ErrNoValidatorFound.Wrapf("validator %s is not in active set", vAddr) + } + + feeder, err := k.FeederDelegations.Get(ctx, vAddr) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return sdk.AccAddress(vAddr), nil // Default to validator address + } + return nil, err + } + return feeder, nil +} + +// SetFeederDelegation sets the account address to which the validator operator +// delegated oracle vote rights. +func (k Keeper) SetFeederDelegation(ctx sdk.Context, operator sdk.ValAddress, delegatedFeeder sdk.AccAddress) { + _ = k.FeederDelegations.Set(ctx, operator, delegatedFeeder) +} + +type IterateFeederDelegationHandler func(delegator sdk.ValAddress, delegate sdk.AccAddress) (stop bool) + +// IterateFeederDelegations iterates over the feed delegates and performs a +// callback function. +func (k Keeper) IterateFeederDelegations(ctx sdk.Context, handler IterateFeederDelegationHandler) { + err := k.FeederDelegations.Walk(ctx, nil, func(key sdk.ValAddress, value []byte) (stop bool, err error) { + accAddr := sdk.AccAddress(value) + return handler(key, accAddr), nil + }) + if err != nil { + k.Logger(ctx).Error("failed to walk feeder delegations", "error", err) + } +} + +// Prevote + +// GetAggregateExchangeRatePrevote retrieves an oracle prevote from the store. +func (k Keeper) GetAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress) (types.AggregateExchangeRatePrevote, error) { + prevote, err := k.Prevotes.Get(ctx, voter) + if err != nil { + return types.AggregateExchangeRatePrevote{}, types.ErrNoAggregatePrevote.Wrap(voter.String()) + } + return prevote, nil +} + +// HasAggregateExchangeRatePrevote checks if a validator has an existing prevote. +func (k Keeper) HasAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress) bool { + has, _ := k.Prevotes.Has(ctx, voter) + return has +} + +// SetAggregateExchangeRatePrevote set an oracle aggregate prevote to the store. +func (k Keeper) SetAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress, prevote types.AggregateExchangeRatePrevote) { + _ = k.Prevotes.Set(ctx, voter, prevote) +} + +// DeleteAggregateExchangeRatePrevote deletes an oracle prevote from the store. +func (k Keeper) DeleteAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress) { + _ = k.Prevotes.Remove(ctx, voter) +} + +// IterateAggregateExchangeRatePrevotes iterates rate over prevotes in the store +func (k Keeper) IterateAggregateExchangeRatePrevotes(ctx sdk.Context, handler func(sdk.ValAddress, types.AggregateExchangeRatePrevote) bool) { + err := k.Prevotes.Walk(ctx, nil, func(key sdk.ValAddress, value types.AggregateExchangeRatePrevote) (stop bool, err error) { + return handler(key, value), nil + }) + if err != nil { + k.Logger(ctx).Error("failed to walk prevotes", "error", err) + } +} + +// Vote + +// GetAggregateExchangeRateVote retrieves an oracle prevote from the store. +func (k Keeper) GetAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddress) (types.AggregateExchangeRateVote, error) { + vote, err := k.Votes.Get(ctx, voter) + if err != nil { + return types.AggregateExchangeRateVote{}, types.ErrNoAggregateVote.Wrap(voter.String()) + } + return vote, nil +} + +// SetAggregateExchangeRateVote adds an oracle aggregate prevote to the store. +func (k Keeper) SetAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddress, vote types.AggregateExchangeRateVote) { + _ = k.Votes.Set(ctx, voter, vote) +} + +// DeleteAggregateExchangeRateVote deletes an oracle prevote from the store. +func (k Keeper) DeleteAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddress) { + _ = k.Votes.Remove(ctx, voter) +} + +type IterateExchangeRateVote = func(voterAddr sdk.ValAddress, aggregateVote types.AggregateExchangeRateVote) (stop bool) + +// IterateAggregateExchangeRateVotes iterates rate over prevotes in the store. +func (k Keeper) IterateAggregateExchangeRateVotes(ctx sdk.Context, handler IterateExchangeRateVote) { + err := k.Votes.Walk(ctx, nil, func(key sdk.ValAddress, value types.AggregateExchangeRateVote) (stop bool, err error) { + return handler(key, value), nil + }) + if err != nil { + k.Logger(ctx).Error("failed to walk votes", "error", err) + } +} + +// Validation + +// ValidateFeeder returns error if the given feeder is not allowed to feed the message. +func (k Keeper) ValidateFeeder(ctx sdk.Context, feederAddr sdk.AccAddress, valAddr sdk.ValAddress) error { + delegate, err := k.GetFeederDelegation(ctx, valAddr) + if err != nil { + return err + } + if !delegate.Equals(feederAddr) { + return types.ErrNoVotingPermission.Wrap(feederAddr.String()) + } + return nil +} diff --git a/x/oracle/keeper/keeper_test.go b/x/oracle/keeper/keeper_test.go new file mode 100755 index 0000000..454311a --- /dev/null +++ b/x/oracle/keeper/keeper_test.go @@ -0,0 +1,286 @@ +package keeper_test + +import ( + "fmt" + "strings" + "testing" + + "cosmossdk.io/math" + "github.com/stretchr/testify/suite" + + "github.com/cometbft/cometbft/crypto/secp256k1" + cmtrand "github.com/cometbft/cometbft/libs/rand" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/baseapp" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + stakingtestutil "github.com/cosmos/cosmos-sdk/x/staking/testutil" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + dmchainapp "github.com/DaevMithran/dmchain/app" + appparams "github.com/DaevMithran/dmchain/app/params" + "github.com/DaevMithran/dmchain/x/oracle/keeper" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +var maccPerms = map[string][]string{ + authtypes.FeeCollectorName: nil, + stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, + stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, + minttypes.ModuleName: {authtypes.Minter}, + govtypes.ModuleName: {authtypes.Burner}, +} + +const ( + displayDenom string = appparams.DisplayDenom + bondDenom string = appparams.BondDenom +) + +type IntegrationTestSuite struct { + suite.Suite + + ctx sdk.Context + app *dmchainapp.ChainApp + queryClient types.QueryClient + msgServer types.MsgServer +} + +const ( + initialPower = int64(10000000000) +) + +func (s *IntegrationTestSuite) SetupTest() { + // set prefixes for valid addresses, without sealing + config := sdk.GetConfig() + config.SetBech32PrefixForAccount(appparams.AccountAddressPrefix, appparams.AccountPubKeyPrefix) + config.SetBech32PrefixForValidator(appparams.ValidatorAddressPrefix, appparams.ValidatorPubKeyPrefix) + config.SetBech32PrefixForConsensusNode(appparams.ConsNodeAddressPrefix, appparams.ConsNodePubKeyPrefix) + + require := s.Require() + isCheckTx := false + app := dmchainapp.Setup(s.T()) + ctx := app.BaseApp.NewContextLegacy(isCheckTx, cmtproto.Header{ + ChainID: fmt.Sprintf("test-chain-%s", cmtrand.Str(4)), + Height: 9, + }) + + queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) + types.RegisterQueryServer(queryHelper, keeper.NewQuerier(app.OracleKeeper)) + + sh := stakingtestutil.NewHelper(s.T(), ctx, app.StakingKeeper) + sh.Denom = bondDenom + amt := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + + // mint and send coins to validators + require.NoError(app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, initCoins)) + require.NoError(app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr, initCoins)) + require.NoError(app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, initCoins)) + require.NoError(app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr2, initCoins)) + + sh.CreateValidator(valAddr, valPubKey, amt, true) + sh.CreateValidator(valAddr2, valPubKey2, amt, true) + + _, err := app.StakingKeeper.EndBlocker(ctx) + require.NoError(err) + + s.app = app + s.ctx = ctx + s.queryClient = types.NewQueryClient(queryHelper) + s.msgServer = keeper.NewMsgServerImpl(app.OracleKeeper) +} + +// Test addresses +var ( + valPubKeys = simtestutil.CreateTestPubKeys(2) + + valPubKey = valPubKeys[0] + pubKey = secp256k1.GenPrivKey().PubKey() + addr = sdk.AccAddress(pubKey.Address()) + valAddr = sdk.ValAddress(pubKey.Address()) + + valPubKey2 = valPubKeys[1] + pubKey2 = secp256k1.GenPrivKey().PubKey() + addr2 = sdk.AccAddress(pubKey2.Address()) + valAddr2 = sdk.ValAddress(pubKey2.Address()) + + initTokens = sdk.TokensFromConsensusPower(initialPower, sdk.DefaultPowerReduction) + initCoins = sdk.NewCoins(sdk.NewCoin(appparams.BondDenom, initTokens)) +) + +// NewTestMsgCreateValidator test msg creator +func NewTestMsgCreateValidator(address sdk.ValAddress, pubKey cryptotypes.PubKey, amt math.Int) *stakingtypes.MsgCreateValidator { + commission := stakingtypes.NewCommissionRates(math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()) + msg, _ := stakingtypes.NewMsgCreateValidator( + address.String(), pubKey, sdk.NewCoin(types.DmDenom, amt), + stakingtypes.Description{}, commission, math.OneInt(), + ) + + return msg +} + +func (s *IntegrationTestSuite) TestSetFeederDelegation() { + app, ctx := s.app, s.ctx + + feederAddr := sdk.AccAddress([]byte("addr________________")) + feederAcc := app.AccountKeeper.NewAccountWithAddress(ctx, feederAddr) + app.AccountKeeper.SetAccount(ctx, feederAcc) + + err := s.app.OracleKeeper.ValidateFeeder(ctx, addr, valAddr) + s.Require().NoError(err) + err = s.app.OracleKeeper.ValidateFeeder(ctx, feederAddr, valAddr) + s.Require().Error(err) + + s.app.OracleKeeper.SetFeederDelegation(ctx, valAddr, feederAddr) + + err = s.app.OracleKeeper.ValidateFeeder(ctx, addr, valAddr) + s.Require().Error(err) + err = s.app.OracleKeeper.ValidateFeeder(ctx, feederAddr, valAddr) + s.Require().NoError(err) +} + +func (s *IntegrationTestSuite) TestGetFeederDelegation() { + app, ctx := s.app, s.ctx + + feederAddr := sdk.AccAddress([]byte("addr________________")) + feederAcc := app.AccountKeeper.NewAccountWithAddress(ctx, feederAddr) + app.AccountKeeper.SetAccount(ctx, feederAcc) + + s.app.OracleKeeper.SetFeederDelegation(ctx, valAddr, feederAddr) + resp, err := app.OracleKeeper.GetFeederDelegation(ctx, valAddr) + s.Require().NoError(err) + s.Require().Equal(resp, feederAddr) +} + +func (s *IntegrationTestSuite) TestAggregateExchangeRatePrevote() { + app, ctx := s.app, s.ctx + + prevote := types.AggregateExchangeRatePrevote{ + Hash: "hash", + Voter: addr.String(), + SubmitBlock: 0, + } + app.OracleKeeper.SetAggregateExchangeRatePrevote(ctx, valAddr, prevote) + + _, err := app.OracleKeeper.GetAggregateExchangeRatePrevote(ctx, valAddr) + s.Require().NoError(err) + + app.OracleKeeper.DeleteAggregateExchangeRatePrevote(ctx, valAddr) + + _, err = app.OracleKeeper.GetAggregateExchangeRatePrevote(ctx, valAddr) + s.Require().Error(err) +} + +func (s *IntegrationTestSuite) TestAggregateExchangeRatePrevoteError() { + app, ctx := s.app, s.ctx + + _, err := app.OracleKeeper.GetAggregateExchangeRatePrevote(ctx, valAddr) + s.Require().Errorf(err, types.ErrNoAggregatePrevote.Error()) +} + +func (s *IntegrationTestSuite) TestAggregateExchangeRateVote() { + app, ctx := s.app, s.ctx + + var decCoins sdk.DecCoins + decCoins = append(decCoins, sdk.DecCoin{ + Denom: displayDenom, + Amount: math.LegacyZeroDec(), + }) + + vote := types.AggregateExchangeRateVote{ + ExchangeRates: decCoins, + Voter: addr.String(), + } + app.OracleKeeper.SetAggregateExchangeRateVote(ctx, valAddr, vote) + + _, err := app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) + s.Require().NoError(err) + + app.OracleKeeper.DeleteAggregateExchangeRateVote(ctx, valAddr) + + _, err = app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) + s.Require().Error(err) +} + +func (s *IntegrationTestSuite) TestAggregateExchangeRateVoteError() { + app, ctx := s.app, s.ctx + + _, err := app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) + s.Require().Errorf(err, types.ErrNoAggregateVote.Error()) +} + +func (s *IntegrationTestSuite) TestSetExchangeRateWithEvent() { + app, ctx := s.app, s.ctx + err := app.OracleKeeper.SetExchangeRateWithEvent(ctx, displayDenom, math.LegacyOneDec()) + s.Require().NoError(err) + rate, err := app.OracleKeeper.GetExchangeRate(ctx, displayDenom) + s.Require().NoError(err) + s.Require().Equal(rate, math.LegacyOneDec()) +} + +func (s *IntegrationTestSuite) TestGetExchangeRate_InvalidDenom() { + app, ctx := s.app, s.ctx + + _, err := app.OracleKeeper.GetExchangeRate(ctx, "uxyz") + s.Require().Error(err) +} + +func (s *IntegrationTestSuite) TestGetExchangeRate_NotSet() { + app, ctx := s.app, s.ctx + + _, err := app.OracleKeeper.GetExchangeRate(ctx, displayDenom) + s.Require().Error(err) +} + +func (s *IntegrationTestSuite) TestGetExchangeRate_Valid() { + app, ctx := s.app, s.ctx + + app.OracleKeeper.SetExchangeRate(ctx, displayDenom, math.LegacyOneDec()) + rate, err := app.OracleKeeper.GetExchangeRate(ctx, displayDenom) + s.Require().NoError(err) + s.Require().Equal(rate, math.LegacyOneDec()) + + app.OracleKeeper.SetExchangeRate(ctx, strings.ToLower(displayDenom), math.LegacyOneDec()) + rate, err = app.OracleKeeper.GetExchangeRate(ctx, displayDenom) + s.Require().NoError(err) + s.Require().Equal(rate, math.LegacyOneDec()) +} + +func (s *IntegrationTestSuite) TestGetExchangeRateBase() { + oracleParams := s.app.OracleKeeper.GetParams(s.ctx) + + var exponent uint64 + for _, denom := range oracleParams.AcceptList { + if denom.BaseDenom == bondDenom { + exponent = uint64(denom.Exponent) + } + } + + power := math.LegacyMustNewDecFromStr("10").Power(exponent) + + s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, math.LegacyOneDec()) + rate, err := s.app.OracleKeeper.GetExchangeRateBase(s.ctx, bondDenom) + s.Require().NoError(err) + s.Require().Equal(rate.Mul(power), math.LegacyOneDec()) + + s.app.OracleKeeper.SetExchangeRate(s.ctx, strings.ToLower(displayDenom), math.LegacyOneDec()) + rate, err = s.app.OracleKeeper.GetExchangeRateBase(s.ctx, bondDenom) + s.Require().NoError(err) + s.Require().Equal(rate.Mul(power), math.LegacyOneDec()) +} + +func (s *IntegrationTestSuite) TestClearExchangeRate() { + app, ctx := s.app, s.ctx + + app.OracleKeeper.SetExchangeRate(ctx, displayDenom, math.LegacyOneDec()) + app.OracleKeeper.ClearExchangeRates(ctx) + _, err := app.OracleKeeper.GetExchangeRate(ctx, displayDenom) + s.Require().Error(err) +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(IntegrationTestSuite)) +} diff --git a/x/oracle/keeper/migrate_proposal.go b/x/oracle/keeper/migrate_proposal.go new file mode 100644 index 0000000..637d8b4 --- /dev/null +++ b/x/oracle/keeper/migrate_proposal.go @@ -0,0 +1,72 @@ +package keeper + +import ( + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + v1migrations "github.com/cosmos/cosmos-sdk/x/gov/migrations/v1" + + oracletypes "github.com/DaevMithran/dmchain/x/oracle/types" + "github.com/cosmos/cosmos-sdk/codec" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" +) + +// MigrateProposals migrates all legacy MsgUpgateGovParam proposals into non legacy param update versions. +func MigrateProposals(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { + store := ctx.KVStore(storeKey) + propStore := prefix.NewStore(store, v1migrations.ProposalsKeyPrefix) + + iter := propStore.Iterator(nil, nil) + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + var prop govv1.Proposal + err := cdc.Unmarshal(iter.Value(), &prop) + // if error unmarshaling prop, convert to non legacy prop + if err != nil { + newProp, err := convertProposal(prop, cdc) + if err != nil { + return err + } + bz, err := cdc.Marshal(&newProp) + if err != nil { + return err + } + // Set new value on store. + propStore.Set(iter.Key(), bz) + } + } + + return nil +} + +func convertProposal(prop govv1.Proposal, cdc codec.BinaryCodec) (govv1.Proposal, error) { + msgs := prop.Messages + + for _, msg := range msgs { + var oldUpdateParamMsg oracletypes.MsgLegacyGovUpdateParams + err := cdc.Unmarshal(msg.GetValue(), &oldUpdateParamMsg) + if err != nil { + return govv1.Proposal{}, err + } + + newUpdateParamMsg := oracletypes.MsgGovUpdateParams{ + Authority: oldUpdateParamMsg.Authority, + Title: oldUpdateParamMsg.Title, + Description: oldUpdateParamMsg.Description, + Plan: oracletypes.ParamUpdatePlan{ + Keys: oldUpdateParamMsg.Keys, + Height: 0, // placeholder value for height + Changes: oldUpdateParamMsg.Changes, + }, + } + + msg.Value, err = newUpdateParamMsg.Marshal() + if err != nil { + return govv1.Proposal{}, err + } + } + + prop.Messages = msgs + return prop, nil +} diff --git a/x/oracle/keeper/migrate_proposal_test.go b/x/oracle/keeper/migrate_proposal_test.go new file mode 100644 index 0000000..2fdbbfe --- /dev/null +++ b/x/oracle/keeper/migrate_proposal_test.go @@ -0,0 +1,55 @@ +package keeper_test + +import ( + types1 "github.com/cosmos/cosmos-sdk/codec/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + + "github.com/DaevMithran/dmchain/x/oracle/keeper" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +func (s *IntegrationTestSuite) TestMigrateProposal() { + ctx := s.ctx + cdc := s.app.AppCodec() + storeKey := s.app.GetKey(govtypes.StoreKey) + + // create legacy prop and set it in store + legacyMsg := types.MsgLegacyGovUpdateParams{ + Authority: "cheqd10d07y265gmmuvt4z0w9aw880jnsr700j5ql9az", + Title: "title", + Description: "desc", + Keys: []string{ + "VotePeriod", + }, + Changes: types.Params{ + VotePeriod: 5, + }, + } + bz, err := cdc.Marshal(&legacyMsg) + s.Require().NoError(err) + prop := govv1.Proposal{ + Id: 1, + Messages: []*types1.Any{ + { + TypeUrl: "/cheqd.oracle.v2.MsgGovUpdateParams", + Value: bz, + XXX_unrecognized: []byte{}, + }, + }, + Status: govv1.ProposalStatus_PROPOSAL_STATUS_PASSED, + } + err = s.app.GovKeeper.SetProposal(ctx, prop) + s.Require().NoError(err) + + // try to retrieve proposal and fail + _, err = s.app.GovKeeper.Proposals.Get(ctx, prop.Id) + s.Require().Error(err) + + // successfully retrieve proposal after migration + err = keeper.MigrateProposals(ctx, storeKey, cdc) + s.Require().NoError(err) + + _, err = s.app.GovKeeper.Proposals.Get(ctx, prop.Id) + s.Require().NoError(err) +} diff --git a/x/oracle/keeper/migrations.go b/x/oracle/keeper/migrations.go new file mode 100644 index 0000000..eb14b33 --- /dev/null +++ b/x/oracle/keeper/migrations.go @@ -0,0 +1,627 @@ +package keeper + +import ( + "github.com/DaevMithran/dmchain/x/oracle/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// Migrator is a struct for handling in-place store migrations. +type Migrator struct { + keeper *Keeper +} + +// NewMigrator creates a Migrator. +func NewMigrator(keeper *Keeper) Migrator { + return Migrator{keeper: keeper} +} + +// MigrateValidatorSet fixes the validator set being stored as map +// causing non determinism by storing it as a list. +func (m Migrator) MigrateValidatorSet(ctx sdk.Context) error { + if err := m.keeper.SetValidatorRewardSet(ctx); err != nil { + return err + } + return nil +} + +// MigrateCurrencyPairProviders adds the price feeder +// currency pair provider list. +func (m Migrator) MigrateCurrencyPairProviders(ctx sdk.Context) { + CurrencyPairProviders := types.CurrencyPairProvidersList{ + types.CurrencyPairProviders{ + BaseDenom: "USDT", + QuoteDenom: "USD", + Providers: []string{ + "kraken", + "coinbase", + "crypto", + "gate", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "ATOM", + QuoteDenom: "USDT", + Providers: []string{ + "okx", + "bitget", + "gate", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "ATOM", + QuoteDenom: "USD", + Providers: []string{ + "kraken", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "ETH", + QuoteDenom: "USDT", + Providers: []string{ + "okx", + "bitget", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "ETH", + QuoteDenom: "USD", + Providers: []string{ + "kraken", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "BTC", + QuoteDenom: "USDT", + Providers: []string{ + "okx", + "gate", + "bitget", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "BTC", + QuoteDenom: "USD", + Providers: []string{ + "coinbase", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "OSMO", + QuoteDenom: "USDT", + Providers: []string{ + "bitget", + "gate", + "huobi", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "OSMO", + QuoteDenom: "ATOM", + Providers: []string{ + "osmosis", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "stATOM", + QuoteDenom: "ATOM", + Providers: []string{ + "osmosis", + "crescent", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "stOSMO", + QuoteDenom: "OSMO", + Providers: []string{ + "osmosis", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "DAI", + QuoteDenom: "USDT", + Providers: []string{ + "okx", + "bitget", + "huobi", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "DAI", + QuoteDenom: "USD", + Providers: []string{ + "kraken", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "JUNO", + QuoteDenom: "USDT", + Providers: []string{ + "bitget", + "mexc", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "JUNO", + QuoteDenom: "USD", + Providers: []string{ + "kraken", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "JUNO", + QuoteDenom: "ATOM", + Providers: []string{ + "osmosis", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "stJUNO", + QuoteDenom: "JUNO", + Providers: []string{ + "osmosis", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "SCRT", + QuoteDenom: "USD", + Providers: []string{ + "kraken", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "SCRT", + QuoteDenom: "USDT", + Providers: []string{ + "mexc", + "gate", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "WBTC", + QuoteDenom: "USDT", + Providers: []string{ + "okx", + "bitget", + "crypto", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "USDC", + QuoteDenom: "USDT", + Providers: []string{ + "okx", + "bitget", + "kraken", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "USDC", + QuoteDenom: "USD", + Providers: []string{ + "kraken", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "IST", + QuoteDenom: "OSMO", + Providers: []string{ + "osmosis", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "IST", + QuoteDenom: "USDC", + Providers: []string{ + "crescent", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "BNB", + QuoteDenom: "USDT", + Providers: []string{ + "mexc", + "bitget", + "okx", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "LUNA", + QuoteDenom: "USDT", + Providers: []string{ + "okx", + "gate", + "huobi", + "bitget", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "DOT", + QuoteDenom: "USD", + Providers: []string{ + "kraken", + "coinbase", + "crypto", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "DOT", + QuoteDenom: "USDT", + Providers: []string{ + "gate", + "bitget", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "AXL", + QuoteDenom: "USD", + Providers: []string{ + "coinbase", + "crypto", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "AXL", + QuoteDenom: "OSMO", + Providers: []string{ + "osmosis", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "STARS", + QuoteDenom: "ATOM", + Providers: []string{ + "osmosis", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "STARS", + QuoteDenom: "OSMO", + Providers: []string{ + "osmosis", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "XRP", + QuoteDenom: "USD", + Providers: []string{ + "kraken", + "coinbase", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "XRP", + QuoteDenom: "USDT", + Providers: []string{ + "gate", + "mexc", + "bitget", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "USK", + QuoteDenom: "USDC", + Providers: []string{ + "kujira", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "KUJI", + QuoteDenom: "USDC", + Providers: []string{ + "kujira", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "MNTA", + QuoteDenom: "USDC", + Providers: []string{ + "kujira", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "MATIC", + QuoteDenom: "USDT", + Providers: []string{ + "mexc", + "bitget", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "MATIC", + QuoteDenom: "USD", + Providers: []string{ + "coinbase", + "kraken", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "CMST", + QuoteDenom: "OSMO", + Providers: []string{ + "osmosis", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "LINK", + QuoteDenom: "USD", + Providers: []string{ + "crypto", + "kraken", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "SUSHI", + QuoteDenom: "USDT", + Providers: []string{ + "okx", + "bitget", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "SUSHI", + QuoteDenom: "USD", + Providers: []string{ + "coinbase", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "CMDX", + QuoteDenom: "OSMO", + Providers: []string{ + "osmosis", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "CRV", + QuoteDenom: "USDT", + Providers: []string{ + "okx", + "bitget", + "mexc", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "CRV", + QuoteDenom: "USD", + Providers: []string{ + "coinbase", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "MKR", + QuoteDenom: "USDT", + Providers: []string{ + "okx", + "bitget", + "crypto", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "MKR", + QuoteDenom: "USD", + Providers: []string{ + "coinbase", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "SEI", + QuoteDenom: "USDT", + Providers: []string{ + "bitget", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "SEI", + QuoteDenom: "USD", + Providers: []string{ + "coinbase", + "kraken", + "crypto", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "INJ", + QuoteDenom: "USDT", + Providers: []string{ + "bitget", + "mexc", + "crypto", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "INJ", + QuoteDenom: "USD", + Providers: []string{ + "coinbase", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "RETH", + QuoteDenom: "WETH", + PairAddress: []types.PairAddressProvider{ + { + Address: "0xa4e0faA58465A2D369aa21B3e42d43374c6F9613", + AddressProvider: "eth-uniswap", + }, + }, + Providers: []string{ + "eth-uniswap", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "WETH", + QuoteDenom: "USDC", + PairAddress: []types.PairAddressProvider{ + { + Address: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640", + AddressProvider: "eth-uniswap", + }, + }, + Providers: []string{ + "eth-uniswap", + }, + }, + types.CurrencyPairProviders{ + BaseDenom: "CBETH", + QuoteDenom: "WETH", + PairAddress: []types.PairAddressProvider{ + { + Address: "0x840deeef2f115cf50da625f7368c24af6fe74410", + AddressProvider: "eth-uniswap", + }, + }, + Providers: []string{ + "eth-uniswap", + }, + }, + } + m.keeper.SetCurrencyPairProviders(ctx, CurrencyPairProviders) +} + +// MigrateCurrencyDeviationThresholds adds the price feeder +// currency deviation threshold list. +func (m Migrator) MigrateCurrencyDeviationThresholds(ctx sdk.Context) { + CurrencyDeviationThresholds := types.CurrencyDeviationThresholdList{ + types.CurrencyDeviationThreshold{ + BaseDenom: "USDT", + Threshold: "1.5", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "ATOM", + Threshold: "1.5", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "ETH", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "BTC", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "OSMO", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "stATOM", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "stOSMO", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "DAI", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "JUNO", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "stJUNO", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "SCRT", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "WBTC", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "USDC", + Threshold: "1.5", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "IST", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "BNB", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "LUNA", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "DOT", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "AXL", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "STARS", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "XRP", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "USK", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "KUJI", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "MNTA", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "RETH", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "WETH", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "CBETH", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "CMST", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "CMDX", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "MATIC", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "LINK", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "SUSHI", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "CRV", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "MKR", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "INJ", + Threshold: "2", + }, + types.CurrencyDeviationThreshold{ + BaseDenom: "SEI", + Threshold: "2", + }, + } + m.keeper.SetCurrencyDeviationThresholds(ctx, CurrencyDeviationThresholds) +} diff --git a/x/oracle/keeper/miss_counter.go b/x/oracle/keeper/miss_counter.go new file mode 100644 index 0000000..787777a --- /dev/null +++ b/x/oracle/keeper/miss_counter.go @@ -0,0 +1,37 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// GetMissCounter retrieves the # of vote periods missed in this oracle slash +// window. +func (k Keeper) GetMissCounter(ctx sdk.Context, operator sdk.ValAddress) uint64 { + value, err := k.MissCounters.Get(ctx, operator) + if err != nil { + return 0 + } + return value +} + +// SetMissCounter updates the # of vote periods missed in this oracle slash +// window. +func (k Keeper) SetMissCounter(ctx sdk.Context, operator sdk.ValAddress, missCounter uint64) { + _ = k.MissCounters.Set(ctx, operator, missCounter) +} + +// DeleteMissCounter removes miss counter for the validator. +func (k Keeper) DeleteMissCounter(ctx sdk.Context, operator sdk.ValAddress) { + _ = k.MissCounters.Remove(ctx, operator) +} + +// IterateMissCounters iterates over the miss counters and performs a callback +// function. +func (k Keeper) IterateMissCounters(ctx sdk.Context, handler func(sdk.ValAddress, uint64) bool) { + err := k.MissCounters.Walk(ctx, nil, func(operator sdk.ValAddress, missCounter uint64) (stop bool, err error) { + return handler(operator, missCounter), nil + }) + if err != nil { + k.Logger(ctx).Error("failed to iterate miss counters", "error", err) + } +} diff --git a/x/oracle/keeper/miss_counter_test.go b/x/oracle/keeper/miss_counter_test.go new file mode 100644 index 0000000..2cb31c8 --- /dev/null +++ b/x/oracle/keeper/miss_counter_test.go @@ -0,0 +1,57 @@ +package keeper_test + +import ( + "math/rand" + + "github.com/DaevMithran/dmchain/x/oracle/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" +) + +func (s *IntegrationTestSuite) TestMissCounter() { + app, ctx := s.app, s.ctx + missCounter := uint64(rand.Intn(100)) + + s.Require().Equal(app.OracleKeeper.GetMissCounter(ctx, valAddr), uint64(0)) + app.OracleKeeper.SetMissCounter(ctx, valAddr, missCounter) + s.Require().Equal(app.OracleKeeper.GetMissCounter(ctx, valAddr), missCounter) + + app.OracleKeeper.DeleteMissCounter(ctx, valAddr) + s.Require().Equal(app.OracleKeeper.GetMissCounter(ctx, valAddr), uint64(0)) +} + +func (s *IntegrationTestSuite) TestIterateMissCounters() { + keeper, ctx := s.app.OracleKeeper, s.ctx + missCounters := []types.MissCounter{ + {ValidatorAddress: valAddr.String(), MissCounter: uint64(4)}, + {ValidatorAddress: valAddr2.String(), MissCounter: uint64(87)}, + } + + for _, mc := range missCounters { + operator, _ := sdk.ValAddressFromBech32(mc.ValidatorAddress) + keeper.SetMissCounter(ctx, operator, mc.MissCounter) + } + + newCounters := []types.MissCounter{} + keeper.IterateMissCounters(ctx, func(operator sdk.ValAddress, missCounter uint64) (stop bool) { + newCounters = append(newCounters, types.MissCounter{ + ValidatorAddress: operator.String(), + MissCounter: missCounter, + }) + + return false + }) + + require.GreaterOrEqual(s.T(), len(newCounters), len(missCounters)) // At least what we set + +FOUND: + for _, oldCounter := range missCounters { + for _, newCounter := range newCounters { + if oldCounter.ValidatorAddress == newCounter.ValidatorAddress { + s.Require().Equal(oldCounter.MissCounter, newCounter.MissCounter) + continue FOUND + } + } + s.T().Errorf("did not find match for miss counter: %+v", oldCounter) + } +} diff --git a/x/oracle/keeper/msg_server.go b/x/oracle/keeper/msg_server.go new file mode 100755 index 0000000..492db47 --- /dev/null +++ b/x/oracle/keeper/msg_server.go @@ -0,0 +1,496 @@ +package keeper + +import ( + "context" + "fmt" + "strings" + + "cosmossdk.io/errors" + ojoutils "github.com/DaevMithran/dmchain/util" + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +type msgServer struct { + Keeper +} + +// NewMsgServerImpl returns an implementation of the oracle MsgServer interface +// for the provided Keeper. +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{Keeper: keeper} +} + +func (ms msgServer) AggregateExchangeRatePrevote( + goCtx context.Context, + msg *types.MsgAggregateExchangeRatePrevote, +) (*types.MsgAggregateExchangeRatePrevoteResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + valAddr, err := sdk.ValAddressFromBech32(msg.Validator) + if err != nil { + return nil, err + } + feederAddr, err := sdk.AccAddressFromBech32(msg.Feeder) + if err != nil { + return nil, err + } + + if err := ms.ValidateFeeder(ctx, feederAddr, valAddr); err != nil { + return nil, err + } + + // Ensure prevote wasn't already submitted + if ms.HasAggregateExchangeRatePrevote(ctx, valAddr) { + return nil, types.ErrExistingPrevote + } + + // Convert hex string to votehash + voteHash, err := types.AggregateVoteHashFromHexString(msg.Hash) + if err != nil { + return nil, types.ErrInvalidHash.Wrap(err.Error()) + } + + aggregatePrevote := types.NewAggregateExchangeRatePrevote( + voteHash, + valAddr, + ojoutils.SafeInt64ToUint64(ctx.BlockHeight()), + ) + ms.SetAggregateExchangeRatePrevote(ctx, valAddr, aggregatePrevote) + + return &types.MsgAggregateExchangeRatePrevoteResponse{}, nil +} + +func (ms msgServer) AggregateExchangeRateVote( + goCtx context.Context, + msg *types.MsgAggregateExchangeRateVote, +) (*types.MsgAggregateExchangeRateVoteResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + valAddr, err := sdk.ValAddressFromBech32(msg.Validator) + if err != nil { + return nil, err + } + feederAddr, err := sdk.AccAddressFromBech32(msg.Feeder) + if err != nil { + return nil, err + } + if err := ms.ValidateFeeder(ctx, feederAddr, valAddr); err != nil { + return nil, err + } + + params := ms.GetParams(ctx) + aggregatePrevote, err := ms.GetAggregateExchangeRatePrevote(ctx, valAddr) + if err != nil { + return nil, types.ErrNoAggregatePrevote.Wrap(msg.Validator) + } + + // Check if the message is submitted in the proper period + currentPeriod := ojoutils.SafeInt64ToUint64(ctx.BlockHeight()) / params.VotePeriod + prevotePeriod := aggregatePrevote.SubmitBlock / params.VotePeriod + if currentPeriod-prevotePeriod != 1 { + return nil, types.ErrRevealPeriodMissMatch + } + + exchangeRates, err := types.ParseExchangeRateDecCoins(msg.ExchangeRates) + if err != nil { + return nil, types.ErrInvalidExchangeRate.Wrap(err.Error()) + } + + // Verify a exchange rate with aggregate prevote hash + hash := types.GetAggregateVoteHash(msg.Salt, msg.ExchangeRates, valAddr) + if aggregatePrevote.Hash != hash.String() { + return nil, types.ErrVerificationFailed.Wrapf("must be given %s not %s", aggregatePrevote.Hash, hash) + } + + // Filter out rates which aren't included in the AcceptList + filteredDecCoins := sdk.DecCoins{} + for _, decCoin := range exchangeRates { + if params.AcceptList.Contains(decCoin.Denom) { + filteredDecCoins = append(filteredDecCoins, decCoin) + } + } + + // Move aggregate prevote to aggregate vote with given exchange rates + ms.SetAggregateExchangeRateVote(ctx, valAddr, types.NewAggregateExchangeRateVote(filteredDecCoins, valAddr)) + ms.DeleteAggregateExchangeRatePrevote(ctx, valAddr) + + return &types.MsgAggregateExchangeRateVoteResponse{}, nil +} + +func (ms msgServer) DelegateFeedConsent( + goCtx context.Context, + msg *types.MsgDelegateFeedConsent, +) (*types.MsgDelegateFeedConsentResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + operatorAddr, err := sdk.ValAddressFromBech32(msg.Operator) + if err != nil { + return nil, err + } + + delegateAddr, err := sdk.AccAddressFromBech32(msg.Delegate) + if err != nil { + return nil, err + } + + val, err := ms.StakingKeeper.Validator(ctx, operatorAddr) + if err != nil { + return nil, err + } + if val == nil { + return nil, stakingtypes.ErrNoValidatorFound.Wrap(msg.Operator) + } + + ms.SetFeederDelegation(ctx, operatorAddr, delegateAddr) + err = ctx.EventManager().EmitTypedEvent(&types.EventDelegateFeedConsent{ + Operator: msg.Operator, Delegate: msg.Delegate, + }) + + return &types.MsgDelegateFeedConsentResponse{}, err +} + +func (ms msgServer) LegacyGovUpdateParams( + goCtx context.Context, + msg *types.MsgLegacyGovUpdateParams, +) (*types.MsgLegacyGovUpdateParamsResponse, error) { + if msg.Authority != ms.authority { + err := errors.Wrapf( + types.ErrNoGovAuthority, + "invalid authority; expected %s, got %s", + ms.authority, + msg.Authority, + ) + return nil, err + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + for _, key := range msg.Keys { + switch key { + case string(types.KeyVotePeriod): + ms.SetVotePeriod(ctx, msg.Changes.VotePeriod) + + case string(types.KeyVoteThreshold): + ms.SetVoteThreshold(ctx, msg.Changes.VoteThreshold) + + case string(types.KeyRewardBands): + ms.SetRewardBand(ctx, msg.Changes.RewardBands) + + case string(types.KeyRewardDistributionWindow): + if msg.Changes.RewardDistributionWindow < ms.Keeper.VotePeriod(ctx) { + return nil, fmt.Errorf("oracle parameter RewardDistributionWindow must be greater than or equal with VotePeriod") + } + ms.SetRewardDistributionWindow(ctx, msg.Changes.RewardDistributionWindow) + + case string(types.KeyAcceptList): + accept := msg.Changes.AcceptList.Normalize() + mandatory := ms.Keeper.MandatoryList(ctx).Normalize() + if !accept.ContainDenoms(mandatory) { + return nil, fmt.Errorf("denom in MandatoryList not present in AcceptList") + } + ms.SetAcceptList(ctx, accept) + + case string(types.KeyMandatoryList): + mandatory := msg.Changes.MandatoryList.Normalize() + accept := ms.Keeper.AcceptList(ctx).Normalize() + if !accept.ContainDenoms(mandatory) { + return nil, fmt.Errorf("denom in MandatoryList not present in AcceptList") + } + ms.SetMandatoryList(ctx, mandatory) + + case string(types.KeySlashFraction): + ms.SetSlashFraction(ctx, msg.Changes.SlashFraction) + + case string(types.KeySlashWindow): + if msg.Changes.SlashWindow < ms.Keeper.VotePeriod(ctx) { + return nil, fmt.Errorf("oracle parameter SlashWindow must be greater than or equal with VotePeriod") + } + ms.SetSlashWindow(ctx, msg.Changes.SlashWindow) + + case string(types.KeyMinValidPerWindow): + ms.SetMinValidPerWindow(ctx, msg.Changes.MinValidPerWindow) + + case string(types.KeyHistoricStampPeriod): + if msg.Changes.HistoricStampPeriod < 1 { + return nil, fmt.Errorf("oracle parameters HistoricStampPeriod must be greater than 0") + } + if msg.Changes.HistoricStampPeriod > ms.Keeper.MedianStampPeriod(ctx) { + return nil, fmt.Errorf("oracle parameter HistoricStampPeriod must be less than or equal with MedianStampPeriod") + } + if msg.Changes.HistoricStampPeriod%ms.Keeper.VotePeriod(ctx) != 0 { + return nil, fmt.Errorf("oracle parameters HistoricStampPeriod must be exact multiples of VotePeriod") + } + ms.SetHistoricStampPeriod(ctx, msg.Changes.HistoricStampPeriod) + + case string(types.KeyMedianStampPeriod): + if msg.Changes.MedianStampPeriod < 1 { + return nil, fmt.Errorf("oracle parameters MedianStampPeriod must be greater than 0") + } + if msg.Changes.MedianStampPeriod < ms.Keeper.HistoricStampPeriod(ctx) { + return nil, fmt.Errorf("oracle parameter MedianStampPeriod must be greater than or equal with HistoricStampPeriod") + } + if msg.Changes.MedianStampPeriod%ms.Keeper.VotePeriod(ctx) != 0 { + return nil, fmt.Errorf("oracle parameters MedianStampPeriod must be exact multiples of VotePeriod") + } + ms.SetMedianStampPeriod(ctx, msg.Changes.MedianStampPeriod) + + case string(types.KeyMaximumPriceStamps): + if msg.Changes.MaximumPriceStamps < 1 { + return nil, fmt.Errorf("oracle parameters MaximumPriceStamps must be greater than 0") + } + ms.SetMaximumPriceStamps(ctx, msg.Changes.MaximumPriceStamps) + + case string(types.KeyMaximumMedianStamps): + if msg.Changes.MaximumMedianStamps < 1 { + return nil, fmt.Errorf("oracle parameters MaximumMedianStamps must be greater than 0") + } + ms.SetMaximumMedianStamps(ctx, msg.Changes.MaximumMedianStamps) + + case string(types.KeyUsdcIbcDenom): + ms.SetUsdcIbcDenom(ctx, msg.Changes.UsdcIbcDenom) + + case string(types.KeySlashingEnabled): + ms.SetSlashingEnabled(ctx, msg.Changes.SlashingEnabled) + + case string(types.KeyAveragingWindow): + ms.SetAveragingWindow(ctx, msg.Changes.AveragingWindow) + + default: + return nil, fmt.Errorf("%s is not an existing oracle param key", key) + } + } + + return &types.MsgLegacyGovUpdateParamsResponse{}, nil +} + +func (ms msgServer) GovUpdateParams( + goCtx context.Context, + msg *types.MsgGovUpdateParams, +) (*types.MsgGovUpdateParamsResponse, error) { + if msg.Authority != ms.authority { + err := errors.Wrapf( + types.ErrNoGovAuthority, + "invalid authority; expected %s, got %s", + ms.authority, + msg.Authority, + ) + return nil, err + } + + ctx := sdk.UnwrapSDKContext(goCtx) + err := ms.ScheduleParamUpdatePlan(ctx, msg.Plan) + if err != nil { + return nil, err + } + + return &types.MsgGovUpdateParamsResponse{}, nil +} + +// GovAddDenoms adds new assets to the AcceptList, and adds +// it to the MandatoryList if specified. +func (ms msgServer) GovAddDenoms( + goCtx context.Context, + msg *types.MsgGovAddDenoms, +) (*types.MsgGovAddDenomsResponse, error) { + if msg.Authority != ms.authority { + err := errors.Wrapf( + types.ErrNoGovAuthority, + "invalid authority; expected %s, got %s", + ms.authority, + msg.Authority, + ) + return nil, err + } + ctx := sdk.UnwrapSDKContext(goCtx) + params := ms.GetParams(ctx) + + plan := types.ParamUpdatePlan{ + Keys: []string{}, + Height: msg.Height, + Changes: params, + } + for _, denom := range msg.DenomList { + // if the AcceptList already contains this denom, and we're not + // adding it to the "mandatory" list, error out. + if plan.Changes.AcceptList.Contains(denom.SymbolDenom) && !msg.Mandatory { + err := errors.Wrapf( + types.ErrInvalidParamValue, + "denom already exists in acceptList: %s", + denom.SymbolDenom, + ) + return nil, err + // if the MandatoryList already contains this denom, and we're trying to + // add it to the "mandatory" list, error out. + } else if plan.Changes.MandatoryList.Contains(denom.SymbolDenom) && msg.Mandatory { + err := errors.Wrapf( + types.ErrInvalidParamValue, + "denom already exists in mandatoryList: %s", + denom.SymbolDenom, + ) + return nil, err + } + + // add to AcceptList & MandatoryList if necessary + if !plan.Changes.AcceptList.Contains(denom.SymbolDenom) { + plan.Changes.AcceptList = append(plan.Changes.AcceptList, denom) + plan.Keys = ojoutils.AppendUniqueString(plan.Keys, string(types.KeyAcceptList)) + } + if msg.Mandatory { + plan.Changes.MandatoryList = append(plan.Changes.MandatoryList, denom) + plan.Keys = ojoutils.AppendUniqueString(plan.Keys, string(types.KeyMandatoryList)) + } + + // add a RewardBand + _, err := plan.Changes.RewardBands.GetBandFromDenom(denom.SymbolDenom) + if err == types.ErrNoRewardBand { + if msg.RewardBand != nil { + plan.Changes.RewardBands.Add(denom.SymbolDenom, *msg.RewardBand) + } + plan.Changes.RewardBands.AddDefault(denom.SymbolDenom) + } else if err != nil { + return nil, err + } + } + + // append new currency pair providers + for _, cpp := range msg.CurrencyPairProviders { + plan.Keys = ojoutils.AppendUniqueString(plan.Keys, string(types.KeyCurrencyPairProviders)) + plan.Changes.CurrencyPairProviders = append(plan.Changes.CurrencyPairProviders, cpp) + } + + // append new currency deviation thresholds + for _, cdt := range msg.CurrencyDeviationThresholds { + plan.Keys = ojoutils.AppendUniqueString(plan.Keys, string(types.KeyCurrencyDeviationThresholds)) + plan.Changes.CurrencyDeviationThresholds = append(plan.Changes.CurrencyDeviationThresholds, cdt) + } + + // also update RewardBand key if new denoms are getting added + if len(msg.DenomList) != 0 { + plan.Keys = append(plan.Keys, string(types.KeyRewardBands)) + } + + // validate plan construction before scheduling + err := plan.ValidateBasic() + if err != nil { + return nil, err + } + + err = ms.ScheduleParamUpdatePlan(ctx, plan) + if err != nil { + return nil, err + } + + return &types.MsgGovAddDenomsResponse{}, nil +} + +// GovRemoveCurrencyPairProviders removes the specified currency pair +// providers in MsgGovRemoveCurrencyPairProviders if they exist in +// the current CurrencyPairProviders list. +func (ms msgServer) GovRemoveCurrencyPairProviders( + goCtx context.Context, + msg *types.MsgGovRemoveCurrencyPairProviders, +) (*types.MsgGovRemoveCurrencyPairProvidersResponse, error) { + if msg.Authority != ms.authority { + err := errors.Wrapf( + types.ErrNoGovAuthority, + "invalid authority; expected %s, got %s", + ms.authority, + msg.Authority, + ) + return nil, err + } + ctx := sdk.UnwrapSDKContext(goCtx) + params := ms.GetParams(ctx) + + plan := types.ParamUpdatePlan{ + Keys: []string{string(types.KeyCurrencyPairProviders)}, + Height: msg.Height, + Changes: params, + } + + for _, cpp := range msg.CurrencyPairProviders { + plan.Changes.CurrencyPairProviders = plan.Changes.CurrencyPairProviders.RemovePair(cpp) + } + + // validate plan construction before scheduling + err := plan.ValidateBasic() + if err != nil { + return nil, err + } + + err = ms.ScheduleParamUpdatePlan(ctx, plan) + if err != nil { + return nil, err + } + + return &types.MsgGovRemoveCurrencyPairProvidersResponse{}, nil +} + +// GovRemoveCurrencyDeviationThresholds removes the specified currency +// deviation thresholds in MsgGovRemoveCurrencyDeviationThresholdsResponse +// if they exist in the current CurrencyDeviationThresholds list. +func (ms msgServer) GovRemoveCurrencyDeviationThresholds( + goCtx context.Context, + msg *types.MsgGovRemoveCurrencyDeviationThresholds, +) (*types.MsgGovRemoveCurrencyDeviationThresholdsResponse, error) { + if msg.Authority != ms.authority { + err := errors.Wrapf( + types.ErrNoGovAuthority, + "invalid authority; expected %s, got %s", + ms.authority, + msg.Authority, + ) + return nil, err + } + ctx := sdk.UnwrapSDKContext(goCtx) + params := ms.GetParams(ctx) + + plan := types.ParamUpdatePlan{ + Keys: []string{string(types.KeyCurrencyDeviationThresholds)}, + Height: msg.Height, + Changes: params, + } + + for _, curr := range msg.Currencies { + plan.Changes.CurrencyDeviationThresholds = plan.Changes.CurrencyDeviationThresholds.RemovePair( + strings.ToUpper(curr), + ) + } + + // validate plan construction before scheduling + err := plan.ValidateBasic() + if err != nil { + return nil, err + } + + err = ms.ScheduleParamUpdatePlan(ctx, plan) + if err != nil { + return nil, err + } + + return &types.MsgGovRemoveCurrencyDeviationThresholdsResponse{}, nil +} + +func (ms msgServer) GovCancelUpdateParamPlan( + goCtx context.Context, + msg *types.MsgGovCancelUpdateParamPlan, +) (*types.MsgGovCancelUpdateParamPlanResponse, error) { + if msg.Authority != ms.authority { + err := errors.Wrapf( + types.ErrNoGovAuthority, + "invalid authority; expected %s, got %s", + ms.authority, + msg.Authority, + ) + return nil, err + } + + ctx := sdk.UnwrapSDKContext(goCtx) + err := ms.ClearParamUpdatePlan(ctx, ojoutils.SafeInt64ToUint64(msg.Height)) + if err != nil { + return nil, err + } + + return &types.MsgGovCancelUpdateParamPlanResponse{}, nil +} diff --git a/x/oracle/keeper/msg_server_test.go b/x/oracle/keeper/msg_server_test.go new file mode 100755 index 0000000..213b933 --- /dev/null +++ b/x/oracle/keeper/msg_server_test.go @@ -0,0 +1,1125 @@ +package keeper_test + +import ( + "crypto/rand" + "encoding/hex" + "fmt" + + "cosmossdk.io/errors" + "cosmossdk.io/math" + "github.com/DaevMithran/dmchain/x/oracle/abci" + "github.com/DaevMithran/dmchain/x/oracle/types" + oracletypes "github.com/DaevMithran/dmchain/x/oracle/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// GenerateSalt generates a random salt, size length/2, as a HEX encoded string. +func GenerateSalt(length int) (string, error) { + if length == 0 { + return "", fmt.Errorf("failed to generate salt: zero length") + } + + bytes := make([]byte, length) + + if _, err := rand.Read(bytes); err != nil { + return "", err + } + + return hex.EncodeToString(bytes), nil +} + +func (s *IntegrationTestSuite) TestMsgServer_AggregateExchangeRatePrevote() { + ctx := s.ctx + + exchangeRatesStr := "123.2:OJO" + salt, err := GenerateSalt(32) + s.Require().NoError(err) + hash := oracletypes.GetAggregateVoteHash(salt, exchangeRatesStr, valAddr) + + invalidHash := &types.MsgAggregateExchangeRatePrevote{ + Hash: "invalid_hash", + Feeder: addr.String(), + Validator: valAddr.String(), + } + invalidFeeder := &types.MsgAggregateExchangeRatePrevote{ + Hash: hash.String(), + Feeder: "invalid_feeder", + Validator: valAddr.String(), + } + invalidValidator := &types.MsgAggregateExchangeRatePrevote{ + Hash: hash.String(), + Feeder: addr.String(), + Validator: "invalid_val", + } + validMsg := &types.MsgAggregateExchangeRatePrevote{ + Hash: hash.String(), + Feeder: addr.String(), + Validator: valAddr.String(), + } + + _, err = s.msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(ctx), invalidHash) + s.Require().Error(err) + _, err = s.msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(ctx), invalidFeeder) + s.Require().Error(err) + _, err = s.msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(ctx), invalidValidator) + s.Require().Error(err) + _, err = s.msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(ctx), validMsg) + s.Require().NoError(err) +} + +func (s *IntegrationTestSuite) TestMsgServer_AggregateExchangeRateVote() { + ctx := s.ctx + + ratesStr := "OJO:123.2" + ratesStrInvalidCoin := "OJO:123.2,badcoin:234.5" + salt, err := GenerateSalt(32) + s.Require().NoError(err) + hash := oracletypes.GetAggregateVoteHash(salt, ratesStr, valAddr) + hashInvalidRate := oracletypes.GetAggregateVoteHash(salt, ratesStrInvalidCoin, valAddr) + + prevoteMsg := &types.MsgAggregateExchangeRatePrevote{ + Hash: hash.String(), + Feeder: addr.String(), + Validator: valAddr.String(), + } + voteMsg := &types.MsgAggregateExchangeRateVote{ + Feeder: addr.String(), + Validator: valAddr.String(), + Salt: salt, + ExchangeRates: ratesStr, + } + voteMsgInvalidRate := &types.MsgAggregateExchangeRateVote{ + Feeder: addr.String(), + Validator: valAddr.String(), + Salt: salt, + ExchangeRates: ratesStrInvalidCoin, + } + + // Flattened acceptList symbols to make checks easier + acceptList := s.app.OracleKeeper.GetParams(ctx).AcceptList + var acceptListFlat []string + for _, v := range acceptList { + acceptListFlat = append(acceptListFlat, v.SymbolDenom) + } + + // No existing prevote + _, err = s.msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(ctx), voteMsg) + s.Require().EqualError(err, errors.Wrap(types.ErrNoAggregatePrevote, valAddr.String()).Error()) + _, err = s.msgServer.AggregateExchangeRatePrevote(sdk.WrapSDKContext(ctx), prevoteMsg) + s.Require().NoError(err) + // Reveal period mismatch + _, err = s.msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(ctx), voteMsg) + s.Require().EqualError(err, types.ErrRevealPeriodMissMatch.Error()) + + // Valid + s.app.OracleKeeper.SetAggregateExchangeRatePrevote( + ctx, + valAddr, + types.NewAggregateExchangeRatePrevote( + hash, valAddr, 8, + )) + _, err = s.msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(ctx), voteMsg) + s.Require().NoError(err) + vote, err := s.app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) + s.Require().Nil(err) + for _, v := range vote.ExchangeRates { + s.Require().Contains(acceptListFlat, v.Denom) + } + + // Valid, but with an exchange rate which isn't in AcceptList + s.app.OracleKeeper.SetAggregateExchangeRatePrevote( + ctx, + valAddr, + types.NewAggregateExchangeRatePrevote( + hashInvalidRate, valAddr, 8, + )) + _, err = s.msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(ctx), voteMsgInvalidRate) + s.Require().NoError(err) + vote, err = s.app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) + s.Require().NoError(err) + for _, v := range vote.ExchangeRates { + s.Require().Contains(acceptListFlat, v.Denom) + } +} + +func (s *IntegrationTestSuite) TestMsgServer_DelegateFeedConsent() { + app, ctx := s.app, s.ctx + + feederAddr := sdk.AccAddress([]byte("addr________________")) + feederAcc := app.AccountKeeper.NewAccountWithAddress(ctx, feederAddr) + app.AccountKeeper.SetAccount(ctx, feederAcc) + + _, err := s.msgServer.DelegateFeedConsent(sdk.WrapSDKContext(ctx), &types.MsgDelegateFeedConsent{ + Operator: valAddr.String(), + Delegate: feederAddr.String(), + }) + s.Require().NoError(err) +} + +func (s *IntegrationTestSuite) TestMsgServer_UpdateGovParams() { + govAccAddr := s.app.GovKeeper.GetGovernanceAccount(s.ctx).GetAddress().String() + testCases := []struct { + name string + req *types.MsgGovUpdateParams + expectErr bool + errMsg string + }{ + { + "valid accept list", + &types.MsgGovUpdateParams{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Plan: types.ParamUpdatePlan{ + Keys: []string{"AcceptList"}, + Height: 9, + Changes: types.Params{ + AcceptList: append(oracletypes.DefaultAcceptList, types.Denom{ + BaseDenom: "base", + SymbolDenom: "symbol", + Exponent: 6, + }), + }, + }, + }, + false, + "", + }, + { + "valid mandatory list", + &types.MsgGovUpdateParams{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Plan: types.ParamUpdatePlan{ + Keys: []string{"MandatoryList"}, + Height: 9, + Changes: types.Params{ + MandatoryList: oracletypes.DefaultMandatoryList, + }, + }, + }, + false, + "", + }, + { + "invalid mandatory list", + &types.MsgGovUpdateParams{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Plan: types.ParamUpdatePlan{ + Keys: []string{"MandatoryList"}, + Height: 9, + Changes: types.Params{ + MandatoryList: types.DenomList{ + { + BaseDenom: "test", + SymbolDenom: "test", + Exponent: 6, + }, + }, + }, + }, + }, + true, + "denom in MandatoryList not present in AcceptList", + }, + { + "valid reward band list", + &types.MsgGovUpdateParams{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Plan: types.ParamUpdatePlan{ + Keys: []string{"RewardBands"}, + Height: 9, + Changes: types.Params{ + RewardBands: append(oracletypes.DefaultRewardBands(), oracletypes.RewardBand{ + SymbolDenom: "symbol", + RewardBand: math.LegacyNewDecWithPrec(2, 2), + }), + }, + }, + }, + false, + "", + }, + { + "invalid reward band list", + &types.MsgGovUpdateParams{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Plan: types.ParamUpdatePlan{ + Keys: []string{"RewardBands"}, + Height: 9, + Changes: types.Params{ + RewardBands: types.RewardBandList{ + { + SymbolDenom: types.DmSymbol, + RewardBand: math.LegacyNewDecWithPrec(2, 0), + }, + { + SymbolDenom: types.AtomSymbol, + RewardBand: math.LegacyNewDecWithPrec(2, 2), + }, + }, + }, + }, + }, + true, + "oracle parameter RewardBand must be between [0, 1]", + }, + { + "multiple valid params", + &types.MsgGovUpdateParams{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Plan: types.ParamUpdatePlan{ + Keys: []string{ + "VotePeriod", + "VoteThreshold", + "RewardDistributionWindow", + "SlashFraction", + "SlashWindow", + "MinValidPerWindow", + "HistoricStampPeriod", + "MedianStampPeriod", + "MaximumPriceStamps", + "MaximumMedianStamps", + }, + Height: 9, + Changes: types.Params{ + VotePeriod: 10, + VoteThreshold: math.LegacyNewDecWithPrec(40, 2), + RewardDistributionWindow: types.BlocksPerWeek, + SlashFraction: math.LegacyNewDecWithPrec(2, 4), + SlashWindow: types.BlocksPerDay, + MinValidPerWindow: math.LegacyNewDecWithPrec(4, 2), + HistoricStampPeriod: 10 * types.BlocksPerMinute, + MedianStampPeriod: 5 * types.BlocksPerHour, + MaximumPriceStamps: 40, + MaximumMedianStamps: 30, + }, + }, + }, + false, + "", + }, + { + "invalid vote threshold", + &types.MsgGovUpdateParams{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Plan: types.ParamUpdatePlan{ + Keys: []string{"VoteThreshold"}, + Height: 9, + Changes: types.Params{ + VoteThreshold: math.LegacyNewDecWithPrec(10, 2), + }, + }, + }, + true, + "threshold must be bigger than 0.330000000000000000 and <= 1", + }, + { + "invalid slash window", + &types.MsgGovUpdateParams{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Plan: types.ParamUpdatePlan{ + Keys: []string{"VotePeriod", "SlashWindow"}, + Height: 9, + Changes: types.Params{ + VotePeriod: 5, + SlashWindow: 4, + }, + }, + }, + true, + "oracle parameter SlashWindow must be greater than or equal with VotePeriod", + }, + { + "invalid key", + &types.MsgGovUpdateParams{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Plan: types.ParamUpdatePlan{ + Keys: []string{"test"}, + Height: 9, + Changes: types.Params{}, + }, + }, + true, + "test is not an existing oracle param key", + }, + { + "bad authority", + &types.MsgGovUpdateParams{ + Authority: "ojo1zypqa76je7pxsdwkfah6mu9a583sju6xzthge3", + Title: "test", + Description: "test", + Plan: types.ParamUpdatePlan{ + Keys: []string{"RewardBands"}, + Height: 9, + Changes: types.Params{ + RewardBands: types.RewardBandList{ + { + SymbolDenom: types.DmSymbol, + RewardBand: math.LegacyNewDecWithPrec(2, 2), + }, + }, + }, + }, + }, + true, + "invalid gov authority to perform these changes", + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + err := tc.req.ValidateBasic() + if err == nil { + _, err = s.msgServer.GovUpdateParams(s.ctx, tc.req) + abci.EndBlocker(s.ctx, s.app.OracleKeeper) + } + if tc.expectErr { + s.Require().ErrorContains(err, tc.errMsg) + } else { + s.Require().NoError(err) + + switch tc.name { + case "valid accept list": + acceptList := s.app.OracleKeeper.AcceptList(s.ctx) + s.Require().Equal(acceptList, append(oracletypes.DefaultAcceptList, types.Denom{ + BaseDenom: "base", + SymbolDenom: "symbol", + Exponent: 6, + }).Normalize()) + + case "valid mandatory list": + mandatoryList := s.app.OracleKeeper.MandatoryList(s.ctx) + s.Require().Equal(mandatoryList, oracletypes.DefaultMandatoryList.Normalize()) + + case "valid reward band list": + rewardBand := s.app.OracleKeeper.RewardBands(s.ctx) + s.Require().Equal(rewardBand, append(oracletypes.DefaultRewardBands(), oracletypes.RewardBand{ + SymbolDenom: "symbol", + RewardBand: math.LegacyNewDecWithPrec(2, 2), + })) + + case "multiple valid params": + votePeriod := s.app.OracleKeeper.VotePeriod(s.ctx) + voteThreshold := s.app.OracleKeeper.VoteThreshold(s.ctx) + rewardDistributionWindow := s.app.OracleKeeper.RewardDistributionWindow(s.ctx) + slashFraction := s.app.OracleKeeper.SlashFraction(s.ctx) + slashWindow := s.app.OracleKeeper.SlashWindow(s.ctx) + minValidPerWindow := s.app.OracleKeeper.MinValidPerWindow(s.ctx) + historicStampPeriod := s.app.OracleKeeper.HistoricStampPeriod(s.ctx) + medianStampPeriod := s.app.OracleKeeper.MedianStampPeriod(s.ctx) + maximumPriceStamps := s.app.OracleKeeper.MaximumPriceStamps(s.ctx) + maximumMedianStamps := s.app.OracleKeeper.MaximumMedianStamps(s.ctx) + s.Require().Equal(votePeriod, uint64(10)) + s.Require().Equal(voteThreshold, math.LegacyNewDecWithPrec(40, 2)) + s.Require().Equal(rewardDistributionWindow, types.BlocksPerWeek) + s.Require().Equal(slashFraction, math.LegacyNewDecWithPrec(2, 4)) + s.Require().Equal(slashWindow, types.BlocksPerDay) + s.Require().Equal(minValidPerWindow, math.LegacyNewDecWithPrec(4, 2)) + s.Require().Equal(historicStampPeriod, 10*types.BlocksPerMinute) + s.Require().Equal(medianStampPeriod, 5*types.BlocksPerHour) + s.Require().Equal(maximumPriceStamps, uint64(40)) + s.Require().Equal(maximumMedianStamps, uint64(30)) + } + } + }) + } +} + +func (s *IntegrationTestSuite) TestMsgServer_GovAddDenom() { + govAccAddr := s.app.GovKeeper.GetGovernanceAccount(s.ctx).GetAddress().String() + bandArgument := math.LegacyNewDecWithPrec(2, 3) + foo := &oracletypes.Denom{ + SymbolDenom: "FOO", + BaseDenom: "FOO", + Exponent: 6, + } + bar := &oracletypes.Denom{ + SymbolDenom: "BAR", + BaseDenom: "BAR", + Exponent: 6, + } + foobar := &oracletypes.Denom{ + SymbolDenom: "FOOBAR", + BaseDenom: "FOOBAR", + Exponent: 6, + } + reward := &oracletypes.Denom{ + SymbolDenom: "REWARD", + BaseDenom: "REWARD", + Exponent: 6, + } + currencyPairProviders := oracletypes.CurrencyPairProvidersList{ + { + BaseDenom: "FOO", + QuoteDenom: "BAR", + PairAddress: []oracletypes.PairAddressProvider{ + { + Address: "address", + AddressProvider: "provider", + }, + }, + Providers: []string{ + "provider", + }, + }, + } + currencyDeviationThresholds := oracletypes.CurrencyDeviationThresholdList{ + { + BaseDenom: "FOO", + Threshold: "2.0", + }, + { + BaseDenom: "BAR", + Threshold: "2.0", + }, + } + currencyPairProviders2 := oracletypes.CurrencyPairProvidersList{ + { + BaseDenom: "FOOBAR", + QuoteDenom: "BAR", + PairAddress: []oracletypes.PairAddressProvider{ + { + Address: "address2", + AddressProvider: "provider2", + }, + }, + Providers: []string{ + "provider2", + }, + }, + } + currencyDeviationThresholds2 := oracletypes.CurrencyDeviationThresholdList{ + { + BaseDenom: "FOOBAR", + Threshold: "2.0", + }, + } + + testCases := []struct { + name string + req *types.MsgGovAddDenoms + expectErr bool + errMsg string + }{ + { + "valid denom addition", + &types.MsgGovAddDenoms{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + DenomList: append(types.DenomList{}, *foo, *bar), + Mandatory: false, + }, + false, + "", + }, + { + "valid mandatory denom addition with currency pair providers and currency deviation thresholds", + &types.MsgGovAddDenoms{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + DenomList: append(types.DenomList{}, *foo, *bar), + Mandatory: true, + + CurrencyPairProviders: currencyPairProviders, + CurrencyDeviationThresholds: currencyDeviationThresholds, + }, + false, + "", + }, + { + "valid denom addition with reward band", + &types.MsgGovAddDenoms{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + DenomList: append(types.DenomList{}, *reward), + Mandatory: true, + RewardBand: &bandArgument, + }, + false, + "", + }, + { + "valid currency pair providers and currency deviation thresholds addition with no new denoms", + &types.MsgGovAddDenoms{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + DenomList: types.DenomList{}, + Mandatory: true, + + CurrencyPairProviders: currencyPairProviders2, + CurrencyDeviationThresholds: currencyDeviationThresholds2, + }, + false, + "", + }, + { + "invalid multiple addition", + &types.MsgGovAddDenoms{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + DenomList: append(types.DenomList{}, *foo, *foo), + Mandatory: false, + }, + true, + "denom already exists in acceptList: FOO", + }, + { + "invalid multiple addition mandatory", + &types.MsgGovAddDenoms{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + DenomList: append(types.DenomList{}, *bar, *bar), + Mandatory: true, + }, + true, + "denom already exists in mandatoryList: BAR", + }, + { + "invalid existing addition", + &types.MsgGovAddDenoms{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + DenomList: append(types.DenomList{}, types.Denom{ + SymbolDenom: "OJO", + BaseDenom: "OJO", + Exponent: 6, + }), + Mandatory: false, + }, + true, + "denom already exists in acceptList: OJO", + }, + { + "invalid existing mandatory addition", + &types.MsgGovAddDenoms{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + DenomList: append(types.DenomList{}, types.Denom{ + SymbolDenom: "ATOM", + BaseDenom: "ATOM", + Exponent: 6, + }), + Mandatory: true, + }, + true, + "denom already exists in mandatoryList: ATOM", + }, + { + "invalid empty denom", + &types.MsgGovAddDenoms{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + DenomList: append(types.DenomList{}, types.Denom{}), + Mandatory: true, + }, + true, + "invalid oracle param value", + }, + { + "invalid currency pair provider list", + &types.MsgGovAddDenoms{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + DenomList: append(types.DenomList{}, *foobar), + Mandatory: true, + + CurrencyPairProviders: oracletypes.CurrencyPairProvidersList{ + { + BaseDenom: "FOOBAR", + QuoteDenom: "BAR", + Providers: []string{}, + }, + }, + }, + true, + "oracle parameter CurrencyPairProviders must have at least 1 provider listed", + }, + { + "invalid currency deviation threshold list", + &types.MsgGovAddDenoms{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + DenomList: append(types.DenomList{}, *foobar), + Mandatory: true, + + CurrencyDeviationThresholds: oracletypes.CurrencyDeviationThresholdList{ + { + BaseDenom: "FOOBAR", + }, + }, + }, + true, + "oracle parameter CurrencyDeviationThreshold must have Threshold", + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + err := tc.req.ValidateBasic() + if err == nil { + _, err = s.msgServer.GovAddDenoms(s.ctx, tc.req) + abci.EndBlocker(s.ctx, s.app.OracleKeeper) + } + if tc.expectErr { + s.Require().ErrorContains(err, tc.errMsg) + } else { + s.Require().NoError(err) + + switch tc.name { + case "valid denom addition": + al := s.app.OracleKeeper.AcceptList(s.ctx) + s.Require().True( + al.Contains(foo.SymbolDenom) && al.Contains(bar.SymbolDenom), + ) + + rwb := s.app.OracleKeeper.RewardBands(s.ctx) + band, err := rwb.GetBandFromDenom("foo") + s.Require().Equal(band, math.LegacyNewDecWithPrec(2, 2)) + s.Require().NoError(err) + band, err = rwb.GetBandFromDenom("bar") + s.Require().Equal(band, math.LegacyNewDecWithPrec(2, 2)) + s.Require().NoError(err) + + case "valid mandatory denom addition with currency pair providers and currency deviation thresholds": + al := s.app.OracleKeeper.AcceptList(s.ctx) + s.Require().True( + al.Contains(foo.SymbolDenom) && al.Contains(bar.SymbolDenom), + ) + ml := s.app.OracleKeeper.MandatoryList(s.ctx) + s.Require().True( + ml.Contains(foo.SymbolDenom) && ml.Contains(bar.SymbolDenom), + ) + + rwb := s.app.OracleKeeper.RewardBands(s.ctx) + band, err := rwb.GetBandFromDenom("foo") + s.Require().Equal(band, math.LegacyNewDecWithPrec(2, 2)) + s.Require().NoError(err) + band, err = rwb.GetBandFromDenom("bar") + s.Require().Equal(band, math.LegacyNewDecWithPrec(2, 2)) + s.Require().NoError(err) + + cpp := s.app.OracleKeeper.CurrencyPairProviders(s.ctx) + for i := range currencyPairProviders { + s.Require().Contains(cpp, currencyPairProviders[i]) + } + + cdt := s.app.OracleKeeper.CurrencyDeviationThresholds(s.ctx) + for i := range currencyDeviationThresholds { + s.Require().Contains(cdt, currencyDeviationThresholds[i]) + } + + case "valid denom addition with reward band": + al := s.app.OracleKeeper.AcceptList(s.ctx) + s.Require().True( + al.Contains("REWARD"), + ) + + rwb := s.app.OracleKeeper.RewardBands(s.ctx) + band, err := rwb.GetBandFromDenom("REWARD") + s.Require().Equal(band, math.LegacyNewDecWithPrec(2, 3)) + s.Require().NoError(err) + + case "valid currency pair providers and currency deviation thresholds addition with no new denoms": + cpp := s.app.OracleKeeper.CurrencyPairProviders(s.ctx) + for i := range currencyPairProviders2 { + s.Require().Contains(cpp, currencyPairProviders2[i]) + } + + cdt := s.app.OracleKeeper.CurrencyDeviationThresholds(s.ctx) + for i := range currencyDeviationThresholds2 { + s.Require().Contains(cdt, currencyDeviationThresholds2[i]) + } + } + } + }) + } +} + +func (s *IntegrationTestSuite) TestMsgServer_GovRemoveCurrencyPairProviders() { + govAccAddr := s.app.GovKeeper.GetGovernanceAccount(s.ctx).GetAddress().String() + currentCurrencyPairProviders := types.CurrencyPairProvidersList{ + { + BaseDenom: "FOO", + QuoteDenom: "BAR", + PairAddress: []oracletypes.PairAddressProvider{ + { + Address: "address", + AddressProvider: "provider", + }, + }, + Providers: []string{ + "provider", + }, + }, + { + BaseDenom: "FOOBAR", + QuoteDenom: "BAR", + PairAddress: []oracletypes.PairAddressProvider{ + { + Address: "address2", + AddressProvider: "provider2", + }, + }, + Providers: []string{ + "provider2", + }, + }, + { + BaseDenom: types.DmSymbol, + QuoteDenom: types.USDSymbol, + Providers: []string{ + "binance", + "coinbase", + }, + }, + { + BaseDenom: "UNI", + QuoteDenom: "ETH", + PairAddress: []oracletypes.PairAddressProvider{ + { + Address: "address4", + AddressProvider: "eth-uniswap", + }, + }, + Providers: []string{ + "bitget", + "eth-uniswap", + }, + }, + } + s.app.OracleKeeper.SetCurrencyPairProviders(s.ctx, currentCurrencyPairProviders) + + testCases := []struct { + name string + req *types.MsgGovRemoveCurrencyPairProviders + expectErr bool + errMsg string + }{ + { + "remove nonexisting currency pair", + &types.MsgGovRemoveCurrencyPairProviders{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + + CurrencyPairProviders: types.CurrencyPairProvidersList{ + { + BaseDenom: "CURR1", + QuoteDenom: "CURR2", + }, + }, + }, + false, + "", + }, + { + "remove nonexisting currency pair with existing base denom and one with existing quote denom", + &types.MsgGovRemoveCurrencyPairProviders{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + + CurrencyPairProviders: types.CurrencyPairProvidersList{ + { + BaseDenom: "OJO", + QuoteDenom: "CURR2", + }, + { + BaseDenom: "CURR1", + QuoteDenom: "USD", + }, + }, + }, + false, + "", + }, + { + "remove existing currency pair", + &types.MsgGovRemoveCurrencyPairProviders{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + + CurrencyPairProviders: types.CurrencyPairProvidersList{ + { + BaseDenom: "FOO", + QuoteDenom: "BAR", + }, + }, + }, + false, + "", + }, + { + "remove multiple existing currency pairs", + &types.MsgGovRemoveCurrencyPairProviders{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + + CurrencyPairProviders: types.CurrencyPairProvidersList{ + { + BaseDenom: "FOOBAR", + QuoteDenom: "BAR", + }, + { + BaseDenom: "UNI", + QuoteDenom: "ETH", + }, + }, + }, + false, + "", + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + err := tc.req.ValidateBasic() + if err == nil { + _, err = s.msgServer.GovRemoveCurrencyPairProviders(s.ctx, tc.req) + abci.EndBlocker(s.ctx, s.app.OracleKeeper) + } + + if tc.expectErr { + s.Require().ErrorContains(err, tc.errMsg) + } else { + s.Require().NoError(err) + + switch tc.name { + case "remove nonexisting currency pair": + cpp := s.app.OracleKeeper.CurrencyPairProviders(s.ctx) + s.Require().Equal(currentCurrencyPairProviders, cpp) + + case "remove nonexisting currency pair with existing quote": + cpp := s.app.OracleKeeper.CurrencyPairProviders(s.ctx) + s.Require().Equal(currentCurrencyPairProviders, cpp) + + case "remove existing currency pair": + cpp := s.app.OracleKeeper.CurrencyPairProviders(s.ctx) + s.Require().Equal(currentCurrencyPairProviders[1:], cpp) + + case "remove multiple existing currency pairs": + cpp := s.app.OracleKeeper.CurrencyPairProviders(s.ctx) + s.Require().Equal(types.CurrencyPairProvidersList{ + { + BaseDenom: types.DmSymbol, + QuoteDenom: types.USDSymbol, + Providers: []string{ + "binance", + "coinbase", + }, + }, + }, cpp) + } + } + }) + } +} + +func (s *IntegrationTestSuite) TestMsgServer_GovRemoveCurrencyDeviationThresholds() { + govAccAddr := s.app.GovKeeper.GetGovernanceAccount(s.ctx).GetAddress().String() + currentCurrencyDeviationThresholds := types.CurrencyDeviationThresholdList{ + { + BaseDenom: "FOO", + Threshold: "2", + }, + { + BaseDenom: "BAR", + Threshold: "2", + }, + { + BaseDenom: types.DmSymbol, + Threshold: "2", + }, + { + BaseDenom: "FOOBAR", + Threshold: "2", + }, + } + + s.app.OracleKeeper.SetCurrencyDeviationThresholds(s.ctx, currentCurrencyDeviationThresholds) + + testCases := []struct { + name string + req *types.MsgGovRemoveCurrencyDeviationThresholds + expectErr bool + errMsg string + }{ + { + "remove nonexisting currency", + &types.MsgGovRemoveCurrencyDeviationThresholds{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + + Currencies: []string{"CURR1"}, + }, + false, + "", + }, + { + "remove multiple nonexisting currencies", + &types.MsgGovRemoveCurrencyDeviationThresholds{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + + Currencies: []string{"CURR1", "CURR2"}, + }, + false, + "", + }, + { + "remove existing currency", + &types.MsgGovRemoveCurrencyDeviationThresholds{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + + Currencies: []string{"FOO"}, + }, + false, + "", + }, + { + "remove multiple existing currencies", + &types.MsgGovRemoveCurrencyDeviationThresholds{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Height: 9, + + Currencies: []string{"BAR", "FOOBAR"}, + }, + false, + "", + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + err := tc.req.ValidateBasic() + if err == nil { + _, err = s.msgServer.GovRemoveCurrencyDeviationThresholds(s.ctx, tc.req) + abci.EndBlocker(s.ctx, s.app.OracleKeeper) + } + + if tc.expectErr { + s.Require().ErrorContains(err, tc.errMsg) + } else { + s.Require().NoError(err) + + switch tc.name { + case "remove nonexisting currency pair": + cdt := s.app.OracleKeeper.CurrencyDeviationThresholds(s.ctx) + s.Require().Equal(currentCurrencyDeviationThresholds, cdt) + + case "remove nonexisting currency pair with existing quote": + cdt := s.app.OracleKeeper.CurrencyDeviationThresholds(s.ctx) + s.Require().Equal(currentCurrencyDeviationThresholds, cdt) + + case "remove existing currency pair": + cdt := s.app.OracleKeeper.CurrencyDeviationThresholds(s.ctx) + s.Require().Equal(currentCurrencyDeviationThresholds[1:], cdt) + + case "remove multiple existing currency pairs": + cdt := s.app.OracleKeeper.CurrencyDeviationThresholds(s.ctx) + s.Require().Equal(types.CurrencyDeviationThresholdList{ + { + BaseDenom: types.DmSymbol, + Threshold: "2", + }, + }, cdt) + } + } + }) + } +} + +func (s *IntegrationTestSuite) TestMsgServer_CancelUpdateGovParams() { + govAccAddr := s.app.GovKeeper.GetGovernanceAccount(s.ctx).GetAddress().String() + + // No plan exists at height + _, err := s.msgServer.GovCancelUpdateParamPlan(s.ctx, + &types.MsgGovCancelUpdateParamPlan{ + Authority: govAccAddr, + Height: 100, + }, + ) + s.Require().ErrorContains(err, "No param update plan found at block height 100: invalid request") + + // Schedule plan + _, err = s.msgServer.GovUpdateParams(s.ctx, + &types.MsgGovUpdateParams{ + Authority: govAccAddr, + Title: "test", + Description: "test", + Plan: types.ParamUpdatePlan{ + Keys: []string{"VoteThreshold"}, + Height: 100, + Changes: types.Params{ + VoteThreshold: math.LegacyNewDecWithPrec(40, 2), + }, + }, + }, + ) + s.Require().NoError(err) + + // Plan exists now + _, err = s.msgServer.GovCancelUpdateParamPlan(s.ctx, + &types.MsgGovCancelUpdateParamPlan{ + Authority: govAccAddr, + Height: 100, + }, + ) + s.Require().NoError(err) + + plan := s.app.OracleKeeper.GetParamUpdatePlans(s.ctx) + s.Require().Len(plan, 0) +} diff --git a/x/oracle/keeper/param_update_plan.go b/x/oracle/keeper/param_update_plan.go new file mode 100644 index 0000000..3c7d8e6 --- /dev/null +++ b/x/oracle/keeper/param_update_plan.go @@ -0,0 +1,216 @@ +package keeper + +import ( + "cosmossdk.io/collections" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DaevMithran/dmchain/util" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// ScheduleParamUpdatePlan schedules a param update plan. +func (k Keeper) ScheduleParamUpdatePlan(ctx sdk.Context, plan types.ParamUpdatePlan) error { + if plan.Height < ctx.BlockHeight() { + return types.ErrInvalidRequest.Wrap("param update cannot be scheduled in the past") + } + if err := k.ValidateParamChanges(ctx, plan.Keys, plan.Changes); err != nil { + return err + } + + height := util.SafeInt64ToUint64(plan.Height) + + return k.ParamUpdatePlans.Set(ctx, height, plan) +} + +// ClearParamUpdatePlan will clear an upcoming param update plan if one exists and return +// an error if one isn't found. +func (k Keeper) ClearParamUpdatePlan(ctx sdk.Context, planHeight uint64) error { + if !k.haveParamUpdatePlan(ctx, planHeight) { + return types.ErrInvalidRequest.Wrapf("No param update plan found at block height %d", planHeight) + } + + return k.ParamUpdatePlans.Remove(ctx, planHeight) +} + +// haveParamUpdatePlan will return whether a param update plan exists and the specified +// plan height. +func (k Keeper) haveParamUpdatePlan(ctx sdk.Context, planHeight uint64) bool { + has, _ := k.ParamUpdatePlans.Has(ctx, planHeight) + return has +} + +// GetParamUpdatePlans returns all the param update plans in the store. +func (k Keeper) GetParamUpdatePlans(ctx sdk.Context) (plans []types.ParamUpdatePlan) { + k.IterateParamUpdatePlans(ctx, func(plan types.ParamUpdatePlan) bool { + plans = append(plans, plan) + return false + }) + + return plans +} + +// IterateParamUpdatePlans iterates rate over param update plans in the store +func (k Keeper) IterateParamUpdatePlans( + ctx sdk.Context, + handler func(types.ParamUpdatePlan) bool, +) { + err := k.ParamUpdatePlans.Walk(ctx, nil, func(height uint64, plan types.ParamUpdatePlan) (stop bool, err error) { + return handler(plan), nil + }) + + if err != nil { + k.Logger(ctx).Error("failed to iterate param update plans", "error", err) + } +} + +// GetPlansUpToHeight finds plans that are scheduled for the current block height or lower +func (k Keeper) GetPlansUpToHeight(ctx sdk.Context, currentHeight uint64) ([]types.ParamUpdatePlan, error) { + var plans []types.ParamUpdatePlan + + // Create a range from 0 up to (and including) currentHeight + rng := new(collections.Range[uint64]).EndInclusive(currentHeight) + + err := k.ParamUpdatePlans.Walk(ctx, rng, func(height uint64, plan types.ParamUpdatePlan) (bool, error) { + plans = append(plans, plan) + return false, nil + }) + + return plans, err +} + +// ValidateParamChanges validates parameter changes against the existing oracle parameters. +func (k Keeper) ValidateParamChanges(ctx sdk.Context, keys []string, changes types.Params) error { + params := k.GetParams(ctx) + + for _, key := range keys { + switch key { + case string(types.KeyVotePeriod): + params.VotePeriod = changes.VotePeriod + + case string(types.KeyVoteThreshold): + params.VoteThreshold = changes.VoteThreshold + + case string(types.KeyRewardBands): + params.RewardBands = changes.RewardBands + + case string(types.KeyRewardDistributionWindow): + params.RewardDistributionWindow = changes.RewardDistributionWindow + + case string(types.KeyAcceptList): + params.AcceptList = changes.AcceptList.Normalize() + + case string(types.KeyMandatoryList): + params.MandatoryList = changes.MandatoryList.Normalize() + + case string(types.KeySlashFraction): + params.SlashFraction = changes.SlashFraction + + case string(types.KeySlashWindow): + params.SlashWindow = changes.SlashWindow + + case string(types.KeyMinValidPerWindow): + params.MinValidPerWindow = changes.MinValidPerWindow + + case string(types.KeyHistoricStampPeriod): + params.HistoricStampPeriod = changes.HistoricStampPeriod + + case string(types.KeyMedianStampPeriod): + params.MedianStampPeriod = changes.MedianStampPeriod + + case string(types.KeyMaximumPriceStamps): + params.MaximumPriceStamps = changes.MaximumPriceStamps + + case string(types.KeyMaximumMedianStamps): + params.MaximumMedianStamps = changes.MaximumMedianStamps + + case string(types.KeyCurrencyPairProviders): + params.CurrencyPairProviders = changes.CurrencyPairProviders + + case string(types.KeyCurrencyDeviationThresholds): + params.CurrencyDeviationThresholds = changes.CurrencyDeviationThresholds + + case string(types.KeyUsdcIbcDenom): + params.UsdcIbcDenom = changes.UsdcIbcDenom + + case string(types.KeySlashingEnabled): + params.SlashingEnabled = changes.SlashingEnabled + + case string(types.KeyAveragingWindow): + params.AveragingWindow = changes.AveragingWindow + + } + } + + return params.Validate() +} + +// ExecuteParamUpdatePlan will execute a given param update plan and emit a param +// update event. +func (k Keeper) ExecuteParamUpdatePlan(ctx sdk.Context, plan types.ParamUpdatePlan) error { + for _, key := range plan.Keys { + switch key { + case string(types.KeyVotePeriod): + k.SetVotePeriod(ctx, plan.Changes.VotePeriod) + + case string(types.KeyVoteThreshold): + k.SetVoteThreshold(ctx, plan.Changes.VoteThreshold) + + case string(types.KeyRewardBands): + k.SetRewardBand(ctx, plan.Changes.RewardBands) + + case string(types.KeyRewardDistributionWindow): + k.SetRewardDistributionWindow(ctx, plan.Changes.RewardDistributionWindow) + + case string(types.KeyAcceptList): + k.SetAcceptList(ctx, plan.Changes.AcceptList.Normalize()) + + case string(types.KeyMandatoryList): + k.SetMandatoryList(ctx, plan.Changes.MandatoryList.Normalize()) + + case string(types.KeySlashFraction): + k.SetSlashFraction(ctx, plan.Changes.SlashFraction) + + case string(types.KeySlashWindow): + k.SetSlashWindow(ctx, plan.Changes.SlashWindow) + + case string(types.KeyMinValidPerWindow): + k.SetMinValidPerWindow(ctx, plan.Changes.MinValidPerWindow) + + case string(types.KeyHistoricStampPeriod): + k.SetHistoricStampPeriod(ctx, plan.Changes.HistoricStampPeriod) + + case string(types.KeyMedianStampPeriod): + k.SetMedianStampPeriod(ctx, plan.Changes.MedianStampPeriod) + + case string(types.KeyMaximumPriceStamps): + k.SetMaximumPriceStamps(ctx, plan.Changes.MaximumPriceStamps) + + case string(types.KeyMaximumMedianStamps): + k.SetMaximumMedianStamps(ctx, plan.Changes.MaximumMedianStamps) + + case string(types.KeyCurrencyPairProviders): + k.SetCurrencyPairProviders(ctx, plan.Changes.CurrencyPairProviders) + + case string(types.KeyCurrencyDeviationThresholds): + k.SetCurrencyDeviationThresholds(ctx, plan.Changes.CurrencyDeviationThresholds) + + case string(types.KeyUsdcIbcDenom): + k.SetUsdcIbcDenom(ctx, plan.Changes.UsdcIbcDenom) + + case string(types.KeySlashingEnabled): + k.SetSlashingEnabled(ctx, plan.Changes.SlashingEnabled) + + case string(types.KeyAveragingWindow): + k.SetAveragingWindow(ctx, plan.Changes.AveragingWindow) + } + } + + event := sdk.NewEvent( + types.EventParamUpdate, + sdk.NewAttribute(types.AttributeKeyNotifyPriceFeeder, "1"), + ) + ctx.EventManager().EmitEvent(event) + + // clear plan from store after executing it + return k.ClearParamUpdatePlan(ctx, util.SafeInt64ToUint64(plan.Height)) +} diff --git a/x/oracle/keeper/params.go b/x/oracle/keeper/params.go new file mode 100644 index 0000000..fc9aa02 --- /dev/null +++ b/x/oracle/keeper/params.go @@ -0,0 +1,256 @@ +package keeper + +import ( + "fmt" + "strings" + + "github.com/DaevMithran/dmchain/x/oracle/types" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// VotePeriod returns the number of blocks during which voting takes place. +func (k Keeper) VotePeriod(ctx sdk.Context) (res uint64) { + k.paramSpace.Get(ctx, types.KeyVotePeriod, &res) + return +} + +// SetVotePeriod updates the number of blocks during which voting takes place. +func (k Keeper) SetVotePeriod(ctx sdk.Context, votePeriod uint64) { + k.paramSpace.Set(ctx, types.KeyVotePeriod, votePeriod) +} + +// VoteThreshold returns the minimum percentage of votes that must be received +// for a ballot to pass. +func (k Keeper) VoteThreshold(ctx sdk.Context) (res math.LegacyDec) { + k.paramSpace.Get(ctx, types.KeyVoteThreshold, &res) + return +} + +// SetVoteThreshold updates the minimum percentage of votes that must be received +// for a ballot to pass. +func (k Keeper) SetVoteThreshold(ctx sdk.Context, voteThreshold math.LegacyDec) { + k.paramSpace.Set(ctx, types.KeyVoteThreshold, voteThreshold) +} + +// RewardBand returns the ratio of allowable exchange rate error that a validator +// can be rewarded. +func (k Keeper) RewardBands(ctx sdk.Context) (res types.RewardBandList) { + k.paramSpace.Get(ctx, types.KeyRewardBands, &res) + return +} + +// VoteThreshold updates the ratio of allowable exchange rate error that a validator +// can be rewarded. +func (k Keeper) SetRewardBand(ctx sdk.Context, rewardBands types.RewardBandList) { + k.paramSpace.Set(ctx, types.KeyRewardBands, rewardBands) +} + +// RewardDistributionWindow returns the number of vote periods during which +// seigniorage reward comes in and then is distributed. +func (k Keeper) RewardDistributionWindow(ctx sdk.Context) (res uint64) { + k.paramSpace.Get(ctx, types.KeyRewardDistributionWindow, &res) + return +} + +// SetRewardDistributionWindow updates the number of vote periods during which +// seigniorage reward comes in and then is distributed. +func (k Keeper) SetRewardDistributionWindow(ctx sdk.Context, rewardDistributionWindow uint64) { + k.paramSpace.Set(ctx, types.KeyRewardDistributionWindow, rewardDistributionWindow) +} + +// AcceptList returns the denom list that can be activated +func (k Keeper) AcceptList(ctx sdk.Context) (res types.DenomList) { + k.paramSpace.Get(ctx, types.KeyAcceptList, &res) + return +} + +// SetAcceptList updates the accepted list of assets supported by the x/oracle +// module. +func (k Keeper) SetAcceptList(ctx sdk.Context, acceptList types.DenomList) { + k.paramSpace.Set(ctx, types.KeyAcceptList, acceptList) +} + +// MandatoryList returns the denom list that are mandatory +func (k Keeper) MandatoryList(ctx sdk.Context) (res types.DenomList) { + k.paramSpace.Get(ctx, types.KeyMandatoryList, &res) + return +} + +// SetMandatoryList updates the mandatory list of assets supported by the x/oracle +// module. +func (k Keeper) SetMandatoryList(ctx sdk.Context, mandatoryList types.DenomList) { + k.paramSpace.Set(ctx, types.KeyMandatoryList, mandatoryList) +} + +// SlashFraction returns the oracle voting penalty rate. +func (k Keeper) SlashFraction(ctx sdk.Context) (res math.LegacyDec) { + k.paramSpace.Get(ctx, types.KeySlashFraction, &res) + return +} + +// SetSlashFraction updates the oracle voting penalty rate. +func (k Keeper) SetSlashFraction(ctx sdk.Context, slashFraction math.LegacyDec) { + k.paramSpace.Set(ctx, types.KeySlashFraction, slashFraction) +} + +// SlashWindow returns the number of total blocks in a slash window. +func (k Keeper) SlashWindow(ctx sdk.Context) (res uint64) { + k.paramSpace.Get(ctx, types.KeySlashWindow, &res) + return +} + +// SetSlashWindow updates the number of total blocks in a slash window. +func (k Keeper) SetSlashWindow(ctx sdk.Context, slashWindow uint64) { + k.paramSpace.Set(ctx, types.KeySlashWindow, slashWindow) +} + +// MinValidPerWindow returns the oracle slashing threshold. +func (k Keeper) MinValidPerWindow(ctx sdk.Context) (res math.LegacyDec) { + k.paramSpace.Get(ctx, types.KeyMinValidPerWindow, &res) + return +} + +// MinValidPerWindow updates the oracle slashing threshold. +func (k Keeper) SetMinValidPerWindow(ctx sdk.Context, minValidPerWindow math.LegacyDec) { + k.paramSpace.Set(ctx, types.KeyMinValidPerWindow, minValidPerWindow) +} + +// SetSlashingEnabled updates the oracle slashingEnabled. +func (k Keeper) SetSlashingEnabled(ctx sdk.Context, value bool) { + k.paramSpace.Set(ctx, types.KeySlashingEnabled, value) +} + +// SlashingEnabled returns the oracle slashingEnabled. +func (k Keeper) SlashingEnabled(ctx sdk.Context) (res bool) { + k.paramSpace.Get(ctx, types.KeySlashingEnabled, &res) + return +} + +// GetParams returns the total set of oracle parameters. +func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { + k.paramSpace.GetParamSet(ctx, ¶ms) + return params +} + +// SetParams sets the total set of oracle parameters. +func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { + k.paramSpace.SetParamSet(ctx, ¶ms) +} + +// HistoricStampPeriod returns the amount of blocks the oracle module waits +// before recording a new historic price. +func (k Keeper) HistoricStampPeriod(ctx sdk.Context) (res uint64) { + k.paramSpace.Get(ctx, types.KeyHistoricStampPeriod, &res) + return +} + +// SetHistoricStampPeriod updates the amount of blocks the oracle module waits +// before recording a new historic price. +func (k Keeper) SetHistoricStampPeriod(ctx sdk.Context, historicPriceStampPeriod uint64) { + k.paramSpace.Set(ctx, types.KeyHistoricStampPeriod, historicPriceStampPeriod) +} + +// MedianStampPeriod returns the amount blocks the oracle module waits between +// calculating a new median and standard deviation of that median. +func (k Keeper) MedianStampPeriod(ctx sdk.Context) (res uint64) { + k.paramSpace.Get(ctx, types.KeyMedianStampPeriod, &res) + return +} + +// SetMedianStampPeriod updates the amount blocks the oracle module waits between +// calculating a new median and standard deviation of that median. +func (k Keeper) SetMedianStampPeriod(ctx sdk.Context, medianStampPeriod uint64) { + k.paramSpace.Set(ctx, types.KeyMedianStampPeriod, medianStampPeriod) +} + +// MaximumPriceStamps returns the maximum amount of historic prices the oracle +// module will hold. +func (k Keeper) MaximumPriceStamps(ctx sdk.Context) (res uint64) { + k.paramSpace.Get(ctx, types.KeyMaximumPriceStamps, &res) + return +} + +// SetMaximumPriceStamps updates the the maximum amount of historic prices the +// oracle module will hold. +func (k Keeper) SetMaximumPriceStamps(ctx sdk.Context, maximumPriceStamps uint64) { + k.paramSpace.Set(ctx, types.KeyMaximumPriceStamps, maximumPriceStamps) +} + +// MaximumMedianStamps returns the maximum amount of medians the oracle module will +// hold. +func (k Keeper) MaximumMedianStamps(ctx sdk.Context) (res uint64) { + k.paramSpace.Get(ctx, types.KeyMaximumMedianStamps, &res) + return +} + +// SetMaximumMedianStamps updates the the maximum amount of medians the oracle module will +// hold. +func (k Keeper) SetMaximumMedianStamps(ctx sdk.Context, maximumMedianStamps uint64) { + k.paramSpace.Set(ctx, types.KeyMaximumMedianStamps, maximumMedianStamps) +} + +// CurrencyPairProviders returns the current Currency Pair Providers the price feeder +// will query when starting up. +func (k Keeper) CurrencyPairProviders(ctx sdk.Context) (res types.CurrencyPairProvidersList) { + k.paramSpace.Get(ctx, types.KeyCurrencyPairProviders, &res) + return +} + +// SetCurrencyPairProviders updates the current Currency Pair Providers the price feeder +// will query when starting up. +func (k Keeper) SetCurrencyPairProviders( + ctx sdk.Context, + currencyPairProviders types.CurrencyPairProvidersList, +) { + k.paramSpace.Set(ctx, types.KeyCurrencyPairProviders, currencyPairProviders) +} + +// CurrencyDeviationThresholds returns the current Currency Deviation Thesholds the +// price feeder will query when starting up. +func (k Keeper) CurrencyDeviationThresholds(ctx sdk.Context) (res types.CurrencyDeviationThresholdList) { + k.paramSpace.Get(ctx, types.KeyCurrencyDeviationThresholds, &res) + return +} + +// SetCurrencyDeviationThresholds updates the current Currency Deviation Thesholds the +// price feeder will query when starting up. +func (k Keeper) SetCurrencyDeviationThresholds( + ctx sdk.Context, + currencyDeviationThresholds types.CurrencyDeviationThresholdList, +) { + k.paramSpace.Set(ctx, types.KeyCurrencyDeviationThresholds, currencyDeviationThresholds) +} + +// UsdcIbcDenom returns the current usdc ibc denom +func (k Keeper) UsdcIbcDenom(ctx sdk.Context) (res string) { + k.paramSpace.Get(ctx, types.KeyUsdcIbcDenom, &res) + return +} + +// SetUsdcIbcDenom updates the current usdc ibc denom +func (k Keeper) SetUsdcIbcDenom(ctx sdk.Context, value string) { + k.paramSpace.Set(ctx, types.KeyUsdcIbcDenom, value) +} + +func (k Keeper) GetExponent(ctx sdk.Context, denom string) (uint32, error) { + params := k.GetParams(ctx) + for _, v := range params.AcceptList { + if strings.EqualFold(v.SymbolDenom, denom) { + return v.Exponent, nil + } + } + return 0, fmt.Errorf("unable to find exponent for %s", denom) +} + +// SetAveragingWindow updates the oracle AveragingWindow. +func (k Keeper) SetAveragingWindow(ctx sdk.Context, value uint64) { + k.paramSpace.Set(ctx, types.KeyAveragingWindow, value) +} + +// AveragingWindow returns the oracle AveragingWindow. +func (k Keeper) AveragingWindow(ctx sdk.Context) (res bool) { + k.paramSpace.Get(ctx, types.KeyAveragingWindow, &res) + return +} diff --git a/x/oracle/keeper/params_test.go b/x/oracle/keeper/params_test.go new file mode 100644 index 0000000..aec7e3f --- /dev/null +++ b/x/oracle/keeper/params_test.go @@ -0,0 +1,21 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +func (s *IntegrationTestSuite) TestVoteThreshold() { + app, ctx := s.app, s.ctx + + voteDec := app.OracleKeeper.VoteThreshold(ctx) + s.Require().Equal(math.LegacyMustNewDecFromStr("0.5"), voteDec) + + newVoteTreshold := math.LegacyMustNewDecFromStr("0.6") + defaultParams := types.DefaultParams() + defaultParams.VoteThreshold = newVoteTreshold + app.OracleKeeper.SetParams(ctx, defaultParams) + + voteThresholdDec := app.OracleKeeper.VoteThreshold(ctx) + s.Require().Equal(newVoteTreshold, voteThresholdDec) +} diff --git a/x/oracle/keeper/reward.go b/x/oracle/keeper/reward.go new file mode 100644 index 0000000..edf9d68 --- /dev/null +++ b/x/oracle/keeper/reward.go @@ -0,0 +1,116 @@ +package keeper + +import ( + "fmt" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DaevMithran/dmchain/util" + "github.com/DaevMithran/dmchain/util/decmath" + "github.com/DaevMithran/dmchain/util/genmap" + "github.com/DaevMithran/dmchain/util/reward" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// prependOjoIfUnique pushes `uojo` denom to the front of the list, if it is not yet included. +func prependOjoIfUnique(voteTargets []string) []string { + if genmap.Contains(types.DmDenom, voteTargets) { + return voteTargets + } + rewardDenoms := make([]string, len(voteTargets)+1) + rewardDenoms[0] = types.DmDenom + copy(rewardDenoms[1:], voteTargets) + return rewardDenoms +} + +// smallestMissCountInBallot iterates through a given list of Claims and returns the smallest +// misscount in that list +func (k Keeper) smallestMissCountInBallot(ctx sdk.Context, ballotWinners []types.Claim) int64 { + missCount := k.GetMissCounter(ctx, ballotWinners[0].Recipient) + for _, winner := range ballotWinners[1:] { + count := k.GetMissCounter(ctx, winner.Recipient) + if count < missCount { + missCount = count + } + } + + return util.SafeUint64ToInt64(missCount) +} + +// RewardBallotWinners is executed at the end of every voting period, where we +// give out a portion of seigniorage reward(reward-weight) to the oracle voters +// that voted correctly. +func (k Keeper) RewardBallotWinners( + ctx sdk.Context, + votePeriod int64, + rewardDistributionWindow int64, + voteTargets []string, + ballotWinners []types.Claim, +) { + if len(ballotWinners) == 0 { + return + } + + distributionRatio := math.LegacyNewDec(votePeriod).QuoInt64(rewardDistributionWindow) + var periodRewards sdk.DecCoins + rewardDenoms := prependOjoIfUnique(voteTargets) + for _, denom := range rewardDenoms { + rewardPool := k.GetRewardPool(ctx, denom) + + // return if there's no rewards to give out + if rewardPool.IsZero() { + continue + } + + periodRewards = periodRewards.Add(sdk.NewDecCoinFromDec( + denom, + math.LegacyNewDecFromInt(rewardPool.Amount).Mul(distributionRatio), + )) + } + + // distribute rewards + var distributedReward sdk.Coins + + smallestMissCount := k.smallestMissCountInBallot(ctx, ballotWinners) + for _, winner := range ballotWinners { + receiverVal, err := k.StakingKeeper.Validator(ctx, winner.Recipient) + // in case absence of the validator, we just skip distribution + if receiverVal == nil || err != nil { + continue + } + + missCount := util.SafeUint64ToInt64(k.GetMissCounter(ctx, winner.Recipient)) + maxMissCount := int64(len(voteTargets)) * (util.SafeUint64ToInt64((k.SlashWindow(ctx) / k.VotePeriod(ctx)))) + rewardFactor := reward.CalculateRewardFactor( + missCount, + maxMissCount, + smallestMissCount, + ) + rewardDec, err := decmath.NewDecFromFloat(rewardFactor) + if err != nil { + k.Logger(ctx).With(err).Error("unable to calculate validator reward factor!") + return + } + ballotLength := int64(len(ballotWinners)) + + rewardCoins, _ := periodRewards.MulDec(rewardDec.QuoInt64( + ballotLength)).TruncateDecimal() + if rewardCoins.IsZero() { + continue + } + + err = k.distrKeeper.AllocateTokensToValidator(ctx, receiverVal, sdk.NewDecCoinsFromCoins(rewardCoins...)) + if err != nil { + k.Logger(ctx).With(err).Error("Failed to allocate tokens to validator!") + return + } + distributedReward = distributedReward.Add(rewardCoins...) + } + + // move distributed reward to distribution module + err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, k.distrName, distributedReward) + if err != nil { + panic(fmt.Errorf("failed to send coins to distribution module %w", err)) + } +} diff --git a/x/oracle/keeper/reward_test.go b/x/oracle/keeper/reward_test.go new file mode 100644 index 0000000..58610a3 --- /dev/null +++ b/x/oracle/keeper/reward_test.go @@ -0,0 +1,146 @@ +package keeper_test + +import ( + "fmt" + "math" + + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// Test the reward giving mechanism +func (s *IntegrationTestSuite) TestRewardBallotWinners() { + app, ctx := s.app, s.ctx + + // Add claim pools + claims := []types.Claim{ + types.NewClaim(10, 0, 0, valAddr), + types.NewClaim(20, 0, 0, valAddr2), + } + + missCounters := []types.MissCounter{ + {ValidatorAddress: valAddr.String(), MissCounter: uint64(2)}, + {ValidatorAddress: valAddr2.String(), MissCounter: uint64(4)}, + } + + for _, mc := range missCounters { + operator, _ := sdk.ValAddressFromBech32(mc.ValidatorAddress) + app.OracleKeeper.SetMissCounter(ctx, operator, mc.MissCounter) + } + + // Prepare reward pool + givingAmt := sdk.NewCoins(sdk.NewInt64Coin(types.DmDenom, 30000000)) + err := app.BankKeeper.MintCoins(ctx, "oracle", givingAmt) + s.Require().NoError(err) + + var voteTargets []string + params := app.OracleKeeper.GetParams(ctx) + for _, v := range params.AcceptList { + voteTargets = append(voteTargets, v.SymbolDenom) + } + + // Add extra voteTargets to increase maximum miss count + for i := 1; i <= 3; i++ { + voteTargets = append(voteTargets, fmt.Sprintf("%s%d", types.DmSymbol, i)) + } + maximumMissCounts := uint64(len(voteTargets)) * (app.OracleKeeper.SlashWindow(ctx) / app.OracleKeeper.VotePeriod(ctx)) + + val1ExpectedRewardFactor := fmt.Sprintf("%f", 1-math.Log(1)/ + math.Log(float64(maximumMissCounts-missCounters[0].MissCounter+1))) + + val2ExpectedRewardFactor := fmt.Sprintf("%f", 1-math.Log(float64(missCounters[1].MissCounter-missCounters[0].MissCounter+1))/ + math.Log(float64(maximumMissCounts-missCounters[0].MissCounter+1))) + + votePeriodsPerWindow := sdkmath.LegacyNewDec((int64)(app.OracleKeeper.RewardDistributionWindow(ctx))). + QuoInt64((int64)(app.OracleKeeper.VotePeriod(ctx))). + TruncateInt64() + app.OracleKeeper.RewardBallotWinners(ctx, (int64)(app.OracleKeeper.VotePeriod(ctx)), (int64)(app.OracleKeeper.RewardDistributionWindow(ctx)), voteTargets, claims) + outstandingRewardsDecVal1, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valAddr) + s.Require().NoError(err) + outstandingRewardsVal1, _ := outstandingRewardsDecVal1.TruncateDecimal() + outstandingRewardsDecVal2, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valAddr2) + s.Require().NoError(err) + outstandingRewardsVal2, _ := outstandingRewardsDecVal2.TruncateDecimal() + s.Require().Equal(sdkmath.LegacyNewDecFromInt(givingAmt.AmountOf(types.DmDenom)).Mul(sdkmath.LegacyMustNewDecFromStr(val1ExpectedRewardFactor).QuoInt64(int64(len(claims)))).QuoInt64(votePeriodsPerWindow).TruncateInt(), + outstandingRewardsVal1.AmountOf(types.DmDenom)) + s.Require().Equal(sdkmath.LegacyNewDecFromInt(givingAmt.AmountOf(types.DmDenom)).Mul(sdkmath.LegacyMustNewDecFromStr(val2ExpectedRewardFactor).QuoInt64(int64(len(claims)))).QuoInt64(votePeriodsPerWindow).TruncateInt(), + outstandingRewardsVal2.AmountOf(types.DmDenom)) +} + +func (s *IntegrationTestSuite) TestRewardBallotWinnersZeroMissCounters() { + app, ctx := s.app, s.ctx + + // Add claim pools + claims := []types.Claim{ + types.NewClaim(10, 0, 0, valAddr), + types.NewClaim(20, 0, 0, valAddr2), + } + + // Prepare reward pool + givingAmt := sdk.NewCoins(sdk.NewInt64Coin(types.DmDenom, 30000000)) + err := app.BankKeeper.MintCoins(ctx, "oracle", givingAmt) + s.Require().NoError(err) + + var voteTargets []string + params := app.OracleKeeper.GetParams(ctx) + for _, v := range params.AcceptList { + voteTargets = append(voteTargets, v.SymbolDenom) + } + + votePeriodsPerWindow := sdkmath.LegacyNewDec((int64)(app.OracleKeeper.RewardDistributionWindow(ctx))). + QuoInt64((int64)(app.OracleKeeper.VotePeriod(ctx))). + TruncateInt64() + app.OracleKeeper.RewardBallotWinners(ctx, (int64)(app.OracleKeeper.VotePeriod(ctx)), (int64)(app.OracleKeeper.RewardDistributionWindow(ctx)), voteTargets, claims) + outstandingRewardsDecVal1, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valAddr) + s.Require().NoError(err) + outstandingRewardsVal1, _ := outstandingRewardsDecVal1.TruncateDecimal() + outstandingRewardsDecVal2, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valAddr2) + s.Require().NoError(err) + outstandingRewardsVal2, _ := outstandingRewardsDecVal2.TruncateDecimal() + s.Require().Equal(sdkmath.LegacyNewDecFromInt(givingAmt.AmountOf(types.DmDenom)).QuoInt64(votePeriodsPerWindow).QuoInt64(2).TruncateInt(), + outstandingRewardsVal1.AmountOf(types.DmDenom)) + s.Require().Equal(sdkmath.LegacyNewDecFromInt(givingAmt.AmountOf(types.DmDenom)).QuoInt64(votePeriodsPerWindow).QuoInt64(2).TruncateInt(), + outstandingRewardsVal2.AmountOf(types.DmDenom)) +} + +func (s *IntegrationTestSuite) TestRewardBallotWinnersZeroVoteTargets() { + app, ctx := s.app, s.ctx + + // Add claim pools + claims := []types.Claim{ + types.NewClaim(10, 0, 0, valAddr), + types.NewClaim(20, 0, 0, valAddr2), + } + + app.OracleKeeper.RewardBallotWinners(ctx, (int64)(app.OracleKeeper.VotePeriod(ctx)), (int64)(app.OracleKeeper.RewardDistributionWindow(ctx)), []string{}, claims) + outstandingRewardsDecVal1, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valAddr) + s.Require().NoError(err) + outstandingRewardsVal1, _ := outstandingRewardsDecVal1.TruncateDecimal() + outstandingRewardsDecVal2, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valAddr2) + s.Require().NoError(err) + outstandingRewardsVal2, _ := outstandingRewardsDecVal2.TruncateDecimal() + s.Require().Equal(sdkmath.LegacyZeroDec().TruncateInt(), outstandingRewardsVal1.AmountOf(types.DmDenom)) + s.Require().Equal(sdkmath.LegacyZeroDec().TruncateInt(), outstandingRewardsVal2.AmountOf(types.DmDenom)) +} + +func (s *IntegrationTestSuite) TestRewardBallotWinnersZeroClaims() { + app, ctx := s.app, s.ctx + + var voteTargets []string + params := app.OracleKeeper.GetParams(ctx) + for _, v := range params.AcceptList { + voteTargets = append(voteTargets, v.SymbolDenom) + } + + app.OracleKeeper.RewardBallotWinners(ctx, (int64)(app.OracleKeeper.VotePeriod(ctx)), (int64)(app.OracleKeeper.RewardDistributionWindow(ctx)), voteTargets, []types.Claim{}) + outstandingRewardsDecVal1, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valAddr) + s.Require().NoError(err) + outstandingRewardsVal1, _ := outstandingRewardsDecVal1.TruncateDecimal() + outstandingRewardsDecVal2, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valAddr2) + s.Require().NoError(err) + outstandingRewardsVal2, _ := outstandingRewardsDecVal2.TruncateDecimal() + s.Require().Equal(sdkmath.LegacyZeroDec().TruncateInt(), outstandingRewardsVal1.AmountOf(types.DmDenom)) + s.Require().Equal(sdkmath.LegacyZeroDec().TruncateInt(), outstandingRewardsVal2.AmountOf(types.DmDenom)) +} diff --git a/x/oracle/keeper/slash.go b/x/oracle/keeper/slash.go new file mode 100644 index 0000000..4927759 --- /dev/null +++ b/x/oracle/keeper/slash.go @@ -0,0 +1,116 @@ +package keeper + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DaevMithran/dmchain/util" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// SlashAndResetMissCounters iterates over all the current missed counters and +// calculates the "valid vote rate" as: +// (possibleWinsPerSlashWindow - missCounter)/possibleWinsPerSlashWindow. +// +// If the valid vote rate is below the minValidPerWindow, the validator will be +// slashed and jailed. +func (k Keeper) SlashAndResetMissCounters(ctx sdk.Context) { + possibleWins := k.PossibleWinsPerSlashWindow(ctx) + minValidRate := k.MinValidPerWindow(ctx) + + distributionHeight := ctx.BlockHeight() - sdk.ValidatorUpdateDelay - 1 + slashFraction := k.SlashFraction(ctx) + powerReduction := k.StakingKeeper.PowerReduction(ctx) + + k.IterateMissCounters(ctx, func(operator sdk.ValAddress, missCount uint64) bool { + k.evaluateAndSlashIfNeeded(ctx, operator, missCount, possibleWins, minValidRate, distributionHeight, slashFraction, powerReduction) + k.DeleteMissCounter(ctx, operator) + return false + }) +} + +func (k Keeper) evaluateAndSlashIfNeeded( + ctx sdk.Context, + operator sdk.ValAddress, + missCount uint64, + possibleWinsPerSlashWindow int64, + minValidRate math.LegacyDec, + distributionHeight int64, + slashFraction math.LegacyDec, + powerReduction math.Int, +) { + validVotes := math.NewInt(possibleWinsPerSlashWindow - util.SafeUint64ToInt64(missCount)) + validRate := math.LegacyNewDecFromInt(validVotes).QuoInt64(possibleWinsPerSlashWindow) + + if !validRate.LT(minValidRate) { + return // Validator is safe + } + + oracleParams := k.GetParams(ctx) + + validator, err := k.StakingKeeper.Validator(ctx, operator) + if err != nil || !validator.IsBonded() || validator.IsJailed() || !oracleParams.SlashingEnabled { + return // Cannot slash or jail this validator + } + + consAddr, err := validator.GetConsAddr() + if err != nil { + panic(err) + } + + if _, err := k.StakingKeeper.Slash( + ctx, + consAddr, + distributionHeight, + validator.GetConsensusPower(powerReduction), + slashFraction, + ); err != nil { + panic(err) + } + + if err := k.StakingKeeper.Jail(ctx, consAddr); err != nil { + panic(err) + } +} + +// PossibleWinsPerSlashWindow returns the total number of possible correct votes +// that a validator can have per asset multiplied by the number of vote +// periods in the slash window +func (k Keeper) PossibleWinsPerSlashWindow(ctx sdk.Context) int64 { + slashWindow := util.SafeUint64ToInt64(k.SlashWindow(ctx)) + votePeriod := util.SafeUint64ToInt64(k.VotePeriod(ctx)) + + votePeriodsPerWindow := math.LegacyNewDec(slashWindow).QuoInt64(votePeriod).TruncateInt64() + numberOfAssets := int64(len(k.GetParams(ctx).MandatoryList)) + + return (votePeriodsPerWindow * numberOfAssets) +} + +// SetValidatorRewardSet will take all the current validators and store them +// in the ValidatorRewardSet to earn rewards in the current Slash Window. +func (k Keeper) SetValidatorRewardSet(ctx sdk.Context) error { + validatorRewardSet := types.ValidatorRewardSet{ + ValidatorSet: []string{}, + } + vals, err := k.StakingKeeper.GetBondedValidatorsByPower(ctx) + if err != nil { + return err + } + for _, v := range vals { + addr := v.GetOperator() + validatorRewardSet.ValidatorSet = append(validatorRewardSet.ValidatorSet, addr) + } + + k.ValidatorRewardSet.Set(ctx, validatorRewardSet) + return nil +} + +// CurrentValidatorRewardSet returns the latest ValidatorRewardSet in the store. +func (k Keeper) GetValidatorRewardSet(ctx sdk.Context) types.ValidatorRewardSet { + val, err := k.ValidatorRewardSet.Get(ctx) + if err != nil { + return types.ValidatorRewardSet{} + } + + return val +} diff --git a/x/oracle/keeper/slash_test.go b/x/oracle/keeper/slash_test.go new file mode 100644 index 0000000..3664c01 --- /dev/null +++ b/x/oracle/keeper/slash_test.go @@ -0,0 +1,145 @@ +package keeper_test + +import ( + "cosmossdk.io/math" + "github.com/DaevMithran/dmchain/x/oracle/types" + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +func (s *IntegrationTestSuite) TestSlashAndResetMissCounters() { + initialTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + validator, err := s.app.StakingKeeper.Validator(s.ctx, valAddr) + p := s.app.OracleKeeper.GetParams(s.ctx) + p.SlashingEnabled = true + s.app.OracleKeeper.SetParams(s.ctx, p) + s.Require().NoError(err) + s.Require().Equal(initialTokens, validator.GetBondedTokens()) + + var ( + slashFraction = s.app.OracleKeeper.SlashFraction(s.ctx) + possibleWinsPerSlashWindow = s.app.OracleKeeper.PossibleWinsPerSlashWindow(s.ctx) + minValidPerWindow = s.app.OracleKeeper.MinValidPerWindow(s.ctx) + minValidVotes = minValidPerWindow.MulInt64(possibleWinsPerSlashWindow).TruncateInt() + maxMissesBeforeSlash = math.NewInt(possibleWinsPerSlashWindow).Sub(minValidVotes).Uint64() + ) + + testCases := []struct { + name string + missCounter uint64 + status stakingtypes.BondStatus + jailedBefore bool + jailedAfter bool + slashed bool + }{ + { + name: "bonded validator above minValidVotes", + missCounter: maxMissesBeforeSlash, + status: stakingtypes.Bonded, + jailedBefore: false, + jailedAfter: false, + slashed: false, + }, + { + name: "bonded validator below minValidVotes", + missCounter: maxMissesBeforeSlash + 1, + status: stakingtypes.Bonded, + jailedBefore: false, + jailedAfter: true, + slashed: true, + }, + { + name: "unBonded validator below minValidVotes", + missCounter: maxMissesBeforeSlash + 1, + status: stakingtypes.Unbonded, + jailedBefore: false, + jailedAfter: false, + slashed: false, + }, + { + name: "jailed validator below minValidVotes", + missCounter: maxMissesBeforeSlash + 1, + status: stakingtypes.Bonded, + jailedBefore: true, + jailedAfter: true, + slashed: false, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + validator, _ := s.app.StakingKeeper.GetValidator(s.ctx, valAddr) + validator.Status = tc.status + validator.Jailed = tc.jailedBefore + validator.Tokens = initialTokens + err = s.app.StakingKeeper.SetValidator(s.ctx, validator) + s.Require().NoError(err) + + s.app.OracleKeeper.SetMissCounter(s.ctx, valAddr, tc.missCounter) + s.app.OracleKeeper.SlashAndResetMissCounters(s.ctx) + + expectedTokens := initialTokens + if tc.slashed { + expectedTokens = initialTokens.Sub(slashFraction.MulInt(initialTokens).TruncateInt()) + } + + validator, _ = s.app.StakingKeeper.GetValidator(s.ctx, valAddr) + s.Require().Equal(expectedTokens, validator.Tokens) + s.Require().Equal(tc.jailedAfter, validator.Jailed) + }) + } +} + +func (s *IntegrationTestSuite) TestPossibleWinsPerSlashWindow() { + atomDenom := types.Denom{BaseDenom: "atom", SymbolDenom: "ATOM"} + umeeDenom := types.Denom{BaseDenom: "umee", SymbolDenom: "UMEE"} + + testCases := []struct { + name string + votePeriod uint64 + slashWindow uint64 + mandatoryList types.DenomList + possibleWinsPerSlashWindow int64 + }{ + { + name: "multiple denoms in mandatory list", + votePeriod: 5, + slashWindow: 15, + mandatoryList: types.DenomList{atomDenom, umeeDenom}, + possibleWinsPerSlashWindow: 6, + }, + { + name: "no denoms in mandatory list", + votePeriod: 5, + slashWindow: 15, + mandatoryList: types.DenomList{}, + possibleWinsPerSlashWindow: 0, + }, + { + name: "single denom in mandatory list", + votePeriod: 2, + slashWindow: 10, + mandatoryList: types.DenomList{atomDenom}, + possibleWinsPerSlashWindow: 5, + }, + { + name: "vote period is 1", + votePeriod: 1, + slashWindow: 10, + mandatoryList: types.DenomList{atomDenom}, + possibleWinsPerSlashWindow: 10, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + params := types.DefaultParams() + params.VotePeriod = tc.votePeriod + params.SlashWindow = tc.slashWindow + params.MandatoryList = tc.mandatoryList + s.app.OracleKeeper.SetParams(s.ctx, params) + actual := s.app.OracleKeeper.PossibleWinsPerSlashWindow(s.ctx) + s.Require().Equal(tc.possibleWinsPerSlashWindow, actual) + }) + } +} diff --git a/x/oracle/module.go b/x/oracle/module.go new file mode 100755 index 0000000..76b3637 --- /dev/null +++ b/x/oracle/module.go @@ -0,0 +1,191 @@ +package module + +import ( + "context" + "encoding/json" + + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + + abci "github.com/cometbft/cometbft/abci/types" + + "cosmossdk.io/client/v2/autocli" + errorsmod "cosmossdk.io/errors" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + + "github.com/DaevMithran/dmchain/x/multisig/client/cli" + oracleabci "github.com/DaevMithran/dmchain/x/oracle/abci" + "github.com/DaevMithran/dmchain/x/oracle/keeper" + simulation "github.com/DaevMithran/dmchain/x/oracle/simulations" + "github.com/DaevMithran/dmchain/x/oracle/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" +) + +const ( + // ConsensusVersion defines the current x/oracle module consensus version. + ConsensusVersion = 1 +) + +var ( + _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleGenesis = AppModule{} + _ module.AppModule = AppModule{} + + _ autocli.HasAutoCLIConfig = AppModule{} +) + +// AppModuleBasic defines the basic application module used by the wasm module. +type AppModuleBasic struct { + cdc codec.Codec +} + +type AppModule struct { + AppModuleBasic + + keeper keeper.Keeper + accountKeeper types.AccountKeeper + bankKeeper bankkeeper.Keeper +} + +// NewAppModule constructor +func NewAppModule( + cdc codec.Codec, + keeper keeper.Keeper, + accountKeeper types.AccountKeeper, + bankKeeper bankkeeper.Keeper, +) *AppModule { + return &AppModule{ + AppModuleBasic: AppModuleBasic{cdc: cdc}, + keeper: keeper, + accountKeeper: accountKeeper, + bankKeeper: bankKeeper, + } +} + +func (a AppModuleBasic) Name() string { + return types.ModuleName +} + +func (a AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(&types.GenesisState{ + Params: types.DefaultParams(), + }) +} + +func (a AppModuleBasic) ValidateGenesis(marshaler codec.JSONCodec, _ client.TxEncodingConfig, message json.RawMessage) error { + var data types.GenesisState + err := marshaler.UnmarshalJSON(message, &data) + if err != nil { + return err + } + if err := data.Params.Validate(); err != nil { + return errorsmod.Wrap(err, "params") + } + return nil +} + +func (a AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) { +} + +func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { + err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err != nil { + // same behavior as in cosmos-sdk + panic(err) + } +} + +// Disable in favor of autocli.go. If you wish to use these, it will override AutoCLI methods. + +func (a AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.NewTxCmd() +} + +func (a AppModuleBasic) GetQueryCmd() *cobra.Command { + return cli.GetQueryCmd() +} + +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + types.RegisterLegacyAminoCodec(cdc) +} + +func (a AppModuleBasic) RegisterInterfaces(r codectypes.InterfaceRegistry) { + types.RegisterInterfaces(r) +} + +func (a AppModule) InitGenesis(ctx sdk.Context, marshaler codec.JSONCodec, message json.RawMessage) []abci.ValidatorUpdate { + var genesisState types.GenesisState + + marshaler.MustUnmarshalJSON(message, &genesisState) + InitGenesis(ctx, a.keeper, genesisState) + + return nil +} + +func (a AppModule) ExportGenesis(ctx sdk.Context, marshaler codec.JSONCodec) json.RawMessage { + genState := ExportGenesis(ctx, a.keeper) + return marshaler.MustMarshalJSON(genState) +} + +func (a AppModule) RegisterInvariants(_ sdk.InvariantRegistry) { +} + +func (a AppModule) QuerierRoute() string { + return types.QuerierRoute +} + +func (a AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(a.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(a.keeper)) +} + +// ConsensusVersion is a sequence number for state-breaking change of the +// module. It should be incremented on each consensus-breaking change +// introduced by the module. To avoid wrong/empty versions, the initial version +// should be set to 1. +func (a AppModule) ConsensusVersion() uint64 { + return ConsensusVersion +} + +// BeginBlock executes all ABCI BeginBlock logic respective to the x/oracle module. +func (a AppModule) BeginBlock(_ context.Context) {} + +// EndBlock executes all ABCI EndBlock logic respective to the x/oracle module. +// It returns no validator updates. +func (a AppModule) EndBlock(ctx context.Context) ([]abci.ValidatorUpdate, error) { + if err := oracleabci.EndBlocker(ctx, a.keeper); err != nil { + panic(err) + } + + return []abci.ValidatorUpdate{}, nil +} + +// GenerateGenesisState creates a randomized GenState of the distribution module. +func (AppModule) GenerateGenesisState(simState *module.SimulationState) { + simulation.RandomizedGenState(simState) +} + +// WeightedOperations returns the all the oracle module operations with their respective weights. +func (a AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { + return simulation.WeightedOperations( + simState.AppParams, a.accountKeeper, a.bankKeeper, a.keeper, + ) +} + +// ProposalContents returns all the oracle content functions used to +// simulate governance proposals. +func (am AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { + return nil +} + +// RegisterStoreDecoder registers a decoder for oracle module's types +func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) { + sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) +} diff --git a/x/oracle/simulations/decoder.go b/x/oracle/simulations/decoder.go new file mode 100644 index 0000000..49c84b7 --- /dev/null +++ b/x/oracle/simulations/decoder.go @@ -0,0 +1,52 @@ +package simulation + +import ( + "bytes" + "fmt" + + gogotypes "github.com/cosmos/gogoproto/types" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/kv" + + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// NewDecodeStore returns a decoder function closure that unmarshals the KVPair's +// Value to the corresponding oracle type. +func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string { + return func(kvA, kvB kv.Pair) string { + switch { + case bytes.Equal(kvA.Key[:1], types.KeyPrefixExchangeRate): + var exchangeRateA, exchangeRateB sdk.DecProto + cdc.MustUnmarshal(kvA.Value, &exchangeRateA) + cdc.MustUnmarshal(kvB.Value, &exchangeRateB) + return fmt.Sprintf("%v\n%v", exchangeRateA, exchangeRateB) + + case bytes.Equal(kvA.Key[:1], types.KeyPrefixFeederDelegation): + return fmt.Sprintf("%v\n%v", sdk.AccAddress(kvA.Value), sdk.AccAddress(kvB.Value)) + + case bytes.Equal(kvA.Key[:1], types.KeyPrefixMissCounter): + var counterA, counterB gogotypes.UInt64Value + cdc.MustUnmarshal(kvA.Value, &counterA) + cdc.MustUnmarshal(kvB.Value, &counterB) + return fmt.Sprintf("%v\n%v", counterA.Value, counterB.Value) + + case bytes.Equal(kvA.Key[:1], types.KeyPrefixAggregateExchangeRatePrevote): + var prevoteA, prevoteB types.AggregateExchangeRatePrevote + cdc.MustUnmarshal(kvA.Value, &prevoteA) + cdc.MustUnmarshal(kvB.Value, &prevoteB) + return fmt.Sprintf("%v\n%v", prevoteA, prevoteB) + + case bytes.Equal(kvA.Key[:1], types.KeyPrefixAggregateExchangeRateVote): + var voteA, voteB types.AggregateExchangeRateVote + cdc.MustUnmarshal(kvA.Value, &voteA) + cdc.MustUnmarshal(kvB.Value, &voteB) + return fmt.Sprintf("%v\n%v", voteA, voteB) + + default: + panic(fmt.Sprintf("invalid oracle key prefix %X", kvA.Key[:1])) + } + } +} diff --git a/x/oracle/simulations/genesis.go b/x/oracle/simulations/genesis.go new file mode 100644 index 0000000..19ac409 --- /dev/null +++ b/x/oracle/simulations/genesis.go @@ -0,0 +1,193 @@ +package simulation + +import ( + "encoding/json" + "fmt" + "math/rand" + + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/types/module" + + "github.com/DaevMithran/dmchain/util" + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +// Simulation parameter constants +const ( + votePeriodKey = "vote_period" + voteThresholdKey = "vote_threshold" + rewardBandsKey = "reward_bands" + rewardDistributionWindowKey = "reward_distribution_window" + slashFractionKey = "slash_fraction" + slashWindowKey = "slash_window" + minValidPerWindowKey = "min_valid_per_window" + historicStampPeriodKey = "historic_stamp_period" + medianStampPeriodKey = "median_stamp_period" + maximumPriceStampsKey = "maximum_price_stamps" + maximumMedianStampsKey = "maximum_median_stamps" +) + +// GenVotePeriod produces a randomized VotePeriod in the range of [5, 100] +func GenVotePeriod(r *rand.Rand) uint64 { + return util.SafeIntToUint64(5 + r.Intn(100)) +} + +// GenVoteThreshold produces a randomized VoteThreshold in the range of [0.34, 0.67] +func GenVoteThreshold(r *rand.Rand) math.LegacyDec { + return math.LegacyNewDecWithPrec(34, 2).Add(math.LegacyNewDecWithPrec(int64(r.Intn(33)), 2)) +} + +// GenRewardBand produces a randomized RewardBand in the range of [0.000, 0.100] +func GenRewardBand(r *rand.Rand) math.LegacyDec { + return math.LegacyZeroDec().Add(math.LegacyNewDecWithPrec(int64(r.Intn(100)), 3)) +} + +// GenRewardDistributionWindow produces a randomized RewardDistributionWindow in the range of [100, 100000] +func GenRewardDistributionWindow(r *rand.Rand) uint64 { + return util.SafeIntToUint64(100 + r.Intn(100000)) +} + +// GenSlashFraction produces a randomized SlashFraction in the range of [0.000, 0.100] +func GenSlashFraction(r *rand.Rand) math.LegacyDec { + return math.LegacyZeroDec().Add(math.LegacyNewDecWithPrec(int64(r.Intn(100)), 3)) +} + +// GenSlashWindow produces a randomized SlashWindow in the range of [100, 100000] +func GenSlashWindow(r *rand.Rand) uint64 { + return util.SafeIntToUint64(100 + r.Intn(100000)) +} + +// GenMinValidPerWindow produces a randomized MinValidPerWindow in the range of [0, 0.500] +func GenMinValidPerWindow(r *rand.Rand) math.LegacyDec { + return math.LegacyZeroDec().Add(math.LegacyNewDecWithPrec(int64(r.Intn(500)), 3)) +} + +// GenHistoricStampPeriod produces a randomized HistoricStampPeriod in the range of [100, 1000] +func GenHistoricStampPeriod(r *rand.Rand) uint64 { + return util.SafeIntToUint64(100 + r.Intn(1000)) +} + +// GenMedianStampPeriod produces a randomized MedianStampPeriod in the range of [100, 1000] +func GenMedianStampPeriod(r *rand.Rand) uint64 { + return util.SafeIntToUint64(10001 + r.Intn(100000)) +} + +// GenMaximumPriceStamps produces a randomized MaximumPriceStamps in the range of [10, 100] +func GenMaximumPriceStamps(r *rand.Rand) uint64 { + return util.SafeIntToUint64(11 + r.Intn(100)) +} + +// GenMaximumMedianStamps produces a randomized MaximumMedianStamps in the range of [10, 100] +func GenMaximumMedianStamps(r *rand.Rand) uint64 { + return util.SafeIntToUint64(11 + r.Intn(100)) +} + +// RandomizedGenState generates a random GenesisState for oracle +func RandomizedGenState(simState *module.SimulationState) { + oracleGenesis := types.DefaultGenesisState() + + var votePeriod uint64 + simState.AppParams.GetOrGenerate( + votePeriodKey, &votePeriod, simState.Rand, + func(r *rand.Rand) { votePeriod = GenVotePeriod(r) }, + ) + + var voteThreshold math.LegacyDec + simState.AppParams.GetOrGenerate( + voteThresholdKey, &voteThreshold, simState.Rand, + func(r *rand.Rand) { voteThreshold = GenVoteThreshold(r) }, + ) + + var rewardBands types.RewardBandList + simState.AppParams.GetOrGenerate( + rewardBandsKey, &rewardBands, simState.Rand, + func(r *rand.Rand) { + for _, denom := range oracleGenesis.Params.MandatoryList { + rb := types.RewardBand{ + RewardBand: GenRewardBand(r), + SymbolDenom: denom.SymbolDenom, + } + rewardBands = append(rewardBands, rb) + } + for _, denom := range oracleGenesis.Params.AcceptList { + rb := types.RewardBand{ + RewardBand: GenRewardBand(r), + SymbolDenom: denom.SymbolDenom, + } + rewardBands = append(rewardBands, rb) + } + }, + ) + + var rewardDistributionWindow uint64 + simState.AppParams.GetOrGenerate( + rewardDistributionWindowKey, &rewardDistributionWindow, simState.Rand, + func(r *rand.Rand) { rewardDistributionWindow = GenRewardDistributionWindow(r) }, + ) + + var slashFraction math.LegacyDec + simState.AppParams.GetOrGenerate( + slashFractionKey, &slashFraction, simState.Rand, + func(r *rand.Rand) { slashFraction = GenSlashFraction(r) }, + ) + + var slashWindow uint64 + simState.AppParams.GetOrGenerate( + slashWindowKey, &slashWindow, simState.Rand, + func(r *rand.Rand) { slashWindow = GenSlashWindow(r) }, + ) + + var minValidPerWindow math.LegacyDec + simState.AppParams.GetOrGenerate( + minValidPerWindowKey, &minValidPerWindow, simState.Rand, + func(r *rand.Rand) { minValidPerWindow = GenMinValidPerWindow(r) }, + ) + + var historicStampPeriod uint64 + simState.AppParams.GetOrGenerate( + historicStampPeriodKey, &historicStampPeriod, simState.Rand, + func(r *rand.Rand) { historicStampPeriod = GenHistoricStampPeriod(r) }, + ) + + var medianStampPeriod uint64 + simState.AppParams.GetOrGenerate( + medianStampPeriodKey, &medianStampPeriod, simState.Rand, + func(r *rand.Rand) { medianStampPeriod = GenMedianStampPeriod(r) }, + ) + + var maximumPriceStamps uint64 + simState.AppParams.GetOrGenerate( + maximumPriceStampsKey, &maximumPriceStamps, simState.Rand, + func(r *rand.Rand) { maximumPriceStamps = GenMaximumPriceStamps(r) }, + ) + + var maximumMedianStamps uint64 + simState.AppParams.GetOrGenerate( + maximumMedianStampsKey, &maximumMedianStamps, simState.Rand, + func(r *rand.Rand) { maximumMedianStamps = GenMaximumMedianStamps(r) }, + ) + + oracleGenesis.Params = types.Params{ + VotePeriod: votePeriod, + VoteThreshold: voteThreshold, + RewardBands: rewardBands, + RewardDistributionWindow: rewardDistributionWindow, + AcceptList: types.DenomList{ + {SymbolDenom: types.DmSymbol, BaseDenom: types.DmDenom}, + }, + SlashFraction: slashFraction, + SlashWindow: slashWindow, + MinValidPerWindow: minValidPerWindow, + HistoricStampPeriod: historicStampPeriod, + MedianStampPeriod: medianStampPeriod, + MaximumPriceStamps: historicStampPeriod, + MaximumMedianStamps: historicStampPeriod, + } + + bz, err := json.MarshalIndent(&oracleGenesis.Params, "", " ") + if err != nil { + panic(err) + } + fmt.Printf("Selected randomly generated oracle parameters:\n%s\n", bz) + simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(oracleGenesis) +} diff --git a/x/oracle/simulations/operations.go b/x/oracle/simulations/operations.go new file mode 100644 index 0000000..9693cfb --- /dev/null +++ b/x/oracle/simulations/operations.go @@ -0,0 +1,243 @@ +package simulation + +import ( + "fmt" + "math/rand" + "sort" + "strings" + + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + "github.com/cosmos/cosmos-sdk/x/simulation" + + "github.com/DaevMithran/dmchain/util" + ojosim "github.com/DaevMithran/dmchain/util/sim" + "github.com/DaevMithran/dmchain/x/oracle/keeper" + "github.com/DaevMithran/dmchain/x/oracle/types" + "github.com/cosmos/cosmos-sdk/types/module/testutil" +) + +// Simulation operation weights constants +const ( + OpWeightMsgAggregateExchangeRatePrevote = "op_weight_msg_exchange_rate_aggregate_prevote" //nolint: gosec + OpWeightMsgAggregateExchangeRateVote = "op_weight_msg_exchange_rate_aggregate_vote" //nolint: gosec + OpWeightMsgDelegateFeedConsent = "op_weight_msg_exchange_feed_consent" //nolint: gosec + + salt = "89b8164ca0b4b8703ae9ab25962f3dd6d1de5d656f5442971a93b2ca7893f654" +) + +var ( + acceptList = []string{types.DmSymbol, types.USDSymbol} + ojoPrice = math.LegacyMustNewDecFromStr("25.71") +) + +// GenerateExchangeRatesString generates a canonical string representation of +// the aggregated exchange rates. +func GenerateExchangeRatesString(prices map[string]math.LegacyDec) string { + exchangeRates := make([]string, len(prices)) + i := 0 + + // aggregate exchange rates as ":" + for base, avgPrice := range prices { + exchangeRates[i] = fmt.Sprintf("%s:%s", base, avgPrice.String()) + i++ + } + + sort.Strings(exchangeRates) + + return strings.Join(exchangeRates, ",") +} + +// WeightedOperations returns all the operations from the module with their respective weights +func WeightedOperations( + appParams simtypes.AppParams, + ak types.AccountKeeper, + bk bankkeeper.Keeper, + k keeper.Keeper, +) simulation.WeightedOperations { + var ( + weightMsgAggregateExchangeRatePrevote int + weightMsgAggregateExchangeRateVote int + weightMsgDelegateFeedConsent int + voteHashMap = make(map[string]string) + ) + + appParams.GetOrGenerate(OpWeightMsgAggregateExchangeRatePrevote, &weightMsgAggregateExchangeRatePrevote, nil, + func(_ *rand.Rand) { + weightMsgAggregateExchangeRatePrevote = ojosim.DefaultWeightMsgSend * 2 + }, + ) + + appParams.GetOrGenerate(OpWeightMsgAggregateExchangeRateVote, &weightMsgAggregateExchangeRateVote, nil, + func(_ *rand.Rand) { + weightMsgAggregateExchangeRateVote = ojosim.DefaultWeightMsgSend * 2 + }, + ) + + appParams.GetOrGenerate(OpWeightMsgDelegateFeedConsent, &weightMsgDelegateFeedConsent, nil, + func(_ *rand.Rand) { + weightMsgDelegateFeedConsent = ojosim.DefaultWeightMsgSetWithdrawAddress + }, + ) + + return simulation.WeightedOperations{ + simulation.NewWeightedOperation( + weightMsgAggregateExchangeRatePrevote, + SimulateMsgAggregateExchangeRatePrevote(ak, bk, k, voteHashMap), + ), + simulation.NewWeightedOperation( + weightMsgAggregateExchangeRateVote, + SimulateMsgAggregateExchangeRateVote(ak, bk, k, voteHashMap), + ), + simulation.NewWeightedOperation( + weightMsgDelegateFeedConsent, + SimulateMsgDelegateFeedConsent(ak, bk, k), + ), + } +} + +// SimulateMsgAggregateExchangeRatePrevote generates a MsgAggregateExchangeRatePrevote with random values. +func SimulateMsgAggregateExchangeRatePrevote( + ak types.AccountKeeper, + bk bankkeeper.Keeper, + k keeper.Keeper, + voteHashMap map[string]string, +) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simAccount := accs[1] // , _ := simtypes.RandomAcc(r, accs) + address := sdk.ValAddress(simAccount.Address) + noop := func(comment string) simtypes.OperationMsg { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(new(types.MsgAggregateExchangeRatePrevote)), comment) + } + + // ensure the validator exists + val, err := k.StakingKeeper.Validator(ctx, address) + if val == nil || !val.IsBonded() || err != nil { + return noop("unable to find validator"), nil, nil + } + + // check for an existing prevote + _, err = k.GetAggregateExchangeRatePrevote(ctx, address) + if err == nil { + return noop("prevote already exists for this validator"), nil, nil + } + + prices := make(map[string]math.LegacyDec, len(acceptList)) + for _, denom := range acceptList { + prices[denom] = ojoPrice.Add(simtypes.RandomDecAmount(r, math.LegacyNewDec(1))) + } + + exchangeRatesStr := GenerateExchangeRatesString(prices) + voteHash := types.GetAggregateVoteHash(salt, exchangeRatesStr, address) + feederAddr, _ := k.GetFeederDelegation(ctx, address) + feederSimAccount, _ := simtypes.FindAccount(accs, feederAddr) + msg := types.NewMsgAggregateExchangeRatePrevote(voteHash, feederAddr, address) + voteHashMap[address.String()] = exchangeRatesStr + + return deliver(r, app, ctx, ak, bk, feederSimAccount, msg, nil) + } +} + +// SimulateMsgAggregateExchangeRateVote generates a MsgAggregateExchangeRateVote with random values. +func SimulateMsgAggregateExchangeRateVote( + ak types.AccountKeeper, + bk bankkeeper.Keeper, + k keeper.Keeper, + voteHashMap map[string]string, +) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simAccount, _ := simtypes.RandomAcc(r, accs) + address := sdk.ValAddress(simAccount.Address) + noop := func(comment string) simtypes.OperationMsg { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(new(types.MsgAggregateExchangeRateVote)), comment) + } + + // ensure the validator exists + val, err := k.StakingKeeper.Validator(ctx, address) + if val == nil || !val.IsBonded() || err != nil { + return noop("unable to find validator"), nil, nil + } + + // ensure vote hash exists + exchangeRatesStr, ok := voteHashMap[address.String()] + if !ok { + return noop("vote hash does not exist"), nil, nil + } + + // get prevote + prevote, err := k.GetAggregateExchangeRatePrevote(ctx, address) + if err != nil { + return noop("prevote not found"), nil, nil + } + + params := k.GetParams(ctx) + if (util.SafeInt64ToUint64(ctx.BlockHeight())/params.VotePeriod)-(prevote.SubmitBlock/params.VotePeriod) != 1 { + return noop("reveal period of submitted vote does not match with registered prevote"), nil, nil + } + + feederAddr, _ := k.GetFeederDelegation(ctx, address) + feederSimAccount, _ := simtypes.FindAccount(accs, feederAddr) + msg := types.NewMsgAggregateExchangeRateVote(salt, exchangeRatesStr, feederAddr, address) + + return deliver(r, app, ctx, ak, bk, feederSimAccount, msg, nil) + } +} + +// SimulateMsgDelegateFeedConsent generates a MsgDelegateFeedConsent with random values. +func SimulateMsgDelegateFeedConsent(ak types.AccountKeeper, bk bankkeeper.Keeper, k keeper.Keeper) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simAccount, _ := simtypes.RandomAcc(r, accs) + delegateAccount, _ := simtypes.RandomAcc(r, accs) + valAddress := sdk.ValAddress(simAccount.Address) + delegateValAddress := sdk.ValAddress(delegateAccount.Address) + noop := func(comment string) simtypes.OperationMsg { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(new(types.MsgDelegateFeedConsent)), comment) + } + + // ensure the validator exists + val, err := k.StakingKeeper.Validator(ctx, valAddress) + if val == nil || err != nil { + return noop("unable to find validator"), nil, nil + } + + // ensure the target address is not a validator + val2, err := k.StakingKeeper.Validator(ctx, delegateValAddress) + if val2 != nil || err != nil { + return noop("unable to delegate to validator"), nil, nil + } + + msg := types.NewMsgDelegateFeedConsent(valAddress, delegateAccount.Address) + return deliver(r, app, ctx, ak, bk, simAccount, msg, nil) + } +} + +func deliver(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, ak simulation.AccountKeeper, + bk bankkeeper.Keeper, from simtypes.Account, msg sdk.Msg, coins sdk.Coins, +) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + cfg := testutil.MakeTestEncodingConfig() + o := simulation.OperationInput{ + R: r, + App: app, + TxGen: cfg.TxConfig, + Cdc: cfg.Codec.(*codec.ProtoCodec), + Msg: msg, + Context: ctx, + SimAccount: from, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + CoinsSpentInMsg: coins, + } + + return ojosim.GenAndDeliver(bk, o, 200000*50) // TODO: replace 10 to default Gas limit +} diff --git a/x/oracle/types/abci.pb.go b/x/oracle/types/abci.pb.go new file mode 100644 index 0000000..5ab4530 --- /dev/null +++ b/x/oracle/types/abci.pb.go @@ -0,0 +1,587 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: oracle/v1/abci.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// OracleVoteExtension defines the vote extension structure used by the oracle +// module. +type OracleVoteExtension struct { + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + ExchangeRates github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=exchange_rates,json=exchangeRates,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"exchange_rates"` +} + +func (m *OracleVoteExtension) Reset() { *m = OracleVoteExtension{} } +func (m *OracleVoteExtension) String() string { return proto.CompactTextString(m) } +func (*OracleVoteExtension) ProtoMessage() {} +func (*OracleVoteExtension) Descriptor() ([]byte, []int) { + return fileDescriptor_856689fa5a9d76d9, []int{0} +} +func (m *OracleVoteExtension) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OracleVoteExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OracleVoteExtension.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OracleVoteExtension) XXX_Merge(src proto.Message) { + xxx_messageInfo_OracleVoteExtension.Merge(m, src) +} +func (m *OracleVoteExtension) XXX_Size() int { + return m.Size() +} +func (m *OracleVoteExtension) XXX_DiscardUnknown() { + xxx_messageInfo_OracleVoteExtension.DiscardUnknown(m) +} + +var xxx_messageInfo_OracleVoteExtension proto.InternalMessageInfo + +// InjectedVoteExtensionTx defines the vote extension tx injected by the prepare +// proposal handler. +type InjectedVoteExtensionTx struct { + ExchangeRateVotes []AggregateExchangeRateVote `protobuf:"bytes,1,rep,name=exchange_rate_votes,json=exchangeRateVotes,proto3" json:"exchange_rate_votes"` + ExtendedCommitInfo []byte `protobuf:"bytes,2,opt,name=extended_commit_info,json=extendedCommitInfo,proto3" json:"extended_commit_info,omitempty"` +} + +func (m *InjectedVoteExtensionTx) Reset() { *m = InjectedVoteExtensionTx{} } +func (m *InjectedVoteExtensionTx) String() string { return proto.CompactTextString(m) } +func (*InjectedVoteExtensionTx) ProtoMessage() {} +func (*InjectedVoteExtensionTx) Descriptor() ([]byte, []int) { + return fileDescriptor_856689fa5a9d76d9, []int{1} +} +func (m *InjectedVoteExtensionTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *InjectedVoteExtensionTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_InjectedVoteExtensionTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *InjectedVoteExtensionTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_InjectedVoteExtensionTx.Merge(m, src) +} +func (m *InjectedVoteExtensionTx) XXX_Size() int { + return m.Size() +} +func (m *InjectedVoteExtensionTx) XXX_DiscardUnknown() { + xxx_messageInfo_InjectedVoteExtensionTx.DiscardUnknown(m) +} + +var xxx_messageInfo_InjectedVoteExtensionTx proto.InternalMessageInfo + +func init() { + proto.RegisterType((*OracleVoteExtension)(nil), "oracle.v1.OracleVoteExtension") + proto.RegisterType((*InjectedVoteExtensionTx)(nil), "oracle.v1.InjectedVoteExtensionTx") +} + +func init() { proto.RegisterFile("oracle/v1/abci.proto", fileDescriptor_856689fa5a9d76d9) } + +var fileDescriptor_856689fa5a9d76d9 = []byte{ + // 380 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xcf, 0xaa, 0xd3, 0x40, + 0x14, 0xc6, 0x33, 0xf7, 0xca, 0x05, 0xe3, 0x1f, 0x30, 0xb7, 0x5c, 0xcb, 0x45, 0xe6, 0x16, 0x71, + 0x51, 0x90, 0xce, 0x58, 0xfb, 0x04, 0xb6, 0x75, 0x51, 0x44, 0x84, 0x20, 0x2e, 0xba, 0x09, 0x93, + 0xc9, 0xe9, 0x64, 0xd4, 0xcc, 0x29, 0x99, 0x31, 0xc4, 0xb7, 0xf0, 0x2d, 0x04, 0x9f, 0xa4, 0xcb, + 0x2e, 0x5d, 0xf9, 0xa7, 0x7d, 0x11, 0x99, 0x24, 0xb5, 0xd6, 0x55, 0x26, 0xdf, 0x77, 0xce, 0xf9, + 0x7e, 0x9c, 0x13, 0xf6, 0xb0, 0x14, 0xf2, 0x23, 0xf0, 0x6a, 0xcc, 0x45, 0x2a, 0x35, 0x5b, 0x97, + 0xe8, 0x30, 0xba, 0xdd, 0xaa, 0xac, 0x1a, 0x5f, 0x5f, 0x1d, 0x0b, 0x3a, 0xb1, 0x29, 0xb9, 0xa6, + 0x12, 0x6d, 0x81, 0x96, 0xa7, 0xc2, 0x7a, 0x33, 0x05, 0x27, 0xc6, 0x5c, 0xa2, 0x36, 0x9d, 0xdf, + 0x53, 0xa8, 0xb0, 0x79, 0x72, 0xff, 0x6a, 0xd5, 0xc7, 0x5f, 0x49, 0x78, 0xf9, 0xa6, 0x19, 0xf3, + 0x0e, 0x1d, 0xbc, 0xac, 0x1d, 0x18, 0xab, 0xd1, 0x44, 0x57, 0xe1, 0x45, 0x0e, 0x5a, 0xe5, 0xae, + 0x4f, 0x06, 0x64, 0x78, 0x1e, 0x77, 0x7f, 0x51, 0x1d, 0xde, 0x87, 0x5a, 0xe6, 0xc2, 0x28, 0x48, + 0x4a, 0xe1, 0xc0, 0xf6, 0xcf, 0x06, 0xe7, 0xc3, 0x3b, 0xcf, 0x1f, 0xb1, 0x36, 0x9e, 0xf9, 0x78, + 0xd6, 0xc5, 0xb3, 0x39, 0xc8, 0x19, 0x6a, 0x33, 0x9d, 0x6c, 0x7e, 0xdc, 0x04, 0xdf, 0x7e, 0xde, + 0x3c, 0x55, 0xda, 0xe5, 0x9f, 0x52, 0x26, 0xb1, 0xe0, 0x1d, 0x6e, 0xfb, 0x19, 0xd9, 0xec, 0x03, + 0x77, 0x9f, 0xd7, 0x60, 0x0f, 0x3d, 0x36, 0xbe, 0x77, 0x08, 0x8a, 0x7d, 0x8e, 0x27, 0x7d, 0xb8, + 0x30, 0xef, 0x41, 0x3a, 0xc8, 0x4e, 0x58, 0xdf, 0xd6, 0xd1, 0x32, 0xbc, 0x3c, 0xa1, 0x4a, 0x2a, + 0xf4, 0x68, 0xa4, 0x41, 0x7b, 0xc2, 0xfe, 0x2e, 0x8f, 0xbd, 0x50, 0xaa, 0x04, 0x25, 0x7c, 0xf7, + 0x71, 0xb6, 0x9f, 0x36, 0xbd, 0xe5, 0x11, 0xe3, 0x07, 0xf0, 0x9f, 0x6e, 0xa3, 0x67, 0x61, 0x0f, + 0x7c, 0x54, 0x06, 0x59, 0x22, 0xb1, 0x28, 0xb4, 0x4b, 0xb4, 0x59, 0x61, 0xff, 0x6c, 0x40, 0x86, + 0x77, 0xe3, 0xe8, 0xe0, 0xcd, 0x1a, 0x6b, 0x61, 0x56, 0x38, 0x7d, 0xb5, 0xf9, 0x4d, 0x83, 0xcd, + 0x8e, 0x92, 0xed, 0x8e, 0x92, 0x5f, 0x3b, 0x4a, 0xbe, 0xec, 0x69, 0xb0, 0xdd, 0xd3, 0xe0, 0xfb, + 0x9e, 0x06, 0xcb, 0xd1, 0x3f, 0x3b, 0x98, 0x0b, 0xa8, 0x5e, 0x6b, 0x97, 0x97, 0xc2, 0xf0, 0xac, + 0x90, 0xb9, 0xd0, 0x86, 0xd7, 0xdd, 0x59, 0xdb, 0x75, 0xa4, 0x17, 0xcd, 0x9d, 0x26, 0x7f, 0x02, + 0x00, 0x00, 0xff, 0xff, 0xa9, 0xec, 0x0e, 0x74, 0x18, 0x02, 0x00, 0x00, +} + +func (m *OracleVoteExtension) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OracleVoteExtension) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OracleVoteExtension) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ExchangeRates) > 0 { + for iNdEx := len(m.ExchangeRates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExchangeRates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAbci(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Height != 0 { + i = encodeVarintAbci(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *InjectedVoteExtensionTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InjectedVoteExtensionTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InjectedVoteExtensionTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ExtendedCommitInfo) > 0 { + i -= len(m.ExtendedCommitInfo) + copy(dAtA[i:], m.ExtendedCommitInfo) + i = encodeVarintAbci(dAtA, i, uint64(len(m.ExtendedCommitInfo))) + i-- + dAtA[i] = 0x12 + } + if len(m.ExchangeRateVotes) > 0 { + for iNdEx := len(m.ExchangeRateVotes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExchangeRateVotes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAbci(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintAbci(dAtA []byte, offset int, v uint64) int { + offset -= sovAbci(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *OracleVoteExtension) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovAbci(uint64(m.Height)) + } + if len(m.ExchangeRates) > 0 { + for _, e := range m.ExchangeRates { + l = e.Size() + n += 1 + l + sovAbci(uint64(l)) + } + } + return n +} + +func (m *InjectedVoteExtensionTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ExchangeRateVotes) > 0 { + for _, e := range m.ExchangeRateVotes { + l = e.Size() + n += 1 + l + sovAbci(uint64(l)) + } + } + l = len(m.ExtendedCommitInfo) + if l > 0 { + n += 1 + l + sovAbci(uint64(l)) + } + return n +} + +func sovAbci(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAbci(x uint64) (n int) { + return sovAbci(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *OracleVoteExtension) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAbci + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OracleVoteExtension: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OracleVoteExtension: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAbci + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExchangeRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAbci + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAbci + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAbci + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExchangeRates = append(m.ExchangeRates, types.DecCoin{}) + if err := m.ExchangeRates[len(m.ExchangeRates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAbci(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAbci + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InjectedVoteExtensionTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAbci + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InjectedVoteExtensionTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InjectedVoteExtensionTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExchangeRateVotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAbci + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAbci + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAbci + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExchangeRateVotes = append(m.ExchangeRateVotes, AggregateExchangeRateVote{}) + if err := m.ExchangeRateVotes[len(m.ExchangeRateVotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtendedCommitInfo", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAbci + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAbci + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAbci + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExtendedCommitInfo = append(m.ExtendedCommitInfo[:0], dAtA[iNdEx:postIndex]...) + if m.ExtendedCommitInfo == nil { + m.ExtendedCommitInfo = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAbci(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAbci + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAbci(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAbci + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAbci + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAbci + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthAbci + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAbci + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAbci + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAbci = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAbci = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAbci = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/oracle/types/asset.go b/x/oracle/types/asset.go new file mode 100644 index 0000000..4b55f3c --- /dev/null +++ b/x/oracle/types/asset.go @@ -0,0 +1,60 @@ +package types + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + DmDenom string = "udm" + UsdDenom string = "usd" + DmSymbol string = "DM" + DmExponent = uint32(9) + AtomDenom string = "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9" + AtomSymbol string = "ATOM" + AtomExponent = uint32(6) + BitcoinDenom string = "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9" + BitcoinSymbol string = "BTC" + BitcoinExponent = uint32(18) + EthereumDenom string = "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9" + EthereumSymbol string = "ETH" + EthereumExponent = uint32(18) + USDTDenom string = "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9" + USDTSymbol string = "USDT" + USDTExponent = uint32(18) + USDSymbol string = "USD" + USDCDenom string = "USDC" + USDCSymbol string = "USDC" + USDCExponent = uint32(6) + BlocksPerMinute = uint64(10) + BlocksPerHour = BlocksPerMinute * 60 + BlocksPerDay = BlocksPerHour * 24 + BlocksPerWeek = BlocksPerDay * 7 + BlocksPerMonth = BlocksPerDay * 30 + BlocksPerYear = BlocksPerDay * 365 + MicroUnit = int64(1e6) +) + +type ( + // ExchangeRatePrevote defines a structure to store a validator's prevote on + // the rate of USD in the denom asset. + ExchangeRatePrevote struct { + Hash VoteHash `json:"hash"` // Vote hex hash to protect centralize data source problem + Denom string `json:"denom"` // Ticker symbol of denomination exchanged against USD + Voter sdk.ValAddress `json:"voter"` // Voter validator address + SubmitBlock int64 `json:"submit_block"` // Block height at submission + } + + // ExchangeRateVote defines a structure to store a validator's vote on the + // rate of USD in the denom asset. + ExchangeRateVote struct { + ExchangeRate math.LegacyDec `json:"exchange_rate"` // Exchange rate of a denomination against USD + Denom string `json:"denom"` // Ticker symbol of denomination exchanged against USD + Voter sdk.ValAddress `json:"voter"` // Voter validator address + } + + // VoteHash defines a hash value to hide vote exchange rate which is formatted + // as a HEX string: + // SHA256("{salt}:{symbol}:{exchangeRate},...,{symbol}:{exchangeRate}:{voter}") + VoteHash []byte +) diff --git a/x/oracle/types/ballot.go b/x/oracle/types/ballot.go new file mode 100644 index 0000000..ffc9c45 --- /dev/null +++ b/x/oracle/types/ballot.go @@ -0,0 +1,216 @@ +package types + +import ( + "bytes" + "sort" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// VoteForTally is a convenience wrapper to reduce redundant lookup cost. +type VoteForTally struct { + Denom string + ExchangeRate math.LegacyDec + Voter sdk.ValAddress + Power int64 +} + +// NewVoteForTally returns a new VoteForTally instance. +func NewVoteForTally(rate math.LegacyDec, denom string, voter sdk.ValAddress, power int64) VoteForTally { + return VoteForTally{ + ExchangeRate: rate, + Denom: denom, + Voter: voter, + Power: power, + } +} + +// ExchangeRateBallot is a convenience wrapper around a ExchangeRateVote slice. +type ExchangeRateBallot []VoteForTally + +// ToMap return organized exchange rate map by validator. +func (pb ExchangeRateBallot) ToMap() map[string]math.LegacyDec { + exchangeRateMap := make(map[string]math.LegacyDec) + for _, vote := range pb { + if vote.ExchangeRate.IsPositive() { + exchangeRateMap[vote.Voter.String()] = vote.ExchangeRate + } + } + + return exchangeRateMap +} + +// Power returns the total amount of voting power in the ballot. +func (pb ExchangeRateBallot) Power() int64 { + var totalPower int64 + for _, vote := range pb { + totalPower += vote.Power + } + + return totalPower +} + +// WeightedMedian returns the median weighted by the power of the ExchangeRateVote. +// CONTRACT: The ballot must be sorted. +func (pb ExchangeRateBallot) WeightedMedian() (math.LegacyDec, error) { + if !sort.IsSorted(pb) { + return math.LegacyZeroDec(), ErrBallotNotSorted + } + + if pb.Len() > 0 { + totalPower := pb.Power() + var pivot int64 + for _, v := range pb { + pivot += v.Power + if pivot >= (totalPower / 2) { + return v.ExchangeRate, nil + } + } + } + + return math.LegacyZeroDec(), nil +} + +// StandardDeviation returns the standard deviation by the power of the ExchangeRateVote. +func (pb ExchangeRateBallot) StandardDeviation() (math.LegacyDec, error) { + if len(pb) == 0 { + return math.LegacyZeroDec(), nil + } + + median, err := pb.WeightedMedian() + if err != nil { + return math.LegacyZeroDec(), err + } + + sum := math.LegacyZeroDec() + ballotLength := int64(len(pb)) + for _, v := range pb { + func() { + defer func() { + if e := recover(); e != nil { + ballotLength-- + } + }() + deviation := v.ExchangeRate.Sub(median) + sum = sum.Add(deviation.Mul(deviation)) + }() + } + + variance := sum.QuoInt64(ballotLength) + + standardDeviation, err := variance.ApproxSqrt() + if err != nil { + return math.LegacyZeroDec(), err + } + + return standardDeviation, nil +} + +// Len implements sort.Interface +func (pb ExchangeRateBallot) Len() int { + return len(pb) +} + +// Less reports whether the element with +// index i should sort before the element with index j. +func (pb ExchangeRateBallot) Less(i, j int) bool { + if pb[i].ExchangeRate.LT(pb[j].ExchangeRate) { + return true + } + if pb[i].ExchangeRate.Equal(pb[j].ExchangeRate) { + return bytes.Compare(pb[i].Voter, pb[j].Voter) < 0 + } + return false +} + +// Swap implements sort.Interface. +func (pb ExchangeRateBallot) Swap(i, j int) { + pb[i], pb[j] = pb[j], pb[i] +} + +// BallotDenom is a convenience wrapper for setting rates deterministically. +type BallotDenom struct { + Ballot ExchangeRateBallot + Denom string +} + +// BallotMapToSlice returns an array of sorted exchange rate ballots. +func BallotMapToSlice(votes map[string]ExchangeRateBallot) []BallotDenom { + b := make([]BallotDenom, len(votes)) + i := 0 + for denom, ballot := range votes { + b[i] = BallotDenom{ + Denom: denom, + Ballot: ballot, + } + i++ + } + sort.Slice(b, func(i, j int) bool { + return b[i].Denom < b[j].Denom + }) + return b +} + +// Claim is an interface that directs its rewards to an attached bank account. +type Claim struct { + Power int64 + Weight int64 + MandatoryWinCount int64 + Recipient sdk.ValAddress +} + +// NewClaim generates a Claim instance. +func NewClaim(power, weight, mandatoryWinCount int64, recipient sdk.ValAddress) Claim { + return Claim{ + Power: power, + Weight: weight, + MandatoryWinCount: mandatoryWinCount, + Recipient: recipient, + } +} + +// ClaimMapToSlices returns an array of sorted exchange rate ballots and uses the +// rewardSet to return a second array of claims that are eligible to earn rewards +// in the current Slash Window. +func ClaimMapToSlices(claims map[string]Claim, rewardSet []string) ([]Claim, []Claim) { + rewardMap := rewardSetToMap(rewardSet) + c := make([]Claim, len(claims)) + r := make([]Claim, len(rewardSet)) + i := 0 + j := 0 + for _, claim := range claims { + if _, ok := rewardMap[claim.Recipient.String()]; ok { + r[j] = Claim{ + Power: claim.Power, + Weight: claim.Weight, + MandatoryWinCount: claim.MandatoryWinCount, + Recipient: claim.Recipient, + } + j++ + } + c[i] = Claim{ + Power: claim.Power, + Weight: claim.Weight, + MandatoryWinCount: claim.MandatoryWinCount, + Recipient: claim.Recipient, + } + i++ + } + sort.Slice(c, func(i, j int) bool { + return c[i].Recipient.String() < c[j].Recipient.String() + }) + sort.Slice(r, func(i, j int) bool { + return r[i].Recipient.String() < r[j].Recipient.String() + }) + return c, r +} + +func rewardSetToMap(rewardSet []string) map[string]struct{} { + rewardMap := make(map[string]struct{}) + for _, v := range rewardSet { + rewardMap[v] = struct{}{} + } + + return rewardMap +} diff --git a/x/oracle/types/ballot_test.go b/x/oracle/types/ballot_test.go new file mode 100644 index 0000000..451dda1 --- /dev/null +++ b/x/oracle/types/ballot_test.go @@ -0,0 +1,420 @@ +package types + +import ( + "fmt" + "math" + "sort" + "strconv" + "testing" + + sdkmath "cosmossdk.io/math" + "github.com/cometbft/cometbft/crypto/secp256k1" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" +) + +func TestToMap(t *testing.T) { + tests := struct { + votes []VoteForTally + isValid []bool + }{ + []VoteForTally{ + { + Voter: sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()), + Denom: DmDenom, + ExchangeRate: sdkmath.LegacyNewDec(1600), + Power: 100, + }, + { + Voter: sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()), + Denom: DmDenom, + ExchangeRate: sdkmath.LegacyZeroDec(), + Power: 100, + }, + { + Voter: sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()), + Denom: DmDenom, + ExchangeRate: sdkmath.LegacyNewDec(1500), + Power: 100, + }, + }, + []bool{true, false, true}, + } + + pb := ExchangeRateBallot(tests.votes) + mapData := pb.ToMap() + + for i, vote := range tests.votes { + exchangeRate, ok := mapData[vote.Voter.String()] + if tests.isValid[i] { + require.True(t, ok) + require.Equal(t, exchangeRate, vote.ExchangeRate) + } else { + require.False(t, ok) + } + } +} + +func TestSqrt(t *testing.T) { + num := sdkmath.LegacyNewDecWithPrec(144, 4) + floatNum, err := strconv.ParseFloat(num.String(), 64) + require.NoError(t, err) + + floatNum = math.Sqrt(floatNum) + num, err = sdkmath.LegacyNewDecFromStr(fmt.Sprintf("%f", floatNum)) + require.NoError(t, err) + + require.Equal(t, sdkmath.LegacyNewDecWithPrec(12, 2), num) +} + +func TestPBPower(t *testing.T) { + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, nil) + valAccAddrs, sk := GenerateRandomTestCase() + pb := ExchangeRateBallot{} + ballotPower := int64(0) + + for i := 0; i < len(sk.Validators()); i++ { + val, err := sk.Validator(ctx, valAccAddrs[i]) + require.NoError(t, err) + power := val.GetConsensusPower(sdk.DefaultPowerReduction) + vote := NewVoteForTally( + sdkmath.LegacyZeroDec(), + DmDenom, + valAccAddrs[i], + power, + ) + + pb = append(pb, vote) + require.NotEqual(t, int64(0), vote.Power) + + ballotPower += vote.Power + } + + require.Equal(t, ballotPower, pb.Power()) + + // Mix in a fake validator, the total power should not have changed. + pubKey := secp256k1.GenPrivKey().PubKey() + faceValAddr := sdk.ValAddress(pubKey.Address()) + fakeVote := NewVoteForTally( + sdkmath.LegacyOneDec(), + DmDenom, + faceValAddr, + 0, + ) + + pb = append(pb, fakeVote) + require.Equal(t, ballotPower, pb.Power()) +} + +func TestPBWeightedMedian(t *testing.T) { + tests := []struct { + inputs []int64 + weights []int64 + isValidator []bool + median sdkmath.LegacyDec + errMsg string + }{ + { + // Supermajority one number + []int64{1, 2, 10, 100000}, + []int64{1, 1, 100, 1}, + []bool{true, true, true, true}, + sdkmath.LegacyNewDec(10), + "", + }, + { + // Adding fake validator doesn't change outcome + []int64{1, 2, 10, 100000, 10000000000}, + []int64{1, 1, 100, 1, 10000}, + []bool{true, true, true, true, false}, + sdkmath.LegacyNewDec(10), + "", + }, + { + // Tie votes + []int64{1, 2, 3, 4}, + []int64{1, 100, 100, 1}, + []bool{true, true, true, true}, + sdkmath.LegacyNewDec(2), + "", + }, + { + // No votes + []int64{}, + []int64{}, + []bool{true, true, true, true}, + sdkmath.LegacyNewDec(0), + "", + }, + { + // Out of order + []int64{1, 2, 10, 3}, + []int64{1, 1, 100, 1}, + []bool{true, true, true, true}, + sdkmath.LegacyNewDec(10), + "ballot must be sorted before this operation", + }, + } + + for _, tc := range tests { + pb := ExchangeRateBallot{} + for i, input := range tc.inputs { + valAddr := sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()) + + power := tc.weights[i] + if !tc.isValidator[i] { + power = 0 + } + + vote := NewVoteForTally( + sdkmath.LegacyNewDec(input), + DmDenom, + valAddr, + power, + ) + + pb = append(pb, vote) + } + + median, err := pb.WeightedMedian() + if tc.errMsg == "" { + require.NoError(t, err) + require.Equal(t, tc.median, median) + } else { + require.ErrorContains(t, err, tc.errMsg) + } + } +} + +func TestPBStandardDeviation(t *testing.T) { + tests := []struct { + inputs []sdkmath.LegacyDec + weights []int64 + isValidator []bool + standardDeviation sdkmath.LegacyDec + }{ + { + // Supermajority one number + []sdkmath.LegacyDec{ + sdkmath.LegacyMustNewDecFromStr("1.0"), + sdkmath.LegacyMustNewDecFromStr("2.0"), + sdkmath.LegacyMustNewDecFromStr("10.0"), + sdkmath.LegacyMustNewDecFromStr("100000.00"), + }, + []int64{1, 1, 100, 1}, + []bool{true, true, true, true}, + sdkmath.LegacyMustNewDecFromStr("49995.000362536252310906"), + }, + { + // Adding fake validator doesn't change outcome + []sdkmath.LegacyDec{ + sdkmath.LegacyMustNewDecFromStr("1.0"), + sdkmath.LegacyMustNewDecFromStr("2.0"), + sdkmath.LegacyMustNewDecFromStr("10.0"), + sdkmath.LegacyMustNewDecFromStr("100000.00"), + sdkmath.LegacyMustNewDecFromStr("10000000000"), + }, + []int64{1, 1, 100, 1, 10000}, + []bool{true, true, true, true, false}, + sdkmath.LegacyMustNewDecFromStr("4472135950.751005519905537611"), + }, + { + // Tie votes + []sdkmath.LegacyDec{ + sdkmath.LegacyMustNewDecFromStr("1.0"), + sdkmath.LegacyMustNewDecFromStr("2.0"), + sdkmath.LegacyMustNewDecFromStr("3.0"), + sdkmath.LegacyMustNewDecFromStr("4.00"), + }, + []int64{1, 100, 100, 1}, + []bool{true, true, true, true}, + sdkmath.LegacyMustNewDecFromStr("1.224744871391589049"), + }, + { + // No votes + []sdkmath.LegacyDec{}, + []int64{}, + []bool{true, true, true, true}, + sdkmath.LegacyNewDecWithPrec(0, 0), + }, + } + + for _, tc := range tests { + pb := ExchangeRateBallot{} + for i, input := range tc.inputs { + valAddr := sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()) + + power := tc.weights[i] + if !tc.isValidator[i] { + power = 0 + } + + vote := NewVoteForTally( + input, + DmDenom, + valAddr, + power, + ) + + pb = append(pb, vote) + } + stdDev, _ := pb.StandardDeviation() + + require.Equal(t, tc.standardDeviation, stdDev) + } +} + +func TestPBStandardDeviation_Overflow(t *testing.T) { + valAddr := sdk.ValAddress(secp256k1.GenPrivKey().PubKey().Address()) + overflowRate, err := sdkmath.LegacyNewDecFromStr("100000000000000000000000000000000000000000000000000000000.0") + require.NoError(t, err) + pb := ExchangeRateBallot{ + NewVoteForTally( + sdkmath.LegacyOneDec(), + DmSymbol, + valAddr, + 2, + ), + NewVoteForTally( + sdkmath.LegacyNewDec(1234), + DmSymbol, + valAddr, + 2, + ), + NewVoteForTally( + overflowRate, + DmSymbol, + valAddr, + 1, + ), + } + + deviation, err := pb.StandardDeviation() + require.NoError(t, err) + expectedDevation := sdkmath.LegacyMustNewDecFromStr("871.862661203013097586") + require.Equal(t, expectedDevation, deviation) +} + +func TestBallotMapToSlice(t *testing.T) { + valAddress := GenerateRandomValAddr(1) + + pb := ExchangeRateBallot{ + NewVoteForTally( + sdkmath.LegacyNewDec(1234), + DmSymbol, + valAddress[0], + 2, + ), + NewVoteForTally( + sdkmath.LegacyNewDec(12345), + DmSymbol, + valAddress[0], + 1, + ), + } + + ballotSlice := BallotMapToSlice(map[string]ExchangeRateBallot{ + DmDenom: pb, + IbcDenomAtom: pb, + }) + require.Equal(t, []BallotDenom{{Ballot: pb, Denom: IbcDenomAtom}, {Ballot: pb, Denom: DmDenom}}, ballotSlice) +} + +func TestExchangeRateBallotSwap(t *testing.T) { + valAddress := GenerateRandomValAddr(2) + + voteTallies := []VoteForTally{ + NewVoteForTally( + sdkmath.LegacyNewDec(1234), + DmSymbol, + valAddress[0], + 2, + ), + NewVoteForTally( + sdkmath.LegacyNewDec(12345), + DmSymbol, + valAddress[1], + 1, + ), + } + + pb := ExchangeRateBallot{voteTallies[0], voteTallies[1]} + + require.Equal(t, pb[0], voteTallies[0]) + require.Equal(t, pb[1], voteTallies[1]) + pb.Swap(1, 0) + require.Equal(t, pb[1], voteTallies[0]) + require.Equal(t, pb[0], voteTallies[1]) +} + +func TestStandardDeviationUnsorted(t *testing.T) { + valAddress := GenerateRandomValAddr(1) + pb := ExchangeRateBallot{ + NewVoteForTally( + sdkmath.LegacyNewDec(1234), + DmSymbol, + valAddress[0], + 2, + ), + NewVoteForTally( + sdkmath.LegacyNewDec(12), + DmSymbol, + valAddress[0], + 1, + ), + } + + deviation, err := pb.StandardDeviation() + require.ErrorIs(t, err, ErrBallotNotSorted) + require.Equal(t, "0.000000000000000000", deviation.String()) +} + +func TestClaimMapToSlices(t *testing.T) { + valAddresses := GenerateRandomValAddr(2) + claim1 := NewClaim(10, 1, 4, valAddresses[0]) + claim2 := NewClaim(10, 1, 4, valAddresses[1]) + claimSlice, rewardSlice := ClaimMapToSlices( + map[string]Claim{ + "testClaim": claim1, + "anotherClaim": claim2, + }, + []string{ + claim1.Recipient.String(), + }, + ) + require.Contains(t, claimSlice, claim1, claim2) + require.Equal(t, []Claim{claim1}, rewardSlice) +} + +func TestExchangeRateBallotSort(t *testing.T) { + v1 := VoteForTally{ExchangeRate: sdkmath.LegacyMustNewDecFromStr("0.2"), Voter: sdk.ValAddress{0, 1}} + v1Cpy := VoteForTally{ExchangeRate: sdkmath.LegacyMustNewDecFromStr("0.2"), Voter: sdk.ValAddress{0, 1}} + v2 := VoteForTally{ExchangeRate: sdkmath.LegacyMustNewDecFromStr("0.1"), Voter: sdk.ValAddress{0, 1, 1}} + v3 := VoteForTally{ExchangeRate: sdkmath.LegacyMustNewDecFromStr("0.1"), Voter: sdk.ValAddress{0, 1}} + v4 := VoteForTally{ExchangeRate: sdkmath.LegacyMustNewDecFromStr("0.5"), Voter: sdk.ValAddress{1}} + + tcs := []struct { + got ExchangeRateBallot + expected ExchangeRateBallot + }{ + { + got: ExchangeRateBallot{v1, v2, v3, v4}, + expected: ExchangeRateBallot{v3, v2, v1, v4}, + }, + { + got: ExchangeRateBallot{v1}, + expected: ExchangeRateBallot{v1}, + }, + { + got: ExchangeRateBallot{v1, v1Cpy}, + expected: ExchangeRateBallot{v1, v1Cpy}, + }, + } + for i, tc := range tcs { + t.Run(fmt.Sprint(i), func(t *testing.T) { + sort.Sort(tc.got) + require.Exactly(t, tc.expected, tc.got) + }) + } +} diff --git a/x/oracle/types/codec.go b/x/oracle/types/codec.go new file mode 100755 index 0000000..67f0eaa --- /dev/null +++ b/x/oracle/types/codec.go @@ -0,0 +1,67 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" +) + +var amino = codec.NewLegacyAmino() + +// ModuleCdc references the global x/oracle module codec. Note, the codec should +// ONLY be used in certain instances of tests and for JSON encoding as Amino is +// still used for that purpose. +// +// The actual codec used for serialization should be provided to x/staking and +// defined at the application level. + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterLegacyAminoCodec registers the necessary x/oracle interfaces and concrete types +// on the provided LegacyAmino codec. These types are used for Amino JSON serialization. +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgAggregateExchangeRatePrevote{}, "cheqd/oracle/MsgAggregateExchangeRatePrevote", nil) + cdc.RegisterConcrete(&MsgAggregateExchangeRateVote{}, "cheqd/oracle/MsgAggregateExchangeRateVote", nil) + cdc.RegisterConcrete(&MsgDelegateFeedConsent{}, "cheqd/oracle/MsgDelegateFeedConsent", nil) + cdc.RegisterConcrete(&MsgLegacyGovUpdateParams{}, "cheqd/oracle/MsgLegacyGovUpdateParams", nil) + cdc.RegisterConcrete(&MsgGovUpdateParams{}, "cheqd/oracle/MsgGovUpdateParams", nil) + cdc.RegisterConcrete(&MsgGovAddDenoms{}, "cheqd/oracle/MsgGovAddDenoms", nil) + cdc.RegisterConcrete(&MsgGovRemoveCurrencyPairProviders{}, "cheqd/oracle/MsgGovRemoveCurrencyPairProviders", nil) + cdc.RegisterConcrete( + &MsgGovRemoveCurrencyDeviationThresholds{}, + "cheqd/oracle/MsgGovRemoveCurrencyDeviationThresholds", + nil, + ) +} + +// RegisterInterfaces registers the x/oracle interfaces types with the interface registry +func RegisterInterfaces(registry codectypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgDelegateFeedConsent{}, + &MsgAggregateExchangeRatePrevote{}, + &MsgAggregateExchangeRateVote{}, + &MsgLegacyGovUpdateParams{}, + &MsgGovUpdateParams{}, + &MsgGovAddDenoms{}, + &MsgGovRemoveCurrencyPairProviders{}, + &MsgGovRemoveCurrencyDeviationThresholds{}, + ) + + registry.RegisterImplementations( + (*govtypes.Content)(nil), + &MsgLegacyGovUpdateParams{}, + &MsgGovUpdateParams{}, + &MsgGovAddDenoms{}, + &MsgGovRemoveCurrencyPairProviders{}, + &MsgGovRemoveCurrencyDeviationThresholds{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/oracle/types/currency_deviation_thresholds.go b/x/oracle/types/currency_deviation_thresholds.go new file mode 100644 index 0000000..ef4e98c --- /dev/null +++ b/x/oracle/types/currency_deviation_thresholds.go @@ -0,0 +1,39 @@ +package types + +import ( + "strings" + + "gopkg.in/yaml.v3" +) + +// String implements fmt.Stringer interface +func (cdt CurrencyDeviationThreshold) String() string { + out, _ := yaml.Marshal(cdt) + return string(out) +} + +func (cdt CurrencyDeviationThreshold) Equal(cdt2 *CurrencyDeviationThreshold) bool { + return strings.EqualFold(cdt.BaseDenom, cdt2.BaseDenom) && strings.EqualFold(cdt.Threshold, cdt2.Threshold) +} + +// CurrencyDeviationThresholdList is array of CurrencyDeviationThresholds +type CurrencyDeviationThresholdList []CurrencyDeviationThreshold + +func (cdtl CurrencyDeviationThresholdList) String() (out string) { + for _, v := range cdtl { + out += v.String() + "\n" + } + + return strings.TrimSpace(out) +} + +func (cdtl CurrencyDeviationThresholdList) RemovePair(curr string) CurrencyDeviationThresholdList { + for i := 0; i < len(cdtl); i++ { + if cdtl[i].BaseDenom == curr { + cdtl = append(cdtl[:i], cdtl[i+1:]...) + i-- // decrement i so the next iteration will check the next element + } + } + + return cdtl +} diff --git a/x/oracle/types/currency_deviation_thresholds_test.go b/x/oracle/types/currency_deviation_thresholds_test.go new file mode 100644 index 0000000..1847c01 --- /dev/null +++ b/x/oracle/types/currency_deviation_thresholds_test.go @@ -0,0 +1,49 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestCurrencyDeviationThresholdsString(t *testing.T) { + cdt := CurrencyDeviationThreshold{ + BaseDenom: "OJO", + Threshold: "1.5", + } + require.Equal( + t, + cdt.String(), + "base_denom: OJO\nthreshold: \"1.5\"\n", + ) + + cdtl := CurrencyDeviationThresholdList{cdt} + require.Equal( + t, + cdtl.String(), + "base_denom: OJO\nthreshold: \"1.5\"", + ) +} + +func TestCurrencyDeviationThresholdsEqual(t *testing.T) { + cdt1 := CurrencyDeviationThreshold{ + BaseDenom: "OJO", + Threshold: "1.5", + } + cdt2 := CurrencyDeviationThreshold{ + BaseDenom: "OJO", + Threshold: "1.5", + } + cdt3 := CurrencyDeviationThreshold{ + BaseDenom: "OJO", + Threshold: "1.6", + } + cdt4 := CurrencyDeviationThreshold{ + BaseDenom: "UMEE", + Threshold: "1.5", + } + + require.True(t, cdt1.Equal(&cdt2)) + require.False(t, cdt1.Equal(&cdt3)) + require.False(t, cdt1.Equal(&cdt4)) +} diff --git a/x/oracle/types/currency_pair_providers.go b/x/oracle/types/currency_pair_providers.go new file mode 100644 index 0000000..cfe0a97 --- /dev/null +++ b/x/oracle/types/currency_pair_providers.go @@ -0,0 +1,48 @@ +package types + +import ( + "reflect" + "strings" + + "gopkg.in/yaml.v3" +) + +// String implements fmt.Stringer interface +func (cpp CurrencyPairProviders) String() string { + out, _ := yaml.Marshal(cpp) + return string(out) +} + +func (cpp CurrencyPairProviders) Equal(cpp2 *CurrencyPairProviders) bool { + if !strings.EqualFold(cpp.BaseDenom, cpp2.BaseDenom) || !strings.EqualFold(cpp.QuoteDenom, cpp2.QuoteDenom) { + return false + } + + if !reflect.DeepEqual(cpp.PairAddress, cpp2.PairAddress) { + return false + } + + return reflect.DeepEqual(cpp.Providers, cpp2.Providers) +} + +// CurrencyPairProvidersList is array of CurrencyPairProviders +type CurrencyPairProvidersList []CurrencyPairProviders + +func (cppl CurrencyPairProvidersList) String() (out string) { + for _, v := range cppl { + out += v.String() + "\n" + } + + return strings.TrimSpace(out) +} + +func (cppl CurrencyPairProvidersList) RemovePair(pair CurrencyPairProviders) CurrencyPairProvidersList { + for i := 0; i < len(cppl); i++ { + if cppl[i].BaseDenom == pair.BaseDenom && cppl[i].QuoteDenom == pair.QuoteDenom { + cppl = append(cppl[:i], cppl[i+1:]...) + i-- // decrement i so the next iteration will check the next element + } + } + + return cppl +} diff --git a/x/oracle/types/currency_pair_providers_test.go b/x/oracle/types/currency_pair_providers_test.go new file mode 100644 index 0000000..2130554 --- /dev/null +++ b/x/oracle/types/currency_pair_providers_test.go @@ -0,0 +1,90 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestCurrencyPairProvidersString(t *testing.T) { + cpp := CurrencyPairProviders{ + BaseDenom: "RETH", + QuoteDenom: "WETH", + PairAddress: []PairAddressProvider{ + { + Address: "address", + AddressProvider: "eth-uniswap", + }, + }, + Providers: []string{ + "eth-uniswap", + }, + } + require.Equal( + t, + cpp.String(), + "base_denom: RETH\nquote_denom: WETH\npair_address:\n - address: address\n address_provider: eth-uniswap\nproviders:\n - eth-uniswap\n", + ) + + cppl := CurrencyPairProvidersList{cpp} + require.Equal( + t, + cppl.String(), + "base_denom: RETH\nquote_denom: WETH\npair_address:\n - address: address\n address_provider: eth-uniswap\nproviders:\n - eth-uniswap", + ) +} + +func TestCurrencyPairProvidersEqual(t *testing.T) { + cpp1 := CurrencyPairProviders{ + BaseDenom: "CHEQ", + QuoteDenom: "USD", + Providers: []string{ + "binance", + "coinbase", + }, + } + cpp2 := CurrencyPairProviders{ + BaseDenom: "CHEQ", + QuoteDenom: "USD", + Providers: []string{ + "binance", + "coinbase", + }, + } + cpp3 := CurrencyPairProviders{ + BaseDenom: "CHEQ", + QuoteDenom: "ATOM", + Providers: []string{ + "binance", + "coinbase", + }, + } + cpp4 := CurrencyPairProviders{ + BaseDenom: "CHEQ", + QuoteDenom: "USD", + Providers: []string{ + "binance", + }, + } + cpp5 := CurrencyPairProviders{ + BaseDenom: "CHEQ", + QuoteDenom: "ATOM", + Providers: []string{ + "binance", + "coinbase", + }, + PairAddress: []PairAddressProvider{ + { + Address: "address", + AddressProvider: "eth-uniswap", + }, + }, + } + + require.True(t, cpp1.Equal(&cpp2)) + require.False(t, cpp1.Equal(&cpp3)) + require.False(t, cpp2.Equal(&cpp3)) + require.False(t, cpp1.Equal(&cpp4)) + require.False(t, cpp3.Equal(&cpp4)) + require.False(t, cpp4.Equal(&cpp5)) +} diff --git a/x/oracle/types/denom.go b/x/oracle/types/denom.go new file mode 100644 index 0000000..484834d --- /dev/null +++ b/x/oracle/types/denom.go @@ -0,0 +1,67 @@ +package types + +import ( + "strings" + + "gopkg.in/yaml.v3" +) + +// String implements fmt.Stringer interface +func (d Denom) String() string { + out, _ := yaml.Marshal(d) + return string(out) +} + +// Equal implements equal interface +func (d Denom) Equal(d1 *Denom) bool { + return d.BaseDenom == d1.BaseDenom && + d.SymbolDenom == d1.SymbolDenom && + d.Exponent == d1.Exponent +} + +// DenomList is array of Denom +type DenomList []Denom + +// String implements fmt.Stringer interface +func (dl DenomList) String() (out string) { + for _, d := range dl { + out += d.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// Contains checks whether or not a SymbolDenom (e.g. OJO) is in the DenomList +func (dl DenomList) Contains(symbolDenom string) bool { + for _, d := range dl { + if strings.EqualFold(d.SymbolDenom, symbolDenom) { + return true + } + } + return false +} + +// ContainDenoms checks if d is a subset of dl +func (dl DenomList) ContainDenoms(d DenomList) bool { + contains := make(map[string]struct{}) + + for _, denom := range dl { + contains[denom.String()] = struct{}{} + } + + for _, denom := range d { + if _, found := contains[denom.String()]; !found { + return false + } + } + + return true +} + +// Normalize updates all the SymbolDenom strings to use all caps. +func (dl DenomList) Normalize() DenomList { + for i := range dl { + dl[i].SymbolDenom = strings.ToUpper(dl[i].SymbolDenom) + } + return dl +} diff --git a/x/oracle/types/errors.go b/x/oracle/types/errors.go new file mode 100644 index 0000000..bdb5622 --- /dev/null +++ b/x/oracle/types/errors.go @@ -0,0 +1,42 @@ +package types + +import ( + "fmt" + + "cosmossdk.io/errors" + "github.com/cometbft/cometbft/crypto/tmhash" +) + +// Oracle sentinel errors +var ( + ErrInvalidExchangeRate = errors.Register(ModuleName, 2, "invalid exchange rate") + ErrNoPrevote = errors.Register(ModuleName, 3, "no prevote") + ErrNoVote = errors.Register(ModuleName, 4, "no vote") + ErrNoVotingPermission = errors.Register(ModuleName, 5, "unauthorized voter") + ErrInvalidHash = errors.Register(ModuleName, 6, "invalid hash") + ErrInvalidHashLength = errors.Register(ModuleName, 7, fmt.Sprintf("invalid hash length; should equal %d", tmhash.TruncatedSize)) //nolint: lll + ErrVerificationFailed = errors.Register(ModuleName, 8, "hash verification failed") + ErrRevealPeriodMissMatch = errors.Register(ModuleName, 9, "reveal period of submitted vote does not match with registered prevote") //nolint: lll + ErrInvalidSaltLength = errors.Register(ModuleName, 10, "invalid salt length; must be 64") + ErrInvalidSaltFormat = errors.Register(ModuleName, 11, "invalid salt format") + ErrNoAggregatePrevote = errors.Register(ModuleName, 12, "no aggregate prevote") + ErrNoAggregateVote = errors.Register(ModuleName, 13, "no aggregate vote") + ErrUnknownDenom = errors.Register(ModuleName, 14, "unknown denom") + ErrNegativeOrZeroRate = errors.Register(ModuleName, 15, "invalid exchange rate; should be positive") + ErrExistingPrevote = errors.Register(ModuleName, 16, "prevote already submitted for this voting period") + ErrBallotNotSorted = errors.Register(ModuleName, 17, "ballot must be sorted before this operation") + ErrInvalidOraclePrice = errors.Register(ModuleName, 18, "invalid or unavailable oracle price") + ErrNoHistoricPrice = errors.Register(ModuleName, 19, "no historic price for this denom at this block") + ErrNoMedian = errors.Register(ModuleName, 20, "no median for this denom at this block") + ErrNoMedianDeviation = errors.Register(ModuleName, 21, "no median deviation for this denom at this block") + ErrNoRewardBand = errors.Register(ModuleName, 22, "unable to find the reward band the given asset") + ErrNoValidatorRewardSet = errors.Register(ModuleName, 23, "unable to find the latest validator reward set") + ErrNoGovAuthority = errors.Register(ModuleName, 24, "invalid gov authority to perform these changes") + ErrInvalidRequest = errors.Register(ModuleName, 25, "invalid request") + ErrInvalidParamValue = errors.Register(ModuleName, 26, "invalid oracle param value") + ErrEncodeInjVoteExt = errors.Register(ModuleName, 27, "failed to encode injected vote extension tx") + ErrNonEqualInjVotesLen = errors.Register(ModuleName, 28, "number of exchange rate votes in vote extension and extended commit info are not equal") //nolint: lll + ErrNonEqualInjVotesRates = errors.Register(ModuleName, 29, "injected exchange rate votes and generated exchange votes are not equal") //nolint: lll + ErrNoCommitInfo = errors.Register(ModuleName, 30, "no commit info in process proposal request") + ErrInvalidWmaStrategy = errors.Register(ModuleName, 31, "invalid WMA strategy") +) diff --git a/x/oracle/types/events.go b/x/oracle/types/events.go new file mode 100644 index 0000000..def18e2 --- /dev/null +++ b/x/oracle/types/events.go @@ -0,0 +1,8 @@ +package types + +// oracle module event types +const ( + EventParamUpdate = "param_update" + + AttributeKeyNotifyPriceFeeder = "notify_price_feeder" +) diff --git a/x/oracle/types/events.pb.go b/x/oracle/types/events.pb.go new file mode 100644 index 0000000..93a7f48 --- /dev/null +++ b/x/oracle/types/events.pb.go @@ -0,0 +1,580 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: oracle/v1/events.proto + +package types + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventDelegateFeedConsent is emitted on Msg/DelegateFeedConsent +type EventDelegateFeedConsent struct { + // Operator bech32 address who delegates his feed consent + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // Delegate bech32 address + Delegate string `protobuf:"bytes,2,opt,name=delegate,proto3" json:"delegate,omitempty"` +} + +func (m *EventDelegateFeedConsent) Reset() { *m = EventDelegateFeedConsent{} } +func (m *EventDelegateFeedConsent) String() string { return proto.CompactTextString(m) } +func (*EventDelegateFeedConsent) ProtoMessage() {} +func (*EventDelegateFeedConsent) Descriptor() ([]byte, []int) { + return fileDescriptor_4d3b914ef0d57537, []int{0} +} +func (m *EventDelegateFeedConsent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDelegateFeedConsent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDelegateFeedConsent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventDelegateFeedConsent) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDelegateFeedConsent.Merge(m, src) +} +func (m *EventDelegateFeedConsent) XXX_Size() int { + return m.Size() +} +func (m *EventDelegateFeedConsent) XXX_DiscardUnknown() { + xxx_messageInfo_EventDelegateFeedConsent.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDelegateFeedConsent proto.InternalMessageInfo + +// EventSetFxRate is emitted on exchange rate update +type EventSetFxRate struct { + // uToken denom + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // Exchange rate (based to USD) + Rate cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=rate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"rate"` +} + +func (m *EventSetFxRate) Reset() { *m = EventSetFxRate{} } +func (m *EventSetFxRate) String() string { return proto.CompactTextString(m) } +func (*EventSetFxRate) ProtoMessage() {} +func (*EventSetFxRate) Descriptor() ([]byte, []int) { + return fileDescriptor_4d3b914ef0d57537, []int{1} +} +func (m *EventSetFxRate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSetFxRate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSetFxRate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSetFxRate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSetFxRate.Merge(m, src) +} +func (m *EventSetFxRate) XXX_Size() int { + return m.Size() +} +func (m *EventSetFxRate) XXX_DiscardUnknown() { + xxx_messageInfo_EventSetFxRate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSetFxRate proto.InternalMessageInfo + +func init() { + proto.RegisterType((*EventDelegateFeedConsent)(nil), "oracle.v1.EventDelegateFeedConsent") + proto.RegisterType((*EventSetFxRate)(nil), "oracle.v1.EventSetFxRate") +} + +func init() { proto.RegisterFile("oracle/v1/events.proto", fileDescriptor_4d3b914ef0d57537) } + +var fileDescriptor_4d3b914ef0d57537 = []byte{ + // 315 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xb1, 0x4e, 0xf3, 0x30, + 0x14, 0x85, 0x93, 0x5f, 0x3f, 0x88, 0x7a, 0x60, 0x88, 0x2a, 0x14, 0x8a, 0xe4, 0xa2, 0x4e, 0x2c, + 0x8d, 0x55, 0xc1, 0x0b, 0x50, 0xd2, 0x2e, 0xc0, 0x92, 0x6e, 0x2c, 0xc8, 0xb5, 0xaf, 0x92, 0x88, + 0xc6, 0xb7, 0xb2, 0x4d, 0xd4, 0xbe, 0x00, 0x33, 0x0f, 0xd3, 0x87, 0xe8, 0x58, 0x75, 0x42, 0x0c, + 0x15, 0xb4, 0x2f, 0x82, 0x1a, 0x07, 0x18, 0xd9, 0x7c, 0x8f, 0xcf, 0xf9, 0x8e, 0xe5, 0x4b, 0x4e, + 0x50, 0x73, 0x31, 0x01, 0x56, 0xf6, 0x18, 0x94, 0xa0, 0xac, 0x89, 0xa6, 0x1a, 0x2d, 0x06, 0x0d, + 0xa7, 0x47, 0x65, 0xaf, 0x75, 0x2a, 0xd0, 0x14, 0x68, 0x1e, 0xab, 0x0b, 0xe6, 0x06, 0xe7, 0x6a, + 0x35, 0x53, 0x4c, 0xd1, 0xe9, 0xfb, 0x93, 0x53, 0x3b, 0x2f, 0x3e, 0x09, 0x07, 0x7b, 0x58, 0x0c, + 0x13, 0x48, 0xb9, 0x85, 0x21, 0x80, 0xbc, 0x41, 0x65, 0x40, 0xd9, 0xe0, 0x8a, 0x1c, 0xe1, 0x14, + 0x34, 0xb7, 0xa8, 0x43, 0xff, 0xdc, 0xbf, 0x68, 0xf4, 0xc3, 0xf5, 0xa2, 0xdb, 0xac, 0xb1, 0xd7, + 0x52, 0x6a, 0x30, 0x66, 0x64, 0x75, 0xae, 0xd2, 0xe4, 0xc7, 0xb9, 0x4f, 0xc9, 0x1a, 0x16, 0xfe, + 0xfb, 0x2b, 0xf5, 0xed, 0xec, 0x14, 0xe4, 0xb8, 0x7a, 0xc7, 0x08, 0xec, 0x70, 0x96, 0x70, 0x0b, + 0x41, 0x93, 0x1c, 0x48, 0x50, 0x58, 0xb8, 0xea, 0xc4, 0x0d, 0xc1, 0x80, 0xfc, 0xd7, 0xbf, 0xe4, + 0xde, 0x72, 0xd3, 0xf6, 0xde, 0x37, 0xed, 0x33, 0x47, 0x37, 0xf2, 0x29, 0xca, 0x91, 0x15, 0xdc, + 0x66, 0xd1, 0x1d, 0xa4, 0x5c, 0xcc, 0x63, 0x10, 0xeb, 0x45, 0x97, 0xd4, 0xe5, 0x31, 0x88, 0xa4, + 0x8a, 0xf7, 0x6f, 0x97, 0x9f, 0xd4, 0x5b, 0x6e, 0xa9, 0xbf, 0xda, 0x52, 0xff, 0x63, 0x4b, 0xfd, + 0xd7, 0x1d, 0xf5, 0x56, 0x3b, 0xea, 0xbd, 0xed, 0xa8, 0xf7, 0xd0, 0x4d, 0x73, 0x9b, 0x3d, 0x8f, + 0x23, 0x81, 0x05, 0x8b, 0x39, 0x94, 0xf7, 0xb9, 0xcd, 0x34, 0x57, 0x4c, 0x16, 0x22, 0xe3, 0xb9, + 0x62, 0x33, 0x56, 0xaf, 0xc2, 0xce, 0xa7, 0x60, 0xc6, 0x87, 0xd5, 0x5f, 0x5e, 0x7e, 0x05, 0x00, + 0x00, 0xff, 0xff, 0x2c, 0x5f, 0x5b, 0xd8, 0xa1, 0x01, 0x00, 0x00, +} + +func (m *EventDelegateFeedConsent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventDelegateFeedConsent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDelegateFeedConsent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Delegate) > 0 { + i -= len(m.Delegate) + copy(dAtA[i:], m.Delegate) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Delegate))) + i-- + dAtA[i] = 0x12 + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSetFxRate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSetFxRate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSetFxRate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Rate.Size() + i -= size + if _, err := m.Rate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventDelegateFeedConsent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Delegate) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventSetFxRate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.Rate.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventDelegateFeedConsent) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventDelegateFeedConsent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDelegateFeedConsent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Delegate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Delegate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSetFxRate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSetFxRate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSetFxRate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/oracle/types/expected_keeper.go b/x/oracle/types/expected_keeper.go new file mode 100644 index 0000000..2447119 --- /dev/null +++ b/x/oracle/types/expected_keeper.go @@ -0,0 +1,55 @@ +package types + +import ( + "context" + + sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// StakingKeeper defines the expected interface contract defined by the x/staking +// module. +type StakingKeeper interface { + Validator(ctx context.Context, address sdk.ValAddress) (stakingtypes.ValidatorI, error) + GetBondedValidatorsByPower(ctx context.Context) ([]stakingtypes.Validator, error) + TotalBondedTokens(context.Context) (sdkmath.Int, error) + Slash(context.Context, sdk.ConsAddress, int64, int64, sdkmath.LegacyDec) (sdkmath.Int, error) + Jail(context.Context, sdk.ConsAddress) error + ValidatorsPowerStoreIterator(context context.Context) (storetypes.Iterator, error) + MaxValidators(context.Context) (uint32, error) + PowerReduction(ctx context.Context) (res sdkmath.Int) +} + +// DistributionKeeper defines the expected interface contract defined by the +// x/distribution module. +type DistributionKeeper interface { + AllocateTokensToValidator(ctx context.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins) error + GetValidatorOutstandingRewardsCoins(ctx context.Context, val sdk.ValAddress) (sdk.DecCoins, error) +} + +// AccountKeeper defines the expected interface contract defined by the x/auth +// module. +type AccountKeeper interface { + GetModuleAddress(name string) sdk.AccAddress + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI + + // only used for simulation + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI +} + +// BankKeeper defines the expected interface contract defined by the x/bank +// module. +type BankKeeper interface { + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins + SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error + GetDenomMetaData(ctx context.Context, denom string) (banktypes.Metadata, bool) + SetDenomMetaData(ctx context.Context, denomMetaData banktypes.Metadata) +} + +type FeeAbskeeper interface { + GetTwapRate(ctx sdk.Context, ibcDenom string) (sdkmath.LegacyDec, error) +} diff --git a/x/oracle/types/genesis.go b/x/oracle/types/genesis.go new file mode 100755 index 0000000..36b0153 --- /dev/null +++ b/x/oracle/types/genesis.go @@ -0,0 +1,66 @@ +package types + +import ( + "encoding/json" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// NewGenesisState creates a new GenesisState object +func NewGenesisState( + params Params, + rates sdk.DecCoins, + feederDelegations []FeederDelegation, + missCounters []MissCounter, + aggregateExchangeRatePrevotes []AggregateExchangeRatePrevote, + aggregateExchangeRateVotes []AggregateExchangeRateVote, + historicPrices []PriceStamp, + medianPrices []PriceStamp, + medianDeviationPrices []PriceStamp, +) *GenesisState { + return &GenesisState{ + Params: params, + ExchangeRates: rates, + FeederDelegations: feederDelegations, + MissCounters: missCounters, + AggregateExchangeRatePrevotes: aggregateExchangeRatePrevotes, + AggregateExchangeRateVotes: aggregateExchangeRateVotes, + HistoricPrices: historicPrices, + Medians: medianPrices, + MedianDeviations: medianDeviationPrices, + } +} + +// DefaultGenesisState returns the default genesesis state for the x/oracle +// module. +func DefaultGenesisState() *GenesisState { + return &GenesisState{ + Params: DefaultParams(), + ExchangeRates: sdk.DecCoins{}, + FeederDelegations: []FeederDelegation{}, + MissCounters: []MissCounter{}, + AggregateExchangeRatePrevotes: []AggregateExchangeRatePrevote{}, + AggregateExchangeRateVotes: []AggregateExchangeRateVote{}, + HistoricPrices: []PriceStamp{}, + Medians: []PriceStamp{}, + MedianDeviations: []PriceStamp{}, + } +} + +// ValidateGenesis validates the oracle genesis state. +func ValidateGenesis(data *GenesisState) error { + return data.Params.Validate() +} + +// GetGenesisStateFromAppState returns x/oracle GenesisState given raw application +// genesis state. +func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState { + var genesisState GenesisState + + if appState[ModuleName] != nil { + cdc.MustUnmarshalJSON(appState[ModuleName], &genesisState) + } + + return &genesisState +} diff --git a/x/oracle/types/genesis.pb.go b/x/oracle/types/genesis.pb.go new file mode 100644 index 0000000..e7d728f --- /dev/null +++ b/x/oracle/types/genesis.pb.go @@ -0,0 +1,1274 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: oracle/v1/genesis.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the module genesis state +type GenesisState struct { + // Params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + FeederDelegations []FeederDelegation `protobuf:"bytes,2,rep,name=feeder_delegations,json=feederDelegations,proto3" json:"feeder_delegations"` + ExchangeRates github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,3,rep,name=exchange_rates,json=exchangeRates,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"exchange_rates"` + MissCounters []MissCounter `protobuf:"bytes,4,rep,name=miss_counters,json=missCounters,proto3" json:"miss_counters"` + AggregateExchangeRatePrevotes []AggregateExchangeRatePrevote `protobuf:"bytes,5,rep,name=aggregate_exchange_rate_prevotes,json=aggregateExchangeRatePrevotes,proto3" json:"aggregate_exchange_rate_prevotes"` + AggregateExchangeRateVotes []AggregateExchangeRateVote `protobuf:"bytes,6,rep,name=aggregate_exchange_rate_votes,json=aggregateExchangeRateVotes,proto3" json:"aggregate_exchange_rate_votes"` + Medians []PriceStamp `protobuf:"bytes,7,rep,name=medians,proto3" json:"medians"` + HistoricPrices []PriceStamp `protobuf:"bytes,8,rep,name=historic_prices,json=historicPrices,proto3" json:"historic_prices"` + MedianDeviations []PriceStamp `protobuf:"bytes,9,rep,name=median_deviations,json=medianDeviations,proto3" json:"median_deviations"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_14b982a0a6345d1d, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetFeederDelegations() []FeederDelegation { + if m != nil { + return m.FeederDelegations + } + return nil +} + +func (m *GenesisState) GetExchangeRates() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.ExchangeRates + } + return nil +} + +func (m *GenesisState) GetMissCounters() []MissCounter { + if m != nil { + return m.MissCounters + } + return nil +} + +func (m *GenesisState) GetAggregateExchangeRatePrevotes() []AggregateExchangeRatePrevote { + if m != nil { + return m.AggregateExchangeRatePrevotes + } + return nil +} + +func (m *GenesisState) GetAggregateExchangeRateVotes() []AggregateExchangeRateVote { + if m != nil { + return m.AggregateExchangeRateVotes + } + return nil +} + +func (m *GenesisState) GetMedians() []PriceStamp { + if m != nil { + return m.Medians + } + return nil +} + +func (m *GenesisState) GetHistoricPrices() []PriceStamp { + if m != nil { + return m.HistoricPrices + } + return nil +} + +func (m *GenesisState) GetMedianDeviations() []PriceStamp { + if m != nil { + return m.MedianDeviations + } + return nil +} + +// FeederDelegation is the address for where oracle feeder authority are +// delegated to. By default this struct is only used at genesis to feed in +// default feeder addresses. +type FeederDelegation struct { + FeederAddress string `protobuf:"bytes,1,opt,name=feeder_address,json=feederAddress,proto3" json:"feeder_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (m *FeederDelegation) Reset() { *m = FeederDelegation{} } +func (m *FeederDelegation) String() string { return proto.CompactTextString(m) } +func (*FeederDelegation) ProtoMessage() {} +func (*FeederDelegation) Descriptor() ([]byte, []int) { + return fileDescriptor_14b982a0a6345d1d, []int{1} +} +func (m *FeederDelegation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeederDelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeederDelegation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FeederDelegation) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeederDelegation.Merge(m, src) +} +func (m *FeederDelegation) XXX_Size() int { + return m.Size() +} +func (m *FeederDelegation) XXX_DiscardUnknown() { + xxx_messageInfo_FeederDelegation.DiscardUnknown(m) +} + +var xxx_messageInfo_FeederDelegation proto.InternalMessageInfo + +func (m *FeederDelegation) GetFeederAddress() string { + if m != nil { + return m.FeederAddress + } + return "" +} + +func (m *FeederDelegation) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +// MissCounter defines an miss counter and validator address pair used in +// oracle module's genesis state +type MissCounter struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + MissCounter uint64 `protobuf:"varint,2,opt,name=miss_counter,json=missCounter,proto3" json:"miss_counter,omitempty"` +} + +func (m *MissCounter) Reset() { *m = MissCounter{} } +func (m *MissCounter) String() string { return proto.CompactTextString(m) } +func (*MissCounter) ProtoMessage() {} +func (*MissCounter) Descriptor() ([]byte, []int) { + return fileDescriptor_14b982a0a6345d1d, []int{2} +} +func (m *MissCounter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MissCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MissCounter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MissCounter) XXX_Merge(src proto.Message) { + xxx_messageInfo_MissCounter.Merge(m, src) +} +func (m *MissCounter) XXX_Size() int { + return m.Size() +} +func (m *MissCounter) XXX_DiscardUnknown() { + xxx_messageInfo_MissCounter.DiscardUnknown(m) +} + +var xxx_messageInfo_MissCounter proto.InternalMessageInfo + +func (m *MissCounter) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +func (m *MissCounter) GetMissCounter() uint64 { + if m != nil { + return m.MissCounter + } + return 0 +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "oracle.v1.GenesisState") + proto.RegisterType((*FeederDelegation)(nil), "oracle.v1.FeederDelegation") + proto.RegisterType((*MissCounter)(nil), "oracle.v1.MissCounter") +} + +func init() { proto.RegisterFile("oracle/v1/genesis.proto", fileDescriptor_14b982a0a6345d1d) } + +var fileDescriptor_14b982a0a6345d1d = []byte{ + // 563 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xdd, 0x6e, 0xd3, 0x30, + 0x14, 0x6e, 0xf6, 0xcb, 0xdc, 0xad, 0xb4, 0x16, 0x8c, 0xa8, 0xb0, 0xac, 0x54, 0x20, 0x26, 0x4d, + 0x4b, 0xd4, 0x4d, 0x3c, 0x40, 0xbb, 0xc2, 0xb8, 0x99, 0x54, 0x75, 0x12, 0x17, 0x48, 0x28, 0x72, + 0x13, 0x37, 0xb5, 0x68, 0xe2, 0xc8, 0xc7, 0x8b, 0xca, 0x5b, 0xf0, 0x1c, 0x3c, 0xc9, 0x2e, 0x77, + 0xc9, 0x15, 0xa0, 0xf6, 0x35, 0xb8, 0x40, 0xb1, 0xdd, 0x36, 0x4c, 0x1b, 0xbd, 0x8a, 0x75, 0xce, + 0xf7, 0x93, 0x4f, 0xfa, 0x6c, 0xf4, 0x8c, 0x0b, 0x12, 0x8c, 0xa9, 0x97, 0xb5, 0xbc, 0x88, 0x26, + 0x14, 0x18, 0xb8, 0xa9, 0xe0, 0x92, 0xe3, 0x1d, 0xbd, 0x70, 0xb3, 0x56, 0x7d, 0x7f, 0x89, 0x31, + 0x43, 0x05, 0xa9, 0x3f, 0x89, 0x78, 0xc4, 0xd5, 0xd1, 0xcb, 0x4f, 0x66, 0xea, 0x04, 0x1c, 0x62, + 0x0e, 0xde, 0x80, 0x40, 0x4e, 0x19, 0x50, 0x49, 0x5a, 0x5e, 0xc0, 0x59, 0xa2, 0xf7, 0xcd, 0x3f, + 0x9b, 0x68, 0xf7, 0x42, 0x5b, 0x5d, 0x49, 0x22, 0x29, 0xf6, 0xd0, 0x56, 0x4a, 0x04, 0x89, 0xc1, + 0xb6, 0x1a, 0xd6, 0x51, 0xf9, 0xb4, 0xe6, 0x2e, 0xac, 0xdd, 0x9e, 0x5a, 0x74, 0x36, 0x6e, 0x7e, + 0x1e, 0x96, 0xfa, 0x06, 0x86, 0x7b, 0x08, 0x0f, 0x29, 0x0d, 0xa9, 0xf0, 0x43, 0x3a, 0xa6, 0x11, + 0x91, 0x8c, 0x27, 0x60, 0xaf, 0x35, 0xd6, 0x8f, 0xca, 0xa7, 0xcf, 0x0b, 0xe4, 0xf7, 0x0a, 0xd4, + 0x5d, 0x60, 0x8c, 0x4c, 0x6d, 0x78, 0x67, 0x0e, 0x78, 0x82, 0x2a, 0x74, 0x12, 0x8c, 0x48, 0x12, + 0x51, 0x5f, 0x10, 0x49, 0xc1, 0x5e, 0x57, 0x6a, 0x2f, 0x5c, 0x1d, 0xc6, 0xcd, 0xc3, 0xb8, 0x26, + 0x8c, 0xdb, 0xa5, 0xc1, 0x39, 0x67, 0x49, 0xe7, 0x2c, 0x97, 0xfb, 0xfe, 0xeb, 0xf0, 0x38, 0x62, + 0x72, 0x74, 0x3d, 0x70, 0x03, 0x1e, 0x7b, 0x26, 0xbc, 0xfe, 0x9c, 0x40, 0xf8, 0xc5, 0x93, 0x5f, + 0x53, 0x0a, 0x73, 0x0e, 0xf4, 0xf7, 0xe6, 0x46, 0xfd, 0xdc, 0x07, 0xb7, 0xd1, 0x5e, 0xcc, 0x00, + 0xfc, 0x80, 0x5f, 0x27, 0x92, 0x0a, 0xb0, 0x37, 0x94, 0xf1, 0x7e, 0x21, 0xc6, 0x25, 0x03, 0x38, + 0xd7, 0x6b, 0x93, 0x60, 0x37, 0x5e, 0x8e, 0x00, 0x67, 0xa8, 0x41, 0xa2, 0x48, 0xe4, 0x61, 0xa8, + 0xff, 0x4f, 0x0c, 0x3f, 0x15, 0x34, 0xe3, 0x79, 0x9c, 0x4d, 0xa5, 0xfa, 0xa6, 0xa0, 0xda, 0x9e, + 0x53, 0xde, 0x15, 0xfe, 0xa7, 0xa7, 0xf1, 0xc6, 0xe6, 0x80, 0xfc, 0x07, 0x03, 0x38, 0x46, 0x07, + 0x0f, 0xf9, 0x6a, 0xd3, 0x2d, 0x65, 0xfa, 0x6a, 0x95, 0xe9, 0xc7, 0xa5, 0x63, 0x9d, 0x3c, 0x04, + 0x00, 0xfc, 0x16, 0x6d, 0xc7, 0x34, 0x64, 0x24, 0x01, 0x7b, 0x5b, 0x09, 0x3f, 0x2d, 0xf6, 0x44, + 0xb0, 0x80, 0x5e, 0x49, 0x12, 0xa7, 0x46, 0x69, 0x8e, 0xc5, 0x5d, 0xf4, 0x78, 0xc4, 0x40, 0x72, + 0xc1, 0x02, 0x3f, 0xcd, 0x51, 0x60, 0x3f, 0x5a, 0x4d, 0xaf, 0xcc, 0x39, 0x6a, 0x03, 0xf8, 0x03, + 0xaa, 0x69, 0x41, 0x3f, 0xa4, 0x19, 0x33, 0x8d, 0xdb, 0x59, 0xad, 0x53, 0xd5, 0xac, 0xee, 0x82, + 0xd4, 0x1c, 0xa2, 0xea, 0xdd, 0x5e, 0xe2, 0xd7, 0xa8, 0x62, 0x0a, 0x4d, 0xc2, 0x50, 0x50, 0xd0, + 0x37, 0x61, 0xa7, 0xbf, 0xa7, 0xa7, 0x6d, 0x3d, 0xc4, 0xc7, 0xa8, 0x96, 0x91, 0x31, 0x0b, 0x89, + 0xe4, 0x4b, 0xe4, 0x9a, 0x42, 0x56, 0x17, 0x0b, 0x03, 0x6e, 0x7e, 0x46, 0xe5, 0x42, 0x71, 0xee, + 0xe7, 0x5a, 0xf7, 0x73, 0xf1, 0x4b, 0xb4, 0x5b, 0x2c, 0xa5, 0xf2, 0xd8, 0xe8, 0x97, 0x0b, 0xad, + 0xeb, 0x5c, 0xdc, 0x4c, 0x1d, 0xeb, 0x76, 0xea, 0x58, 0xbf, 0xa7, 0x8e, 0xf5, 0x6d, 0xe6, 0x94, + 0x6e, 0x67, 0x4e, 0xe9, 0xc7, 0xcc, 0x29, 0x7d, 0x3a, 0x29, 0xdc, 0x86, 0x2e, 0xa1, 0xd9, 0x25, + 0x93, 0x23, 0x41, 0x12, 0x2f, 0x8c, 0x83, 0x11, 0x61, 0x89, 0x37, 0x31, 0x8f, 0x88, 0xbe, 0x18, + 0x83, 0x2d, 0xf5, 0x2a, 0x9c, 0xfd, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x33, 0x49, 0x7a, 0xdf, 0x89, + 0x04, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MedianDeviations) > 0 { + for iNdEx := len(m.MedianDeviations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MedianDeviations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.HistoricPrices) > 0 { + for iNdEx := len(m.HistoricPrices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.HistoricPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.Medians) > 0 { + for iNdEx := len(m.Medians) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Medians[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.AggregateExchangeRateVotes) > 0 { + for iNdEx := len(m.AggregateExchangeRateVotes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AggregateExchangeRateVotes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.AggregateExchangeRatePrevotes) > 0 { + for iNdEx := len(m.AggregateExchangeRatePrevotes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AggregateExchangeRatePrevotes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.MissCounters) > 0 { + for iNdEx := len(m.MissCounters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MissCounters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.ExchangeRates) > 0 { + for iNdEx := len(m.ExchangeRates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExchangeRates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.FeederDelegations) > 0 { + for iNdEx := len(m.FeederDelegations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FeederDelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *FeederDelegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FeederDelegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeederDelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.FeederAddress) > 0 { + i -= len(m.FeederAddress) + copy(dAtA[i:], m.FeederAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.FeederAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MissCounter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MissCounter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MissCounter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MissCounter != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.MissCounter)) + i-- + dAtA[i] = 0x10 + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.FeederDelegations) > 0 { + for _, e := range m.FeederDelegations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ExchangeRates) > 0 { + for _, e := range m.ExchangeRates { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.MissCounters) > 0 { + for _, e := range m.MissCounters { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.AggregateExchangeRatePrevotes) > 0 { + for _, e := range m.AggregateExchangeRatePrevotes { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.AggregateExchangeRateVotes) > 0 { + for _, e := range m.AggregateExchangeRateVotes { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Medians) > 0 { + for _, e := range m.Medians { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.HistoricPrices) > 0 { + for _, e := range m.HistoricPrices { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.MedianDeviations) > 0 { + for _, e := range m.MedianDeviations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *FeederDelegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FeederAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *MissCounter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.MissCounter != 0 { + n += 1 + sovGenesis(uint64(m.MissCounter)) + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeederDelegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeederDelegations = append(m.FeederDelegations, FeederDelegation{}) + if err := m.FeederDelegations[len(m.FeederDelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExchangeRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExchangeRates = append(m.ExchangeRates, types.DecCoin{}) + if err := m.ExchangeRates[len(m.ExchangeRates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MissCounters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MissCounters = append(m.MissCounters, MissCounter{}) + if err := m.MissCounters[len(m.MissCounters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateExchangeRatePrevotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregateExchangeRatePrevotes = append(m.AggregateExchangeRatePrevotes, AggregateExchangeRatePrevote{}) + if err := m.AggregateExchangeRatePrevotes[len(m.AggregateExchangeRatePrevotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateExchangeRateVotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregateExchangeRateVotes = append(m.AggregateExchangeRateVotes, AggregateExchangeRateVote{}) + if err := m.AggregateExchangeRateVotes[len(m.AggregateExchangeRateVotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Medians", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Medians = append(m.Medians, PriceStamp{}) + if err := m.Medians[len(m.Medians)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HistoricPrices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HistoricPrices = append(m.HistoricPrices, PriceStamp{}) + if err := m.HistoricPrices[len(m.HistoricPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MedianDeviations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MedianDeviations = append(m.MedianDeviations, PriceStamp{}) + if err := m.MedianDeviations[len(m.MedianDeviations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FeederDelegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FeederDelegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeederDelegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeederAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeederAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MissCounter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MissCounter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MissCounter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MissCounter", wireType) + } + m.MissCounter = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MissCounter |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/oracle/types/genesis_test.go b/x/oracle/types/genesis_test.go new file mode 100755 index 0000000..24ecf39 --- /dev/null +++ b/x/oracle/types/genesis_test.go @@ -0,0 +1,84 @@ +package types + +import ( + "encoding/json" + "testing" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/staking" + "github.com/stretchr/testify/require" +) + +func TestGenesisValidation(t *testing.T) { + // Valid state + genState := DefaultGenesisState() + require.NoError(t, ValidateGenesis(genState)) + + // Invalid Vote Period + genState.Params.VotePeriod = 0 + require.Error(t, ValidateGenesis(genState)) + + // Invalid VoteThreshold + genState = DefaultGenesisState() + genState.Params.VoteThreshold = math.LegacyNewDecWithPrec(33, 2) + require.Error(t, ValidateGenesis(genState)) + + // Invalid Rewardband + genState = DefaultGenesisState() + genState.Params.RewardBands[0].RewardBand = math.LegacyNewDec(2) + require.Error(t, ValidateGenesis(genState)) + genState.Params.RewardBands[0].RewardBand = math.LegacyNewDec(-1) + require.Error(t, ValidateGenesis(genState)) + + // Invalid RewardDistributionWindow + genState = DefaultGenesisState() + genState.Params.RewardDistributionWindow = genState.Params.VotePeriod - 1 + require.Error(t, ValidateGenesis(genState)) + + // Invalid SlashFraction + genState = DefaultGenesisState() + genState.Params.SlashFraction = math.LegacyNewDec(2) + require.Error(t, ValidateGenesis(genState)) + genState.Params.SlashFraction = math.LegacyNewDec(-1) + require.Error(t, ValidateGenesis(genState)) + + // Invalid SlashWindow + genState = DefaultGenesisState() + genState.Params.SlashWindow = genState.Params.VotePeriod - 1 + require.Error(t, ValidateGenesis(genState)) + + // Invalid MinValidPerWindow + genState = DefaultGenesisState() + genState.Params.MinValidPerWindow = math.LegacyNewDec(2) + require.Error(t, ValidateGenesis(genState)) + genState.Params.MinValidPerWindow = math.LegacyNewDec(-1) + require.Error(t, ValidateGenesis(genState)) + + // Invalid AcceptList + genState = DefaultGenesisState() + genState.Params.AcceptList = DenomList{Denom{}} + require.Error(t, ValidateGenesis(genState)) +} + +func TestGetGenesisStateFromAppState(t *testing.T) { + emptyGenesis := GenesisState{ + Params: Params{}, + ExchangeRates: sdk.DecCoins{}, + FeederDelegations: []FeederDelegation{}, + MissCounters: []MissCounter{}, + AggregateExchangeRatePrevotes: []AggregateExchangeRatePrevote{}, + AggregateExchangeRateVotes: []AggregateExchangeRateVote{}, + } + encodingConfig := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}, staking.AppModuleBasic{}) + + bz, err := json.Marshal(emptyGenesis) + require.Nil(t, err) + + require.NotNil(t, GetGenesisStateFromAppState(encodingConfig.Codec, map[string]json.RawMessage{ + ModuleName: bz, + })) + require.NotNil(t, GetGenesisStateFromAppState(encodingConfig.Codec, map[string]json.RawMessage{})) +} diff --git a/x/oracle/types/hash.go b/x/oracle/types/hash.go new file mode 100644 index 0000000..eeebad7 --- /dev/null +++ b/x/oracle/types/hash.go @@ -0,0 +1,122 @@ +package types + +import ( + "bytes" + "encoding/hex" + "encoding/json" + "fmt" + + "github.com/cometbft/cometbft/crypto/tmhash" + sdk "github.com/cosmos/cosmos-sdk/types" + "gopkg.in/yaml.v3" +) + +var _ yaml.Marshaler = AggregateVoteHash{} + +// AggregateVoteHash is hash value to hide vote exchange rates which is +// formatted as a HEX string: +// SHA256("{salt}:{symbol}:{exchangeRate},...,{symbol}:{exchangeRate}:{voter}") +type AggregateVoteHash []byte + +// GetAggregateVoteHash computes hash value of ExchangeRateVote to avoid +// redundant DecCoins stringify operation. +func GetAggregateVoteHash(salt, exchangeRatesStr string, voter sdk.ValAddress) AggregateVoteHash { + hash := tmhash.NewTruncated() + sourceStr := fmt.Sprintf("%s:%s:%s", salt, exchangeRatesStr, voter.String()) + + if _, err := hash.Write([]byte(sourceStr)); err != nil { + panic(err) + } + + bz := hash.Sum(nil) + return bz +} + +// AggregateVoteHashFromHexString convert hex string to AggregateVoteHash. +func AggregateVoteHashFromHexString(s string) (AggregateVoteHash, error) { + h, err := hex.DecodeString(s) + if err != nil { + return nil, err + } + + return h, nil +} + +// String implements fmt.Stringer interface +func (h AggregateVoteHash) String() string { + return hex.EncodeToString(h) +} + +// Equal does bytes equal check +func (h AggregateVoteHash) Equal(h2 AggregateVoteHash) bool { + return bytes.Equal(h, h2) +} + +// Empty check the name hash has zero length +func (h AggregateVoteHash) Empty() bool { + return len(h) == 0 +} + +// Bytes returns the raw address bytes. +func (h AggregateVoteHash) Bytes() []byte { + return h +} + +// Size returns the raw address bytes. +func (h AggregateVoteHash) Size() int { + return len(h) +} + +// Format implements the fmt.Formatter interface. +func (h AggregateVoteHash) Format(s fmt.State, verb rune) { + switch verb { + case 's': + _, _ = s.Write([]byte(h.String())) + + case 'p': + _, _ = s.Write([]byte(fmt.Sprintf("%p", h))) + + default: + _, _ = s.Write([]byte(fmt.Sprintf("%X", []byte(h)))) + } +} + +// Marshal returns the raw address bytes. It is needed for protobuf +// compatibility. +func (h AggregateVoteHash) Marshal() ([]byte, error) { + return h, nil +} + +// Unmarshal sets the address to the given data. It is needed for protobuf +// compatibility. +func (h *AggregateVoteHash) Unmarshal(data []byte) error { + *h = data + return nil +} + +// MarshalJSON marshals to JSON using Bech32. +func (h AggregateVoteHash) MarshalJSON() ([]byte, error) { + return json.Marshal(h.String()) +} + +// MarshalYAML marshals to YAML using Bech32. +func (h AggregateVoteHash) MarshalYAML() (interface{}, error) { + return h.String(), nil +} + +// UnmarshalJSON unmarshals from JSON assuming Bech32 encoding. +func (h *AggregateVoteHash) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + + h2, err := AggregateVoteHashFromHexString(s) + if err != nil { + return err + } + + *h = h2 + return nil +} diff --git a/x/oracle/types/hash_test.go b/x/oracle/types/hash_test.go new file mode 100644 index 0000000..6a262f4 --- /dev/null +++ b/x/oracle/types/hash_test.go @@ -0,0 +1,39 @@ +package types + +import ( + "encoding/hex" + "testing" + + "github.com/stretchr/testify/require" + "gopkg.in/yaml.v3" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func TestAggregateVoteHash(t *testing.T) { + addrs := []sdk.AccAddress{ + sdk.AccAddress([]byte("addr1_______________")), + } + + aggregateVoteHash := GetAggregateVoteHash("salt", "OJO:100,ATOM:100", sdk.ValAddress(addrs[0])) + hexStr := hex.EncodeToString(aggregateVoteHash) + aggregateVoteHashRes, err := AggregateVoteHashFromHexString(hexStr) + require.NoError(t, err) + require.Equal(t, aggregateVoteHash, aggregateVoteHashRes) + require.True(t, AggregateVoteHash([]byte{}).Empty()) + + got, _ := yaml.Marshal(&aggregateVoteHash) + require.Equal(t, aggregateVoteHash.String()+"\n", string(got)) + + res := AggregateVoteHash{} + testMarshal(t, &aggregateVoteHash, &res, aggregateVoteHash.MarshalJSON, (&res).UnmarshalJSON) + testMarshal(t, &aggregateVoteHash, &res, aggregateVoteHash.Marshal, (&res).Unmarshal) +} + +func testMarshal(t *testing.T, original, res interface{}, marshal func() ([]byte, error), unmarshal func([]byte) error) { + bz, err := marshal() + require.Nil(t, err) + err = unmarshal(bz) + require.Nil(t, err) + require.Equal(t, original, res) +} diff --git a/x/oracle/types/keys.go b/x/oracle/types/keys.go new file mode 100755 index 0000000..690174e --- /dev/null +++ b/x/oracle/types/keys.go @@ -0,0 +1,108 @@ +package types + +import ( + "encoding/binary" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" + + "github.com/DaevMithran/dmchain/util" +) + +const ( + // ModuleName is the name of the oracle module + ModuleName = "oracle" + + // StoreKey is the string store representation + StoreKey = ModuleName + + // RouterKey is the message route + RouterKey = ModuleName + + // QuerierRoute is the query router key for the oracle module + QuerierRoute = ModuleName +) + +// KVStore key prefixes +var ( + KeyPrefixExchangeRate = []byte{0x01} // prefix for each key to a rate + KeyPrefixFeederDelegation = []byte{0x02} // prefix for each key to a feeder delegation + KeyPrefixMissCounter = []byte{0x03} // prefix for each key to a miss counter + KeyPrefixAggregateExchangeRatePrevote = []byte{0x04} // prefix for each key to a aggregate prevote + KeyPrefixAggregateExchangeRateVote = []byte{0x05} // prefix for each key to a aggregate vote + KeyPrefixMedian = []byte{0x06} // prefix for each key to a price median + KeyPrefixMedianDeviation = []byte{0x07} // prefix for each key to a price median standard deviation + KeyPrefixHistoricPrice = []byte{0x08} // prefix for each key to a historic price + KeyPrefixValidatorRewardSet = []byte{0x09} // prefix for each key to a validator reward set + KeyPrefixParamUpdatePlan = []byte{0x10} // prefix for each key to a param update plan + KeyPrefixLastHistoricPriceBlock = []byte{0x11} // prefix for last block number per denom + KeyPrefixAverages = []byte{0x12} // prefix for each key to a average + +) + +// GetExchangeRateKey - stored by *denom* +func GetExchangeRateKey(denom string) (key []byte) { + key = append(key, KeyPrefixExchangeRate...) + key = append(key, []byte(denom)...) + return append(key, 0) // append 0 for null-termination +} + +// GetFeederDelegationKey - stored by *Validator* address +func GetFeederDelegationKey(v sdk.ValAddress) (key []byte) { + key = append(key, KeyPrefixFeederDelegation...) + return append(key, address.MustLengthPrefix(v)...) +} + +// GetMissCounterKey - stored by *Validator* address +func GetMissCounterKey(v sdk.ValAddress) (key []byte) { + key = append(key, KeyPrefixMissCounter...) + return append(key, address.MustLengthPrefix(v)...) +} + +// GetAggregateExchangeRatePrevoteKey - stored by *Validator* address +func GetAggregateExchangeRatePrevoteKey(v sdk.ValAddress) (key []byte) { + key = append(key, KeyPrefixAggregateExchangeRatePrevote...) + return append(key, address.MustLengthPrefix(v)...) +} + +// GetAggregateExchangeRateVoteKey - stored by *Validator* address +func GetAggregateExchangeRateVoteKey(v sdk.ValAddress) (key []byte) { + key = append(key, KeyPrefixAggregateExchangeRateVote...) + return append(key, address.MustLengthPrefix(v)...) +} + +// KeyMedian - stored by *denom* +func KeyMedian(denom string, blockNum uint64) (key []byte) { + return util.ConcatBytes(0, KeyPrefixMedian, []byte(denom), util.UintWithNullPrefix(blockNum)) +} + +// KeyMedianDeviation - stored by *denom* +func KeyMedianDeviation(denom string, blockNum uint64) (key []byte) { + return util.ConcatBytes(0, KeyPrefixMedianDeviation, []byte(denom), util.UintWithNullPrefix(blockNum)) +} + +// KeyHistoricPrice - stored by *denom* and *block* +func KeyHistoricPrice(denom string, blockNum uint64) (key []byte) { + return util.ConcatBytes(0, KeyPrefixHistoricPrice, []byte(denom), util.UintWithNullPrefix(blockNum)) +} + +// KeyValidatorRewardSet - stored by *block* +func KeyValidatorRewardSet() (key []byte) { + return util.ConcatBytes(0, KeyPrefixValidatorRewardSet) +} + +// KeyParamUpdatePlan - stored by *planHeight* +func KeyParamUpdatePlan(planHeight uint64) (key []byte) { + return util.ConcatBytes(0, KeyPrefixParamUpdatePlan, util.UintWithNullPrefix(planHeight)) +} + +// ParseDenomAndBlockFromKey returns the denom and block contained in the *key* +// that has a uint64 at the end with a null prefix (length 9). +func ParseDenomAndBlockFromKey(key []byte, prefix []byte) (string, uint64) { + return string(key[len(prefix) : len(key)-9]), binary.LittleEndian.Uint64(key[len(key)-8:]) +} + +// KeyLastHistoricPriceBlock - stored by *denom* +func KeyLastHistoricPriceBlock(denom string) []byte { + return util.ConcatBytes(0, KeyPrefixLastHistoricPriceBlock, []byte(denom)) +} diff --git a/x/oracle/types/keys_test.go b/x/oracle/types/keys_test.go new file mode 100644 index 0000000..35829d2 --- /dev/null +++ b/x/oracle/types/keys_test.go @@ -0,0 +1,138 @@ +package types_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/DaevMithran/dmchain/x/oracle/types" +) + +func TestGetExchangeRateKey(t *testing.T) { + testCases := []struct { + denom string + // KeyPrefixExchangeRate | []byte(denom) | 0 + expectedKey []byte + }{ + { + denom: "udm", + expectedKey: []byte{0x1, 0x6e, 0x63, 0x68, 0x65, 0x71, 0x0}, + }, + { + denom: types.IbcDenomLuna, + expectedKey: []byte{0x1, 0x69, 0x62, 0x63, 0x2f, 0x30, 0x45, 0x46, 0x31, 0x35, 0x44, 0x46, 0x32, 0x46, 0x30, 0x32, 0x34, 0x38, 0x30, 0x41, 0x44, 0x45, 0x30, 0x42, 0x42, 0x36, 0x45, 0x38, 0x35, 0x44, 0x39, 0x45, 0x42, 0x42, 0x35, 0x44, 0x41, 0x45, 0x41, 0x32, 0x38, 0x33, 0x36, 0x44, 0x33, 0x38, 0x36, 0x30, 0x45, 0x39, 0x46, 0x39, 0x37, 0x46, 0x39, 0x41, 0x41, 0x44, 0x45, 0x34, 0x46, 0x35, 0x37, 0x41, 0x33, 0x31, 0x41, 0x41, 0x30, 0x0}, + }, + { + denom: types.IbcDenomAtom, + expectedKey: []byte{0x1, 0x69, 0x62, 0x63, 0x2f, 0x32, 0x37, 0x33, 0x39, 0x34, 0x46, 0x42, 0x30, 0x39, 0x32, 0x44, 0x32, 0x45, 0x43, 0x43, 0x44, 0x35, 0x36, 0x31, 0x32, 0x33, 0x43, 0x37, 0x34, 0x46, 0x33, 0x36, 0x45, 0x34, 0x43, 0x31, 0x46, 0x39, 0x32, 0x36, 0x30, 0x30, 0x31, 0x43, 0x45, 0x41, 0x44, 0x41, 0x39, 0x43, 0x41, 0x39, 0x37, 0x45, 0x41, 0x36, 0x32, 0x32, 0x42, 0x32, 0x35, 0x46, 0x34, 0x31, 0x45, 0x35, 0x45, 0x42, 0x32, 0x0}, + }, + } + + for i, testCase := range testCases { + actualKey := types.GetExchangeRateKey(testCase.denom) + require.Equalf(t, testCase.expectedKey, actualKey, "test %d - expected key: %s should be the same as actual key: %s", i, testCase.expectedKey, actualKey) + } +} + +func TestGetFeederDelegationKey(t *testing.T) { + testCases := []struct { + val sdk.ValAddress + // KeyPrefixFeederDelegation | lengthPrefixed(addr) + expectedKey []byte + }{ + { + val: []byte("addr________________"), + expectedKey: []byte{0x2, 0x14, 0x61, 0x64, 0x64, 0x72, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f}, + }, + } + + for i, testCase := range testCases { + actualKey := types.GetFeederDelegationKey(testCase.val) + require.Equalf(t, testCase.expectedKey, actualKey, "test %d - expected key: %s should be the same as actual key: %s", i, testCase.expectedKey, actualKey) + } +} + +func TestGetMissCounterKey(t *testing.T) { + testCases := []struct { + val sdk.ValAddress + // KeyPrefixMissCounter | lengthPrefixed(addr) + expectedKey []byte + }{ + { + val: []byte("addr________________"), + expectedKey: []byte{0x3, 0x14, 0x61, 0x64, 0x64, 0x72, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f}, + }, + } + + for i, testCase := range testCases { + actualKey := types.GetMissCounterKey(testCase.val) + require.Equalf(t, testCase.expectedKey, actualKey, "test %d - expected key: %s should be the same as actual key: %s", i, testCase.expectedKey, actualKey) + } +} + +func TestGetAggregateExchangeRatePrevoteKey(t *testing.T) { + testCases := []struct { + val sdk.ValAddress + // KeyPrefixAggregateExchangeRatePrevote | lengthPrefixed(addr) + expectedKey []byte + }{ + { + val: []byte("addr________________"), + expectedKey: []byte{0x4, 0x14, 0x61, 0x64, 0x64, 0x72, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f}, + }, + } + + for i, testCase := range testCases { + actualKey := types.GetAggregateExchangeRatePrevoteKey(testCase.val) + require.Equalf(t, testCase.expectedKey, actualKey, "test %d - expected key: %s should be the same as actual key: %s", i, testCase.expectedKey, actualKey) + } +} + +func TestGetAggregateExchangeRateVoteKey(t *testing.T) { + testCases := []struct { + val sdk.ValAddress + // KeyPrefixAggregateExchangeRateVote | lengthPrefixed(addr) + expectedKey []byte + }{ + { + val: []byte("addr________________"), + expectedKey: []byte{0x5, 0x14, 0x61, 0x64, 0x64, 0x72, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f}, + }, + } + + for i, testCase := range testCases { + actualKey := types.GetAggregateExchangeRateVoteKey(testCase.val) + require.Equalf(t, testCase.expectedKey, actualKey, "test %d - expected key: %s should be the same as actual key: %s", i, testCase.expectedKey, actualKey) + } +} + +func TestParseDenomAndBlockFromHistoricPriceKey(t *testing.T) { + denom := "ojo" + blockNum := uint64(4567) + key := types.KeyHistoricPrice(denom, blockNum) + + parsedDenom, parsedBlockNum := types.ParseDenomAndBlockFromKey(key, types.KeyPrefixHistoricPrice) + require.Equal(t, denom, parsedDenom) + require.Equal(t, blockNum, parsedBlockNum) +} + +func TestParseDenomAndBlockFromMedianKey(t *testing.T) { + denom := "ojo" + blockNum := uint64(4567) + key := types.KeyMedian(denom, blockNum) + + parsedDenom, parsedBlockNum := types.ParseDenomAndBlockFromKey(key, types.KeyPrefixMedian) + require.Equal(t, denom, parsedDenom) + require.Equal(t, blockNum, parsedBlockNum) +} + +func TestParseDenomAndBlockFromMedianDeviationKey(t *testing.T) { + denom := "ojo" + blockNum := uint64(4567) + key := types.KeyMedianDeviation(denom, blockNum) + + parsedDenom, parsedBlockNum := types.ParseDenomAndBlockFromKey(key, types.KeyPrefixMedianDeviation) + require.Equal(t, denom, parsedDenom) + require.Equal(t, blockNum, parsedBlockNum) +} diff --git a/x/oracle/types/msgs.go b/x/oracle/types/msgs.go new file mode 100755 index 0000000..f5ac3bb --- /dev/null +++ b/x/oracle/types/msgs.go @@ -0,0 +1,451 @@ +package types + +import ( + "fmt" + + "cosmossdk.io/math" + "github.com/cometbft/cometbft/crypto/tmhash" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/DaevMithran/dmchain/util/checkers" + "gopkg.in/yaml.v3" +) + +var ( + _ sdk.Msg = &MsgDelegateFeedConsent{} + _ sdk.Msg = &MsgAggregateExchangeRatePrevote{} + _ sdk.Msg = &MsgAggregateExchangeRateVote{} + _ sdk.Msg = &MsgLegacyGovUpdateParams{} + _ sdk.Msg = &MsgGovUpdateParams{} + _ sdk.Msg = &MsgGovCancelUpdateParamPlan{} +) + +func NewMsgAggregateExchangeRatePrevote( + hash AggregateVoteHash, + feeder sdk.AccAddress, + validator sdk.ValAddress, +) *MsgAggregateExchangeRatePrevote { + return &MsgAggregateExchangeRatePrevote{ + Hash: hash.String(), + Feeder: feeder.String(), + Validator: validator.String(), + } +} + +// Type implements LegacyMsg interface +func (msg MsgAggregateExchangeRatePrevote) Type() string { return sdk.MsgTypeURL(&msg) } + +// GetSigners implements sdk.Msg +func (msg MsgAggregateExchangeRatePrevote) GetSigners() []sdk.AccAddress { + return checkers.Signers(msg.Feeder) +} + +// ValidateBasic Implements sdk.Msg +func (msg MsgAggregateExchangeRatePrevote) ValidateBasic() error { + _, err := AggregateVoteHashFromHexString(msg.Hash) + if err != nil { + return ErrInvalidHash.Wrapf("invalid vote hash (%s)", err) + } + + // HEX encoding doubles the hash length + if len(msg.Hash) != tmhash.TruncatedSize*2 { + return ErrInvalidHashLength + } + + _, err = sdk.AccAddressFromBech32(msg.Feeder) + if err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid feeder address (%s)", err) + } + + _, err = sdk.ValAddressFromBech32(msg.Validator) + if err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid operator address (%s)", err) + } + + return nil +} + +func NewMsgAggregateExchangeRateVote( + salt string, + exchangeRates string, + feeder sdk.AccAddress, + validator sdk.ValAddress, +) *MsgAggregateExchangeRateVote { + return &MsgAggregateExchangeRateVote{ + Salt: salt, + ExchangeRates: exchangeRates, + Feeder: feeder.String(), + Validator: validator.String(), + } +} + +// Type implements LegacyMsg interface +func (msg MsgAggregateExchangeRateVote) Type() string { return sdk.MsgTypeURL(&msg) } + +// GetSigners implements sdk.Msg +func (msg MsgAggregateExchangeRateVote) GetSigners() []sdk.AccAddress { + return checkers.Signers(msg.Feeder) +} + +// ValidateBasic implements sdk.Msg +func (msg MsgAggregateExchangeRateVote) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Feeder) + if err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid feeder address (%s)", err) + } + + _, err = sdk.ValAddressFromBech32(msg.Validator) + if err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid operator address (%s)", err) + } + + if l := len(msg.ExchangeRates); l == 0 { + return sdkerrors.ErrInvalidRequest.Wrap("must provide at least one oracle exchange rate") + } else if l > 4096 { + return sdkerrors.ErrInvalidRequest.Wrap("exchange rates string can not exceed 4096 characters") + } + + exchangeRates, err := ParseExchangeRateDecCoins(msg.ExchangeRates) + if err != nil { + return sdkerrors.ErrInvalidCoins.Wrap("failed to parse exchange rates string cause: " + err.Error()) + } + + for _, exchangeRate := range exchangeRates { + // check overflow bit length + if exchangeRate.Amount.BigInt().BitLen() > 255+math.LegacyDecimalPrecisionBits { + return ErrInvalidExchangeRate.Wrap("overflow") + } + } + + if len(msg.Salt) != 64 { + return ErrInvalidSaltLength + } + _, err = AggregateVoteHashFromHexString(msg.Salt) + if err != nil { + return ErrInvalidSaltFormat.Wrap("salt must be a valid hex string") + } + + return nil +} + +// NewMsgDelegateFeedConsent creates a MsgDelegateFeedConsent instance +func NewMsgDelegateFeedConsent(operatorAddress sdk.ValAddress, feederAddress sdk.AccAddress) *MsgDelegateFeedConsent { + return &MsgDelegateFeedConsent{ + Operator: operatorAddress.String(), + Delegate: feederAddress.String(), + } +} + +// Type implements LegacyMsg interface +func (msg MsgDelegateFeedConsent) Type() string { return sdk.MsgTypeURL(&msg) } + +// GetSigners implements sdk.Msg +func (msg MsgDelegateFeedConsent) GetSigners() []sdk.AccAddress { + operator, _ := sdk.ValAddressFromBech32(msg.Operator) + return []sdk.AccAddress{sdk.AccAddress(operator)} +} + +// ValidateBasic implements sdk.Msg +func (msg MsgDelegateFeedConsent) ValidateBasic() error { + _, err := sdk.ValAddressFromBech32(msg.Operator) + if err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid operator address (%s)", err) + } + + _, err = sdk.AccAddressFromBech32(msg.Delegate) + if err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid delegate address (%s)", err) + } + + return nil +} + +// NewLegacyMsgUpdateParams will creates a new LegacyMsgUpdateParams instance +func NewLegacyMsgUpdateParams( + authority string, + title string, + description string, + keys []string, + changes Params, +) *MsgLegacyGovUpdateParams { + return &MsgLegacyGovUpdateParams{ + Title: title, + Description: description, + Authority: authority, + Keys: keys, + Changes: changes, + } +} + +// Type implements Msg interface +func (msg MsgLegacyGovUpdateParams) Type() string { return sdk.MsgTypeURL(&msg) } + +// String implements the Stringer interface. +func (msg MsgLegacyGovUpdateParams) String() string { + out, _ := yaml.Marshal(msg) + return string(out) +} + +// GetSigners implements Msg +func (msg MsgLegacyGovUpdateParams) GetSigners() []sdk.AccAddress { + return checkers.Signers(msg.Authority) +} + +// ValidateBasic implements Msg and validates params for each param key +// specified in the proposal. If one param is invalid, the whole proposal +// will fail to go through. +func (msg MsgLegacyGovUpdateParams) ValidateBasic() error { + if err := checkers.ValidateProposal(msg.Title, msg.Description, msg.Authority); err != nil { + return err + } + + for _, key := range msg.Keys { + switch key { + case string(KeyVotePeriod): + if err := validateVotePeriod(msg.Changes.VotePeriod); err != nil { + return err + } + + case string(KeyVoteThreshold): + if err := validateVoteThreshold(msg.Changes.VoteThreshold); err != nil { + return err + } + + case string(KeyRewardBands): + if err := validateRewardBands(msg.Changes.RewardBands); err != nil { + return err + } + + case string(KeyRewardDistributionWindow): + if err := validateRewardDistributionWindow(msg.Changes.RewardDistributionWindow); err != nil { + return err + } + + case string(KeyAcceptList): + if err := validateDenomList(msg.Changes.AcceptList); err != nil { + return err + } + + case string(KeyMandatoryList): + if err := validateDenomList(msg.Changes.MandatoryList); err != nil { + return err + } + + case string(KeySlashFraction): + if err := validateSlashFraction(msg.Changes.SlashFraction); err != nil { + return err + } + + case string(KeySlashWindow): + if err := validateSlashWindow(msg.Changes.SlashWindow); err != nil { + return err + } + + case string(KeyMinValidPerWindow): + if err := validateMinValidPerWindow(msg.Changes.MinValidPerWindow); err != nil { + return err + } + + case string(KeyHistoricStampPeriod): + if err := validateHistoricStampPeriod(msg.Changes.HistoricStampPeriod); err != nil { + return err + } + + case string(KeyMedianStampPeriod): + if err := validateMedianStampPeriod(msg.Changes.MedianStampPeriod); err != nil { + return err + } + + case string(KeyMaximumPriceStamps): + if err := validateMaximumPriceStamps(msg.Changes.MaximumPriceStamps); err != nil { + return err + } + + case string(KeyMaximumMedianStamps): + if err := validateMaximumMedianStamps(msg.Changes.MaximumMedianStamps); err != nil { + return err + } + + case string(KeyUsdcIbcDenom): + if err := validateString(msg.Changes.UsdcIbcDenom); err != nil { + return err + } + + default: + return fmt.Errorf("%s is not an existing oracle param key", key) + } + } + + return nil +} + +// NewMsgUpdateParams will creates a new MsgUpdateParams instance +func NewMsgUpdateParams(authority, title, description string, plan ParamUpdatePlan) *MsgGovUpdateParams { + return &MsgGovUpdateParams{ + Authority: authority, + Title: title, + Description: description, + Plan: plan, + } +} + +// Type implements Msg interface +func (msg MsgGovUpdateParams) Type() string { return sdk.MsgTypeURL(&msg) } + +// String implements the Stringer interface. +func (msg MsgGovUpdateParams) String() string { + out, _ := yaml.Marshal(msg) + return string(out) +} + +// GetSigners implements Msg +func (msg MsgGovUpdateParams) GetSigners() []sdk.AccAddress { + return checkers.Signers(msg.Authority) +} + +// ValidateBasic implements Msg and validates params for each param key +// specified in the proposal. If one param is invalid, the whole proposal +// will fail to go through. +func (msg MsgGovUpdateParams) ValidateBasic() error { + if err := checkers.ValidateProposal(msg.Title, msg.Description, msg.Authority); err != nil { + return err + } + + return msg.Plan.ValidateBasic() +} + +// NewMsgGovCancelUpdateParamPlan will creates a new MsgGovCancelUpdateParamPlan instance +func NewMsgGovCancelUpdateParamPlan(authority, title, description string) *MsgGovCancelUpdateParamPlan { + return &MsgGovCancelUpdateParamPlan{ + Authority: authority, + Title: title, + Description: description, + } +} + +// Type implements Msg interface +func (msg MsgGovCancelUpdateParamPlan) Type() string { return sdk.MsgTypeURL(&msg) } + +// String implements the Stringer interface. +func (msg MsgGovCancelUpdateParamPlan) String() string { + out, _ := yaml.Marshal(msg) + return string(out) +} + +// GetSigners implements Msg +func (msg MsgGovCancelUpdateParamPlan) GetSigners() []sdk.AccAddress { + return checkers.Signers(msg.Authority) +} + +// ValidateBasic implements Msg +func (msg MsgGovCancelUpdateParamPlan) ValidateBasic() error { + return checkers.ValidateProposal(msg.Title, msg.Description, msg.Authority) +} + +// NewMsgGovAddDenoms will creates a new NewMsgGovAddDenoms instance +func NewMsgGovAddDenoms( + authority, title, description string, + height int64, denoms DenomList, mandatory bool, + rewardBand math.LegacyDec, currencyPairProviders CurrencyPairProvidersList, + currencyDeviationThresholds CurrencyDeviationThresholdList, +) *MsgGovAddDenoms { + return &MsgGovAddDenoms{ + Authority: authority, + Title: title, + Description: description, + Height: height, + DenomList: denoms, + Mandatory: mandatory, + RewardBand: &rewardBand, + + CurrencyPairProviders: currencyPairProviders, + CurrencyDeviationThresholds: currencyDeviationThresholds, + } +} + +// Type implements Msg interface +func (msg MsgGovAddDenoms) Type() string { return sdk.MsgTypeURL(&msg) } + +// String implements the Stringer interface. +func (msg MsgGovAddDenoms) String() string { + out, _ := yaml.Marshal(msg) + return string(out) +} + +// GetSigners implements Msg +func (msg MsgGovAddDenoms) GetSigners() []sdk.AccAddress { + return checkers.Signers(msg.Authority) +} + +// ValidateBasic implements Msg +func (msg MsgGovAddDenoms) ValidateBasic() error { + return checkers.ValidateProposal(msg.Title, msg.Description, msg.Authority) +} + +// NewMsgGovRemoveCurrencyPairProviders will creates a new NewMsgGovRemoveCurrencyPairProviders instance +func NewMsgGovRemoveCurrencyPairProviders( + authority, title, description string, + height int64, currencyPairProviders CurrencyPairProvidersList, +) *MsgGovRemoveCurrencyPairProviders { + return &MsgGovRemoveCurrencyPairProviders{ + Authority: authority, + Title: title, + Description: description, + Height: height, + + CurrencyPairProviders: currencyPairProviders, + } +} + +// Type implements Msg interface +func (msg MsgGovRemoveCurrencyPairProviders) Type() string { return sdk.MsgTypeURL(&msg) } + +// String implements the Stringer interface. +func (msg MsgGovRemoveCurrencyPairProviders) String() string { + out, _ := yaml.Marshal(msg) + return string(out) +} + +// GetSigners implements Msg +func (msg MsgGovRemoveCurrencyPairProviders) GetSigners() []sdk.AccAddress { + return checkers.Signers(msg.Authority) +} + +// ValidateBasic implements Msg +func (msg MsgGovRemoveCurrencyPairProviders) ValidateBasic() error { + return checkers.ValidateProposal(msg.Title, msg.Description, msg.Authority) +} + +// NewMsgGovRemoveCurrencyDeviationThresholds will creates a new NewMsgGovRemoveCurrencyDeviationThresholds instance +func NewMsgGovRemoveCurrencyDeviationThresholds( + authority, title, description string, + height int64, currencies []string, +) *MsgGovRemoveCurrencyDeviationThresholds { + return &MsgGovRemoveCurrencyDeviationThresholds{ + Authority: authority, + Title: title, + Description: description, + Height: height, + Currencies: currencies, + } +} + +// Type implements Msg interface +func (msg MsgGovRemoveCurrencyDeviationThresholds) Type() string { return sdk.MsgTypeURL(&msg) } + +// String implements the Stringer interface. +func (msg MsgGovRemoveCurrencyDeviationThresholds) String() string { + out, _ := yaml.Marshal(msg) + return string(out) +} + +// GetSigners implements Msg +func (msg MsgGovRemoveCurrencyDeviationThresholds) GetSigners() []sdk.AccAddress { + return checkers.Signers(msg.Authority) +} + +// ValidateBasic implements Msg +func (msg MsgGovRemoveCurrencyDeviationThresholds) ValidateBasic() error { + return checkers.ValidateProposal(msg.Title, msg.Description, msg.Authority) +} diff --git a/x/oracle/types/msgs_test.go b/x/oracle/types/msgs_test.go new file mode 100644 index 0000000..e0cda5b --- /dev/null +++ b/x/oracle/types/msgs_test.go @@ -0,0 +1,168 @@ +package types + +import ( + "testing" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" +) + +func TestMsgFeederDelegation(t *testing.T) { + addrs := []sdk.AccAddress{ + sdk.AccAddress([]byte("addr1_______________")), + sdk.AccAddress([]byte("addr2_______________")), + } + + msgInvalidOperatorAddr := "invalid operator address (empty address string is not allowed): invalid address" + msgInvalidDelegatorAddr := "invalid delegate address (empty address string is not allowed): invalid address" + + tests := []struct { + delegator sdk.ValAddress + delegate sdk.AccAddress + expectPass bool + expectedErrorMsg string + }{ + {sdk.ValAddress(addrs[0]), addrs[1], true, "test should pass"}, + {sdk.ValAddress{}, addrs[1], false, msgInvalidOperatorAddr}, + {sdk.ValAddress(addrs[0]), sdk.AccAddress{}, false, msgInvalidDelegatorAddr}, + {nil, nil, false, msgInvalidOperatorAddr}, + } + + for i, tc := range tests { + msg := NewMsgDelegateFeedConsent(tc.delegator, tc.delegate) + if tc.expectPass { + require.Nil(t, msg.ValidateBasic(), "test: %v", i) + } else { + require.ErrorContainsf(t, msg.ValidateBasic(), tc.expectedErrorMsg, "test: %v", i) + } + } +} + +func TestMsgAggregateExchangeRatePrevote(t *testing.T) { + addrs := []sdk.AccAddress{ + sdk.AccAddress([]byte("addr1_______________")), + } + + exchangeRates := sdk.DecCoins{sdk.NewDecCoinFromDec(DmDenom, math.LegacyOneDec()), sdk.NewDecCoinFromDec(DmDenom, math.LegacyNewDecWithPrec(32121, 1))} + bz := GetAggregateVoteHash("1", exchangeRates.String(), sdk.ValAddress(addrs[0])) + msgInvalidHashLength := "invalid hash length; should equal 20" + msgInvalidFeederAddr := "invalid feeder address (empty address string is not allowed): invalid address" + msgInvalidOperatorAddr := "invalid operator address (empty address string is not allowed): invalid address" + + tests := []struct { + hash AggregateVoteHash + exchangeRates sdk.DecCoins + feeder sdk.AccAddress + validator sdk.AccAddress + expectPass bool + expectedErrorMsg string + }{ + {bz, exchangeRates, addrs[0], addrs[0], true, "test should pass"}, + {bz[1:], exchangeRates, addrs[0], addrs[0], false, msgInvalidHashLength}, + {[]byte("0\x01"), exchangeRates, addrs[0], addrs[0], false, msgInvalidHashLength}, + {AggregateVoteHash{}, exchangeRates, addrs[0], addrs[0], false, msgInvalidHashLength}, + {bz, exchangeRates, sdk.AccAddress{}, addrs[0], false, msgInvalidFeederAddr}, + {bz, exchangeRates, addrs[0], sdk.AccAddress{}, false, msgInvalidOperatorAddr}, + } + + for i, tc := range tests { + msg := NewMsgAggregateExchangeRatePrevote(tc.hash, tc.feeder, sdk.ValAddress(tc.validator)) + if tc.expectPass { + require.NoError(t, msg.ValidateBasic(), "test: %v", i) + } else { + require.ErrorContainsf(t, msg.ValidateBasic(), tc.expectedErrorMsg, "test: %v", i) + } + } +} + +func TestMsgAggregateExchangeRateVote(t *testing.T) { + addrs := []sdk.AccAddress{ + sdk.AccAddress([]byte("addr1_______________")), + } + + invalidExchangeRates := "a,b" + exchangeRates := "foo:1.0,bar:1232.123" + zeroExchangeRates := "foo:0.0,bar:1232.132" + negativeExchangeRates := "foo:-1234.5,bar:1232.132" + overFlowMsgExchangeRates := StringWithCharset(4097, "56432") + overFlowExchangeRates := "foo:100000000000000000000000000000000000000000000000000000000000000000000000000000.01,bar:1232.132" + validSalt := "0cf33fb528b388660c3a42c3f3250e983395290b75fef255050fb5bc48a6025f" + saltWithColon := "0cf33fb528b388660c3a42c3f3250e983395290b75fef255050fb5bc48a6025:" + msgInvalidSalt := "invalid salt length; must be 64" + msgInvalidOverflowValue := "overflow: invalid exchange rate" + msgInvalidHexString := "salt must be a valid hex string: invalid salt format" + msgInvalidUnknownRequest := "must provide at least one oracle exchange rate: invalid request" + msgInvalidFeederAddr := "invalid feeder address (empty address string is not allowed): invalid address" + msgInvalidOperatorAddr := "invalid operator address (empty address string is not allowed): invalid address" + msgInvalidOraclePrice := "oracle price" + msgInvalidOverflowExceedCharacter := "exchange rates string can not exceed 4096 characters: invalid request" + msgInvalidExchangeRates := "invalid exchange rate" + + tests := []struct { + feeder sdk.AccAddress + validator sdk.AccAddress + salt string + exchangeRates string + expectPass bool + expectedErrorMsg string + }{ + {addrs[0], addrs[0], validSalt, exchangeRates, true, "test should pass"}, + {addrs[0], addrs[0], validSalt, invalidExchangeRates, false, msgInvalidExchangeRates}, + {addrs[0], addrs[0], validSalt, zeroExchangeRates, false, msgInvalidOraclePrice}, + {addrs[0], addrs[0], validSalt, negativeExchangeRates, false, msgInvalidOraclePrice}, + {addrs[0], addrs[0], validSalt, overFlowMsgExchangeRates, false, msgInvalidOverflowExceedCharacter}, + {addrs[0], addrs[0], validSalt, overFlowExchangeRates, false, msgInvalidOverflowValue}, + {sdk.AccAddress{}, sdk.AccAddress{}, validSalt, exchangeRates, false, msgInvalidFeederAddr}, + {addrs[0], sdk.AccAddress{}, validSalt, exchangeRates, false, msgInvalidOperatorAddr}, + {addrs[0], addrs[0], "", exchangeRates, false, msgInvalidSalt}, + {addrs[0], addrs[0], validSalt, "", false, msgInvalidUnknownRequest}, + {addrs[0], addrs[0], saltWithColon, exchangeRates, false, msgInvalidHexString}, + } + + for i, tc := range tests { + msg := NewMsgAggregateExchangeRateVote(tc.salt, tc.exchangeRates, tc.feeder, sdk.ValAddress(tc.validator)) + if tc.expectPass { + require.Nil(t, msg.ValidateBasic(), "test: %v", i) + } else { + require.ErrorContainsf(t, msg.ValidateBasic(), tc.expectedErrorMsg, "test: %v", i) + } + } +} + +func TestNewMsgAggregateExchangeRatePrevote(t *testing.T) { + vals := GenerateRandomValAddr(2) + feederAddr := sdk.AccAddress(vals[1]) + + exchangeRates := sdk.DecCoins{sdk.NewDecCoinFromDec(DmDenom, math.LegacyOneDec()), sdk.NewDecCoinFromDec(DmDenom, math.LegacyNewDecWithPrec(32121, 1))} + bz := GetAggregateVoteHash("1", exchangeRates.String(), vals[0]) + + aggregateExchangeRatePreVote := NewMsgAggregateExchangeRatePrevote( + bz, + feederAddr, + vals[0], + ) + + require.Equal(t, aggregateExchangeRatePreVote.GetSigners(), []sdk.AccAddress{feederAddr}) +} + +func TestNewMsgAggregateExchangeRateVote(t *testing.T) { + vals := GenerateRandomValAddr(2) + feederAddr := sdk.AccAddress(vals[1]) + + aggregateExchangeRateVote := NewMsgAggregateExchangeRateVote( + "salt", + "0.1", + feederAddr, + vals[0], + ) + + require.Equal(t, aggregateExchangeRateVote.GetSigners(), []sdk.AccAddress{feederAddr}) +} + +func TestMsgDelegateFeedConsent(t *testing.T) { + vals := GenerateRandomValAddr(2) + msgFeedConsent := NewMsgDelegateFeedConsent(vals[0], sdk.AccAddress(vals[1])) + + require.Equal(t, msgFeedConsent.GetSigners(), []sdk.AccAddress{sdk.AccAddress(vals[0])}) +} diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go new file mode 100644 index 0000000..a71dffd --- /dev/null +++ b/x/oracle/types/oracle.pb.go @@ -0,0 +1,3467 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: oracle/v1/oracle.proto + +package types + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the oracle module. +type Params struct { + VotePeriod uint64 `protobuf:"varint,1,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty" yaml:"vote_period"` + VoteThreshold cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=vote_threshold,json=voteThreshold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"vote_threshold" yaml:"vote_threshold"` + RewardBands RewardBandList `protobuf:"bytes,3,rep,name=reward_bands,json=rewardBands,proto3,castrepeated=RewardBandList" json:"reward_bands" yaml:"reward_bands"` + RewardDistributionWindow uint64 `protobuf:"varint,4,opt,name=reward_distribution_window,json=rewardDistributionWindow,proto3" json:"reward_distribution_window,omitempty" yaml:"reward_distribution_window"` + AcceptList DenomList `protobuf:"bytes,5,rep,name=accept_list,json=acceptList,proto3,castrepeated=DenomList" json:"accept_list" yaml:"accept_list"` + SlashFraction cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=slash_fraction,json=slashFraction,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slash_fraction" yaml:"slash_fraction"` + SlashWindow uint64 `protobuf:"varint,7,opt,name=slash_window,json=slashWindow,proto3" json:"slash_window,omitempty" yaml:"slash_window"` + MinValidPerWindow cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=min_valid_per_window,json=minValidPerWindow,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_valid_per_window" yaml:"min_valid_per_window"` + MandatoryList DenomList `protobuf:"bytes,9,rep,name=mandatory_list,json=mandatoryList,proto3,castrepeated=DenomList" json:"mandatory_list" yaml:"mandatory_list"` + // Historic Stamp Period represents the amount of blocks the oracle + // module waits before recording a new historic price. + HistoricStampPeriod uint64 `protobuf:"varint,10,opt,name=historic_stamp_period,json=historicStampPeriod,proto3" json:"historic_stamp_period,omitempty"` + // Median Stamp Period represents the amount blocks the oracle module + // waits between calculating and stamping a new median and standard + // deviation of that median. + MedianStampPeriod uint64 `protobuf:"varint,11,opt,name=median_stamp_period,json=medianStampPeriod,proto3" json:"median_stamp_period,omitempty"` + // Maximum Price Stamps represents the maximum amount of historic prices + // the oracle module will store before pruning via FIFO. + MaximumPriceStamps uint64 `protobuf:"varint,12,opt,name=maximum_price_stamps,json=maximumPriceStamps,proto3" json:"maximum_price_stamps,omitempty"` + // Maximum Median Stamps represents the maximum amount of medians the + // oracle module will store before pruning via FIFO. + MaximumMedianStamps uint64 `protobuf:"varint,13,opt,name=maximum_median_stamps,json=maximumMedianStamps,proto3" json:"maximum_median_stamps,omitempty"` + // Currency Pair Providers defines the currency provider pairs the + // price feeder uses upon start up for pricing data. + CurrencyPairProviders CurrencyPairProvidersList `protobuf:"bytes,14,rep,name=currency_pair_providers,json=currencyPairProviders,proto3,castrepeated=CurrencyPairProvidersList" json:"currency_pair_providers" yaml:"currency_pair_providers"` + // Currency Deviation Thresholds defines the deviation thresholds + // for each base currency the price feeder uses upon start up. + CurrencyDeviationThresholds CurrencyDeviationThresholdList `protobuf:"bytes,15,rep,name=currency_deviation_thresholds,json=currencyDeviationThresholds,proto3,castrepeated=CurrencyDeviationThresholdList" json:"currency_deviation_thresholds" yaml:"currency_deviation_thresholds"` + // usdc ibc denom + UsdcIbcDenom string `protobuf:"bytes,16,opt,name=usdc_ibc_denom,json=usdcIbcDenom,proto3" json:"usdc_ibc_denom,omitempty"` + SlashingEnabled bool `protobuf:"varint,17,opt,name=slashing_enabled,json=slashingEnabled,proto3" json:"slashing_enabled,omitempty"` + AveragingWindow uint64 `protobuf:"varint,18,opt,name=averaging_window,json=averagingWindow,proto3" json:"averaging_window,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_652b57db11528d07, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +// Denom - the object to hold configurations of each denom +type Denom struct { + BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty" yaml:"base_denom"` + SymbolDenom string `protobuf:"bytes,2,opt,name=symbol_denom,json=symbolDenom,proto3" json:"symbol_denom,omitempty" yaml:"symbol_denom"` + Exponent uint32 `protobuf:"varint,3,opt,name=exponent,proto3" json:"exponent,omitempty" yaml:"exponent"` +} + +func (m *Denom) Reset() { *m = Denom{} } +func (*Denom) ProtoMessage() {} +func (*Denom) Descriptor() ([]byte, []int) { + return fileDescriptor_652b57db11528d07, []int{1} +} +func (m *Denom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Denom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Denom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Denom) XXX_Merge(src proto.Message) { + xxx_messageInfo_Denom.Merge(m, src) +} +func (m *Denom) XXX_Size() int { + return m.Size() +} +func (m *Denom) XXX_DiscardUnknown() { + xxx_messageInfo_Denom.DiscardUnknown(m) +} + +var xxx_messageInfo_Denom proto.InternalMessageInfo + +// RewardBand - the object to hold the reward band configuration for a given denom. +type RewardBand struct { + SymbolDenom string `protobuf:"bytes,1,opt,name=symbol_denom,json=symbolDenom,proto3" json:"symbol_denom,omitempty" yaml:"symbol_denom"` + RewardBand cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=reward_band,json=rewardBand,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"reward_band" yaml:"reward_band"` +} + +func (m *RewardBand) Reset() { *m = RewardBand{} } +func (*RewardBand) ProtoMessage() {} +func (*RewardBand) Descriptor() ([]byte, []int) { + return fileDescriptor_652b57db11528d07, []int{2} +} +func (m *RewardBand) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RewardBand) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RewardBand.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RewardBand) XXX_Merge(src proto.Message) { + xxx_messageInfo_RewardBand.Merge(m, src) +} +func (m *RewardBand) XXX_Size() int { + return m.Size() +} +func (m *RewardBand) XXX_DiscardUnknown() { + xxx_messageInfo_RewardBand.DiscardUnknown(m) +} + +var xxx_messageInfo_RewardBand proto.InternalMessageInfo + +// AggregateExchangeRatePrevote - +// struct for aggregate prevoting on the ExchangeRateVote. +// The purpose of aggregate prevote is to hide vote exchange rates with hash +// which is formatted as hex string in SHA256("{salt}:{exchange +// rate}{denom},...,{exchange rate}{denom}:{voter}") +type AggregateExchangeRatePrevote struct { + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty" yaml:"hash"` + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty" yaml:"voter"` + SubmitBlock uint64 `protobuf:"varint,3,opt,name=submit_block,json=submitBlock,proto3" json:"submit_block,omitempty" yaml:"submit_block"` +} + +func (m *AggregateExchangeRatePrevote) Reset() { *m = AggregateExchangeRatePrevote{} } +func (*AggregateExchangeRatePrevote) ProtoMessage() {} +func (*AggregateExchangeRatePrevote) Descriptor() ([]byte, []int) { + return fileDescriptor_652b57db11528d07, []int{3} +} +func (m *AggregateExchangeRatePrevote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AggregateExchangeRatePrevote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AggregateExchangeRatePrevote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AggregateExchangeRatePrevote) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregateExchangeRatePrevote.Merge(m, src) +} +func (m *AggregateExchangeRatePrevote) XXX_Size() int { + return m.Size() +} +func (m *AggregateExchangeRatePrevote) XXX_DiscardUnknown() { + xxx_messageInfo_AggregateExchangeRatePrevote.DiscardUnknown(m) +} + +var xxx_messageInfo_AggregateExchangeRatePrevote proto.InternalMessageInfo + +// AggregateExchangeRateVote - struct for voting on +// the exchange rates of USD denominated in various assets. +type AggregateExchangeRateVote struct { + ExchangeRates github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=exchange_rates,json=exchangeRates,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"exchange_rates"` + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty" yaml:"voter"` +} + +func (m *AggregateExchangeRateVote) Reset() { *m = AggregateExchangeRateVote{} } +func (*AggregateExchangeRateVote) ProtoMessage() {} +func (*AggregateExchangeRateVote) Descriptor() ([]byte, []int) { + return fileDescriptor_652b57db11528d07, []int{4} +} +func (m *AggregateExchangeRateVote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AggregateExchangeRateVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AggregateExchangeRateVote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AggregateExchangeRateVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregateExchangeRateVote.Merge(m, src) +} +func (m *AggregateExchangeRateVote) XXX_Size() int { + return m.Size() +} +func (m *AggregateExchangeRateVote) XXX_DiscardUnknown() { + xxx_messageInfo_AggregateExchangeRateVote.DiscardUnknown(m) +} + +var xxx_messageInfo_AggregateExchangeRateVote proto.InternalMessageInfo + +// PriceStamp defines a stamp of a denom's exchange rate +// at the block number it was calculated in. +type PriceStamp struct { + ExchangeRate *types.DecCoin `protobuf:"bytes,1,opt,name=exchange_rate,json=exchangeRate,proto3" json:"exchange_rate,omitempty"` + BlockNum uint64 `protobuf:"varint,2,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` +} + +func (m *PriceStamp) Reset() { *m = PriceStamp{} } +func (m *PriceStamp) String() string { return proto.CompactTextString(m) } +func (*PriceStamp) ProtoMessage() {} +func (*PriceStamp) Descriptor() ([]byte, []int) { + return fileDescriptor_652b57db11528d07, []int{5} +} +func (m *PriceStamp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PriceStamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PriceStamp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PriceStamp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PriceStamp.Merge(m, src) +} +func (m *PriceStamp) XXX_Size() int { + return m.Size() +} +func (m *PriceStamp) XXX_DiscardUnknown() { + xxx_messageInfo_PriceStamp.DiscardUnknown(m) +} + +var xxx_messageInfo_PriceStamp proto.InternalMessageInfo + +// ValidatorRewardSet is the set of validators that is earning +// rewards for voting on exchange rates based on their misscounter +// in a given Slash Window. This set gets updated every Slash Window. +type ValidatorRewardSet struct { + ValidatorSet []string `protobuf:"bytes,1,rep,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty" yaml:"validator_set"` +} + +func (m *ValidatorRewardSet) Reset() { *m = ValidatorRewardSet{} } +func (m *ValidatorRewardSet) String() string { return proto.CompactTextString(m) } +func (*ValidatorRewardSet) ProtoMessage() {} +func (*ValidatorRewardSet) Descriptor() ([]byte, []int) { + return fileDescriptor_652b57db11528d07, []int{6} +} +func (m *ValidatorRewardSet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorRewardSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorRewardSet.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorRewardSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorRewardSet.Merge(m, src) +} +func (m *ValidatorRewardSet) XXX_Size() int { + return m.Size() +} +func (m *ValidatorRewardSet) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorRewardSet.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorRewardSet proto.InternalMessageInfo + +// CurrencyPairProviders defines a list of currency providers for the +// currency pair defined by base and quote. +type CurrencyPairProviders struct { + BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty" yaml:"base_denom"` + QuoteDenom string `protobuf:"bytes,2,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty" yaml:"quote_denom"` + PairAddress []PairAddressProvider `protobuf:"bytes,3,rep,name=pair_address,json=pairAddress,proto3" json:"pair_address" yaml:"pair_address"` + Providers []string `protobuf:"bytes,4,rep,name=providers,proto3" json:"providers,omitempty" yaml:"providers"` +} + +func (m *CurrencyPairProviders) Reset() { *m = CurrencyPairProviders{} } +func (*CurrencyPairProviders) ProtoMessage() {} +func (*CurrencyPairProviders) Descriptor() ([]byte, []int) { + return fileDescriptor_652b57db11528d07, []int{7} +} +func (m *CurrencyPairProviders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CurrencyPairProviders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CurrencyPairProviders.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CurrencyPairProviders) XXX_Merge(src proto.Message) { + xxx_messageInfo_CurrencyPairProviders.Merge(m, src) +} +func (m *CurrencyPairProviders) XXX_Size() int { + return m.Size() +} +func (m *CurrencyPairProviders) XXX_DiscardUnknown() { + xxx_messageInfo_CurrencyPairProviders.DiscardUnknown(m) +} + +var xxx_messageInfo_CurrencyPairProviders proto.InternalMessageInfo + +// PairAddressProvider defines the uniswap pair address and provider +// for uniswap currency pair. +type PairAddressProvider struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + AddressProvider string `protobuf:"bytes,2,opt,name=address_provider,json=addressProvider,proto3" json:"address_provider,omitempty" yaml:"address_provider"` +} + +func (m *PairAddressProvider) Reset() { *m = PairAddressProvider{} } +func (m *PairAddressProvider) String() string { return proto.CompactTextString(m) } +func (*PairAddressProvider) ProtoMessage() {} +func (*PairAddressProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_652b57db11528d07, []int{8} +} +func (m *PairAddressProvider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PairAddressProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PairAddressProvider.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PairAddressProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_PairAddressProvider.Merge(m, src) +} +func (m *PairAddressProvider) XXX_Size() int { + return m.Size() +} +func (m *PairAddressProvider) XXX_DiscardUnknown() { + xxx_messageInfo_PairAddressProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_PairAddressProvider proto.InternalMessageInfo + +// CurrencyDeviationThreshold defines a deviation theshold for a +// base denom. +type CurrencyDeviationThreshold struct { + BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty" yaml:"base_denom"` + Threshold string `protobuf:"bytes,2,opt,name=threshold,proto3" json:"threshold,omitempty" yaml:"threshold"` +} + +func (m *CurrencyDeviationThreshold) Reset() { *m = CurrencyDeviationThreshold{} } +func (*CurrencyDeviationThreshold) ProtoMessage() {} +func (*CurrencyDeviationThreshold) Descriptor() ([]byte, []int) { + return fileDescriptor_652b57db11528d07, []int{9} +} +func (m *CurrencyDeviationThreshold) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CurrencyDeviationThreshold) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CurrencyDeviationThreshold.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CurrencyDeviationThreshold) XXX_Merge(src proto.Message) { + xxx_messageInfo_CurrencyDeviationThreshold.Merge(m, src) +} +func (m *CurrencyDeviationThreshold) XXX_Size() int { + return m.Size() +} +func (m *CurrencyDeviationThreshold) XXX_DiscardUnknown() { + xxx_messageInfo_CurrencyDeviationThreshold.DiscardUnknown(m) +} + +var xxx_messageInfo_CurrencyDeviationThreshold proto.InternalMessageInfo + +// ParamUpdatePlan specifies updates to the Oracle module parameters +// and at which block height they should occur. +type ParamUpdatePlan struct { + // Store keys of the Oracle params getting updated. + Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` + // The height at which the param update must be performed. + Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + // Changes to the oracle parameters. + Changes Params `protobuf:"bytes,3,opt,name=changes,proto3" json:"changes"` +} + +func (m *ParamUpdatePlan) Reset() { *m = ParamUpdatePlan{} } +func (*ParamUpdatePlan) ProtoMessage() {} +func (*ParamUpdatePlan) Descriptor() ([]byte, []int) { + return fileDescriptor_652b57db11528d07, []int{10} +} +func (m *ParamUpdatePlan) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParamUpdatePlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ParamUpdatePlan.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ParamUpdatePlan) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParamUpdatePlan.Merge(m, src) +} +func (m *ParamUpdatePlan) XXX_Size() int { + return m.Size() +} +func (m *ParamUpdatePlan) XXX_DiscardUnknown() { + xxx_messageInfo_ParamUpdatePlan.DiscardUnknown(m) +} + +var xxx_messageInfo_ParamUpdatePlan proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "oracle.v1.Params") + proto.RegisterType((*Denom)(nil), "oracle.v1.Denom") + proto.RegisterType((*RewardBand)(nil), "oracle.v1.RewardBand") + proto.RegisterType((*AggregateExchangeRatePrevote)(nil), "oracle.v1.AggregateExchangeRatePrevote") + proto.RegisterType((*AggregateExchangeRateVote)(nil), "oracle.v1.AggregateExchangeRateVote") + proto.RegisterType((*PriceStamp)(nil), "oracle.v1.PriceStamp") + proto.RegisterType((*ValidatorRewardSet)(nil), "oracle.v1.ValidatorRewardSet") + proto.RegisterType((*CurrencyPairProviders)(nil), "oracle.v1.CurrencyPairProviders") + proto.RegisterType((*PairAddressProvider)(nil), "oracle.v1.PairAddressProvider") + proto.RegisterType((*CurrencyDeviationThreshold)(nil), "oracle.v1.CurrencyDeviationThreshold") + proto.RegisterType((*ParamUpdatePlan)(nil), "oracle.v1.ParamUpdatePlan") +} + +func init() { proto.RegisterFile("oracle/v1/oracle.proto", fileDescriptor_652b57db11528d07) } + +var fileDescriptor_652b57db11528d07 = []byte{ + // 1410 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0x36, 0x69, 0x1a, 0x8f, 0xbf, 0x92, 0x49, 0xd2, 0x6e, 0x93, 0xe2, 0x0d, 0x4b, 0x0b, + 0xe1, 0xa3, 0x36, 0x49, 0x91, 0x2a, 0x22, 0x38, 0x74, 0x9b, 0x56, 0x42, 0xb4, 0x95, 0x35, 0x81, + 0x22, 0xf5, 0xc0, 0x6a, 0xbc, 0x3b, 0xd8, 0xa3, 0x78, 0x77, 0xcd, 0xcc, 0xda, 0x8d, 0x2f, 0x9c, + 0x91, 0xb8, 0x70, 0xe0, 0xc0, 0x05, 0xa9, 0x47, 0xd4, 0x23, 0x12, 0x12, 0xfc, 0x07, 0x95, 0xb8, + 0xf4, 0x88, 0x38, 0x6c, 0xa1, 0xbd, 0x70, 0xf6, 0x85, 0x2b, 0x9a, 0x8f, 0x5d, 0xaf, 0x5d, 0x47, + 0x94, 0x9e, 0xbc, 0x6f, 0x7e, 0xef, 0xbd, 0xf9, 0xcd, 0x6f, 0xe6, 0xbd, 0x19, 0x83, 0xb3, 0x11, + 0xc3, 0x5e, 0x8f, 0x34, 0x87, 0xbb, 0x4d, 0xf5, 0xd5, 0xe8, 0xb3, 0x28, 0x8e, 0x60, 0x51, 0x5b, + 0xc3, 0xdd, 0xcd, 0xba, 0x17, 0xf1, 0x20, 0xe2, 0xcd, 0x36, 0xe6, 0xc2, 0xaf, 0x4d, 0x62, 0xbc, + 0xdb, 0xf4, 0x22, 0x1a, 0x2a, 0xd7, 0xcd, 0xf5, 0x4e, 0xd4, 0x89, 0xe4, 0x67, 0x53, 0x7c, 0xa9, + 0x51, 0xfb, 0x9f, 0x12, 0x58, 0x6a, 0x61, 0x86, 0x03, 0x0e, 0xaf, 0x82, 0xd2, 0x30, 0x8a, 0x89, + 0xdb, 0x27, 0x8c, 0x46, 0xbe, 0x69, 0x6c, 0x1b, 0x3b, 0x8b, 0xce, 0xd9, 0x71, 0x62, 0xc1, 0x11, + 0x0e, 0x7a, 0xfb, 0x76, 0x0e, 0xb4, 0x11, 0x10, 0x56, 0x4b, 0x1a, 0xd0, 0x03, 0x55, 0x89, 0xc5, + 0x5d, 0x46, 0x78, 0x37, 0xea, 0xf9, 0xe6, 0xa9, 0x6d, 0x63, 0xa7, 0xe8, 0x7c, 0xf0, 0x28, 0xb1, + 0x0a, 0x7f, 0x24, 0xd6, 0x96, 0x62, 0xc6, 0xfd, 0xa3, 0x06, 0x8d, 0x9a, 0x01, 0x8e, 0xbb, 0x8d, + 0x5b, 0xa4, 0x83, 0xbd, 0xd1, 0x01, 0xf1, 0xc6, 0x89, 0xb5, 0x91, 0x4b, 0x9f, 0xa5, 0xb0, 0x51, + 0x45, 0x0c, 0x7c, 0x92, 0xda, 0xb0, 0x03, 0xca, 0x8c, 0xdc, 0xc7, 0xcc, 0x77, 0xdb, 0x38, 0xf4, + 0xb9, 0xb9, 0xb0, 0xbd, 0xb0, 0x53, 0xda, 0xdb, 0x68, 0x64, 0x02, 0x34, 0x90, 0x84, 0x1d, 0x1c, + 0xfa, 0xce, 0x65, 0x31, 0xf3, 0x38, 0xb1, 0xd6, 0x54, 0xea, 0x7c, 0xa0, 0xfd, 0xf0, 0x89, 0x55, + 0x9d, 0xb8, 0xde, 0xa2, 0x3c, 0x46, 0x25, 0x96, 0xd9, 0x1c, 0x7a, 0x60, 0x53, 0xfb, 0xfb, 0x94, + 0xc7, 0x8c, 0xb6, 0x07, 0x31, 0x8d, 0x42, 0xf7, 0x3e, 0x0d, 0xfd, 0xe8, 0xbe, 0xb9, 0x28, 0x55, + 0xb9, 0x34, 0x4e, 0xac, 0x57, 0xa7, 0x72, 0xcf, 0xf1, 0xb5, 0x91, 0xa9, 0xc0, 0x83, 0x1c, 0xf6, + 0x99, 0x84, 0xe0, 0x3d, 0x50, 0xc2, 0x9e, 0x47, 0xfa, 0xb1, 0xdb, 0xa3, 0x3c, 0x36, 0x4f, 0xcb, + 0xc5, 0xac, 0xe4, 0x16, 0x73, 0x40, 0xc2, 0x28, 0x70, 0xde, 0xd0, 0xeb, 0xd0, 0x3b, 0x90, 0x0b, + 0x11, 0xcb, 0x28, 0x4a, 0x27, 0xb9, 0x02, 0xa0, 0x20, 0xf1, 0x2d, 0xb6, 0x83, 0xf7, 0x30, 0xef, + 0xba, 0x5f, 0x30, 0xec, 0x89, 0x39, 0xcd, 0xa5, 0x97, 0xd8, 0x8e, 0xe9, 0x14, 0x36, 0xaa, 0xc8, + 0x81, 0x9b, 0xda, 0x86, 0xfb, 0xa0, 0xac, 0x3c, 0xb4, 0x2e, 0x67, 0xa4, 0x2e, 0xe7, 0x26, 0x9a, + 0xe7, 0x51, 0x1b, 0x95, 0xa4, 0xa9, 0x17, 0xcf, 0xc1, 0x7a, 0x40, 0x43, 0x77, 0x88, 0x7b, 0xd4, + 0x17, 0x07, 0x2a, 0xcd, 0xb1, 0x2c, 0x69, 0x3a, 0x2f, 0x46, 0x73, 0x4b, 0x4d, 0x33, 0x2f, 0x91, + 0x8d, 0x56, 0x03, 0x1a, 0xde, 0x15, 0xa3, 0x2d, 0xc2, 0xf4, 0xa4, 0x1e, 0xa8, 0x06, 0x38, 0xf4, + 0x71, 0x1c, 0xb1, 0x91, 0x12, 0xbd, 0x78, 0x82, 0xe8, 0x6f, 0x69, 0xd1, 0xb5, 0x10, 0xd3, 0x51, + 0x33, 0xba, 0x57, 0x32, 0x54, 0x4a, 0xbf, 0x07, 0x36, 0xba, 0x94, 0xc7, 0x11, 0xa3, 0x9e, 0xcb, + 0x63, 0x1c, 0xf4, 0xd3, 0x62, 0x02, 0x42, 0x1e, 0xb4, 0x96, 0x82, 0x87, 0x02, 0xd3, 0xd5, 0xd3, + 0x00, 0x6b, 0x01, 0xf1, 0x29, 0x0e, 0xa7, 0x23, 0x4a, 0x32, 0x62, 0x55, 0x41, 0x79, 0xff, 0x77, + 0xc1, 0x7a, 0x80, 0x8f, 0x69, 0x30, 0x08, 0xdc, 0x3e, 0xa3, 0x1e, 0x51, 0x61, 0xdc, 0x2c, 0xcb, + 0x00, 0xa8, 0xb1, 0x96, 0x80, 0x64, 0x18, 0x17, 0xac, 0xd2, 0x88, 0xfc, 0x4c, 0xdc, 0xac, 0x28, + 0x56, 0x1a, 0xbc, 0x3d, 0x99, 0x8a, 0xc3, 0x1f, 0x0c, 0x70, 0xce, 0x1b, 0x30, 0x46, 0x42, 0x6f, + 0xe4, 0xf6, 0x31, 0x65, 0x6e, 0x9f, 0x45, 0x43, 0xea, 0x13, 0xc6, 0xcd, 0xaa, 0x14, 0x6e, 0x3b, + 0x27, 0xdc, 0x75, 0xed, 0xd9, 0xc2, 0x94, 0xb5, 0x52, 0x3f, 0xe7, 0xba, 0x16, 0xb2, 0xae, 0x84, + 0x3c, 0x21, 0x9d, 0x50, 0xf4, 0xfc, 0xdc, 0x04, 0x52, 0xe1, 0x0d, 0x6f, 0x1e, 0x04, 0x7f, 0x35, + 0xc0, 0x2b, 0x59, 0x42, 0x9f, 0x0c, 0x29, 0x96, 0x95, 0x97, 0xf5, 0x0f, 0x6e, 0xd6, 0x24, 0xcb, + 0x4b, 0x73, 0x58, 0x1e, 0xa4, 0xee, 0x59, 0x77, 0x71, 0xee, 0x68, 0xaa, 0x17, 0x67, 0xa8, 0xce, + 0xcb, 0x2c, 0x08, 0xd7, 0x4f, 0xce, 0x25, 0x59, 0x6f, 0x79, 0x27, 0xe2, 0x1c, 0x5e, 0x04, 0xd5, + 0x01, 0xf7, 0x3d, 0x97, 0xb6, 0x3d, 0xd7, 0x17, 0x47, 0xc9, 0x5c, 0x11, 0x27, 0x1f, 0x95, 0xc5, + 0xe8, 0x47, 0x6d, 0x4f, 0x1e, 0x2f, 0xf8, 0x26, 0x58, 0x91, 0x45, 0x43, 0xc3, 0x8e, 0x4b, 0x42, + 0xdc, 0xee, 0x11, 0xdf, 0x5c, 0xdd, 0x36, 0x76, 0x96, 0x51, 0x2d, 0x1d, 0xbf, 0xa1, 0x86, 0x85, + 0x2b, 0x1e, 0x12, 0x86, 0x3b, 0xc2, 0x57, 0x17, 0x13, 0x94, 0x7b, 0x5b, 0xcb, 0xc6, 0x55, 0x19, + 0xec, 0x2f, 0x7f, 0xff, 0xc0, 0x2a, 0xfc, 0xfd, 0xc0, 0x32, 0xec, 0x5f, 0x0c, 0x70, 0x5a, 0xcd, + 0xf4, 0x1e, 0x00, 0xe2, 0xd2, 0xd0, 0x5c, 0x0c, 0x59, 0x85, 0x1b, 0xe3, 0xc4, 0x5a, 0x55, 0x62, + 0x4c, 0x30, 0x1b, 0x15, 0x85, 0xa1, 0xa2, 0x44, 0x07, 0x18, 0x05, 0xed, 0xa8, 0xa7, 0xe3, 0x54, + 0xcf, 0xcf, 0x77, 0x80, 0x1c, 0x2a, 0x3a, 0x80, 0x34, 0x55, 0x6c, 0x13, 0x2c, 0x93, 0xe3, 0x7e, + 0x14, 0x92, 0x30, 0x36, 0x17, 0xb6, 0x8d, 0x9d, 0x8a, 0xb3, 0x36, 0x4e, 0xac, 0x9a, 0x8a, 0x4b, + 0x11, 0x1b, 0x65, 0x4e, 0xfb, 0xe5, 0xaf, 0x1f, 0x58, 0x05, 0x4d, 0xbd, 0x60, 0xff, 0x64, 0x00, + 0x30, 0x69, 0xe1, 0xcf, 0x31, 0x31, 0xfe, 0x07, 0x93, 0x7b, 0xa0, 0x94, 0xbb, 0x1d, 0xf4, 0x22, + 0xde, 0x7f, 0xb1, 0x16, 0x04, 0x9f, 0xbb, 0x5d, 0x6c, 0x04, 0x26, 0x57, 0xc9, 0x0c, 0xe9, 0x9f, + 0x0d, 0x70, 0xe1, 0x5a, 0xa7, 0xc3, 0x48, 0x07, 0xc7, 0xe4, 0xc6, 0xb1, 0xd7, 0xc5, 0x61, 0x87, + 0x20, 0x1c, 0x93, 0x16, 0x23, 0xe2, 0xaa, 0x83, 0xaf, 0x81, 0xc5, 0x2e, 0xe6, 0x5d, 0x4d, 0xbf, + 0x36, 0x4e, 0xac, 0x92, 0x9a, 0x40, 0x8c, 0xda, 0x48, 0x82, 0xf0, 0x75, 0x70, 0x5a, 0x38, 0x33, + 0xcd, 0x74, 0x65, 0x9c, 0x58, 0xe5, 0xc9, 0xfd, 0xc9, 0x6c, 0xa4, 0x60, 0xa9, 0xc9, 0xa0, 0x1d, + 0xd0, 0xd8, 0x6d, 0xf7, 0x22, 0xef, 0x48, 0xaa, 0x3c, 0xdd, 0x9f, 0x73, 0xa8, 0xd0, 0x44, 0x9a, + 0x8e, 0xb0, 0x66, 0x78, 0xff, 0x66, 0x80, 0xf3, 0x73, 0x79, 0xdf, 0x15, 0xa4, 0x8f, 0x41, 0x95, + 0xe8, 0x31, 0x97, 0xe1, 0x98, 0x70, 0xd3, 0x90, 0x75, 0x77, 0xa1, 0xa1, 0xb4, 0x6b, 0x88, 0x03, + 0xd3, 0xd0, 0xcf, 0x91, 0xc6, 0x01, 0xf1, 0xae, 0x47, 0x34, 0x74, 0xae, 0x08, 0x81, 0x1f, 0x3e, + 0xb1, 0xde, 0xee, 0xd0, 0xb8, 0x3b, 0x68, 0x37, 0xbc, 0x28, 0x68, 0xea, 0xe7, 0x8b, 0xfa, 0xb9, + 0xcc, 0xfd, 0xa3, 0x66, 0x3c, 0xea, 0x13, 0x9e, 0xc6, 0x70, 0x54, 0x21, 0xb9, 0xc9, 0xf9, 0x8b, + 0x2a, 0x31, 0xb3, 0x9a, 0x1e, 0x00, 0x93, 0xd6, 0x08, 0xaf, 0x81, 0xca, 0x14, 0x7b, 0xa9, 0xfd, + 0x7f, 0x90, 0x47, 0xe5, 0x3c, 0x0f, 0xb8, 0x05, 0x8a, 0x52, 0x43, 0x37, 0x1c, 0xa8, 0x1a, 0x58, + 0x44, 0xcb, 0x72, 0xe0, 0xce, 0x20, 0xb0, 0x0f, 0x01, 0x94, 0xd7, 0x90, 0xb8, 0x21, 0xd4, 0x81, + 0x3d, 0x24, 0x31, 0xfc, 0x10, 0x54, 0x86, 0xe9, 0xa8, 0xcb, 0x49, 0x2c, 0x25, 0x2b, 0x3a, 0xe6, + 0x38, 0xb1, 0xd6, 0xf5, 0x0a, 0xf2, 0xb0, 0x8d, 0xca, 0x99, 0x7d, 0x48, 0x62, 0xfb, 0xc7, 0x53, + 0x60, 0x63, 0x6e, 0xbf, 0x7c, 0xc9, 0x42, 0xbe, 0x0a, 0x4a, 0x5f, 0x0e, 0xc4, 0xe3, 0x2b, 0x5f, + 0xc7, 0xb9, 0x77, 0x5f, 0x0e, 0xb4, 0x11, 0x90, 0x96, 0x0a, 0xfc, 0x1c, 0x94, 0x65, 0x2b, 0xc7, + 0xbe, 0xcf, 0x08, 0x4f, 0x9f, 0x64, 0xf5, 0x5c, 0xc7, 0x15, 0xf4, 0xae, 0x29, 0x34, 0x65, 0xe9, + 0x6c, 0x4d, 0xbf, 0xcd, 0xf2, 0x19, 0x6c, 0x54, 0xea, 0x4f, 0x22, 0xe0, 0x1e, 0x28, 0x4e, 0x2e, + 0x9d, 0x45, 0xa9, 0xd1, 0xfa, 0x38, 0xb1, 0x56, 0x74, 0x60, 0x76, 0x81, 0xa0, 0x89, 0xdb, 0xcc, + 0x6e, 0x7f, 0x63, 0x80, 0xb5, 0x39, 0x1c, 0xe0, 0x3b, 0xe0, 0x4c, 0x4a, 0x5a, 0xa9, 0x04, 0xc7, + 0x89, 0x55, 0xd5, 0x8f, 0xac, 0x94, 0x4b, 0xea, 0x02, 0x6f, 0x82, 0x15, 0xfd, 0x99, 0xdd, 0x5a, + 0x5a, 0xa5, 0xad, 0x71, 0x62, 0x9d, 0x9b, 0x0a, 0xcb, 0x3c, 0x6c, 0x54, 0xc3, 0xd3, 0xb3, 0xda, + 0xdf, 0x19, 0x60, 0xf3, 0xe4, 0x7b, 0xe3, 0x25, 0x77, 0x6f, 0x0f, 0x14, 0x67, 0xdf, 0xdd, 0x39, + 0x91, 0x72, 0xef, 0xe9, 0x89, 0xdb, 0x8c, 0x48, 0x5f, 0x81, 0x9a, 0xfc, 0x07, 0xf0, 0x69, 0xdf, + 0x17, 0xdd, 0xa8, 0x87, 0x43, 0x08, 0xc1, 0xe2, 0x11, 0x19, 0xa9, 0x5a, 0x2e, 0x22, 0xf9, 0x0d, + 0xcf, 0x82, 0xa5, 0x2e, 0xa1, 0x9d, 0x6e, 0x2c, 0x67, 0x59, 0x40, 0xda, 0x82, 0xbb, 0xe0, 0x8c, + 0x2a, 0x07, 0x2e, 0x9b, 0x4c, 0x69, 0x6f, 0x75, 0xea, 0x00, 0x88, 0xbf, 0x16, 0xce, 0xa2, 0xd8, + 0x73, 0x94, 0xfa, 0x4d, 0xcd, 0x6f, 0x38, 0x1f, 0x3f, 0xfa, 0xab, 0x5e, 0x78, 0xf4, 0xb4, 0x6e, + 0x3c, 0x7e, 0x5a, 0x37, 0xfe, 0x7c, 0x5a, 0x37, 0xbe, 0x7d, 0x56, 0x2f, 0x3c, 0x7e, 0x56, 0x2f, + 0xfc, 0xfe, 0xac, 0x5e, 0xb8, 0x77, 0x39, 0xd7, 0x22, 0x0e, 0x30, 0x19, 0xde, 0xa6, 0x71, 0x97, + 0xe1, 0xb0, 0xe9, 0x07, 0x5e, 0x17, 0xd3, 0xb0, 0x79, 0xac, 0xff, 0x10, 0xa9, 0x6e, 0xd1, 0x5e, + 0x92, 0x7f, 0x6b, 0xae, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x6b, 0xaa, 0x0b, 0x92, 0x31, 0x0d, + 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.VotePeriod != that1.VotePeriod { + return false + } + if !this.VoteThreshold.Equal(that1.VoteThreshold) { + return false + } + if len(this.RewardBands) != len(that1.RewardBands) { + return false + } + for i := range this.RewardBands { + if !this.RewardBands[i].Equal(&that1.RewardBands[i]) { + return false + } + } + if this.RewardDistributionWindow != that1.RewardDistributionWindow { + return false + } + if len(this.AcceptList) != len(that1.AcceptList) { + return false + } + for i := range this.AcceptList { + if !this.AcceptList[i].Equal(&that1.AcceptList[i]) { + return false + } + } + if !this.SlashFraction.Equal(that1.SlashFraction) { + return false + } + if this.SlashWindow != that1.SlashWindow { + return false + } + if !this.MinValidPerWindow.Equal(that1.MinValidPerWindow) { + return false + } + if len(this.MandatoryList) != len(that1.MandatoryList) { + return false + } + for i := range this.MandatoryList { + if !this.MandatoryList[i].Equal(&that1.MandatoryList[i]) { + return false + } + } + if this.HistoricStampPeriod != that1.HistoricStampPeriod { + return false + } + if this.MedianStampPeriod != that1.MedianStampPeriod { + return false + } + if this.MaximumPriceStamps != that1.MaximumPriceStamps { + return false + } + if this.MaximumMedianStamps != that1.MaximumMedianStamps { + return false + } + if len(this.CurrencyPairProviders) != len(that1.CurrencyPairProviders) { + return false + } + for i := range this.CurrencyPairProviders { + if !this.CurrencyPairProviders[i].Equal(&that1.CurrencyPairProviders[i]) { + return false + } + } + if len(this.CurrencyDeviationThresholds) != len(that1.CurrencyDeviationThresholds) { + return false + } + for i := range this.CurrencyDeviationThresholds { + if !this.CurrencyDeviationThresholds[i].Equal(&that1.CurrencyDeviationThresholds[i]) { + return false + } + } + if this.UsdcIbcDenom != that1.UsdcIbcDenom { + return false + } + if this.SlashingEnabled != that1.SlashingEnabled { + return false + } + if this.AveragingWindow != that1.AveragingWindow { + return false + } + return true +} +func (this *ParamUpdatePlan) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ParamUpdatePlan) + if !ok { + that2, ok := that.(ParamUpdatePlan) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Keys) != len(that1.Keys) { + return false + } + for i := range this.Keys { + if this.Keys[i] != that1.Keys[i] { + return false + } + } + if this.Height != that1.Height { + return false + } + if !this.Changes.Equal(&that1.Changes) { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AveragingWindow != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.AveragingWindow)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if m.SlashingEnabled { + i-- + if m.SlashingEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + if len(m.UsdcIbcDenom) > 0 { + i -= len(m.UsdcIbcDenom) + copy(dAtA[i:], m.UsdcIbcDenom) + i = encodeVarintOracle(dAtA, i, uint64(len(m.UsdcIbcDenom))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if len(m.CurrencyDeviationThresholds) > 0 { + for iNdEx := len(m.CurrencyDeviationThresholds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CurrencyDeviationThresholds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + } + } + if len(m.CurrencyPairProviders) > 0 { + for iNdEx := len(m.CurrencyPairProviders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CurrencyPairProviders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + } + } + if m.MaximumMedianStamps != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.MaximumMedianStamps)) + i-- + dAtA[i] = 0x68 + } + if m.MaximumPriceStamps != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.MaximumPriceStamps)) + i-- + dAtA[i] = 0x60 + } + if m.MedianStampPeriod != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.MedianStampPeriod)) + i-- + dAtA[i] = 0x58 + } + if m.HistoricStampPeriod != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.HistoricStampPeriod)) + i-- + dAtA[i] = 0x50 + } + if len(m.MandatoryList) > 0 { + for iNdEx := len(m.MandatoryList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MandatoryList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + { + size := m.MinValidPerWindow.Size() + i -= size + if _, err := m.MinValidPerWindow.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if m.SlashWindow != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.SlashWindow)) + i-- + dAtA[i] = 0x38 + } + { + size := m.SlashFraction.Size() + i -= size + if _, err := m.SlashFraction.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + if len(m.AcceptList) > 0 { + for iNdEx := len(m.AcceptList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AcceptList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if m.RewardDistributionWindow != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.RewardDistributionWindow)) + i-- + dAtA[i] = 0x20 + } + if len(m.RewardBands) > 0 { + for iNdEx := len(m.RewardBands) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RewardBands[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size := m.VoteThreshold.Size() + i -= size + if _, err := m.VoteThreshold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.VotePeriod != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.VotePeriod)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Denom) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Denom) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Denom) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Exponent != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.Exponent)) + i-- + dAtA[i] = 0x18 + } + if len(m.SymbolDenom) > 0 { + i -= len(m.SymbolDenom) + copy(dAtA[i:], m.SymbolDenom) + i = encodeVarintOracle(dAtA, i, uint64(len(m.SymbolDenom))) + i-- + dAtA[i] = 0x12 + } + if len(m.BaseDenom) > 0 { + i -= len(m.BaseDenom) + copy(dAtA[i:], m.BaseDenom) + i = encodeVarintOracle(dAtA, i, uint64(len(m.BaseDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RewardBand) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RewardBand) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RewardBand) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.RewardBand.Size() + i -= size + if _, err := m.RewardBand.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.SymbolDenom) > 0 { + i -= len(m.SymbolDenom) + copy(dAtA[i:], m.SymbolDenom) + i = encodeVarintOracle(dAtA, i, uint64(len(m.SymbolDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AggregateExchangeRatePrevote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AggregateExchangeRatePrevote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AggregateExchangeRatePrevote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SubmitBlock != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.SubmitBlock)) + i-- + dAtA[i] = 0x18 + } + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintOracle(dAtA, i, uint64(len(m.Voter))) + i-- + dAtA[i] = 0x12 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintOracle(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AggregateExchangeRateVote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AggregateExchangeRateVote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AggregateExchangeRateVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintOracle(dAtA, i, uint64(len(m.Voter))) + i-- + dAtA[i] = 0x12 + } + if len(m.ExchangeRates) > 0 { + for iNdEx := len(m.ExchangeRates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExchangeRates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *PriceStamp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PriceStamp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PriceStamp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockNum != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.BlockNum)) + i-- + dAtA[i] = 0x10 + } + if m.ExchangeRate != nil { + { + size, err := m.ExchangeRate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValidatorRewardSet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorRewardSet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorRewardSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorSet) > 0 { + for iNdEx := len(m.ValidatorSet) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ValidatorSet[iNdEx]) + copy(dAtA[i:], m.ValidatorSet[iNdEx]) + i = encodeVarintOracle(dAtA, i, uint64(len(m.ValidatorSet[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *CurrencyPairProviders) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CurrencyPairProviders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CurrencyPairProviders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Providers) > 0 { + for iNdEx := len(m.Providers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Providers[iNdEx]) + copy(dAtA[i:], m.Providers[iNdEx]) + i = encodeVarintOracle(dAtA, i, uint64(len(m.Providers[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.PairAddress) > 0 { + for iNdEx := len(m.PairAddress) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PairAddress[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintOracle(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x12 + } + if len(m.BaseDenom) > 0 { + i -= len(m.BaseDenom) + copy(dAtA[i:], m.BaseDenom) + i = encodeVarintOracle(dAtA, i, uint64(len(m.BaseDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PairAddressProvider) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PairAddressProvider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PairAddressProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AddressProvider) > 0 { + i -= len(m.AddressProvider) + copy(dAtA[i:], m.AddressProvider) + i = encodeVarintOracle(dAtA, i, uint64(len(m.AddressProvider))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintOracle(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CurrencyDeviationThreshold) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CurrencyDeviationThreshold) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CurrencyDeviationThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Threshold) > 0 { + i -= len(m.Threshold) + copy(dAtA[i:], m.Threshold) + i = encodeVarintOracle(dAtA, i, uint64(len(m.Threshold))) + i-- + dAtA[i] = 0x12 + } + if len(m.BaseDenom) > 0 { + i -= len(m.BaseDenom) + copy(dAtA[i:], m.BaseDenom) + i = encodeVarintOracle(dAtA, i, uint64(len(m.BaseDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParamUpdatePlan) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParamUpdatePlan) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamUpdatePlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Changes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOracle(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Height != 0 { + i = encodeVarintOracle(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x10 + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = encodeVarintOracle(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintOracle(dAtA []byte, offset int, v uint64) int { + offset -= sovOracle(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.VotePeriod != 0 { + n += 1 + sovOracle(uint64(m.VotePeriod)) + } + l = m.VoteThreshold.Size() + n += 1 + l + sovOracle(uint64(l)) + if len(m.RewardBands) > 0 { + for _, e := range m.RewardBands { + l = e.Size() + n += 1 + l + sovOracle(uint64(l)) + } + } + if m.RewardDistributionWindow != 0 { + n += 1 + sovOracle(uint64(m.RewardDistributionWindow)) + } + if len(m.AcceptList) > 0 { + for _, e := range m.AcceptList { + l = e.Size() + n += 1 + l + sovOracle(uint64(l)) + } + } + l = m.SlashFraction.Size() + n += 1 + l + sovOracle(uint64(l)) + if m.SlashWindow != 0 { + n += 1 + sovOracle(uint64(m.SlashWindow)) + } + l = m.MinValidPerWindow.Size() + n += 1 + l + sovOracle(uint64(l)) + if len(m.MandatoryList) > 0 { + for _, e := range m.MandatoryList { + l = e.Size() + n += 1 + l + sovOracle(uint64(l)) + } + } + if m.HistoricStampPeriod != 0 { + n += 1 + sovOracle(uint64(m.HistoricStampPeriod)) + } + if m.MedianStampPeriod != 0 { + n += 1 + sovOracle(uint64(m.MedianStampPeriod)) + } + if m.MaximumPriceStamps != 0 { + n += 1 + sovOracle(uint64(m.MaximumPriceStamps)) + } + if m.MaximumMedianStamps != 0 { + n += 1 + sovOracle(uint64(m.MaximumMedianStamps)) + } + if len(m.CurrencyPairProviders) > 0 { + for _, e := range m.CurrencyPairProviders { + l = e.Size() + n += 1 + l + sovOracle(uint64(l)) + } + } + if len(m.CurrencyDeviationThresholds) > 0 { + for _, e := range m.CurrencyDeviationThresholds { + l = e.Size() + n += 1 + l + sovOracle(uint64(l)) + } + } + l = len(m.UsdcIbcDenom) + if l > 0 { + n += 2 + l + sovOracle(uint64(l)) + } + if m.SlashingEnabled { + n += 3 + } + if m.AveragingWindow != 0 { + n += 2 + sovOracle(uint64(m.AveragingWindow)) + } + return n +} + +func (m *Denom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BaseDenom) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + l = len(m.SymbolDenom) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + if m.Exponent != 0 { + n += 1 + sovOracle(uint64(m.Exponent)) + } + return n +} + +func (m *RewardBand) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SymbolDenom) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + l = m.RewardBand.Size() + n += 1 + l + sovOracle(uint64(l)) + return n +} + +func (m *AggregateExchangeRatePrevote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + l = len(m.Voter) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + if m.SubmitBlock != 0 { + n += 1 + sovOracle(uint64(m.SubmitBlock)) + } + return n +} + +func (m *AggregateExchangeRateVote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ExchangeRates) > 0 { + for _, e := range m.ExchangeRates { + l = e.Size() + n += 1 + l + sovOracle(uint64(l)) + } + } + l = len(m.Voter) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + return n +} + +func (m *PriceStamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ExchangeRate != nil { + l = m.ExchangeRate.Size() + n += 1 + l + sovOracle(uint64(l)) + } + if m.BlockNum != 0 { + n += 1 + sovOracle(uint64(m.BlockNum)) + } + return n +} + +func (m *ValidatorRewardSet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ValidatorSet) > 0 { + for _, s := range m.ValidatorSet { + l = len(s) + n += 1 + l + sovOracle(uint64(l)) + } + } + return n +} + +func (m *CurrencyPairProviders) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BaseDenom) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + if len(m.PairAddress) > 0 { + for _, e := range m.PairAddress { + l = e.Size() + n += 1 + l + sovOracle(uint64(l)) + } + } + if len(m.Providers) > 0 { + for _, s := range m.Providers { + l = len(s) + n += 1 + l + sovOracle(uint64(l)) + } + } + return n +} + +func (m *PairAddressProvider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + l = len(m.AddressProvider) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + return n +} + +func (m *CurrencyDeviationThreshold) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BaseDenom) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + l = len(m.Threshold) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } + return n +} + +func (m *ParamUpdatePlan) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Keys) > 0 { + for _, s := range m.Keys { + l = len(s) + n += 1 + l + sovOracle(uint64(l)) + } + } + if m.Height != 0 { + n += 1 + sovOracle(uint64(m.Height)) + } + l = m.Changes.Size() + n += 1 + l + sovOracle(uint64(l)) + return n +} + +func sovOracle(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozOracle(x uint64) (n int) { + return sovOracle(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VotePeriod", wireType) + } + m.VotePeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VotePeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VoteThreshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VoteThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardBands", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RewardBands = append(m.RewardBands, RewardBand{}) + if err := m.RewardBands[len(m.RewardBands)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardDistributionWindow", wireType) + } + m.RewardDistributionWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RewardDistributionWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AcceptList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AcceptList = append(m.AcceptList, Denom{}) + if err := m.AcceptList[len(m.AcceptList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlashFraction", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SlashFraction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SlashWindow", wireType) + } + m.SlashWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SlashWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinValidPerWindow", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinValidPerWindow.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MandatoryList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MandatoryList = append(m.MandatoryList, Denom{}) + if err := m.MandatoryList[len(m.MandatoryList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistoricStampPeriod", wireType) + } + m.HistoricStampPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistoricStampPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MedianStampPeriod", wireType) + } + m.MedianStampPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MedianStampPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaximumPriceStamps", wireType) + } + m.MaximumPriceStamps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaximumPriceStamps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaximumMedianStamps", wireType) + } + m.MaximumMedianStamps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaximumMedianStamps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrencyPairProviders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrencyPairProviders = append(m.CurrencyPairProviders, CurrencyPairProviders{}) + if err := m.CurrencyPairProviders[len(m.CurrencyPairProviders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrencyDeviationThresholds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrencyDeviationThresholds = append(m.CurrencyDeviationThresholds, CurrencyDeviationThreshold{}) + if err := m.CurrencyDeviationThresholds[len(m.CurrencyDeviationThresholds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UsdcIbcDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UsdcIbcDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SlashingEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SlashingEnabled = bool(v != 0) + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AveragingWindow", wireType) + } + m.AveragingWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AveragingWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipOracle(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOracle + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Denom) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Denom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Denom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SymbolDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SymbolDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType) + } + m.Exponent = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Exponent |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipOracle(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOracle + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RewardBand) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RewardBand: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RewardBand: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SymbolDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SymbolDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardBand", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RewardBand.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOracle(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOracle + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AggregateExchangeRatePrevote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AggregateExchangeRatePrevote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AggregateExchangeRatePrevote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Voter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SubmitBlock", wireType) + } + m.SubmitBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SubmitBlock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipOracle(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOracle + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AggregateExchangeRateVote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AggregateExchangeRateVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AggregateExchangeRateVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExchangeRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExchangeRates = append(m.ExchangeRates, types.DecCoin{}) + if err := m.ExchangeRates[len(m.ExchangeRates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Voter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOracle(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOracle + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PriceStamp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PriceStamp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PriceStamp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExchangeRate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExchangeRate == nil { + m.ExchangeRate = &types.DecCoin{} + } + if err := m.ExchangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNum", wireType) + } + m.BlockNum = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNum |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipOracle(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOracle + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorRewardSet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorRewardSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorRewardSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSet", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorSet = append(m.ValidatorSet, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOracle(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOracle + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CurrencyPairProviders) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CurrencyPairProviders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CurrencyPairProviders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PairAddress", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PairAddress = append(m.PairAddress, PairAddressProvider{}) + if err := m.PairAddress[len(m.PairAddress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Providers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Providers = append(m.Providers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOracle(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOracle + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PairAddressProvider) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PairAddressProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PairAddressProvider: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AddressProvider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AddressProvider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOracle(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOracle + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CurrencyDeviationThreshold) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CurrencyDeviationThreshold: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CurrencyDeviationThreshold: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Threshold = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOracle(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOracle + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParamUpdatePlan) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParamUpdatePlan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamUpdatePlan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Changes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOracle(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOracle + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOracle(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOracle + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOracle + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOracle + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthOracle + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupOracle + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthOracle + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthOracle = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOracle = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupOracle = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/oracle/types/params.go b/x/oracle/types/params.go new file mode 100755 index 0000000..b5ca3be --- /dev/null +++ b/x/oracle/types/params.go @@ -0,0 +1,652 @@ +package types + +import ( + fmt "fmt" + + "cosmossdk.io/math" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + "gopkg.in/yaml.v3" +) + +var ( + oneDec = math.LegacyOneDec() + minVoteThreshold = math.LegacyNewDecWithPrec(33, 2) // 0.33 +) + +// maxium number of decimals allowed for VoteThreshold +const ( + MaxVoteThresholdPrecision = 2 + MaxVoteThresholdMultiplier = 100 // must be 10^MaxVoteThresholdPrecision +) + +// Parameter keys +var ( + KeyVotePeriod = []byte("VotePeriod") + KeyVoteThreshold = []byte("VoteThreshold") + KeyRewardBands = []byte("RewardBands") + KeyRewardDistributionWindow = []byte("RewardDistributionWindow") + KeyAcceptList = []byte("AcceptList") + KeyMandatoryList = []byte("MandatoryList") + KeySlashFraction = []byte("SlashFraction") + KeySlashWindow = []byte("SlashWindow") + KeyMinValidPerWindow = []byte("MinValidPerWindow") + KeyHistoricStampPeriod = []byte("HistoricStampPeriod") + KeyMedianStampPeriod = []byte("MedianStampPeriod") + KeyMaximumPriceStamps = []byte("MaximumPriceStamps") + KeyMaximumMedianStamps = []byte("MaximumMedianStamps") + KeyCurrencyPairProviders = []byte("CurrencyPairProviders") + KeyCurrencyDeviationThresholds = []byte("CurrencyDeviationThresholds") + KeyUsdcIbcDenom = []byte("UsdcIbcDenom") + KeySlashingEnabled = []byte("SlashingEnabled") + KeyAveragingWindow = []byte("KeyAveragingWindow") +) + +// Default parameter values +const ( + DefaultVotePeriod = 10 + DefaultSlashWindow = BlocksPerWeek // window for a week + DefaultRewardDistributionWindow = BlocksPerYear // window for a year + DefaultHistoricStampPeriod = BlocksPerMinute * 3 // window for 3 minutes + DefaultMaximumPriceStamps = 60 // retain for 3 hours + DefaultMedianStampPeriod = BlocksPerHour * 3 // window for 3 hours + DefaultMaximumMedianStamps = 24 // retain for 3 days + DefaultAveragingWindow = 3 +) + +// Default parameter values +var ( + DefaultVoteThreshold = math.LegacyNewDecWithPrec(50, 2) // 50% + + DefaultAcceptList = DenomList{ + { + BaseDenom: DmDenom, + SymbolDenom: DmSymbol, + Exponent: DmExponent, + }, + { + BaseDenom: USDTDenom, + SymbolDenom: USDTSymbol, + Exponent: USDTExponent, + }, + { + BaseDenom: USDCDenom, + SymbolDenom: USDCSymbol, + Exponent: USDCExponent, + }, + } + DefaultMandatoryList = DenomList{ + { + BaseDenom: DmDenom, + SymbolDenom: DmSymbol, + Exponent: DmExponent, + }, + { + BaseDenom: USDTDenom, + SymbolDenom: USDTSymbol, + Exponent: USDTExponent, + }, + { + BaseDenom: USDCDenom, + SymbolDenom: USDCSymbol, + Exponent: USDCExponent, + }, + } + DefaultSlashFraction = math.LegacyNewDecWithPrec(1, 4) // 0.01% + DefaultMinValidPerWindow = math.LegacyNewDecWithPrec(5, 2) // 5% + defaultRewardBand = math.LegacyNewDecWithPrec(2, 2) // 0.02 + + DefaultCurrencyPairProviders = CurrencyPairProvidersList{ + CurrencyPairProviders{ + BaseDenom: USDTSymbol, + QuoteDenom: USDSymbol, + Providers: []string{ + "coinbase", + }, + }, + CurrencyPairProviders{ + BaseDenom: USDCSymbol, + QuoteDenom: USDTSymbol, + Providers: []string{ + "mexc", + }, + }, + CurrencyPairProviders{ + BaseDenom: DmSymbol, + QuoteDenom: USDTSymbol, + Providers: []string{ + "mexc", + }, + }, + CurrencyPairProviders{ + BaseDenom: DmSymbol, + QuoteDenom: USDCSymbol, + Providers: []string{ + "osmosis-icq", + }, + }, + } + + DefaultCurrencyDeviationThresholds = CurrencyDeviationThresholdList{ + CurrencyDeviationThreshold{ + BaseDenom: DmSymbol, + Threshold: "2", + }, + CurrencyDeviationThreshold{ + BaseDenom: USDTSymbol, + Threshold: "2", + }, + CurrencyDeviationThreshold{ + BaseDenom: USDCSymbol, + Threshold: "2", + }, + } +) + +var _ paramstypes.ParamSet = &Params{} + +// DefaultRewardBands returns a new default RewardBandList object. +// +// This function is necessary because we cannot use a constant, +// and the reward band list is manipulated in our unit tests. +func DefaultRewardBands() RewardBandList { + return RewardBandList{ + { + SymbolDenom: DmSymbol, + RewardBand: defaultRewardBand, + }, + { + SymbolDenom: USDTSymbol, + RewardBand: defaultRewardBand, + }, + { + SymbolDenom: USDCSymbol, + RewardBand: defaultRewardBand, + }, + } +} + +// AddDefault adds a default reward band for the given +// denom. +func (rbl *RewardBandList) AddDefault( + denom string, +) { + *rbl = append(*rbl, RewardBand{ + SymbolDenom: denom, + RewardBand: defaultRewardBand, + }) +} + +// Add adds a reward band of a given denom and +// reward band decimal. +func (rbl *RewardBandList) Add( + denom string, + band math.LegacyDec, +) { + *rbl = append(*rbl, RewardBand{ + SymbolDenom: denom, + RewardBand: band, + }) +} + +// DefaultParams creates default oracle module parameters +func DefaultParams() Params { + return Params{ + VotePeriod: DefaultVotePeriod, + VoteThreshold: DefaultVoteThreshold, + RewardDistributionWindow: DefaultRewardDistributionWindow, + AcceptList: DefaultAcceptList, + MandatoryList: DefaultMandatoryList, + SlashFraction: DefaultSlashFraction, + SlashWindow: DefaultSlashWindow, + MinValidPerWindow: DefaultMinValidPerWindow, + HistoricStampPeriod: DefaultHistoricStampPeriod, + MedianStampPeriod: DefaultMedianStampPeriod, + MaximumPriceStamps: DefaultMaximumPriceStamps, + MaximumMedianStamps: DefaultMaximumMedianStamps, + RewardBands: DefaultRewardBands(), + CurrencyPairProviders: DefaultCurrencyPairProviders, + CurrencyDeviationThresholds: DefaultCurrencyDeviationThresholds, + UsdcIbcDenom: "ibc/F5FABF52B54E65064B57BF6DBD8E5FAD22CEE9F4B8A57ADBB20CCD0173AA72A4", + SlashingEnabled: false, + AveragingWindow: DefaultAveragingWindow, + } +} + +// ParamKeyTable returns the parameter key table. +func ParamKeyTable() paramstypes.KeyTable { + return paramstypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// ParamSetPairs implements the ParamSet interface and returns all the key/value pairs +// pairs of oracle module's parameters. +func (p *Params) ParamSetPairs() paramstypes.ParamSetPairs { + return paramstypes.ParamSetPairs{ + paramstypes.NewParamSetPair( + KeyVotePeriod, + &p.VotePeriod, + validateVotePeriod, + ), + paramstypes.NewParamSetPair( + KeyVoteThreshold, + &p.VoteThreshold, + validateVoteThreshold, + ), + paramstypes.NewParamSetPair( + KeyRewardBands, + &p.RewardBands, + validateRewardBands, + ), + paramstypes.NewParamSetPair( + KeyRewardDistributionWindow, + &p.RewardDistributionWindow, + validateRewardDistributionWindow, + ), + paramstypes.NewParamSetPair( + KeyAcceptList, + &p.AcceptList, + validateDenomList, + ), + paramstypes.NewParamSetPair( + KeyMandatoryList, + &p.MandatoryList, + validateDenomList, + ), + paramstypes.NewParamSetPair( + KeySlashFraction, + &p.SlashFraction, + validateSlashFraction, + ), + paramstypes.NewParamSetPair( + KeySlashWindow, + &p.SlashWindow, + validateSlashWindow, + ), + paramstypes.NewParamSetPair( + KeyMinValidPerWindow, + &p.MinValidPerWindow, + validateMinValidPerWindow, + ), + paramstypes.NewParamSetPair( + KeyHistoricStampPeriod, + &p.HistoricStampPeriod, + validateHistoricStampPeriod, + ), + paramstypes.NewParamSetPair( + KeyMedianStampPeriod, + &p.MedianStampPeriod, + validateMedianStampPeriod, + ), + paramstypes.NewParamSetPair( + KeyMaximumPriceStamps, + &p.MaximumPriceStamps, + validateMaximumPriceStamps, + ), + paramstypes.NewParamSetPair( + KeyMaximumMedianStamps, + &p.MaximumMedianStamps, + validateMaximumMedianStamps, + ), + paramstypes.NewParamSetPair( + KeyCurrencyPairProviders, + &p.CurrencyPairProviders, + validateCurrencyPairProviders, + ), + paramstypes.NewParamSetPair( + KeyCurrencyDeviationThresholds, + &p.CurrencyDeviationThresholds, + validateCurrencyDeviationThresholds, + ), + paramstypes.NewParamSetPair( + KeyUsdcIbcDenom, + &p.UsdcIbcDenom, + validateString, + ), + paramstypes.NewParamSetPair( + KeySlashingEnabled, + &p.SlashingEnabled, + validateBool, + ), + paramstypes.NewParamSetPair( + KeyAveragingWindow, + &p.AveragingWindow, + validateAveragingWindow, + ), + } +} + +// String implements fmt.Stringer interface +func (p Params) String() string { + out, _ := yaml.Marshal(p) + return string(out) +} + +// Validate performs basic validation on oracle parameters. +func (p Params) Validate() error { + if p.VotePeriod == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter VotePeriod must be > 0") + } + if p.VoteThreshold.LTE(math.LegacyNewDecWithPrec(33, 2)) { + return ErrInvalidParamValue.Wrap("oracle parameter VoteThreshold must be greater than 33 percent") + } + + if p.RewardDistributionWindow < p.VotePeriod { + return ErrInvalidParamValue.Wrap( + "oracle parameter RewardDistributionWindow must be greater than or equal with VotePeriod", + ) + } + + if p.SlashFraction.GT(math.LegacyOneDec()) || p.SlashFraction.IsNegative() { + return ErrInvalidParamValue.Wrap("oracle parameter SlashFraction must be between [0, 1]") + } + + if p.SlashWindow < p.VotePeriod { + return ErrInvalidParamValue.Wrap("oracle parameter SlashWindow must be greater than or equal with VotePeriod") + } + + if p.SlashWindow%p.VotePeriod != 0 { + return ErrInvalidParamValue.Wrap("oracle parameter SlashWindow must be an exact multiple of VotePeriod") + } + + if p.MinValidPerWindow.GT(math.LegacyOneDec()) || p.MinValidPerWindow.IsNegative() { + return ErrInvalidParamValue.Wrap("oracle parameter MinValidPerWindow must be between [0, 1]") + } + + if err := validateDenomList(p.AcceptList); err != nil { + return err + } + + if err := validateDenomList(p.MandatoryList); err != nil { + return err + } + + if p.HistoricStampPeriod > p.MedianStampPeriod { + return ErrInvalidParamValue.Wrap( + "oracle parameter MedianStampPeriod must be greater than or equal with HistoricStampPeriod", + ) + } + + if p.HistoricStampPeriod%p.VotePeriod != 0 || p.MedianStampPeriod%p.VotePeriod != 0 { + return ErrInvalidParamValue.Wrap( + "oracle parameters HistoricStampPeriod and MedianStampPeriod must be exact multiples of VotePeriod", + ) + } + + if err := validateRewardBands(p.RewardBands); err != nil { + return err + } + + // all denoms in mandatory list must be in accept list + if !p.AcceptList.ContainDenoms(p.MandatoryList) { + return ErrInvalidParamValue.Wrap("denom in MandatoryList not present in AcceptList") + } + + if err := validateString(p.UsdcIbcDenom); err != nil { + return err + } + + return nil +} + +func validateVotePeriod(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter VotePeriod must be > 0") + } + + return nil +} + +func validateVoteThreshold(i interface{}) error { + v, ok := i.(math.LegacyDec) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v.LTE(minVoteThreshold) || v.GT(oneDec) { + return ErrInvalidParamValue.Wrapf("threshold must be bigger than %s and <= 1", minVoteThreshold) + } + val := v.MulInt64(100).TruncateInt64() + v2 := math.LegacyNewDecWithPrec(val, MaxVoteThresholdPrecision) + if !v2.Equal(v) { + return ErrInvalidParamValue.Wrap("threshold precision must be maximum 2 decimals") + } + return nil +} + +func validateRewardBand(i interface{}) error { + v, ok := i.(math.LegacyDec) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v.IsNegative() { + return ErrInvalidParamValue.Wrap("oracle parameter RewardBand must be between [0, 1]") + } + + if v.GT(math.LegacyOneDec()) { + return ErrInvalidParamValue.Wrap("oracle parameter RewardBand must be between [0, 1]") + } + + return nil +} + +func validateRewardDistributionWindow(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter RewardDistributionWindow must be > 0") + } + + return nil +} + +func validateDenomList(i interface{}) error { + v, ok := i.(DenomList) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + for _, d := range v { + if len(d.BaseDenom) == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter AcceptList Denom must have BaseDenom") + } + if len(d.SymbolDenom) == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter AcceptList Denom must have SymbolDenom") + } + } + + return nil +} + +func validateRewardBands(i interface{}) error { + v, ok := i.(RewardBandList) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + for _, d := range v { + if err := validateRewardBand(d.RewardBand); err != nil { + return err + } + if len(d.SymbolDenom) == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter RewardBand must have SymbolDenom") + } + } + + return nil +} + +func validateSlashFraction(i interface{}) error { + v, ok := i.(math.LegacyDec) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v.IsNegative() { + return ErrInvalidParamValue.Wrap("oracle parameter SlashFraction must be between [0, 1]") + } + + if v.GT(math.LegacyOneDec()) { + return ErrInvalidParamValue.Wrap("oracle parameter SlashFraction must be between [0, 1]") + } + + return nil +} + +func validateSlashWindow(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter SlashWindow must be > 0") + } + + return nil +} + +func validateMinValidPerWindow(i interface{}) error { + v, ok := i.(math.LegacyDec) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v.IsNegative() { + return ErrInvalidParamValue.Wrap("oracle parameter MinValidPerWindow must be between [0, 1]") + } + + if v.GT(math.LegacyOneDec()) { + return ErrInvalidParamValue.Wrap("oracle parameter MinValidPerWindow must be between [0, 1]") + } + + return nil +} + +func validateHistoricStampPeriod(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v < 1 { + return ErrInvalidParamValue.Wrap("oracle parameter HistoricStampPeriod must be > 0") + } + + return nil +} + +func validateMedianStampPeriod(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v < 1 { + return ErrInvalidParamValue.Wrap("oracle parameter MedianStampPeriod must be > 0") + } + + return nil +} + +func validateMaximumPriceStamps(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v < 1 { + return ErrInvalidParamValue.Wrap("oracle parameter MaximumPriceStamps must be > 0") + } + + return nil +} + +func validateMaximumMedianStamps(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v < 1 { + return ErrInvalidParamValue.Wrap("oracle parameter MaximumMedianStamps must be > 0") + } + + return nil +} + +func validateCurrencyPairProviders(i interface{}) error { + v, ok := i.(CurrencyPairProvidersList) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + for _, c := range v { + if len(c.BaseDenom) == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter CurrencyPairProviders must have BaseDenom") + } + if len(c.QuoteDenom) == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter CurrencyPairProviders must have QuoteDenom") + } + if len(c.Providers) < 1 { + return ErrInvalidParamValue.Wrap("oracle parameter CurrencyPairProviders must have at least 1 provider listed") + } + } + + return nil +} + +func validateCurrencyDeviationThresholds(i interface{}) error { + v, ok := i.(CurrencyDeviationThresholdList) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + for _, c := range v { + if len(c.BaseDenom) == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter CurrencyDeviationThreshold must have BaseDenom") + } + if len(c.Threshold) == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter CurrencyDeviationThreshold must have Threshold") + } + } + + return nil +} + +func validateString(i interface{}) error { + _, ok := i.(string) + if !ok { + return fmt.Errorf("invalid parameter type string: %T", i) + } + + return nil +} + +func validateBool(i interface{}) error { + _, ok := i.(bool) + if !ok { + return fmt.Errorf("invalid parameter type bool: %T", i) + } + return nil +} + +func validateAveragingWindow(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return ErrInvalidParamValue.Wrapf("invalid parameter type: %T", i) + } + + if v == 0 { + return ErrInvalidParamValue.Wrap("oracle parameter AveragingWindow must be > 0") + } + + return nil +} diff --git a/x/oracle/types/params_test.go b/x/oracle/types/params_test.go new file mode 100644 index 0000000..92dbc0e --- /dev/null +++ b/x/oracle/types/params_test.go @@ -0,0 +1,322 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "cosmossdk.io/math" +) + +func TestParamKeyTable(t *testing.T) { + require.NotNil(t, ParamKeyTable()) +} + +func TestValidateVotePeriod(t *testing.T) { + err := validateVotePeriod("invalidUint64") + require.ErrorContains(t, err, "invalid parameter type: string") + + err = validateVotePeriod(uint64(0)) + require.ErrorContains(t, err, "oracle parameter VotePeriod must be > 0") + + err = validateVotePeriod(uint64(10)) + require.Nil(t, err) +} + +func TestValidateVoteThreshold(t *testing.T) { + tcs := []struct { + name string + t math.LegacyDec + errMsg string + }{ + {"fail: negative", math.LegacyMustNewDecFromStr("-1"), "threshold must be"}, + {"fail: zero", math.LegacyZeroDec(), "threshold must be"}, + {"fail: less than 0.33", math.LegacyMustNewDecFromStr("0.3"), "threshold must be"}, + {"fail: equal 0.33", math.LegacyMustNewDecFromStr("0.33"), "threshold must be"}, + {"fail: more than 1", math.LegacyMustNewDecFromStr("1.1"), "threshold must be"}, + {"fail: more than 1", math.LegacyMustNewDecFromStr("10"), "threshold must be"}, + {"fail: max precision 2", math.LegacyMustNewDecFromStr("0.333"), "maximum 2 decimals"}, + {"fail: max precision 2", math.LegacyMustNewDecFromStr("0.401"), "maximum 2 decimals"}, + {"fail: max precision 2", math.LegacyMustNewDecFromStr("0.409"), "maximum 2 decimals"}, + {"fail: max precision 2", math.LegacyMustNewDecFromStr("0.4009"), "maximum 2 decimals"}, + {"fail: max precision 2", math.LegacyMustNewDecFromStr("0.999"), "maximum 2 decimals"}, + + {"ok: 1", math.LegacyMustNewDecFromStr("1"), ""}, + {"ok: 0.34", math.LegacyMustNewDecFromStr("0.34"), ""}, + {"ok: 0.99", math.LegacyMustNewDecFromStr("0.99"), ""}, + } + + for _, tc := range tcs { + err := validateVoteThreshold(tc.t) + if tc.errMsg == "" { + require.NoError(t, err, "test_case", tc.name) + } else { + require.ErrorContains(t, err, tc.errMsg, tc.name) + } + } +} + +func TestValidateRewardBand(t *testing.T) { + err := validateRewardBand("invalidSdkType") + require.ErrorContains(t, err, "invalid parameter type: string") + + err = validateRewardBand(math.LegacyMustNewDecFromStr("-0.31")) + require.ErrorContains(t, err, "oracle parameter RewardBand must be between [0, 1]") + + err = validateRewardBand(math.LegacyMustNewDecFromStr("40.0")) + require.ErrorContains(t, err, "oracle parameter RewardBand must be between [0, 1]") + + err = validateRewardBand(math.LegacyOneDec()) + require.Nil(t, err) +} + +func TestValidateRewardDistributionWindow(t *testing.T) { + err := validateRewardDistributionWindow("invalidUint64") + require.ErrorContains(t, err, "invalid parameter type: string") + + err = validateRewardDistributionWindow(uint64(0)) + require.ErrorContains(t, err, "oracle parameter RewardDistributionWindow must be > 0") + + err = validateRewardDistributionWindow(uint64(10)) + require.Nil(t, err) +} + +func TestValidateDenomList(t *testing.T) { + err := validateDenomList("invalidUint64") + require.ErrorContains(t, err, "invalid parameter type: string") + + err = validateDenomList(DenomList{ + {BaseDenom: ""}, + }) + require.ErrorContains(t, err, "oracle parameter AcceptList Denom must have BaseDenom") + + err = validateDenomList(DenomList{ + {BaseDenom: DenomDm.BaseDenom, SymbolDenom: ""}, + }) + require.ErrorContains(t, err, "oracle parameter AcceptList Denom must have SymbolDenom") + + err = validateDenomList(DenomList{ + {BaseDenom: DenomDm.BaseDenom, SymbolDenom: DenomDm.SymbolDenom}, + }) + require.Nil(t, err) +} + +func TestValidateSlashFraction(t *testing.T) { + err := validateSlashFraction("invalidSdkType") + require.ErrorContains(t, err, "invalid parameter type: string") + + err = validateSlashFraction(math.LegacyMustNewDecFromStr("-0.31")) + require.ErrorContains(t, err, "oracle parameter SlashFraction must be between [0, 1]") + + err = validateSlashFraction(math.LegacyMustNewDecFromStr("40.0")) + require.ErrorContains(t, err, "oracle parameter SlashFraction must be between [0, 1]") + + err = validateSlashFraction(math.LegacyOneDec()) + require.Nil(t, err) +} + +func TestValidateSlashWindow(t *testing.T) { + err := validateSlashWindow("invalidUint64") + require.ErrorContains(t, err, "invalid parameter type: string") + + err = validateSlashWindow(uint64(0)) + require.ErrorContains(t, err, "oracle parameter SlashWindow must be > 0") + + err = validateSlashWindow(uint64(10)) + require.Nil(t, err) +} + +func TestValidateMinValidPerWindow(t *testing.T) { + err := validateMinValidPerWindow("invalidSdkType") + require.ErrorContains(t, err, "invalid parameter type: string") + + err = validateMinValidPerWindow(math.LegacyMustNewDecFromStr("-0.31")) + require.ErrorContains(t, err, "oracle parameter MinValidPerWindow must be between [0, 1]") + + err = validateMinValidPerWindow(math.LegacyMustNewDecFromStr("40.0")) + require.ErrorContains(t, err, "oracle parameter MinValidPerWindow must be between [0, 1]") + + err = validateMinValidPerWindow(math.LegacyOneDec()) + require.Nil(t, err) +} + +func TestValidateCurrencyPairProviders(t *testing.T) { + err := validateCurrencyPairProviders("invalidSdkType") + require.ErrorContains(t, err, "invalid parameter type: string") + + err = validateCurrencyPairProviders( + CurrencyPairProvidersList{ + CurrencyPairProviders{ + QuoteDenom: USDSymbol, + Providers: []string{ + "1", + "2", + }, + }, + }, + ) + require.ErrorContains(t, err, "oracle parameter CurrencyPairProviders must have BaseDenom") + + err = validateCurrencyPairProviders( + CurrencyPairProvidersList{ + CurrencyPairProviders{ + BaseDenom: DmDenom, + Providers: []string{ + "1", + "2", + }, + }, + }, + ) + require.ErrorContains(t, err, "oracle parameter CurrencyPairProviders must have QuoteDenom") + + err = validateCurrencyPairProviders( + CurrencyPairProvidersList{ + CurrencyPairProviders{ + BaseDenom: DmDenom, + QuoteDenom: USDSymbol, + }, + }, + ) + require.ErrorContains(t, err, "oracle parameter CurrencyPairProviders must have at least 1 provider listed") + + err = validateCurrencyPairProviders( + CurrencyPairProvidersList{ + CurrencyPairProviders{ + BaseDenom: DmDenom, + QuoteDenom: USDSymbol, + Providers: []string{ + "1", + "2", + }, + }, + }, + ) + require.Nil(t, err) +} + +func TestValidateCurrencyDeviationThresholds(t *testing.T) { + err := validateCurrencyDeviationThresholds("invalidSdkType") + require.ErrorContains(t, err, "invalid parameter type: string") + + err = validateCurrencyDeviationThresholds( + CurrencyDeviationThresholdList{ + CurrencyDeviationThreshold{ + Threshold: "2", + }, + }, + ) + require.ErrorContains(t, err, "oracle parameter CurrencyDeviationThreshold must have BaseDenom") + + err = validateCurrencyDeviationThresholds( + CurrencyDeviationThresholdList{ + CurrencyDeviationThreshold{ + BaseDenom: DmDenom, + }, + }, + ) + require.ErrorContains(t, err, "oracle parameter CurrencyDeviationThreshold must have Threshold") + + err = validateCurrencyDeviationThresholds( + CurrencyDeviationThresholdList{ + CurrencyDeviationThreshold{ + BaseDenom: DmDenom, + Threshold: "2", + }, + }, + ) + require.Nil(t, err) +} + +func TestParamsEqual(t *testing.T) { + p1 := DefaultParams() + err := p1.Validate() + require.NoError(t, err) + + // minus vote period + p1.VotePeriod = 0 + err = p1.Validate() + require.Error(t, err) + + // small vote threshold + p2 := DefaultParams() + p2.VoteThreshold = math.LegacyZeroDec() + err = p2.Validate() + require.Error(t, err) + + // negative reward band + p3 := DefaultParams() + p3.RewardBands[0].RewardBand = math.LegacyNewDecWithPrec(-1, 2) + err = p3.Validate() + require.Error(t, err) + + // negative slash fraction + p4 := DefaultParams() + p4.SlashFraction = math.LegacyNewDec(-1) + err = p4.Validate() + require.Error(t, err) + + // negative min valid per window + p5 := DefaultParams() + p5.MinValidPerWindow = math.LegacyNewDec(-1) + err = p5.Validate() + require.Error(t, err) + + // small slash window + p6 := DefaultParams() + p6.SlashWindow = 0 + err = p6.Validate() + require.Error(t, err) + + // slash window not a multiple of vote period + p7 := DefaultParams() + p7.SlashWindow = 7 + p7.VotePeriod = 2 + err = p7.Validate() + require.Error(t, err) + + // small distribution window + p8 := DefaultParams() + p8.RewardDistributionWindow = 0 + err = p8.Validate() + require.Error(t, err) + + // empty name + p9 := DefaultParams() + p9.AcceptList[0].BaseDenom = "" + p9.AcceptList[0].SymbolDenom = "ATOM" + err = p9.Validate() + require.Error(t, err) + + // empty + p10 := DefaultParams() + p10.AcceptList[0].BaseDenom = "uatom" + p10.AcceptList[0].SymbolDenom = "" + err = p10.Validate() + require.Error(t, err) + + p11 := DefaultParams() + require.NotNil(t, p11.ParamSetPairs()) + require.NotNil(t, p11.String()) +} + +func TestAddDefaultRB(t *testing.T) { + p := DefaultRewardBands() + p.AddDefault("foo") + require.Equal(t, p.String(), + "symbol_denom: CHEQ\nreward_band: \"0.020000000000000000\"\n\n"+ + "symbol_denom: USDT\nreward_band: \"0.020000000000000000\"\n\n"+ + "symbol_denom: USDC\nreward_band: \"0.020000000000000000\"\n\n"+ + "symbol_denom: foo\nreward_band: \"0.020000000000000000\"") +} + +func TestValidateAveragingWindow(t *testing.T) { + err := validateSlashWindow("invalidUint64") + require.ErrorContains(t, err, "invalid parameter type: string") + + err = validateSlashWindow(uint64(0)) + require.ErrorContains(t, err, "oracle parameter SlashWindow must be > 0") + + err = validateSlashWindow(uint64(10)) + require.Nil(t, err) +} diff --git a/x/oracle/types/plan.go b/x/oracle/types/plan.go new file mode 100644 index 0000000..81670fc --- /dev/null +++ b/x/oracle/types/plan.go @@ -0,0 +1,121 @@ +package types + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (p ParamUpdatePlan) String() string { + due := p.DueAt() + return fmt.Sprintf(`Oracle Param Update Plan + Keys: %s + %s + Changes: %s.`, p.Keys, due, p.Changes) +} + +// ValidateBasic does basic validation of a ParamUpdatePlan +func (p ParamUpdatePlan) ValidateBasic() error { + if p.Height <= 0 { + return ErrInvalidRequest.Wrap("height must be greater than 0") + } + + for _, key := range p.Keys { + switch key { + case string(KeyVotePeriod): + if err := validateVotePeriod(p.Changes.VotePeriod); err != nil { + return err + } + + case string(KeyVoteThreshold): + if err := validateVoteThreshold(p.Changes.VoteThreshold); err != nil { + return err + } + + case string(KeyRewardBands): + if err := validateRewardBands(p.Changes.RewardBands); err != nil { + return err + } + + case string(KeyRewardDistributionWindow): + if err := validateRewardDistributionWindow(p.Changes.RewardDistributionWindow); err != nil { + return err + } + + case string(KeyAcceptList): + if err := validateDenomList(p.Changes.AcceptList); err != nil { + return err + } + + case string(KeyMandatoryList): + if err := validateDenomList(p.Changes.MandatoryList); err != nil { + return err + } + + case string(KeySlashFraction): + if err := validateSlashFraction(p.Changes.SlashFraction); err != nil { + return err + } + + case string(KeySlashWindow): + if err := validateSlashWindow(p.Changes.SlashWindow); err != nil { + return err + } + + case string(KeyMinValidPerWindow): + if err := validateMinValidPerWindow(p.Changes.MinValidPerWindow); err != nil { + return err + } + + case string(KeyHistoricStampPeriod): + if err := validateHistoricStampPeriod(p.Changes.HistoricStampPeriod); err != nil { + return err + } + + case string(KeyMedianStampPeriod): + if err := validateMedianStampPeriod(p.Changes.MedianStampPeriod); err != nil { + return err + } + + case string(KeyMaximumPriceStamps): + if err := validateMaximumPriceStamps(p.Changes.MaximumPriceStamps); err != nil { + return err + } + + case string(KeyMaximumMedianStamps): + if err := validateMaximumMedianStamps(p.Changes.MaximumMedianStamps); err != nil { + return err + } + + case string(KeyCurrencyPairProviders): + if err := validateCurrencyPairProviders(p.Changes.CurrencyPairProviders); err != nil { + return err + } + + case string(KeyCurrencyDeviationThresholds): + if err := validateCurrencyDeviationThresholds(p.Changes.CurrencyDeviationThresholds); err != nil { + return err + } + + case string(KeyUsdcIbcDenom): + if err := validateString(p.Changes.UsdcIbcDenom); err != nil { + return err + } + + default: + return fmt.Errorf("%s is not an existing oracle param key", key) + } + } + + return nil +} + +// ShouldExecute returns true if the Plan is ready to execute given the current context +func (p ParamUpdatePlan) ShouldExecute(ctx sdk.Context) bool { + return p.Height == ctx.BlockHeight() +} + +// DueAt is a string representation of when this plan is due to be executed +func (p ParamUpdatePlan) DueAt() string { + return fmt.Sprintf("height: %d", p.Height) +} diff --git a/x/oracle/types/price_stamp.go b/x/oracle/types/price_stamp.go new file mode 100644 index 0000000..ef95eb1 --- /dev/null +++ b/x/oracle/types/price_stamp.go @@ -0,0 +1,83 @@ +package types + +import ( + "sort" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type PriceStamps []PriceStamp + +func NewPriceStamp(exchangeRate math.LegacyDec, denom string, blockNum uint64) *PriceStamp { + return &PriceStamp{ + ExchangeRate: &sdk.DecCoin{ + Amount: exchangeRate, + Denom: denom, + }, + BlockNum: blockNum, + } +} + +// Decs returns the exchange rates in math.LegacyDec format +func (p *PriceStamps) Decs() []math.LegacyDec { + decs := []math.LegacyDec{} + for _, priceStamp := range *p { + decs = append(decs, priceStamp.ExchangeRate.Amount) + } + return decs +} + +// FilterByBlock filters the PriceStamps by block number +func (p *PriceStamps) FilterByBlock(blockNum uint64) *PriceStamps { + priceStamps := PriceStamps{} + for _, priceStamp := range *p { + if priceStamp.BlockNum == blockNum { + priceStamps = append(priceStamps, priceStamp) + } + } + return &priceStamps +} + +// FilterByDenom filters the PriceStamps by denom +func (p *PriceStamps) FilterByDenom(denom string) *PriceStamps { + priceStamps := PriceStamps{} + for _, priceStamp := range *p { + if priceStamp.ExchangeRate.Denom == denom { + priceStamps = append(priceStamps, priceStamp) + } + } + return &priceStamps +} + +// Sort sorts the PriceStamps by block number and denom +func (p *PriceStamps) Sort() *PriceStamps { + priceStamps := *p + sort.Slice( + priceStamps, + func(i, j int) bool { + if priceStamps[i].BlockNum == priceStamps[j].BlockNum { + return priceStamps[i].ExchangeRate.Denom < priceStamps[j].ExchangeRate.Denom + } + return priceStamps[i].BlockNum < priceStamps[j].BlockNum + }, + ) + return &priceStamps +} + +// NewestPrices returns PriceStamps at the newest block number +func (p *PriceStamps) NewestPrices() *PriceStamps { + blockNum := p.NewestBlockNum() + return p.FilterByBlock(blockNum) +} + +// NewestBlockNum returns the newest block number in the PriceStamps +func (p *PriceStamps) NewestBlockNum() uint64 { + blockNum := uint64(0) + for _, price := range *p { + if price.BlockNum > blockNum { + blockNum = price.BlockNum + } + } + return blockNum +} diff --git a/x/oracle/types/proposal.go b/x/oracle/types/proposal.go new file mode 100644 index 0000000..410465a --- /dev/null +++ b/x/oracle/types/proposal.go @@ -0,0 +1,123 @@ +package types + +import ( + gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" +) + +var ( + proposalTypeMsgLegacyGovUpdateParams = MsgLegacyGovUpdateParams{}.String() + proposalTypeMsgGovUpdateParams = MsgGovUpdateParams{}.String() + proposalTypeMsgGovCancelUpdateParams = MsgGovCancelUpdateParamPlan{}.String() + proposalTypeMsgGovAddDenoms = MsgGovAddDenoms{}.String() + proposalTypeMsgGovRemoveCurrencyPairProviders = MsgGovRemoveCurrencyPairProviders{}.String() + proposalTypeMsgGovRemoveCurrencyDeviationThresholds = MsgGovRemoveCurrencyDeviationThresholds{}.String() +) + +func init() { + gov.RegisterProposalType(proposalTypeMsgLegacyGovUpdateParams) + gov.RegisterProposalType(proposalTypeMsgGovUpdateParams) + gov.RegisterProposalType(proposalTypeMsgGovCancelUpdateParams) + gov.RegisterProposalType(proposalTypeMsgGovAddDenoms) + gov.RegisterProposalType(proposalTypeMsgGovRemoveCurrencyPairProviders) + gov.RegisterProposalType(proposalTypeMsgGovRemoveCurrencyDeviationThresholds) +} + +// Implements Proposal Interface +var _ gov.Content = &MsgLegacyGovUpdateParams{} + +// GetTitle returns the title of a community pool spend proposal. +func (msg *MsgLegacyGovUpdateParams) GetTitle() string { return msg.Title } + +// GetDescription returns the description of a community pool spend proposal. +func (msg *MsgLegacyGovUpdateParams) GetDescription() string { return msg.Description } + +// GetDescription returns the routing key of a community pool spend proposal. +func (msg *MsgLegacyGovUpdateParams) ProposalRoute() string { return RouterKey } + +// ProposalType returns the type of a community pool spend proposal. +func (msg *MsgLegacyGovUpdateParams) ProposalType() string { + return proposalTypeMsgLegacyGovUpdateParams +} + +// Implements Proposal Interface +var _ gov.Content = &MsgGovUpdateParams{} + +// GetTitle returns the title of a community pool spend proposal. +func (msg *MsgGovUpdateParams) GetTitle() string { return msg.Title } + +// GetDescription returns the description of a community pool spend proposal. +func (msg *MsgGovUpdateParams) GetDescription() string { return msg.Description } + +// GetDescription returns the routing key of a community pool spend proposal. +func (msg *MsgGovUpdateParams) ProposalRoute() string { return RouterKey } + +// ProposalType returns the type of a community pool spend proposal. +func (msg *MsgGovUpdateParams) ProposalType() string { return proposalTypeMsgGovUpdateParams } + +// Implements Proposal Interface +var _ gov.Content = &MsgGovCancelUpdateParamPlan{} + +// GetTitle returns the title of a community pool spend proposal. +func (msg *MsgGovCancelUpdateParamPlan) GetTitle() string { return msg.Title } + +// GetDescription returns the description of a community pool spend proposal. +func (msg *MsgGovCancelUpdateParamPlan) GetDescription() string { return msg.Description } + +// GetDescription returns the routing key of a community pool spend proposal. +func (msg *MsgGovCancelUpdateParamPlan) ProposalRoute() string { return RouterKey } + +// ProposalType returns the type of a community pool spend proposal. +func (msg *MsgGovCancelUpdateParamPlan) ProposalType() string { + return proposalTypeMsgGovCancelUpdateParams +} + +// Implements Proposal Interface +var _ gov.Content = &MsgGovAddDenoms{} + +// GetTitle returns the title of a community pool spend proposal. +func (msg *MsgGovAddDenoms) GetTitle() string { return msg.Title } + +// GetDescription returns the description of a community pool spend proposal. +func (msg *MsgGovAddDenoms) GetDescription() string { return msg.Description } + +// GetDescription returns the routing key of a community pool spend proposal. +func (msg *MsgGovAddDenoms) ProposalRoute() string { return RouterKey } + +// ProposalType returns the type of a community pool spend proposal. +func (msg *MsgGovAddDenoms) ProposalType() string { + return proposalTypeMsgGovAddDenoms +} + +// Implements Proposal Interface +var _ gov.Content = &MsgGovRemoveCurrencyPairProviders{} + +// GetTitle returns the title of a community pool spend proposal. +func (msg *MsgGovRemoveCurrencyPairProviders) GetTitle() string { return msg.Title } + +// GetDescription returns the description of a community pool spend proposal. +func (msg *MsgGovRemoveCurrencyPairProviders) GetDescription() string { return msg.Description } + +// GetDescription returns the routing key of a community pool spend proposal. +func (msg *MsgGovRemoveCurrencyPairProviders) ProposalRoute() string { return RouterKey } + +// ProposalType returns the type of a community pool spend proposal. +func (msg *MsgGovRemoveCurrencyPairProviders) ProposalType() string { + return proposalTypeMsgGovRemoveCurrencyPairProviders +} + +// Implements Proposal Interface +var _ gov.Content = &MsgGovRemoveCurrencyDeviationThresholds{} + +// GetTitle returns the title of a community pool spend proposal. +func (msg *MsgGovRemoveCurrencyDeviationThresholds) GetTitle() string { return msg.Title } + +// GetDescription returns the description of a community pool spend proposal. +func (msg *MsgGovRemoveCurrencyDeviationThresholds) GetDescription() string { return msg.Description } + +// GetDescription returns the routing key of a community pool spend proposal. +func (msg *MsgGovRemoveCurrencyDeviationThresholds) ProposalRoute() string { return RouterKey } + +// ProposalType returns the type of a community pool spend proposal. +func (msg *MsgGovRemoveCurrencyDeviationThresholds) ProposalType() string { + return proposalTypeMsgGovRemoveCurrencyDeviationThresholds +} diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go new file mode 100644 index 0000000..1aba6f6 --- /dev/null +++ b/x/oracle/types/query.pb.go @@ -0,0 +1,6138 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: oracle/v1/query.proto + +package types + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryExchangeRates is the request type for the Query/ExchangeRate RPC +// method. +type QueryExchangeRates struct { + // denom defines the denomination to query for. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryExchangeRates) Reset() { *m = QueryExchangeRates{} } +func (m *QueryExchangeRates) String() string { return proto.CompactTextString(m) } +func (*QueryExchangeRates) ProtoMessage() {} +func (*QueryExchangeRates) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{0} +} +func (m *QueryExchangeRates) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryExchangeRates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryExchangeRates.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryExchangeRates) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryExchangeRates.Merge(m, src) +} +func (m *QueryExchangeRates) XXX_Size() int { + return m.Size() +} +func (m *QueryExchangeRates) XXX_DiscardUnknown() { + xxx_messageInfo_QueryExchangeRates.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryExchangeRates proto.InternalMessageInfo + +// QueryExchangeRatesResponse is response type for the +// Query/ExchangeRates RPC method. +type QueryExchangeRatesResponse struct { + // exchange_rates defines a list of the exchange rate for all whitelisted + // denoms. + ExchangeRates github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=exchange_rates,json=exchangeRates,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"exchange_rates"` +} + +func (m *QueryExchangeRatesResponse) Reset() { *m = QueryExchangeRatesResponse{} } +func (m *QueryExchangeRatesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryExchangeRatesResponse) ProtoMessage() {} +func (*QueryExchangeRatesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{1} +} +func (m *QueryExchangeRatesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryExchangeRatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryExchangeRatesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryExchangeRatesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryExchangeRatesResponse.Merge(m, src) +} +func (m *QueryExchangeRatesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryExchangeRatesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryExchangeRatesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryExchangeRatesResponse proto.InternalMessageInfo + +// QueryActiveExchangeRates is the request type for the +// Query/ActiveExchangeRates RPC method. +type QueryActiveExchangeRates struct { +} + +func (m *QueryActiveExchangeRates) Reset() { *m = QueryActiveExchangeRates{} } +func (m *QueryActiveExchangeRates) String() string { return proto.CompactTextString(m) } +func (*QueryActiveExchangeRates) ProtoMessage() {} +func (*QueryActiveExchangeRates) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{2} +} +func (m *QueryActiveExchangeRates) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryActiveExchangeRates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryActiveExchangeRates.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryActiveExchangeRates) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryActiveExchangeRates.Merge(m, src) +} +func (m *QueryActiveExchangeRates) XXX_Size() int { + return m.Size() +} +func (m *QueryActiveExchangeRates) XXX_DiscardUnknown() { + xxx_messageInfo_QueryActiveExchangeRates.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryActiveExchangeRates proto.InternalMessageInfo + +// QueryActiveExchangeRatesResponse is response type for the +// Query/ActiveExchangeRates RPC method. +type QueryActiveExchangeRatesResponse struct { + // activeRates defines a list of the denomination which oracle prices aggreed + // upon. + ActiveRates []string `protobuf:"bytes,1,rep,name=active_rates,json=activeRates,proto3" json:"active_rates,omitempty"` +} + +func (m *QueryActiveExchangeRatesResponse) Reset() { *m = QueryActiveExchangeRatesResponse{} } +func (m *QueryActiveExchangeRatesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryActiveExchangeRatesResponse) ProtoMessage() {} +func (*QueryActiveExchangeRatesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{3} +} +func (m *QueryActiveExchangeRatesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryActiveExchangeRatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryActiveExchangeRatesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryActiveExchangeRatesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryActiveExchangeRatesResponse.Merge(m, src) +} +func (m *QueryActiveExchangeRatesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryActiveExchangeRatesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryActiveExchangeRatesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryActiveExchangeRatesResponse proto.InternalMessageInfo + +// QueryFeederDelegation is the request type for the +// Query/FeederDelegation RPC method. +type QueryFeederDelegation struct { + // validator defines the validator address to query for. + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` +} + +func (m *QueryFeederDelegation) Reset() { *m = QueryFeederDelegation{} } +func (m *QueryFeederDelegation) String() string { return proto.CompactTextString(m) } +func (*QueryFeederDelegation) ProtoMessage() {} +func (*QueryFeederDelegation) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{4} +} +func (m *QueryFeederDelegation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeederDelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeederDelegation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeederDelegation) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeederDelegation.Merge(m, src) +} +func (m *QueryFeederDelegation) XXX_Size() int { + return m.Size() +} +func (m *QueryFeederDelegation) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeederDelegation.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeederDelegation proto.InternalMessageInfo + +// QueryFeederDelegationResponse is response type for the +// Query/FeederDelegation RPC method. +type QueryFeederDelegationResponse struct { + // feeder_addr defines the feeder delegation of a validator + FeederAddr string `protobuf:"bytes,1,opt,name=feeder_addr,json=feederAddr,proto3" json:"feeder_addr,omitempty"` +} + +func (m *QueryFeederDelegationResponse) Reset() { *m = QueryFeederDelegationResponse{} } +func (m *QueryFeederDelegationResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFeederDelegationResponse) ProtoMessage() {} +func (*QueryFeederDelegationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{5} +} +func (m *QueryFeederDelegationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeederDelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeederDelegationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeederDelegationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeederDelegationResponse.Merge(m, src) +} +func (m *QueryFeederDelegationResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFeederDelegationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeederDelegationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeederDelegationResponse proto.InternalMessageInfo + +// QueryMissCounter is the request type for the Query/MissCounter RPC +// method. +type QueryMissCounter struct { + // validator defines the validator address to query for. + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` +} + +func (m *QueryMissCounter) Reset() { *m = QueryMissCounter{} } +func (m *QueryMissCounter) String() string { return proto.CompactTextString(m) } +func (*QueryMissCounter) ProtoMessage() {} +func (*QueryMissCounter) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{6} +} +func (m *QueryMissCounter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMissCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMissCounter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMissCounter) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMissCounter.Merge(m, src) +} +func (m *QueryMissCounter) XXX_Size() int { + return m.Size() +} +func (m *QueryMissCounter) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMissCounter.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMissCounter proto.InternalMessageInfo + +// QueryMissCounterResponse is response type for the +// Query/MissCounter RPC method. +type QueryMissCounterResponse struct { + // miss_counter defines the oracle miss counter of a validator + MissCounter uint64 `protobuf:"varint,1,opt,name=miss_counter,json=missCounter,proto3" json:"miss_counter,omitempty"` +} + +func (m *QueryMissCounterResponse) Reset() { *m = QueryMissCounterResponse{} } +func (m *QueryMissCounterResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMissCounterResponse) ProtoMessage() {} +func (*QueryMissCounterResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{7} +} +func (m *QueryMissCounterResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMissCounterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMissCounterResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMissCounterResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMissCounterResponse.Merge(m, src) +} +func (m *QueryMissCounterResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMissCounterResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMissCounterResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMissCounterResponse proto.InternalMessageInfo + +// QuerySlashWindow is the request type for the +// Query/SlashWindow RPC method. +type QuerySlashWindow struct { +} + +func (m *QuerySlashWindow) Reset() { *m = QuerySlashWindow{} } +func (m *QuerySlashWindow) String() string { return proto.CompactTextString(m) } +func (*QuerySlashWindow) ProtoMessage() {} +func (*QuerySlashWindow) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{8} +} +func (m *QuerySlashWindow) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySlashWindow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySlashWindow.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySlashWindow) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySlashWindow.Merge(m, src) +} +func (m *QuerySlashWindow) XXX_Size() int { + return m.Size() +} +func (m *QuerySlashWindow) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySlashWindow.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySlashWindow proto.InternalMessageInfo + +// QuerySlashWindowResponse is response type for the +// Query/SlashWindow RPC method. +type QuerySlashWindowResponse struct { + // window_progress defines the number of voting periods + // since the last slashing event would have taken place. + WindowProgress uint64 `protobuf:"varint,1,opt,name=window_progress,json=windowProgress,proto3" json:"window_progress,omitempty"` +} + +func (m *QuerySlashWindowResponse) Reset() { *m = QuerySlashWindowResponse{} } +func (m *QuerySlashWindowResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySlashWindowResponse) ProtoMessage() {} +func (*QuerySlashWindowResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{9} +} +func (m *QuerySlashWindowResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySlashWindowResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySlashWindowResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySlashWindowResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySlashWindowResponse.Merge(m, src) +} +func (m *QuerySlashWindowResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySlashWindowResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySlashWindowResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySlashWindowResponse proto.InternalMessageInfo + +// QueryAggregatePrevote is the request type for the +// Query/AggregatePrevote RPC method. +type QueryAggregatePrevote struct { + // validator defines the validator address to query for. + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` +} + +func (m *QueryAggregatePrevote) Reset() { *m = QueryAggregatePrevote{} } +func (m *QueryAggregatePrevote) String() string { return proto.CompactTextString(m) } +func (*QueryAggregatePrevote) ProtoMessage() {} +func (*QueryAggregatePrevote) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{10} +} +func (m *QueryAggregatePrevote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregatePrevote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregatePrevote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregatePrevote) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregatePrevote.Merge(m, src) +} +func (m *QueryAggregatePrevote) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregatePrevote) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregatePrevote.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregatePrevote proto.InternalMessageInfo + +// QueryAggregatePrevoteResponse is response type for the +// Query/AggregatePrevote RPC method. +type QueryAggregatePrevoteResponse struct { + // aggregate_prevote defines oracle aggregate prevote submitted by a validator + // in the current vote period + AggregatePrevote AggregateExchangeRatePrevote `protobuf:"bytes,1,opt,name=aggregate_prevote,json=aggregatePrevote,proto3" json:"aggregate_prevote"` +} + +func (m *QueryAggregatePrevoteResponse) Reset() { *m = QueryAggregatePrevoteResponse{} } +func (m *QueryAggregatePrevoteResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAggregatePrevoteResponse) ProtoMessage() {} +func (*QueryAggregatePrevoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{11} +} +func (m *QueryAggregatePrevoteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregatePrevoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregatePrevoteResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregatePrevoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregatePrevoteResponse.Merge(m, src) +} +func (m *QueryAggregatePrevoteResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregatePrevoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregatePrevoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregatePrevoteResponse proto.InternalMessageInfo + +// QueryAggregatePrevotes is the request type for the +// Query/AggregatePrevotes RPC method. +type QueryAggregatePrevotes struct { +} + +func (m *QueryAggregatePrevotes) Reset() { *m = QueryAggregatePrevotes{} } +func (m *QueryAggregatePrevotes) String() string { return proto.CompactTextString(m) } +func (*QueryAggregatePrevotes) ProtoMessage() {} +func (*QueryAggregatePrevotes) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{12} +} +func (m *QueryAggregatePrevotes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregatePrevotes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregatePrevotes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregatePrevotes) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregatePrevotes.Merge(m, src) +} +func (m *QueryAggregatePrevotes) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregatePrevotes) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregatePrevotes.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregatePrevotes proto.InternalMessageInfo + +// QueryAggregatePrevotesResponse is response type for the +// Query/AggregatePrevotes RPC method. +type QueryAggregatePrevotesResponse struct { + // aggregate_prevotes defines all oracle aggregate prevotes submitted in the + // current vote period + AggregatePrevotes []AggregateExchangeRatePrevote `protobuf:"bytes,1,rep,name=aggregate_prevotes,json=aggregatePrevotes,proto3" json:"aggregate_prevotes"` +} + +func (m *QueryAggregatePrevotesResponse) Reset() { *m = QueryAggregatePrevotesResponse{} } +func (m *QueryAggregatePrevotesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAggregatePrevotesResponse) ProtoMessage() {} +func (*QueryAggregatePrevotesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{13} +} +func (m *QueryAggregatePrevotesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregatePrevotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregatePrevotesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregatePrevotesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregatePrevotesResponse.Merge(m, src) +} +func (m *QueryAggregatePrevotesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregatePrevotesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregatePrevotesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregatePrevotesResponse proto.InternalMessageInfo + +// QueryAggregateVote is the request type for the Query/AggregateVote RPC +// method. +type QueryAggregateVote struct { + // validator defines the validator address to query for. + ValidatorAddr string `protobuf:"bytes,1,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` +} + +func (m *QueryAggregateVote) Reset() { *m = QueryAggregateVote{} } +func (m *QueryAggregateVote) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateVote) ProtoMessage() {} +func (*QueryAggregateVote) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{14} +} +func (m *QueryAggregateVote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateVote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateVote.Merge(m, src) +} +func (m *QueryAggregateVote) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateVote) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateVote.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateVote proto.InternalMessageInfo + +// QueryAggregateVoteResponse is response type for the +// Query/AggregateVote RPC method. +type QueryAggregateVoteResponse struct { + // aggregate_vote defines oracle aggregate vote submitted by a validator in + // the current vote period + AggregateVote AggregateExchangeRateVote `protobuf:"bytes,1,opt,name=aggregate_vote,json=aggregateVote,proto3" json:"aggregate_vote"` +} + +func (m *QueryAggregateVoteResponse) Reset() { *m = QueryAggregateVoteResponse{} } +func (m *QueryAggregateVoteResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateVoteResponse) ProtoMessage() {} +func (*QueryAggregateVoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{15} +} +func (m *QueryAggregateVoteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateVoteResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateVoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateVoteResponse.Merge(m, src) +} +func (m *QueryAggregateVoteResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateVoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateVoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateVoteResponse proto.InternalMessageInfo + +// QueryAggregateVotes is the request type for the Query/AggregateVotes +// RPC method. +type QueryAggregateVotes struct { +} + +func (m *QueryAggregateVotes) Reset() { *m = QueryAggregateVotes{} } +func (m *QueryAggregateVotes) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateVotes) ProtoMessage() {} +func (*QueryAggregateVotes) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{16} +} +func (m *QueryAggregateVotes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateVotes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateVotes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateVotes) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateVotes.Merge(m, src) +} +func (m *QueryAggregateVotes) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateVotes) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateVotes.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateVotes proto.InternalMessageInfo + +// QueryAggregateVotesResponse is response type for the +// Query/AggregateVotes RPC method. +type QueryAggregateVotesResponse struct { + // aggregate_votes defines all oracle aggregate votes submitted in the current + // vote period + AggregateVotes []AggregateExchangeRateVote `protobuf:"bytes,1,rep,name=aggregate_votes,json=aggregateVotes,proto3" json:"aggregate_votes"` +} + +func (m *QueryAggregateVotesResponse) Reset() { *m = QueryAggregateVotesResponse{} } +func (m *QueryAggregateVotesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateVotesResponse) ProtoMessage() {} +func (*QueryAggregateVotesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{17} +} +func (m *QueryAggregateVotesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateVotesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateVotesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateVotesResponse.Merge(m, src) +} +func (m *QueryAggregateVotesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateVotesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateVotesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateVotesResponse proto.InternalMessageInfo + +// QueryParams is the request type for the Query/Params RPC method. +type QueryParams struct { +} + +func (m *QueryParams) Reset() { *m = QueryParams{} } +func (m *QueryParams) String() string { return proto.CompactTextString(m) } +func (*QueryParams) ProtoMessage() {} +func (*QueryParams) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{18} +} +func (m *QueryParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParams.Merge(m, src) +} +func (m *QueryParams) XXX_Size() int { + return m.Size() +} +func (m *QueryParams) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParams.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParams proto.InternalMessageInfo + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params defines the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{19} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +// QueryMedians is the request type for the Query/Medians RPC Response. +type QueryMedians struct { + // denom defines the denomination to query for. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // numStamps defines the number of median stamps to query for. numStamps + // must be greater than 0. + NumStamps uint32 `protobuf:"varint,2,opt,name=num_stamps,json=numStamps,proto3" json:"num_stamps,omitempty"` +} + +func (m *QueryMedians) Reset() { *m = QueryMedians{} } +func (m *QueryMedians) String() string { return proto.CompactTextString(m) } +func (*QueryMedians) ProtoMessage() {} +func (*QueryMedians) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{20} +} +func (m *QueryMedians) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMedians) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMedians.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMedians) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMedians.Merge(m, src) +} +func (m *QueryMedians) XXX_Size() int { + return m.Size() +} +func (m *QueryMedians) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMedians.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMedians proto.InternalMessageInfo + +// QueryMediansResponse is response type for the +// Query/Medians RPC method. +type QueryMediansResponse struct { + // medians defines a list of the medians for all stamped denoms. + Medians []PriceStamp `protobuf:"bytes,1,rep,name=medians,proto3" json:"medians"` +} + +func (m *QueryMediansResponse) Reset() { *m = QueryMediansResponse{} } +func (m *QueryMediansResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMediansResponse) ProtoMessage() {} +func (*QueryMediansResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{21} +} +func (m *QueryMediansResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMediansResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMediansResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMediansResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMediansResponse.Merge(m, src) +} +func (m *QueryMediansResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMediansResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMediansResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMediansResponse proto.InternalMessageInfo + +// QueryMedianDeviations is the request type for the Query/MedianDeviations RPC +// Response. +type QueryMedianDeviations struct { + // denom defines the denomination to query for. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryMedianDeviations) Reset() { *m = QueryMedianDeviations{} } +func (m *QueryMedianDeviations) String() string { return proto.CompactTextString(m) } +func (*QueryMedianDeviations) ProtoMessage() {} +func (*QueryMedianDeviations) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{22} +} +func (m *QueryMedianDeviations) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMedianDeviations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMedianDeviations.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMedianDeviations) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMedianDeviations.Merge(m, src) +} +func (m *QueryMedianDeviations) XXX_Size() int { + return m.Size() +} +func (m *QueryMedianDeviations) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMedianDeviations.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMedianDeviations proto.InternalMessageInfo + +// QueryMedianDeviationsResponse is response type for the +// Query/MedianDeviations RPC method. +type QueryMedianDeviationsResponse struct { + // medians defines a list of the median deviations for all stamped denoms. + MedianDeviations []PriceStamp `protobuf:"bytes,1,rep,name=median_deviations,json=medianDeviations,proto3" json:"median_deviations"` +} + +func (m *QueryMedianDeviationsResponse) Reset() { *m = QueryMedianDeviationsResponse{} } +func (m *QueryMedianDeviationsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMedianDeviationsResponse) ProtoMessage() {} +func (*QueryMedianDeviationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{23} +} +func (m *QueryMedianDeviationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMedianDeviationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMedianDeviationsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMedianDeviationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMedianDeviationsResponse.Merge(m, src) +} +func (m *QueryMedianDeviationsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMedianDeviationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMedianDeviationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMedianDeviationsResponse proto.InternalMessageInfo + +// QueryValidatorRewardSet is the request type for the Query/ValidatorRewardSet RPC method. +type QueryValidatorRewardSet struct { +} + +func (m *QueryValidatorRewardSet) Reset() { *m = QueryValidatorRewardSet{} } +func (m *QueryValidatorRewardSet) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorRewardSet) ProtoMessage() {} +func (*QueryValidatorRewardSet) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{24} +} +func (m *QueryValidatorRewardSet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorRewardSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorRewardSet.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorRewardSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorRewardSet.Merge(m, src) +} +func (m *QueryValidatorRewardSet) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorRewardSet) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorRewardSet.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorRewardSet proto.InternalMessageInfo + +// QueryValidatorRewardSetResponse is the response type for the Query/ValidatorRewardSet RPC method. +type QueryValidatorRewardSetResponse struct { + Validators ValidatorRewardSet `protobuf:"bytes,1,opt,name=validators,proto3" json:"validators"` +} + +func (m *QueryValidatorRewardSetResponse) Reset() { *m = QueryValidatorRewardSetResponse{} } +func (m *QueryValidatorRewardSetResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorRewardSetResponse) ProtoMessage() {} +func (*QueryValidatorRewardSetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{25} +} +func (m *QueryValidatorRewardSetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorRewardSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorRewardSetResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorRewardSetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorRewardSetResponse.Merge(m, src) +} +func (m *QueryValidatorRewardSetResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorRewardSetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorRewardSetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorRewardSetResponse proto.InternalMessageInfo + +type QueryEMARequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryEMARequest) Reset() { *m = QueryEMARequest{} } +func (m *QueryEMARequest) String() string { return proto.CompactTextString(m) } +func (*QueryEMARequest) ProtoMessage() {} +func (*QueryEMARequest) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{26} +} +func (m *QueryEMARequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryEMARequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryEMARequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryEMARequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryEMARequest.Merge(m, src) +} +func (m *QueryEMARequest) XXX_Size() int { + return m.Size() +} +func (m *QueryEMARequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryEMARequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryEMARequest proto.InternalMessageInfo + +type QueryEMAResponse struct { + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` +} + +func (m *QueryEMAResponse) Reset() { *m = QueryEMAResponse{} } +func (m *QueryEMAResponse) String() string { return proto.CompactTextString(m) } +func (*QueryEMAResponse) ProtoMessage() {} +func (*QueryEMAResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{27} +} +func (m *QueryEMAResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryEMAResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryEMAResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryEMAResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryEMAResponse.Merge(m, src) +} +func (m *QueryEMAResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryEMAResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryEMAResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryEMAResponse proto.InternalMessageInfo + +type QueryWMARequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Strategy string `protobuf:"bytes,2,opt,name=strategy,proto3" json:"strategy,omitempty"` + CustomWeights []int64 `protobuf:"varint,3,rep,packed,name=custom_weights,json=customWeights,proto3" json:"custom_weights,omitempty"` +} + +func (m *QueryWMARequest) Reset() { *m = QueryWMARequest{} } +func (m *QueryWMARequest) String() string { return proto.CompactTextString(m) } +func (*QueryWMARequest) ProtoMessage() {} +func (*QueryWMARequest) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{28} +} +func (m *QueryWMARequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryWMARequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryWMARequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryWMARequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWMARequest.Merge(m, src) +} +func (m *QueryWMARequest) XXX_Size() int { + return m.Size() +} +func (m *QueryWMARequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWMARequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryWMARequest proto.InternalMessageInfo + +type QueryWMAResponse struct { + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` +} + +func (m *QueryWMAResponse) Reset() { *m = QueryWMAResponse{} } +func (m *QueryWMAResponse) String() string { return proto.CompactTextString(m) } +func (*QueryWMAResponse) ProtoMessage() {} +func (*QueryWMAResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{29} +} +func (m *QueryWMAResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryWMAResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryWMAResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryWMAResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWMAResponse.Merge(m, src) +} +func (m *QueryWMAResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryWMAResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWMAResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryWMAResponse proto.InternalMessageInfo + +type QuerySMARequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QuerySMARequest) Reset() { *m = QuerySMARequest{} } +func (m *QuerySMARequest) String() string { return proto.CompactTextString(m) } +func (*QuerySMARequest) ProtoMessage() {} +func (*QuerySMARequest) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{30} +} +func (m *QuerySMARequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySMARequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySMARequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySMARequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySMARequest.Merge(m, src) +} +func (m *QuerySMARequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySMARequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySMARequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySMARequest proto.InternalMessageInfo + +type QuerySMAResponse struct { + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` +} + +func (m *QuerySMAResponse) Reset() { *m = QuerySMAResponse{} } +func (m *QuerySMAResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySMAResponse) ProtoMessage() {} +func (*QuerySMAResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_34238c8dfdfcd7ec, []int{31} +} +func (m *QuerySMAResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySMAResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySMAResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySMAResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySMAResponse.Merge(m, src) +} +func (m *QuerySMAResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySMAResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySMAResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySMAResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*QueryExchangeRates)(nil), "oracle.v1.QueryExchangeRates") + proto.RegisterType((*QueryExchangeRatesResponse)(nil), "oracle.v1.QueryExchangeRatesResponse") + proto.RegisterType((*QueryActiveExchangeRates)(nil), "oracle.v1.QueryActiveExchangeRates") + proto.RegisterType((*QueryActiveExchangeRatesResponse)(nil), "oracle.v1.QueryActiveExchangeRatesResponse") + proto.RegisterType((*QueryFeederDelegation)(nil), "oracle.v1.QueryFeederDelegation") + proto.RegisterType((*QueryFeederDelegationResponse)(nil), "oracle.v1.QueryFeederDelegationResponse") + proto.RegisterType((*QueryMissCounter)(nil), "oracle.v1.QueryMissCounter") + proto.RegisterType((*QueryMissCounterResponse)(nil), "oracle.v1.QueryMissCounterResponse") + proto.RegisterType((*QuerySlashWindow)(nil), "oracle.v1.QuerySlashWindow") + proto.RegisterType((*QuerySlashWindowResponse)(nil), "oracle.v1.QuerySlashWindowResponse") + proto.RegisterType((*QueryAggregatePrevote)(nil), "oracle.v1.QueryAggregatePrevote") + proto.RegisterType((*QueryAggregatePrevoteResponse)(nil), "oracle.v1.QueryAggregatePrevoteResponse") + proto.RegisterType((*QueryAggregatePrevotes)(nil), "oracle.v1.QueryAggregatePrevotes") + proto.RegisterType((*QueryAggregatePrevotesResponse)(nil), "oracle.v1.QueryAggregatePrevotesResponse") + proto.RegisterType((*QueryAggregateVote)(nil), "oracle.v1.QueryAggregateVote") + proto.RegisterType((*QueryAggregateVoteResponse)(nil), "oracle.v1.QueryAggregateVoteResponse") + proto.RegisterType((*QueryAggregateVotes)(nil), "oracle.v1.QueryAggregateVotes") + proto.RegisterType((*QueryAggregateVotesResponse)(nil), "oracle.v1.QueryAggregateVotesResponse") + proto.RegisterType((*QueryParams)(nil), "oracle.v1.QueryParams") + proto.RegisterType((*QueryParamsResponse)(nil), "oracle.v1.QueryParamsResponse") + proto.RegisterType((*QueryMedians)(nil), "oracle.v1.QueryMedians") + proto.RegisterType((*QueryMediansResponse)(nil), "oracle.v1.QueryMediansResponse") + proto.RegisterType((*QueryMedianDeviations)(nil), "oracle.v1.QueryMedianDeviations") + proto.RegisterType((*QueryMedianDeviationsResponse)(nil), "oracle.v1.QueryMedianDeviationsResponse") + proto.RegisterType((*QueryValidatorRewardSet)(nil), "oracle.v1.QueryValidatorRewardSet") + proto.RegisterType((*QueryValidatorRewardSetResponse)(nil), "oracle.v1.QueryValidatorRewardSetResponse") + proto.RegisterType((*QueryEMARequest)(nil), "oracle.v1.QueryEMARequest") + proto.RegisterType((*QueryEMAResponse)(nil), "oracle.v1.QueryEMAResponse") + proto.RegisterType((*QueryWMARequest)(nil), "oracle.v1.QueryWMARequest") + proto.RegisterType((*QueryWMAResponse)(nil), "oracle.v1.QueryWMAResponse") + proto.RegisterType((*QuerySMARequest)(nil), "oracle.v1.QuerySMARequest") + proto.RegisterType((*QuerySMAResponse)(nil), "oracle.v1.QuerySMAResponse") +} + +func init() { proto.RegisterFile("oracle/v1/query.proto", fileDescriptor_34238c8dfdfcd7ec) } + +var fileDescriptor_34238c8dfdfcd7ec = []byte{ + // 1444 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x98, 0x4f, 0x6f, 0x13, 0xc7, + 0x1b, 0xc7, 0xbd, 0x84, 0x7f, 0x79, 0x8c, 0x83, 0x33, 0x90, 0xe0, 0x6c, 0x88, 0x6d, 0x96, 0x5f, + 0x7e, 0x09, 0xd0, 0x78, 0x9b, 0x50, 0x44, 0x85, 0x84, 0x44, 0xfe, 0x51, 0xa4, 0x36, 0x12, 0xd8, + 0x12, 0x91, 0xa0, 0xaa, 0x35, 0xd9, 0x1d, 0xec, 0x85, 0xec, 0xae, 0xd9, 0x59, 0x3b, 0x44, 0x11, + 0x3d, 0x54, 0x95, 0xe8, 0xad, 0x95, 0x68, 0xab, 0x1e, 0x39, 0xf7, 0xdc, 0x43, 0x5f, 0x02, 0x47, + 0xd4, 0x5e, 0xaa, 0x1e, 0x68, 0x0b, 0x3d, 0xf4, 0x65, 0x54, 0x3b, 0x33, 0x1e, 0x8f, 0xbd, 0x6b, + 0x3b, 0xa9, 0xc4, 0x29, 0xd9, 0xe7, 0x99, 0xf9, 0x3e, 0x9f, 0x79, 0x76, 0x66, 0xe7, 0x2b, 0xc3, + 0x84, 0x1f, 0x60, 0x6b, 0x9b, 0x98, 0xad, 0x45, 0xf3, 0x71, 0x93, 0x04, 0xbb, 0xa5, 0x46, 0xe0, + 0x87, 0x3e, 0x1a, 0xe5, 0xe1, 0x52, 0x6b, 0x51, 0x3f, 0x5b, 0xf3, 0xfd, 0xda, 0x36, 0x31, 0x71, + 0xc3, 0x31, 0xb1, 0xe7, 0xf9, 0x21, 0x0e, 0x1d, 0xdf, 0xa3, 0x7c, 0xa0, 0x3e, 0xd9, 0x99, 0x2f, + 0xa6, 0xf0, 0x78, 0xde, 0xf2, 0xa9, 0xeb, 0x53, 0x73, 0x0b, 0xd3, 0x28, 0xb9, 0x45, 0x42, 0xbc, + 0x68, 0x5a, 0xbe, 0xe3, 0x89, 0xfc, 0x14, 0xcf, 0x57, 0xd9, 0x93, 0xc9, 0x1f, 0x44, 0xea, 0x74, + 0xcd, 0xaf, 0xf9, 0x3c, 0x1e, 0xfd, 0xc7, 0xa3, 0xc6, 0x07, 0x80, 0xee, 0x44, 0x80, 0xeb, 0x4f, + 0xac, 0x3a, 0xf6, 0x6a, 0xa4, 0x8c, 0x43, 0x42, 0xd1, 0x69, 0x38, 0x62, 0x13, 0xcf, 0x77, 0x73, + 0x5a, 0x51, 0x9b, 0x1f, 0x2d, 0xf3, 0x87, 0x6b, 0xc7, 0xbf, 0x7a, 0x51, 0x48, 0xfd, 0xf3, 0xa2, + 0x90, 0x32, 0xbe, 0xd7, 0x40, 0x8f, 0x4f, 0x2b, 0x13, 0xda, 0xf0, 0x3d, 0x4a, 0xd0, 0x13, 0x18, + 0x23, 0x22, 0x51, 0x0d, 0xa2, 0x4c, 0x4e, 0x2b, 0x8e, 0xcc, 0xa7, 0x97, 0xce, 0x96, 0x04, 0x51, + 0x84, 0x5f, 0x12, 0xf8, 0xa5, 0x35, 0x62, 0xad, 0xfa, 0x8e, 0xb7, 0x72, 0xf9, 0xe5, 0xeb, 0x42, + 0xea, 0xc7, 0x3f, 0x0a, 0x97, 0x6a, 0x4e, 0x58, 0x6f, 0x6e, 0x95, 0x2c, 0xdf, 0x15, 0x2b, 0x10, + 0x7f, 0x16, 0xa8, 0xfd, 0xc8, 0x0c, 0x77, 0x1b, 0x84, 0xb6, 0xe7, 0xd0, 0x72, 0x86, 0xa8, 0x04, + 0x86, 0x0e, 0x39, 0xc6, 0xb5, 0x6c, 0x85, 0x4e, 0x8b, 0x74, 0xd1, 0x19, 0xeb, 0x50, 0xec, 0x97, + 0x93, 0xe4, 0xe7, 0xe0, 0x04, 0x66, 0x69, 0x85, 0x7b, 0xb4, 0x9c, 0xe6, 0x31, 0x2e, 0x73, 0x0b, + 0x26, 0x98, 0xcc, 0x4d, 0x42, 0x6c, 0x12, 0xac, 0x91, 0x6d, 0x52, 0x63, 0xaf, 0x0e, 0xcd, 0xc2, + 0x58, 0x0b, 0x6f, 0x3b, 0x36, 0x0e, 0xfd, 0xa0, 0x8a, 0x6d, 0x3b, 0x10, 0xdd, 0xcb, 0xc8, 0xe8, + 0xb2, 0x6d, 0x07, 0x4a, 0x17, 0x6f, 0xc0, 0x4c, 0xa2, 0x92, 0xa4, 0x29, 0x40, 0xfa, 0x01, 0xcb, + 0xa9, 0x72, 0xc0, 0x43, 0x91, 0x96, 0xb1, 0x0a, 0x59, 0xa6, 0xb0, 0xe1, 0x50, 0xba, 0xea, 0x37, + 0xbd, 0x90, 0x04, 0x07, 0xc7, 0xb8, 0x2e, 0x7a, 0xa6, 0x88, 0xa8, 0xfd, 0x70, 0x1d, 0x4a, 0xab, + 0x16, 0x8f, 0x33, 0xa9, 0xc3, 0xe5, 0xb4, 0xdb, 0x19, 0x6a, 0x20, 0xc1, 0x50, 0xd9, 0xc6, 0xb4, + 0xbe, 0xe9, 0x78, 0xb6, 0xbf, 0x63, 0xac, 0x0a, 0x49, 0x25, 0x26, 0x25, 0xe7, 0xe0, 0xe4, 0x0e, + 0x8b, 0x44, 0x9b, 0xb4, 0x16, 0x10, 0x4a, 0x85, 0xea, 0x18, 0x0f, 0xdf, 0x16, 0x51, 0xd9, 0xe8, + 0xe5, 0x5a, 0x2d, 0x88, 0x3a, 0x43, 0x6e, 0x07, 0xa4, 0xe5, 0x87, 0xe4, 0xe0, 0x2b, 0xdc, 0x13, + 0x8d, 0xee, 0x55, 0x92, 0x4c, 0xf7, 0x60, 0x1c, 0xb7, 0x73, 0xd5, 0x06, 0x4f, 0x32, 0xd1, 0xf4, + 0xd2, 0x5c, 0x49, 0x9e, 0xd9, 0x92, 0x9c, 0xaf, 0x6e, 0x1e, 0xa1, 0xb5, 0x72, 0x38, 0xda, 0xbe, + 0xe5, 0x2c, 0xee, 0xa9, 0x61, 0xe4, 0x60, 0x32, 0xb1, 0x38, 0x35, 0x3e, 0x87, 0x7c, 0x72, 0x46, + 0x72, 0x7d, 0x0a, 0x28, 0xc6, 0xd5, 0x3e, 0x4c, 0x07, 0x04, 0x1b, 0xc7, 0xb1, 0xfa, 0xeb, 0xe2, + 0xec, 0xcb, 0xd9, 0x77, 0xff, 0x53, 0x77, 0x7d, 0xf1, 0x2d, 0xe8, 0x92, 0x91, 0x4b, 0xb8, 0x03, + 0x63, 0x9d, 0x25, 0x28, 0x7d, 0xfd, 0xdf, 0x30, 0xfc, 0xbb, 0x1d, 0xf6, 0x0c, 0x56, 0xa5, 0x8d, + 0x09, 0x38, 0x15, 0x2f, 0x48, 0x8d, 0x00, 0xa6, 0x13, 0xc2, 0x12, 0xa4, 0x02, 0x27, 0xbb, 0x41, + 0xda, 0x8d, 0x3c, 0x08, 0xc9, 0x18, 0xee, 0xae, 0x99, 0x81, 0x34, 0xab, 0x79, 0x1b, 0x07, 0xd8, + 0xa5, 0xc6, 0x4d, 0x41, 0xc6, 0x1f, 0x65, 0x69, 0x13, 0x8e, 0x36, 0x58, 0x44, 0xac, 0x7d, 0x5c, + 0xa9, 0xc8, 0x87, 0x0a, 0x79, 0x31, 0xcc, 0xd8, 0x80, 0x13, 0xfc, 0x48, 0x12, 0xdb, 0xc1, 0x5e, + 0x9f, 0xef, 0x31, 0x9a, 0x01, 0xf0, 0x9a, 0x6e, 0x95, 0x86, 0xd8, 0x6d, 0xd0, 0xdc, 0xa1, 0xa2, + 0x36, 0x9f, 0x29, 0x8f, 0x7a, 0x4d, 0xb7, 0xc2, 0x02, 0xca, 0x1b, 0xda, 0x80, 0xd3, 0xaa, 0x9c, + 0xe4, 0xba, 0x02, 0xc7, 0x5c, 0x1e, 0x12, 0xad, 0x98, 0x50, 0xc1, 0x02, 0xc7, 0x22, 0x4c, 0x4a, + 0xc0, 0xb5, 0xc7, 0x1a, 0x57, 0xc5, 0xc1, 0xe4, 0x72, 0x6b, 0xa4, 0xe5, 0xf0, 0xbb, 0x6b, 0xe8, + 0xb5, 0xe1, 0x88, 0x73, 0xd8, 0x3b, 0x51, 0x02, 0xdd, 0x82, 0x71, 0x5e, 0xa4, 0x6a, 0xcb, 0xe4, + 0x7e, 0xd0, 0xb2, 0x6e, 0x8f, 0xa2, 0x31, 0x05, 0x67, 0x58, 0xa9, 0xbb, 0xed, 0x4d, 0x5b, 0x26, + 0x3b, 0x38, 0xb0, 0x2b, 0x24, 0x34, 0x1e, 0x40, 0xa1, 0x4f, 0x4a, 0x72, 0xac, 0x02, 0xc8, 0xdd, + 0xde, 0x7e, 0x69, 0x33, 0x0a, 0x40, 0x7c, 0xaa, 0x00, 0x51, 0xa6, 0x19, 0x73, 0x70, 0x92, 0xdf, + 0x91, 0x1b, 0xcb, 0x65, 0xf2, 0xb8, 0x49, 0x68, 0x98, 0xdc, 0x20, 0xe3, 0xbe, 0xf8, 0x82, 0xb2, + 0x81, 0x82, 0xe0, 0x23, 0x38, 0xd2, 0x88, 0x56, 0xc9, 0x47, 0xae, 0x2c, 0x46, 0xea, 0xbf, 0xbf, + 0x2e, 0x4c, 0xf3, 0x9b, 0x90, 0xda, 0x8f, 0x4a, 0x8e, 0x6f, 0xba, 0x38, 0xac, 0x97, 0x3e, 0x21, + 0x35, 0x6c, 0xed, 0xae, 0x11, 0xeb, 0x97, 0x9f, 0x16, 0x40, 0xdc, 0xaf, 0x6b, 0xc4, 0x2a, 0xf3, + 0xf9, 0xc6, 0x43, 0x41, 0xb1, 0x39, 0x84, 0x02, 0xe9, 0x70, 0x9c, 0x86, 0xd1, 0xad, 0x57, 0xdb, + 0x65, 0x7b, 0x69, 0xb4, 0x2c, 0x9f, 0xa3, 0x6f, 0x82, 0xd5, 0xa4, 0xa1, 0xef, 0x56, 0x77, 0x88, + 0x53, 0xab, 0x87, 0x34, 0x37, 0x52, 0x1c, 0x99, 0x1f, 0x29, 0x67, 0x78, 0x74, 0x93, 0x07, 0xe5, + 0x42, 0x36, 0xdf, 0xc5, 0x42, 0xda, 0xed, 0xac, 0xec, 0xb7, 0x9d, 0x95, 0x77, 0x40, 0xb1, 0xf4, + 0x73, 0x16, 0x8e, 0x30, 0x75, 0xf4, 0x4c, 0x83, 0x4c, 0xb7, 0x6b, 0x52, 0x77, 0x48, 0xdc, 0x1d, + 0xe9, 0xb3, 0x03, 0xd3, 0x6d, 0x54, 0xe3, 0xfd, 0x2f, 0x7e, 0xfd, 0xfb, 0xf9, 0xa1, 0x8b, 0x68, + 0xde, 0xec, 0x78, 0x40, 0xb6, 0x30, 0x6a, 0x76, 0x9b, 0x2a, 0x73, 0x8f, 0x85, 0x9f, 0xa2, 0x1f, + 0x34, 0x38, 0x95, 0x60, 0x6a, 0xd0, 0xf9, 0xde, 0x82, 0x09, 0x83, 0xf4, 0x4b, 0xfb, 0x18, 0x24, + 0xd9, 0x4c, 0xc6, 0x76, 0x01, 0xcd, 0xc5, 0xd9, 0x84, 0x6d, 0xea, 0x46, 0x44, 0xdf, 0x69, 0x90, + 0x8d, 0x19, 0xa5, 0x62, 0x6f, 0xc9, 0xde, 0x11, 0xfa, 0xfc, 0xb0, 0x11, 0x92, 0xe8, 0x0a, 0x23, + 0x32, 0xd1, 0x82, 0x42, 0xd4, 0x39, 0x83, 0xe6, 0x5e, 0xf7, 0x55, 0xf6, 0xd4, 0xe4, 0xe6, 0x09, + 0x7d, 0xa9, 0x41, 0x5a, 0x35, 0x4d, 0xd3, 0xbd, 0x05, 0x95, 0xa4, 0x7e, 0x7e, 0x40, 0x52, 0x82, + 0x5c, 0x66, 0x20, 0x0b, 0xe8, 0xd2, 0x3e, 0x41, 0x22, 0x0b, 0x85, 0x1a, 0x90, 0x56, 0x2c, 0x52, + 0x9c, 0x42, 0x49, 0xc6, 0x29, 0x12, 0xcc, 0x95, 0x51, 0x60, 0x14, 0x53, 0xe8, 0x8c, 0x42, 0x41, + 0xa3, 0x71, 0x55, 0x6e, 0xae, 0xd0, 0x0b, 0x0d, 0xb2, 0x31, 0x43, 0x15, 0x7b, 0x21, 0xbd, 0x23, + 0xe2, 0x2f, 0xa4, 0x9f, 0x95, 0x32, 0x6e, 0x30, 0x82, 0x6b, 0xe8, 0xc3, 0x7d, 0xf6, 0x21, 0xe6, + 0x6f, 0xd0, 0x73, 0x0d, 0xc6, 0x63, 0x96, 0x08, 0x9d, 0x1b, 0x46, 0x40, 0xf5, 0x0b, 0x43, 0x87, + 0x0c, 0x3c, 0x64, 0x0a, 0x65, 0xdc, 0x74, 0xa1, 0x6f, 0x35, 0xc8, 0x74, 0x1b, 0xa5, 0x99, 0xbe, + 0xe5, 0xa2, 0x74, 0xfc, 0xb8, 0x27, 0xfa, 0x23, 0xe3, 0x3a, 0x23, 0xb9, 0x8a, 0xae, 0x74, 0x93, + 0xd8, 0xce, 0xd0, 0x7e, 0xb1, 0x66, 0x3d, 0xd3, 0x60, 0xac, 0xdb, 0xf0, 0xa0, 0xfc, 0xc0, 0xc2, + 0x54, 0xff, 0xff, 0xe0, 0xbc, 0x24, 0x5b, 0x60, 0x64, 0x73, 0x68, 0x76, 0x58, 0x8f, 0x78, 0x83, + 0xee, 0xc3, 0x51, 0xee, 0x65, 0xd0, 0x64, 0x6f, 0x01, 0x1e, 0xd7, 0xf3, 0xc9, 0x71, 0x59, 0x70, + 0x8a, 0x15, 0x3c, 0x85, 0xc6, 0x95, 0x82, 0xdc, 0x10, 0xa1, 0x87, 0x70, 0xac, 0xed, 0x85, 0xce, + 0xc4, 0x4e, 0x23, 0x4f, 0xe8, 0x85, 0x3e, 0x09, 0xa9, 0x3f, 0xcb, 0xf4, 0x0b, 0x68, 0xc6, 0xac, + 0x3b, 0x34, 0x8c, 0x7d, 0xc1, 0x84, 0xbd, 0x41, 0x5f, 0x6b, 0x90, 0x8d, 0x59, 0x9b, 0x62, 0xb2, + 0x78, 0x67, 0x44, 0xfc, 0x88, 0xf4, 0x73, 0x39, 0xca, 0x57, 0x74, 0x00, 0x87, 0xe2, 0x80, 0xa2, + 0x0f, 0x3c, 0x8a, 0x5b, 0x0e, 0x64, 0xf4, 0x56, 0x8c, 0x8f, 0xd1, 0x2f, 0x0e, 0x1f, 0x23, 0xb9, + 0x96, 0x18, 0xd7, 0x7b, 0xe8, 0x62, 0xf2, 0x56, 0xec, 0xec, 0xc4, 0x80, 0x4d, 0xad, 0x52, 0x12, + 0xa2, 0xcf, 0x60, 0x64, 0x7d, 0x63, 0x19, 0xe9, 0xb1, 0xbb, 0x4d, 0xde, 0xd2, 0xfa, 0x74, 0x62, + 0x4e, 0xd4, 0xcc, 0xb3, 0x9a, 0x39, 0x34, 0xa9, 0xd4, 0x24, 0x2e, 0x96, 0x77, 0x9b, 0x03, 0x23, + 0x9b, 0x49, 0xfa, 0x9b, 0x03, 0xf4, 0x15, 0xfb, 0x61, 0x5c, 0x60, 0xfa, 0xe7, 0xd1, 0x39, 0x45, + 0x7f, 0xa7, 0xa3, 0x6f, 0xee, 0xb5, 0x3d, 0xce, 0xd3, 0x68, 0x29, 0x95, 0xa4, 0x52, 0x95, 0x01, + 0xa5, 0x2a, 0x43, 0x96, 0x42, 0x3b, 0xa5, 0x56, 0x3e, 0x7e, 0xf9, 0x57, 0x3e, 0xf5, 0xf2, 0x4d, + 0x5e, 0x7b, 0xf5, 0x26, 0xaf, 0xfd, 0xf9, 0x26, 0xaf, 0x7d, 0xf3, 0x36, 0x9f, 0x7a, 0xf5, 0x36, + 0x9f, 0xfa, 0xed, 0x6d, 0x3e, 0x75, 0x6f, 0x41, 0xf9, 0xd5, 0x63, 0x0d, 0x93, 0xd6, 0x86, 0x13, + 0xd6, 0x03, 0xec, 0x99, 0xb6, 0x6b, 0xd5, 0xb1, 0xe3, 0x99, 0x4f, 0xda, 0xaa, 0xec, 0x07, 0x90, + 0xad, 0xa3, 0xec, 0xe7, 0x9b, 0xcb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x75, 0xcc, 0x8d, 0x3b, + 0x69, 0x12, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // ExchangeRates returns exchange rates of all denoms, + // or, if specified, returns a single denom + ExchangeRates(ctx context.Context, in *QueryExchangeRates, opts ...grpc.CallOption) (*QueryExchangeRatesResponse, error) + // ActiveExchangeRates returns all active denoms + ActiveExchangeRates(ctx context.Context, in *QueryActiveExchangeRates, opts ...grpc.CallOption) (*QueryActiveExchangeRatesResponse, error) + // FeederDelegation returns feeder delegation of a validator + FeederDelegation(ctx context.Context, in *QueryFeederDelegation, opts ...grpc.CallOption) (*QueryFeederDelegationResponse, error) + // MissCounter returns oracle miss counter of a validator + MissCounter(ctx context.Context, in *QueryMissCounter, opts ...grpc.CallOption) (*QueryMissCounterResponse, error) + // SlashWindow returns slash window information + SlashWindow(ctx context.Context, in *QuerySlashWindow, opts ...grpc.CallOption) (*QuerySlashWindowResponse, error) + // AggregatePrevote returns an aggregate prevote of a validator + AggregatePrevote(ctx context.Context, in *QueryAggregatePrevote, opts ...grpc.CallOption) (*QueryAggregatePrevoteResponse, error) + // AggregatePrevotes returns aggregate prevotes of all validators + AggregatePrevotes(ctx context.Context, in *QueryAggregatePrevotes, opts ...grpc.CallOption) (*QueryAggregatePrevotesResponse, error) + // AggregateVote returns an aggregate vote of a validator + AggregateVote(ctx context.Context, in *QueryAggregateVote, opts ...grpc.CallOption) (*QueryAggregateVoteResponse, error) + // AggregateVotes returns aggregate votes of all validators + AggregateVotes(ctx context.Context, in *QueryAggregateVotes, opts ...grpc.CallOption) (*QueryAggregateVotesResponse, error) + // Params queries all parameters. + Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Medians returns medians of all denoms, + // or, if specified, returns a single median + Medians(ctx context.Context, in *QueryMedians, opts ...grpc.CallOption) (*QueryMediansResponse, error) + // MedianDeviations returns median deviations of all denoms, + // or, if specified, returns a single median deviation + MedianDeviations(ctx context.Context, in *QueryMedianDeviations, opts ...grpc.CallOption) (*QueryMedianDeviationsResponse, error) + // ValidatorRewardSet returns the set of validators that is + // earning rewards for voting on exchange rates based on their + // misscounter in a given Slash Window + ValidatorRewardSet(ctx context.Context, in *QueryValidatorRewardSet, opts ...grpc.CallOption) (*QueryValidatorRewardSetResponse, error) + EMA(ctx context.Context, in *QueryEMARequest, opts ...grpc.CallOption) (*QueryEMAResponse, error) + WMA(ctx context.Context, in *QueryWMARequest, opts ...grpc.CallOption) (*QueryWMAResponse, error) + SMA(ctx context.Context, in *QuerySMARequest, opts ...grpc.CallOption) (*QuerySMAResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) ExchangeRates(ctx context.Context, in *QueryExchangeRates, opts ...grpc.CallOption) (*QueryExchangeRatesResponse, error) { + out := new(QueryExchangeRatesResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/ExchangeRates", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ActiveExchangeRates(ctx context.Context, in *QueryActiveExchangeRates, opts ...grpc.CallOption) (*QueryActiveExchangeRatesResponse, error) { + out := new(QueryActiveExchangeRatesResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/ActiveExchangeRates", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) FeederDelegation(ctx context.Context, in *QueryFeederDelegation, opts ...grpc.CallOption) (*QueryFeederDelegationResponse, error) { + out := new(QueryFeederDelegationResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/FeederDelegation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) MissCounter(ctx context.Context, in *QueryMissCounter, opts ...grpc.CallOption) (*QueryMissCounterResponse, error) { + out := new(QueryMissCounterResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/MissCounter", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SlashWindow(ctx context.Context, in *QuerySlashWindow, opts ...grpc.CallOption) (*QuerySlashWindowResponse, error) { + out := new(QuerySlashWindowResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/SlashWindow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregatePrevote(ctx context.Context, in *QueryAggregatePrevote, opts ...grpc.CallOption) (*QueryAggregatePrevoteResponse, error) { + out := new(QueryAggregatePrevoteResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/AggregatePrevote", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregatePrevotes(ctx context.Context, in *QueryAggregatePrevotes, opts ...grpc.CallOption) (*QueryAggregatePrevotesResponse, error) { + out := new(QueryAggregatePrevotesResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/AggregatePrevotes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregateVote(ctx context.Context, in *QueryAggregateVote, opts ...grpc.CallOption) (*QueryAggregateVoteResponse, error) { + out := new(QueryAggregateVoteResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/AggregateVote", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregateVotes(ctx context.Context, in *QueryAggregateVotes, opts ...grpc.CallOption) (*QueryAggregateVotesResponse, error) { + out := new(QueryAggregateVotesResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/AggregateVotes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Medians(ctx context.Context, in *QueryMedians, opts ...grpc.CallOption) (*QueryMediansResponse, error) { + out := new(QueryMediansResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/Medians", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) MedianDeviations(ctx context.Context, in *QueryMedianDeviations, opts ...grpc.CallOption) (*QueryMedianDeviationsResponse, error) { + out := new(QueryMedianDeviationsResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/MedianDeviations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorRewardSet(ctx context.Context, in *QueryValidatorRewardSet, opts ...grpc.CallOption) (*QueryValidatorRewardSetResponse, error) { + out := new(QueryValidatorRewardSetResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/ValidatorRewardSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) EMA(ctx context.Context, in *QueryEMARequest, opts ...grpc.CallOption) (*QueryEMAResponse, error) { + out := new(QueryEMAResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/EMA", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) WMA(ctx context.Context, in *QueryWMARequest, opts ...grpc.CallOption) (*QueryWMAResponse, error) { + out := new(QueryWMAResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/WMA", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SMA(ctx context.Context, in *QuerySMARequest, opts ...grpc.CallOption) (*QuerySMAResponse, error) { + out := new(QuerySMAResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Query/SMA", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // ExchangeRates returns exchange rates of all denoms, + // or, if specified, returns a single denom + ExchangeRates(context.Context, *QueryExchangeRates) (*QueryExchangeRatesResponse, error) + // ActiveExchangeRates returns all active denoms + ActiveExchangeRates(context.Context, *QueryActiveExchangeRates) (*QueryActiveExchangeRatesResponse, error) + // FeederDelegation returns feeder delegation of a validator + FeederDelegation(context.Context, *QueryFeederDelegation) (*QueryFeederDelegationResponse, error) + // MissCounter returns oracle miss counter of a validator + MissCounter(context.Context, *QueryMissCounter) (*QueryMissCounterResponse, error) + // SlashWindow returns slash window information + SlashWindow(context.Context, *QuerySlashWindow) (*QuerySlashWindowResponse, error) + // AggregatePrevote returns an aggregate prevote of a validator + AggregatePrevote(context.Context, *QueryAggregatePrevote) (*QueryAggregatePrevoteResponse, error) + // AggregatePrevotes returns aggregate prevotes of all validators + AggregatePrevotes(context.Context, *QueryAggregatePrevotes) (*QueryAggregatePrevotesResponse, error) + // AggregateVote returns an aggregate vote of a validator + AggregateVote(context.Context, *QueryAggregateVote) (*QueryAggregateVoteResponse, error) + // AggregateVotes returns aggregate votes of all validators + AggregateVotes(context.Context, *QueryAggregateVotes) (*QueryAggregateVotesResponse, error) + // Params queries all parameters. + Params(context.Context, *QueryParams) (*QueryParamsResponse, error) + // Medians returns medians of all denoms, + // or, if specified, returns a single median + Medians(context.Context, *QueryMedians) (*QueryMediansResponse, error) + // MedianDeviations returns median deviations of all denoms, + // or, if specified, returns a single median deviation + MedianDeviations(context.Context, *QueryMedianDeviations) (*QueryMedianDeviationsResponse, error) + // ValidatorRewardSet returns the set of validators that is + // earning rewards for voting on exchange rates based on their + // misscounter in a given Slash Window + ValidatorRewardSet(context.Context, *QueryValidatorRewardSet) (*QueryValidatorRewardSetResponse, error) + EMA(context.Context, *QueryEMARequest) (*QueryEMAResponse, error) + WMA(context.Context, *QueryWMARequest) (*QueryWMAResponse, error) + SMA(context.Context, *QuerySMARequest) (*QuerySMAResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) ExchangeRates(ctx context.Context, req *QueryExchangeRates) (*QueryExchangeRatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExchangeRates not implemented") +} +func (*UnimplementedQueryServer) ActiveExchangeRates(ctx context.Context, req *QueryActiveExchangeRates) (*QueryActiveExchangeRatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ActiveExchangeRates not implemented") +} +func (*UnimplementedQueryServer) FeederDelegation(ctx context.Context, req *QueryFeederDelegation) (*QueryFeederDelegationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FeederDelegation not implemented") +} +func (*UnimplementedQueryServer) MissCounter(ctx context.Context, req *QueryMissCounter) (*QueryMissCounterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MissCounter not implemented") +} +func (*UnimplementedQueryServer) SlashWindow(ctx context.Context, req *QuerySlashWindow) (*QuerySlashWindowResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SlashWindow not implemented") +} +func (*UnimplementedQueryServer) AggregatePrevote(ctx context.Context, req *QueryAggregatePrevote) (*QueryAggregatePrevoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregatePrevote not implemented") +} +func (*UnimplementedQueryServer) AggregatePrevotes(ctx context.Context, req *QueryAggregatePrevotes) (*QueryAggregatePrevotesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregatePrevotes not implemented") +} +func (*UnimplementedQueryServer) AggregateVote(ctx context.Context, req *QueryAggregateVote) (*QueryAggregateVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateVote not implemented") +} +func (*UnimplementedQueryServer) AggregateVotes(ctx context.Context, req *QueryAggregateVotes) (*QueryAggregateVotesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateVotes not implemented") +} +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParams) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) Medians(ctx context.Context, req *QueryMedians) (*QueryMediansResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Medians not implemented") +} +func (*UnimplementedQueryServer) MedianDeviations(ctx context.Context, req *QueryMedianDeviations) (*QueryMedianDeviationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MedianDeviations not implemented") +} +func (*UnimplementedQueryServer) ValidatorRewardSet(ctx context.Context, req *QueryValidatorRewardSet) (*QueryValidatorRewardSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorRewardSet not implemented") +} +func (*UnimplementedQueryServer) EMA(ctx context.Context, req *QueryEMARequest) (*QueryEMAResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EMA not implemented") +} +func (*UnimplementedQueryServer) WMA(ctx context.Context, req *QueryWMARequest) (*QueryWMAResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WMA not implemented") +} +func (*UnimplementedQueryServer) SMA(ctx context.Context, req *QuerySMARequest) (*QuerySMAResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SMA not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_ExchangeRates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryExchangeRates) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ExchangeRates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/ExchangeRates", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ExchangeRates(ctx, req.(*QueryExchangeRates)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ActiveExchangeRates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryActiveExchangeRates) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ActiveExchangeRates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/ActiveExchangeRates", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ActiveExchangeRates(ctx, req.(*QueryActiveExchangeRates)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_FeederDelegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFeederDelegation) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).FeederDelegation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/FeederDelegation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).FeederDelegation(ctx, req.(*QueryFeederDelegation)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_MissCounter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMissCounter) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MissCounter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/MissCounter", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MissCounter(ctx, req.(*QueryMissCounter)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SlashWindow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySlashWindow) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SlashWindow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/SlashWindow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SlashWindow(ctx, req.(*QuerySlashWindow)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregatePrevote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregatePrevote) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregatePrevote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/AggregatePrevote", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregatePrevote(ctx, req.(*QueryAggregatePrevote)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregatePrevotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregatePrevotes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregatePrevotes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/AggregatePrevotes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregatePrevotes(ctx, req.(*QueryAggregatePrevotes)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregateVote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregateVote) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregateVote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/AggregateVote", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregateVote(ctx, req.(*QueryAggregateVote)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregateVotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregateVotes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregateVotes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/AggregateVotes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregateVotes(ctx, req.(*QueryAggregateVotes)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Medians_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMedians) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Medians(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/Medians", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Medians(ctx, req.(*QueryMedians)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_MedianDeviations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMedianDeviations) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MedianDeviations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/MedianDeviations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MedianDeviations(ctx, req.(*QueryMedianDeviations)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorRewardSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorRewardSet) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorRewardSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/ValidatorRewardSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorRewardSet(ctx, req.(*QueryValidatorRewardSet)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_EMA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEMARequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EMA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/EMA", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EMA(ctx, req.(*QueryEMARequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_WMA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWMARequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).WMA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/WMA", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).WMA(ctx, req.(*QueryWMARequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SMA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySMARequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SMA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Query/SMA", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SMA(ctx, req.(*QuerySMARequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "oracle.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ExchangeRates", + Handler: _Query_ExchangeRates_Handler, + }, + { + MethodName: "ActiveExchangeRates", + Handler: _Query_ActiveExchangeRates_Handler, + }, + { + MethodName: "FeederDelegation", + Handler: _Query_FeederDelegation_Handler, + }, + { + MethodName: "MissCounter", + Handler: _Query_MissCounter_Handler, + }, + { + MethodName: "SlashWindow", + Handler: _Query_SlashWindow_Handler, + }, + { + MethodName: "AggregatePrevote", + Handler: _Query_AggregatePrevote_Handler, + }, + { + MethodName: "AggregatePrevotes", + Handler: _Query_AggregatePrevotes_Handler, + }, + { + MethodName: "AggregateVote", + Handler: _Query_AggregateVote_Handler, + }, + { + MethodName: "AggregateVotes", + Handler: _Query_AggregateVotes_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Medians", + Handler: _Query_Medians_Handler, + }, + { + MethodName: "MedianDeviations", + Handler: _Query_MedianDeviations_Handler, + }, + { + MethodName: "ValidatorRewardSet", + Handler: _Query_ValidatorRewardSet_Handler, + }, + { + MethodName: "EMA", + Handler: _Query_EMA_Handler, + }, + { + MethodName: "WMA", + Handler: _Query_WMA_Handler, + }, + { + MethodName: "SMA", + Handler: _Query_SMA_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "oracle/v1/query.proto", +} + +func (m *QueryExchangeRates) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryExchangeRates) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryExchangeRates) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryExchangeRatesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryExchangeRatesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryExchangeRatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ExchangeRates) > 0 { + for iNdEx := len(m.ExchangeRates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExchangeRates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryActiveExchangeRates) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryActiveExchangeRates) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryActiveExchangeRates) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryActiveExchangeRatesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryActiveExchangeRatesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryActiveExchangeRatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ActiveRates) > 0 { + for iNdEx := len(m.ActiveRates) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ActiveRates[iNdEx]) + copy(dAtA[i:], m.ActiveRates[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ActiveRates[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryFeederDelegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeederDelegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeederDelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddr) > 0 { + i -= len(m.ValidatorAddr) + copy(dAtA[i:], m.ValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFeederDelegationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeederDelegationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeederDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FeederAddr) > 0 { + i -= len(m.FeederAddr) + copy(dAtA[i:], m.FeederAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.FeederAddr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMissCounter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMissCounter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMissCounter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddr) > 0 { + i -= len(m.ValidatorAddr) + copy(dAtA[i:], m.ValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMissCounterResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMissCounterResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMissCounterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MissCounter != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.MissCounter)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QuerySlashWindow) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySlashWindow) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySlashWindow) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuerySlashWindowResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySlashWindowResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySlashWindowResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.WindowProgress != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.WindowProgress)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregatePrevote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregatePrevote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregatePrevote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddr) > 0 { + i -= len(m.ValidatorAddr) + copy(dAtA[i:], m.ValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregatePrevoteResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregatePrevoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregatePrevoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.AggregatePrevote.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAggregatePrevotes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregatePrevotes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregatePrevotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAggregatePrevotesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregatePrevotesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregatePrevotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AggregatePrevotes) > 0 { + for iNdEx := len(m.AggregatePrevotes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AggregatePrevotes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregateVote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateVote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddr) > 0 { + i -= len(m.ValidatorAddr) + copy(dAtA[i:], m.ValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregateVoteResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateVoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.AggregateVote.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAggregateVotes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateVotes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAggregateVotesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateVotesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AggregateVotes) > 0 { + for iNdEx := len(m.AggregateVotes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AggregateVotes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryMedians) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMedians) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMedians) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NumStamps != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.NumStamps)) + i-- + dAtA[i] = 0x10 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMediansResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMediansResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMediansResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Medians) > 0 { + for iNdEx := len(m.Medians) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Medians[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryMedianDeviations) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMedianDeviations) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMedianDeviations) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMedianDeviationsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMedianDeviationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMedianDeviationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MedianDeviations) > 0 { + for iNdEx := len(m.MedianDeviations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MedianDeviations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorRewardSet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorRewardSet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorRewardSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryValidatorRewardSetResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorRewardSetResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorRewardSetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Validators.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryEMARequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryEMARequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEMARequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryEMAResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryEMAResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEMAResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryWMARequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryWMARequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryWMARequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CustomWeights) > 0 { + dAtA6 := make([]byte, len(m.CustomWeights)*10) + var j5 int + for _, num1 := range m.CustomWeights { + num := uint64(num1) + for num >= 1<<7 { + dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j5++ + } + dAtA6[j5] = uint8(num) + j5++ + } + i -= j5 + copy(dAtA[i:], dAtA6[:j5]) + i = encodeVarintQuery(dAtA, i, uint64(j5)) + i-- + dAtA[i] = 0x1a + } + if len(m.Strategy) > 0 { + i -= len(m.Strategy) + copy(dAtA[i:], m.Strategy) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Strategy))) + i-- + dAtA[i] = 0x12 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryWMAResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryWMAResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryWMAResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QuerySMARequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySMARequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySMARequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySMAResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySMAResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySMAResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryExchangeRates) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryExchangeRatesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ExchangeRates) > 0 { + for _, e := range m.ExchangeRates { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryActiveExchangeRates) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryActiveExchangeRatesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ActiveRates) > 0 { + for _, s := range m.ActiveRates { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryFeederDelegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFeederDelegationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FeederAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMissCounter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMissCounterResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MissCounter != 0 { + n += 1 + sovQuery(uint64(m.MissCounter)) + } + return n +} + +func (m *QuerySlashWindow) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuerySlashWindowResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.WindowProgress != 0 { + n += 1 + sovQuery(uint64(m.WindowProgress)) + } + return n +} + +func (m *QueryAggregatePrevote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAggregatePrevoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AggregatePrevote.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAggregatePrevotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryAggregatePrevotesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AggregatePrevotes) > 0 { + for _, e := range m.AggregatePrevotes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAggregateVote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAggregateVoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AggregateVote.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAggregateVotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryAggregateVotesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AggregateVotes) > 0 { + for _, e := range m.AggregateVotes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryMedians) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.NumStamps != 0 { + n += 1 + sovQuery(uint64(m.NumStamps)) + } + return n +} + +func (m *QueryMediansResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Medians) > 0 { + for _, e := range m.Medians { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryMedianDeviations) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMedianDeviationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.MedianDeviations) > 0 { + for _, e := range m.MedianDeviations { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryValidatorRewardSet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryValidatorRewardSetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Validators.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryEMARequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryEMAResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryWMARequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Strategy) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.CustomWeights) > 0 { + l = 0 + for _, e := range m.CustomWeights { + l += sovQuery(uint64(e)) + } + n += 1 + sovQuery(uint64(l)) + l + } + return n +} + +func (m *QueryWMAResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QuerySMARequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySMAResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryExchangeRates) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryExchangeRates: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryExchangeRates: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryExchangeRatesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryExchangeRatesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryExchangeRatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExchangeRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExchangeRates = append(m.ExchangeRates, types.DecCoin{}) + if err := m.ExchangeRates[len(m.ExchangeRates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryActiveExchangeRates) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryActiveExchangeRates: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryActiveExchangeRates: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryActiveExchangeRatesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryActiveExchangeRatesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryActiveExchangeRatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveRates", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ActiveRates = append(m.ActiveRates, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeederDelegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeederDelegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeederDelegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeederDelegationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeederDelegationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeederDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeederAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeederAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMissCounter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMissCounter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMissCounter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMissCounterResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMissCounterResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMissCounterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MissCounter", wireType) + } + m.MissCounter = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MissCounter |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySlashWindow) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySlashWindow: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySlashWindow: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySlashWindowResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySlashWindowResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySlashWindowResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WindowProgress", wireType) + } + m.WindowProgress = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WindowProgress |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregatePrevote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregatePrevote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregatePrevote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregatePrevoteResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregatePrevoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregatePrevoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregatePrevote", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AggregatePrevote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregatePrevotes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregatePrevotes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregatePrevotes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregatePrevotesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregatePrevotesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregatePrevotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregatePrevotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregatePrevotes = append(m.AggregatePrevotes, AggregateExchangeRatePrevote{}) + if err := m.AggregatePrevotes[len(m.AggregatePrevotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateVote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateVoteResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateVote", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AggregateVote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateVotes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateVotes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateVotes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateVotesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateVotesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateVotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateVotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregateVotes = append(m.AggregateVotes, AggregateExchangeRateVote{}) + if err := m.AggregateVotes[len(m.AggregateVotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMedians) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMedians: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMedians: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumStamps", wireType) + } + m.NumStamps = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumStamps |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMediansResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMediansResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMediansResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Medians", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Medians = append(m.Medians, PriceStamp{}) + if err := m.Medians[len(m.Medians)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMedianDeviations) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMedianDeviations: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMedianDeviations: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMedianDeviationsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMedianDeviationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMedianDeviationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MedianDeviations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MedianDeviations = append(m.MedianDeviations, PriceStamp{}) + if err := m.MedianDeviations[len(m.MedianDeviations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorRewardSet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorRewardSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorRewardSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorRewardSetResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorRewardSetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorRewardSetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Validators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryEMARequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryEMARequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEMARequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryEMAResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryEMAResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEMAResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryWMARequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryWMARequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryWMARequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Strategy = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CustomWeights = append(m.CustomWeights, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.CustomWeights) == 0 { + m.CustomWeights = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CustomWeights = append(m.CustomWeights, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field CustomWeights", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryWMAResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryWMAResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryWMAResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySMARequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySMARequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySMARequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySMAResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySMAResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySMAResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/oracle/types/query.pb.gw.go b/x/oracle/types/query.pb.gw.go new file mode 100644 index 0000000..f191858 --- /dev/null +++ b/x/oracle/types/query.pb.gw.go @@ -0,0 +1,1492 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: oracle/v1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_ExchangeRates_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryExchangeRates + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := client.ExchangeRates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ExchangeRates_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryExchangeRates + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := server.ExchangeRates(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ActiveExchangeRates_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryActiveExchangeRates + var metadata runtime.ServerMetadata + + msg, err := client.ActiveExchangeRates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ActiveExchangeRates_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryActiveExchangeRates + var metadata runtime.ServerMetadata + + msg, err := server.ActiveExchangeRates(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_FeederDelegation_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeederDelegation + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_addr"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") + } + + protoReq.ValidatorAddr, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) + } + + msg, err := client.FeederDelegation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_FeederDelegation_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeederDelegation + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_addr"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") + } + + protoReq.ValidatorAddr, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) + } + + msg, err := server.FeederDelegation(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_MissCounter_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMissCounter + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_addr"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") + } + + protoReq.ValidatorAddr, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) + } + + msg, err := client.MissCounter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_MissCounter_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMissCounter + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_addr"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") + } + + protoReq.ValidatorAddr, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) + } + + msg, err := server.MissCounter(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_SlashWindow_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySlashWindow + var metadata runtime.ServerMetadata + + msg, err := client.SlashWindow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SlashWindow_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySlashWindow + var metadata runtime.ServerMetadata + + msg, err := server.SlashWindow(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AggregatePrevote_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregatePrevote + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_addr"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") + } + + protoReq.ValidatorAddr, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) + } + + msg, err := client.AggregatePrevote(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AggregatePrevote_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregatePrevote + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_addr"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") + } + + protoReq.ValidatorAddr, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) + } + + msg, err := server.AggregatePrevote(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AggregatePrevotes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregatePrevotes + var metadata runtime.ServerMetadata + + msg, err := client.AggregatePrevotes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AggregatePrevotes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregatePrevotes + var metadata runtime.ServerMetadata + + msg, err := server.AggregatePrevotes(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AggregateVote_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregateVote + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_addr"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") + } + + protoReq.ValidatorAddr, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) + } + + msg, err := client.AggregateVote(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AggregateVote_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregateVote + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_addr"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_addr") + } + + protoReq.ValidatorAddr, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_addr", err) + } + + msg, err := server.AggregateVote(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AggregateVotes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregateVotes + var metadata runtime.ServerMetadata + + msg, err := client.AggregateVotes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AggregateVotes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAggregateVotes + var metadata runtime.ServerMetadata + + msg, err := server.AggregateVotes(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParams + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParams + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Medians_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Medians_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMedians + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Medians_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Medians(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Medians_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMedians + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Medians_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Medians(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_MedianDeviations_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_MedianDeviations_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMedianDeviations + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_MedianDeviations_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MedianDeviations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_MedianDeviations_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMedianDeviations + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_MedianDeviations_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.MedianDeviations(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ValidatorRewardSet_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorRewardSet + var metadata runtime.ServerMetadata + + msg, err := client.ValidatorRewardSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ValidatorRewardSet_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorRewardSet + var metadata runtime.ServerMetadata + + msg, err := server.ValidatorRewardSet(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_EMA_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryEMARequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := client.EMA(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_EMA_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryEMARequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := server.EMA(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_WMA_0 = &utilities.DoubleArray{Encoding: map[string]int{"denom": 0, "strategy": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_Query_WMA_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWMARequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + val, ok = pathParams["strategy"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "strategy") + } + + protoReq.Strategy, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "strategy", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_WMA_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.WMA(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_WMA_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWMARequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + val, ok = pathParams["strategy"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "strategy") + } + + protoReq.Strategy, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "strategy", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_WMA_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.WMA(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_SMA_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySMARequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := client.SMA(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SMA_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySMARequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := server.SMA(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_ExchangeRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ExchangeRates_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ExchangeRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ActiveExchangeRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ActiveExchangeRates_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ActiveExchangeRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_FeederDelegation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_FeederDelegation_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_FeederDelegation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_MissCounter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_MissCounter_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MissCounter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SlashWindow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_SlashWindow_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SlashWindow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AggregatePrevote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AggregatePrevote_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregatePrevote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AggregatePrevotes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AggregatePrevotes_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregatePrevotes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AggregateVote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AggregateVote_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregateVote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AggregateVotes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AggregateVotes_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregateVotes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Medians_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Medians_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Medians_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_MedianDeviations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_MedianDeviations_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MedianDeviations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorRewardSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ValidatorRewardSet_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorRewardSet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EMA_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_EMA_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EMA_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_WMA_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_WMA_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_WMA_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SMA_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_SMA_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SMA_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_ExchangeRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ExchangeRates_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ExchangeRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ActiveExchangeRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ActiveExchangeRates_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ActiveExchangeRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_FeederDelegation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_FeederDelegation_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_FeederDelegation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_MissCounter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_MissCounter_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MissCounter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SlashWindow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_SlashWindow_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SlashWindow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AggregatePrevote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AggregatePrevote_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregatePrevote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AggregatePrevotes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AggregatePrevotes_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregatePrevotes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AggregateVote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AggregateVote_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregateVote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AggregateVotes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AggregateVotes_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AggregateVotes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Medians_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Medians_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Medians_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_MedianDeviations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_MedianDeviations_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MedianDeviations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorRewardSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ValidatorRewardSet_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorRewardSet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EMA_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_EMA_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EMA_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_WMA_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_WMA_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_WMA_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SMA_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_SMA_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SMA_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_ExchangeRates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"oracle", "v1", "denoms", "exchange_rates", "denom"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ActiveExchangeRates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"oracle", "v1", "denoms", "active_exchange_rates"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_FeederDelegation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"oracle", "v1", "validators", "validator_addr", "feeder"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_MissCounter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"oracle", "v1", "validators", "validator_addr", "miss"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SlashWindow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "slash_window"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AggregatePrevote_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"oracle", "v1", "validators", "validator_addr", "aggregate_prevote"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AggregatePrevotes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"oracle", "v1", "validators", "aggregate_prevotes"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AggregateVote_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"oracle", "v1", "valdiators", "validator_addr", "aggregate_vote"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AggregateVotes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"oracle", "v1", "validators", "aggregate_votes"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Medians_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"historacle", "v1", "denoms", "medians"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_MedianDeviations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"historacle", "v1", "denoms", "median_deviations"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ValidatorRewardSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"oracle", "v1", "valdiators", "validator_reward_set"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_EMA_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "ema", "denom"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_WMA_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"oracle", "v1", "wma", "denom", "strategy"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SMA_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "sma", "denom"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_ExchangeRates_0 = runtime.ForwardResponseMessage + + forward_Query_ActiveExchangeRates_0 = runtime.ForwardResponseMessage + + forward_Query_FeederDelegation_0 = runtime.ForwardResponseMessage + + forward_Query_MissCounter_0 = runtime.ForwardResponseMessage + + forward_Query_SlashWindow_0 = runtime.ForwardResponseMessage + + forward_Query_AggregatePrevote_0 = runtime.ForwardResponseMessage + + forward_Query_AggregatePrevotes_0 = runtime.ForwardResponseMessage + + forward_Query_AggregateVote_0 = runtime.ForwardResponseMessage + + forward_Query_AggregateVotes_0 = runtime.ForwardResponseMessage + + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_Medians_0 = runtime.ForwardResponseMessage + + forward_Query_MedianDeviations_0 = runtime.ForwardResponseMessage + + forward_Query_ValidatorRewardSet_0 = runtime.ForwardResponseMessage + + forward_Query_EMA_0 = runtime.ForwardResponseMessage + + forward_Query_WMA_0 = runtime.ForwardResponseMessage + + forward_Query_SMA_0 = runtime.ForwardResponseMessage +) diff --git a/x/oracle/types/reward_band.go b/x/oracle/types/reward_band.go new file mode 100644 index 0000000..39b2ccf --- /dev/null +++ b/x/oracle/types/reward_band.go @@ -0,0 +1,46 @@ +package types + +import ( + "strings" + + "cosmossdk.io/math" + "gopkg.in/yaml.v3" +) + +// String implements fmt.Stringer interface +func (rb RewardBand) String() string { + out, _ := yaml.Marshal(rb) + return string(out) +} + +func (rb RewardBand) Equal(rb2 *RewardBand) bool { + if !strings.EqualFold(rb.SymbolDenom, rb2.SymbolDenom) { + return false + } + if !rb.RewardBand.Equal(rb2.RewardBand) { + return false + } + return true +} + +// RewardBandList is array of RewardBand +type RewardBandList []RewardBand + +func (rbl RewardBandList) String() (out string) { + for _, d := range rbl { + out += d.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// GetRewardBand returns the reward band of a given Denom. +// It will return an error if it can not find it. +func (rbl RewardBandList) GetBandFromDenom(denom string) (math.LegacyDec, error) { + for _, rb := range rbl { + if strings.EqualFold(denom, rb.SymbolDenom) { + return rb.RewardBand, nil + } + } + return math.LegacyZeroDec(), ErrNoRewardBand +} diff --git a/x/oracle/types/reward_band_test.go b/x/oracle/types/reward_band_test.go new file mode 100644 index 0000000..623fbf0 --- /dev/null +++ b/x/oracle/types/reward_band_test.go @@ -0,0 +1,63 @@ +package types + +import ( + "testing" + + "cosmossdk.io/math" + "github.com/stretchr/testify/require" +) + +func TestRewardBandString(t *testing.T) { + rb := RewardBand{ + SymbolDenom: "cheq", + RewardBand: math.LegacyOneDec(), + } + require.Equal(t, rb.String(), "symbol_denom: cheq\nreward_band: \"1.000000000000000000\"\n") + + rbl := RewardBandList{rb} + require.Equal(t, rbl.String(), "symbol_denom: cheq\nreward_band: \"1.000000000000000000\"") +} + +func TestRewardBandEqual(t *testing.T) { + rb := RewardBand{ + SymbolDenom: "cheq", + RewardBand: math.LegacyOneDec(), + } + rb2 := RewardBand{ + SymbolDenom: "cheq", + RewardBand: math.LegacyOneDec(), + } + rb3 := RewardBand{ + SymbolDenom: "inequal", + RewardBand: math.LegacyOneDec(), + } + + require.True(t, rb.Equal(&rb2)) + require.False(t, rb.Equal(&rb3)) + require.False(t, rb2.Equal(&rb3)) +} + +func TestRewardBandDenomFinder(t *testing.T) { + rbl := RewardBandList{ + { + SymbolDenom: "foo", + RewardBand: math.LegacyOneDec(), + }, + { + SymbolDenom: "bar", + RewardBand: math.LegacyZeroDec(), + }, + } + + band, err := rbl.GetBandFromDenom("foo") + require.NoError(t, err) + require.Equal(t, band, math.LegacyOneDec()) + + band, err = rbl.GetBandFromDenom("bar") + require.NoError(t, err) + require.Equal(t, band, math.LegacyZeroDec()) + + band, err = rbl.GetBandFromDenom("baz") + require.Error(t, err) + require.Equal(t, band, math.LegacyZeroDec()) +} diff --git a/x/oracle/types/state.pb.go b/x/oracle/types/state.pb.go new file mode 100644 index 0000000..be8900f --- /dev/null +++ b/x/oracle/types/state.pb.go @@ -0,0 +1,356 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: oracle/v1/state.proto + +package types + +import ( + _ "cosmossdk.io/orm" + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ExampleData struct { + Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *ExampleData) Reset() { *m = ExampleData{} } +func (m *ExampleData) String() string { return proto.CompactTextString(m) } +func (*ExampleData) ProtoMessage() {} +func (*ExampleData) Descriptor() ([]byte, []int) { + return fileDescriptor_8840885873256d8c, []int{0} +} +func (m *ExampleData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExampleData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExampleData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExampleData) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExampleData.Merge(m, src) +} +func (m *ExampleData) XXX_Size() int { + return m.Size() +} +func (m *ExampleData) XXX_DiscardUnknown() { + xxx_messageInfo_ExampleData.DiscardUnknown(m) +} + +var xxx_messageInfo_ExampleData proto.InternalMessageInfo + +func (m *ExampleData) GetAccount() []byte { + if m != nil { + return m.Account + } + return nil +} + +func (m *ExampleData) GetAmount() uint64 { + if m != nil { + return m.Amount + } + return 0 +} + +func init() { + proto.RegisterType((*ExampleData)(nil), "oracle.v1.ExampleData") +} + +func init() { proto.RegisterFile("oracle/v1/state.proto", fileDescriptor_8840885873256d8c) } + +var fileDescriptor_8840885873256d8c = []byte{ + // 219 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0x2f, 0x4a, 0x4c, + 0xce, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0x2e, 0x49, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0xe2, 0x84, 0x08, 0xeb, 0x95, 0x19, 0x4a, 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, + 0xeb, 0xe7, 0x17, 0xe5, 0x82, 0x54, 0xe5, 0x17, 0xe5, 0x42, 0xd4, 0x28, 0x25, 0x70, 0x71, 0xbb, + 0x56, 0x24, 0xe6, 0x16, 0xe4, 0xa4, 0xba, 0x24, 0x96, 0x24, 0x0a, 0x49, 0x70, 0xb1, 0x27, 0x26, + 0x27, 0xe7, 0x97, 0xe6, 0x95, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0xc1, 0xb8, 0x42, 0x62, + 0x5c, 0x6c, 0x89, 0xb9, 0x60, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x96, 0x20, 0x28, 0xcf, 0x4a, 0xfe, + 0xd3, 0xbc, 0xcb, 0x7d, 0xcc, 0x92, 0x5c, 0x9c, 0x70, 0x9d, 0x42, 0x5c, 0x30, 0xa5, 0x02, 0x8c, + 0x12, 0x8c, 0x4e, 0xee, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, + 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x9b, + 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0xef, 0x92, 0x98, 0x5a, 0xe6, 0x9b, + 0x59, 0x92, 0x51, 0x94, 0x98, 0xa7, 0x9f, 0x92, 0x9b, 0x9c, 0x91, 0x98, 0x99, 0xa7, 0x5f, 0xa1, + 0x0f, 0xf5, 0x57, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0xc5, 0xc6, 0x80, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xda, 0xba, 0xb6, 0xcc, 0xee, 0x00, 0x00, 0x00, +} + +func (m *ExampleData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExampleData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExampleData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Amount != 0 { + i = encodeVarintState(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x10 + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintState(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintState(dAtA []byte, offset int, v uint64) int { + offset -= sovState(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ExampleData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + if m.Amount != 0 { + n += 1 + sovState(uint64(m.Amount)) + } + return n +} + +func sovState(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozState(x uint64) (n int) { + return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ExampleData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExampleData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExampleData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = append(m.Account[:0], dAtA[iNdEx:postIndex]...) + if m.Account == nil { + m.Account = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + m.Amount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Amount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipState(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipState(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowState + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowState + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowState + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthState + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupState + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthState + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowState = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupState = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go new file mode 100644 index 0000000..43f1aa7 --- /dev/null +++ b/x/oracle/types/tx.pb.go @@ -0,0 +1,4869 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: oracle/v1/tx.proto + +package types + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgAggregateExchangeRatePrevote represents a message to submit an aggregate +// exchange rate prevote. +type MsgAggregateExchangeRatePrevote struct { + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty" yaml:"hash"` + // Feeder is the author and the signer of the message. + Feeder string `protobuf:"bytes,2,opt,name=feeder,proto3" json:"feeder,omitempty"` + Validator string `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"` +} + +func (m *MsgAggregateExchangeRatePrevote) Reset() { *m = MsgAggregateExchangeRatePrevote{} } +func (m *MsgAggregateExchangeRatePrevote) String() string { return proto.CompactTextString(m) } +func (*MsgAggregateExchangeRatePrevote) ProtoMessage() {} +func (*MsgAggregateExchangeRatePrevote) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{0} +} +func (m *MsgAggregateExchangeRatePrevote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAggregateExchangeRatePrevote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAggregateExchangeRatePrevote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAggregateExchangeRatePrevote) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAggregateExchangeRatePrevote.Merge(m, src) +} +func (m *MsgAggregateExchangeRatePrevote) XXX_Size() int { + return m.Size() +} +func (m *MsgAggregateExchangeRatePrevote) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAggregateExchangeRatePrevote.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAggregateExchangeRatePrevote proto.InternalMessageInfo + +// MsgAggregateExchangeRatePrevoteResponse defines the +// Msg/AggregateExchangeRatePrevote response type. +type MsgAggregateExchangeRatePrevoteResponse struct { +} + +func (m *MsgAggregateExchangeRatePrevoteResponse) Reset() { + *m = MsgAggregateExchangeRatePrevoteResponse{} +} +func (m *MsgAggregateExchangeRatePrevoteResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAggregateExchangeRatePrevoteResponse) ProtoMessage() {} +func (*MsgAggregateExchangeRatePrevoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{1} +} +func (m *MsgAggregateExchangeRatePrevoteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAggregateExchangeRatePrevoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAggregateExchangeRatePrevoteResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAggregateExchangeRatePrevoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAggregateExchangeRatePrevoteResponse.Merge(m, src) +} +func (m *MsgAggregateExchangeRatePrevoteResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAggregateExchangeRatePrevoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAggregateExchangeRatePrevoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAggregateExchangeRatePrevoteResponse proto.InternalMessageInfo + +// MsgAggregateExchangeRateVote represents a message to submit anaggregate +// exchange rate vote. +type MsgAggregateExchangeRateVote struct { + Salt string `protobuf:"bytes,1,opt,name=salt,proto3" json:"salt,omitempty" yaml:"salt"` + ExchangeRates string `protobuf:"bytes,2,opt,name=exchange_rates,json=exchangeRates,proto3" json:"exchange_rates,omitempty" yaml:"exchange_rates"` + // Feeder is the author and the signer of the message. + Feeder string `protobuf:"bytes,3,opt,name=feeder,proto3" json:"feeder,omitempty"` + Validator string `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` +} + +func (m *MsgAggregateExchangeRateVote) Reset() { *m = MsgAggregateExchangeRateVote{} } +func (m *MsgAggregateExchangeRateVote) String() string { return proto.CompactTextString(m) } +func (*MsgAggregateExchangeRateVote) ProtoMessage() {} +func (*MsgAggregateExchangeRateVote) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{2} +} +func (m *MsgAggregateExchangeRateVote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAggregateExchangeRateVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAggregateExchangeRateVote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAggregateExchangeRateVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAggregateExchangeRateVote.Merge(m, src) +} +func (m *MsgAggregateExchangeRateVote) XXX_Size() int { + return m.Size() +} +func (m *MsgAggregateExchangeRateVote) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAggregateExchangeRateVote.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAggregateExchangeRateVote proto.InternalMessageInfo + +// MsgAggregateExchangeRateVoteResponse defines the +// Msg/AggregateExchangeRateVote response type. +type MsgAggregateExchangeRateVoteResponse struct { +} + +func (m *MsgAggregateExchangeRateVoteResponse) Reset() { *m = MsgAggregateExchangeRateVoteResponse{} } +func (m *MsgAggregateExchangeRateVoteResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAggregateExchangeRateVoteResponse) ProtoMessage() {} +func (*MsgAggregateExchangeRateVoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{3} +} +func (m *MsgAggregateExchangeRateVoteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAggregateExchangeRateVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAggregateExchangeRateVoteResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAggregateExchangeRateVoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAggregateExchangeRateVoteResponse.Merge(m, src) +} +func (m *MsgAggregateExchangeRateVoteResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAggregateExchangeRateVoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAggregateExchangeRateVoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAggregateExchangeRateVoteResponse proto.InternalMessageInfo + +// MsgDelegateFeedConsent represents a message to delegate oracle voting rights +// to another address. +type MsgDelegateFeedConsent struct { + // Operator is the author and the signer of the message. + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + Delegate string `protobuf:"bytes,2,opt,name=delegate,proto3" json:"delegate,omitempty"` +} + +func (m *MsgDelegateFeedConsent) Reset() { *m = MsgDelegateFeedConsent{} } +func (m *MsgDelegateFeedConsent) String() string { return proto.CompactTextString(m) } +func (*MsgDelegateFeedConsent) ProtoMessage() {} +func (*MsgDelegateFeedConsent) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{4} +} +func (m *MsgDelegateFeedConsent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDelegateFeedConsent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDelegateFeedConsent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDelegateFeedConsent) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDelegateFeedConsent.Merge(m, src) +} +func (m *MsgDelegateFeedConsent) XXX_Size() int { + return m.Size() +} +func (m *MsgDelegateFeedConsent) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDelegateFeedConsent.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDelegateFeedConsent proto.InternalMessageInfo + +// MsgDelegateFeedConsentResponse defines the Msg/DelegateFeedConsent response +// type. +type MsgDelegateFeedConsentResponse struct { +} + +func (m *MsgDelegateFeedConsentResponse) Reset() { *m = MsgDelegateFeedConsentResponse{} } +func (m *MsgDelegateFeedConsentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDelegateFeedConsentResponse) ProtoMessage() {} +func (*MsgDelegateFeedConsentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{5} +} +func (m *MsgDelegateFeedConsentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDelegateFeedConsentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDelegateFeedConsentResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDelegateFeedConsentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDelegateFeedConsentResponse.Merge(m, src) +} +func (m *MsgDelegateFeedConsentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDelegateFeedConsentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDelegateFeedConsentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDelegateFeedConsentResponse proto.InternalMessageInfo + +// MsgLegacyGovUpdateParams defines the Msg/MsgLegacyGovUpdateParams request type. +type MsgLegacyGovUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Keys []string `protobuf:"bytes,4,rep,name=keys,proto3" json:"keys,omitempty"` + Changes Params `protobuf:"bytes,5,opt,name=changes,proto3" json:"changes"` +} + +func (m *MsgLegacyGovUpdateParams) Reset() { *m = MsgLegacyGovUpdateParams{} } +func (*MsgLegacyGovUpdateParams) ProtoMessage() {} +func (*MsgLegacyGovUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{6} +} +func (m *MsgLegacyGovUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLegacyGovUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLegacyGovUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgLegacyGovUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLegacyGovUpdateParams.Merge(m, src) +} +func (m *MsgLegacyGovUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgLegacyGovUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLegacyGovUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLegacyGovUpdateParams proto.InternalMessageInfo + +// MsgLegacyGovUpdateParams defines the Msg/MsgLegacyGovUpdateParams response type. +type MsgLegacyGovUpdateParamsResponse struct { +} + +func (m *MsgLegacyGovUpdateParamsResponse) Reset() { *m = MsgLegacyGovUpdateParamsResponse{} } +func (m *MsgLegacyGovUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgLegacyGovUpdateParamsResponse) ProtoMessage() {} +func (*MsgLegacyGovUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{7} +} +func (m *MsgLegacyGovUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLegacyGovUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLegacyGovUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgLegacyGovUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLegacyGovUpdateParamsResponse.Merge(m, src) +} +func (m *MsgLegacyGovUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgLegacyGovUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLegacyGovUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLegacyGovUpdateParamsResponse proto.InternalMessageInfo + +// MsgGovUpdateParams defines the Msg/GovUpdateParams request type. +type MsgGovUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // title of the proposal + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // plan is the param update plan + Plan ParamUpdatePlan `protobuf:"bytes,4,opt,name=plan,proto3" json:"plan"` +} + +func (m *MsgGovUpdateParams) Reset() { *m = MsgGovUpdateParams{} } +func (*MsgGovUpdateParams) ProtoMessage() {} +func (*MsgGovUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{8} +} +func (m *MsgGovUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGovUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovUpdateParams.Merge(m, src) +} +func (m *MsgGovUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgGovUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovUpdateParams proto.InternalMessageInfo + +// MsgGovUpdateParamsResponse defines the Msg/GovUpdateParams response type. +type MsgGovUpdateParamsResponse struct { +} + +func (m *MsgGovUpdateParamsResponse) Reset() { *m = MsgGovUpdateParamsResponse{} } +func (m *MsgGovUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGovUpdateParamsResponse) ProtoMessage() {} +func (*MsgGovUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{9} +} +func (m *MsgGovUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGovUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovUpdateParamsResponse.Merge(m, src) +} +func (m *MsgGovUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGovUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovUpdateParamsResponse proto.InternalMessageInfo + +// MsgGovAddDenoms defines the Msg/GovAddDenoms request type. +type MsgGovAddDenoms struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // title of the proposal + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // height at which the param update must be performed + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + // denom_list is the list of denoms to add to the oracle registry + DenomList DenomList `protobuf:"bytes,5,rep,name=denom_list,json=denomList,proto3,castrepeated=DenomList" json:"denom_list"` + // whether or not the assets should be mandatory + Mandatory bool `protobuf:"varint,6,opt,name=mandatory,proto3" json:"mandatory,omitempty"` + // reward_band determines what the reward_band will be for every + // asset in the proposal. If not provided, it will default. + RewardBand *cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=reward_band,json=rewardBand,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"reward_band,omitempty" yaml:"vote_threshold"` + // currency_pair_providers defines the currency provider pairs for + // each denom being added. + CurrencyPairProviders CurrencyPairProvidersList `protobuf:"bytes,8,rep,name=currency_pair_providers,json=currencyPairProviders,proto3,castrepeated=CurrencyPairProvidersList" json:"currency_pair_providers" yaml:"currency_pair_providers"` + // currency_deviation_thresholds defines the deviation thresholds + // for each denom being added. + CurrencyDeviationThresholds CurrencyDeviationThresholdList `protobuf:"bytes,9,rep,name=currency_deviation_thresholds,json=currencyDeviationThresholds,proto3,castrepeated=CurrencyDeviationThresholdList" json:"currency_deviation_thresholds" yaml:"currency_deviation_thresholds"` +} + +func (m *MsgGovAddDenoms) Reset() { *m = MsgGovAddDenoms{} } +func (*MsgGovAddDenoms) ProtoMessage() {} +func (*MsgGovAddDenoms) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{10} +} +func (m *MsgGovAddDenoms) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovAddDenoms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovAddDenoms.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGovAddDenoms) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovAddDenoms.Merge(m, src) +} +func (m *MsgGovAddDenoms) XXX_Size() int { + return m.Size() +} +func (m *MsgGovAddDenoms) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovAddDenoms.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovAddDenoms proto.InternalMessageInfo + +// MsgGovAddDenomResponse defines the Msg/GovAddDenomResponse response type. +type MsgGovAddDenomsResponse struct { +} + +func (m *MsgGovAddDenomsResponse) Reset() { *m = MsgGovAddDenomsResponse{} } +func (m *MsgGovAddDenomsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGovAddDenomsResponse) ProtoMessage() {} +func (*MsgGovAddDenomsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{11} +} +func (m *MsgGovAddDenomsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovAddDenomsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovAddDenomsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGovAddDenomsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovAddDenomsResponse.Merge(m, src) +} +func (m *MsgGovAddDenomsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGovAddDenomsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovAddDenomsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovAddDenomsResponse proto.InternalMessageInfo + +// MsgGovRemoveCurrencyPairProviders defines the Msg/GovRemoveCurrencyPairProviders request type. +type MsgGovRemoveCurrencyPairProviders struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // title of the proposal + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // height at which the param update must be performed + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + // currency_pair_providers to remove from the current CurrencyPairProvidersList + CurrencyPairProviders CurrencyPairProvidersList `protobuf:"bytes,5,rep,name=currency_pair_providers,json=currencyPairProviders,proto3,castrepeated=CurrencyPairProvidersList" json:"currency_pair_providers" yaml:"currency_pair_providers"` +} + +func (m *MsgGovRemoveCurrencyPairProviders) Reset() { *m = MsgGovRemoveCurrencyPairProviders{} } +func (*MsgGovRemoveCurrencyPairProviders) ProtoMessage() {} +func (*MsgGovRemoveCurrencyPairProviders) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{12} +} +func (m *MsgGovRemoveCurrencyPairProviders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovRemoveCurrencyPairProviders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovRemoveCurrencyPairProviders.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGovRemoveCurrencyPairProviders) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovRemoveCurrencyPairProviders.Merge(m, src) +} +func (m *MsgGovRemoveCurrencyPairProviders) XXX_Size() int { + return m.Size() +} +func (m *MsgGovRemoveCurrencyPairProviders) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovRemoveCurrencyPairProviders.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovRemoveCurrencyPairProviders proto.InternalMessageInfo + +// MsgGovRemoveCurrencyPairProvidersResponse defines the Msg/GovRemoveCurrencyPairProvidersResponse response type. +type MsgGovRemoveCurrencyPairProvidersResponse struct { +} + +func (m *MsgGovRemoveCurrencyPairProvidersResponse) Reset() { + *m = MsgGovRemoveCurrencyPairProvidersResponse{} +} +func (m *MsgGovRemoveCurrencyPairProvidersResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgGovRemoveCurrencyPairProvidersResponse) ProtoMessage() {} +func (*MsgGovRemoveCurrencyPairProvidersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{13} +} +func (m *MsgGovRemoveCurrencyPairProvidersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovRemoveCurrencyPairProvidersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovRemoveCurrencyPairProvidersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGovRemoveCurrencyPairProvidersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovRemoveCurrencyPairProvidersResponse.Merge(m, src) +} +func (m *MsgGovRemoveCurrencyPairProvidersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGovRemoveCurrencyPairProvidersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovRemoveCurrencyPairProvidersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovRemoveCurrencyPairProvidersResponse proto.InternalMessageInfo + +// MsgGovRemoveCurrencyDeviationThresholds defines the Msg/GovRemoveCurrencyDeviationThresholds request type. +type MsgGovRemoveCurrencyDeviationThresholds struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // title of the proposal + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // height at which the param update must be performed + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + // currencies to remove from the current CurrencyDeviationThresholdsList + Currencies []string `protobuf:"bytes,5,rep,name=currencies,proto3" json:"currencies,omitempty"` +} + +func (m *MsgGovRemoveCurrencyDeviationThresholds) Reset() { + *m = MsgGovRemoveCurrencyDeviationThresholds{} +} +func (*MsgGovRemoveCurrencyDeviationThresholds) ProtoMessage() {} +func (*MsgGovRemoveCurrencyDeviationThresholds) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{14} +} +func (m *MsgGovRemoveCurrencyDeviationThresholds) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovRemoveCurrencyDeviationThresholds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholds.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGovRemoveCurrencyDeviationThresholds) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholds.Merge(m, src) +} +func (m *MsgGovRemoveCurrencyDeviationThresholds) XXX_Size() int { + return m.Size() +} +func (m *MsgGovRemoveCurrencyDeviationThresholds) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholds.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholds proto.InternalMessageInfo + +// MsgGovRemoveCurrencyDeviationThresholdsResponse defines the Msg/GovRemoveCurrencyDeviationThresholdsResponse response type. +type MsgGovRemoveCurrencyDeviationThresholdsResponse struct { +} + +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) Reset() { + *m = MsgGovRemoveCurrencyDeviationThresholdsResponse{} +} +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgGovRemoveCurrencyDeviationThresholdsResponse) ProtoMessage() {} +func (*MsgGovRemoveCurrencyDeviationThresholdsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{15} +} +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholdsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholdsResponse.Merge(m, src) +} +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholdsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovRemoveCurrencyDeviationThresholdsResponse proto.InternalMessageInfo + +// MsgGovCancelUpdateParamPlan defines the Msg/GovCancelUpdateParamPlan request type. +type MsgGovCancelUpdateParamPlan struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // title of the proposal + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // description of the proposal + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // height of param update plan to cancel + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` +} + +func (m *MsgGovCancelUpdateParamPlan) Reset() { *m = MsgGovCancelUpdateParamPlan{} } +func (*MsgGovCancelUpdateParamPlan) ProtoMessage() {} +func (*MsgGovCancelUpdateParamPlan) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{16} +} +func (m *MsgGovCancelUpdateParamPlan) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovCancelUpdateParamPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovCancelUpdateParamPlan.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGovCancelUpdateParamPlan) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovCancelUpdateParamPlan.Merge(m, src) +} +func (m *MsgGovCancelUpdateParamPlan) XXX_Size() int { + return m.Size() +} +func (m *MsgGovCancelUpdateParamPlan) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovCancelUpdateParamPlan.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovCancelUpdateParamPlan proto.InternalMessageInfo + +// MsgGovCancelUpdateParamPlanResponse defines the Msg/GovCancelUpdateParamPlanResponse response type. +type MsgGovCancelUpdateParamPlanResponse struct { +} + +func (m *MsgGovCancelUpdateParamPlanResponse) Reset() { *m = MsgGovCancelUpdateParamPlanResponse{} } +func (m *MsgGovCancelUpdateParamPlanResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGovCancelUpdateParamPlanResponse) ProtoMessage() {} +func (*MsgGovCancelUpdateParamPlanResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31571edce0094a5d, []int{17} +} +func (m *MsgGovCancelUpdateParamPlanResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovCancelUpdateParamPlanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovCancelUpdateParamPlanResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgGovCancelUpdateParamPlanResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovCancelUpdateParamPlanResponse.Merge(m, src) +} +func (m *MsgGovCancelUpdateParamPlanResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGovCancelUpdateParamPlanResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovCancelUpdateParamPlanResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovCancelUpdateParamPlanResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgAggregateExchangeRatePrevote)(nil), "oracle.v1.MsgAggregateExchangeRatePrevote") + proto.RegisterType((*MsgAggregateExchangeRatePrevoteResponse)(nil), "oracle.v1.MsgAggregateExchangeRatePrevoteResponse") + proto.RegisterType((*MsgAggregateExchangeRateVote)(nil), "oracle.v1.MsgAggregateExchangeRateVote") + proto.RegisterType((*MsgAggregateExchangeRateVoteResponse)(nil), "oracle.v1.MsgAggregateExchangeRateVoteResponse") + proto.RegisterType((*MsgDelegateFeedConsent)(nil), "oracle.v1.MsgDelegateFeedConsent") + proto.RegisterType((*MsgDelegateFeedConsentResponse)(nil), "oracle.v1.MsgDelegateFeedConsentResponse") + proto.RegisterType((*MsgLegacyGovUpdateParams)(nil), "oracle.v1.MsgLegacyGovUpdateParams") + proto.RegisterType((*MsgLegacyGovUpdateParamsResponse)(nil), "oracle.v1.MsgLegacyGovUpdateParamsResponse") + proto.RegisterType((*MsgGovUpdateParams)(nil), "oracle.v1.MsgGovUpdateParams") + proto.RegisterType((*MsgGovUpdateParamsResponse)(nil), "oracle.v1.MsgGovUpdateParamsResponse") + proto.RegisterType((*MsgGovAddDenoms)(nil), "oracle.v1.MsgGovAddDenoms") + proto.RegisterType((*MsgGovAddDenomsResponse)(nil), "oracle.v1.MsgGovAddDenomsResponse") + proto.RegisterType((*MsgGovRemoveCurrencyPairProviders)(nil), "oracle.v1.MsgGovRemoveCurrencyPairProviders") + proto.RegisterType((*MsgGovRemoveCurrencyPairProvidersResponse)(nil), "oracle.v1.MsgGovRemoveCurrencyPairProvidersResponse") + proto.RegisterType((*MsgGovRemoveCurrencyDeviationThresholds)(nil), "oracle.v1.MsgGovRemoveCurrencyDeviationThresholds") + proto.RegisterType((*MsgGovRemoveCurrencyDeviationThresholdsResponse)(nil), "oracle.v1.MsgGovRemoveCurrencyDeviationThresholdsResponse") + proto.RegisterType((*MsgGovCancelUpdateParamPlan)(nil), "oracle.v1.MsgGovCancelUpdateParamPlan") + proto.RegisterType((*MsgGovCancelUpdateParamPlanResponse)(nil), "oracle.v1.MsgGovCancelUpdateParamPlanResponse") +} + +func init() { proto.RegisterFile("oracle/v1/tx.proto", fileDescriptor_31571edce0094a5d) } + +var fileDescriptor_31571edce0094a5d = []byte{ + // 1183 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0xe3, 0xc4, + 0x1b, 0x8e, 0x37, 0x49, 0xb7, 0x79, 0xf3, 0xfb, 0x51, 0xd6, 0xdb, 0x0f, 0xd7, 0x6d, 0x9d, 0xd4, + 0x6d, 0xb7, 0x1f, 0x4b, 0x13, 0x1a, 0x56, 0x1c, 0x2a, 0x10, 0x34, 0x2d, 0x70, 0x60, 0xb3, 0xaa, + 0x0c, 0x2c, 0x12, 0x12, 0x8a, 0xa6, 0xf6, 0x60, 0x5b, 0xeb, 0xd8, 0xd1, 0xcc, 0x34, 0x34, 0x17, + 0x84, 0x10, 0x07, 0x2e, 0x48, 0x7b, 0x42, 0x5c, 0x90, 0xf6, 0xbc, 0x12, 0xd2, 0x1e, 0xf6, 0xc2, + 0x91, 0x5b, 0x4f, 0x68, 0xd5, 0x03, 0x42, 0x1c, 0xb2, 0xd0, 0x1e, 0xca, 0x85, 0x4b, 0xff, 0x02, + 0xe4, 0x8f, 0x38, 0x49, 0xeb, 0x38, 0x59, 0x84, 0xd4, 0xde, 0xec, 0x79, 0x9f, 0xf7, 0x99, 0xe7, + 0x79, 0x66, 0x32, 0x1e, 0x05, 0x78, 0x87, 0x20, 0xd5, 0xc2, 0xc5, 0xc6, 0x46, 0x91, 0x1d, 0x14, + 0xea, 0xc4, 0x61, 0x0e, 0x9f, 0xf1, 0xc7, 0x0a, 0x8d, 0x0d, 0x71, 0x4a, 0x75, 0x68, 0xcd, 0xa1, + 0xc5, 0x1a, 0xd5, 0x5d, 0x48, 0x8d, 0xea, 0x3e, 0x46, 0x9c, 0xec, 0xf4, 0x05, 0x68, 0x7f, 0x7c, + 0x5c, 0x77, 0x74, 0xc7, 0x7b, 0x2c, 0xba, 0x4f, 0xc1, 0xe8, 0xb4, 0x4f, 0x53, 0xf5, 0x0b, 0xfe, + 0x8b, 0x5f, 0x92, 0x7f, 0xe1, 0x20, 0x57, 0xa1, 0xfa, 0x96, 0xae, 0x13, 0xac, 0x23, 0x86, 0xdf, + 0x39, 0x50, 0x0d, 0x64, 0xeb, 0x58, 0x41, 0x0c, 0xef, 0x12, 0xdc, 0x70, 0x18, 0xe6, 0x17, 0x20, + 0x65, 0x20, 0x6a, 0x08, 0x5c, 0x9e, 0x5b, 0xc9, 0x94, 0xc7, 0xce, 0x5a, 0xb9, 0x6c, 0x13, 0xd5, + 0xac, 0x4d, 0xd9, 0x1d, 0x95, 0x15, 0xaf, 0xc8, 0xbf, 0x0a, 0x23, 0x9f, 0x61, 0xac, 0x61, 0x22, + 0x5c, 0xf3, 0x60, 0xc2, 0xd1, 0xd3, 0xf5, 0xf1, 0x60, 0xaa, 0x2d, 0x4d, 0x23, 0x98, 0xd2, 0x0f, + 0x18, 0x31, 0x6d, 0x5d, 0x09, 0x70, 0xfc, 0x5b, 0x90, 0x69, 0x20, 0xcb, 0xd4, 0x10, 0x73, 0x88, + 0x90, 0xf4, 0x9a, 0xe6, 0x8f, 0x9e, 0xae, 0xcf, 0x05, 0x4d, 0xf7, 0xdb, 0xb5, 0xde, 0xee, 0x4e, + 0xcf, 0xe6, 0xcd, 0x6f, 0x1e, 0xe5, 0x12, 0x7f, 0x3d, 0xca, 0x25, 0xbe, 0x3a, 0x7d, 0xb2, 0x16, + 0xb0, 0xca, 0xab, 0xb0, 0x3c, 0xc0, 0x8f, 0x82, 0x69, 0xdd, 0xb1, 0x29, 0x96, 0xbf, 0xbd, 0x06, + 0xb3, 0xfd, 0xb0, 0xf7, 0x03, 0xe3, 0x14, 0x59, 0xec, 0xa2, 0x71, 0x77, 0x54, 0x56, 0xbc, 0x22, + 0xff, 0x36, 0xbc, 0x84, 0x83, 0xc6, 0x2a, 0x41, 0x0c, 0xd3, 0x20, 0x80, 0xe9, 0xb3, 0x56, 0x6e, + 0xc2, 0x87, 0xf7, 0xd6, 0x65, 0xe5, 0xff, 0xb8, 0x6b, 0x26, 0xda, 0x15, 0x5d, 0xf2, 0xdf, 0x44, + 0x97, 0xfa, 0xaf, 0xa2, 0xbb, 0x05, 0x8b, 0x71, 0x71, 0x84, 0xb9, 0xfd, 0xc8, 0xc1, 0x64, 0x85, + 0xea, 0x3b, 0xd8, 0xf2, 0x70, 0xef, 0x62, 0xac, 0x6d, 0xbb, 0x05, 0x9b, 0xf1, 0x6f, 0xc2, 0xa8, + 0x53, 0xc7, 0xc4, 0xd3, 0xc5, 0x0d, 0xab, 0x2b, 0x6c, 0x71, 0xdb, 0xb5, 0x80, 0x35, 0x48, 0x71, + 0x98, 0xf6, 0x76, 0xcb, 0xe6, 0x44, 0xb7, 0xab, 0x90, 0x55, 0xce, 0x83, 0x14, 0x2d, 0x37, 0x74, + 0xf4, 0x37, 0x07, 0x42, 0x85, 0xea, 0x77, 0xb1, 0x8e, 0xd4, 0xe6, 0x7b, 0x4e, 0xe3, 0xa3, 0xba, + 0xe6, 0xee, 0x17, 0x44, 0x50, 0x8d, 0xf2, 0xaf, 0x43, 0x06, 0xed, 0x33, 0xc3, 0x21, 0x26, 0x6b, + 0x06, 0xa6, 0xfa, 0xaf, 0x50, 0x07, 0xca, 0x8f, 0x43, 0x9a, 0x99, 0xcc, 0x0a, 0x9c, 0x28, 0xfe, + 0x0b, 0x9f, 0x87, 0xac, 0x86, 0xa9, 0x4a, 0xcc, 0x3a, 0x33, 0x1d, 0xdb, 0x5f, 0x71, 0xa5, 0x7b, + 0x88, 0xe7, 0x21, 0xf5, 0x00, 0x37, 0xa9, 0x90, 0xca, 0x27, 0x57, 0x32, 0x8a, 0xf7, 0xcc, 0x6f, + 0xc0, 0x75, 0x7f, 0x31, 0xa8, 0x90, 0xce, 0x73, 0x2b, 0xd9, 0xd2, 0x8d, 0x42, 0x78, 0x4a, 0x14, + 0x7c, 0x9d, 0xe5, 0xd4, 0x61, 0x2b, 0x97, 0x50, 0xda, 0xb8, 0x4d, 0xd1, 0x0d, 0xe3, 0x7b, 0x3f, + 0x10, 0xce, 0x0d, 0xa4, 0x23, 0x4d, 0x96, 0x21, 0xdf, 0xcf, 0x6e, 0x98, 0xc9, 0xaf, 0x1c, 0xf0, + 0x15, 0xaa, 0x5f, 0x76, 0x1a, 0x77, 0x20, 0x55, 0xb7, 0x90, 0xed, 0xed, 0xf2, 0x6c, 0x49, 0x3c, + 0x6f, 0x3b, 0xd0, 0x66, 0x21, 0x3b, 0xf0, 0xef, 0xa1, 0x63, 0xcd, 0xcf, 0x82, 0x78, 0xd1, 0x57, + 0x68, 0xfb, 0x28, 0x0d, 0x63, 0x7e, 0x79, 0x4b, 0xd3, 0x76, 0xb0, 0xed, 0x5c, 0x82, 0xe7, 0x49, + 0x18, 0x31, 0xb0, 0xa9, 0x1b, 0xcc, 0x73, 0x9d, 0x54, 0x82, 0x37, 0xbe, 0x0c, 0xa0, 0xb9, 0x8a, + 0xaa, 0x96, 0x49, 0x99, 0x90, 0xce, 0x27, 0x57, 0xb2, 0xa5, 0x97, 0xbb, 0x12, 0xf1, 0xe4, 0x96, + 0x6f, 0xb8, 0x39, 0x3c, 0x7e, 0x9e, 0xcb, 0x78, 0xaf, 0x77, 0x4d, 0xca, 0x94, 0x8c, 0xd6, 0x7e, + 0xe4, 0x67, 0x21, 0x53, 0x43, 0xb6, 0xf7, 0x33, 0x6a, 0x0a, 0x23, 0x79, 0x6e, 0x65, 0x54, 0xe9, + 0x0c, 0xf0, 0x9f, 0x42, 0x96, 0xe0, 0xcf, 0x11, 0xd1, 0xaa, 0x7b, 0xc8, 0xd6, 0x84, 0xeb, 0x9e, + 0xd7, 0x37, 0x0e, 0x5b, 0x39, 0xee, 0xf7, 0x56, 0x6e, 0xc6, 0xf7, 0x4b, 0xb5, 0x07, 0x05, 0xd3, + 0x29, 0xd6, 0x10, 0x33, 0x0a, 0xfe, 0x16, 0xda, 0xc1, 0x6a, 0xe7, 0xb0, 0x73, 0x8f, 0xd8, 0x2a, + 0x33, 0x08, 0xa6, 0x86, 0x63, 0x69, 0xb2, 0x02, 0x3e, 0x61, 0x19, 0xd9, 0x1a, 0xff, 0x03, 0x07, + 0x53, 0xea, 0x3e, 0x21, 0xd8, 0x56, 0x9b, 0xd5, 0x3a, 0x32, 0x89, 0xfb, 0x49, 0x6a, 0x98, 0x1a, + 0x26, 0x54, 0x18, 0xf5, 0xec, 0xe4, 0xbb, 0xec, 0x6c, 0x07, 0xc8, 0x5d, 0x64, 0x92, 0xdd, 0x36, + 0xae, 0xbc, 0xed, 0xda, 0x3b, 0x6b, 0xe5, 0x24, 0x7f, 0xba, 0x3e, 0x74, 0xf2, 0xe3, 0xe7, 0xb9, + 0xe9, 0x48, 0x02, 0x2f, 0x90, 0x09, 0x35, 0xaa, 0xc4, 0xff, 0xc4, 0xc1, 0x5c, 0x48, 0xa8, 0xe1, + 0x86, 0x89, 0xdc, 0xf5, 0xe8, 0xb8, 0xa1, 0x42, 0xc6, 0x53, 0xb9, 0x14, 0xa1, 0x72, 0xa7, 0x0d, + 0xff, 0xb0, 0x8d, 0x2e, 0xdf, 0x0b, 0xa4, 0x2e, 0x9e, 0x93, 0x1a, 0xc5, 0xec, 0x0a, 0x96, 0xfa, + 0x73, 0x79, 0xaa, 0x67, 0xd4, 0xbe, 0xf5, 0xf8, 0xdf, 0xfb, 0x34, 0x4c, 0x9d, 0xdb, 0xd3, 0xe1, + 0x7e, 0x3f, 0xbd, 0x06, 0xf3, 0x7e, 0x4d, 0xc1, 0x35, 0xa7, 0x81, 0x23, 0x33, 0xbb, 0x32, 0xbf, + 0x80, 0xb8, 0x0d, 0x94, 0xbe, 0xfc, 0x0d, 0x14, 0xbb, 0x08, 0xb7, 0x61, 0x75, 0x60, 0xd0, 0xdd, + 0x5f, 0xa4, 0xe5, 0x28, 0x74, 0xc4, 0xca, 0x5f, 0x99, 0xc5, 0x91, 0x00, 0x82, 0x54, 0x4c, 0xec, + 0x2f, 0x47, 0x46, 0xe9, 0x1a, 0x89, 0x0d, 0x67, 0x03, 0x8a, 0x43, 0xda, 0x0d, 0x23, 0xfa, 0x99, + 0x83, 0x19, 0xbf, 0x67, 0x1b, 0xd9, 0x2a, 0xb6, 0xba, 0x8e, 0x73, 0xf7, 0x7b, 0x70, 0x55, 0x62, + 0x89, 0xb5, 0xbd, 0x04, 0x0b, 0x31, 0x16, 0xda, 0x56, 0x4b, 0x0f, 0x47, 0x21, 0x59, 0xa1, 0x3a, + 0xff, 0x05, 0xcc, 0xc6, 0xde, 0xd4, 0xd7, 0xba, 0x36, 0xff, 0x80, 0x5b, 0xb0, 0x58, 0x1a, 0x1e, + 0xdb, 0xd6, 0xc1, 0xef, 0xc3, 0x74, 0xff, 0xdb, 0xf2, 0xf2, 0x10, 0x84, 0x2e, 0x50, 0x2c, 0x0e, + 0x09, 0x0c, 0xa7, 0x55, 0xe1, 0x66, 0xd4, 0x65, 0x73, 0xbe, 0x97, 0x27, 0x02, 0x22, 0xae, 0x0e, + 0x84, 0x84, 0x93, 0x98, 0x30, 0x11, 0x7d, 0xff, 0x5b, 0xe8, 0xe5, 0x88, 0x04, 0x89, 0xb7, 0x87, + 0x00, 0x85, 0x53, 0x7d, 0x0c, 0x63, 0xe7, 0x27, 0x99, 0xeb, 0xed, 0x3f, 0x4f, 0xbf, 0x14, 0x5b, + 0x0e, 0x89, 0xef, 0xc1, 0xff, 0x7a, 0x2e, 0x2e, 0xe2, 0x85, 0xb6, 0xb0, 0x26, 0xca, 0xfd, 0x6b, + 0x21, 0xdf, 0xd7, 0x1c, 0x48, 0x03, 0xbe, 0x0c, 0xaf, 0x5c, 0xa0, 0x89, 0x41, 0x8b, 0x77, 0x5e, + 0x04, 0x1d, 0xca, 0xf8, 0x8e, 0x83, 0xc5, 0xa1, 0x4e, 0xc2, 0xd2, 0x00, 0xfa, 0x88, 0x1e, 0x71, + 0xf3, 0xc5, 0x7b, 0x42, 0x61, 0x04, 0x84, 0xbe, 0xc7, 0xcf, 0xad, 0x0b, 0xbc, 0x91, 0x38, 0xb1, + 0x30, 0x1c, 0xae, 0x3d, 0xa7, 0x98, 0xfe, 0xf2, 0xf4, 0xc9, 0x1a, 0x57, 0x7e, 0xff, 0xf0, 0x4f, + 0x29, 0x71, 0x78, 0x2c, 0x71, 0xcf, 0x8e, 0x25, 0xee, 0x8f, 0x63, 0x89, 0x7b, 0x78, 0x22, 0x25, + 0x9e, 0x9d, 0x48, 0x89, 0xdf, 0x4e, 0xa4, 0xc4, 0x27, 0xeb, 0xba, 0xc9, 0x8c, 0xfd, 0xbd, 0x82, + 0xea, 0xd4, 0x8a, 0x3b, 0x08, 0x37, 0x2a, 0x26, 0x33, 0x08, 0xb2, 0x8b, 0x5a, 0x4d, 0x35, 0x90, + 0x69, 0x17, 0x0f, 0x82, 0xbf, 0x0d, 0x8a, 0xac, 0x59, 0xc7, 0x74, 0x6f, 0xc4, 0xfb, 0x33, 0xe0, + 0xb5, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xf3, 0xa3, 0xa5, 0x8f, 0x10, 0x00, 0x00, +} + +func (this *MsgLegacyGovUpdateParams) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgLegacyGovUpdateParams) + if !ok { + that2, ok := that.(MsgLegacyGovUpdateParams) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if len(this.Keys) != len(that1.Keys) { + return false + } + for i := range this.Keys { + if this.Keys[i] != that1.Keys[i] { + return false + } + } + if !this.Changes.Equal(&that1.Changes) { + return false + } + return true +} +func (this *MsgGovUpdateParams) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgGovUpdateParams) + if !ok { + that2, ok := that.(MsgGovUpdateParams) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if !this.Plan.Equal(&that1.Plan) { + return false + } + return true +} +func (this *MsgGovAddDenoms) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgGovAddDenoms) + if !ok { + that2, ok := that.(MsgGovAddDenoms) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.Height != that1.Height { + return false + } + if len(this.DenomList) != len(that1.DenomList) { + return false + } + for i := range this.DenomList { + if !this.DenomList[i].Equal(&that1.DenomList[i]) { + return false + } + } + if this.Mandatory != that1.Mandatory { + return false + } + if that1.RewardBand == nil { + if this.RewardBand != nil { + return false + } + } else if !this.RewardBand.Equal(*that1.RewardBand) { + return false + } + if len(this.CurrencyPairProviders) != len(that1.CurrencyPairProviders) { + return false + } + for i := range this.CurrencyPairProviders { + if !this.CurrencyPairProviders[i].Equal(&that1.CurrencyPairProviders[i]) { + return false + } + } + if len(this.CurrencyDeviationThresholds) != len(that1.CurrencyDeviationThresholds) { + return false + } + for i := range this.CurrencyDeviationThresholds { + if !this.CurrencyDeviationThresholds[i].Equal(&that1.CurrencyDeviationThresholds[i]) { + return false + } + } + return true +} +func (this *MsgGovRemoveCurrencyPairProviders) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgGovRemoveCurrencyPairProviders) + if !ok { + that2, ok := that.(MsgGovRemoveCurrencyPairProviders) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.Height != that1.Height { + return false + } + if len(this.CurrencyPairProviders) != len(that1.CurrencyPairProviders) { + return false + } + for i := range this.CurrencyPairProviders { + if !this.CurrencyPairProviders[i].Equal(&that1.CurrencyPairProviders[i]) { + return false + } + } + return true +} +func (this *MsgGovRemoveCurrencyDeviationThresholds) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgGovRemoveCurrencyDeviationThresholds) + if !ok { + that2, ok := that.(MsgGovRemoveCurrencyDeviationThresholds) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.Height != that1.Height { + return false + } + if len(this.Currencies) != len(that1.Currencies) { + return false + } + for i := range this.Currencies { + if this.Currencies[i] != that1.Currencies[i] { + return false + } + } + return true +} +func (this *MsgGovCancelUpdateParamPlan) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgGovCancelUpdateParamPlan) + if !ok { + that2, ok := that.(MsgGovCancelUpdateParamPlan) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.Height != that1.Height { + return false + } + return true +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // AggregateExchangeRatePrevote defines a method for submitting an aggregate + // exchange rate prevote. + AggregateExchangeRatePrevote(ctx context.Context, in *MsgAggregateExchangeRatePrevote, opts ...grpc.CallOption) (*MsgAggregateExchangeRatePrevoteResponse, error) + // AggregateExchangeRateVote defines a method for submitting an aggregate + // exchange rate vote. + AggregateExchangeRateVote(ctx context.Context, in *MsgAggregateExchangeRateVote, opts ...grpc.CallOption) (*MsgAggregateExchangeRateVoteResponse, error) + // DelegateFeedConsent defines a method for setting the feeder delegation. + DelegateFeedConsent(ctx context.Context, in *MsgDelegateFeedConsent, opts ...grpc.CallOption) (*MsgDelegateFeedConsentResponse, error) + // LegacyGovUpdateParams defines the legacy message that updates the oracle parameters. + LegacyGovUpdateParams(ctx context.Context, in *MsgLegacyGovUpdateParams, opts ...grpc.CallOption) (*MsgLegacyGovUpdateParamsResponse, error) + // GovUpdateParams updates the oracle parameters. + GovUpdateParams(ctx context.Context, in *MsgGovUpdateParams, opts ...grpc.CallOption) (*MsgGovUpdateParamsResponse, error) + // GovAddDenoms updates the oracle parameters to include a new tokens. + GovAddDenoms(ctx context.Context, in *MsgGovAddDenoms, opts ...grpc.CallOption) (*MsgGovAddDenomsResponse, error) + // GovRemoveCurrencyPairProviders updates the oracle parameters to remove a list of + // currency pair providers. + GovRemoveCurrencyPairProviders(ctx context.Context, in *MsgGovRemoveCurrencyPairProviders, opts ...grpc.CallOption) (*MsgGovRemoveCurrencyPairProvidersResponse, error) + // GovRemoveCurrencyDeviationThresholds updates the oracle parameters to remove a list + // of currency deviation thresholds. + GovRemoveCurrencyDeviationThresholds(ctx context.Context, in *MsgGovRemoveCurrencyDeviationThresholds, opts ...grpc.CallOption) (*MsgGovRemoveCurrencyDeviationThresholdsResponse, error) + // GovCancelUpdateParamPlan cancels a plan to update the oracle parameters. + GovCancelUpdateParamPlan(ctx context.Context, in *MsgGovCancelUpdateParamPlan, opts ...grpc.CallOption) (*MsgGovCancelUpdateParamPlanResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) AggregateExchangeRatePrevote(ctx context.Context, in *MsgAggregateExchangeRatePrevote, opts ...grpc.CallOption) (*MsgAggregateExchangeRatePrevoteResponse, error) { + out := new(MsgAggregateExchangeRatePrevoteResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Msg/AggregateExchangeRatePrevote", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) AggregateExchangeRateVote(ctx context.Context, in *MsgAggregateExchangeRateVote, opts ...grpc.CallOption) (*MsgAggregateExchangeRateVoteResponse, error) { + out := new(MsgAggregateExchangeRateVoteResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Msg/AggregateExchangeRateVote", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DelegateFeedConsent(ctx context.Context, in *MsgDelegateFeedConsent, opts ...grpc.CallOption) (*MsgDelegateFeedConsentResponse, error) { + out := new(MsgDelegateFeedConsentResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Msg/DelegateFeedConsent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) LegacyGovUpdateParams(ctx context.Context, in *MsgLegacyGovUpdateParams, opts ...grpc.CallOption) (*MsgLegacyGovUpdateParamsResponse, error) { + out := new(MsgLegacyGovUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Msg/LegacyGovUpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovUpdateParams(ctx context.Context, in *MsgGovUpdateParams, opts ...grpc.CallOption) (*MsgGovUpdateParamsResponse, error) { + out := new(MsgGovUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Msg/GovUpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovAddDenoms(ctx context.Context, in *MsgGovAddDenoms, opts ...grpc.CallOption) (*MsgGovAddDenomsResponse, error) { + out := new(MsgGovAddDenomsResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Msg/GovAddDenoms", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovRemoveCurrencyPairProviders(ctx context.Context, in *MsgGovRemoveCurrencyPairProviders, opts ...grpc.CallOption) (*MsgGovRemoveCurrencyPairProvidersResponse, error) { + out := new(MsgGovRemoveCurrencyPairProvidersResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Msg/GovRemoveCurrencyPairProviders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovRemoveCurrencyDeviationThresholds(ctx context.Context, in *MsgGovRemoveCurrencyDeviationThresholds, opts ...grpc.CallOption) (*MsgGovRemoveCurrencyDeviationThresholdsResponse, error) { + out := new(MsgGovRemoveCurrencyDeviationThresholdsResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Msg/GovRemoveCurrencyDeviationThresholds", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovCancelUpdateParamPlan(ctx context.Context, in *MsgGovCancelUpdateParamPlan, opts ...grpc.CallOption) (*MsgGovCancelUpdateParamPlanResponse, error) { + out := new(MsgGovCancelUpdateParamPlanResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.Msg/GovCancelUpdateParamPlan", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // AggregateExchangeRatePrevote defines a method for submitting an aggregate + // exchange rate prevote. + AggregateExchangeRatePrevote(context.Context, *MsgAggregateExchangeRatePrevote) (*MsgAggregateExchangeRatePrevoteResponse, error) + // AggregateExchangeRateVote defines a method for submitting an aggregate + // exchange rate vote. + AggregateExchangeRateVote(context.Context, *MsgAggregateExchangeRateVote) (*MsgAggregateExchangeRateVoteResponse, error) + // DelegateFeedConsent defines a method for setting the feeder delegation. + DelegateFeedConsent(context.Context, *MsgDelegateFeedConsent) (*MsgDelegateFeedConsentResponse, error) + // LegacyGovUpdateParams defines the legacy message that updates the oracle parameters. + LegacyGovUpdateParams(context.Context, *MsgLegacyGovUpdateParams) (*MsgLegacyGovUpdateParamsResponse, error) + // GovUpdateParams updates the oracle parameters. + GovUpdateParams(context.Context, *MsgGovUpdateParams) (*MsgGovUpdateParamsResponse, error) + // GovAddDenoms updates the oracle parameters to include a new tokens. + GovAddDenoms(context.Context, *MsgGovAddDenoms) (*MsgGovAddDenomsResponse, error) + // GovRemoveCurrencyPairProviders updates the oracle parameters to remove a list of + // currency pair providers. + GovRemoveCurrencyPairProviders(context.Context, *MsgGovRemoveCurrencyPairProviders) (*MsgGovRemoveCurrencyPairProvidersResponse, error) + // GovRemoveCurrencyDeviationThresholds updates the oracle parameters to remove a list + // of currency deviation thresholds. + GovRemoveCurrencyDeviationThresholds(context.Context, *MsgGovRemoveCurrencyDeviationThresholds) (*MsgGovRemoveCurrencyDeviationThresholdsResponse, error) + // GovCancelUpdateParamPlan cancels a plan to update the oracle parameters. + GovCancelUpdateParamPlan(context.Context, *MsgGovCancelUpdateParamPlan) (*MsgGovCancelUpdateParamPlanResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) AggregateExchangeRatePrevote(ctx context.Context, req *MsgAggregateExchangeRatePrevote) (*MsgAggregateExchangeRatePrevoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateExchangeRatePrevote not implemented") +} +func (*UnimplementedMsgServer) AggregateExchangeRateVote(ctx context.Context, req *MsgAggregateExchangeRateVote) (*MsgAggregateExchangeRateVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateExchangeRateVote not implemented") +} +func (*UnimplementedMsgServer) DelegateFeedConsent(ctx context.Context, req *MsgDelegateFeedConsent) (*MsgDelegateFeedConsentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegateFeedConsent not implemented") +} +func (*UnimplementedMsgServer) LegacyGovUpdateParams(ctx context.Context, req *MsgLegacyGovUpdateParams) (*MsgLegacyGovUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LegacyGovUpdateParams not implemented") +} +func (*UnimplementedMsgServer) GovUpdateParams(ctx context.Context, req *MsgGovUpdateParams) (*MsgGovUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovUpdateParams not implemented") +} +func (*UnimplementedMsgServer) GovAddDenoms(ctx context.Context, req *MsgGovAddDenoms) (*MsgGovAddDenomsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovAddDenoms not implemented") +} +func (*UnimplementedMsgServer) GovRemoveCurrencyPairProviders(ctx context.Context, req *MsgGovRemoveCurrencyPairProviders) (*MsgGovRemoveCurrencyPairProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovRemoveCurrencyPairProviders not implemented") +} +func (*UnimplementedMsgServer) GovRemoveCurrencyDeviationThresholds(ctx context.Context, req *MsgGovRemoveCurrencyDeviationThresholds) (*MsgGovRemoveCurrencyDeviationThresholdsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovRemoveCurrencyDeviationThresholds not implemented") +} +func (*UnimplementedMsgServer) GovCancelUpdateParamPlan(ctx context.Context, req *MsgGovCancelUpdateParamPlan) (*MsgGovCancelUpdateParamPlanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovCancelUpdateParamPlan not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_AggregateExchangeRatePrevote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAggregateExchangeRatePrevote) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AggregateExchangeRatePrevote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Msg/AggregateExchangeRatePrevote", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AggregateExchangeRatePrevote(ctx, req.(*MsgAggregateExchangeRatePrevote)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_AggregateExchangeRateVote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAggregateExchangeRateVote) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AggregateExchangeRateVote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Msg/AggregateExchangeRateVote", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AggregateExchangeRateVote(ctx, req.(*MsgAggregateExchangeRateVote)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DelegateFeedConsent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDelegateFeedConsent) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DelegateFeedConsent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Msg/DelegateFeedConsent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DelegateFeedConsent(ctx, req.(*MsgDelegateFeedConsent)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_LegacyGovUpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLegacyGovUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LegacyGovUpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Msg/LegacyGovUpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LegacyGovUpdateParams(ctx, req.(*MsgLegacyGovUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovUpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovUpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Msg/GovUpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovUpdateParams(ctx, req.(*MsgGovUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovAddDenoms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovAddDenoms) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovAddDenoms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Msg/GovAddDenoms", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovAddDenoms(ctx, req.(*MsgGovAddDenoms)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovRemoveCurrencyPairProviders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovRemoveCurrencyPairProviders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovRemoveCurrencyPairProviders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Msg/GovRemoveCurrencyPairProviders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovRemoveCurrencyPairProviders(ctx, req.(*MsgGovRemoveCurrencyPairProviders)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovRemoveCurrencyDeviationThresholds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovRemoveCurrencyDeviationThresholds) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovRemoveCurrencyDeviationThresholds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Msg/GovRemoveCurrencyDeviationThresholds", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovRemoveCurrencyDeviationThresholds(ctx, req.(*MsgGovRemoveCurrencyDeviationThresholds)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovCancelUpdateParamPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovCancelUpdateParamPlan) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovCancelUpdateParamPlan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/oracle.v1.Msg/GovCancelUpdateParamPlan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovCancelUpdateParamPlan(ctx, req.(*MsgGovCancelUpdateParamPlan)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "oracle.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AggregateExchangeRatePrevote", + Handler: _Msg_AggregateExchangeRatePrevote_Handler, + }, + { + MethodName: "AggregateExchangeRateVote", + Handler: _Msg_AggregateExchangeRateVote_Handler, + }, + { + MethodName: "DelegateFeedConsent", + Handler: _Msg_DelegateFeedConsent_Handler, + }, + { + MethodName: "LegacyGovUpdateParams", + Handler: _Msg_LegacyGovUpdateParams_Handler, + }, + { + MethodName: "GovUpdateParams", + Handler: _Msg_GovUpdateParams_Handler, + }, + { + MethodName: "GovAddDenoms", + Handler: _Msg_GovAddDenoms_Handler, + }, + { + MethodName: "GovRemoveCurrencyPairProviders", + Handler: _Msg_GovRemoveCurrencyPairProviders_Handler, + }, + { + MethodName: "GovRemoveCurrencyDeviationThresholds", + Handler: _Msg_GovRemoveCurrencyDeviationThresholds_Handler, + }, + { + MethodName: "GovCancelUpdateParamPlan", + Handler: _Msg_GovCancelUpdateParamPlan_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "oracle/v1/tx.proto", +} + +func (m *MsgAggregateExchangeRatePrevote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAggregateExchangeRatePrevote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAggregateExchangeRatePrevote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Validator) > 0 { + i -= len(m.Validator) + copy(dAtA[i:], m.Validator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Validator))) + i-- + dAtA[i] = 0x1a + } + if len(m.Feeder) > 0 { + i -= len(m.Feeder) + copy(dAtA[i:], m.Feeder) + i = encodeVarintTx(dAtA, i, uint64(len(m.Feeder))) + i-- + dAtA[i] = 0x12 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTx(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAggregateExchangeRatePrevoteResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAggregateExchangeRatePrevoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAggregateExchangeRatePrevoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgAggregateExchangeRateVote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAggregateExchangeRateVote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAggregateExchangeRateVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Validator) > 0 { + i -= len(m.Validator) + copy(dAtA[i:], m.Validator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Validator))) + i-- + dAtA[i] = 0x22 + } + if len(m.Feeder) > 0 { + i -= len(m.Feeder) + copy(dAtA[i:], m.Feeder) + i = encodeVarintTx(dAtA, i, uint64(len(m.Feeder))) + i-- + dAtA[i] = 0x1a + } + if len(m.ExchangeRates) > 0 { + i -= len(m.ExchangeRates) + copy(dAtA[i:], m.ExchangeRates) + i = encodeVarintTx(dAtA, i, uint64(len(m.ExchangeRates))) + i-- + dAtA[i] = 0x12 + } + if len(m.Salt) > 0 { + i -= len(m.Salt) + copy(dAtA[i:], m.Salt) + i = encodeVarintTx(dAtA, i, uint64(len(m.Salt))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAggregateExchangeRateVoteResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAggregateExchangeRateVoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAggregateExchangeRateVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDelegateFeedConsent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDelegateFeedConsent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDelegateFeedConsent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Delegate) > 0 { + i -= len(m.Delegate) + copy(dAtA[i:], m.Delegate) + i = encodeVarintTx(dAtA, i, uint64(len(m.Delegate))) + i-- + dAtA[i] = 0x12 + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDelegateFeedConsentResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDelegateFeedConsentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDelegateFeedConsentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgLegacyGovUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgLegacyGovUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLegacyGovUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Changes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x1a + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTx(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgLegacyGovUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgLegacyGovUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLegacyGovUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgGovUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGovUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Plan.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x1a + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTx(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGovUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGovUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgGovAddDenoms) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGovAddDenoms) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovAddDenoms) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CurrencyDeviationThresholds) > 0 { + for iNdEx := len(m.CurrencyDeviationThresholds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CurrencyDeviationThresholds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.CurrencyPairProviders) > 0 { + for iNdEx := len(m.CurrencyPairProviders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CurrencyPairProviders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if m.RewardBand != nil { + { + size := m.RewardBand.Size() + i -= size + if _, err := m.RewardBand.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.Mandatory { + i-- + if m.Mandatory { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if len(m.DenomList) > 0 { + for iNdEx := len(m.DenomList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DenomList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if m.Height != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x20 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x1a + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTx(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGovAddDenomsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGovAddDenomsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovAddDenomsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgGovRemoveCurrencyPairProviders) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGovRemoveCurrencyPairProviders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovRemoveCurrencyPairProviders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CurrencyPairProviders) > 0 { + for iNdEx := len(m.CurrencyPairProviders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CurrencyPairProviders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if m.Height != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x20 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x1a + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTx(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGovRemoveCurrencyPairProvidersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGovRemoveCurrencyPairProvidersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovRemoveCurrencyPairProvidersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgGovRemoveCurrencyDeviationThresholds) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGovRemoveCurrencyDeviationThresholds) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovRemoveCurrencyDeviationThresholds) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Currencies) > 0 { + for iNdEx := len(m.Currencies) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Currencies[iNdEx]) + copy(dAtA[i:], m.Currencies[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Currencies[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if m.Height != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x20 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x1a + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTx(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgGovCancelUpdateParamPlan) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGovCancelUpdateParamPlan) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovCancelUpdateParamPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Height != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x20 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x1a + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintTx(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGovCancelUpdateParamPlanResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgGovCancelUpdateParamPlanResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovCancelUpdateParamPlanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgAggregateExchangeRatePrevote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Feeder) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Validator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAggregateExchangeRatePrevoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgAggregateExchangeRateVote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Salt) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ExchangeRates) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Feeder) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Validator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAggregateExchangeRateVoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDelegateFeedConsent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Delegate) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgDelegateFeedConsentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgLegacyGovUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Keys) > 0 { + for _, s := range m.Keys { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + l = m.Changes.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgLegacyGovUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgGovUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Plan.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgGovUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgGovAddDenoms) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovTx(uint64(m.Height)) + } + if len(m.DenomList) > 0 { + for _, e := range m.DenomList { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if m.Mandatory { + n += 2 + } + if m.RewardBand != nil { + l = m.RewardBand.Size() + n += 1 + l + sovTx(uint64(l)) + } + if len(m.CurrencyPairProviders) > 0 { + for _, e := range m.CurrencyPairProviders { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.CurrencyDeviationThresholds) > 0 { + for _, e := range m.CurrencyDeviationThresholds { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgGovAddDenomsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgGovRemoveCurrencyPairProviders) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovTx(uint64(m.Height)) + } + if len(m.CurrencyPairProviders) > 0 { + for _, e := range m.CurrencyPairProviders { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgGovRemoveCurrencyPairProvidersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgGovRemoveCurrencyDeviationThresholds) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovTx(uint64(m.Height)) + } + if len(m.Currencies) > 0 { + for _, s := range m.Currencies { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgGovCancelUpdateParamPlan) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Title) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovTx(uint64(m.Height)) + } + return n +} + +func (m *MsgGovCancelUpdateParamPlanResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgAggregateExchangeRatePrevote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAggregateExchangeRatePrevote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAggregateExchangeRatePrevote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Feeder", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Feeder = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAggregateExchangeRatePrevoteResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAggregateExchangeRatePrevoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAggregateExchangeRatePrevoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAggregateExchangeRateVote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAggregateExchangeRateVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAggregateExchangeRateVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Salt", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Salt = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExchangeRates", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExchangeRates = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Feeder", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Feeder = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAggregateExchangeRateVoteResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAggregateExchangeRateVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAggregateExchangeRateVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDelegateFeedConsent) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDelegateFeedConsent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDelegateFeedConsent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Delegate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Delegate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDelegateFeedConsentResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDelegateFeedConsentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDelegateFeedConsentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgLegacyGovUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgLegacyGovUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgLegacyGovUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Changes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgLegacyGovUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgLegacyGovUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgLegacyGovUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGovUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGovUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGovUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGovUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGovAddDenoms) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGovAddDenoms: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovAddDenoms: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomList = append(m.DenomList, Denom{}) + if err := m.DenomList[len(m.DenomList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mandatory", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Mandatory = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardBand", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.RewardBand = &v + if err := m.RewardBand.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrencyPairProviders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrencyPairProviders = append(m.CurrencyPairProviders, CurrencyPairProviders{}) + if err := m.CurrencyPairProviders[len(m.CurrencyPairProviders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrencyDeviationThresholds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrencyDeviationThresholds = append(m.CurrencyDeviationThresholds, CurrencyDeviationThreshold{}) + if err := m.CurrencyDeviationThresholds[len(m.CurrencyDeviationThresholds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGovAddDenomsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGovAddDenomsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovAddDenomsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGovRemoveCurrencyPairProviders) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGovRemoveCurrencyPairProviders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovRemoveCurrencyPairProviders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrencyPairProviders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrencyPairProviders = append(m.CurrencyPairProviders, CurrencyPairProviders{}) + if err := m.CurrencyPairProviders[len(m.CurrencyPairProviders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGovRemoveCurrencyPairProvidersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGovRemoveCurrencyPairProvidersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovRemoveCurrencyPairProvidersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGovRemoveCurrencyDeviationThresholds) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGovRemoveCurrencyDeviationThresholds: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovRemoveCurrencyDeviationThresholds: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Currencies", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Currencies = append(m.Currencies, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGovRemoveCurrencyDeviationThresholdsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGovRemoveCurrencyDeviationThresholdsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovRemoveCurrencyDeviationThresholdsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGovCancelUpdateParamPlan) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGovCancelUpdateParamPlan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovCancelUpdateParamPlan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGovCancelUpdateParamPlanResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgGovCancelUpdateParamPlanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovCancelUpdateParamPlanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/oracle/types/utils_test.go b/x/oracle/types/utils_test.go new file mode 100644 index 0000000..476b47b --- /dev/null +++ b/x/oracle/types/utils_test.go @@ -0,0 +1,252 @@ +package types + +import ( + "context" + "crypto/rand" + "math/big" + + sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + "github.com/cometbft/cometbft/crypto/secp256k1" + tmprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +const ( + IbcDenomLuna = "ibc/0EF15DF2F02480ADE0BB6E85D9EBB5DAEA2836D3860E9F97F9AADE4F57A31AA0" + IbcDenomAtom = "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2" +) + +var ( + _ StakingKeeper = MockStakingKeeper{} + _ stakingtypes.ValidatorI = MockValidator{} + + DenomDm = Denom{ + BaseDenom: DmDenom, + SymbolDenom: DmSymbol, + Exponent: 6, + } + DenomLuna = Denom{ + BaseDenom: IbcDenomLuna, + SymbolDenom: "LUNA", + Exponent: 6, + } + DenomAtom = Denom{ + BaseDenom: IbcDenomAtom, + SymbolDenom: "ATOM", + Exponent: 6, + } +) + +// StringWithCharset generates a new string with the size of "length" param +// repeating every character of charset, if charset is empty uses "abcd" +func StringWithCharset(length int, charset string) string { + b := make([]byte, length) + + if len(charset) == 0 { + charset = "abcd" + } + + for i := 0; i < length; i++ { + for j := 0; j < len(charset); j++ { + b[i] = charset[j] + i++ + if len(b) == length { + return string(b) + } + } + } + + return string(b) +} + +// GenerateRandomValAddr returns N random validator addresses. +func GenerateRandomValAddr(quantity int) (validatorAddrs []sdk.ValAddress) { + for i := 0; i < quantity; i++ { + pubKey := secp256k1.GenPrivKey().PubKey() + valAddr := sdk.ValAddress(pubKey.Address()) + validatorAddrs = append(validatorAddrs, valAddr) + } + + return validatorAddrs +} + +// GenerateRandomTestCase +func GenerateRandomTestCase() (valValAddrs []sdk.ValAddress, stakingKeeper MockStakingKeeper) { + valValAddrs = []sdk.ValAddress{} + mockValidators := []MockValidator{} + + randNum, _ := rand.Int(rand.Reader, big.NewInt(10000)) + numInputs := 10 + int((randNum.Int64() % 100)) + for i := 0; i < numInputs; i++ { + pubKey := secp256k1.GenPrivKey().PubKey() + valValAddr := sdk.ValAddress(pubKey.Address()) + valValAddrs = append(valValAddrs, valValAddr) + + randomPower, _ := rand.Int(rand.Reader, big.NewInt(10000)) + power := randomPower.Int64()%1000 + 1 + mockValidator := NewMockValidator(valValAddr, power) + mockValidators = append(mockValidators, mockValidator) + } + + stakingKeeper = NewMockStakingKeeper(mockValidators) + + return +} + +// MockStakingKeeper imlements the StakingKeeper interface. +type MockStakingKeeper struct { + validators []MockValidator +} + +func NewMockStakingKeeper(validators []MockValidator) MockStakingKeeper { + return MockStakingKeeper{ + validators: validators, + } +} + +func (sk MockStakingKeeper) Validators() []MockValidator { + return sk.validators +} + +func (sk MockStakingKeeper) Validator(_ context.Context, address sdk.ValAddress) (stakingtypes.ValidatorI, error) { + for _, validator := range sk.validators { + val, _ := sdk.ValAddressFromBech32(validator.GetOperator()) + if val.Equals(address) { + return validator, nil + } + } + + return nil, nil +} + +func (MockStakingKeeper) TotalBondedTokens(_ context.Context) (sdkmath.Int, error) { + return sdkmath.ZeroInt(), nil +} + +func (sk MockStakingKeeper) GetBondedValidatorsByPower(_ context.Context) ([]stakingtypes.Validator, error) { + return nil, nil +} + +func (MockStakingKeeper) ValidatorsPowerStoreIterator(_ context.Context) (storetypes.Iterator, error) { + return storetypes.KVStoreReversePrefixIterator(nil, nil), nil +} + +func (MockStakingKeeper) MaxValidators(context.Context) (uint32, error) { + return 100, nil +} + +func (MockStakingKeeper) PowerReduction(_ context.Context) (res sdkmath.Int) { + return sdk.DefaultPowerReduction +} + +func (MockStakingKeeper) Slash(context.Context, sdk.ConsAddress, int64, int64, sdkmath.LegacyDec) (sdkmath.Int, error) { + return sdkmath.ZeroInt(), nil +} + +func (MockStakingKeeper) Jail(context.Context, sdk.ConsAddress) error { + return nil +} + +// MockValidator implements the ValidatorI interface. +type MockValidator struct { + power int64 + operator sdk.ValAddress +} + +func NewMockValidator(valAddr sdk.ValAddress, power int64) MockValidator { + return MockValidator{ + power: power, + operator: valAddr, + } +} + +func (MockValidator) IsJailed() bool { + return false +} + +func (MockValidator) GetMoniker() string { + return "" +} + +func (MockValidator) GetStatus() stakingtypes.BondStatus { + return stakingtypes.Bonded +} + +func (MockValidator) IsBonded() bool { + return true +} + +func (MockValidator) IsUnbonded() bool { + return false +} + +func (MockValidator) IsUnbonding() bool { + return false +} + +func (v MockValidator) GetOperator() string { + return v.operator.String() +} + +func (MockValidator) ConsPubKey() (cryptotypes.PubKey, error) { + return nil, nil +} + +func (MockValidator) TmConsPublicKey() (tmprotocrypto.PublicKey, error) { + return tmprotocrypto.PublicKey{}, nil +} + +func (MockValidator) GetConsAddr() ([]byte, error) { + return nil, nil +} + +func (v MockValidator) GetTokens() sdkmath.Int { + return sdk.TokensFromConsensusPower(v.power, sdk.DefaultPowerReduction) +} + +func (v MockValidator) GetBondedTokens() sdkmath.Int { + return sdk.TokensFromConsensusPower(v.power, sdk.DefaultPowerReduction) +} + +func (v MockValidator) GetConsensusPower(_ sdkmath.Int) int64 { + return v.power +} + +func (v *MockValidator) SetConsensusPower(power int64) { + v.power = power +} + +func (v MockValidator) GetCommission() sdkmath.LegacyDec { + return sdkmath.LegacyZeroDec() +} + +func (v MockValidator) GetMinSelfDelegation() sdkmath.Int { + return sdkmath.OneInt() +} + +func (v MockValidator) GetDelegatorShares() sdkmath.LegacyDec { + return sdkmath.LegacyNewDec(v.power) +} + +func (v MockValidator) TokensFromShares(sdkmath.LegacyDec) sdkmath.LegacyDec { + return sdkmath.LegacyZeroDec() +} + +func (v MockValidator) TokensFromSharesTruncated(sdkmath.LegacyDec) sdkmath.LegacyDec { + return sdkmath.LegacyZeroDec() +} + +func (v MockValidator) TokensFromSharesRoundUp(sdkmath.LegacyDec) sdkmath.LegacyDec { + return sdkmath.LegacyZeroDec() +} + +func (v MockValidator) SharesFromTokens(_ sdkmath.Int) (sdkmath.LegacyDec, error) { + return sdkmath.LegacyZeroDec(), nil +} + +func (v MockValidator) SharesFromTokensTruncated(_ sdkmath.Int) (sdkmath.LegacyDec, error) { + return sdkmath.LegacyZeroDec(), nil +} diff --git a/x/oracle/types/vote.go b/x/oracle/types/vote.go new file mode 100644 index 0000000..505342e --- /dev/null +++ b/x/oracle/types/vote.go @@ -0,0 +1,82 @@ +package types + +import ( + "fmt" + "strings" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "gopkg.in/yaml.v3" +) + +func NewAggregateExchangeRatePrevote( + hash AggregateVoteHash, + voter sdk.ValAddress, + submitBlock uint64, +) AggregateExchangeRatePrevote { + return AggregateExchangeRatePrevote{ + Hash: hash.String(), + Voter: voter.String(), + SubmitBlock: submitBlock, + } +} + +// String implement stringify +func (v AggregateExchangeRatePrevote) String() string { + out, _ := yaml.Marshal(v) + return string(out) +} + +func NewAggregateExchangeRateVote( + decCoins sdk.DecCoins, + voter sdk.ValAddress, +) AggregateExchangeRateVote { + return AggregateExchangeRateVote{ + ExchangeRates: decCoins, + Voter: voter.String(), + } +} + +// String implement stringify +func (v AggregateExchangeRateVote) String() string { + out, _ := yaml.Marshal(v) + return string(out) +} + +// ParseExchangeRateDecCoins DecCoins parser +func ParseExchangeRateDecCoins(tuplesStr string) (sdk.DecCoins, error) { + if len(tuplesStr) == 0 { + return nil, nil + } + + decCoinsStrs := strings.Split(tuplesStr, ",") + decCoins := make(sdk.DecCoins, len(decCoinsStrs)) + + duplicateCheckMap := make(map[string]bool) + for i, decCoinStr := range decCoinsStrs { + denomAmountStr := strings.Split(decCoinStr, ":") + if len(denomAmountStr) != 2 { + return nil, fmt.Errorf("invalid exchange rate %s", decCoinStr) + } + + dec, err := math.LegacyNewDecFromStr(denomAmountStr[1]) + if err != nil { + return nil, err + } + if !dec.IsPositive() { + return nil, ErrInvalidOraclePrice + } + + denom := strings.ToUpper(denomAmountStr[0]) + + decCoins[i] = sdk.NewDecCoinFromDec(denom, dec) + + if _, ok := duplicateCheckMap[denom]; ok { + return nil, fmt.Errorf("duplicated denom %s", denom) + } + + duplicateCheckMap[denom] = true + } + + return decCoins, nil +} From 1b9b3415c268c1e3f41506c430951291d0a1a70f Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Sun, 22 Feb 2026 16:36:30 +0530 Subject: [PATCH 2/3] Update price-feeder --- api/multisig/v1/tx.pulsar.go | 435 +++++++++++++++----------------- go.mod | 95 +++---- go.sum | 216 ++++++++-------- proto/multisig/v1/tx.proto | 2 +- x/multisig/keeper/msg_server.go | 282 ++++++++++----------- x/multisig/types/tx.pb.go | 210 ++++++--------- 6 files changed, 579 insertions(+), 661 deletions(-) diff --git a/api/multisig/v1/tx.pulsar.go b/api/multisig/v1/tx.pulsar.go index 281cc05..98ab5be 100644 --- a/api/multisig/v1/tx.pulsar.go +++ b/api/multisig/v1/tx.pulsar.go @@ -2071,14 +2071,10 @@ func (x *fastReflection_MsgAddMultisigSignerParams) Range(f func(protoreflect.Fi return } } - if x.XNewThreshold != nil { - switch o := x.XNewThreshold.(type) { - case *MsgAddMultisigSignerParams_NewThreshold: - v := o.NewThreshold - value := protoreflect.ValueOfUint32(v) - if !f(fd_MsgAddMultisigSignerParams_new_threshold, value) { - return - } + if x.NewThreshold != uint32(0) { + value := protoreflect.ValueOfUint32(x.NewThreshold) + if !f(fd_MsgAddMultisigSignerParams_new_threshold, value) { + return } } } @@ -2101,13 +2097,7 @@ func (x *fastReflection_MsgAddMultisigSignerParams) Has(fd protoreflect.FieldDes case "multisig.v1.MsgAddMultisigSignerParams.signer": return x.Signer != "" case "multisig.v1.MsgAddMultisigSignerParams.new_threshold": - if x.XNewThreshold == nil { - return false - } else if _, ok := x.XNewThreshold.(*MsgAddMultisigSignerParams_NewThreshold); ok { - return true - } else { - return false - } + return x.NewThreshold != uint32(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: multisig.v1.MsgAddMultisigSignerParams")) @@ -2129,7 +2119,7 @@ func (x *fastReflection_MsgAddMultisigSignerParams) Clear(fd protoreflect.FieldD case "multisig.v1.MsgAddMultisigSignerParams.signer": x.Signer = "" case "multisig.v1.MsgAddMultisigSignerParams.new_threshold": - x.XNewThreshold = nil + x.NewThreshold = uint32(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: multisig.v1.MsgAddMultisigSignerParams")) @@ -2153,13 +2143,8 @@ func (x *fastReflection_MsgAddMultisigSignerParams) Get(descriptor protoreflect. value := x.Signer return protoreflect.ValueOfString(value) case "multisig.v1.MsgAddMultisigSignerParams.new_threshold": - if x.XNewThreshold == nil { - return protoreflect.ValueOfUint32(uint32(0)) - } else if v, ok := x.XNewThreshold.(*MsgAddMultisigSignerParams_NewThreshold); ok { - return protoreflect.ValueOfUint32(v.NewThreshold) - } else { - return protoreflect.ValueOfUint32(uint32(0)) - } + value := x.NewThreshold + return protoreflect.ValueOfUint32(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: multisig.v1.MsgAddMultisigSignerParams")) @@ -2185,8 +2170,7 @@ func (x *fastReflection_MsgAddMultisigSignerParams) Set(fd protoreflect.FieldDes case "multisig.v1.MsgAddMultisigSignerParams.signer": x.Signer = value.Interface().(string) case "multisig.v1.MsgAddMultisigSignerParams.new_threshold": - cv := uint32(value.Uint()) - x.XNewThreshold = &MsgAddMultisigSignerParams_NewThreshold{NewThreshold: cv} + x.NewThreshold = uint32(value.Uint()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: multisig.v1.MsgAddMultisigSignerParams")) @@ -2245,14 +2229,6 @@ func (x *fastReflection_MsgAddMultisigSignerParams) NewField(fd protoreflect.Fie // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_MsgAddMultisigSignerParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { - case "multisig.v1.MsgAddMultisigSignerParams._new_threshold": - if x.XNewThreshold == nil { - return nil - } - switch x.XNewThreshold.(type) { - case *MsgAddMultisigSignerParams_NewThreshold: - return x.Descriptor().Fields().ByName("new_threshold") - } default: panic(fmt.Errorf("%s is not a oneof field in multisig.v1.MsgAddMultisigSignerParams", d.FullName())) } @@ -2317,8 +2293,8 @@ func (x *fastReflection_MsgAddMultisigSignerParams) ProtoMethods() *protoiface.M if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.NewThreshold != nil { - n += 1 + runtime.Sov(uint64(*x.NewThreshold)) + if x.NewThreshold != 0 { + n += 1 + runtime.Sov(uint64(x.NewThreshold)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -2349,14 +2325,8 @@ func (x *fastReflection_MsgAddMultisigSignerParams) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - switch x := x.XNewThreshold.(type) { - case *MsgAddMultisigSignerParams_NewThreshold: - i = runtime.EncodeVarint(dAtA, i, uint64(*x.NewThreshold)) - i-- - dAtA[i] = 0x18 - } - if x.NewThreshold != nil { - i = runtime.EncodeVarint(dAtA, i, uint64(*x.NewThreshold)) + if x.NewThreshold != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.NewThreshold)) i-- dAtA[i] = 0x18 } @@ -2491,7 +2461,7 @@ func (x *fastReflection_MsgAddMultisigSignerParams) ProtoMethods() *protoiface.M if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) } - var v uint32 + x.NewThreshold = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2501,12 +2471,11 @@ func (x *fastReflection_MsgAddMultisigSignerParams) ProtoMethods() *protoiface.M } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + x.NewThreshold |= uint32(b&0x7F) << shift if b < 0x80 { break } } - x.NewThreshold = &v default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -9491,9 +9460,9 @@ type MsgAddMultisigSignerParams struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MultisigAddress string `protobuf:"bytes,1,opt,name=multisig_address,json=multisigAddress,proto3" json:"multisig_address,omitempty"` - Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` - NewThreshold *uint32 `protobuf:"varint,3,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` + MultisigAddress string `protobuf:"bytes,1,opt,name=multisig_address,json=multisigAddress,proto3" json:"multisig_address,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` + NewThreshold uint32 `protobuf:"varint,3,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` } func (x *MsgAddMultisigSignerParams) Reset() { @@ -9531,8 +9500,8 @@ func (x *MsgAddMultisigSignerParams) GetSigner() string { } func (x *MsgAddMultisigSignerParams) GetNewThreshold() uint32 { - if x != nil && x.NewThreshold != nil { - return *x.NewThreshold + if x != nil { + return x.NewThreshold } return 0 } @@ -10183,7 +10152,7 @@ var file_multisig_v1_tx_proto_rawDesc = []byte{ 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0xcf, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4d, 0x75, + 0x65, 0x73, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, @@ -10192,93 +10161,69 @@ var file_multisig_v1_tx_proto_rawDesc = []byte{ 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x0d, 0x6e, 0x65, 0x77, + 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, - 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x1e, + 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, + 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x73, 0x69, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, + 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x1d, + 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x54, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, + 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, + 0x69, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xa5, 0x02, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x23, 0x0a, - 0x21, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x73, 0x69, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x73, 0x69, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, - 0x69, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x53, 0x65, - 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa5, 0x02, 0x0a, 0x23, 0x4d, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x1b, 0xca, 0xb4, 0x2d, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x40, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x73, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0xbe, 0x01, + 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, - 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x1b, 0xca, 0xb4, - 0x2d, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x22, 0x40, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x49, 0x64, 0x22, 0xbe, 0x01, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, - 0x6f, 0x76, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, 0x75, 0x6c, - 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, - 0x34, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x61, 0x70, 0x70, - 0x72, 0x6f, 0x76, 0x65, 0x72, 0x22, 0x24, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, - 0x6f, 0x76, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x96, 0x02, 0x0a, 0x2b, - 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, - 0x64, 0x12, 0x34, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x61, - 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x1b, - 0xca, 0xb4, 0x2d, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x5a, 0x0a, 0x2d, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, - 0x76, 0x65, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, - 0x22, 0xbd, 0x01, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x22, 0x24, + 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x96, 0x02, 0x0a, 0x2b, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, @@ -10286,112 +10231,135 @@ var file_multisig_v1_tx_proto_rawDesc = []byte{ 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, - 0x6a, 0x65, 0x63, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x61, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x72, - 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, - 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, - 0x12, 0x32, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x72, 0x22, 0x24, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x6e, - 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa6, 0x09, 0x0a, 0x03, 0x4d, - 0x73, 0x67, 0x12, 0x52, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x1a, 0x24, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x2b, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2d, 0x2e, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x11, 0x41, - 0x64, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x12, 0x27, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x41, 0x64, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x29, 0x2e, 0x6d, 0x75, 0x6c, 0x74, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, + 0x12, 0x4b, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x1b, 0xca, 0xb4, 0x2d, 0x17, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x5a, 0x0a, + 0x2d, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x41, 0x6e, 0x64, 0x44, 0x69, + 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, + 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x22, 0xbd, 0x01, 0x0a, 0x1f, 0x4d, 0x73, + 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, + 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x08, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x72, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbc, + 0x01, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, + 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x72, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x72, 0x22, 0x24, 0x0a, + 0x22, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0xa6, 0x09, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x52, 0x0a, 0x0c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x24, 0x2e, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x73, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, + 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2d, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x73, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x15, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x2c, 0x2e, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2e, 0x2e, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, - 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0c, 0x53, - 0x65, 0x74, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x2a, 0x2e, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, - 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, - 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x73, 0x69, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x1a, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x12, 0x30, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2a, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x79, 0x0a, 0x17, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x2d, 0x2e, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, + 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x1a, 0x29, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, + 0x15, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, + 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2e, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x73, 0x69, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x54, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x2a, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, + 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x1a, 0x2c, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x53, 0x65, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x54, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, + 0x0a, 0x1a, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x30, 0x2e, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2a, + 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, + 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x17, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2f, 0x2e, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, - 0x72, 0x6f, 0x76, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9a, 0x01, 0x0a, - 0x22, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x12, 0x38, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x41, 0x6e, 0x64, 0x44, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x3a, 0x2e, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, - 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x16, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x12, 0x2c, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x1a, 0x2e, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, - 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x79, 0x0a, 0x17, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x2d, 0x2e, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x2d, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2f, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9a, 0x01, 0x0a, 0x22, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, + 0x65, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x38, 0x2e, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x65, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x3a, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, + 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x41, + 0x6e, 0x64, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, + 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x76, 0x0a, 0x16, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x2c, 0x2e, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2e, 0x2e, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x17, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2f, 0x2e, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, - 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, - 0xb0, 0x2a, 0x01, 0x42, 0xa2, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, - 0x61, 0x65, 0x76, 0x4d, 0x69, 0x74, 0x68, 0x72, 0x61, 0x6e, 0x2f, 0x64, 0x6d, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2f, - 0x76, 0x31, 0x3b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x0b, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x17, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x73, 0x69, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x2d, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2f, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x73, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xa2, 0x01, 0x0a, + 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, + 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x65, 0x76, 0x4d, 0x69, 0x74, 0x68, + 0x72, 0x61, 0x6e, 0x2f, 0x64, 0x6d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x73, 0x69, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x73, 0x69, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x73, 0x69, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -10713,7 +10681,6 @@ func file_multisig_v1_tx_proto_init() { } } } - file_multisig_v1_tx_proto_msgTypes[4].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go.mod b/go.mod index 6c1d4bd..3ba2da4 100755 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/DaevMithran/dmchain -go 1.23 +go 1.23.8 toolchain go1.23.12 @@ -22,7 +22,7 @@ replace ( github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/ojo-network/price-feeder => github.com/DaevMithran/price-feeder v0.50.14-dm + github.com/ojo-network/price-feeder => github.com/DaevMithran/price-feeder v0.50.14-dmchain // pin version! 126854af5e6d has issues with the store so that queries fail github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 @@ -35,9 +35,9 @@ require ( cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 cosmossdk.io/depinject v1.1.0 - cosmossdk.io/errors v1.0.1 + cosmossdk.io/errors v1.0.2 cosmossdk.io/log v1.4.1 - cosmossdk.io/math v1.5.0 + cosmossdk.io/math v1.5.3 cosmossdk.io/orm v1.0.0-beta.3 cosmossdk.io/store v1.1.1 cosmossdk.io/tools/confix v0.1.2 @@ -48,10 +48,10 @@ require ( cosmossdk.io/x/tx v0.13.7 cosmossdk.io/x/upgrade v0.1.4 github.com/armon/go-metrics v0.4.1 - github.com/cometbft/cometbft v0.38.17 + github.com/cometbft/cometbft v0.38.19 github.com/cosmos/cosmos-db v1.1.1 github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.50.11 + github.com/cosmos/cosmos-sdk v0.50.14 github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 github.com/cosmos/ibc-go/v8 v8.5.1 @@ -61,27 +61,27 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/ojo-network/ojo v0.5.1 github.com/ojo-network/price-feeder v0.2.1-rc1 - github.com/rs/zerolog v1.33.0 + github.com/rs/zerolog v1.34.0 github.com/spf13/cast v1.7.1 - github.com/spf13/cobra v1.8.1 - github.com/spf13/pflag v1.0.5 + github.com/spf13/cobra v1.9.1 + github.com/spf13/pflag v1.0.6 github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.10.0 - golang.org/x/crypto v0.32.0 - golang.org/x/sync v0.10.0 - google.golang.org/genproto/googleapis/api v0.0.0-20241202173237-19429a94021a - google.golang.org/grpc v1.70.0 - google.golang.org/protobuf v1.36.4 + golang.org/x/crypto v0.33.0 + golang.org/x/sync v0.14.0 + google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 + google.golang.org/grpc v1.71.0 + google.golang.org/protobuf v1.36.6 gopkg.in/yaml.v3 v3.0.1 ) require ( - cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.8.1 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect - cloud.google.com/go/compute/metadata v0.5.2 // indirect - cloud.google.com/go/iam v1.1.12 // indirect - cloud.google.com/go/storage v1.41.0 // indirect + cloud.google.com/go v0.115.1 // indirect + cloud.google.com/go/auth v0.9.3 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect + cloud.google.com/go/compute/metadata v0.6.0 // indirect + cloud.google.com/go/iam v1.2.0 // indirect + cloud.google.com/go/storage v1.43.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -114,7 +114,7 @@ require ( github.com/creachadair/tomledit v0.0.24 // indirect github.com/danieljoos/wincred v1.2.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect @@ -124,7 +124,7 @@ require ( github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.2 // indirect + github.com/gabriel-vasile/mimetype v1.4.8 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect @@ -133,21 +133,21 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.15.0 // indirect + github.com/go-playground/validator/v10 v10.26.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.3 // indirect - github.com/golang/glog v1.2.3 // indirect + github.com/golang/glog v1.2.4 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.3 // indirect github.com/google/flatbuffers v2.0.8+incompatible // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.8 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.3 // indirect github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/websocket v1.5.3 // indirect @@ -157,7 +157,7 @@ require ( github.com/hashicorp/go-getter v1.7.5 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-metrics v0.5.4 // indirect github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect @@ -174,10 +174,10 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/justinas/alice v1.2.0 // indirect - github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/compress v1.17.11 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/leodido/go-urn v1.2.4 // indirect + github.com/leodido/go-urn v1.4.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect @@ -191,18 +191,18 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.20.5 // indirect + github.com/prometheus/client_golang v1.21.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.62.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/rs/cors v1.11.1 // indirect - github.com/rs/xid v1.5.0 // indirect + github.com/rs/xid v1.6.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.5 // indirect @@ -217,22 +217,23 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect - go.opentelemetry.io/otel v1.32.0 // indirect - go.opentelemetry.io/otel/metric v1.32.0 // indirect - go.opentelemetry.io/otel/trace v1.32.0 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect + go.opentelemetry.io/otel v1.34.0 // indirect + go.opentelemetry.io/otel/metric v1.34.0 // indirect + go.opentelemetry.io/otel/trace v1.34.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/net v0.34.0 // indirect - golang.org/x/oauth2 v0.24.0 // indirect - golang.org/x/sys v0.29.0 // indirect - golang.org/x/term v0.28.0 // indirect - golang.org/x/text v0.21.0 // indirect + golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect + golang.org/x/net v0.35.0 // indirect + golang.org/x/oauth2 v0.25.0 // indirect + golang.org/x/sys v0.31.0 // indirect + golang.org/x/term v0.29.0 // indirect + golang.org/x/text v0.22.0 // indirect golang.org/x/time v0.6.0 // indirect - google.golang.org/api v0.192.0 // indirect - google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect + google.golang.org/api v0.196.0 // indirect + google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/go.sum b/go.sum index 3c39600..94415f8 100755 --- a/go.sum +++ b/go.sum @@ -30,8 +30,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= -cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= +cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= +cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -46,10 +46,10 @@ cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjby cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/auth v0.8.1 h1:QZW9FjC5lZzN864p13YxvAtGUlQ+KgRL+8Sg45Z6vxo= -cloud.google.com/go/auth v0.8.1/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc= -cloud.google.com/go/auth/oauth2adapt v0.2.3 h1:MlxF+Pd3OmSudg/b1yZ5lJwoXCEaeedAguodky1PcKI= -cloud.google.com/go/auth/oauth2adapt v0.2.3/go.mod h1:tMQXOfZzFuNuUxOypHlQEXgdfX5cuhwU+ffUuXRJE8I= +cloud.google.com/go/auth v0.9.3 h1:VOEUIAADkkLtyfr3BLa3R8Ed/j6w1jTBmARx+wb5w5U= +cloud.google.com/go/auth v0.9.3/go.mod h1:7z6VY+7h3KUdRov5F1i8NDP5ZzWKYmEPO842BgCsmTk= +cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= +cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -72,8 +72,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= -cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= +cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= +cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -111,12 +111,14 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.12 h1:JixGLimRrNGcxvJEQ8+clfLxPlbeZA6MuRJ+qJNQ5Xw= -cloud.google.com/go/iam v1.1.12/go.mod h1:9LDX8J7dN5YRyzVHxwQzrQs9opFFqn0Mxs9nAeB+Hhg= +cloud.google.com/go/iam v1.2.0 h1:kZKMKVNk/IsSSc/udOb83K0hL/Yh/Gcqpz+oAkoIFN8= +cloud.google.com/go/iam v1.2.0/go.mod h1:zITGuWgsLZxd8OwAlX+eMFgZDXzBm7icj1PVTYG766Q= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/longrunning v0.6.0 h1:mM1ZmaNsQsnb+5n1DNPeL0KwQd9jQRqSqSDEkBZr+aI= +cloud.google.com/go/longrunning v0.6.0/go.mod h1:uHzSZqW89h7/pasCWNYdUpwGz3PcVWhrWupreVPYLts= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -173,8 +175,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.41.0 h1:RusiwatSu6lHeEXe3kglxakAmAbfV+rhtPqA6i8RBx0= -cloud.google.com/go/storage v1.41.0/go.mod h1:J1WCa/Z2FcgdEDuPUY8DxT5I+d9mFKsCepp5vR6Sq80= +cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyXFs= +cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -196,12 +198,12 @@ cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= -cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= -cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/errors v1.0.2 h1:wcYiJz08HThbWxd/L4jObeLaLySopyyuUFB5w4AGpCo= +cosmossdk.io/errors v1.0.2/go.mod h1:0rjgiHkftRYPj//3DrD6y8hcm40HcPv/dR4R/4efr0k= cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= -cosmossdk.io/math v1.5.0 h1:sbOASxee9Zxdjd6OkzogvBZ25/hP929vdcYcBJQbkLc= -cosmossdk.io/math v1.5.0/go.mod h1:AAwwBmUhqtk2nlku174JwSll+/DepUXW3rWIXN5q+Nw= +cosmossdk.io/math v1.5.3 h1:WH6tu6Z3AUCeHbeOSHg2mt9rnoiUWVWaQ2t6Gkll96U= +cosmossdk.io/math v1.5.3/go.mod h1:uqcZv7vexnhMFJF+6zh9EWdm/+Ylyln34IvPnBauPCQ= cosmossdk.io/orm v1.0.0-beta.3 h1:XmffCwsIZE+y0sS4kEfRUfIgvJfGGn3HFKntZ91sWcU= cosmossdk.io/orm v1.0.0-beta.3/go.mod h1:KSH9lKA+0K++2OKECWwPAasKbUIEtZ7xYG+0ikChiyU= cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= @@ -229,8 +231,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25 github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DaevMithran/price-feeder v0.50.14-dm h1:q8SHfWIXpi9DJa5WSWGe8O3n6Uqdab3GfltDcLOOQV4= -github.com/DaevMithran/price-feeder v0.50.14-dm/go.mod h1:CSdgh7XiOMLGQwRW8OqbL5FlkE5Mc3+fDZEMRN8JkYY= +github.com/DaevMithran/price-feeder v0.50.14-dmchain h1:NxTvNTsZEl6Qmf7SCrh0JMPs6OLguGK9cCY0UtkzYsU= +github.com/DaevMithran/price-feeder v0.50.14-dmchain/go.mod h1:jDJCkjTsZMbTQd+DBpSdJUe5NPOAGG3Y0brleMmLAck= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= @@ -342,8 +344,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.17 h1:FkrQNbAjiFqXydeAO81FUzriL4Bz0abYxN/eOHrQGOk= -github.com/cometbft/cometbft v0.38.17/go.mod h1:5l0SkgeLRXi6bBfQuevXjKqML1jjfJJlvI1Ulp02/o4= +github.com/cometbft/cometbft v0.38.19 h1:vNdtCkvhuwUlrcLPAyigV7lQpmmo+tAq8CsB8gZjEYw= +github.com/cometbft/cometbft v0.38.19/go.mod h1:UCu8dlHqvkAsmAFmWDRWNZJPlu6ya2fTWZlDrWsivwo= github.com/cometbft/cometbft-db v0.14.1 h1:SxoamPghqICBAIcGpleHbmoPqy+crij/++eZz3DlerQ= github.com/cometbft/cometbft-db v0.14.1/go.mod h1:KHP1YghilyGV/xjD5DP3+2hyigWx0WTp9X+0Gnx0RxQ= github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU= @@ -378,7 +380,7 @@ github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStK github.com/cosmos/ledger-cosmos-go v0.14.0 h1:WfCHricT3rPbkPSVKRH+L4fQGKYHuGOK9Edpel8TYpE= github.com/cosmos/ledger-cosmos-go v0.14.0/go.mod h1:E07xCWSBl3mTGofZ2QnL4cIUzMbbGVyik84QYKbX3RA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creachadair/atomicfile v0.3.1 h1:yQORkHjSYySh/tv5th1dkKcn02NEW5JleB84sjt+W4Q= github.com/creachadair/atomicfile v0.3.1/go.mod h1:mwfrkRxFKwpNAflYZzytbSwxvbK6fdGRRlp0KEQc0qU= github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6QKQDhQ= @@ -395,10 +397,10 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= -github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8= +github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs= @@ -451,8 +453,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= -github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3GqacKw1NM= +github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -491,8 +493,8 @@ github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= -github.com/go-playground/validator/v10 v10.15.0 h1:nDU5XeOKtB3GEa+uB7GNYwhVKsgjAR7VgKoNB6ryXfw= -github.com/go-playground/validator/v10 v10.15.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.26.0 h1:SP05Nqhjcvz81uJaRfEV0YBSSSGMc/iMaVtFbr3Sw2k= +github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -510,8 +512,8 @@ github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0 github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.3 h1:oDTdz9f5VGVVNGu/Q7UXKWYsD0873HXLHdJUNBsSEKM= -github.com/golang/glog v1.2.3/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc= +github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -574,8 +576,8 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -614,8 +616,8 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= -github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/enterprise-certificate-proxy v0.3.3 h1:QRje2j5GZimBzlbhGA2V2QlGNgL8G6e+wGo/+/2bWI0= +github.com/googleapis/enterprise-certificate-proxy v0.3.3/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -664,8 +666,8 @@ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= -github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-metrics v0.5.4 h1:8mmPiIJkTPPEbAiV97IxdAGNdRdaWwVap1BU6elejKY= +github.com/hashicorp/go-metrics v0.5.4/go.mod h1:CG5yz4NZ/AI/aQt9Ucm/vdBnbh7fvmv4lxZ350i+QQI= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= @@ -733,6 +735,7 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -746,8 +749,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -763,8 +766,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -875,8 +878,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= -github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw3fD4oEoeorXc6saIiQ23LrGLth0Gw= github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= @@ -900,8 +903,9 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= -github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.21.0 h1:DIsaGmiaBkSangBgMtWdNfxbMNdku5IK6iNhrEqWvdA= +github.com/prometheus/client_golang v1.21.0/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -916,6 +920,7 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -924,6 +929,7 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -939,17 +945,17 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rollchains/cosmos-sdk v0.50.11 h1:hSBJoEcaOkVlx17wjc7JyCdVHThUtEhv1vBEsq+dLpY= github.com/rollchains/cosmos-sdk v0.50.11/go.mod h1:hrWEFMU1eoXqLJeE6VVESpJDQH67FS1nnMrQIjO2daw= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= -github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= -github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= +github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= +github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= +github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -980,11 +986,12 @@ github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNo github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1006,9 +1013,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= @@ -1054,20 +1058,22 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= -go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= -go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= -go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= -go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= -go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= -go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= -go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= -go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= -go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= -go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= +go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= +go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= +go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= +go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1094,8 +1100,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= +golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= +golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1107,8 +1113,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk= +golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1135,8 +1141,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1196,8 +1202,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= -golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= +golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1223,8 +1229,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= -golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70= +golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1239,8 +1245,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1293,6 +1299,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1301,6 +1308,7 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1335,13 +1343,13 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= -golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1352,8 +1360,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1420,8 +1428,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1430,8 +1438,6 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1481,8 +1487,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.192.0 h1:PljqpNAfZaaSpS+TnANfnNAXKdzHM/B9bKhwRlo7JP0= -google.golang.org/api v0.192.0/go.mod h1:9VcphjvAxPKLmSxVSzPlSRXy/5ARMEw5bf58WoVXafQ= +google.golang.org/api v0.196.0 h1:k/RafYqebaIJBO3+SMnfEGtFVlvp5vSgqTUF54UN/zg= +google.golang.org/api v0.196.0/go.mod h1:g9IL21uGkYgvQ5BZg6BAtoGJQIm8r6EgaAbpNey5wBE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1598,12 +1604,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf h1:OqdXDEakZCVtDiZTjcxfwbHPCT11ycCEsTKesBVKvyY= -google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:mCr1K1c8kX+1iSBREvU3Juo11CB+QOEWxbRS01wWl5M= -google.golang.org/genproto/googleapis/api v0.0.0-20241202173237-19429a94021a h1:OAiGFfOiA0v9MRYsSidp3ubZaBnteRUyn3xB2ZQ5G/E= -google.golang.org/genproto/googleapis/api v0.0.0-20241202173237-19429a94021a/go.mod h1:jehYqy3+AhJU9ve55aNOaSml7wUXjF9x6z2LcCfpAhY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a h1:hgh8P4EuoxpsuKMXX/To36nOFD7vixReXgn8lPGnt+o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= +google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 h1:BulPr26Jqjnd4eYDVe+YvyR7Yc2vJGkO5/0UxD0/jZU= +google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:hL97c3SYopEHblzpxRL4lSs523++l8DYxGM1FQiYmb4= +google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 h1:GVIKPyP/kLIyVOgOnTwFOrvQaQUzOzGMCxgFUOEmm24= +google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422/go.mod h1:b6h1vNKhxaSoEI+5jc3PJUCustfli/mRab7295pY7rw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1645,8 +1651,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= -google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg= +google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1663,8 +1669,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNIM= -google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/proto/multisig/v1/tx.proto b/proto/multisig/v1/tx.proto index 9d7a215..dc06ac4 100755 --- a/proto/multisig/v1/tx.proto +++ b/proto/multisig/v1/tx.proto @@ -78,7 +78,7 @@ message MsgCreateMultisigAccountResponse { message MsgAddMultisigSignerParams { string multisig_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string signer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - optional uint32 new_threshold = 3; + uint32 new_threshold = 3; } // MsgAddMultisigSignerResponse defines the response structure of adding a signer to a multisig account diff --git a/x/multisig/keeper/msg_server.go b/x/multisig/keeper/msg_server.go index 0a81986..705abab 100755 --- a/x/multisig/keeper/msg_server.go +++ b/x/multisig/keeper/msg_server.go @@ -48,10 +48,10 @@ func (ms msgServer) CreateMultisigAccount(ctx context.Context, msg *types.MsgCre return nil, errors.Wrapf(sdkerrors.ErrInsufficientFee, "invalid threshold") } - // validate signers - if len(msg.Signers) < 2 && len(msg.Signers) > 10 { - return nil, errors.Wrap(sdkerrors.ErrInsufficientFunds, "Atleast two signers are required") - } + // validate signers + if len(msg.Signers) < 2 && len(msg.Signers) > 10 { + return nil, errors.Wrap(sdkerrors.ErrInsufficientFunds, "Atleast two signers are required") + } // derive multi account id multisig_address := DeriveMultisigAccountID(msg.Seed) @@ -64,54 +64,54 @@ func (ms msgServer) CreateMultisigAccount(ctx context.Context, msg *types.MsgCre // insert multisig acount ms.k.MultisigAccounts.Set(ctx, multisig_address, types.MultisigAccountDetails{ - Threshold: msg.Threshold, - Signers: append(msg.Signers, sender), + Threshold: msg.Threshold, + Signers: append(msg.Signers, sender), Permission: msg.Permission, }) return &types.MsgCreateMultisigAccountResponse{ - MultisigAddress: string(multisig_address), - }, nil + MultisigAddress: string(multisig_address), + }, nil } // AddMultisigSigner implements types.MsgServer. func (ms msgServer) AddMultisigSigner(ctx context.Context, msg *types.MsgAddMultisigSignerParams) (*types.MsgAddMultisigSignerResponse, error) { - multisig_address, err := ms.k.ac.StringToBytes(msg.MultisigAddress) + multisig_address, err := ms.k.ac.StringToBytes(msg.MultisigAddress) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid multisig address (%s)", msg.MultisigAddress) } - new_signer, err := ms.k.ac.StringToBytes(msg.Signer) + new_signer, err := ms.k.ac.StringToBytes(msg.Signer) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid signer address (%s)", msg.Signer) } - // validate multisig_address - multisig_account_details, err := ms.k.MultisigAccounts.Get(ctx, multisig_address) + // validate multisig_address + multisig_account_details, err := ms.k.MultisigAccounts.Get(ctx, multisig_address) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrConflict, "Invalid multisig: Account not found") } - // validate signer: Is it better to have an index table just for this; Makes deletion and updates expensive! - if contains(multisig_account_details.Signers, new_signer) == true { - return nil, errors.Wrap(sdkerrors.ErrConflict, "Duplicate signer") - } + // validate signer: Is it better to have an index table just for this; Makes deletion and updates expensive! + if contains(multisig_account_details.Signers, new_signer) == true { + return nil, errors.Wrap(sdkerrors.ErrConflict, "Duplicate signer") + } - // check if new threshold is provided - if msg.XNewThreshold != nil { - if msg.GetNewThreshold() < 1 { - return nil, errors.Wrapf(sdkerrors.ErrInsufficientFee, "invalid threshold") - } + // check if new threshold is provided + if msg.NewThreshold != 0 { + if msg.GetNewThreshold() < 1 { + return nil, errors.Wrapf(sdkerrors.ErrInsufficientFee, "invalid threshold") + } - multisig_account_details.Threshold = msg.GetNewThreshold() - } + multisig_account_details.Threshold = msg.GetNewThreshold() + } - // Update the signer list - multisig_account_details.Signers = append(multisig_account_details.Signers, new_signer); + // Update the signer list + multisig_account_details.Signers = append(multisig_account_details.Signers, new_signer) - // Update the multisig account - ms.k.MultisigAccounts.Set(ctx, multisig_address, multisig_account_details) + // Update the multisig account + ms.k.MultisigAccounts.Set(ctx, multisig_address, multisig_account_details) return &types.MsgAddMultisigSignerResponse{}, nil } @@ -130,181 +130,181 @@ func (ms msgServer) SetThreshold(ctx context.Context, msg *types.MsgSetMultisigT // InitializeMultisigProposal implements types.MsgServer. func (ms msgServer) InitializeMultisigProposal(ctx context.Context, msg *types.MsgInitializeMultisigProposalParams) (*types.MsgInitializeMultisigResponse, error) { - // validate proposer address - proposer, err := ms.k.ac.StringToBytes(msg.Proposer) + // validate proposer address + proposer, err := ms.k.ac.StringToBytes(msg.Proposer) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid signer address (%s)", msg.Proposer) } - - multisig_address, err := ms.k.ac.StringToBytes(msg.MultisigAddress) + + multisig_address, err := ms.k.ac.StringToBytes(msg.MultisigAddress) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid multisig address (%s)", msg.MultisigAddress) } - // validate account - multisig_account_details, err := ms.k.MultisigAccounts.Get(ctx, multisig_address) + // validate account + multisig_account_details, err := ms.k.MultisigAccounts.Get(ctx, multisig_address) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrConflict, "Invalid multisig: Account not found") } - // validate proposer - if contains(multisig_account_details.Signers, proposer) == false { - return nil, errors.Wrap(sdkerrors.ErrConflict, "Invalid proposer: Permission Denied") - } - - // Compute call hash - call_hash := blake2b.Sum256(msg.Message.Value) - - // validate call - existing_proposal, err := ms.k.OrmDB.ProposalTable().GetByMultisigAddressCallHash(ctx, multisig_address, call_hash[:]) - if err != nil { - return &types.MsgInitializeMultisigResponse{ - ProposalId: existing_proposal.Id, - }, nil - } - - // approvals - approvals := [][]byte{proposer}; - - id, err := ms.k.OrmDB.ProposalTable().InsertReturningId( - ctx, - &multisigv1.Proposal{ - Depositor: proposer, - Deposit: 10, - MultisigAddress: multisig_address, - Approvals: approvals, - CallHash: call_hash[:], - }, - ) + // validate proposer + if contains(multisig_account_details.Signers, proposer) == false { + return nil, errors.Wrap(sdkerrors.ErrConflict, "Invalid proposer: Permission Denied") + } + + // Compute call hash + call_hash := blake2b.Sum256(msg.Message.Value) + + // validate call + existing_proposal, err := ms.k.OrmDB.ProposalTable().GetByMultisigAddressCallHash(ctx, multisig_address, call_hash[:]) + if err != nil { + return &types.MsgInitializeMultisigResponse{ + ProposalId: existing_proposal.Id, + }, nil + } + + // approvals + approvals := [][]byte{proposer} + + id, err := ms.k.OrmDB.ProposalTable().InsertReturningId( + ctx, + &multisigv1.Proposal{ + Depositor: proposer, + Deposit: 10, + MultisigAddress: multisig_address, + Approvals: approvals, + CallHash: call_hash[:], + }, + ) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrConflict, "Invalid multisig: Proposal addition failed") } - // collect deposit - deposit := sdk.NewCoins(sdk.NewCoin("uom", math.NewInt(int64(10)))) - err = ms.k.BankKeeper.SendCoinsFromAccountToModule(ctx, proposer, types.ModuleName, deposit) - if err != nil { - return nil, err - } + // collect deposit + deposit := sdk.NewCoins(sdk.NewCoin("uom", math.NewInt(int64(10)))) + err = ms.k.BankKeeper.SendCoinsFromAccountToModule(ctx, proposer, types.ModuleName, deposit) + if err != nil { + return nil, err + } return &types.MsgInitializeMultisigResponse{ - ProposalId: id, - }, nil + ProposalId: id, + }, nil } // ApproveMultisigProposal implements types.MsgServer. func (ms msgServer) ApproveMultisigProposal(ctx context.Context, msg *types.MsgApproveMultisigProposalParams) (*types.MsgApproveMultisigProposalResponse, error) { - approver, err := ms.k.ac.StringToBytes(msg.Approver) + approver, err := ms.k.ac.StringToBytes(msg.Approver) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid signer address (%s)", msg.Approver) } - - multisig_address, err := ms.k.ac.StringToBytes(msg.MultisigAddress) + + multisig_address, err := ms.k.ac.StringToBytes(msg.MultisigAddress) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid multisig address (%s)", msg.MultisigAddress) } - // validate account - multisig_account_details, err := ms.k.MultisigAccounts.Get(ctx, multisig_address) + // validate account + multisig_account_details, err := ms.k.MultisigAccounts.Get(ctx, multisig_address) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrConflict, "Invalid multisig: Account not found") } - // validate approver - if contains(multisig_account_details.Signers, approver) == false { - return nil, errors.Wrap(sdkerrors.ErrConflict, "Invalid proposer: Permission Denied") - } + // validate approver + if contains(multisig_account_details.Signers, approver) == false { + return nil, errors.Wrap(sdkerrors.ErrConflict, "Invalid proposer: Permission Denied") + } - // validate proposal - proposal, err := ms.k.OrmDB.ProposalTable().Get(ctx, msg.GetProposalId()) - if contains(proposal.Approvals, approver) { - return &types.MsgApproveMultisigProposalResponse{}, nil - } + // validate proposal + proposal, err := ms.k.OrmDB.ProposalTable().Get(ctx, msg.GetProposalId()) + if contains(proposal.Approvals, approver) { + return &types.MsgApproveMultisigProposalResponse{}, nil + } - // Add approval if needed - if len(proposal.Approvals) < int(multisig_account_details.Threshold) { - // approve proposal - proposal.Approvals = append(proposal.Approvals, approver) + // Add approval if needed + if len(proposal.Approvals) < int(multisig_account_details.Threshold) { + // approve proposal + proposal.Approvals = append(proposal.Approvals, approver) - // update proposal - ms.k.OrmDB.ProposalTable().Update(ctx, proposal) - } + // update proposal + ms.k.OrmDB.ProposalTable().Update(ctx, proposal) + } return &types.MsgApproveMultisigProposalResponse{}, nil } // ApproveAndDispatchMultisigProposal implements types.MsgServer. func (ms msgServer) ApproveAndDispatchMultisigProposal(ctx context.Context, msg *types.MsgApproveAndDispatchMultisigProposalParams) (*types.MsgApproveAndDispatchMultisigProposalResponse, error) { - // vaidate signer - approver, err := ms.k.ac.StringToBytes(msg.Approver) + // vaidate signer + approver, err := ms.k.ac.StringToBytes(msg.Approver) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid signer address (%s)", msg.Approver) } - - multisig_address, err := ms.k.ac.StringToBytes(msg.MultisigAddress) + + multisig_address, err := ms.k.ac.StringToBytes(msg.MultisigAddress) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid multisig address (%s)", msg.MultisigAddress) } - // validate account - multisig_account_details, err := ms.k.MultisigAccounts.Get(ctx, multisig_address) + // validate account + multisig_account_details, err := ms.k.MultisigAccounts.Get(ctx, multisig_address) if err != nil { return nil, errors.Wrapf(sdkerrors.ErrConflict, "Invalid multisig: Account not found") } - // validate approver - if contains(multisig_account_details.Signers, approver) == false { - return nil, errors.Wrap(sdkerrors.ErrConflict, "Invalid proposer: Permission Denied") - } + // validate approver + if contains(multisig_account_details.Signers, approver) == false { + return nil, errors.Wrap(sdkerrors.ErrConflict, "Invalid proposer: Permission Denied") + } - // Compute call hash - call_hash := blake2b.Sum256(msg.Message.Value) + // Compute call hash + call_hash := blake2b.Sum256(msg.Message.Value) - // validate proposal - proposal, err := ms.k.OrmDB.ProposalTable().GetByMultisigAddressCallHash(ctx, multisig_address, call_hash[:]) - if err != nil { - return nil, err - } + // validate proposal + proposal, err := ms.k.OrmDB.ProposalTable().GetByMultisigAddressCallHash(ctx, multisig_address, call_hash[:]) + if err != nil { + return nil, err + } - if msg.ProposalId != proposal.Id { - return nil, errors.Wrap(sdkerrors.ErrConflict, "Proposal Id does not match with call_hash") - } + if msg.ProposalId != proposal.Id { + return nil, errors.Wrap(sdkerrors.ErrConflict, "Proposal Id does not match with call_hash") + } - // if dispatcher has approved already - approvals_len := len(proposal.Approvals) - if !contains(proposal.Approvals, approver) { - approvals_len += 1; - } + // if dispatcher has approved already + approvals_len := len(proposal.Approvals) + if !contains(proposal.Approvals, approver) { + approvals_len += 1 + } - // check threshold - if approvals_len < int(multisig_account_details.Threshold) { - return nil, errors.Wrap(sdkerrors.ErrInsufficientFee, "Cannot dispatch proposal, threshold not met") - } + // check threshold + if approvals_len < int(multisig_account_details.Threshold) { + return nil, errors.Wrap(sdkerrors.ErrInsufficientFee, "Cannot dispatch proposal, threshold not met") + } - // dispatch call - res, err := ms.k.DispatchActions(ctx, multisig_address, msg) + // dispatch call + res, err := ms.k.DispatchActions(ctx, multisig_address, msg) - // remove proposal - ms.k.OrmDB.ProposalTable().Delete(ctx, proposal) + // remove proposal + ms.k.OrmDB.ProposalTable().Delete(ctx, proposal) return &types.MsgApproveAndDispatchMultisigProposalResponse{ - TransactionHash: string(res.Data), - }, nil + TransactionHash: string(res.Data), + }, nil } func (k Keeper) DispatchActions(ctx context.Context, multisig_address sdk.AccAddress, msg sdk.Msg) (*sdk.Result, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) - handler := k.router.Handler(msg) - if handler == nil { - return nil, sdkerrors.ErrUnknownRequest.Wrapf("unrecognized message route: %s", sdk.MsgTypeURL(msg)) - } + handler := k.router.Handler(msg) + if handler == nil { + return nil, sdkerrors.ErrUnknownRequest.Wrapf("unrecognized message route: %s", sdk.MsgTypeURL(msg)) + } - msgResp, err := handler(sdkCtx, msg) - if err != nil { - return nil, errors.Wrapf(err, "failed to execute message; message %v", msg) - } + msgResp, err := handler(sdkCtx, msg) + if err != nil { + return nil, errors.Wrapf(err, "failed to execute message; message %v", msg) + } return msgResp, nil } @@ -334,17 +334,17 @@ func DeriveMultisigAccountID(seed uint32) sdk.AccAddress { hash := blake2b.Sum256(input) // Take the first 20 bytes to form an AccAddress - addr:= hash[:20] + addr := hash[:20] return sdk.AccAddress(addr) } func contains(signers [][]byte, signer []byte) bool { - for _, signer := range signers { - if bytes.Equal(signer, signer) { - return true - } - } - return false + for _, signer := range signers { + if bytes.Equal(signer, signer) { + return true + } + } + return false } diff --git a/x/multisig/types/tx.pb.go b/x/multisig/types/tx.pb.go index aae3b6f..00552f4 100644 --- a/x/multisig/types/tx.pb.go +++ b/x/multisig/types/tx.pb.go @@ -256,10 +256,7 @@ func (m *MsgCreateMultisigAccountResponse) GetMultisigAddress() string { type MsgAddMultisigSignerParams struct { MultisigAddress string `protobuf:"bytes,1,opt,name=multisig_address,json=multisigAddress,proto3" json:"multisig_address,omitempty"` Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` - // Types that are valid to be assigned to XNewThreshold: - // - // *MsgAddMultisigSignerParams_NewThreshold - XNewThreshold isMsgAddMultisigSignerParams_XNewThreshold `protobuf_oneof:"_new_threshold"` + NewThreshold uint32 `protobuf:"varint,3,opt,name=new_threshold,json=newThreshold,proto3" json:"new_threshold,omitempty"` } func (m *MsgAddMultisigSignerParams) Reset() { *m = MsgAddMultisigSignerParams{} } @@ -295,25 +292,6 @@ func (m *MsgAddMultisigSignerParams) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAddMultisigSignerParams proto.InternalMessageInfo -type isMsgAddMultisigSignerParams_XNewThreshold interface { - isMsgAddMultisigSignerParams_XNewThreshold() - MarshalTo([]byte) (int, error) - Size() int -} - -type MsgAddMultisigSignerParams_NewThreshold struct { - NewThreshold uint32 `protobuf:"varint,3,opt,name=new_threshold,json=newThreshold,proto3,oneof" json:"new_threshold,omitempty"` -} - -func (*MsgAddMultisigSignerParams_NewThreshold) isMsgAddMultisigSignerParams_XNewThreshold() {} - -func (m *MsgAddMultisigSignerParams) GetXNewThreshold() isMsgAddMultisigSignerParams_XNewThreshold { - if m != nil { - return m.XNewThreshold - } - return nil -} - func (m *MsgAddMultisigSignerParams) GetMultisigAddress() string { if m != nil { return m.MultisigAddress @@ -329,19 +307,12 @@ func (m *MsgAddMultisigSignerParams) GetSigner() string { } func (m *MsgAddMultisigSignerParams) GetNewThreshold() uint32 { - if x, ok := m.GetXNewThreshold().(*MsgAddMultisigSignerParams_NewThreshold); ok { - return x.NewThreshold + if m != nil { + return m.NewThreshold } return 0 } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*MsgAddMultisigSignerParams) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*MsgAddMultisigSignerParams_NewThreshold)(nil), - } -} - // MsgAddMultisigSignerResponse defines the response structure of adding a signer to a multisig account type MsgAddMultisigSignerResponse struct { } @@ -1115,73 +1086,72 @@ func init() { func init() { proto.RegisterFile("multisig/v1/tx.proto", fileDescriptor_f023d0392a638bd4) } var fileDescriptor_f023d0392a638bd4 = []byte{ - // 1051 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xbf, 0x8f, 0x1b, 0x45, - 0x14, 0xf6, 0xfa, 0x7c, 0x77, 0xf8, 0xf9, 0x72, 0x77, 0x0c, 0x0e, 0xe7, 0x2c, 0x87, 0xcf, 0xb7, - 0x89, 0x84, 0x73, 0xc9, 0xed, 0xc6, 0x06, 0x21, 0x94, 0x0a, 0x3b, 0x29, 0x72, 0x42, 0x96, 0xa2, - 0xbd, 0xd0, 0xa4, 0xb1, 0xc6, 0xbb, 0x93, 0xdd, 0x45, 0xde, 0x1f, 0xda, 0x19, 0x3b, 0x71, 0x2a, - 0x48, 0x45, 0x41, 0x41, 0x45, 0x41, 0x0f, 0x75, 0x8a, 0x94, 0x40, 0x1d, 0xd1, 0x10, 0x51, 0x51, - 0x21, 0x74, 0x57, 0xe4, 0xdf, 0x40, 0xde, 0x1f, 0x73, 0xf6, 0xda, 0xbb, 0x36, 0xc2, 0x28, 0xa2, - 0xf3, 0xce, 0xfb, 0xe6, 0xbd, 0x6f, 0xbe, 0xf9, 0xe6, 0xcd, 0x18, 0xca, 0xf6, 0xa0, 0xcf, 0x2c, - 0x6a, 0x19, 0xca, 0xb0, 0xa1, 0xb0, 0x27, 0xb2, 0xe7, 0xbb, 0xcc, 0x45, 0xa5, 0x78, 0x54, 0x1e, - 0x36, 0xc4, 0x3d, 0xcd, 0xa5, 0xb6, 0x4b, 0x15, 0x9b, 0x06, 0x20, 0x9b, 0x1a, 0x21, 0x4a, 0xbc, - 0x62, 0xb8, 0xae, 0xd1, 0x27, 0x4a, 0xf0, 0xd5, 0x1b, 0x3c, 0x52, 0xb0, 0x33, 0x8a, 0x43, 0x93, - 0x69, 0x0d, 0xe2, 0x10, 0x6a, 0xd1, 0x28, 0xb4, 0x37, 0x19, 0xa2, 0x0c, 0x33, 0x12, 0x05, 0xca, - 0x86, 0x6b, 0xb8, 0xc1, 0x4f, 0x65, 0xfc, 0x2b, 0xce, 0x14, 0x56, 0xef, 0x86, 0x81, 0xf0, 0x23, - 0x0c, 0x49, 0xdf, 0x08, 0xb0, 0xd3, 0xa1, 0xc6, 0xe7, 0x9e, 0x8e, 0x19, 0xb9, 0x8f, 0x7d, 0x6c, - 0x53, 0xf4, 0x31, 0x14, 0xf1, 0x80, 0x99, 0xae, 0x6f, 0xb1, 0x51, 0x45, 0xa8, 0x09, 0xf5, 0x62, - 0xbb, 0xf2, 0xfb, 0x8b, 0xe3, 0x72, 0x34, 0xb1, 0xa5, 0xeb, 0x3e, 0xa1, 0xf4, 0x94, 0xf9, 0x96, - 0x63, 0xa8, 0x17, 0x50, 0xd4, 0x80, 0x0d, 0x2f, 0xc8, 0x50, 0xc9, 0xd7, 0x84, 0x7a, 0xa9, 0xf9, - 0x8e, 0x3c, 0x21, 0x81, 0x1c, 0x26, 0x6f, 0x17, 0x5e, 0xfe, 0x79, 0x90, 0x53, 0x23, 0xe0, 0xed, - 0xed, 0x67, 0xaf, 0x9f, 0x1f, 0x5d, 0xa4, 0x90, 0xae, 0xc0, 0x5e, 0x82, 0x8d, 0x4a, 0xa8, 0xe7, - 0x3a, 0x94, 0x48, 0x5f, 0xe5, 0xa1, 0xda, 0xa1, 0xc6, 0x1d, 0x9f, 0x60, 0x46, 0x3a, 0x51, 0xe2, - 0x96, 0xa6, 0xb9, 0x03, 0x87, 0xfd, 0x4b, 0xe2, 0x08, 0x0a, 0x94, 0x10, 0x3d, 0xa0, 0x7d, 0x49, - 0x0d, 0x7e, 0xa3, 0x7d, 0x28, 0x32, 0xd3, 0x27, 0xd4, 0x74, 0xfb, 0x7a, 0x65, 0x2d, 0x08, 0x5c, - 0x0c, 0xa0, 0x26, 0x6c, 0x52, 0xcb, 0x70, 0x88, 0x4f, 0x2b, 0x85, 0xda, 0x5a, 0x7d, 0x2b, 0xa3, - 0x4e, 0x0c, 0x44, 0x2d, 0x00, 0x8f, 0xf8, 0xb6, 0x45, 0xa9, 0xe5, 0x3a, 0x95, 0xf5, 0x9a, 0x50, - 0xdf, 0x6e, 0x1e, 0x4e, 0x49, 0x14, 0xaf, 0xea, 0xbe, 0xef, 0x7a, 0x2e, 0xc5, 0xfd, 0x07, 0x23, - 0x8f, 0xa8, 0x13, 0x93, 0x24, 0x03, 0x6a, 0x69, 0x12, 0xc4, 0x3a, 0xa1, 0x3b, 0xb0, 0x1b, 0xe7, - 0xec, 0xe2, 0x90, 0xc9, 0x42, 0x2d, 0x76, 0xe2, 0x19, 0xd1, 0xb0, 0xf4, 0x9b, 0x00, 0x62, 0x87, - 0x8e, 0x3f, 0xe3, 0x32, 0xa7, 0xc1, 0x2a, 0x22, 0xa1, 0x57, 0x51, 0x03, 0xdd, 0x82, 0x8d, 0x50, - 0x9a, 0x40, 0xf7, 0xac, 0xa9, 0x11, 0x0e, 0xd5, 0xe1, 0x92, 0x43, 0x1e, 0x77, 0x13, 0xfb, 0x72, - 0x2f, 0xa7, 0x6e, 0x39, 0xe4, 0xf1, 0x83, 0x78, 0xf4, 0x6b, 0x41, 0x68, 0xef, 0xc2, 0x76, 0x77, - 0x0a, 0x2a, 0x55, 0x61, 0x7f, 0xde, 0x82, 0xb8, 0xbd, 0x1e, 0xc1, 0xc1, 0x58, 0xda, 0x3e, 0xc1, - 0xce, 0xc0, 0x9b, 0x6f, 0xaf, 0x95, 0x28, 0x7b, 0x15, 0x0e, 0x53, 0xeb, 0x70, 0x32, 0xcf, 0x04, - 0x78, 0xbf, 0x43, 0x8d, 0x53, 0xc2, 0x62, 0x04, 0x5f, 0xdd, 0x2a, 0x77, 0x60, 0xca, 0xe3, 0xf9, - 0x84, 0xc7, 0xa5, 0xc3, 0x40, 0x91, 0x79, 0x1c, 0x38, 0xcf, 0x1f, 0xf2, 0x70, 0xb5, 0x43, 0x8d, - 0x13, 0xc7, 0x62, 0x16, 0xee, 0x5b, 0x4f, 0x49, 0xd2, 0xc1, 0xab, 0x64, 0xfb, 0x11, 0xbc, 0xe5, - 0x05, 0x69, 0x97, 0x70, 0x0c, 0x47, 0xa2, 0x32, 0xac, 0x33, 0x8b, 0xf5, 0x49, 0xe0, 0x95, 0xa2, - 0x1a, 0x7e, 0xa0, 0x1a, 0x94, 0x74, 0x42, 0x35, 0xdf, 0xf2, 0xd8, 0xf8, 0x30, 0x16, 0x82, 0xd8, - 0xe4, 0x10, 0xfa, 0x0c, 0x36, 0x6d, 0x42, 0x29, 0x36, 0x48, 0x70, 0x54, 0x4b, 0xcd, 0xb2, 0x1c, - 0xb6, 0x6a, 0x39, 0x6e, 0xd5, 0x72, 0xcb, 0x19, 0xb5, 0xdf, 0xfb, 0xf5, 0xc5, 0x71, 0xd4, 0xdc, - 0xe5, 0x1e, 0xa6, 0x44, 0x1e, 0x36, 0x7a, 0x84, 0xe1, 0x86, 0xdc, 0xa1, 0x86, 0x1a, 0x67, 0x90, - 0x3e, 0x0d, 0xb6, 0x73, 0x56, 0x26, 0x7e, 0x68, 0x0f, 0xa0, 0xe4, 0x45, 0x92, 0x75, 0x2d, 0x3d, - 0xd0, 0xa6, 0xa0, 0x42, 0x3c, 0x74, 0xa2, 0x4b, 0xbf, 0x08, 0xc1, 0xd1, 0x6f, 0x79, 0x9e, 0xef, - 0x0e, 0xff, 0x53, 0x99, 0x13, 0x54, 0xf2, 0x49, 0x2a, 0xe3, 0x7d, 0xc0, 0x21, 0x0d, 0x3f, 0x14, - 0x35, 0x6b, 0x1f, 0x62, 0xa4, 0x74, 0x0d, 0xa4, 0x74, 0xfe, 0xdc, 0x50, 0xdf, 0xe5, 0xe1, 0xc6, - 0x05, 0xac, 0xe5, 0xe8, 0x77, 0x2d, 0xea, 0x61, 0xa6, 0x99, 0xff, 0xbf, 0x15, 0xaf, 0xd6, 0x41, - 0x0f, 0xe1, 0x78, 0x29, 0x5d, 0xb8, 0xa3, 0xae, 0xc3, 0x2e, 0xf3, 0xb1, 0x43, 0xb1, 0x36, 0xb6, - 0x73, 0xd7, 0xc4, 0xd4, 0x0c, 0x95, 0x51, 0x77, 0x26, 0xc6, 0xef, 0x61, 0x6a, 0x4a, 0x3f, 0x0b, - 0x61, 0xef, 0xc3, 0x8e, 0x46, 0xfa, 0x6f, 0x5a, 0x68, 0x9f, 0x7c, 0x41, 0x34, 0xb6, 0x8c, 0xd0, - 0x31, 0x32, 0x6e, 0xa9, 0x73, 0xe9, 0x73, 0x67, 0xfd, 0x14, 0x1e, 0xa0, 0x44, 0xe3, 0x7d, 0x23, - 0xab, 0x6c, 0xc2, 0xa6, 0x4f, 0xec, 0xa5, 0xdc, 0x14, 0x03, 0xa3, 0xe3, 0x93, 0xc2, 0x3e, 0x5e, - 0x64, 0xf3, 0xc7, 0x22, 0xac, 0x75, 0xa8, 0x81, 0x54, 0xd8, 0x9a, 0x7a, 0xd1, 0xed, 0x4f, 0x3f, - 0x33, 0xa6, 0x5f, 0x58, 0xe2, 0xb5, 0xac, 0x28, 0x37, 0x14, 0x85, 0xcb, 0x73, 0x1f, 0x1e, 0xe8, - 0x46, 0x72, 0x7a, 0xc6, 0x13, 0x4d, 0x3c, 0x5e, 0x0a, 0xcc, 0x8b, 0x1a, 0xf0, 0xf6, 0xcc, 0x95, - 0x8d, 0x3e, 0x48, 0xe6, 0x48, 0x79, 0xa6, 0x88, 0xd7, 0x17, 0x02, 0x79, 0xa1, 0x01, 0x5c, 0x4e, - 0x88, 0x1b, 0x15, 0xbb, 0x39, 0x43, 0x38, 0xe3, 0x89, 0x20, 0xca, 0xcb, 0xa1, 0x79, 0x59, 0x13, - 0xb6, 0x4e, 0x09, 0xe3, 0x17, 0x2b, 0x3a, 0x4a, 0xce, 0x4f, 0x7f, 0x02, 0x88, 0x37, 0x97, 0xc1, - 0xf2, 0x4a, 0x4f, 0x41, 0x4c, 0xbf, 0xa6, 0xd1, 0xad, 0x64, 0xae, 0x45, 0x57, 0xba, 0x78, 0xb4, - 0x78, 0x06, 0xaf, 0x3d, 0x82, 0xbd, 0x94, 0xc6, 0x8f, 0x66, 0xfc, 0x90, 0x79, 0xc3, 0x89, 0xca, - 0x92, 0x70, 0x5e, 0xfa, 0x7b, 0x01, 0xa4, 0xc5, 0x5d, 0x13, 0x7d, 0x92, 0x92, 0x77, 0xe1, 0x0d, - 0x24, 0xde, 0xfe, 0xe7, 0x33, 0x39, 0xb9, 0x21, 0xbc, 0x3b, 0xbf, 0x6b, 0xcd, 0x71, 0x5d, 0x46, - 0x73, 0x9e, 0xe3, 0xba, 0xcc, 0x5e, 0x38, 0xde, 0x8f, 0x94, 0x4e, 0x32, 0xbb, 0x1f, 0x99, 0x0d, - 0x73, 0x76, 0x3f, 0x16, 0x74, 0x28, 0x71, 0xfd, 0xcb, 0xd7, 0xcf, 0x8f, 0x84, 0xf6, 0xc9, 0xcb, - 0xb3, 0xaa, 0xf0, 0xea, 0xac, 0x2a, 0xfc, 0x75, 0x56, 0x15, 0xbe, 0x3d, 0xaf, 0xe6, 0x5e, 0x9d, - 0x57, 0x73, 0x7f, 0x9c, 0x57, 0x73, 0x0f, 0x15, 0xc3, 0x62, 0xe6, 0xa0, 0x27, 0x6b, 0xae, 0xad, - 0xdc, 0xc5, 0x64, 0xd8, 0xb1, 0x98, 0xe9, 0x63, 0x47, 0xd1, 0x6d, 0xcd, 0xc4, 0x96, 0xa3, 0x3c, - 0x51, 0xf8, 0x7f, 0x5f, 0x36, 0xf2, 0x08, 0xed, 0x6d, 0x04, 0xb7, 0xe9, 0x87, 0x7f, 0x07, 0x00, - 0x00, 0xff, 0xff, 0x91, 0xe8, 0x21, 0x5f, 0x86, 0x0f, 0x00, 0x00, + // 1038 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xbf, 0x6f, 0xdb, 0x46, + 0x14, 0x36, 0x65, 0xd9, 0xae, 0x9e, 0x9c, 0x38, 0xbd, 0x2a, 0xb5, 0xc2, 0xba, 0xb2, 0x4c, 0x07, + 0xa8, 0xe3, 0xc4, 0x64, 0xa4, 0x16, 0x45, 0x91, 0xa9, 0x72, 0x32, 0xd4, 0x28, 0x04, 0x04, 0x74, + 0xba, 0x64, 0x11, 0x4e, 0xe4, 0x85, 0x64, 0x21, 0xfe, 0x00, 0xef, 0xa4, 0x44, 0x99, 0xda, 0xcc, + 0x1d, 0x3a, 0x75, 0xe8, 0xde, 0xce, 0x19, 0x32, 0x74, 0x68, 0x3b, 0x07, 0x9d, 0x82, 0x4e, 0x9d, + 0x8a, 0xc2, 0x1e, 0xf2, 0x6f, 0x14, 0x22, 0x79, 0x67, 0x89, 0x12, 0x29, 0x15, 0x55, 0x11, 0x74, + 0x13, 0xef, 0x7d, 0xf7, 0xde, 0x77, 0xdf, 0x7d, 0xf7, 0xee, 0x04, 0x15, 0xb7, 0xdf, 0x63, 0x0e, + 0x75, 0x2c, 0x6d, 0xd0, 0xd0, 0xd8, 0x13, 0x35, 0x08, 0x7d, 0xe6, 0xa3, 0x32, 0x1f, 0x55, 0x07, + 0x0d, 0x79, 0xdb, 0xf0, 0xa9, 0xeb, 0x53, 0xcd, 0xa5, 0x11, 0xc8, 0xa5, 0x56, 0x8c, 0x92, 0xaf, + 0x59, 0xbe, 0x6f, 0xf5, 0x88, 0x16, 0x7d, 0x75, 0xfb, 0x8f, 0x34, 0xec, 0x0d, 0x79, 0x68, 0x3c, + 0xad, 0x45, 0x3c, 0x42, 0x1d, 0x9a, 0x84, 0xb6, 0xc7, 0x43, 0x94, 0x61, 0x46, 0x92, 0x40, 0xc5, + 0xf2, 0x2d, 0x3f, 0xfa, 0xa9, 0x8d, 0x7e, 0xf1, 0x4c, 0x71, 0xf5, 0x4e, 0x1c, 0x88, 0x3f, 0xe2, + 0x90, 0xf2, 0x8d, 0x04, 0x5b, 0x6d, 0x6a, 0x7d, 0x11, 0x98, 0x98, 0x91, 0xfb, 0x38, 0xc4, 0x2e, + 0x45, 0x1f, 0x43, 0x09, 0xf7, 0x99, 0xed, 0x87, 0x0e, 0x1b, 0x56, 0xa5, 0xba, 0x74, 0x50, 0x3a, + 0xae, 0xfe, 0xfe, 0xe2, 0xa8, 0x92, 0x4c, 0x6c, 0x99, 0x66, 0x48, 0x28, 0x3d, 0x65, 0xa1, 0xe3, + 0x59, 0xfa, 0x05, 0x14, 0x35, 0x60, 0x3d, 0x88, 0x32, 0x54, 0x0b, 0x75, 0xe9, 0xa0, 0xdc, 0x7c, + 0x47, 0x1d, 0x93, 0x40, 0x8d, 0x93, 0x1f, 0x17, 0x5f, 0xfe, 0xb9, 0xbb, 0xa2, 0x27, 0xc0, 0x3b, + 0x97, 0x9f, 0xbd, 0x7e, 0x7e, 0x78, 0x91, 0x42, 0xb9, 0x06, 0xdb, 0x29, 0x36, 0x3a, 0xa1, 0x81, + 0xef, 0x51, 0xa2, 0x7c, 0x5d, 0x80, 0x5a, 0x9b, 0x5a, 0x77, 0x43, 0x82, 0x19, 0x69, 0x27, 0x89, + 0x5b, 0x86, 0xe1, 0xf7, 0x3d, 0xf6, 0x2f, 0x89, 0x23, 0x28, 0x52, 0x42, 0xcc, 0x88, 0xf6, 0x25, + 0x3d, 0xfa, 0x8d, 0x76, 0xa0, 0xc4, 0xec, 0x90, 0x50, 0xdb, 0xef, 0x99, 0xd5, 0xd5, 0x28, 0x70, + 0x31, 0x80, 0x9a, 0xb0, 0x41, 0x1d, 0xcb, 0x23, 0x21, 0xad, 0x16, 0xeb, 0xab, 0x07, 0x9b, 0x39, + 0x75, 0x38, 0x10, 0xb5, 0x00, 0x02, 0x12, 0xba, 0x0e, 0xa5, 0x8e, 0xef, 0x55, 0xd7, 0xea, 0xd2, + 0xc1, 0xe5, 0xe6, 0xde, 0x84, 0x44, 0x7c, 0x55, 0xf7, 0x43, 0x3f, 0xf0, 0x29, 0xee, 0x3d, 0x18, + 0x06, 0x44, 0x1f, 0x9b, 0xa4, 0x58, 0x50, 0xcf, 0x92, 0x80, 0xeb, 0x84, 0xee, 0xc2, 0x15, 0x9e, + 0xb3, 0x83, 0x63, 0x26, 0x73, 0xb5, 0xd8, 0xe2, 0x33, 0x92, 0x61, 0xe5, 0x27, 0x09, 0xe4, 0x36, + 0x1d, 0x7d, 0xf2, 0x32, 0xa7, 0xd1, 0x2a, 0x12, 0xa1, 0x97, 0x51, 0x03, 0xdd, 0x86, 0xf5, 0x58, + 0x9a, 0x48, 0xf7, 0xbc, 0xa9, 0x09, 0x0e, 0xed, 0xc3, 0x25, 0x8f, 0x3c, 0xee, 0xa4, 0xf7, 0x65, + 0xd3, 0x23, 0x8f, 0x1f, 0xf0, 0x31, 0xa5, 0x06, 0x3b, 0xb3, 0x98, 0x0b, 0x1f, 0x3d, 0x82, 0xdd, + 0x91, 0x86, 0x3d, 0x82, 0xbd, 0x7e, 0x30, 0xdb, 0x47, 0x4b, 0x91, 0x70, 0x1f, 0xf6, 0x32, 0xeb, + 0x08, 0x32, 0xcf, 0x24, 0x78, 0xbf, 0x4d, 0xad, 0x53, 0xc2, 0x38, 0x42, 0x2c, 0x64, 0x99, 0x52, + 0x4f, 0x98, 0xb9, 0x90, 0x32, 0xb3, 0xb2, 0x17, 0x29, 0x32, 0x8b, 0x83, 0xe0, 0xf9, 0x43, 0x01, + 0xf6, 0xdb, 0xd4, 0x3a, 0xf1, 0x1c, 0xe6, 0xe0, 0x9e, 0xf3, 0x94, 0xa4, 0xad, 0xba, 0x4c, 0xb6, + 0x1f, 0xc1, 0x5b, 0x41, 0x94, 0x76, 0x01, 0x6b, 0x08, 0x24, 0xaa, 0xc0, 0x1a, 0x73, 0x58, 0x8f, + 0x44, 0xa6, 0x28, 0xe9, 0xf1, 0x07, 0xaa, 0x43, 0xd9, 0x24, 0xd4, 0x08, 0x9d, 0x80, 0x8d, 0x4e, + 0x5d, 0x31, 0x8a, 0x8d, 0x0f, 0xa1, 0xcf, 0x61, 0xc3, 0x25, 0x94, 0x62, 0x8b, 0x44, 0x67, 0xb2, + 0xdc, 0xac, 0xa8, 0x71, 0x4f, 0x56, 0x79, 0x4f, 0x56, 0x5b, 0xde, 0xf0, 0xf8, 0xbd, 0xdf, 0x5e, + 0x1c, 0x25, 0x5d, 0x5c, 0xed, 0x62, 0x4a, 0xd4, 0x41, 0xa3, 0x4b, 0x18, 0x6e, 0xa8, 0x6d, 0x6a, + 0xe9, 0x3c, 0x83, 0xf2, 0x69, 0xb4, 0x9d, 0xd3, 0x32, 0x89, 0xd3, 0xb9, 0x0b, 0xe5, 0x20, 0x91, + 0xac, 0xe3, 0x98, 0x91, 0x36, 0x45, 0x1d, 0xf8, 0xd0, 0x89, 0xa9, 0xfc, 0x2a, 0x45, 0x67, 0xbc, + 0x15, 0x04, 0xa1, 0x3f, 0xf8, 0x4f, 0x65, 0x4e, 0x51, 0x29, 0xa4, 0xa9, 0x8c, 0xf6, 0x01, 0xc7, + 0x34, 0xc2, 0x58, 0xd4, 0xbc, 0x7d, 0xe0, 0x48, 0xe5, 0x3a, 0x28, 0xd9, 0xfc, 0x85, 0xa1, 0xbe, + 0x2b, 0xc0, 0xcd, 0x0b, 0x58, 0xcb, 0x33, 0xef, 0x39, 0x34, 0xc0, 0xcc, 0xb0, 0xff, 0x7f, 0x2b, + 0x5e, 0xae, 0x83, 0x1e, 0xc2, 0xd1, 0x42, 0xba, 0x08, 0x47, 0xdd, 0x80, 0x2b, 0x2c, 0xc4, 0x1e, + 0xc5, 0xc6, 0xc8, 0xce, 0x1d, 0x1b, 0x53, 0x3b, 0x56, 0x46, 0xdf, 0x1a, 0x1b, 0xff, 0x0c, 0x53, + 0x5b, 0xf9, 0x45, 0x8a, 0x7b, 0x1f, 0xf6, 0x0c, 0xd2, 0x7b, 0xd3, 0x42, 0x87, 0xe4, 0x4b, 0x62, + 0xb0, 0x45, 0x84, 0xe6, 0x48, 0xde, 0x52, 0x67, 0xd2, 0x17, 0xce, 0xfa, 0x39, 0x3e, 0x40, 0xa9, + 0xc6, 0xfb, 0x46, 0x56, 0xd9, 0x84, 0x8d, 0x90, 0xb8, 0x0b, 0xb9, 0x89, 0x03, 0x93, 0xe3, 0x93, + 0xc1, 0x9e, 0x2f, 0xb2, 0xf9, 0x63, 0x09, 0x56, 0xdb, 0xd4, 0x42, 0x3a, 0x6c, 0x4e, 0x3c, 0xdd, + 0x76, 0x26, 0xdf, 0x13, 0x93, 0x4f, 0x29, 0xf9, 0x7a, 0x5e, 0x54, 0x18, 0x8a, 0xc2, 0xd5, 0x99, + 0x2f, 0x0c, 0x74, 0x33, 0x3d, 0x3d, 0xe7, 0x2d, 0x26, 0x1f, 0x2d, 0x04, 0x16, 0x45, 0x2d, 0x78, + 0x7b, 0xea, 0xca, 0x46, 0x1f, 0xa4, 0x73, 0x64, 0xbc, 0x47, 0xe4, 0x1b, 0x73, 0x81, 0xa2, 0x50, + 0x1f, 0xae, 0xa6, 0xc4, 0x4d, 0x8a, 0xdd, 0x9a, 0x22, 0x9c, 0xf3, 0x44, 0x90, 0xd5, 0xc5, 0xd0, + 0xa2, 0xac, 0x0d, 0x9b, 0xa7, 0x84, 0x89, 0x8b, 0x15, 0x1d, 0xa6, 0xe7, 0x67, 0x3f, 0x01, 0xe4, + 0x5b, 0x8b, 0x60, 0x45, 0xa5, 0xa7, 0x20, 0x67, 0x5f, 0xd3, 0xe8, 0x76, 0x3a, 0xd7, 0xbc, 0x2b, + 0x5d, 0x3e, 0x9c, 0x3f, 0x43, 0xd4, 0x1e, 0xc2, 0x76, 0x46, 0xe3, 0x47, 0x53, 0x7e, 0xc8, 0xbd, + 0xe1, 0x64, 0x6d, 0x41, 0xb8, 0x28, 0xfd, 0xbd, 0x04, 0xca, 0xfc, 0xae, 0x89, 0x3e, 0xc9, 0xc8, + 0x3b, 0xf7, 0x06, 0x92, 0xef, 0xfc, 0xf3, 0x99, 0x82, 0xdc, 0x00, 0xde, 0x9d, 0xdd, 0xb5, 0x66, + 0xb8, 0x2e, 0xa7, 0x39, 0xcf, 0x70, 0x5d, 0x6e, 0x2f, 0x1c, 0xed, 0x47, 0x46, 0x27, 0x99, 0xde, + 0x8f, 0xdc, 0x86, 0x39, 0xbd, 0x1f, 0x73, 0x3a, 0x94, 0xbc, 0xf6, 0xd5, 0xeb, 0xe7, 0x87, 0xd2, + 0xf1, 0xc9, 0xcb, 0xb3, 0x9a, 0xf4, 0xea, 0xac, 0x26, 0xfd, 0x75, 0x56, 0x93, 0xbe, 0x3d, 0xaf, + 0xad, 0xbc, 0x3a, 0xaf, 0xad, 0xfc, 0x71, 0x5e, 0x5b, 0x79, 0xa8, 0x59, 0x0e, 0xb3, 0xfb, 0x5d, + 0xd5, 0xf0, 0x5d, 0xed, 0x1e, 0x26, 0x83, 0xb6, 0xc3, 0xec, 0x10, 0x7b, 0x9a, 0xe9, 0x1a, 0x36, + 0x76, 0x3c, 0xed, 0x89, 0x26, 0xfe, 0xe4, 0xb2, 0x61, 0x40, 0x68, 0x77, 0x3d, 0xba, 0x4d, 0x3f, + 0xfc, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xc2, 0x17, 0x15, 0x6f, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1763,14 +1733,10 @@ func (m *MsgAddMultisigSignerParams) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l - if m.XNewThreshold != nil { - { - size := m.XNewThreshold.Size() - i -= size - if _, err := m.XNewThreshold.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } + if m.NewThreshold != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.NewThreshold)) + i-- + dAtA[i] = 0x18 } if len(m.Signer) > 0 { i -= len(m.Signer) @@ -1789,18 +1755,6 @@ func (m *MsgAddMultisigSignerParams) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *MsgAddMultisigSignerParams_NewThreshold) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgAddMultisigSignerParams_NewThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintTx(dAtA, i, uint64(m.NewThreshold)) - i-- - dAtA[i] = 0x18 - return len(dAtA) - i, nil -} func (m *MsgAddMultisigSignerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2395,21 +2349,12 @@ func (m *MsgAddMultisigSignerParams) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.XNewThreshold != nil { - n += m.XNewThreshold.Size() + if m.NewThreshold != 0 { + n += 1 + sovTx(uint64(m.NewThreshold)) } return n } -func (m *MsgAddMultisigSignerParams_NewThreshold) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovTx(uint64(m.NewThreshold)) - return n -} func (m *MsgAddMultisigSignerResponse) Size() (n int) { if m == nil { return 0 @@ -3152,7 +3097,7 @@ func (m *MsgAddMultisigSignerParams) Unmarshal(dAtA []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NewThreshold", wireType) } - var v uint32 + m.NewThreshold = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3162,12 +3107,11 @@ func (m *MsgAddMultisigSignerParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + m.NewThreshold |= uint32(b&0x7F) << shift if b < 0x80 { break } } - m.XNewThreshold = &MsgAddMultisigSignerParams_NewThreshold{v} default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From e6214bf6574dbbe1092cf989e58217e358ff7584 Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Sun, 22 Feb 2026 16:44:43 +0530 Subject: [PATCH 3/3] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b0bf2f0..79c1a82 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22-alpine AS go-builder +FROM golang:1.23-alpine AS go-builder SHELL ["/bin/sh", "-ecuxo", "pipefail"]